diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-08-13 09:20:19 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-08-22 12:10:42 +0200 |
commit | 7167ca3d26266a9ac78bda64cd374ed7cd038e58 (patch) | |
tree | 1e0416d2ff0307e67f44048bc66ec76981c8a87e | |
parent | d1107111405021ff1c3ce97e2d35533188536b26 (diff) |
crashtesting: empty B2DRange range turned into oversized Rectangle
with document ooo47086-1.xls
Reviewed-on: https://gerrit.libreoffice.org/58921
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit eabb2bf06aba0de81a6d1e7715859fa63379325b)
Change-Id: Ia43b6b3e3951875280892138c7068348f1b56a7c
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 8742e9b961ce..ddd8a57dd3b2 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1698,6 +1698,9 @@ static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon { basegfx::B2DRange aRange(basegfx::tools::getRange(rPolyPolygon)); + if (aRange.isEmpty()) + return Rectangle(); + return Rectangle( FRound(aRange.getMinX()), FRound(aRange.getMinY()), FRound(aRange.getMaxX()), FRound(aRange.getMaxY())); |