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 /vcl/source/app/settings.cxx | |
parent | 4ffcc73fa25f174c2d1e161f02cce2d7afc15e3b (diff) |
Heavily simplified utl::ConfigManager.
Diffstat (limited to 'vcl/source/app/settings.cxx')
-rw-r--r-- | vcl/source/app/settings.cxx | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 533fe6b3ac64..9267025c455e 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -45,7 +45,6 @@ #include "unotools/fontcfg.hxx" #include "unotools/localedatawrapper.hxx" #include "unotools/collatorwrapper.hxx" -#include "unotools/configmgr.hxx" #include "unotools/confignode.hxx" #include "unotools/syslocaleoptions.hxx" @@ -804,34 +803,16 @@ sal_uLong StyleSettings::GetCurrentSymbolsStyle() const sal_uLong StyleSettings::GetAutoSymbolsStyle() const { - const ::rtl::OUString& rDesktopEnvironment = Application::GetDesktopEnvironment(); - sal_uLong nRet = STYLE_SYMBOLS_DEFAULT; - bool bCont = true; - - try - { - const ::com::sun::star::uno::Any aAny( ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OPENSOURCECONTEXT ) ); - sal_Int32 nValue( 0 ); - - aAny >>= nValue; - - if( 0 == nValue ) - bCont = false; - } - catch ( ::com::sun::star::uno::Exception& ) - { - } - - if( bCont ) - { - if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) || - rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "windows" ) ) - nRet = STYLE_SYMBOLS_TANGO; - else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) - nRet = STYLE_SYMBOLS_CRYSTAL; - else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde4" ) ) - nRet = STYLE_SYMBOLS_OXYGEN; - } + rtl::OUString const & env = Application::GetDesktopEnvironment(); + sal_uLong nRet = + ( env.equalsIgnoreAsciiCaseAscii( "gnome" ) || + env.equalsIgnoreAsciiCaseAscii( "windows" ) ) + ? STYLE_SYMBOLS_TANGO + : env.equalsIgnoreAsciiCaseAscii( "kde" ) + ? STYLE_SYMBOLS_CRYSTAL + : env.equalsIgnoreAsciiCaseAscii( "kde4" ) + ? STYLE_SYMBOLS_OXYGEN + : STYLE_SYMBOLS_DEFAULT; // falback to any existing style if ( ! CheckSymbolStyle (nRet) ) |