diff options
| author | Petr Mladek <pmladek@suse.cz> | 2010-12-14 16:32:58 +0100 | 
|---|---|---|
| committer | Petr Mladek <pmladek@suse.cz> | 2010-12-14 16:36:20 +0100 | 
| commit | d873fc5f1226f4689936b736704b2f3d9156bbe5 (patch) | |
| tree | c789290c7ca72ac486dfc307d73a3378fc8c2030 | |
| parent | 45b2e791e0ef33c7665cf6047a6dcb88c2862799 (diff) | |
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 <michael.meeks@novell.com>
| -rw-r--r-- | xmlhelp/prj/build.lst | 2 | ||||
| -rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.hxx | 18 | ||||
| -rw-r--r-- | xmlhelp/source/cxxhelp/provider/provider.cxx | 6 | ||||
| -rw-r--r-- | xmlhelp/source/treeview/makefile.mk | 1 | ||||
| -rw-r--r-- | xmlhelp/source/treeview/tvread.cxx | 5 | ||||
| -rw-r--r-- | 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 <com/sun/star/container/XNameReplace.hpp>  #include <com/sun/star/uno/XComponentContext.hpp>  #include <com/sun/star/beans/XPropertySet.hpp> +#include <unotools/configmgr.hxx>  #include <rtl/bootstrap.hxx>  #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 <expat.h>  #include <osl/file.hxx> +#include <unotools/configmgr.hxx>  #include <com/sun/star/frame/XConfigManager.hpp>  #include <com/sun/star/beans/PropertyValue.hpp> @@ -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)  | 
