summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-10 14:08:26 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-10 14:10:01 +0100
commit6c3dbdbccbcccf914360dac1167599c5b89446a8 (patch)
tree0bb6e79cb3ee037f4cc0c5e015c2ad6523990e56 /sw
parentb3b9f2c5b4dde4c5ea9736f8ceda4cdb98036b0b (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 08bb106eca2a..1abe5c40470c 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -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