[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 11 09:06:35 PST 2015


 sw/source/uibase/docvw/PostItMgr.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit c4ef30ea916752ba5a057b49960a60a55f70c84c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 11 18:05:45 2015 +0100

    sw lok: fix sidebarwindows::SwSidebarWin pixel position
    
    So SwSidebarWin member functions don't get twip values when they call
    GetPosPixel().
    
    Change-Id: Ied4ff7f49d0320766b045d78f731900af92d37ef

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 1abe5c4..b0f62a0 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -593,6 +593,10 @@ void SwPostItMgr::PreparePageContainer()
 
 void SwPostItMgr::LayoutPostIts()
 {
+    bool bEnableMapMode = comphelper::LibreOfficeKit::isActive() && !mpEditWin->IsMapModeEnabled();
+    if (bEnableMapMode)
+        mpEditWin->EnableMapMode();
+
     if ( !mvPostItFields.empty() && !mbWaitingForCalcRects )
     {
         mbLayouting = true;
@@ -809,6 +813,9 @@ void SwPostItMgr::LayoutPostIts()
 
         mbLayouting = false;
     }
+
+    if (bEnableMapMode)
+        mpEditWin->EnableMapMode(false);
 }
 
 bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
@@ -856,6 +863,8 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
         if (!pPostIt)
             continue;
 
+        bool bEnableMapMode = !mpEditWin->IsMapModeEnabled();
+        mpEditWin->EnableMapMode();
         rRenderContext.Push(PushFlags::MAPMODE);
         Point aOffset(mpEditWin->PixelToLogic(pPostIt->GetPosPixel()));
         MapMode aMapMode(rRenderContext.GetMapMode());
@@ -867,6 +876,8 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
         pPostIt->PaintTile(rRenderContext, aRectangle);
 
         rRenderContext.Pop();
+        if (bEnableMapMode)
+            mpEditWin->EnableMapMode(false);
     }
 }
 


More information about the Libreoffice-commits mailing list