sw lok: fix sidebarwindows::SwSidebarWin pixel position

So SwSidebarWin member functions don't get twip values when they call
GetPosPixel().

Change-Id: Ied4ff7f49d0320766b045d78f731900af92d37ef
This commit is contained in:
Miklos Vajna
2015-11-11 18:05:45 +01:00
parent bb34de0189
commit c4ef30ea91

View File

@@ -593,6 +593,10 @@ void SwPostItMgr::PreparePageContainer()
void SwPostItMgr::LayoutPostIts() void SwPostItMgr::LayoutPostIts()
{ {
bool bEnableMapMode = comphelper::LibreOfficeKit::isActive() && !mpEditWin->IsMapModeEnabled();
if (bEnableMapMode)
mpEditWin->EnableMapMode();
if ( !mvPostItFields.empty() && !mbWaitingForCalcRects ) if ( !mvPostItFields.empty() && !mbWaitingForCalcRects )
{ {
mbLayouting = true; mbLayouting = true;
@@ -809,6 +813,9 @@ void SwPostItMgr::LayoutPostIts()
mbLayouting = false; mbLayouting = false;
} }
if (bEnableMapMode)
mpEditWin->EnableMapMode(false);
} }
bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
@@ -856,6 +863,8 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
if (!pPostIt) if (!pPostIt)
continue; continue;
bool bEnableMapMode = !mpEditWin->IsMapModeEnabled();
mpEditWin->EnableMapMode();
rRenderContext.Push(PushFlags::MAPMODE); rRenderContext.Push(PushFlags::MAPMODE);
Point aOffset(mpEditWin->PixelToLogic(pPostIt->GetPosPixel())); Point aOffset(mpEditWin->PixelToLogic(pPostIt->GetPosPixel()));
MapMode aMapMode(rRenderContext.GetMapMode()); MapMode aMapMode(rRenderContext.GetMapMode());
@@ -867,6 +876,8 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext, const Rectangle& /*rRe
pPostIt->PaintTile(rRenderContext, aRectangle); pPostIt->PaintTile(rRenderContext, aRectangle);
rRenderContext.Pop(); rRenderContext.Pop();
if (bEnableMapMode)
mpEditWin->EnableMapMode(false);
} }
} }