[Libreoffice-commits] core.git: include/unotools officecfg/registry sfx2/source unotools/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Sun May 19 18:34:59 UTC 2019
include/unotools/configmgr.hxx | 2 --
officecfg/registry/schema/org/openoffice/Setup.xcs | 1 -
sfx2/source/view/viewfrm.cxx | 4 ++--
unotools/source/config/configmgr.cxx | 6 ------
4 files changed, 2 insertions(+), 11 deletions(-)
New commits:
commit c12922a584ee7a150252de938087b82fd584b9d5
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri May 17 16:22:10 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sun May 19 20:34:08 2019 +0200
Fix nillability of ooSetupLastVersion
...that had been introduced with 5187d3ae495a07373a12fd5980c9269bc8ce3f8f
"Resolves: tdf#69042 - Add a 'What's New' infobar":
* Make the default value nil instead of an empty string.
* A nilable prop can't reuse the legacy utl::ConfigManager framework to obtain
string prop values, so drop it from there and directly use the direct-access
functionality in SfxViewFrame::Notify.
Change-Id: I5fc67a3d7e0fcb44a218889ecf8c69e81661567e
Reviewed-on: https://gerrit.libreoffice.org/72485
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx
index e5b9f9c2f358..e79629834db4 100644
--- a/include/unotools/configmgr.hxx
+++ b/include/unotools/configmgr.hxx
@@ -53,8 +53,6 @@ public:
static OUString getProductVersion();
- static OUString getLastProductVersion();
-
static OUString getVendor();
static void storeConfigItems();
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 9d93e7eb6a64..96d062c3bc30 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -265,7 +265,6 @@
<desc>Specifies the version number of the previously used product for
whats-new comparison.</desc>
</info>
- <value/>
</prop>
<prop oor:name="ooSetupVersionAboutBox" oor:type="xs:string" oor:nillable="false">
<info>
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 18d71c170ea9..2ee2b9c82976 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1233,8 +1233,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
OUString sSetupVersion = utl::ConfigManager::getProductVersion();
sal_Int32 iCurrent = sSetupVersion.getToken(0,'.').toInt32() * 10 + sSetupVersion.getToken(1,'.').toInt32();
- OUString sLastVersion = utl::ConfigManager::getLastProductVersion();
- if (sLastVersion.isEmpty()) sLastVersion="0.0";
+ OUString sLastVersion
+ = officecfg::Setup::Product::ooSetupLastVersion::get().value_or("0.0");
sal_Int32 iLast = sLastVersion.getToken(0,'.').toInt32() * 10 + sLastVersion.getToken(1,'.').toInt32();
if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest)
{
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 859fd1c50498..05b1e5874643 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -135,12 +135,6 @@ OUString utl::ConfigManager::getProductVersion() {
"Product/ooSetupVersion");
}
-OUString utl::ConfigManager::getLastProductVersion() {
- return getConfigurationString(
- "/org.openoffice.Setup",
- "Product/ooSetupLastVersion");
-}
-
OUString utl::ConfigManager::getVendor() {
return getConfigurationString(
"/org.openoffice.Setup",
More information about the Libreoffice-commits
mailing list