diff options
author | Henry Castro <hcastro@collabora.com> | 2015-12-23 09:42:14 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2015-12-23 19:39:47 +0000 |
commit | 30f1fa9993ee6ac444ab9da412b8a4820b045423 (patch) | |
tree | 91ea8cf24b123679720aac75eb82c4981b59af18 /sd | |
parent | 0b901a9760a22bdc6f83829b077c30ec08613e17 (diff) |
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@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index fab2f7e03e14..f9daadca6ed9 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 ) |