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

Miklos Vajna vmiklos at collabora.co.uk
Tue Nov 10 11:09:36 PST 2015


 sw/source/uibase/docvw/SidebarWin.cxx |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 88f4866803fc766503292252cb36af4a70ea98fd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Nov 10 20:08:49 2015 +0100

    This PixelToLogic() call can be conditional in SwSidebarWin::SetPosAndSize()
    
    It is only needed when tiled rendering.
    
    Change-Id: Ie1668f5f3d4d17abc212e2262a6c155dcb855d2e

diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 94a4235..414f3aa 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -607,15 +607,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())
         {


More information about the Libreoffice-commits mailing list