diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-05-17 16:22:10 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-05-19 20:34:08 +0200 |
commit | c12922a584ee7a150252de938087b82fd584b9d5 (patch) | |
tree | 782e500e97a2d1a8a5b8ae036cb4c45747567520 /sfx2/source/view/viewfrm.cxx | |
parent | c5968b68c51503f791cdffac2b9689b7de775054 (diff) |
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@redhat.com>
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |