[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - svx/source
Regina Henschel (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 14 12:30:05 UTC 2020
svx/source/svdraw/svdedtv1.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit f4e4c380c8aa89cedca5ab2aa2006e12461158a7
Author: Regina Henschel <rb.henschel at t-online.de>
AuthorDate: Tue Oct 13 14:44:17 2020 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Oct 14 14:29:31 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>
(cherry picked from commit 94e6e140491de31c0788c91af855a75a3bb12709)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104290
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
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 )
More information about the Libreoffice-commits
mailing list