summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-06-14 14:48:53 +0500
committerXisco Fauli <xiscofauli@libreoffice.org>2024-06-14 19:11:13 +0200
commitbdd325090323ac7e6486ef16482ec960f55e1402 (patch)
treeb3d19c8a1c56eb49f4eca770b2cc271d6cb5e124 /include
parent9361385beb38d718726bfe6264fd49d940c2125c (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 (cherry picked from commit 00ed1c5c02c20b98dc70ef9e01c9280d9d6b5193) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168874 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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();
}