[Libreoffice-commits] core.git: sd/source
Henry Castro
hcastro at collabora.com
Wed Dec 23 11:40:23 PST 2015
sd/source/ui/func/fuinsert.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 30f1fa9993ee6ac444ab9da412b8a4820b045423
Author: Henry Castro <hcastro at collabora.com>
Date: Wed Dec 23 09:42:14 2015 -0400
sd tiled rendering: enable map mode to center images
In the tiled rendering case the map mode is disabled,
and conversion pixel to logical is not computed.
Change-Id: I0d54aaa897f0fe0df6e8b55334053dc66b6ea925
Reviewed-on: https://gerrit.libreoffice.org/20912
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index fab2f7e..f9daadc 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -169,7 +169,11 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
Point aPos;
Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() );
aPos = aRect.Center();
+ bool bMapModeWasEnabled(mpWindow->IsMapModeEnabled());
+ mpWindow->EnableMapMode(true);
aPos = mpWindow->PixelToLogic(aPos);
+ mpWindow->EnableMapMode(bMapModeWasEnabled);
+
SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, nullptr);
if(pGrafObj && bAsLink )
More information about the Libreoffice-commits
mailing list