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 <sberg...@redhat.com> AuthorDate: Fri May 17 16:22:10 2019 +0200 Commit: Stephan Bergmann <sberg...@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 <sberg...@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", _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits