summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:54 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:54 +0200
commitec6c98105a95bd5ddcd74b30fe51df8434c27fbd (patch)
treefcb9f35a6d4a4d4450358a1515bf792788e3c3d1 /unotools
parentda94363ed7a895fe39cee8d9b762966ebbee50ef (diff)
parentdd8d3fff260af37f152b3b6f0b8bcba2467a17fd (diff)
Merge commit 'libreoffice-3.4.0.2'
Conflicts: svtools/source/filter/wmf/winmtf.hxx tools/source/fsys/urlobj.cxx unotools/source/config/configmgr.cxx unotools/source/config/makefile.mk vcl/inc/vcl/cursor.hxx vcl/source/gdi/outdevnative.cxx vcl/source/window/abstdlg.cxx vcl/source/window/toolbox.cxx vcl/unx/generic/printer/ppdparser.cxx vcl/unx/generic/printer/printerinfomanager.cxx
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/bootstrap.hxx3
-rw-r--r--unotools/source/config/bootstrap.cxx10
-rw-r--r--unotools/source/config/configmgr.cxx11
3 files changed, 17 insertions, 7 deletions
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx
index 38a5a117c045..81135c43fab9 100644
--- a/unotools/inc/unotools/bootstrap.hxx
+++ b/unotools/inc/unotools/bootstrap.hxx
@@ -55,6 +55,9 @@ namespace utl
/// retrieve the product key; uses the given default, if not found
static rtl::OUString getProductKey(rtl::OUString const& _sDefault);
+ /// retrieve the product version
+ static rtl::OUString getProductVersion();
+
/// retrieve the product source (MWS name)
static ::rtl::OUString getProductSource(rtl::OUString const& _sDefault);
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index b3e2a3416ca1..64555b2de877 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -53,6 +53,7 @@
#define BOOTSTRAP_DATA_NAME SAL_CONFIGFILE("bootstrap")
#define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey"
+#define BOOTSTRAP_ITEM_PRODUCT_VERSION "OOOBaseVersion"
#define BOOTSTRAP_ITEM_PRODUCT_SOURCE "ProductSource"
#define BOOTSTRAP_ITEM_VERSIONFILE "Location"
#define BOOTSTRAP_ITEM_BUILDID "buildid"
@@ -647,6 +648,14 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault)
}
// ---------------------------------------------------------------------------------------
+OUString Bootstrap::getProductVersion()
+{
+ // read OOOBaseVersion from version.ini (versionrc)
+ OUString sVersion;
+ data().getVersionValue( OUString( RTL_CONSTASCII_USTRINGPARAM( BOOTSTRAP_ITEM_PRODUCT_VERSION ) ), sVersion, OUString() );
+ return sVersion;
+}
+
OUString Bootstrap::getProductSource(OUString const& _sDefault)
{
OUString const csProductSourceItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_PRODUCT_SOURCE));
@@ -670,6 +679,7 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
sBuildId = data().getBootstrapValue( csBuildIdItem, _sDefault );
return sBuildId;
}
+
// ---------------------------------------------------------------------------------------
OUString Bootstrap::getAllUsersValue(OUString const& _sDefault)
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 6704046fad54..2ddc11340bc7 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -38,7 +38,6 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <osl/diagnose.h>
-#include <i18npool/mslangid.hxx>
#include <rtl/bootstrap.hxx>
#include <rtl/instance.hxx>
#if OSL_DEBUG_LEVEL > 0
@@ -379,12 +378,10 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
Any aRet;
- ::rtl::OUString sBrandName;
- sBrandName = BrandName::get();
-
- if ( eProp == PRODUCTNAME && sBrandName.getLength() )
+ ::rtl::OUString &rBrandName = BrandName::get();
+ if ( eProp == PRODUCTNAME && rBrandName.getLength() )
{
- aRet <<= sBrandName;
+ aRet <<= rBrandName;
return aRet;
}
@@ -532,7 +529,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
}
if ( eProp == PRODUCTNAME )
- aRet >>= sBrandName;
+ aRet >>= rBrandName;
if ( eProp == PRODUCTXMLFILEFORMATNAME )
aRet >>= rXMLFileFormatName;