summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdopath.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 15:47:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-11 09:09:52 +0200
commitf8d29fea9915a5fe66e4ba24cbd3b248929b51b7 (patch)
tree04e56aaf1432bf00cb67f5f02d8b9f7d631ef9ed /svx/source/svdraw/svdopath.cxx
parent08b79ade4f2e2fa98487696591123f71a7521dff (diff)
handle empty tools::Rectangle in svx
Change-Id: I45e26c9cdc00ae6d3bc56534d612b83b5ac26074 Reviewed-on: https://gerrit.libreoffice.org/72125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdopath.cxx')
-rw-r--r--svx/source/svdraw/svdopath.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 4c3d0f2040b9..12a7b2c1af39 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2362,6 +2362,14 @@ void SdrPathObj::RecalcSnapRect()
void SdrPathObj::NbcSetSnapRect(const tools::Rectangle& rRect)
{
tools::Rectangle aOld(GetSnapRect());
+ if (aOld.IsEmpty())
+ {
+ Fraction aX(1,1);
+ Fraction aY(1,1);
+ NbcResize(aOld.TopLeft(), aX, aY);
+ NbcMove(Size(rRect.Left() - aOld.Left(), rRect.Top() - aOld.Top()));
+ return;
+ }
// Take empty into account when calculating scale factors
long nMulX = rRect.IsWidthEmpty() ? 0 : rRect.Right() - rRect.Left();