diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-17 13:54:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-17 14:28:21 +0200 |
commit | e3c05e34fddcecb81a8bd1f625ebcd601a0c0238 (patch) | |
tree | 2f309906fcf229fbba73a5f6e52337e556e334f7 /unotools | |
parent | 369e3fdcdafdb112a6963fb86fa4d4d0edb29c00 (diff) |
Improvement on previous commit
Change-Id: I609961ece562b7e02c542cfeb23d7c584a9663d9
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 8e81c2f21b98..93eda0d0fd2c 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -71,11 +71,11 @@ LocaleDataWrapper::LocaleDataWrapper( ) : xSMgr( xSF ), + xLD( LocaleData::create(comphelper::ComponentContext(xSMgr).getUNOContext()) ), bLocaleDataItemValid( sal_False ), bReservedWordValid( sal_False ) { setLocale( rLocale ); - xLD = LocaleData::create(comphelper::ComponentContext(xSMgr).getUNOContext()); } @@ -131,8 +131,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getLanguageCountryInfo( getLocale() ); + return xLD->getLanguageCountryInfo( getLocale() ); } catch (const Exception& e) { @@ -146,8 +145,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getLocaleItem( getLocale() ); + return xLD->getLocaleItem( getLocale() ); } catch (const Exception& e) { @@ -161,8 +159,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getAllCurrencies2( getLocale() ); + return xLD->getAllCurrencies2( getLocale() ); } catch (const Exception& e) { @@ -176,8 +173,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getAllFormats( getLocale() ); + return xLD->getAllFormats( getLocale() ); } catch (const Exception& e) { @@ -191,8 +187,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getForbiddenCharacters( getLocale() ); + return xLD->getForbiddenCharacters( getLocale() ); } catch (const Exception& e) { @@ -206,8 +201,7 @@ void LocaleDataWrapper::invalidateData() { try { - if ( xLD.is() ) - return xLD->getReservedWord( getLocale() ); + return xLD->getReservedWord( getLocale() ); } catch ( const Exception& e ) { @@ -226,8 +220,7 @@ void LocaleDataWrapper::invalidateData() try { - if ( xLD.is() ) - rInstalledLocales = xLD->getAllInstalledLocaleNames(); + rInstalledLocales = xLD->getAllInstalledLocaleNames(); } catch ( const Exception& e ) { @@ -1832,8 +1825,7 @@ void LocaleDataWrapper::evaluateLocaleDataChecking() { try { - if ( xLD.is() ) - return xLD->getAllCalendars2( getLocale() ); + return xLD->getAllCalendars2( getLocale() ); } catch (const Exception& e) { @@ -1856,12 +1848,9 @@ void LocaleDataWrapper::evaluateLocaleDataChecking() try { - if ( xLD.is() ) - { - const_cast<LocaleDataWrapper*>(this)->aDateAcceptancePatterns = - xLD->getDateAcceptancePatterns( getLocale() ); - return aDateAcceptancePatterns; - } + const_cast<LocaleDataWrapper*>(this)->aDateAcceptancePatterns = + xLD->getDateAcceptancePatterns( getLocale() ); + return aDateAcceptancePatterns; } catch (const Exception& e) { @@ -1881,8 +1870,7 @@ void LocaleDataWrapper::setDateAcceptancePatterns( { try { - if ( xLD.is() ) - aDateAcceptancePatterns = xLD->getDateAcceptancePatterns( getLocale() ); + aDateAcceptancePatterns = xLD->getDateAcceptancePatterns( getLocale() ); } catch (const Exception& e) { |