diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-25 12:04:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-25 14:14:59 +0200 |
commit | cec17a4659389c5fe3a97c144d541c6aedc64d3f (patch) | |
tree | 95fa98e1c70eca2766ecd721ba933af04758184c | |
parent | 85cd7a6c6883d4d80d583f13d923527ed5e72343 (diff) |
SwViewShellImp::GetFirstVisPage: use vcl::RenderContext
Change-Id: I7acd380d2e199f042dca61d95596c3bc63c6a206
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/draw/dpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/viewimp.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoflatpara.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/view/viewimp.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 |
9 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index c01966bb9829..131b1da9e93a 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1144,7 +1144,7 @@ void SwCrsrShell::GetPageNum( sal_uInt16 &rnPhyNum, sal_uInt16 &rnVirtNum, if( !bAtCrsrPos || 0 == (pCFrm = GetCurrFrm( bCalcFrm )) || 0 == (pPg = pCFrm->FindPageFrm()) ) { - pPg = Imp()->GetFirstVisPage(); + pPg = Imp()->GetFirstVisPage(GetOut()); while( pPg && pPg->IsEmptyPage() ) pPg = static_cast<const SwPageFrm *>(pPg->GetNext()); } @@ -1157,7 +1157,7 @@ sal_uInt16 SwCrsrShell::GetNextPrevPageNum( bool bNext ) { SET_CURR_SHELL( this ); // page number: first visible page or the one at the cursor - const SwPageFrm *pPg = Imp()->GetFirstVisPage(); + const SwPageFrm *pPg = Imp()->GetFirstVisPage(GetOut()); if( pPg ) { const SwTwips nPageTop = pPg->Frm().Top(); diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index fe774a1ce1ca..db5707c3dcf7 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -158,7 +158,7 @@ const SdrPageGridFrameList* SwDPage::GetGridFrameList( else { //The drawing demands all visible pages - const SwFrm *pPg = pSh->Imp()->GetFirstVisPage(); + const SwFrm *pPg = pSh->Imp()->GetFirstVisPage(pSh->GetOut()); if ( pPg ) do { ::InsertGridFrame( const_cast<SwDPage*>(this)->pGridLst, pPg ); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 44dd490907d8..0c4650647c0b 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -186,7 +186,7 @@ bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, } else // first visible page { - pPage = Imp()->GetFirstVisPage(); + pPage = Imp()->GetFirstVisPage(GetOut()); if ( pPage && static_cast<const SwPageFrm*>(pPage)->IsEmptyPage() ) pPage = pPage->GetNext(); } diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx index ecfd42614841..3146ec39e893 100644 --- a/sw/source/core/inc/viewimp.hxx +++ b/sw/source/core/inc/viewimp.hxx @@ -146,8 +146,8 @@ public: Color GetRetoucheColor() const; /// Management of the first visible Page - const SwPageFrm *GetFirstVisPage() const; - SwPageFrm *GetFirstVisPage(); + const SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext) const; + SwPageFrm *GetFirstVisPage(OutputDevice* pRenderContext); void SetFirstVisPageInvalid() { bFirstPageInvalid = true; } bool AddPaintRect( const SwRect &rRect ); diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 8eb237a2080d..737c4ece8cd2 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -454,7 +454,7 @@ void SwLayAction::InternalAction() // number 1. If we're doing a fake formatting, the number of the first // page is the number of the first visible page. SwPageFrm *pPage = IsComplete() ? static_cast<SwPageFrm*>(pRoot->Lower()) : - pImp->GetFirstVisPage(); + pImp->GetFirstVisPage(pImp->GetShell()->GetOut()); if ( !pPage ) pPage = static_cast<SwPageFrm*>(pRoot->Lower()); @@ -621,7 +621,7 @@ void SwLayAction::InternalAction() if( !IsComplete() && nPreInvaPage + 2 < nFirstPageNum ) { pImp->SetFirstVisPageInvalid(); - SwPageFrm *pTmpPage = pImp->GetFirstVisPage(); + SwPageFrm *pTmpPage = pImp->GetFirstVisPage(pImp->GetShell()->GetOut()); nFirstPageNum = pTmpPage->GetPhyPageNum(); if( nPreInvaPage < nFirstPageNum ) { @@ -2038,7 +2038,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) SwPageFrm *pPage; if ( bVisAreaOnly ) - pPage = pImp->GetFirstVisPage(); + pPage = pImp->GetFirstVisPage(pViewShell->GetOut()); else pPage = static_cast<SwPageFrm*>(pRoot->Lower()); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 67f334148894..6984d8c56c76 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3257,7 +3257,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S const bool bOldAction = IsCallbackActionEnabled(); const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false ); - const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage(); + const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext); if ( pPage->GetPrev() ) pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); const bool bBookMode = gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode(); diff --git a/sw/source/core/unocore/unoflatpara.cxx b/sw/source/core/unocore/unoflatpara.cxx index a7a99b6c07f2..22fe58a24212 100644 --- a/sw/source/core/unocore/unoflatpara.cxx +++ b/sw/source/core/unocore/unoflatpara.cxx @@ -391,7 +391,7 @@ uno::Reference< text::XFlatParagraph > SwXFlatParagraphIterator::getNextPara() { SwViewShell* pViewShell = mpDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - SwPageFrm* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage() : 0; + SwPageFrm* pCurrentPage = pViewShell ? pViewShell->Imp()->GetFirstVisPage(pViewShell->GetOut()) : 0; SwPageFrm* pStartPage = pCurrentPage; SwPageFrm* pStopPage = 0; diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 08e064531da6..b3957c4ccd2e 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -270,17 +270,17 @@ Color SwViewShellImp::GetRetoucheColor() const return aRet; } -SwPageFrm *SwViewShellImp::GetFirstVisPage() +SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) { if ( bFirstPageInvalid ) - SetFirstVisPage(pSh->GetOut()); + SetFirstVisPage(pRenderContext); return pFirstVisPage; } -const SwPageFrm *SwViewShellImp::GetFirstVisPage() const +const SwPageFrm *SwViewShellImp::GetFirstVisPage(OutputDevice* pRenderContext) const { if ( bFirstPageInvalid ) - const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pSh->GetOut()); + const_cast<SwViewShellImp*>(this)->SetFirstVisPage(pRenderContext); return pFirstVisPage; } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 15cc9c0764d5..c9ad76351055 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1031,7 +1031,7 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) //First get the old visible page, so we don't have to look //for it afterwards. - const SwFrm *pOldPage = Imp()->GetFirstVisPage(); + const SwFrm *pOldPage = Imp()->GetFirstVisPage(GetWin()); const SwRect aPrevArea( VisArea() ); const bool bFull = aPrevArea.IsEmpty(); @@ -1478,7 +1478,7 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect } else { - const SwFrm *pPage = Imp()->GetFirstVisPage(); + const SwFrm *pPage = Imp()->GetFirstVisPage(&rRenderContext); //Here we have to get the previous page since //GetFirstVisPage return the current one but //there is a portion of the previous page @@ -1568,7 +1568,7 @@ bool SwViewShell::CheckInvalidForPaint( const SwRect &rRect ) if ( !GetWin() ) return false; - const SwPageFrm *pPage = Imp()->GetFirstVisPage(); + const SwPageFrm *pPage = Imp()->GetFirstVisPage(GetOut()); const SwTwips nBottom = VisArea().Bottom(); const SwTwips nRight = VisArea().Right(); bool bRet = false; |