From 6b0d2324c98499e3ba80f8a8cd8fe07e8a2ca3fa Mon Sep 17 00:00:00 2001 From: Jesus Solis Date: Tue, 3 Mar 2026 20:58:05 -0600 Subject: [PATCH] tdf#114441 convert sal_uLong to other integer types nFirstTableCell in both ScHTMLTableStackEntry and ScHTMLLayoutParser has been turned into size_t because this value was both being converted to and being compared to elements of type size_t; nRowKey in ScHTMLLayoutParser::TableOff has been turned into SCROW because this variable was initialized using two elements of type SCROW Change-Id: I21edccc663312de75f54b38e95ef4abe49254906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200921 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas --- sc/source/filter/html/htmlpars.cxx | 4 ++-- sc/source/filter/inc/htmlpars.hxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 92f5c9db9601..570e952c8253 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1351,7 +1351,7 @@ void ScHTMLLayoutParser::TableOff( const HtmlImportInfo* pInfo ) { // Outer for ( SCROW j=0; j < nRowSpan; j++ ) { - sal_uLong nRowKey = nRow + j; + SCROW nRowKey = nRow + j; SCROW nR = (*pTab1)[ nRowKey ]; if ( !nR ) (*pTab1)[ nRowKey ] = nRowsPerRow1; @@ -1385,7 +1385,7 @@ void ScHTMLLayoutParser::TableOff( const HtmlImportInfo* pInfo ) } for ( SCROW j=0; j < nRows; j++ ) { - sal_uLong nRowKey = nRow + j; + SCROW nRowKey = nRow + j; (*pTab2)[ nRowKey ] = nRowsPerRow2; } } diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 5359f255ae2b..0d8ae17aa339 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -103,7 +103,7 @@ struct ScHTMLTableStackEntry ScRangeListRef xLockedList; std::shared_ptr xCellEntry; std::shared_ptr xLocalColOffset; - sal_uLong nFirstTableCell; + size_t nFirstTableCell; SCROW nRowCnt; SCCOL nColCntStart; SCCOL nMaxCol; @@ -114,7 +114,7 @@ struct ScHTMLTableStackEntry bool bFirstRow; ScHTMLTableStackEntry( std::shared_ptr xE, ScRangeListRef xL, std::shared_ptr xTO, - sal_uLong nFTC, + size_t nFTC, SCROW nRow, SCCOL nStart, SCCOL nMax, sal_uInt16 nTab, sal_uInt16 nTW, sal_uInt16 nCO, sal_uInt16 nCOS, @@ -162,7 +162,7 @@ private: std::unique_ptr pTables; ScHTMLColOffset maColOffset; std::shared_ptr xLocalColOffset; // per table - sal_uLong nFirstTableCell; // per table + size_t nFirstTableCell; // per table short nTableLevel; sal_uInt16 nTable; sal_uInt16 nMaxTable;