diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-07-04 16:34:44 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-07-04 16:34:44 +0000 |
commit | e54e50b729c27deb27cd9d121d49197acb602daa (patch) | |
tree | 130bdfa0cedb84839a55d7fc474d584b20bb8fce /vcl/source/app/settings.cxx | |
parent | a5cdf2867dfb71f47a60e8d2faaf72991b2174bd (diff) |
INTEGRATION: CWS iconupdate300u1 (1.74.26); FILE MERGED
2008/05/14 14:38:45 ka 1.74.26.1: #i89469#: added Classic theme
Diffstat (limited to 'vcl/source/app/settings.cxx')
-rw-r--r-- | vcl/source/app/settings.cxx | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 13b96677b116..47577ecc4260 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: settings.cxx,v $ - * $Revision: 1.76 $ + * $Revision: 1.77 $ * * This file is part of OpenOffice.org. * @@ -43,6 +43,7 @@ #include "vcl/unohelp.hxx" #include "unotools/localedatawrapper.hxx" #include "unotools/collatorwrapper.hxx" +#include "unotools/configmgr.hxx" #include "unotools/confignode.hxx" #ifdef WNT @@ -699,6 +700,7 @@ void StyleSettings::Set3DColors( const Color& rColor ) case STYLE_SYMBOLS_INDUSTRIAL: return ::rtl::OUString::createFromAscii( "industrial" ); case STYLE_SYMBOLS_CRYSTAL: return ::rtl::OUString::createFromAscii( "crystal" ); case STYLE_SYMBOLS_TANGO: return ::rtl::OUString::createFromAscii( "tango" ); + case STYLE_SYMBOLS_CLASSIC: return ::rtl::OUString::createFromAscii( "classic" ); } return ::rtl::OUString::createFromAscii( "auto" ); @@ -718,6 +720,8 @@ ULONG StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) cons return STYLE_SYMBOLS_CRYSTAL; else if ( rName == ::rtl::OUString::createFromAscii( "tango" ) ) return STYLE_SYMBOLS_TANGO; + else if ( rName == ::rtl::OUString::createFromAscii( "classic" ) ) + return STYLE_SYMBOLS_CLASSIC; return STYLE_SYMBOLS_AUTO; } @@ -763,13 +767,7 @@ ULONG StyleSettings::GetCurrentSymbolsStyle() const if ( !sbFallbackDesktopChecked ) { - const ::rtl::OUString &rDesktopEnvironment = Application::GetDesktopEnvironment(); - - if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "gnome" ) ) - snFallbackDesktopStyle = STYLE_SYMBOLS_TANGO; - else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) - snFallbackDesktopStyle = STYLE_SYMBOLS_CRYSTAL; - + snFallbackDesktopStyle = GetAutoSymbolsStyle(); sbFallbackDesktopChecked = true; } @@ -784,6 +782,39 @@ ULONG StyleSettings::GetCurrentSymbolsStyle() const // ----------------------------------------------------------------------- +ULONG StyleSettings::GetAutoSymbolsStyle() const +{ + const ::rtl::OUString& rDesktopEnvironment = Application::GetDesktopEnvironment(); + 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" ) ) + nRet = STYLE_SYMBOLS_TANGO; + else if( rDesktopEnvironment.equalsIgnoreAsciiCaseAscii( "kde" ) ) + nRet = STYLE_SYMBOLS_CRYSTAL; + } + + return nRet; +} + +// ----------------------------------------------------------------------- + void StyleSettings::SetStandardStyles() { CopyData(); |