From d873fc5f1226f4689936b736704b2f3d9156bbe5 Mon Sep 17 00:00:00 2001 From: Petr Mladek Date: Tue, 14 Dec 2010 16:32:58 +0100 Subject: use BrOffice also in the help content when enabled (fdo#31770) use ::utl::ConfigManager::GetDirectConfigProperty to get the product name; it returns BrOffice in pt_BR locales when BrOffice branding enabled Signed off by Michael Meeks --- xmlhelp/prj/build.lst | 2 +- xmlhelp/source/cxxhelp/provider/databases.hxx | 18 ++++++++++-------- xmlhelp/source/cxxhelp/provider/provider.cxx | 6 ++++-- xmlhelp/source/treeview/makefile.mk | 1 + xmlhelp/source/treeview/tvread.cxx | 5 ++++- xmlhelp/util/makefile.mk | 1 + 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/xmlhelp/prj/build.lst b/xmlhelp/prj/build.lst index 7430bf6d7b..00e285cde8 100644 --- a/xmlhelp/prj/build.lst +++ b/xmlhelp/prj/build.lst @@ -1,4 +1,4 @@ -xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb LUCENE:lucene javaunohelper l10ntools NULL +xh xmlhelp : comphelper ucbhelper LIBXSLT:libxslt unoil BERKELEYDB:berkeleydb LUCENE:lucene javaunohelper l10ntools unotools NULL xh xmlhelp usr1 - all xh_mkout NULL xh xmlhelp\inc nmake - all xh_inc NULL xh xmlhelp\source\treeview nmake - all xh_treeview xh_inc NULL diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index 134adbdeea..5f029c2ed2 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -310,14 +310,16 @@ namespace chelp { int m_nCustomCSSDocLength; char* m_pCustomCSSDoc; rtl::OUString m_aCSS; - -#define PRODUCTNAME 0 -#define PRODUCTVERSION 1 -#define VENDORNAME 2 -#define VENDORVERSION 3 -#define VENDORSHORT 4 -#define NEWPRODUCTNAME 5 -#define NEWPRODUCTVERSION 6 + + enum { + PRODUCTNAME = 0, + PRODUCTVERSION, + VENDORNAME, + VENDORVERSION, + VENDORSHORT, + NEWPRODUCTNAME, + NEWPRODUCTVERSION + }; int m_vAdd[7]; rtl::OUString m_vReplacement[7]; diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx index 365fff09a6..e6f4898f2f 100644 --- a/xmlhelp/source/cxxhelp/provider/provider.cxx +++ b/xmlhelp/source/cxxhelp/provider/provider.cxx @@ -47,6 +47,7 @@ #include #include #include +#include #include #include "databases.hxx" @@ -306,9 +307,10 @@ void ContentProvider::init() * productversion, */ + rtl::OUString productname; + ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= productname; + xHierAccess = getHierAccess( sProvider, "org.openoffice.Setup" ); - rtl::OUString productname( - getKey( xHierAccess,"Product/ooName" ) ); rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) ); diff --git a/xmlhelp/source/treeview/makefile.mk b/xmlhelp/source/treeview/makefile.mk index 0c385862d7..3dc6545701 100644 --- a/xmlhelp/source/treeview/makefile.mk +++ b/xmlhelp/source/treeview/makefile.mk @@ -57,6 +57,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(COMPHELPERLIB) \ $(EXPATASCII3RDLIB) \ + $(UNOTOOLSLIB) \ $(SALLIB) SHL1VERSIONMAP=$(SOLARENV)/src/component.map diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx index 988a775d9c..9d3ffa8701 100644 --- a/xmlhelp/source/treeview/tvread.cxx +++ b/xmlhelp/source/treeview/tvread.cxx @@ -36,6 +36,7 @@ #include "tvread.hxx" #include #include +#include #include #include @@ -676,10 +677,12 @@ ConfigData TVChildTarget::init( const Reference< XMultiServiceFactory >& xSMgr ) /* reading setup */ /**********************************************************************/ + rtl::OUString productName; + ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= productName; + xHierAccess = getHierAccess( sProvider, "org.openoffice.Setup" ); - rtl::OUString productName( getKey( xHierAccess,"Product/ooName" ) ); rtl::OUString setupversion( getKey( xHierAccess,"Product/ooSetupVersion" ) ); rtl::OUString setupextension; diff --git a/xmlhelp/util/makefile.mk b/xmlhelp/util/makefile.mk index 66551f15bf..5bc5bc690b 100644 --- a/xmlhelp/util/makefile.mk +++ b/xmlhelp/util/makefile.mk @@ -59,6 +59,7 @@ SHL1STDLIBS= \ $(COMPHELPERLIB) \ $(SALLIB) \ $(EXPATASCII3RDLIB) \ + $(UNOTOOLSLIB) \ $(UCBHELPERLIB) \ $(BERKELEYLIB) \ $(XSLTLIB) -- cgit v1.2.3