Re: Create a config extension to change a string-list value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/6/24 23:19, Juan C. Sanz wrote:
There is a document in the wiki <https://wiki.documentfoundation.org/images/b/b0/LibreOffice_config_extension_writing.pdf> explaining how to create a configuration extensions.

In this document it is said that the valid property values are string, boolean, int, short, long, double, binary.

Also in the Chapter 15 - Configuration Management <https://wiki.documentfoundation.org/Documentation/DevGuide/Configuration_Management> of the Developers Guide that the same types are supported.

But if you search for some config values in Expert configuration, the type may be different of the supported types, for example you con see string-list (or depend on version []string).

The defining document for the configuration XML format is <https://wiki.openoffice.org/wiki/OOR-document-format>, and also see the officecfg/registry/*.dtd files in the LO core repo.

I use something like this, but changing oor:type="xs:string-list" for every of the valid types, and with or without <it> label:

<?xml version="1.0" encoding="UTF-8"?><oor:component-data oor:name="Common" oor:package="org.openoffice.Office" xmlns:oor="http://openoffice.org/2001/registry"; xmlns:xs="http://www.w3.org/2001/XMLSchema";><node oor:name="Security"><node oor:name="Scripting"><prop oor:name="SecureURL" oor:type="xs:string-list" oor:finalized="false"><value><it>"$(work)/BD"</it></value></prop></node></node></oor:component-data>

Three notes:

* The type is called oor:string-list, not xs:string-list.

* Your string list has one element with literal value "$(work)/BD". You probably don't want surrounding quotes as part of the element's value.

* Whether or not something like $(work) is expanded in some way does not depend on the configuration machinery itself, but on the code that consumes that specific property. I have no idea whether that value actually means what you would expect it to me.



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux