Kaydet (Commit) 09640807 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 4b6e7da2
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment