diff options
-rw-r--r-- | sc/source/filter/html/htmlpars.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 924346c7de8e..9b825df20f7d 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -717,8 +717,10 @@ void ScHTMLLayoutParser::Adjust() pE->nColOverlap = 1; } SCCOL nColTmp = o3tl::saturating_add(pE->nCol, pE->nColOverlap); - SCROW nRowTmp = o3tl::saturating_add(pE->nRow ,pE->nRowOverlap); - xLockedList->Join( ScRange( pE->nCol, pE->nRow, 0, nColTmp - 1, nRowTmp - 1, 0 ) ); + SCROW nRowTmp = o3tl::saturating_add(pE->nRow, pE->nRowOverlap); + xLockedList->Join(ScRange(pE->nCol, pE->nRow, 0, + o3tl::saturating_sub<SCCOL>(nColTmp, 1), + o3tl::saturating_sub<SCROW>(nRowTmp, 1), 0)); // Take over MaxDimensions if ( nColMax < nColTmp ) nColMax = nColTmp; |