libreoffice converstion of egistrymodifications.xcu user items to systemwide xml registry share
Stephan Bergmann
sbergman at redhat.com
Fri Apr 12 08:13:55 UTC 2019
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.)
More information about the LibreOffice
mailing list