diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-10-11 15:12:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-10-11 15:12:10 +0100 |
commit | be3b404ee3acd82605ad6ff5023dfda8c5b189cc (patch) | |
tree | 09495bc4c72e4cfcdc432c93e7f7704ac002b8fa | |
parent | 1362e62f0c9510d74e853ec26ff303b0223817f7 (diff) |
#i112786# make ConfigManager a well-behaved singleton
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index e8bac6f30..3679a6aba 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1268,29 +1268,29 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection, return sName; } // ----------------------------------------------------------------------------- - void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark ) - { - Any aLocale = - ::utl::ConfigManager::GetConfigManager()->GetDirectConfigProperty( ::utl::ConfigManager::LOCALE ); - ::rtl::OUString sLocaleStr; - if ( !( aLocale >>= sLocaleStr ) ) - // fallback is english - sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")); - - // query part exists? - if ( _bQuestionMark ) - // no, so start with '?' - _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); - else - // yes, so only append with '&' - _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&")); - - // set parameters - _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language=")); - _rURL += sLocaleStr; - _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System=")); - _rURL += SvtHelpOptions().GetSystem(); - } +void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark ) +{ + Any aLocale = + ::utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( ::utl::ConfigManager::LOCALE ); + ::rtl::OUString sLocaleStr; + if ( !( aLocale >>= sLocaleStr ) ) + // fallback is english + sLocaleStr = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")); + + // query part exists? + if ( _bQuestionMark ) + // no, so start with '?' + _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("?")); + else + // yes, so only append with '&' + _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&")); + + // set parameters + _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language=")); + _rURL += sLocaleStr; + _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System=")); + _rURL += SvtHelpOptions().GetSystem(); +} namespace { |