From bfb4eff4ea09cdeec25adbb0d7e36bd6bdf4d147 Mon Sep 17 00:00:00 2001 From: ApurvR20 Date: Sun, 9 Aug 2026 15:52:30 +0530 Subject: [PATCH] tdf#114441 Replace sal_uLong by size_t in doccomp.cxx GetLineCount() returns size_t, so change the data type for relevant variables. Also change the max values for preceding and other_preceding, from ULONG_MAX to SIZE_MAX. Change-Id: I973ce68808dd77efb7326d4177499d0fe1e5d764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208745 Reviewed-by: Hossein Tested-by: Jenkins --- sw/source/core/doc/doccomp.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index f9bf7bd753fe..bbf9bb8c5663 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -937,15 +938,15 @@ namespace { void lcl_ShiftBoundariesOneway( CompareData* const pData, CompareData const * const pOtherData) { - sal_uLong i = 0; - sal_uLong j = 0; - sal_uLong i_end = pData->GetLineCount(); - sal_uLong preceding = ULONG_MAX; - sal_uLong other_preceding = ULONG_MAX; + size_t i = 0; + size_t j = 0; + size_t i_end = pData->GetLineCount(); + size_t preceding = SIZE_MAX; + size_t other_preceding = SIZE_MAX; while (true) { - sal_uLong start, other_start; + size_t start, other_start; /* Scan forwards to find beginning of another run of changes. Also keep track of the corresponding point in the other file. */