sc/source/filter/oox/pivotcachebuffer.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1ad967f6ee35169d5002a5cf64e6c71121ef4211
Author:     Bogdan Buzea <[email protected]>
AuthorDate: Sat Nov 23 13:18:49 2024 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Sat Jul 5 12:12:13 2025 +0200

    tdf#163486: PVS V1028 Possible overflow. Consider casting operands,
    
    not the result.
    
    Change-Id: I15fac7657d196380d93782b1fea3370586c9c157
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177118
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx 
b/sc/source/filter/oox/pivotcachebuffer.cxx
index 20d0cbd62b83..d6173e12f64e 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -1062,7 +1062,7 @@ sal_Int32 PivotCache::getCacheDatabaseIndex( sal_Int32 
nFieldIdx ) const
 
 void PivotCache::writeSourceHeaderCells( const WorksheetHelper& rSheetHelper ) 
const
 {
-    OSL_ENSURE( static_cast< size_t >( maSheetSrcModel.maRange.aEnd.Col() - 
maSheetSrcModel.maRange.aStart.Col() + 1 ) == maDatabaseFields.size(),
+    OSL_ENSURE( static_cast< size_t >( maSheetSrcModel.maRange.aEnd.Col()) - 
maSheetSrcModel.maRange.aStart.Col() + 1 == maDatabaseFields.size(),
         "PivotCache::writeSourceHeaderCells - source cell range width does not 
match number of source fields" );
     SCCOL nCol = maSheetSrcModel.maRange.aStart.Col();
     SCCOL nMaxCol = getAddressConverter().getMaxApiAddress().Col();

Reply via email to