Kaydet (Commit) 2ae1ea97 authored tarafından Henry Castro's avatar Henry Castro

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/20912Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarHenry Castro <hcastro@collabora.com>
üst c7792875
...@@ -173,7 +173,11 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq ) ...@@ -173,7 +173,11 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
Point aPos; Point aPos;
Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() ); Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() );
aPos = aRect.Center(); aPos = aRect.Center();
bool bMapModeWasEnabled(mpWindow->IsMapModeEnabled());
mpWindow->EnableMapMode(true);
aPos = mpWindow->PixelToLogic(aPos); aPos = mpWindow->PixelToLogic(aPos);
mpWindow->EnableMapMode(bMapModeWasEnabled);
SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, nullptr); SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, nullptr);
if(pGrafObj && bAsLink ) if(pGrafObj && bAsLink )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment