summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2010-12-14 16:32:58 +0100
committerPetr Mladek <pmladek@suse.cz>2010-12-14 16:36:20 +0100
commit52fdce9f61ae9cca8a26656a089c6958757dc3aa (patch)
tree5f1c18a8af7198c6830c9802e3766af0c496c786 /xmlhelp
parentc10c07701a57d5e13fb47312615a946d51fc3b3b (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>
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/prj/build.lst2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.hxx16
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx6
-rw-r--r--xmlhelp/source/treeview/makefile.mk1
-rw-r--r--xmlhelp/source/treeview/tvread.cxx5
-rw-r--r--xmlhelp/util/makefile.mk1
6 files changed, 20 insertions, 11 deletions
diff --git a/xmlhelp/prj/build.lst b/xmlhelp/prj/build.lst
index 7430bf6d7ba9..00e285cde858 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 1c487b9eb517..6c6f7703deb5 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.hxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.hxx
@@ -311,13 +311,15 @@ namespace chelp {
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 0aa3d26005b7..55dc2aad5e08 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 0c385862d772..3dc65457016d 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 06c3609aa8fb..41d26d8fdfb6 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 66551f15bffc..5bc5bc690bac 100644
--- a/xmlhelp/util/makefile.mk
+++ b/xmlhelp/util/makefile.mk
@@ -59,6 +59,7 @@ SHL1STDLIBS= \
$(COMPHELPERLIB) \
$(SALLIB) \
$(EXPATASCII3RDLIB) \
+ $(UNOTOOLSLIB) \
$(UCBHELPERLIB) \
$(BERKELEYLIB) \
$(XSLTLIB)