summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 3dbfcdd5889e..ec4b15966dda 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -115,7 +115,8 @@ uno::Any DocumentToGraphicRenderer::getSelection() const
return aSelection;
}
-Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 nCurrentPage)
+Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 nCurrentPage,
+ Point* pDocumentPosition)
{
Reference< awt::XDevice > xDevice(mxToolkit->createScreenCompatibleDevice( 32, 32 ) );
@@ -134,6 +135,7 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 nCurrentPage)
renderProperties[3].Value <<= true;
awt::Size aSize;
+ awt::Point aPos;
sal_Int32 nPages = mxRenderable->getRendererCount( selection, renderProperties );
if (nPages >= nCurrentPage)
@@ -145,9 +147,18 @@ Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 nCurrentPage)
{
aResult[ nProperty ].Value >>= aSize;
}
+ else if (aResult[nProperty].Name == "PagePos")
+ {
+ aResult[nProperty].Value >>= aPos;
+ }
}
}
+ if (pDocumentPosition)
+ {
+ *pDocumentPosition = Point(aPos.X, aPos.Y);
+ }
+
return Size( aSize.Width, aSize.Height );
}