[Libreoffice-commits] .: Branch 'libreoffice-3-4' - unotools/inc unotools/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue May 10 10:28:44 PDT 2011
unotools/inc/unotools/bootstrap.hxx | 3 +++
unotools/source/config/bootstrap.cxx | 10 ++++++++++
2 files changed, 13 insertions(+)
New commits:
commit 38e6007f56087bd5261d76f1b2ccad785f382e00
Author: Jan Holesovsky <kendy at suse.cz>
Date: Tue May 10 21:21:55 2011 +0200
wikihelp: Pass the LibreOffice version to help.libreoffice.org.
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx
index 9f29485..30c4b96 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 170034f..b1c28ca 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)
More information about the Libreoffice-commits
mailing list