summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 93b6000029e9..e5885f618df2 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -131,6 +131,9 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
if (!xDevice.is())
return Graphic();
+ assert( aDocumentSizePixel.Width() > 0 && aDocumentSizePixel.Height() > 0 &&
+ aTargetSizePixel.Width() > 0 && aTargetSizePixel.Height() > 0);
+
double fScaleX = aTargetSizePixel.Width() / (double) aDocumentSizePixel.Width();
double fScaleY = aTargetSizePixel.Height() / (double) aDocumentSizePixel.Height();