[Libreoffice-commits] core.git: Branch 'libreoffice-7-0-1' - cui/source include/unotools unotools/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 20 19:40:51 UTC 2020
cui/source/dialogs/about.cxx | 17 +++++------------
include/unotools/bootstrap.hxx | 3 ---
unotools/source/config/bootstrap.cxx | 11 -----------
3 files changed, 5 insertions(+), 26 deletions(-)
New commits:
commit 37f452bc2beeae9b4648013a3bf4f2e8b56c0c85
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Aug 18 22:23:30 2020 +0300
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Aug 20 21:40:19 2020 +0200
tdf#135133: Don't try to read BuildVersion
The option to set it was removed in 5fdf2009d21fa220dfee70ea755bd698c16257a7,
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 at collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100975
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 0a796797ddfe2d1913ac91908074c397cf7c9c82)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101056
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index efeef5a9c002..917e5f4bd30d 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -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
@@ -34,7 +33,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>
@@ -155,16 +154,10 @@ OUString AboutDialog::GetVersionString() {
return sVersion;
}
-OUString AboutDialog::GetBuildString() {
-
- OUString sDefault;
- OUString sBuildId(utl::Bootstrap::getBuildVersion(sDefault));
- if (sBuildId.isEmpty())
- sBuildId = utl::Bootstrap::getBuildIdData(sDefault);
- if (sBuildId.isEmpty()) {
- sBuildId = sBuildId.getToken(0, '-');
- }
- 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;
}
diff --git a/include/unotools/bootstrap.hxx b/include/unotools/bootstrap.hxx
index 447c33b64942..3f87741408c4 100644
--- a/include/unotools/bootstrap.hxx
+++ b/include/unotools/bootstrap.hxx
@@ -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();
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 459d8e518945..a6c8eb228067 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -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"
@@ -546,16 +545,6 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault)
return data().getBootstrapValue( csProductKeyItem, _sDefault );
}
-OUString Bootstrap::getBuildVersion(OUString const& _sDefault)
-{
- OUString const csBuildVersionItem(BOOTSTRAP_ITEM_BUILDVERSION);
-
- OUString sBuildVersion;
- // read BuildVersion from version.ini (versionrc)
- utl::Bootstrap::Impl::getVersionValue( csBuildVersionItem, sBuildVersion, _sDefault );
- return sBuildVersion;
-}
-
OUString Bootstrap::getBuildIdData(OUString const& _sDefault)
{
OUString const csBuildIdItem(BOOTSTRAP_ITEM_BUILDID);
More information about the Libreoffice-commits
mailing list