diff options
Diffstat (limited to 'oox')
-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 |
3 files changed, 9 insertions, 2 deletions
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: */ |