Blob Blame History Raw
From d2d19cf40a111c588489876038cb5e5c23908175 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Tue, 10 Nov 2015 20:08:49 +0100
Subject: [PATCH 300/398] This PixelToLogic() call can be conditional in
 SwSidebarWin::SetPosAndSize()

It is only needed when tiled rendering.

Change-Id: Ie1668f5f3d4d17abc212e2262a6c155dcb855d2e
(cherry picked from commit 88f4866803fc766503292252cb36af4a70ea98fd)
---
 sw/source/uibase/docvw/SidebarWin.cxx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 4975513ffc34..202a96767a39 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -608,15 +608,15 @@ void SwSidebarWin::SetPosAndSize()
 
         // LOK has map mode disabled, and we still want to perform pixel ->
         // twips conversion for the size of the line above the note.
-        bool bEnableMapMode = comphelper::LibreOfficeKit::isActive() && !EditWin().IsMapModeEnabled();
-        if (bEnableMapMode)
+        if (comphelper::LibreOfficeKit::isActive() && !EditWin().IsMapModeEnabled())
+        {
             EditWin().EnableMapMode();
-        Size aSize(aLineEnd.getX() - aLineStart.getX(), aLineEnd.getY() - aLineStart.getY());
-        aSize = EditWin().PixelToLogic(aSize);
-        aLineEnd = aLineStart;
-        aLineEnd.Move(aSize.getWidth(), aSize.getHeight());
-        if (bEnableMapMode)
+            Size aSize(aLineEnd.getX() - aLineStart.getX(), aLineEnd.getY() - aLineStart.getY());
+            aSize = EditWin().PixelToLogic(aSize);
+            aLineEnd = aLineStart;
+            aLineEnd.Move(aSize.getWidth(), aSize.getHeight());
             EditWin().EnableMapMode(false);
+        }
 
         if (!IsPreview())
         {
-- 
2.12.0