tdf#135133: Don't try to read BuildVersion

The option to set it was removed in 5fdf2009d2,
and now the check is redundant - and even harmful until the remnants of the
setting is dropped from bootstrap.ini. Currently the dummy value found there
makes the About dialog miss the build id, and copying info to clipboard gives
<buildversion> instead of proper build id. Previously the string was always
empty in most builds (including TDF), which made the code proceed to buildid.

Bootstrap::getBuildVersion got unused now, and is removed.

Change-Id: If59e456655da29bb9421edc0e15d421829d0a02b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100957
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
Mike Kaganski
2020-08-18 22:23:30 +03:00
parent 8891a2fc2a
commit 00fa759dc9
3 changed files with 5 additions and 21 deletions

View File

@@ -19,7 +19,6 @@
#include <about.hxx>
#include <osl/diagnose.h> //OSL_ENSURE
#include <osl/process.h> //osl_getProcessLocale
#include <rtl/character.hxx> //rtl::isAsciiHexDigit
#include <sal/log.hxx> //SAL_WARN
@@ -35,7 +34,7 @@
#include <sfx2/app.hxx> //SfxApplication::loadBrandSvg
#include <strings.hrc>
#include <svtools/langhelp.hxx>
#include <unotools/bootstrap.hxx> //utl::Bootstrap::getBuildVersion
#include <unotools/bootstrap.hxx> //utl::Bootstrap::getBuildIdData
#include <unotools/configmgr.hxx> //ConfigManager::
#include <com/sun/star/datatransfer/clipboard/SystemClipboard.hpp>
@@ -156,13 +155,10 @@ OUString AboutDialog::GetVersionString() {
return sVersion;
}
OUString AboutDialog::GetBuildString() {
const OUString sDefault;
OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault));
if (sBuildId.isEmpty())
sBuildId = utl::Bootstrap::getBuildIdData(sDefault);
OSL_ENSURE(!sBuildId.isEmpty(), "No BUILDID in bootstrap file");
OUString AboutDialog::GetBuildString()
{
OUString sBuildId(utl::Bootstrap::getBuildIdData(""));
SAL_WARN_IF(!sBuildId.isEmpty(), "cui.dialogs", "No BUILDID in bootstrap file");
return sBuildId;
}

View File

@@ -46,9 +46,6 @@ namespace utl
/// retrieve the BUILDID information item; uses the given default, if not found
static OUString getBuildIdData(OUString const& _sDefault);
/// retrieve the BuildVersion information item; uses the given default, if not found
static OUString getBuildVersion(OUString const& _sDefault);
/// reload cached data
static void reloadData();

View File

@@ -37,7 +37,6 @@
#define BOOTSTRAP_ITEM_PRODUCT_KEY "ProductKey"
#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"
@@ -542,14 +541,6 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault)
return data().getBootstrapValue( BOOTSTRAP_ITEM_PRODUCT_KEY, _sDefault );
}
OUString Bootstrap::getBuildVersion(OUString const& _sDefault)
{
OUString sBuildVersion;
// read BuildVersion from version.ini (versionrc)
utl::Bootstrap::Impl::getVersionValue( BOOTSTRAP_ITEM_BUILDVERSION, sBuildVersion, _sDefault );
return sBuildVersion;
}
OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
{
OUString sBuildId;