diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2020-10-13 14:44:17 +0200 |
---|---|---|
committer | Regina Henschel <rb.henschel@t-online.de> | 2020-10-13 23:01:18 +0200 |
commit | 94e6e140491de31c0788c91af855a75a3bb12709 (patch) | |
tree | 565758effa2d63ec581d8375a19273e21efb9dc1 /svx | |
parent | eb3999a8cc75a42edbb8a81ecbff14a4bd9965ed (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>
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 39ebd7c7acb4..86a3cdd35725 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 ) |