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>
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 3423ba6..389801f 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 )