summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-10 19:29:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-10 19:29:50 +0100
commit096408073c2de484cba3736d13b57d22b7f48775 (patch)
tree6ee45706b8a973ee534876a971376dd9660ee6df /sw
parent4b6e7da25f837349e10929b0258059398be8106d (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 0682f0ba392f..94a4235e4bdc 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)