diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-11-18 20:41:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-19 09:00:01 +0100 |
commit | f3a0e8ba28d2a6e70d2ce9d4af1a9f823fec884f (patch) | |
tree | c2f513b65c2e95488dea9039b0255b05faba4c75 /xmloff/source/chart/SchXMLEnumConverter.cxx | |
parent | 8b1399cbb76b2f8b1722cb6a4a77b391f5af0862 (diff) |
rtl::Static->thread-safe static in xmloff
Change-Id: I5fa1f0a2b5336508841ef841bb56e2edb25e4ef7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/chart/SchXMLEnumConverter.cxx')
-rw-r--r-- | xmloff/source/chart/SchXMLEnumConverter.cxx | 15 |
1 files changed, 4 insertions, 11 deletions
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: */ |