diff options
-rw-r--r-- | unotools/inc/unotools/configmgr.hxx | 2 | ||||
-rw-r--r-- | unotools/source/config/configmgr.cxx | 20 |
2 files changed, 3 insertions, 19 deletions
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx index c26ff5245739..be02601ee78a 100644 --- a/unotools/inc/unotools/configmgr.hxx +++ b/unotools/inc/unotools/configmgr.hxx @@ -54,7 +54,6 @@ namespace utl xConfigurationProvider; ConfigMgr_Impl* pMgrImpl; - static ConfigManager* pConfigManager; static void getBasisAboutBoxProductVersion( rtl::OUString& rVersion ); public: @@ -81,7 +80,6 @@ namespace utl void StoreConfigItems(); static ConfigManager* GetConfigManager(); - static void RemoveConfigManager(); static rtl::OUString GetConfigBaseURL(); enum ConfigProperty diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index 0df6d49afe59..f9c9c24ed322 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -352,28 +352,14 @@ void ConfigManager::StoreConfigItems() } } } -ConfigManager* ConfigManager::pConfigManager = 0; /* -----------------------------07.09.00 11:06-------------------------------- ---------------------------------------------------------------------------*/ -ConfigManager* ConfigManager::GetConfigManager() -{ - if(!pConfigManager) - { - pConfigManager = new ConfigManager(); - } - return pConfigManager; -} -/* -----------------------------07.09.00 11:06-------------------------------- +struct theConfigManager : public rtl::Static<ConfigManager, theConfigManager> {}; - ---------------------------------------------------------------------------*/ -void ConfigManager::RemoveConfigManager() +ConfigManager* ConfigManager::GetConfigManager() { - if(pConfigManager) - { - delete pConfigManager; - pConfigManager = 0; - } + return &theConfigManager::get(); } /* -----------------------------08.09.00 13:22-------------------------------- |