diff options
Diffstat (limited to 'linguistic/source')
-rw-r--r-- | linguistic/source/convdiclist.cxx | 37 | ||||
-rw-r--r-- | linguistic/source/staticmb.cxx | 29 |
2 files changed, 4 insertions, 62 deletions
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx index 8ba4570ab658..2916b2ee6eec 100644 --- a/linguistic/source/convdiclist.cxx +++ b/linguistic/source/convdiclist.cxx @@ -398,41 +398,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; - } -}; } diff --git a/linguistic/source/staticmb.cxx b/linguistic/source/staticmb.cxx deleted file mode 100644 index 8b2b6bc1a364..000000000000 --- a/linguistic/source/staticmb.cxx +++ /dev/null @@ -1,29 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_linguistic.hxx" |