[Libreoffice] Storage of user's configuration

Michael Meeks michael.meeks at suse.com
Tue Jan 24 09:48:22 PST 2012


Hi Martin,

On Tue, 2012-01-24 at 16:22 +0100, Martin Richard wrote:
> I'm hacking the cross-platform filepicker (in fpicker/source/office).
> I added a "Places" (bookmarks) list on the left and I would like to
> save the entries that the user bookmarked .

	Great.

> Cedric Bosdonnat told me to look at xcu and xcs files, but I'm a bit
> lost. I'm looking for a code sample where user's persistent
> configuration is manipulated (read and written) and/or anything that
> can be usefull, like search keywords, links to old threads in the
> mailing list, which would help me to identify some good practices
> (naming conventions, for instance).

	Naming conventions is a suck & see :-) look for something that seems
related, and put it next to it.

	The schemas (XML description of settings and their defaults) live in
officecfg/

	If you do:

	git grep -3 ExperimentalMode

	you should get a manageable set of hits for a single config setting. I
don't think you'll easily be able to use the nice new syntax that
Stephan created:

if (officecfg::Office::Common::Misc::ExperimentalMode::get( comphelper::getProcessComponentContext() ))

	style - since you want a list of items: which is (I'm afraid) harder to
do, you'll most likely have to use a twistier UNO API to access the
configmgr/ implementation, and may have more fun with the schemas :-)

	Hope that helps,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list