From bdd325090323ac7e6486ef16482ec960f55e1402 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 14 Jun 2024 14:48:53 +0500 Subject: 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 Tested-by: Jenkins (cherry picked from commit 00ed1c5c02c20b98dc70ef9e01c9280d9d6b5193) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168874 Reviewed-by: Xisco Fauli --- include/unotools/VersionConfig.hxx | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'include') 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 -#include +#include + +#include 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(); } -- cgit