diff options
-rw-r--r-- | comphelper/Library_comphelp.mk | 1 | ||||
-rw-r--r-- | comphelper/Package_inc.mk | 1 | ||||
-rw-r--r-- | comphelper/inc/comphelper/configuration.hxx (renamed from unotools/inc/unotools/configuration.hxx) | 12 | ||||
-rw-r--r-- | comphelper/source/misc/configuration.cxx (renamed from unotools/source/config/configuration.cxx) | 57 | ||||
-rw-r--r-- | cui/source/options/fontsubs.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optmemory.cxx | 4 | ||||
-rw-r--r-- | officecfg/prj/build.lst | 2 | ||||
-rw-r--r-- | officecfg/registry/cppheader.xsl | 10 | ||||
-rw-r--r-- | sfx2/source/appl/appbas.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 4 | ||||
-rw-r--r-- | svl/source/config/asiancfg.cxx | 6 | ||||
-rw-r--r-- | unotools/Library_utl.mk | 1 | ||||
-rw-r--r-- | unotools/Package_inc.mk | 1 |
13 files changed, 54 insertions, 53 deletions
diff --git a/comphelper/Library_comphelp.mk b/comphelper/Library_comphelp.mk index 7534de6b71e5..2b37596b0bcf 100644 --- a/comphelper/Library_comphelp.mk +++ b/comphelper/Library_comphelp.mk @@ -80,6 +80,7 @@ $(eval $(call gb_Library_add_exception_objects,comphelper,\ comphelper/source/misc/componentbase \ comphelper/source/misc/componentcontext \ comphelper/source/misc/componentmodule \ + comphelper/source/misc/configuration \ comphelper/source/misc/configurationhelper \ comphelper/source/misc/docpasswordhelper \ comphelper/source/misc/docpasswordrequest \ diff --git a/comphelper/Package_inc.mk b/comphelper/Package_inc.mk index ba1344a7d5b2..7ed759bc4996 100644 --- a/comphelper/Package_inc.mk +++ b/comphelper/Package_inc.mk @@ -130,6 +130,7 @@ $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/seqstream.hxx,co $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/namecontainer.hxx,comphelper/namecontainer.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/processfactory.hxx,comphelper/processfactory.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/sequenceashashmap.hxx,comphelper/sequenceashashmap.hxx)) +$(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configuration.hxx,comphelper/configuration.hxx)) $(eval $(call gb_Package_add_file,comphelper_inc,inc/comphelper/configurationhelper.hxx,comphelper/configurationhelper.hxx)) # vim: set noet sw=4 ts=4: diff --git a/unotools/inc/unotools/configuration.hxx b/comphelper/inc/comphelper/configuration.hxx index f308aa818037..85f45f9ea7c4 100644 --- a/unotools/inc/unotools/configuration.hxx +++ b/comphelper/inc/comphelper/configuration.hxx @@ -27,8 +27,8 @@ * instead of those above. */ -#ifndef INCLUDED_UNOTOOLS_CONFIGURATION_HXX -#define INCLUDED_UNOTOOLS_CONFIGURATION_HXX +#ifndef INCLUDED_COMPHELPER_CONFIGURATION_HXX +#define INCLUDED_COMPHELPER_CONFIGURATION_HXX #include "sal/config.h" @@ -37,8 +37,8 @@ #include "boost/shared_ptr.hpp" #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" +#include "comphelper/comphelperdllapi.h" #include "sal/types.h" -#include "unotools/unotoolsdllapi.h" namespace com { namespace sun { namespace star { namespace configuration { class XReadWriteAccess; } @@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star { } } } namespace rtl { class OUString; } -namespace unotools { +namespace comphelper { namespace detail { class ConfigurationWrapper; } @@ -63,7 +63,7 @@ namespace detail { class ConfigurationWrapper; } /// /// This is the only class from this header file that client code should use /// directly. -class UNOTOOLS_DLLPUBLIC ConfigurationChanges: private boost::noncopyable { +class COMPHELPER_DLLPUBLIC ConfigurationChanges: private boost::noncopyable { public: static boost::shared_ptr< ConfigurationChanges > create( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > @@ -99,7 +99,7 @@ private: namespace detail { /// @internal -class UNOTOOLS_DLLPUBLIC ConfigurationWrapper: private boost::noncopyable { +class COMPHELPER_DLLPUBLIC ConfigurationWrapper: private boost::noncopyable { public: static ConfigurationWrapper const & get( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > diff --git a/unotools/source/config/configuration.cxx b/comphelper/source/misc/configuration.cxx index a8c818c124dd..8954f4fbc0c3 100644 --- a/unotools/source/config/configuration.cxx +++ b/comphelper/source/misc/configuration.cxx @@ -45,13 +45,13 @@ #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/XComponentContext.hpp" +#include "comphelper/configuration.hxx" #include "rtl/instance.hxx" #include "rtl/oustringostreaminserter.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/log.hxx" -#include "unotools/configuration.hxx" namespace { @@ -59,73 +59,73 @@ namespace css = com::sun::star; struct TheConfigurationWrapper: public rtl::StaticWithArg< - unotools::detail::ConfigurationWrapper, + comphelper::detail::ConfigurationWrapper, css::uno::Reference< css::uno::XComponentContext >, TheConfigurationWrapper > {}; } -boost::shared_ptr< unotools::ConfigurationChanges > -unotools::ConfigurationChanges::create( +boost::shared_ptr< comphelper::ConfigurationChanges > +comphelper::ConfigurationChanges::create( css::uno::Reference< css::uno::XComponentContext > const & context) { return TheConfigurationWrapper::get(context).createChanges(); } -unotools::ConfigurationChanges::~ConfigurationChanges() {} +comphelper::ConfigurationChanges::~ConfigurationChanges() {} -void unotools::ConfigurationChanges::commit() const { +void comphelper::ConfigurationChanges::commit() const { access_->commitChanges(); } -unotools::ConfigurationChanges::ConfigurationChanges( +comphelper::ConfigurationChanges::ConfigurationChanges( css::uno::Reference< css::uno::XComponentContext > const & context): access_(css::configuration::ReadWriteAccess::create(context)) {} -void unotools::ConfigurationChanges::setPropertyValue( +void comphelper::ConfigurationChanges::setPropertyValue( rtl::OUString const & path, css::uno::Any const & value) const { access_->replaceByHierarchicalName(path, value); } css::uno::Reference< css::container::XHierarchicalNameReplace > -unotools::ConfigurationChanges::getGroup(rtl::OUString const & path) const +comphelper::ConfigurationChanges::getGroup(rtl::OUString const & path) const { return css::uno::Reference< css::container::XHierarchicalNameReplace >( access_->getByHierarchicalName(path), css::uno::UNO_QUERY_THROW); } css::uno::Reference< css::container::XNameContainer > -unotools::ConfigurationChanges::getSet(rtl::OUString const & path) const +comphelper::ConfigurationChanges::getSet(rtl::OUString const & path) const { return css::uno::Reference< css::container::XNameContainer >( access_->getByHierarchicalName(path), css::uno::UNO_QUERY_THROW); } -unotools::detail::ConfigurationWrapper const & -unotools::detail::ConfigurationWrapper::get( +comphelper::detail::ConfigurationWrapper const & +comphelper::detail::ConfigurationWrapper::get( css::uno::Reference< css::uno::XComponentContext > const & context) { return TheConfigurationWrapper::get(context); } -unotools::detail::ConfigurationWrapper::ConfigurationWrapper( +comphelper::detail::ConfigurationWrapper::ConfigurationWrapper( css::uno::Reference< css::uno::XComponentContext > const & context): context_(context), access_(css::configuration::ReadOnlyAccess::get(context)) {} -unotools::detail::ConfigurationWrapper::~ConfigurationWrapper() {} +comphelper::detail::ConfigurationWrapper::~ConfigurationWrapper() {} -css::uno::Any unotools::detail::ConfigurationWrapper::getPropertyValue( +css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue( rtl::OUString const & path) const { return access_->getByHierarchicalName(path); } -void unotools::detail::ConfigurationWrapper::setPropertyValue( +void comphelper::detail::ConfigurationWrapper::setPropertyValue( boost::shared_ptr< ConfigurationChanges > const & batch, rtl::OUString const & path, com::sun::star::uno::Any const & value) const { @@ -133,13 +133,14 @@ void unotools::detail::ConfigurationWrapper::setPropertyValue( batch->setPropertyValue(path, value); } -css::uno::Any unotools::detail::ConfigurationWrapper::getLocalizedPropertyValue( +css::uno::Any +comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue( rtl::OUString const & path) const { return access_->getByHierarchicalName(extendLocalizedPath(path)); } -void unotools::detail::ConfigurationWrapper::setLocalizedPropertyValue( +void comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue( boost::shared_ptr< ConfigurationChanges > const & batch, rtl::OUString const & path, com::sun::star::uno::Any const & value) const { @@ -148,7 +149,7 @@ void unotools::detail::ConfigurationWrapper::setLocalizedPropertyValue( } css::uno::Reference< css::container::XHierarchicalNameAccess > -unotools::detail::ConfigurationWrapper::getGroupReadOnly( +comphelper::detail::ConfigurationWrapper::getGroupReadOnly( rtl::OUString const & path) const { return css::uno::Reference< css::container::XHierarchicalNameAccess >( @@ -156,7 +157,7 @@ unotools::detail::ConfigurationWrapper::getGroupReadOnly( } css::uno::Reference< css::container::XHierarchicalNameReplace > -unotools::detail::ConfigurationWrapper::getGroupReadWrite( +comphelper::detail::ConfigurationWrapper::getGroupReadWrite( boost::shared_ptr< ConfigurationChanges > const & batch, rtl::OUString const & path) const { @@ -165,7 +166,7 @@ unotools::detail::ConfigurationWrapper::getGroupReadWrite( } css::uno::Reference< css::container::XNameAccess > -unotools::detail::ConfigurationWrapper::getSetReadOnly( +comphelper::detail::ConfigurationWrapper::getSetReadOnly( rtl::OUString const & path) const { return css::uno::Reference< css::container::XNameAccess >( @@ -173,7 +174,7 @@ unotools::detail::ConfigurationWrapper::getSetReadOnly( } css::uno::Reference< css::container::XNameContainer > -unotools::detail::ConfigurationWrapper::getSetReadWrite( +comphelper::detail::ConfigurationWrapper::getSetReadWrite( boost::shared_ptr< ConfigurationChanges > const & batch, rtl::OUString const & path) const { @@ -181,13 +182,13 @@ unotools::detail::ConfigurationWrapper::getSetReadWrite( return batch->getSet(path); } -boost::shared_ptr< unotools::ConfigurationChanges > -unotools::detail::ConfigurationWrapper::createChanges() const { +boost::shared_ptr< comphelper::ConfigurationChanges > +comphelper::detail::ConfigurationWrapper::createChanges() const { return boost::shared_ptr< ConfigurationChanges >( new ConfigurationChanges(context_)); } -rtl::OUString unotools::detail::ConfigurationWrapper::extendLocalizedPath( +rtl::OUString comphelper::detail::ConfigurationWrapper::extendLocalizedPath( rtl::OUString const & path) const { rtl::OUStringBuffer buf(path); @@ -198,20 +199,20 @@ rtl::OUString unotools::detail::ConfigurationWrapper::extendLocalizedPath( css::uno::UNO_QUERY_THROW)-> getLocale()); SAL_WARN_IF( - locale.Language.indexOf('-') == -1, "unotools", + locale.Language.indexOf('-') == -1, "comphelper", "Locale language \"" << locale.Language << "\" contains \"-\""); assert(locale.Language.indexOf('&') == -1); assert(locale.Language.indexOf('"') == -1); assert(locale.Language.indexOf('\'') == -1); buf.append(locale.Language); SAL_WARN_IF( - locale.Country.isEmpty() && !locale.Variant.isEmpty(), "unotools", + locale.Country.isEmpty() && !locale.Variant.isEmpty(), "comphelper", "Locale has empty country but non-empty variant \"" << locale.Variant << '"'); if (!locale.Country.isEmpty()) { buf.append('-'); SAL_WARN_IF( - locale.Country.indexOf('-') == -1, "unotools", + locale.Country.indexOf('-') == -1, "comphelper", "Locale language \"" << locale.Country << "\" contains \"-\""); assert(locale.Country.indexOf('&') == -1); assert(locale.Country.indexOf('"') == -1); diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index 0060757119fe..961c40a83608 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -231,8 +231,8 @@ sal_Bool SvxFontSubstTabPage::FillItemSet( SfxItemSet& ) if(pConfig->IsModified()) pConfig->Commit(); pConfig->Apply(); - boost::shared_ptr< unotools::ConfigurationChanges > batch( - unotools::ConfigurationChanges::create( + boost::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create( comphelper::getProcessComponentContext())); if(aFontHeightLB.GetSavedValue() != aFontHeightLB.GetSelectEntryPos()) officecfg::Office::Common::Font::SourceViewFont::FontHeight::set( diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx index 82782f5aa82b..69bdf4e68250 100644 --- a/cui/source/options/optmemory.cxx +++ b/cui/source/options/optmemory.cxx @@ -184,8 +184,8 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet ) { sal_Bool bModified = sal_False; - boost::shared_ptr< unotools::ConfigurationChanges > batch( - unotools::ConfigurationChanges::create( + boost::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create( comphelper::getProcessComponentContext())); // Undo-Schritte diff --git a/officecfg/prj/build.lst b/officecfg/prj/build.lst index 6a1f8aae2c98..da5651f46397 100644 --- a/officecfg/prj/build.lst +++ b/officecfg/prj/build.lst @@ -1,2 +1,2 @@ -oc officecfg : TRANSLATIONS:translations soltools solenv unotools LIBXSLT:libxslt NULL +oc officecfg : TRANSLATIONS:translations comphelper soltools solenv LIBXSLT:libxslt NULL oc officecfg\prj nmake - all oc_prj NULL diff --git a/officecfg/registry/cppheader.xsl b/officecfg/registry/cppheader.xsl index 85ccafcf18d9..372876ec3adc 100644 --- a/officecfg/registry/cppheader.xsl +++ b/officecfg/registry/cppheader.xsl @@ -28,7 +28,7 @@ --> <!-- Generate a .hxx file with type-safe C++ abstractions (based on - unotools/configuration.hxx) for all the <prop> and <set> elements in an + comphelper/configuration.hxx) for all the <prop> and <set> elements in an .xcs file. Takes up to three parameters ns1, ns2, ns3 that represent the .xcs file's @@ -110,7 +110,7 @@ <xsl:if test=".//prop/@oor:type = 'xs:short' or .//prop/@oor:type = 'xs:int' or .//prop/@oor:type = 'xs:long' or .//prop/@oor:type = 'xs:hexBinary'"> <xsl:text>#include "sal/types.h"
</xsl:text> </xsl:if> - <xsl:text>#include "unotools/configuration.hxx"
</xsl:text> + <xsl:text>#include "comphelper/configuration.hxx"
</xsl:text> <xsl:text>
</xsl:text> <xsl:text>namespace officecfg { namespace </xsl:text> <xsl:value-of select="$ns1"/> @@ -145,7 +145,7 @@ <xsl:variable name="name" select="translate(@oor:name, '-.', '__')"/> <xsl:text>struct </xsl:text> <xsl:value-of select="$name"/> - <xsl:text>: public unotools::ConfigurationGroup< </xsl:text> + <xsl:text>: public comphelper::ConfigurationGroup< </xsl:text> <xsl:value-of select="$name"/> <xsl:text>> {
</xsl:text> <xsl:text> static rtl::OUString path() { return rtl::OUString(<!-- @@ -179,7 +179,7 @@ <xsl:variable name="name" select="translate(@oor:name, '-.', '__')"/> <xsl:text>struct </xsl:text> <xsl:value-of select="$name"/> - <xsl:text>: public unotools::ConfigurationSet< </xsl:text> + <xsl:text>: public comphelper::ConfigurationSet< </xsl:text> <xsl:value-of select="$name"/> <xsl:text>> {
</xsl:text> <xsl:text> static rtl::OUString path() { return rtl::OUString(<!-- @@ -204,7 +204,7 @@ <xsl:variable name="name" select="translate(@oor:name, '-.', '__')"/> <xsl:text>struct </xsl:text> <xsl:value-of select="$name"/> - <xsl:text>: public unotools::</xsl:text> + <xsl:text>: public comphelper::</xsl:text> <xsl:choose> <xsl:when test="@oor:localized = 'true'"> <xsl:text>ConfigurationLocalizedProperty</xsl:text> diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 660f9a1ae524..58b95c0687e5 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -182,8 +182,8 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq ) case SID_ATTR_UNDO_COUNT: { SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, sal_False); - boost::shared_ptr< unotools::ConfigurationChanges > batch( - unotools::ConfigurationChanges::create( + boost::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create( comphelper::getProcessComponentContext())); officecfg::Office::Common::Undo::Steps::set( comphelper::getProcessComponentContext(), batch, diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 86d02a620df4..006d9770b2a5 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -542,8 +542,8 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) SvtSecurityOptions aSecurityOptions; SvtPathOptions aPathOptions; SvtMiscOptions aMiscOptions; - boost::shared_ptr< unotools::ConfigurationChanges > batch( - unotools::ConfigurationChanges::create( + boost::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create( comphelper::getProcessComponentContext())); if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), sal_True, &pItem) ) { diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx index 51c20858148b..2e9e43f087fb 100644 --- a/svl/source/config/asiancfg.cxx +++ b/svl/source/config/asiancfg.cxx @@ -41,6 +41,7 @@ #include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/Sequence.hxx" +#include "comphelper/configuration.hxx" #include "comphelper/processfactory.hxx" #include "officecfg/Office/Common.hxx" #include "rtl/oustringostreaminserter.hxx" @@ -50,7 +51,6 @@ #include "sal/log.hxx" #include "sal/types.h" #include "svl/asiancfg.hxx" -#include "unotools/configuration.hxx" namespace { @@ -84,12 +84,12 @@ rtl::OUString toString(css::lang::Locale const & locale) { struct SvxAsianConfig::Impl: private boost::noncopyable { Impl(): context(comphelper::getProcessComponentContext()), - batch(unotools::ConfigurationChanges::create(context)) + batch(comphelper::ConfigurationChanges::create(context)) {} css::uno::Reference< css::uno::XComponentContext > context; - boost::shared_ptr< unotools::ConfigurationChanges > batch; + boost::shared_ptr< comphelper::ConfigurationChanges > batch; }; SvxAsianConfig::SvxAsianConfig(): impl_(new Impl) {} diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk index 71ca9c895734..5454edf46af0 100644 --- a/unotools/Library_utl.mk +++ b/unotools/Library_utl.mk @@ -80,7 +80,6 @@ $(eval $(call gb_Library_add_exception_objects,utl,\ unotools/source/config/configmgr \ unotools/source/config/confignode \ unotools/source/config/configpathes \ - unotools/source/config/configuration \ unotools/source/config/configvaluecontainer \ unotools/source/config/defaultoptions \ unotools/source/config/docinfohelper \ diff --git a/unotools/Package_inc.mk b/unotools/Package_inc.mk index 426a8c0df48a..46cb143fa50b 100644 --- a/unotools/Package_inc.mk +++ b/unotools/Package_inc.mk @@ -44,7 +44,6 @@ $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/configitem.hxx,unoto $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/configmgr.hxx,unotools/configmgr.hxx)) $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/confignode.hxx,unotools/confignode.hxx)) $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/configpathes.hxx,unotools/configpathes.hxx)) -$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/configuration.hxx,unotools/configuration.hxx)) $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/configvaluecontainer.hxx,unotools/configvaluecontainer.hxx)) $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/datetime.hxx,unotools/datetime.hxx)) $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/defaultoptions.hxx,unotools/defaultoptions.hxx)) |