Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Thank you Stpehan!!

I created the /usr/lib/libreoffice/share/registry/data/ directory and addeded my registrymodifications-system-wide.xcu and this seems to work.

Thank you very much for the right syntax and hints!

Kind regards,

Jelle de Jong

- name: create /usr/lib/libreoffice/share/registry/data/ directory
  file:
    path: /usr/lib/libreoffice/share/registry/data/
    state: directory
  when: ansible_distribution == 'Linuxmint'
  tags: libreoffice

- name: copying registrymodifications-system-wide.xcu to /usr/lib/libreoffice/share/registry/data/
  copy:
    src: registrymodifications-system-wide.xcu
dest: /usr/lib/libreoffice/share/registry/data/registrymodifications-system-wide.xcu
  when: ansible_distribution == 'Linuxmint'
  tags: libreoffice

On 12/04/2019 10:13, Stephan Bergmann wrote:
On 11/04/2019 21:17, Jelle de Jong wrote:
I am trying to convert changes to /home/$USER/.config/libreoffice/4/user/registrymodifications.xcu into systemwide configuration for users that start libreoffice for the first time under linux with systemwide settings.

I tried placing a xml file in /usr/lib/libreoffice/share/registry/registrymodifications-system-wide.xcu but I can not seem to get the syntax right.

Directly in share/registry/ the file would need to have .xcd extension and adhere to officecfg/registry/data.dtd.  That means that those <item oor:path="..."> elements would not be supported, just the more tedious hierarchical <node oor:name="..."> ones (see officecfg/registry/component-update.dtd for details; seems I never came around to lifting the requirement that an .xcu nested inside an .xcd can only have an oor:component-data top-level element, not an oor:items one).

However, the share/registry/ config layer also supports .xcu files in a data/ sub-dir, so similar to the hack of adding a share/registry/registrymodifications-system-wide.xcd you could use the hack of adding a share/registry/data/registrymodifications-system-wide.xcu into which you could easily copy-paste items from a registrymodifications.xcu:

<?xml version="1.0"?>
<oor:items xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:oor="http://openoffice.org/2001/registry";>
  <item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="WarnAlienFormat" oor:op="fuse"><value>false</value></prop></item>   <item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS Word 2007 XML</value></prop></item>   <item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.presentation.PresentationDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Impress MS PowerPoint 2007 XML</value></prop></item>   <item oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDocument']"><prop oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Calc MS Excel 2007 XML</value></prop></item>
</oor:items>

(The non-hacky way, of course, is to create an .oxt LO extension that you install system-wide.)
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice
<?xml version="1.0"?>
<oor:items xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xmlns:oor="http://openoffice.org/2001/registry";>
  <item oor:path="/org.openoffice.Office.Common/Save/Document"><prop oor:name="WarnAlienFormat" 
oor:op="fuse"><value>false</value></prop></item>
  <item 
oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.text.TextDocument']"><prop
 oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>MS Word 2007 XML</value></prop></item>
  <item 
oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.presentation.PresentationDocument']"><prop
 oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Impress MS PowerPoint 2007 
XML</value></prop></item>
  <item 
oor:path="/org.openoffice.Setup/Office/Factories/org.openoffice.Setup:Factory['com.sun.star.sheet.SpreadsheetDocument']"><prop
 oor:name="ooSetupFactoryDefaultFilter" oor:op="fuse"><value>Calc MS Excel 2007 
XML</value></prop></item>
</oor:items>

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.