diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-25 11:47:46 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-26 09:20:42 +0200 |
commit | d9369b9766fffea0b33b65713685878b2a9e579b (patch) | |
tree | 9bd416d73371a8c989bd06c5929b3949309a2404 /sw | |
parent | c926d60ab00174ad3359c5d44fc1216a4e0c22d6 (diff) |
SwViewShellImp::SetFirstVisPage: use vcl::RenderContext
Change-Id: If36b6fdda54dfbe6e4eea14883d659302a1db6be
(cherry picked from commit 85cd7a6c6883d4d80d583f13d923527ed5e72343)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/viewimp.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/viewimp.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
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<SwPageFrm*>(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<SwPageFrm*>(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<SwViewShellImp*>(this)->SetFirstVisPage(); + const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pSh->GetOut()); return pFirstVisPage; } |