diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-10 20:08:49 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-10 20:09:11 +0100 |
commit | 88f4866803fc766503292252cb36af4a70ea98fd (patch) | |
tree | 1971d98ed762e1d02aece952e67844d33e3393e8 /sw | |
parent | 096408073c2de484cba3736d13b57d22b7f48775 (diff) |
This PixelToLogic() call can be conditional in SwSidebarWin::SetPosAndSize()
It is only needed when tiled rendering.
Change-Id: Ie1668f5f3d4d17abc212e2262a6c155dcb855d2e
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/SidebarWin.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index 94a4235e4bdc..414f3aadfe94 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()) { |