diff options
-rw-r--r-- | include/oox/token/namespacemap.hxx | 7 | ||||
-rw-r--r-- | oox/source/core/fastparser.cxx | 2 | ||||
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/token/namespacemap.cxx | 7 |
4 files changed, 11 insertions, 7 deletions
diff --git a/include/oox/token/namespacemap.hxx b/include/oox/token/namespacemap.hxx index 26e4fdce95f7..c02a39ba7bf8 100644 --- a/include/oox/token/namespacemap.hxx +++ b/include/oox/token/namespacemap.hxx @@ -22,7 +22,6 @@ #include <map> -#include <rtl/instance.hxx> #include <rtl/ustring.hxx> #include <sal/types.h> @@ -40,10 +39,8 @@ struct NamespaceMap typedef std::map<sal_Int32, OUString>::const_iterator const_iterator; }; -/** Thread-save singleton of a map of all supported XML namespace URLs. */ -struct StaticNamespaceMap : public ::rtl::Static<NamespaceMap, StaticNamespaceMap> -{ -}; +/** Thread-safe singleton of a map of all supported XML namespace URLs. */ +NamespaceMap& StaticNamespaceMap(); } // namespace oox diff --git a/oox/source/core/fastparser.cxx b/oox/source/core/fastparser.cxx index 9524b1403a90..53e5eb78a849 100644 --- a/oox/source/core/fastparser.cxx +++ b/oox/source/core/fastparser.cxx @@ -62,7 +62,7 @@ InputStreamCloseGuard::~InputStreamCloseGuard() } // namespace FastParser::FastParser() : - mrNamespaceMap( StaticNamespaceMap::get() ) + mrNamespaceMap( StaticNamespaceMap() ) { // create a fast parser instance mxParser = new sax_fastparser::FastSaxParser; diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 6c7aaac65476..7a9728e88f32 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -188,7 +188,7 @@ struct XmlFilterBaseImpl constexpr OUStringLiteral gaBinSuffix( u".bin" ); XmlFilterBaseImpl::XmlFilterBaseImpl() : - mrNamespaceMap(StaticNamespaceMap::get()) + mrNamespaceMap(StaticNamespaceMap()) { // register XML namespaces registerNamespaces(maFastParser); diff --git a/oox/source/token/namespacemap.cxx b/oox/source/token/namespacemap.cxx index 11e7c9f0e45f..1cfa48a1ca28 100644 --- a/oox/source/token/namespacemap.cxx +++ b/oox/source/token/namespacemap.cxx @@ -31,6 +31,13 @@ NamespaceMap::NamespaceMap() #include <namespaces-strictnames.inc> }; } + +/** Thread-safe singleton of a map of all supported XML namespace URLs. */ +NamespaceMap& StaticNamespaceMap() +{ + static NamespaceMap SINGLETON; + return SINGLETON; +} } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |