[Libreoffice-commits] core.git: svx/source
Regina Henschel (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 13 21:01:55 UTC 2020
svx/source/svdraw/svdedtv1.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 94e6e140491de31c0788c91af855a75a3bb12709
Author: Regina Henschel <rb.henschel at t-online.de>
AuthorDate: Tue Oct 13 14:44:17 2020 +0200
Commit: Regina Henschel <rb.henschel at t-online.de>
CommitDate: Tue Oct 13 23:01:18 2020 +0200
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 at t-online.de>
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 )
More information about the Libreoffice-commits
mailing list