summaryrefslogtreecommitdiff
path: root/unotools/source/config/fontcfg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-11-18 20:24:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-11-19 07:33:34 +0100
commitf7a8c3cc4dc9a316b39e8680a2af330d8f8ba296 (patch)
tree89eeb3f9c2da4c5f459d4e778ac6c54625a99548 /unotools/source/config/fontcfg.cxx
parent4d3e4c1cf3f117b8abd8dd67843864bb4c2e5a2f (diff)
rtl::Static->thread-safe static in unotools
Change-Id: I2a8c9ca7c45a8e20f3d114722a0677b856a13d8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/fontcfg.cxx')
-rw-r--r--unotools/source/config/fontcfg.cxx24
1 files changed, 4 insertions, 20 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index cfa6705a41c6..ef94981d7746 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -31,7 +31,6 @@
#include <comphelper/propertysequence.hxx>
#include <unotools/syslocale.hxx>
#include <rtl/ustrbuf.hxx>
-#include <rtl/instance.hxx>
#include <osl/diagnose.h>
#include <sal/macros.h>
#include <sal/log.hxx>
@@ -83,18 +82,10 @@ static const char* getKeyType( DefaultFontType nKeyType )
}
}
-namespace
-{
- class theDefaultFontConfiguration
- : public rtl::Static<DefaultFontConfiguration,
- theDefaultFontConfiguration>
- {
- };
-}
-
DefaultFontConfiguration& DefaultFontConfiguration::get()
{
- return theDefaultFontConfiguration::get();
+ static DefaultFontConfiguration theDefaultFontConfiguration;
+ return theDefaultFontConfiguration;
}
DefaultFontConfiguration::DefaultFontConfiguration()
@@ -297,17 +288,10 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const LanguageTag& rLan
* FontSubstConfigItem::get
*/
-namespace
-{
- class theFontSubstConfiguration
- : public rtl::Static<FontSubstConfiguration, theFontSubstConfiguration>
- {
- };
-}
-
FontSubstConfiguration& FontSubstConfiguration::get()
{
- return theFontSubstConfiguration::get();
+ static FontSubstConfiguration theFontSubstConfiguration;
+ return theFontSubstConfiguration;
}
/*