diff options
-rw-r--r-- | xmloff/inc/fasttokenhandler.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLEnumConverter.cxx | 15 | ||||
-rw-r--r-- | xmloff/source/core/fasttokenhandler.cxx | 8 |
3 files changed, 12 insertions, 14 deletions
diff --git a/xmloff/inc/fasttokenhandler.hxx b/xmloff/inc/fasttokenhandler.hxx index 076cd90b55f4..f0acd0337563 100644 --- a/xmloff/inc/fasttokenhandler.hxx +++ b/xmloff/inc/fasttokenhandler.hxx @@ -14,7 +14,6 @@ #include <cppuhelper/implbase.hxx> #include <sax/fastattribs.hxx> #include <xmloff/token/tokens.hxx> -#include <rtl/instance.hxx> #include <sal/log.hxx> #include <xmloff/dllapi.h> @@ -66,7 +65,7 @@ private: static const OUString EMPTY_STRING; }; -struct StaticTokenMap : public rtl::Static< TokenMap, StaticTokenMap > {}; +TokenMap& StaticTokenMap(); class FastTokenHandler final : public sax_fastparser::FastTokenHandlerBase diff --git a/xmloff/source/chart/SchXMLEnumConverter.cxx b/xmloff/source/chart/SchXMLEnumConverter.cxx index 6349b457746c..7bb888ee0380 100644 --- a/xmloff/source/chart/SchXMLEnumConverter.cxx +++ b/xmloff/source/chart/SchXMLEnumConverter.cxx @@ -21,7 +21,6 @@ #include <com/sun/star/chart/ChartLegendExpansion.hpp> #include "SchXMLEnumConverter.hxx" #include <xmloff/xmlement.hxx> -#include <rtl/instance.hxx> using namespace ::xmloff::token; using namespace ::com::sun::star; @@ -45,10 +44,6 @@ public: : XMLEnumPropertyHdl( aXMLLegendPositionEnumMap) {} }; -struct TheLegendPositionPropertyHdl : public rtl::Static< XMLLegendPositionPropertyHdl, TheLegendPositionPropertyHdl > -{ -}; - const SvXMLEnumMapEntry<chart::ChartLegendExpansion> aXMLLegendExpansionEnumMap[] = { { XML_WIDE, chart::ChartLegendExpansion_WIDE }, @@ -65,19 +60,17 @@ public: : XMLEnumPropertyHdl( aXMLLegendExpansionEnumMap) {} }; -struct TheLegendExpansionPropertyHdl : public rtl::Static< XMLLegendExpansionPropertyHdl, TheLegendExpansionPropertyHdl > -{ -}; - }//end anonymous namespace XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendPositionConverter() { - return TheLegendPositionPropertyHdl::get(); + static XMLLegendPositionPropertyHdl SINGLETON; + return SINGLETON; } XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendExpansionConverter() { - return TheLegendExpansionPropertyHdl::get(); + static XMLLegendExpansionPropertyHdl SINGLETON; + return SINGLETON; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/core/fasttokenhandler.cxx b/xmloff/source/core/fasttokenhandler.cxx index 8d63cb74f8fc..9efdf8f15d5e 100644 --- a/xmloff/source/core/fasttokenhandler.cxx +++ b/xmloff/source/core/fasttokenhandler.cxx @@ -32,6 +32,12 @@ namespace token { using namespace css; +TokenMap& StaticTokenMap() +{ + static TokenMap SINGLETON; + return SINGLETON; +} + const css::uno::Sequence< sal_Int8 > TokenMap::EMPTY_BYTE_SEQ; const OUString TokenMap::EMPTY_STRING; @@ -68,7 +74,7 @@ sal_Int32 TokenMap::getTokenPerfectHash( const char *pStr, sal_Int32 nLength ) } FastTokenHandler::FastTokenHandler() : - mrTokenMap( StaticTokenMap::get() ) + mrTokenMap( StaticTokenMap() ) { } |