[Libreoffice-commits] core.git: sdext/source
Michael Meeks
michael.meeks at suse.com
Wed Mar 20 10:45:34 PDT 2013
sdext/source/presenter/PresenterCanvasHelper.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit ba4e2aad3eaf0102e52099bda2097dfc8082c3dd
Author: Michael Meeks <michael.meeks at suse.com>
Date: Wed Mar 20 17:43:58 2013 +0000
avoid floating-point error with empty bitmaps.
Change-Id: I11be81b52e32c776905a6caac1582cd1a839ab24
diff --git a/sdext/source/presenter/PresenterCanvasHelper.cxx b/sdext/source/presenter/PresenterCanvasHelper.cxx
index 899a2a7..92f3f1a 100644
--- a/sdext/source/presenter/PresenterCanvasHelper.cxx
+++ b/sdext/source/presenter/PresenterCanvasHelper.cxx
@@ -153,6 +153,9 @@ void PresenterCanvasHelper::PaintTiledBitmap (
// Tile the bitmap over the repaint box.
const geometry::IntegerSize2D aBitmapSize (rxTexture->getSize());
+ if( aBitmapSize.Width < 1 || aBitmapSize.Height < 1)
+ return;
+
const sal_Int32 nLeft = (rRepaintBox.X / aBitmapSize.Width) * aBitmapSize.Width;
const sal_Int32 nTop = (rRepaintBox.Y / aBitmapSize.Height) * aBitmapSize.Height;
const sal_Int32 nRight = ((rRepaintBox.X + rRepaintBox.Width - 1 + aBitmapSize.Width - 1)
More information about the Libreoffice-commits
mailing list