diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-11-11 22:48:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-11-11 22:49:21 +0100 |
commit | c1758889cbd5e8e4afb1044425c908715eb3e1cd (patch) | |
tree | ff58b017da12c009f0b17c067787d1dbbd52eb7a /dbaccess | |
parent | WaE: OptValue::maValue may be used uninitialized (diff) | |
download | core-c1758889cbd5e8e4afb1044425c908715eb3e1cd.tar.gz core-c1758889cbd5e8e4afb1044425c908715eb3e1cd.zip |
Heavily simplified utl::ConfigManager.
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/misc/userinformation.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 13 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 9 |
3 files changed, 10 insertions, 25 deletions
diff --git a/dbaccess/source/core/misc/userinformation.cxx b/dbaccess/source/core/misc/userinformation.cxx index 27ea6bb51f8b..03b51c9fee8b 100644 --- a/dbaccess/source/core/misc/userinformation.cxx +++ b/dbaccess/source/core/misc/userinformation.cxx @@ -34,18 +34,17 @@ #include <osl/diagnose.h> #include <i18npool/mslangid.hxx> #include <unotools/configmgr.hxx> -#include <comphelper/types.hxx> using namespace ::utl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; //-------------------------------------------------------------------------- -UserInformation::UserInformation() -{ - Any aValue = ConfigManager::GetDirectConfigProperty(ConfigManager::LOCALE); - LanguageType eLanguage = MsLangId::convertIsoStringToLanguage(comphelper::getString(aValue),'-'); - m_aUserLocale = MsLangId::convertLanguageToLocale(eLanguage); -} +UserInformation::UserInformation(): + m_aUserLocale( + MsLangId::convertLanguageToLocale( + MsLangId::convertIsoStringToLanguage( + ConfigManager::getLocale(), '-'))) +{} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 80a1378d6a5d..3abbc2778179 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -456,13 +456,6 @@ struct SQLMessageBox_Impl //------------------------------------------------------------------------------ namespace { - ::rtl::OUString lcl_getProductName() - { - ::rtl::OUString sProductName; - OSL_VERIFY( ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME ) >>= sProductName ); - return sProductName; - } - void lcl_positionInAppFont( const Window& _rParent, Window& _rChild, long _nX, long _nY, long _Width, long _Height ) { Point aPos = _rParent.LogicToPixel( Point( _nX, _nY ), MAP_APPFONT ); @@ -694,9 +687,9 @@ void OSQLMessageBox::impl_addDetailsButton() //------------------------------------------------------------------------------ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) { - // Changed as per BugID 79541 Branding/Configuration - String sDialogTitle( lcl_getProductName() ); - SetText( sDialogTitle.AppendAscii( " Base" ) ); + SetText( + utl::ConfigManager::getProductName() + + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " Base" ) ) ); // position and size the controls and the dialog, depending on whether we have one or two texts to display impl_positionControls(); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 19687ae69c5b..b0d2dfcbd3e0 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1246,13 +1246,6 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection, // ----------------------------------------------------------------------------- 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 '?' @@ -1263,7 +1256,7 @@ void AppendConfigToken( ::rtl::OUString& _rURL, sal_Bool _bQuestionMark ) // set parameters _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Language=")); - _rURL += sLocaleStr; + _rURL += utl::ConfigManager::getLocale(); _rURL += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&System=")); _rURL += SvtHelpOptions().GetSystem(); } |