From 5ceee417fef834cd6b033603d72eaf4708970a1d Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 4 Jan 2019 11:04:05 +0100 Subject: svtools: expose document position in DocumentToGraphicRenderer Writer pages always have an offset inside the root frame, and this is visible in the generated metafile as well. The offset is minimal for a small window and a single page, but the vertical offset increases with every page. Make this information visible, so sfx2 can compensate this. This is somewhat similar to what SfxObjectShell::DoDraw_Impl() does, but that works for the first page only (use case is thumbnail generation), while this is 0 offset for Calc/Impress and a proper offset for all Writer pages. Change-Id: I1075c98faf74f9e77c916572b4d63d40fbd80ab1 Reviewed-on: https://gerrit.libreoffice.org/65850 Reviewed-by: Miklos Vajna Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/69758 Reviewed-by: Andras Timar Tested-by: Andras Timar --- include/svtools/DocumentToGraphicRenderer.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/svtools/DocumentToGraphicRenderer.hxx b/include/svtools/DocumentToGraphicRenderer.hxx index 5ed6f2ce4434..af0ce6e8086f 100644 --- a/include/svtools/DocumentToGraphicRenderer.hxx +++ b/include/svtools/DocumentToGraphicRenderer.hxx @@ -69,7 +69,7 @@ public: Size getDocumentSizeInPixels( sal_Int32 nCurrentPage ); - Size getDocumentSizeIn100mm( sal_Int32 nCurrentPage ); + Size getDocumentSizeIn100mm(sal_Int32 nCurrentPage, Point* pDocumentPosition = nullptr); Graphic renderToGraphic( sal_Int32 nCurrentPage, Size aDocumentSizePixel, Size aTargetSizePixel, Color aPageColor); -- cgit