Kaydet (Commit) ea1ea3b9 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwFrm::PrepareMake: use vcl::RenderContext

Change-Id: I34306bb1622c79489eb647ed45f398ad2634c144
üst 533e9794
...@@ -370,7 +370,7 @@ protected: ...@@ -370,7 +370,7 @@ protected:
void setRootFrm( SwRootFrm* pRoot ) { mpRoot = pRoot; } void setRootFrm( SwRootFrm* pRoot ) { mpRoot = pRoot; }
SwPageFrm *InsertPage( SwPageFrm *pSibling, bool bFootnote ); SwPageFrm *InsertPage( SwPageFrm *pSibling, bool bFootnote );
void PrepareMake(); void PrepareMake(vcl::RenderContext* pRenderContext);
void OptPrepareMake(); void OptPrepareMake();
void MakePos(); void MakePos();
// Format next frame of table frame to assure keeping attributes. // Format next frame of table frame to assure keeping attributes.
......
...@@ -238,7 +238,7 @@ static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm ) ...@@ -238,7 +238,7 @@ static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm )
* *
* @see MakeAll() * @see MakeAll()
*/ */
void SwFrm::PrepareMake() void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext)
{ {
StackHack aHack; StackHack aHack;
if ( GetUpper() ) if ( GetUpper() )
...@@ -274,7 +274,7 @@ void SwFrm::PrepareMake() ...@@ -274,7 +274,7 @@ void SwFrm::PrepareMake()
const SwTextFrm* pMaster = static_cast<SwContentFrm*>(this)->FindMaster(); const SwTextFrm* pMaster = static_cast<SwContentFrm*>(this)->FindMaster();
if ( pMaster && pMaster->IsLocked() ) if ( pMaster && pMaster->IsLocked() )
{ {
MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut()); MakeAll(pRenderContext);
return; return;
} }
} }
...@@ -303,7 +303,7 @@ void SwFrm::PrepareMake() ...@@ -303,7 +303,7 @@ void SwFrm::PrepareMake()
(SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) ) (SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) )
break; break;
pFrm->MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut()); pFrm->MakeAll(pRenderContext);
if( IsSctFrm() && !static_cast<SwSectionFrm*>(this)->GetSection() ) if( IsSctFrm() && !static_cast<SwSectionFrm*>(this)->GetSection() )
break; break;
} }
...@@ -337,7 +337,7 @@ void SwFrm::PrepareMake() ...@@ -337,7 +337,7 @@ void SwFrm::PrepareMake()
if ( bTab && !bOldTabLock ) if ( bTab && !bOldTabLock )
::PrepareUnlock( static_cast<SwTabFrm*>(this) ); ::PrepareUnlock( static_cast<SwTabFrm*>(this) );
} }
MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut()); MakeAll(pRenderContext);
} }
void SwFrm::OptPrepareMake() void SwFrm::OptPrepareMake()
...@@ -354,7 +354,7 @@ void SwFrm::OptPrepareMake() ...@@ -354,7 +354,7 @@ void SwFrm::OptPrepareMake()
return; return;
} }
if ( GetPrev() && !GetPrev()->IsValid() ) if ( GetPrev() && !GetPrev()->IsValid() )
PrepareMake(); PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
else else
{ {
StackHack aHack; StackHack aHack;
......
...@@ -2657,7 +2657,7 @@ SwFlyFrameFormat * SwFlyFrm::GetFormat() ...@@ -2657,7 +2657,7 @@ SwFlyFrameFormat * SwFlyFrm::GetFormat()
void SwFlyFrm::Calc() const void SwFlyFrm::Calc() const
{ {
if ( !m_bValidContentPos ) if ( !m_bValidContentPos )
const_cast<SwFlyFrm*>(this)->PrepareMake(); const_cast<SwFlyFrm*>(this)->PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
else else
SwLayoutFrm::Calc(); SwLayoutFrm::Calc();
} }
......
...@@ -1789,7 +1789,7 @@ bool SwFrm::OnFirstPage() const ...@@ -1789,7 +1789,7 @@ bool SwFrm::OnFirstPage() const
void SwFrm::Calc() const void SwFrm::Calc() const
{ {
if ( !mbValidPos || !mbValidPrtArea || !mbValidSize ) if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
const_cast<SwFrm*>(this)->PrepareMake(); const_cast<SwFrm*>(this)->PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : 0);
} }
Point SwFrm::GetRelPos() const Point SwFrm::GetRelPos() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment