summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index d410f4c7db34..e33a94ec416e 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -94,7 +94,8 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
Graphic DocumentToGraphicRenderer::renderToGraphic(
sal_Int32 aCurrentPage,
Size aDocumentSizePixel,
- Size aTargetSizePixel)
+ Size aTargetSizePixel,
+ Color aPageColor)
{
if (!mxModel.is() || !mxController.is() || !mxRenderable.is())
@@ -127,6 +128,12 @@ Graphic DocumentToGraphicRenderer::renderToGraphic(
aMtf.Record( pOutputDev );
+ if (aPageColor != Color(COL_TRANSPARENT))
+ {
+ pOutputDev->SetBackground(Wallpaper(aPageColor));
+ pOutputDev->Erase();
+ }
+
uno::Any aSelection;
aSelection <<= mxDocument;
mxRenderable->render(aCurrentPage - 1, aSelection, renderProps );