summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-16 16:30:21 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-17 21:12:51 +0100
commitf326e5b132500392edb3e10bf7a2fd191e317808 (patch)
treeaa57ad004625ad12f2411797b53e9c47c3536c94 /sw
parent4158227dae901a16c9fb3af541ee8f8cef6a100f (diff)
sw lok comments: fix sidebar width with custom zoom
Change-Id: I6772cce10d157421d983d6b93efb52bf8b95f5b8 (cherry picked from commit dc65f048fd1b08d17e71e4d3a3a3c114aae871e6)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 871a642d24da..fa82556554d1 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1865,19 +1865,19 @@ bool SwPostItMgr::HasNotes() const
unsigned long SwPostItMgr::GetSidebarWidth(bool bPx) const
{
- unsigned long aWidth = (unsigned long)(mpWrtShell->GetViewOptions()->GetZoom() * 1.8);
+ sal_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom();
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ // The output device contains the real wanted scale factor.
+ double fScaleX = mpWrtShell->GetOut()->GetMapMode().GetScaleX();
+ nZoom = fScaleX * 100;
+ }
+ unsigned long aWidth = (unsigned long)(nZoom * 1.8);
+
if (bPx)
return aWidth;
else
- {
- 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;
- }
+ return mpWrtShell->GetOut()->PixelToLogic(Size(aWidth, 0)).Width();
}
unsigned long SwPostItMgr::GetSidebarBorderWidth(bool bPx) const
@@ -1885,7 +1885,7 @@ unsigned long SwPostItMgr::GetSidebarBorderWidth(bool bPx) const
if (bPx)
return 2;
else
- return mpEditWin->PixelToLogic(Size(2,0)).Width();
+ return mpWrtShell->GetOut()->PixelToLogic(Size(2,0)).Width();
}
unsigned long SwPostItMgr::GetNoteWidth()