[PATCH libreoffice-4-0] icon style fixes in local help
Andras Timar (via Code Review)
gerrit at gerrit.libreoffice.org
Thu Apr 4 05:39:10 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3201
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/01/3201/1
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
Conflicts:
xmlhelp/Library_ucpchelp1.mk
Change-Id: I1b56beeaf370cb6b20b9a7c69f158291b4128ab0
---
M xmlhelp/Library_ucpchelp1.mk
M xmlhelp/source/cxxhelp/provider/databases.cxx
M xmlhelp/source/cxxhelp/provider/databases.hxx
3 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/xmlhelp/Library_ucpchelp1.mk b/xmlhelp/Library_ucpchelp1.mk
index 23527d1..4749c0d 100644
--- a/xmlhelp/Library_ucpchelp1.mk
+++ b/xmlhelp/Library_ucpchelp1.mk
@@ -70,6 +70,7 @@
sal \
ucbhelper \
utl \
+ 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 7eda0aa..38b0ce4 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"
@@ -138,7 +140,7 @@
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 );
@@ -238,8 +240,7 @@
rtl::OString Databases::getImagesZipFileURL()
{
- //sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle();
- sal_Int16 nSymbolsStyle = 0;
+ OUString aSymbolsStyleName;
try
{
uno::Reference< lang::XMultiServiceFactory > xConfigProvider =
@@ -259,22 +260,31 @@
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 9961cfe..adc826a 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -314,7 +314,7 @@
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;
--
To view, visit https://gerrit.libreoffice.org/3201
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b56beeaf370cb6b20b9a7c69f158291b4128ab0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Andras Timar <atimar at suse.com>
More information about the LibreOffice
mailing list