diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2020-10-13 14:44:17 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2020-10-14 14:29:31 +0200 |
commit | f4e4c380c8aa89cedca5ab2aa2006e12461158a7 (patch) | |
tree | 203e38effe1dd53ff067ebce48c40164c3b7ffdb /svx | |
parent | 59290d7a12868a04e90ccbde1f5871fb8be49af8 (diff) |
tdf#137446 catch divByZero in ResizeMultMarkedObj
When a horizontal or vertical line is resized, the height or width
is zero and yFact or xFact are invalid Fraction. They are passed on
to SdrTextObj::NbcResize. There an invalid Fractions returns -1 for
GetDenominator and results a faulty mirroring.
Change-Id: Iafe91827cfc7a8b6ccff852115f01ccbb90e54b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104234
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
(cherry picked from commit 94e6e140491de31c0788c91af855a75a3bb12709)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104290
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 3423ba65027b..389801f8d1ee 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -269,11 +269,11 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef, } Fraction aFrac(1,1); - if (bWdh && bHgt) + if (bWdh && xFact.IsValid() && bHgt && yFact.IsValid()) pO->Resize(rRef, xFact, yFact); - else if (bWdh) + else if (bWdh && xFact.IsValid()) pO->Resize(rRef, xFact, aFrac); - else if (bHgt) + else if (bHgt && yFact.IsValid()) pO->Resize(rRef, aFrac, yFact); } if( bUndo ) |