diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-29 10:47:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-29 10:50:44 +0100 |
commit | 87f5486dcb36177a0b5d374d3d684885efcd9c28 (patch) | |
tree | d741ddb764ad768583de803b1012a25c916e67d8 | |
parent | ff037a8c09e05261563edd9c1a19835e3b18be67 (diff) |
Don't use output rArea when TableLayouter::getCellArea returns false
...when xCell->isMerged, as happens during CppunitTest_sd_filters_test.
aCellArea will be "empty" (i.e., getMinX()==SAL_MAX_INT32 etc.) and the
aCellRect.Move calculation will overflow for 32-bit long.
Change-Id: I12649234c060edd9f2cab1792cf75335ae22b730
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 0c5368486386..0793e77d524a 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -860,15 +860,16 @@ void TableLayouter::updateCells( Rectangle& rRectangle ) if( xCell.is() ) { basegfx::B2IRectangle aCellArea; - getCellArea( xCell, aPos, aCellArea ); - - Rectangle aCellRect; - aCellRect.Left() = aCellArea.getMinX(); - aCellRect.Right() = aCellArea.getMaxX(); - aCellRect.Top() = aCellArea.getMinY(); - aCellRect.Bottom() = aCellArea.getMaxY(); - aCellRect.Move( rRectangle.Left(), rRectangle.Top() ); - xCell->setCellRect( aCellRect ); + if( getCellArea( xCell, aPos, aCellArea ) ) + { + Rectangle aCellRect; + aCellRect.Left() = aCellArea.getMinX(); + aCellRect.Right() = aCellArea.getMaxX(); + aCellRect.Top() = aCellArea.getMinY(); + aCellRect.Bottom() = aCellArea.getMaxY(); + aCellRect.Move( rRectangle.Left(), rRectangle.Top() ); + xCell->setCellRect( aCellRect ); + } } } } |