diff options
author | Jürgen Schmidt <jsc@apache.org> | 2012-03-01 14:58:24 +0000 |
---|---|---|
committer | Jürgen Schmidt <jsc@apache.org> | 2012-03-01 14:58:24 +0000 |
commit | a68cb56ebe40cf499ff16b661f86d44e744572db (patch) | |
tree | 29f0982962683f4c996b91c2942e939930c7848c /unotools | |
parent | 6c15b8fad442596e08d04f90a944ea7a7589a66f (diff) |
add revision to version file, add revision info to about independent of --with-build-version, increase buildid, adapt SOURCEVERSION
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/bootstrap.hxx | 3 | ||||
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/unotools/inc/unotools/bootstrap.hxx b/unotools/inc/unotools/bootstrap.hxx index 6d80101cf944..98beacf30e25 100644 --- a/unotools/inc/unotools/bootstrap.hxx +++ b/unotools/inc/unotools/bootstrap.hxx @@ -56,6 +56,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 SCS Revision information item + static rtl::OUString getRevisionInfo(); + /// retrieve the ALLUSERS information item from setup.ini file; uses the given default, if not found static rtl::OUString getAllUsersValue(rtl::OUString const& _sDefault); diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index cf636567e1bf..a333e4bf588b 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -63,6 +63,7 @@ #define BOOTSTRAP_DIRNAME_USERDIR "user" #define VERSIONFILE_SECTION "Versions" +#define VERSIONFILE_ITEM_SCSREVISION "Revision" #define SETUP_DATA_NAME SAL_CONFIGFILE("setup") #define SETUP_ITEM_ALLUSERS "ALLUSERS" @@ -672,6 +673,22 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault) } // --------------------------------------------------------------------------------------- +OUString Bootstrap::getRevisionInfo() +{ + OUString const _sDefault; + OUString const csRevisionItem(RTL_CONSTASCII_USTRINGPARAM(VERSIONFILE_ITEM_SCSREVISION)); + + OUString sRevisionNumber; + // read buildid from version.ini (versionrc), if it doesn't exist or buildid is empty + if ( data().getVersionValue( csRevisionItem, sRevisionNumber, _sDefault ) != sal_True || + sRevisionNumber.getLength() == 0 ) + // read buildid from bootstrap.ini (bootstraprc) + sRevisionNumber = data().getBootstrapValue( csRevisionItem, _sDefault ); + return sRevisionNumber; +} + +// --------------------------------------------------------------------------------------- + OUString Bootstrap::getAllUsersValue(OUString const& _sDefault) { OUString const csAllUsersItem(RTL_CONSTASCII_USTRINGPARAM(SETUP_ITEM_ALLUSERS)); |