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 /uui/source | |
parent | 4ffcc73fa25f174c2d1e161f02cce2d7afc15e3b (diff) |
Heavily simplified utl::ConfigManager.
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/iahndl.cxx | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 401228c7ea6e..4f6cb6bfc702 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -1324,19 +1324,7 @@ UUIInteractionHelper::handleGenericErrorRequest( boost::scoped_ptr< ResMgr > xManager( ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) ); - ::rtl::OUString aTitle; - - try - { - uno::Any aProductNameAny = - ::utl::ConfigManager::GetConfigManager() - .GetDirectConfigProperty( - ::utl::ConfigManager::PRODUCTNAME ); - aProductNameAny >>= aTitle; - } - catch( uno::Exception& ) - { - } + rtl::OUString aTitle( utl::ConfigManager::getProductName() ); ::rtl::OUString aErrTitle = String( ResId( nError == ERRCODE_SFX_BROKENSIGNATURE @@ -1542,28 +1530,13 @@ UUIInteractionHelper::handleBrokenPackageRequest( else return; - uno::Any aProductNameAny = - ::utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( - ::utl::ConfigManager::PRODUCTNAME ); - uno::Any aProductVersionAny = - ::utl::ConfigManager::GetConfigManager().GetDirectConfigProperty( - ::utl::ConfigManager::PRODUCTVERSION ); - ::rtl::OUString aProductName, aProductVersion; - if ( !( aProductNameAny >>= aProductName ) ) - aProductName - = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("StarOffice") ); - - ::rtl::OUString aTitle( aProductName ); - if( aProductVersionAny >>= aProductVersion ) - { - aTitle += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(" ") ); - aTitle += aProductVersion; - } + rtl::OUString title( + utl::ConfigManager::getProductName() + + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) + + utl::ConfigManager::getProductVersion() ); - switch ( executeMessageBox( getParentProperty(), - aTitle, - aMessage, - nButtonMask )) + switch ( + executeMessageBox( getParentProperty(), title, aMessage, nButtonMask ) ) { case ERRCODE_BUTTON_OK: OSL_ENSURE( xAbort.is(), "unexpected situation" ); |