From d9369b9766fffea0b33b65713685878b2a9e579b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 25 Jun 2015 11:47:46 +0200 Subject: SwViewShellImp::SetFirstVisPage: use vcl::RenderContext Change-Id: If36b6fdda54dfbe6e4eea14883d659302a1db6be (cherry picked from commit 85cd7a6c6883d4d80d583f13d923527ed5e72343) --- sw/source/core/inc/viewimp.hxx | 2 +- sw/source/core/view/viewimp.cxx | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw') diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index 205938e15476..ecfd42614841 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -89,7 +89,7 @@ class SwViewShellImp SwPagePreviewLayout* mpPgPreviewLayout; - void SetFirstVisPage(); // Recalculate the first visible Page + void SetFirstVisPage(OutputDevice* pRenderContext); // Recalculate the first visible Page void StartAction(); // Show handle and hide void EndAction(); // Called by SwViewShell::ImplXXXAction diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index c7feb104c94c..08e064531da6 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -169,7 +169,7 @@ bool SwViewShellImp::IsUpdateExpFields() return false; } -void SwViewShellImp::SetFirstVisPage() +void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext) { if ( pSh->mbDocSizeChgd && pSh->VisArea().Top() > pSh->GetLayout()->Frm().Height() ) { @@ -186,18 +186,18 @@ void SwViewShellImp::SetFirstVisPage() const bool bBookMode = pSwViewOption->IsViewLayoutBookMode(); SwPageFrm *pPage = static_cast(pSh->GetLayout()->Lower()); - SwRect aPageRect = pPage->GetBoundRect(pSh->GetOut()); + SwRect aPageRect = pPage->GetBoundRect(pRenderContext); float fAmount = pSh->VisArea().Height() * 0.43; while ( pPage && aPageRect.Bottom() < pSh->VisArea().Top() + fAmount ) { pPage = static_cast(pPage->GetNext()); if ( pPage ) { - aPageRect = pPage->GetBoundRect(pSh->GetOut()); + aPageRect = pPage->GetBoundRect(pRenderContext); if ( bBookMode && pPage->IsEmptyPage() ) { const SwPageFrm& rFormatPage = pPage->GetFormatPage(); - aPageRect.SSize() = rFormatPage.GetBoundRect(pSh->GetOut()).SSize(); + aPageRect.SSize() = rFormatPage.GetBoundRect(pRenderContext).SSize(); } } } @@ -273,14 +273,14 @@ Color SwViewShellImp::GetRetoucheColor() const SwPageFrm *SwViewShellImp::GetFirstVisPage() { if ( bFirstPageInvalid ) - SetFirstVisPage(); + SetFirstVisPage(pSh->GetOut()); return pFirstVisPage; } const SwPageFrm *SwViewShellImp::GetFirstVisPage() const { if ( bFirstPageInvalid ) - const_cast(this)->SetFirstVisPage(); + const_cast(this)->SetFirstVisPage(pSh->GetOut()); return pFirstVisPage; } -- cgit