[Libreoffice-commits] core.git: svx/source
Caolán McNamara
caolanm at redhat.com
Thu Nov 16 08:58:10 UTC 2017
svx/source/table/tablelayouter.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 7719c53b2b57f517b5fd879358c5c5c6dfca35a7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 15 16:52:49 2017 +0000
silence coverity#1421123 Copy-paste error
Change-Id: If340824c749dda0668fabba9d417f4a2c2acc3ff
Reviewed-on: https://gerrit.libreoffice.org/44774
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index b71966da33a9..2b150e365456 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -123,20 +123,24 @@ bool TableLayouter::getCellArea( const CellRef& xCell, const CellPos& rPos, base
{
const sal_Int32 y = maRows[rPos.mnRow].mnPos;
+ sal_Int32 endy;
+ if (o3tl::checked_add(y, aCellSize.getY(), endy))
+ return false;
+
if(bRTL)
{
///For RTL Table Calculate the Right End of cell instead of Left
const sal_Int32 x = maColumns[rPos.mnCol].mnPos + maColumns[rPos.mnCol].mnSize;
- sal_Int32 startx, endy;
- if (o3tl::checked_sub(x, aCellSize.getX(), startx) || o3tl::checked_add(y, aCellSize.getY(), endy))
+ sal_Int32 startx;
+ if (o3tl::checked_sub(x, aCellSize.getX(), startx))
return false;
rArea = basegfx::B2IRectangle(startx, y, x, endy);
}
else
{
const sal_Int32 x = maColumns[rPos.mnCol].mnPos;
- sal_Int32 endx, endy;
- if (o3tl::checked_add(x, aCellSize.getX(), endx) || o3tl::checked_add(y, aCellSize.getY(), endy))
+ sal_Int32 endx;
+ if (o3tl::checked_add(x, aCellSize.getX(), endx))
return false;
rArea = basegfx::B2IRectangle(x, y, endx, endy);
}
More information about the Libreoffice-commits
mailing list