diff options
Diffstat (limited to 'linguistic/source/convdiclist.cxx')
-rw-r--r-- | linguistic/source/convdiclist.cxx | 37 |
1 files changed, 4 insertions, 33 deletions
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index c1280fc799b0..49ab2b485c13 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -397,41 +397,12 @@ void ConvDicNameContainer::AddConvDics( namespace { -template<typename T, typename InitData, - typename Unique = InitData, typename Data = T> -class StaticWithInit_ { -public: - /** Gets the static. Mutual exclusion is performed using the - osl global mutex. - - @return - static variable - */ - static T & get() { - return *rtl_Instance< - T, StaticInstanceWithInit, - ::osl::MutexGuard, ::osl::GetGlobalMutex, - Data, InitData >::create( StaticInstanceWithInit(), - ::osl::GetGlobalMutex(), - InitData() ); - } -private: - struct StaticInstanceWithInit { - T * operator () ( Data d ) { - static T instance(d); - return &instance; + struct StaticConvDicList : public rtl::StaticWithInit< + uno::Reference<XInterface>, StaticConvDicList> { + uno::Reference<XInterface> operator () () { + return (cppu::OWeakObject *) new ConvDicList; } }; -}; - -//after src680m62 you can replace StaticWithInit_ with rtl::StaticWithInit and remove the above definition of StaticWithInit_ - -struct StaticConvDicList : public StaticWithInit_< - uno::Reference<XInterface>, StaticConvDicList> { - uno::Reference<XInterface> operator () () { - return (cppu::OWeakObject *) new ConvDicList; - } -}; } |