summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-06-14 14:48:53 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-06-14 15:13:34 +0200
commit00ed1c5c02c20b98dc70ef9e01c9280d9d6b5193 (patch)
tree2a71f0f40595f32f1adddba213e5b500d9fb92f8 /include
parent99500569187101cd47b2a491ca8d8878eb034b2e (diff)
Make isProductVersionUpgraded update ooSetupLastVersion again
This was changed in commit dd889b290304b73f96a9a8e6e0f144d3aa2ba7e1 (Resolves tdf#159573 and tdf#137931 - WhatsNew or Welcome dialog, 2024-03-27). This change doesn't require opening a module (and checking if WhatsNew dialog is needed) to update the configuration - it will be updated immediately in runGraphicsRenderTests. Change-Id: I595b6898c46998e7a0805ffbf7a710dbf0d2a5e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168855 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/unotools/VersionConfig.hxx19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/unotools/VersionConfig.hxx b/include/unotools/VersionConfig.hxx
index e109a96e4c3a..57aebd7c9ec1 100644
--- a/include/unotools/VersionConfig.hxx
+++ b/include/unotools/VersionConfig.hxx
@@ -9,25 +9,14 @@
*/
#pragma once
-#include <unotools/configmgr.hxx>
-#include <o3tl/string_view.hxx>
+#include <sal/config.h>
+
+#include <unotools/unotoolsdllapi.h>
namespace utl
{
/** This method is called when there's a need to determine if the
* current version of LibreOffice has been upgraded to a newer one.
-
- @param aUpdateVersion This variable is used to determine if
- LibreOffice's previous version should be updated.
*/
-static bool isProductVersionUpgraded()
-{
- OUString sSetupVersion = utl::ConfigManager::getProductVersion();
- sal_Int32 iCurrent = o3tl::toInt32(o3tl::getToken(sSetupVersion, 0, '.')) * 10
- + o3tl::toInt32(o3tl::getToken(sSetupVersion, 1, '.'));
- OUString sLastVersion = officecfg::Setup::Product::ooSetupLastVersion::get().value_or("0.0");
- sal_Int32 iLast = o3tl::toInt32(o3tl::getToken(sLastVersion, 0, '.')) * 10
- + o3tl::toInt32(o3tl::getToken(sLastVersion, 1, '.'));
- return (iCurrent > iLast);
-}
+bool UNOTOOLS_DLLPUBLIC isProductVersionUpgraded();
}