summaryrefslogtreecommitdiff
path: root/unotools/source/config/fontcfg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'unotools/source/config/fontcfg.cxx')
-rw-r--r--unotools/source/config/fontcfg.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index c3dc28acf079..5786e96af8cc 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -59,8 +59,6 @@ using namespace com::sun::star::container;
using ::rtl::OUString;
-static DefaultFontConfiguration* mpDefaultFontConfiguration = 0;
-
/*
* DefaultFontConfiguration
*/
@@ -98,11 +96,10 @@ static const char* getKeyType( int nKeyType )
}
}
-DefaultFontConfiguration* DefaultFontConfiguration::get()
+DefaultFontConfiguration& DefaultFontConfiguration::get()
{
- if( !mpDefaultFontConfiguration )
- mpDefaultFontConfiguration = new DefaultFontConfiguration();
- return mpDefaultFontConfiguration;
+ static DefaultFontConfiguration aDefaultFontConfiguration;
+ return aDefaultFontConfiguration;
}
DefaultFontConfiguration::DefaultFontConfiguration()