diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 9682c1b3b8cc..0b1a879e7678 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -555,7 +555,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) sal_Int16 nPage = 1; ::Size aDocumentSizePixel = aRenderer.getDocumentSizeInPixels(nPage); - ::Size aLogic = aRenderer.getDocumentSizeIn100mm(nPage); + ::Point aLogicPos; + ::Size aLogic = aRenderer.getDocumentSizeIn100mm(nPage, &aLogicPos); // FIXME: This is a temporary hack. Need to figure out a proper way to derive this scale factor. ::Size aTargetSize(aDocumentSizePixel.Width() * 1.23, aDocumentSizePixel.Height() * 1.23); @@ -567,6 +568,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // will be correct in MM. MapMode aMapMode; aMapMode.SetMapUnit(MapUnit::Map100thMM); + aMapMode.SetOrigin(::Point(-aLogicPos.getX(), -aLogicPos.getY())); rGDIMetaFile.SetPrefMapMode(aMapMode); rGDIMetaFile.SetPrefSize(aLogic); |