diff options
-rw-r--r-- | include/unotools/moduleoptions.hxx | 3 | ||||
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 23 |
2 files changed, 6 insertions, 20 deletions
diff --git a/include/unotools/moduleoptions.hxx b/include/unotools/moduleoptions.hxx index 3293560c3733..1324e4d06e18 100644 --- a/include/unotools/moduleoptions.hxx +++ b/include/unotools/moduleoptions.hxx @@ -27,7 +27,6 @@ #include <unotools/options.hxx> #include <memory> -namespace osl { class Mutex; } namespace com::sun::star::frame { class XModel; } namespace com::sun::star::beans { struct PropertyValue; } @@ -168,8 +167,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions final : public utl::de css::uno::Sequence < OUString > GetAllServiceNames(); private: - UNOTOOLS_DLLPRIVATE static ::osl::Mutex& impl_GetOwnStaticMutex(); - std::shared_ptr<SvtModuleOptions_Impl> m_pImpl; }; // class SvtModuleOptions diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 1468501220ec..ea3db01585c2 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -761,6 +761,12 @@ void SvtModuleOptions_Impl::MakeReadonlyStatesAvailable() namespace { //global std::weak_ptr<SvtModuleOptions_Impl> g_pModuleOptions; + +osl::Mutex& impl_GetOwnStaticMutex() +{ + static osl::Mutex s_Mutex; + return s_Mutex; +} } /*-************************************************************************************************************ @@ -907,23 +913,6 @@ bool SvtModuleOptions::IsDataBase() const return m_pImpl->IsModuleInstalled( EModule::DATABASE ); } -namespace -{ - class theModuleOptionsMutex : public rtl::Static<osl::Mutex, theModuleOptionsMutex> {}; -} -/*-**************************************************************************************************** - @short return a reference to a static mutex - @descr These class is threadsafe. - We create a static mutex only for one time and use it to protect our refcount and container - member! - @return A reference to a static mutex member. - @threadsafe yes -*//*-*****************************************************************************************************/ -::osl::Mutex& SvtModuleOptions::impl_GetOwnStaticMutex() -{ - return theModuleOptionsMutex::get(); -} - OUString SvtModuleOptions::GetModuleName( EModule eModule ) const { switch( eModule ) |