diff options
author | Andras Timar <atimar@suse.com> | 2013-04-02 04:23:56 -0700 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2013-04-02 07:15:24 -0700 |
commit | 8d1765439caad42c8b679f94211c9bf022f51682 (patch) | |
tree | 62ff413423546894880b91d82dd0b95e182e68a8 /xmlhelp | |
parent | types.rdb format flags default service ctors as RT_MODE_TWOWAY (diff) | |
download | core-8d1765439caad42c8b679f94211c9bf022f51682.tar.gz core-8d1765439caad42c8b679f94211c9bf022f51682.zip |
icon style fixes in local help
correct icon style in offline help when icon style is Automatic
change icon style in offile help when icon style is changed on UI
Change-Id: I1b56beeaf370cb6b20b9a7c69f158291b4128ab0
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/Library_ucpchelp1.mk | 1 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.cxx | 30 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.hxx | 2 |
3 files changed, 22 insertions, 11 deletions
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk index 3d7d057ad035..a1d119f278e1 100644 --- a/xmlhelp/Library_ucpchelp1.mk +++ b/xmlhelp/Library_ucpchelp1.mk @@ -72,6 +72,7 @@ $(eval $(call gb_Library_use_libraries,ucpchelp1,\ ucbhelper \ utl \ i18nisolang1 \ + vcl \ )) $(eval $(call gb_Library_add_exception_objects,ucpchelp1,\ diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index c875840f5a39..0ecfa335b19c 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -61,6 +61,8 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/string.hxx> +#include <vcl/svapp.hxx> + #include "databases.hxx" #include "urlparameter.hxx" @@ -135,7 +137,7 @@ Databases::Databases( sal_Bool showBasic, vendVersion( rtl::OUString( "%VENDORVERSION" ) ), vendShort( rtl::OUString( "%VENDORSHORT" ) ), m_aImagesZipPaths( imagesZipPaths ), - m_nSymbolsStyle( 0 ) + m_aSymbolsStyleName( "" ) { m_xSMgr = Reference< XMultiComponentFactory >( m_xContext->getServiceManager(), UNO_QUERY ); @@ -235,8 +237,7 @@ static bool impl_getZipFile( rtl::OString Databases::getImagesZipFileURL() { - //sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle(); - sal_Int16 nSymbolsStyle = 0; + OUString aSymbolsStyleName; try { uno::Reference< lang::XMultiServiceFactory > xConfigProvider = @@ -256,22 +257,31 @@ rtl::OString Databases::getImagesZipFileURL() bool bChanged = false; uno::Reference< container::XHierarchicalNameAccess > xAccess(xCFG, uno::UNO_QUERY_THROW); - uno::Any aResult = xAccess->getByHierarchicalName(::rtl::OUString("Misc/SymbolSet")); - if ( (aResult >>= nSymbolsStyle) && m_nSymbolsStyle != nSymbolsStyle ) + uno::Any aResult = xAccess->getByHierarchicalName(::rtl::OUString("Misc/SymbolStyle")); + if ( (aResult >>= aSymbolsStyleName) && m_aSymbolsStyleName != aSymbolsStyleName ) { - m_nSymbolsStyle = nSymbolsStyle; + m_aSymbolsStyleName = aSymbolsStyleName; bChanged = true; } if ( m_aImagesZipFileURL.isEmpty() || bChanged ) { - rtl::OUString aImageZip, aSymbolsStyleName; - aResult = xAccess->getByHierarchicalName(::rtl::OUString("Misc/SymbolStyle")); - aResult >>= aSymbolsStyleName; - + rtl::OUString aImageZip; bool bFound = false; + if ( !aSymbolsStyleName.isEmpty() ) { + if ( aSymbolsStyleName.equalsAscii("auto") ) + { + OUString const & env = Application::GetDesktopEnvironment(); + if ( env.equalsIgnoreAsciiCase("tde") || + env.equalsIgnoreAsciiCase("kde") ) + aSymbolsStyleName = "crystal"; + else if ( env.equalsIgnoreAsciiCase("kde4") ) + aSymbolsStyleName = "oxygen"; + else + aSymbolsStyleName = "tango"; + } rtl::OUString aZipName = rtl::OUString( "images_" ); aZipName += aSymbolsStyleName; aZipName += rtl::OUString( ".zip" ); diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index ec9b23e8cea5..afb9cb70f567 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -314,7 +314,7 @@ namespace chelp { rtl::OUString m_aInstallDirectory; // Installation directory com::sun::star::uno::Sequence< rtl::OUString > m_aImagesZipPaths; rtl::OString m_aImagesZipFileURL; - sal_Int16 m_nSymbolsStyle; + rtl::OUString m_aSymbolsStyleName; std::vector< rtl::OUString > m_avModules; |