[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Tue Nov 10 10:30:26 PST 2015
sw/source/uibase/docvw/SidebarWin.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 096408073c2de484cba3736d13b57d22b7f48775
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Nov 10 19:29:22 2015 +0100
sw lok: fix length of the line overlay above the notes
With this, e.g. a line above a note (with width of 180 px) is also 180
px, not 12 px.
Change-Id: I7c4eeda1bc904242dc298013411b9671ba0f2149
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 0682f0b..94a4235 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -605,6 +605,18 @@ void SwSidebarWin::SetPosAndSize()
break;
}
+ // 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)
+ 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)
+ EditWin().EnableMapMode(false);
+
if (!IsPreview())
{
if (mpAnchor)
More information about the Libreoffice-commits
mailing list