diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-10 11:39:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-10 16:26:29 +0100 |
commit | d73fc13af4fccb098928d1646ad843d92505562e (patch) | |
tree | 08df89c6e842042da3707b4c32515d8eb726db97 /writerfilter | |
parent | Change some comments to meet doxygen standards (diff) | |
download | core-d73fc13af4fccb098928d1646ad843d92505562e.tar.gz core-d73fc13af4fccb098928d1646ad843d92505562e.zip |
Related: rhbz#855541 ensure PropertyNameSupplier singleton ctor is threadsafe
nothing really to do with odd multithreaded run_exit_handlers bug, just tidied
it up in passing
Change-Id: I9e56a21f92e5f89bbcb4413bb7cae44c48affb17
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 1b4e8abe4082..f6e6f69c13a9 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -16,6 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <rtl/instance.hxx> #include <rtl/ustring.hxx> #include "PropertyIds.hxx" #include <map> @@ -326,10 +327,15 @@ const OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const } return aIt->second; } + +namespace +{ + class thePropertyNameSupplier : public rtl::Static<PropertyNameSupplier, PropertyNameSupplier> {}; +} + PropertyNameSupplier& PropertyNameSupplier::GetPropertyNameSupplier() { - static PropertyNameSupplier aNameSupplier; - return aNameSupplier; + return thePropertyNameSupplier::get(); } } //namespace dmapper |