summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-04-10 12:36:57 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-04-10 12:49:49 +0100
commit65cf853589958a51a3a30f6e03dc578c01c320bc (patch)
tree7901ac2a6754e473a7c134e1046542786a4e38b6 /unotools
parentf597ebe353f4505e2874c428c2a9487c51000836 (diff)
add a getBuildVersion helper
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/bootstrap.hxx3
-rw-r--r--unotools/source/config/bootstrap.cxx12
2 files changed, 15 insertions, 0 deletions
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx
index 5a98181457c4..922f41780b0e 100644
--- a/unotools/inc/unotools/bootstrap.hxx
+++ b/unotools/inc/unotools/bootstrap.hxx
@@ -61,6 +61,9 @@ namespace utl
/// retrieve the BUILDID information item; uses the given default, if not found
static rtl::OUString getBuildIdData(rtl::OUString const& _sDefault);
+ /// retrieve the BuildVersion information item; uses the given default, if not found
+ static rtl::OUString getBuildVersion(rtl::OUOUString const& _sDefault);
+
/// reload cached data
static void reloadData();
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index ae5c8ad81a83..94c8c2e89f40 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -54,6 +54,7 @@
#define BOOTSTRAP_ITEM_PRODUCT_SOURCE "ProductSource"
#define BOOTSTRAP_ITEM_VERSIONFILE "Location"
#define BOOTSTRAP_ITEM_BUILDID "buildid"
+#define BOOTSTRAP_ITEM_BUILDVERSION "BuildVersion"
#define BOOTSTRAP_ITEM_BASEINSTALLATION "BRAND_BASE_DIR"
#define BOOTSTRAP_ITEM_USERINSTALLATION "UserInstallation"
@@ -642,6 +643,17 @@ OUString Bootstrap::getProductSource(OUString const& _sDefault)
}
// ---------------------------------------------------------------------------------------
+OUString Bootstrap::getBuildVersion(OUString const& _sDefault)
+{
+ OUString const csBuildVersionItem(BOOTSTRAP_ITEM_BUILDVERSION);
+
+ OUString sBuildVersion;
+ // read ProductSource from version.ini (versionrc)
+ data().getVersionValue( csBuildVersionItem, sBuildVersion, _sDefault );
+ return sBuildVersion;
+}
+// ---------------------------------------------------------------------------------------
+
OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
{
OUString const csBuildIdItem(RTL_CONSTASCII_USTRINGPARAM(BOOTSTRAP_ITEM_BUILDID));