[Solved] How to set the configuration with xcd file

Discuss setup / installation issues - Add a spell checker, Language pack?
Post Reply
godblessfq
Posts: 33
Joined: Wed Jul 19, 2017 2:53 am

[Solved] How to set the configuration with xcd file

Post by godblessfq »

I learned online that we can put openoffice configuration as .xcd files in /usr/lib/libreoffice/share/registry/.
I want to convert this setting from ~/.config/libreoffice/4/user/registrymodifications.xcu to xcd format, so that I don't need to configure open office every time.

Code: Select all

    <item oor:path="/org.openoffice.Office.Accelerators/PrimaryKeys/Modules/org.openoffice.Office.Accelerators:Module['com.sun.star.text.TextDocument']">
        <node oor:name="F4" oor:op="replace">
        <prop oor:name="Command" oor:op="fuse">
            <value xml:lang="en-US">.uno:Reload</value>
        </prop>
        </node>
    </item>
    <item oor:path="/org.openoffice.Office.Accelerators/PrimaryKeys/Global">
        <node oor:name="F4" oor:op="replace">
        <prop oor:name="Command" oor:op="fuse">
            <value xml:lang="en-US">.uno:Reload</value>
        </prop>
        </node>
    </item>
The above setting just bind F4 to reload, how do I do it?
Last edited by godblessfq on Sun Oct 20, 2019 1:48 pm, edited 1 time in total.
LibreOffice 7.2.3.2 on Debian, emacs org-odt exporter (topic 106686)
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to set the configuration with xcd file

Post by John_Ha »

You can:
1. Set the configuration of the program through Tools > Options ...
2. Set the configuration of the new document by the default template.
3. Set other settings via Tools > Customise > Keyboard ...; and Tools > Customise > Events ..., where you can run a macro.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
godblessfq
Posts: 33
Joined: Wed Jul 19, 2017 2:53 am

Re: How to set the configuration with xcd file

Post by godblessfq »

The benefit of using xcd files is that I can save some mouse click around when I have several computers and after upgrading to a new version. I mean I have a dotfile manager, and it will do all my configuration file symlinking with just a single command.
LibreOffice 7.2.3.2 on Debian, emacs org-odt exporter (topic 106686)
hubert lambert
Posts: 145
Joined: Mon Jun 13, 2016 10:50 am

Re: How to set the configuration with xcd file

Post by hubert lambert »

Hi,

I've tried this, that seems to work:

Code: Select all

<?xml version="1.0"?>
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oor="http://openoffice.org/2001/registry">
 <dependency file="main"/>
 <oor:component-data xmlns:install="http://openoffice.org/2004/installation" oor:name="Accelerators" oor:package="org.openoffice.Office">
  <node oor:name="PrimaryKeys">
    <node oor:name="Global">
      <node oor:name="F4" oor:op="replace">
        <prop oor:name="Command" oor:op="fuse">
          <value xml:lang="en-US">.uno:Reload</value>
        </prop>
      </node>
    </node>
    <node oor:name="Modules">
      <node oor:name="com.sun.star.text.TextDocument">
        <node oor:name="F4" oor:op="replace">
          <prop oor:name="Command" oor:op="fuse">
            <value xml:lang="en-US">.uno:Reload</value>
          </prop>
        </node>
      </node>
    </node>
  </node>
 </oor:component-data>
</oor:data>
You may need to first delete the corresponding lines in registrymodifications.xcu.
Regards.
AOOo 4.1.2 on Win7 | LibreOffice on various Linux systems
godblessfq
Posts: 33
Joined: Wed Jul 19, 2017 2:53 am

Re: How to set the configuration with xcd file

Post by godblessfq »

Thank you!
LibreOffice 7.2.3.2 on Debian, emacs org-odt exporter (topic 106686)
Post Reply