sw/source/uibase/docvw/SidebarWin.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit 5bafdc99a15fa9b4b5e1b06f0f76d52addf09873 Author: Pranav Kant <pran...@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 <c...@libreoffice.org> Reviewed-by: pranavk <pran...@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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits