Commit Graph

2 Commits

Author SHA1 Message Date
Stephan Bergmann
cf7c9599e7 Make comphelper/configuration.hxx work for localized properties
See aebf5bf223 "fdo#52232 ConfigurationSet wrapper
unusable for localized properties" for a discussion of the problems with the
original design.

1  Redesigned configmgr's localized property access to understand ['*<locale>']
paths that select the best existing value match for the requested <locale>.
Adapted ConfigurationWrapper::getLocalizedPropertyValue accordingly.

2  Redesigned ConfigurationChanges to fix the locale at instantiation time.
That takes care of ConfigurationWrapper::setLocalizedPropertyValue,
ConfigurationWrapper::getGroupReadWrite, and
ConfigurationWrapper::getSetReadWrite.  (This required an additional constructor
parameter for the ReadWriteAccess service, to specify a locale at instantiation
time.)

3  Redesigned ReadOnlyAccess to be a service that fixes the locale at
instantiation time.  That allows to take care of
ConfigurationWrapper::getGroupReadOnly and ConfigurationWrapper::getSetReadOnly.

Change-Id: I2ae7342b278b6f4222a0189a1deb2a53e204059f
2012-07-25 19:10:19 +02:00
Stephan Bergmann
bcdea3b379 Simplified, type-safe C++ configuration access.
* New offapi com.sun.star.configuration entities to access the complete
  configuration read-only or read/write...
* ...configmgr adapted to support those new services/singletons...
* ...new unotools/configuration.hxx is the type-safe C++ plumbing on top of
  that...
* ...officecfg now generates C++ headers to access all the properties and sets
  given in the .xcs files...
* ...and svl's asiancfg.cxx exemplarily makes use of the new
  officecfg/Office/Common.hxx to access the configuration.
* There is still TODOs:  For one, see those listed in
  officecfg/registry/cppheader.xsl.  For another, at least a notification
  mechanism for the new read-only configuration access and the C++ wrapper is
  missing.
2011-12-13 12:50:34 +01:00