diff options
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/cmdoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/configitem.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/configvaluecontainer.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/defaultoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/dynamicmenuoptions.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/fltrcfg.cxx | 12 | ||||
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 20 | ||||
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 10 | ||||
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/pathoptions.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/saveopt.cxx | 12 |
11 files changed, 84 insertions, 2 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 56b61ad2704a..5826eb0ac082 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -47,6 +47,8 @@ using namespace ::com::sun::star::beans; #define PROPERTYNAME_CMD "Command" +namespace { + /*-**************************************************************************************************************** @descr support simple command option structures and operations on it ****************************************************************************************************************-*/ @@ -83,6 +85,8 @@ class SvtCmdOptions CommandHashMap m_aCommandHashMap; }; +} + typedef ::std::vector< css::uno::WeakReference< css::frame::XFrame > > SvtFrameVector; class SvtCommandOptions_Impl : public ConfigItem diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index 8ed1d317a09c..5de369999fc3 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -76,6 +76,8 @@ namespace utl{ }; } +namespace { + class ValueCounter_Impl { sal_Int16& rCnt; @@ -92,6 +94,8 @@ public: } }; +} + ConfigChangeListener_Impl::ConfigChangeListener_Impl( ConfigItem& rItem, const Sequence< OUString >& rNames) : pParent(&rItem), diff --git a/unotools/source/config/configvaluecontainer.cxx b/unotools/source/config/configvaluecontainer.cxx index 780a59d99926..01a974bcecf2 100644 --- a/unotools/source/config/configvaluecontainer.cxx +++ b/unotools/source/config/configvaluecontainer.cxx @@ -140,6 +140,8 @@ namespace utl //= functors on NodeValueAccessor instances + namespace { + /// base class for functors synchronizing between exchange locations and config sub nodes struct SubNodeAccess { @@ -179,6 +181,8 @@ namespace utl } }; + } + //= OConfigurationValueContainerImpl struct OConfigurationValueContainerImpl diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index dddbd22d3b13..b3c9dca8e38b 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -110,12 +110,16 @@ std::weak_ptr<SvtDefaultOptions_Impl> g_pOptions; typedef OUString SvtDefaultOptions_Impl:: *PathStrPtr; +namespace { + struct PathToDefaultMapping_Impl { SvtPathOptions::Paths const _ePath; PathStrPtr const _pDefaultPath; }; +} + static PathToDefaultMapping_Impl const PathMap_Impl[] = { { SvtPathOptions::PATH_ADDIN, &SvtDefaultOptions_Impl::m_aAddinPath }, diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index fe7f31d6b96a..019ca1b86407 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -59,6 +59,8 @@ using namespace ::com::sun::star::beans; #define PATHPREFIX_SETUP "m" +namespace { + /*-**************************************************************************************************************** @descr struct to hold information about one menu entry. ****************************************************************************************************************-*/ @@ -139,6 +141,8 @@ class SvtDynMenu vector< SvtDynMenuEntry > lUserEntries; }; +} + class SvtDynamicMenuOptions_Impl : public ConfigItem { public: @@ -440,6 +444,8 @@ Sequence< OUString > SvtDynamicMenuOptions_Impl::impl_GetPropertyNames( sal_uInt // private helper +namespace { + class CountWithPrefixSort { public: @@ -467,6 +473,8 @@ class SelectByPrefix } }; +} + // private method void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence< OUString >& lSource , diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx index 92ec14e0dd14..c68ac827ee79 100644 --- a/unotools/source/config/fltrcfg.cxx +++ b/unotools/source/config/fltrcfg.cxx @@ -64,6 +64,8 @@ namespace o3tl { template<> struct typed_flags<ConfigFlags> : is_typed_flags<ConfigFlags, 0xe7fff3f> {}; } +namespace { + class SvtAppFilterOptions_Impl : public utl::ConfigItem { private: @@ -98,6 +100,8 @@ public: } }; +} + SvtAppFilterOptions_Impl::~SvtAppFilterOptions_Impl() { assert(!IsModified()); // should have been committed @@ -130,6 +134,8 @@ void SvtAppFilterOptions_Impl::Load() bSaveVBA = *o3tl::doAccess<bool>(pValues[1]); } +namespace { + class SvtWriterFilterOptions_Impl : public SvtAppFilterOptions_Impl { private: @@ -153,6 +159,8 @@ public: } }; +} + void SvtWriterFilterOptions_Impl::ImplCommit() { SvtAppFilterOptions_Impl::ImplCommit(); @@ -176,6 +184,8 @@ void SvtWriterFilterOptions_Impl::Load() bLoadExecutable = *o3tl::doAccess<bool>(pValues[0]); } +namespace { + class SvtCalcFilterOptions_Impl : public SvtAppFilterOptions_Impl { private: @@ -199,6 +209,8 @@ public: } }; +} + void SvtCalcFilterOptions_Impl::ImplCommit() { SvtAppFilterOptions_Impl::ImplCommit(); diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index bd7f7e21330b..1da36a7e978c 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -448,12 +448,16 @@ static const char* const aImplKillTrailingWithExceptionsList[] = nullptr }; +namespace { + struct ImplFontAttrWeightSearchData { const char* mpStr; FontWeight const meWeight; }; +} + static ImplFontAttrWeightSearchData const aImplWeightAttrSearchList[] = { // the attribute names are ordered by "first match wins" @@ -474,12 +478,16 @@ static ImplFontAttrWeightSearchData const aImplWeightAttrSearchList[] = { nullptr, WEIGHT_DONTKNOW }, }; +namespace { + struct ImplFontAttrWidthSearchData { const char* mpStr; FontWidth const meWidth; }; +} + static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] = { { "narrow", WIDTH_CONDENSED }, @@ -495,12 +503,16 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] = { nullptr, WIDTH_DONTKNOW }, }; +namespace { + struct ImplFontAttrTypeSearchData { const char* mpStr; ImplFontAttrs const mnType; }; +} + static ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[] = { { "monotype", ImplFontAttrs::None }, @@ -734,12 +746,16 @@ void FontSubstConfiguration::getMapName( const OUString& rOrgName, OUString& rSh } } +namespace { + struct StrictStringSort { bool operator()( const FontNameAttr& rLeft, const FontNameAttr& rRight ) { return rLeft.Name.compareTo( rRight.Name ) < 0; } }; +} + // The entries in this table must match the bits in the ImplFontAttrs enum. static const char* const pAttribNames[] = @@ -778,12 +794,16 @@ static const char* const pAttribNames[] = "other" }; +namespace { + struct enum_convert { const char* pName; int const nEnum; }; +} + static const enum_convert pWeightNames[] = { { "normal", WEIGHT_NORMAL }, diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 7c7a6b700cc8..0bbd036b6255 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -208,12 +208,18 @@ void SvtLinguConfigItem::ImplCommit() SaveOptions( GetPropertyNames() ); } -static struct NamesToHdl +namespace { + +struct NamesToHdl { const char *pFullPropName; // full qualified name as used in configuration const char *pPropName; // property name only (atom) of above sal_Int32 const nHdl; // numeric handle representing the property -} const aNamesToHdl[] = +}; + +} + +static NamesToHdl const aNamesToHdl[] = { {/* 0 */ "General/DefaultLocale", UPN_DEFAULT_LOCALE, UPH_DEFAULT_LOCALE}, {/* 1 */ "General/DictionaryList/ActiveDictionaries", UPN_ACTIVE_DICTIONARIES, UPH_ACTIVE_DICTIONARIES}, diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index c6442a16ab9e..be70d4d7e0c1 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -82,6 +82,8 @@ #define FACTORYCOUNT 11 +namespace { + /*-************************************************************************************************************ @descr This struct hold information about one factory. We declare a complete array which can hold infos for all well known factories. Values of enum "EFactory" (see header!) are directly used as index! @@ -224,6 +226,8 @@ struct FactoryInfo css::uno::Reference< css::util::XStringSubstitution > xSubstVars; }; +} + class SvtModuleOptions_Impl : public ::utl::ConfigItem { diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index b6e5006ce39c..f54b388d50a3 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -151,6 +151,8 @@ class SvtPathOptions_Impl static std::weak_ptr<SvtPathOptions_Impl> g_pOptions; +namespace { + // functions ------------------------------------------------------------- struct PropertyStruct { @@ -163,6 +165,8 @@ struct VarNameAttribute const char* pVarName; // The name of the path variable }; +} + static const PropertyStruct aPropNames[] = { { "Addin", SvtPathOptions::PATH_ADDIN }, diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 6c8922edf706..82f63887932d 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -35,9 +35,13 @@ using namespace utl; using namespace com::sun::star::uno; +namespace { + class SvtSaveOptions_Impl; class SvtLoadOptions_Impl; +} + #define CFG_READONLY_DEFAULT false struct SvtLoadSaveOptions_Impl @@ -49,6 +53,8 @@ struct SvtLoadSaveOptions_Impl static std::unique_ptr<SvtLoadSaveOptions_Impl> pOptions; static sal_Int32 nRefCount = 0; +namespace { + class SvtSaveOptions_Impl : public utl::ConfigItem { sal_Int32 nAutoSaveTime; @@ -128,6 +134,8 @@ public: bool IsReadOnly( SvtSaveOptions::EOption eOption ) const; }; +} + void SvtSaveOptions_Impl::SetAutoSaveTime( sal_Int32 n ) { if (!bROAutoSaveTime && nAutoSaveTime!=n) @@ -686,6 +694,8 @@ void SvtSaveOptions_Impl::Notify( const Sequence<OUString>& ) { } +namespace { + class SvtLoadOptions_Impl : public utl::ConfigItem { private: @@ -702,6 +712,8 @@ public: bool IsLoadUserSettings() const {return bLoadUserDefinedSettings;} }; +} + const sal_Char cUserDefinedSettings[] = "UserDefinedSettings"; SvtLoadOptions_Impl::SvtLoadOptions_Impl() |