summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-10 21:21:55 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-10 21:21:55 +0200
commit9aed026a1c68e27a9f67b58ee3907ecd2d277a18 (patch)
tree7f00f27dd7191316eaca089bc7fa18f85500a890 /unotools
parent5c5172d1fd30e496203d16a927a6ab8956dd2462 (diff)
wikihelp: Pass the LibreOffice version to help.libreoffice.org.
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/bootstrap.hxx3
-rw-r--r--unotools/source/config/bootstrap.cxx10
2 files changed, 13 insertions, 0 deletions
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx
index d17e2940890d..523247b97141 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 b19ee6a3683f..adc4b8cbf3a4 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -52,6 +52,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"
@@ -652,6 +653,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));
@@ -675,6 +684,7 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
sBuildId = data().getBootstrapValue( csBuildIdItem, _sDefault );
return sBuildId;
}
+
// ---------------------------------------------------------------------------------------
OUString Bootstrap::getAllUsersValue(OUString const& _sDefault)