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

sw lok: fix width of the notes sidebar

The map mode is in general disabled during tiled rendering, so mouse
positions can be sent in using twips, but here we have to temporarily
enable it, otherwise the width will be returned always in pixels.

With this, the gray background of the sidebar has the proper width, not
e.g. fifteenth of the expected value (using default zoom).

Change-Id: I4380ee0ba6bcda97cf71735161dbdc826e7a2532
(cherry picked from commit 6c3dbdbc)
üst 769be57c
......@@ -74,6 +74,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/lang.h>
#include <comphelper/lok.hxx>
#include "annotsh.hxx"
#include "swabstdlg.hxx"
......@@ -1813,7 +1814,15 @@ unsigned long SwPostItMgr::GetSidebarWidth(bool bPx) const
if (bPx)
return aWidth;
else
return mpEditWin->PixelToLogic(Size( aWidth ,0)).Width();
{
bool bEnableMapMode = comphelper::LibreOfficeKit::isActive() && !mpEditWin->IsMapModeEnabled();
if (bEnableMapMode)
mpEditWin->EnableMapMode();
long nRet = mpEditWin->PixelToLogic(Size(aWidth, 0)).Width();
if (bEnableMapMode)
mpEditWin->EnableMapMode(false);
return nRet;
}
}
unsigned long SwPostItMgr::GetSidebarBorderWidth(bool bPx) const
......
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