summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-26 14:58:43 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-26 16:03:51 +0200
commita3413204d2eb0563a4a2e1104905951f81e417bc (patch)
tree838dc9a30ea5b837eb30a3baacf4c0df523bba7a
parentce5711267c09a8c85decbd2ad043149d584f8fe7 (diff)
SwPageFrm::MakeAll: use vcl::RenderContext
One tricky part is that in generic SwFrm methods SwRootFrm may not have a shell and doesn't need a vcl::RenderContext, either; so check for that situation explicitly where the frame may be a root one. Change-Id: I48f39fb7195290393fca34f75d8798fb5f960f46
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/inc/cntfrm.hxx2
-rw-r--r--sw/source/core/inc/flyfrms.hxx6
-rw-r--r--sw/source/core/inc/frame.hxx2
-rw-r--r--sw/source/core/inc/layfrm.hxx2
-rw-r--r--sw/source/core/inc/notxtfrm.hxx2
-rw-r--r--sw/source/core/inc/pagefrm.hxx2
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/rowfrm.hxx2
-rw-r--r--sw/source/core/inc/sectfrm.hxx2
-rw-r--r--sw/source/core/inc/tabfrm.hxx2
-rw-r--r--sw/source/core/layout/calcmove.cxx20
-rw-r--r--sw/source/core/layout/fly.cxx8
-rw-r--r--sw/source/core/layout/flycnt.cxx4
-rw-r--r--sw/source/core/layout/flyincnt.cxx2
-rw-r--r--sw/source/core/layout/flylay.cxx2
-rw-r--r--sw/source/core/layout/pagechg.cxx2
-rw-r--r--sw/source/core/layout/sectfrm.cxx4
-rw-r--r--sw/source/core/layout/tabfrm.cxx10
19 files changed, 39 insertions, 39 deletions
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index d040d35e708e..811f97b0af33 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -463,7 +463,7 @@ const Size& SwNoTextFrm::GetSize() const
return pFly->Prt().SSize();
}
-void SwNoTextFrm::MakeAll()
+void SwNoTextFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
SwContentNotify aNotify( this );
SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
diff --git a/sw/source/core/inc/cntfrm.hxx b/sw/source/core/inc/cntfrm.hxx
index 94a597a233ae..18e137ba4690 100644
--- a/sw/source/core/inc/cntfrm.hxx
+++ b/sw/source/core/inc/cntfrm.hxx
@@ -45,7 +45,7 @@ class SwContentFrm: public SwFrm, public SwFlowFrm
bool bTstMove,
const bool bObjsInNewUpper );
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
void _UpdateAttr( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
SwAttrSetChg *pa = 0, SwAttrSetChg *pb = 0 );
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 4608577a5260..c096a4bd803e 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -71,7 +71,7 @@ public:
// #i28701#
TYPEINFO_OVERRIDE();
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
// #i37068# - accessors for member <mbNoMoveOnCheckClip>
inline void SetNoMoveOnCheckClip( const bool _bNewNoMoveOnCheckClip )
@@ -138,7 +138,7 @@ protected:
class SwFlyAtCntFrm : public SwFlyFreeFrm
{
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
// #i28701#
virtual bool _InvalidationAllowed( const InvalidationType _nInvalid ) const SAL_OVERRIDE;
@@ -186,7 +186,7 @@ class SwFlyInCntFrm : public SwFlyFrm
protected:
virtual void NotifyBackground( SwPageFrm *pPage,
const SwRect& rRect, PrepareHint eHint) SAL_OVERRIDE;
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
public:
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 9c9f76aaddee..9677a5f81828 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -378,7 +378,7 @@ protected:
// avoid formatting of superior table frame.
friend SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm );
- virtual void MakeAll() = 0;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) = 0;
// adjust frames of a page
SwTwips AdjustNeighbourhood( SwTwips nDiff, bool bTst = false );
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index 1c9524799f85..a0d2d6852ef6 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -54,7 +54,7 @@ protected:
virtual ~SwLayoutFrm();
virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
SwFrm * m_pLower;
std::vector<SwAnchoredObject*> m_VertPosOrientFrmsFor;
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index 0c638bc10a56..73a516a7fedb 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -41,7 +41,7 @@ class SwNoTextFrm: public SwContentFrm
virtual ~SwNoTextFrm();
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
public:
SwNoTextFrm( SwNoTextNode * const, SwFrm* );
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 99097a9846cd..45c3989ee88b 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -106,7 +106,7 @@ class SwPageFrm: public SwFootnoteBossFrm
virtual ~SwPageFrm();
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
virtual void SwClientNotify(const SwModify&, const SfxHint&) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 6a904727200e..e7a98cdf52d3 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -150,7 +150,7 @@ class SwRootFrm: public SwLayoutFrm
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
public:
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index 79fae7df441f..d86379b77008 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -49,7 +49,7 @@ class SwRowFrm: public SwLayoutFrm
virtual ~SwRowFrm();
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
public:
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 1b8135c7db4b..668578acd815 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -58,7 +58,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
virtual ~SwSectionFrm();
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) SAL_OVERRIDE;
virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 9c93ae1a5d20..dca483993646 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -106,7 +106,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
virtual ~SwTabFrm();
protected:
- virtual void MakeAll() SAL_OVERRIDE;
+ virtual void MakeAll(vcl::RenderContext* pRenderContext) SAL_OVERRIDE;
virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
// only changes the Framesize, not the PrtArea size
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 280598cdcf80..f08f956d9edd 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -274,7 +274,7 @@ void SwFrm::PrepareMake()
const SwTextFrm* pMaster = static_cast<SwContentFrm*>(this)->FindMaster();
if ( pMaster && pMaster->IsLocked() )
{
- MakeAll();
+ MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut());
return;
}
}
@@ -303,7 +303,7 @@ void SwFrm::PrepareMake()
(SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) )
break;
- pFrm->MakeAll();
+ pFrm->MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut());
if( IsSctFrm() && !static_cast<SwSectionFrm*>(this)->GetSection() )
break;
}
@@ -337,7 +337,7 @@ void SwFrm::PrepareMake()
if ( bTab && !bOldTabLock )
::PrepareUnlock( static_cast<SwTabFrm*>(this) );
}
- MakeAll();
+ MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut());
}
void SwFrm::OptPrepareMake()
@@ -358,7 +358,7 @@ void SwFrm::OptPrepareMake()
else
{
StackHack aHack;
- MakeAll();
+ MakeAll(IsRootFrm() ? 0 : getRootFrm()->GetCurrShell()->GetOut());
}
}
@@ -411,7 +411,7 @@ void SwFrm::PrepareCrsr()
(SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) )
break;
- pFrm->MakeAll();
+ pFrm->MakeAll(getRootFrm()->GetCurrShell()->GetOut());
}
// With ContentFrms, the chain may be broken while walking through
// it. Therefore we have to figure out the follower in a bit more
@@ -636,7 +636,7 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot
rBot = std::max( rBot, nMax );
}
-void SwPageFrm::MakeAll()
+void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
@@ -672,7 +672,7 @@ void SwPageFrm::MakeAll()
SwViewShell *pSh = getRootFrm()->GetCurrShell();
if ( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
- const Size aBorder = pSh->GetOut()->PixelToLogic( pSh->GetBrowseBorder() );
+ const Size aBorder = pRenderContext->PixelToLogic( pSh->GetBrowseBorder() );
const long nTop = pAttrs->CalcTopLine() + aBorder.Height();
const long nBottom = pAttrs->CalcBottomLine()+ aBorder.Height();
@@ -765,7 +765,7 @@ void SwPageFrm::MakeAll()
{ // Set FixSize. For pages, this is not done from Upper, but from
// the attribute.
Frm().SSize( pAttrs->GetSize() );
- Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
+ Format( pRenderContext, pAttrs );
}
}
}
@@ -779,7 +779,7 @@ void SwPageFrm::MakeAll()
"Upper (Root) must be wide enough to contain the widest page");
}
-void SwLayoutFrm::MakeAll()
+void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 )
@@ -1026,7 +1026,7 @@ inline void ValidateSz( SwFrm *pFrm )
}
}
-void SwContentFrm::MakeAll()
+void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
OSL_ENSURE( GetUpper(), "no Upper?" );
OSL_ENSURE( IsTextFrm(), "MakeAll(), NoText" );
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 300f3034317a..2337950ae72d 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1839,7 +1839,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
bFormatHeightOnly = true;
}
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
- static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll();
+ static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false );
// #i55416#
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
@@ -1848,7 +1848,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
}
}
else
- MakeAll();
+ MakeAll(getRootFrm()->GetCurrShell()->GetOut());
_InvalidateSize();
InvalidatePos();
if ( bOldLock )
@@ -1934,7 +1934,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
bFormatHeightOnly = true;
}
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
- static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll();
+ static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false );
// #i55416#
if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
@@ -1943,7 +1943,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
}
}
else
- MakeAll();
+ MakeAll(getRootFrm()->GetCurrShell()->GetOut());
_InvalidateSize();
InvalidatePos();
if ( bOldLocked )
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index a0127a896d4f..36e7478043e0 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -321,7 +321,7 @@ bool SwOszControl::ChkOsz()
|* alignment to not trigger a 'big oscillation' when calling from outside
|* again.
|*/
-void SwFlyAtCntFrm::MakeAll()
+void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
@@ -391,7 +391,7 @@ void SwFlyAtCntFrm::MakeAll()
do {
SWRECTFN( this )
Point aOldPos( (Frm().*fnRect->fnGetPos)() );
- SwFlyFreeFrm::MakeAll();
+ SwFlyFreeFrm::MakeAll(pRenderContext);
const bool bPosChgDueToOwnFormat =
aOldPos != (Frm().*fnRect->fnGetPos)();
// #i3317#
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index 35932580417c..1d3f8412de24 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -205,7 +205,7 @@ void SwFlyInCntFrm::RegistFlys()
::RegistFlys( pPage, this );
}
-void SwFlyInCntFrm::MakeAll()
+void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
// OD 2004-01-19 #110582#
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index d12f7d831747..b99f8ba913ad 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -100,7 +100,7 @@ void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, true );
}
-void SwFlyFreeFrm::MakeAll()
+void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 3a02ef349109..7298ec2f33aa 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1504,7 +1504,7 @@ Size SwRootFrm::ChgSize( const Size& aNewSize )
return Frm().SSize();
}
-void SwRootFrm::MakeAll()
+void SwRootFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !mbValidPos )
{ mbValidPos = true;
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 7d6d85266138..5b48867ce6ea 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -687,7 +687,7 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
}
}
-void SwSectionFrm::MakeAll()
+void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( IsJoinLocked() || IsColLocked() || StackHack::IsLocked() || StackHack::Count() > 50 )
return;
@@ -741,7 +741,7 @@ void SwSectionFrm::MakeAll()
const SwFormatCol &rCol = GetFormat()->GetCol();
(void)rCol;
#endif
- SwLayoutFrm::MakeAll();
+ SwLayoutFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
UnlockJoin();
if( pSection && IsSuperfluous() )
DelEmpty( false );
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 616a2a4bce19..8b56e39595d4 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1665,7 +1665,7 @@ SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm )
if ( pNxt )
{
if ( pTabFrm->GetUpper()->IsInTab() )
- pNxt->MakeAll();
+ pNxt->MakeAll(pNxt->getRootFrm()->GetCurrShell()->GetOut());
else
pNxt->Calc();
}
@@ -1689,7 +1689,7 @@ namespace {
return bRet;
}
}
-void SwTabFrm::MakeAll()
+void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 )
return;
@@ -2373,7 +2373,7 @@ void SwTabFrm::MakeAll()
StackHack aHack;
delete pAccess;
- GetFollow()->MakeAll();
+ GetFollow()->MakeAll(pRenderContext);
pAccess= new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
@@ -3582,11 +3582,11 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
SwLayoutFrm::Modify( pOld, pNew );
}
-void SwRowFrm::MakeAll()
+void SwRowFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( !GetNext() )
mbValidSize = false;
- SwLayoutFrm::MakeAll();
+ SwLayoutFrm::MakeAll(pRenderContext);
}
long CalcHeightWithFlys( const SwFrm *pFrm )