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

Pranav Kant pranavk at collabora.co.uk
Mon Feb 6 03:45:42 UTC 2017


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

New commits:
commit 5bafdc99a15fa9b4b5e1b06f0f76d52addf09873
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Fri Feb 3 16:16:02 2017 +0530

    lok: Disable map mode when calculating annotation rectangles
    
    Change-Id: I4803ca9b52ce76ff9f7461253ec78bfcbc26690c
    Reviewed-on: https://gerrit.libreoffice.org/33879
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: pranavk <pranavk at collabora.co.uk>

diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 6ec2dc9..256a6a5 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -912,7 +912,17 @@ void SwSidebarWin::SetPosAndSize()
             }
             std::unique_ptr<SwShellCursor> pTmpCursorForAnnotationTextRange( pTmpCursor );
 
+            // For annotation text range rectangles to be calculated correctly,
+            // we need the map mode disabled
+            bool bDisableMapMode = comphelper::LibreOfficeKit::isActive() && EditWin().IsMapModeEnabled();
+            if (bDisableMapMode)
+                EditWin().EnableMapMode(false);
+
             pTmpCursorForAnnotationTextRange->FillRects();
+
+            if (bDisableMapMode)
+                EditWin().EnableMapMode();
+
             SwRects* pRects(pTmpCursorForAnnotationTextRange.get());
             std::vector<OString> aRects;
             for(SwRect & rNextRect : *pRects)


More information about the Libreoffice-commits mailing list