summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-24 08:59:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-24 12:11:54 +0200
commit527c6e0f416ae9cb971c5ac37b2ab65208c1d5c7 (patch)
tree61bc5ab0b7dc58e55fc8059a4d62291eabd7ed70 /sc
parent0280870788ad64460edfc0553245272cf8764f7a (diff)
cid#1451636 silence Division or modulo by zero
Change-Id: Ibe9ee3d5f555d153fd208a03ba2e3ae68d263ab3 Reviewed-on: https://gerrit.libreoffice.org/76224 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 700a099fd4fb..b67e776bc8a2 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -2056,6 +2056,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
// Scale and move the target rectangle from aLocationMM to aLocationPixel,
// to get the target rectangle in pixels.
+ assert(aLocationPixel.GetWidth() != 0 && aLocationPixel.GetHeight() != 0);
Fraction aScaleX( aLocationPixel.GetWidth(), aLocationMM.GetWidth() );
Fraction aScaleY( aLocationPixel.GetHeight(), aLocationMM.GetHeight() );
@@ -2073,7 +2074,6 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
// The link target area is interpreted using the device's MapMode at
// the time of the CreateDest call, so PixelToLogic can be used here,
// regardless of the MapMode that is actually selected.
-
aArea = pDev->PixelToLogic( tools::Rectangle( nX1, nY1, nX2, nY2 ) );
}
}