summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-15 16:52:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-16 09:57:49 +0100
commit7719c53b2b57f517b5fd879358c5c5c6dfca35a7 (patch)
tree62678cf490e1d823e3947817b2409611c15348e1
parent74dad3a6c5edc9c9822ef85577f84892bdb13591 (diff)
silence coverity#1421123 Copy-paste error
Change-Id: If340824c749dda0668fabba9d417f4a2c2acc3ff Reviewed-on: https://gerrit.libreoffice.org/44774 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--svx/source/table/tablelayouter.cxx12
1 files changed, 8 insertions, 4 deletions
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);
}