[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - sd/source

Henry Castro hcastro at collabora.com
Wed Dec 23 11:49:40 PST 2015


 sd/source/ui/func/fuinsert.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 2ae1ea973f98199a43e7495ebc4c5ea24e013ba9
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 a5ceb28..81a0874 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -173,7 +173,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