summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/fontcfg.hxx4
-rw-r--r--unotools/source/config/fontcfg.cxx24
2 files changed, 22 insertions, 6 deletions
diff --git a/unotools/inc/unotools/fontcfg.hxx b/unotools/inc/unotools/fontcfg.hxx
index 136147a095d4..7932bc5cda46 100644
--- a/unotools/inc/unotools/fontcfg.hxx
+++ b/unotools/inc/unotools/fontcfg.hxx
@@ -93,8 +93,8 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration
rtl::OUString tryLocale( const com::sun::star::lang::Locale& rLocale, const rtl::OUString& rType ) const;
- DefaultFontConfiguration();
public:
+ DefaultFontConfiguration();
~DefaultFontConfiguration();
static DefaultFontConfiguration& get();
@@ -207,8 +207,8 @@ private:
unsigned long getSubstType( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
const rtl::OUString& rType ) const;
void readLocaleSubst( const com::sun::star::lang::Locale& rLocale ) const;
- FontSubstConfiguration();
public:
+ FontSubstConfiguration();
~FontSubstConfiguration();
static FontSubstConfiguration& get();
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index 5786e96af8cc..46d92d121a66 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -37,6 +37,7 @@
#include <unotools/configpathes.hxx>
#include <unotools/syslocale.hxx>
#include <rtl/ustrbuf.hxx>
+#include <rtl/instance.hxx>
#include <sal/macros.h>
#include <tools/debug.hxx>
@@ -96,10 +97,18 @@ static const char* getKeyType( int nKeyType )
}
}
+namespace
+{
+ class theDefaultFontConfiguration
+ : public rtl::Static<DefaultFontConfiguration,
+ theDefaultFontConfiguration>
+ {
+ };
+}
+
DefaultFontConfiguration& DefaultFontConfiguration::get()
{
- static DefaultFontConfiguration aDefaultFontConfiguration;
- return aDefaultFontConfiguration;
+ return theDefaultFontConfiguration::get();
}
DefaultFontConfiguration::DefaultFontConfiguration()
@@ -370,10 +379,17 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale )
* FontSubstConfigItem::get
*/
+namespace
+{
+ class theFontSubstConfiguration
+ : public rtl::Static<FontSubstConfiguration, theFontSubstConfiguration>
+ {
+ };
+}
+
FontSubstConfiguration& FontSubstConfiguration::get()
{
- static FontSubstConfiguration aFontSubstConfiguration;
- return aFontSubstConfiguration;
+ return theFontSubstConfiguration::get();
}
/*