[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 4 commits - sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Jun 29 00:13:46 PDT 2015
sw/source/core/doc/notxtfrm.cxx | 6 +++---
sw/source/core/inc/bodyfrm.hxx | 2 +-
sw/source/core/inc/cellfrm.hxx | 2 +-
sw/source/core/inc/cntfrm.hxx | 2 +-
sw/source/core/inc/flyfrm.hxx | 2 +-
sw/source/core/inc/flyfrms.hxx | 8 ++++----
sw/source/core/inc/frame.hxx | 4 ++--
sw/source/core/inc/ftnfrm.hxx | 2 +-
sw/source/core/inc/hffrm.hxx | 2 +-
sw/source/core/inc/layfrm.hxx | 4 ++--
sw/source/core/inc/notxtfrm.hxx | 4 ++--
sw/source/core/inc/pagefrm.hxx | 2 +-
sw/source/core/inc/rootfrm.hxx | 2 +-
sw/source/core/inc/rowfrm.hxx | 4 ++--
sw/source/core/inc/sectfrm.hxx | 4 ++--
sw/source/core/inc/tabfrm.hxx | 4 ++--
sw/source/core/inc/txtfrm.hxx | 4 ++--
sw/source/core/layout/calcmove.cxx | 30 +++++++++++++++---------------
sw/source/core/layout/fly.cxx | 10 +++++-----
sw/source/core/layout/flycnt.cxx | 4 ++--
sw/source/core/layout/flyincnt.cxx | 9 +++++----
sw/source/core/layout/flylay.cxx | 4 ++--
sw/source/core/layout/ftnfrm.cxx | 2 +-
sw/source/core/layout/hffrm.cxx | 4 ++--
sw/source/core/layout/pagechg.cxx | 4 ++--
sw/source/core/layout/paintfrm.cxx | 2 +-
sw/source/core/layout/sectfrm.cxx | 8 ++++----
sw/source/core/layout/tabfrm.cxx | 20 ++++++++++----------
sw/source/core/layout/unusedf.cxx | 2 +-
sw/source/core/layout/wsfrm.cxx | 2 +-
sw/source/core/text/frmform.cxx | 8 ++++----
sw/source/core/text/inftxt.cxx | 2 +-
sw/source/core/text/txtfrm.cxx | 2 +-
33 files changed, 86 insertions(+), 85 deletions(-)
New commits:
commit 64ac796d5f5999541eedcf418ae146fdfb0a0284
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 26 15:20:14 2015 +0200
fix crash on exporting kde140265-1.doc to ODT
properties.pSGlobalShell can be legitimately 0 here.
No testcase, for some reason the export does not crash if it's done by
CppunitTest_sw_filters_test or CppunitTest_sw_odfexport; but it does
crash with '--headless --convert-to odt kde140265-1.doc'.
Change-Id: I50936f9e5236763cc987aba14d8fc897c4b789bf
(cherry picked from commit 4cd3f9a7749b8ef285012a59d031dc9f2e4b5e43)
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index bcec037..23b1933 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1509,7 +1509,7 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
}
}
- ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell->GetOut() );
+ ::SwAlignRect( rRect, properties.pSGlobalShell, properties.pSGlobalShell ? properties.pSGlobalShell->GetOut() : 0 );
}
/**
commit 9b524402be24c7ac24f044181c4dcd7123b083df
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 26 14:58:43 2015 +0200
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
(cherry picked from commit a3413204d2eb0563a4a2e1104905951f81e417bc)
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index b51cdca..9b0e1c4 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 94a597a..18e137b 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 4608577..c096a4b 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 9c9f76a..9677a5f 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 1c95247..a0d2d68 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 0c638bc..73a516a 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 99097a9..45c3989 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 d57989b..e5ca715 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 79fae7d..d86379b 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 1b8135c..668578a 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 9c93ae1..dca4839 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 9a5c2f5..39bb508 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 5d165ec..7abc004 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 fde2e2d..a500fe3 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 c4b94b6..3004cc1 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 8cc7fd4..6ba20dd 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 69118df..9fe2e66 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1503,7 +1503,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 2f60d0f..dcb7fbe 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 b038505..81af7b4 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 )
commit 0e10191959d822e6c522982804edf7b2ecf69fa0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 26 11:46:05 2015 +0200
SwTextFrm::Format: use vcl::RenderContext
Change-Id: I468d662a612c951dc1482cfc685dee800bb11f82
(cherry picked from commit 05e50b570f602c17218bb6e82bcaac2fbdd943c1)
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index f72d7c7..b51cdca 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -480,13 +480,13 @@ void SwNoTextFrm::MakeAll()
if ( !mbValidSize )
{ mbValidSize = true;
- Format();
+ Format(getRootFrm()->GetCurrShell()->GetOut());
}
}
}
/** Calculate the Bitmap's site, if needed */
-void SwNoTextFrm::Format( const SwBorderAttrs * )
+void SwNoTextFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
const Size aNewSize( GetSize() );
diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index 5e3e0be..375dec9 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -27,7 +27,7 @@ class SwBorderAttrs;
class SwBodyFrm: public SwLayoutFrm
{
protected:
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
public:
SwBodyFrm( SwFrameFormat*, SwFrm* );
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index efd3796..040cc03 100644
--- a/sw/source/core/inc/cellfrm.hxx
+++ b/sw/source/core/inc/cellfrm.hxx
@@ -36,7 +36,7 @@ class SwCellFrm: public SwLayoutFrm
virtual ~SwCellFrm();
protected:
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) SAL_OVERRIDE;
public:
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 59f33db..be422b4 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -121,7 +121,7 @@ protected:
Point m_aContentPos; // content area's position relatively to Frm
bool m_bValidContentPos;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
void MakePrtArea( const SwBorderAttrs &rAttrs );
void MakeContentPos( const SwBorderAttrs &rAttrs );
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 73dda04..4608577 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -195,7 +195,7 @@ public:
SwFlyInCntFrm( SwFlyFrameFormat*, SwFrm*, SwFrm *pAnchor );
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
void SetRefPoint( const Point& rPoint, const Point &rRelAttr,
const Point &rRelPos );
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 2072d40..9c9f76a 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -573,7 +573,7 @@ public:
// environment (not e.g. for repeating table headlines)
bool IsFootnoteAllowed() const;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 );
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 );
virtual void CheckDirection( bool bVert );
diff --git a/sw/source/core/inc/ftnfrm.hxx b/sw/source/core/inc/ftnfrm.hxx
index e9b2d3c..fe5b10e 100644
--- a/sw/source/core/inc/ftnfrm.hxx
+++ b/sw/source/core/inc/ftnfrm.hxx
@@ -42,7 +42,7 @@ public:
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void PaintBorder( const SwRect &, const SwPageFrm *pPage,
const SwBorderAttrs & ) const SAL_OVERRIDE;
virtual void PaintSubsidiaryLines( const SwPageFrm*, const SwRect& ) const SAL_OVERRIDE;
diff --git a/sw/source/core/inc/hffrm.hxx b/sw/source/core/inc/hffrm.hxx
index 093c466..3adcec7 100644
--- a/sw/source/core/inc/hffrm.hxx
+++ b/sw/source/core/inc/hffrm.hxx
@@ -32,7 +32,7 @@ protected:
public:
SwHeadFootFrm(SwFrameFormat * pFrm, SwFrm*, sal_uInt16 aType);
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual SwTwips GrowFrm( SwTwips,
bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips ShrinkFrm( SwTwips,
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index b3b0ccb..1c95247 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -53,7 +53,7 @@ protected:
virtual void DestroyImpl() SAL_OVERRIDE;
virtual ~SwLayoutFrm();
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void MakeAll() SAL_OVERRIDE;
SwFrm * m_pLower;
diff --git a/sw/source/core/inc/notxtfrm.hxx b/sw/source/core/inc/notxtfrm.hxx
index e0a65c4..0c638bc 100644
--- a/sw/source/core/inc/notxtfrm.hxx
+++ b/sw/source/core/inc/notxtfrm.hxx
@@ -34,7 +34,7 @@ class SwNoTextFrm: public SwContentFrm
void InitCtor();
- void Format ( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ void Format ( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
void PaintPicture( vcl::RenderContext*, const SwRect& ) const;
virtual void DestroyImpl() SAL_OVERRIDE;
diff --git a/sw/source/core/inc/rowfrm.hxx b/sw/source/core/inc/rowfrm.hxx
index e59c2d5..79fae7d 100644
--- a/sw/source/core/inc/rowfrm.hxx
+++ b/sw/source/core/inc/rowfrm.hxx
@@ -29,7 +29,7 @@ class SwBorderAttrs;
/// SwRowFrm is one table row in the document layout.
class SwRowFrm: public SwLayoutFrm
{
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
/// Only change the Frame size, not the PrtArea SSize
virtual SwTwips ShrinkFrm( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index df36cf8..1b8135c 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -60,7 +60,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
protected:
virtual void MakeAll() SAL_OVERRIDE;
virtual bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool bHead, bool &rReformat ) SAL_OVERRIDE;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) 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/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 3f0c935..9c93ae1 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -107,7 +107,7 @@ class SwTabFrm: public SwLayoutFrm, public SwFlowFrm
protected:
virtual void MakeAll() SAL_OVERRIDE;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) 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
virtual SwTwips GrowFrm ( SwTwips, bool bTst = false, bool bInfo = false ) SAL_OVERRIDE;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 28cb0ba8..824480a 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -449,7 +449,7 @@ public:
inline SwTwips GetLeftMargin() const;
inline SwTwips GetRightMargin() const;
- virtual void Format( const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
+ virtual void Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs = 0 ) SAL_OVERRIDE;
virtual void CheckDirection( bool bVert ) SAL_OVERRIDE;
/// Returns the sum of line height in pLine
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index ec2da7d..9a5c2f5 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -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( pAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
}
}
}
@@ -850,7 +850,7 @@ void SwLayoutFrm::MakeAll()
pAccess = new SwBorderAttrAccess( SwFrm::GetCache(), this );
pAttrs = pAccess->Get();
}
- Format( pAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
}
} //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
delete pAccess;
@@ -1334,7 +1334,7 @@ void SwContentFrm::MakeAll()
// without change occur.
if ( nConsecutiveFormatsWithoutChange <= cnStopFormat )
{
- Format();
+ Format(getRootFrm()->GetCurrShell()->GetOut());
}
#if OSL_DEBUG_LEVEL > 0
else
@@ -1386,7 +1386,7 @@ void SwContentFrm::MakeAll()
Prepare( PREP_WIDOWS_ORPHANS, 0, false );
mbValidSize = true;
bFormatted = sal_True;
- Format();
+ Format(getRootFrm()->GetCurrShell()->GetOut());
}
}
SwFrm *pNxt = HasFollow() ? NULL : FindNext();
@@ -1716,7 +1716,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() );
}
static_cast<SwContentFrm*>(pNxt)->MakePrtArea( rAttrs );
- pNxt->Format( &rAttrs );
+ pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
}
else
{
@@ -1730,7 +1730,7 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
else
pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() );
}
- pNxt->Format( &rAttrs );
+ pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
}
pFrm->mbValidPos = bOldPos;
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 4d7c3d8..5d165ec 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -1236,7 +1236,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
*
* The FixSize is not inserted here.
*/
-void SwFlyFrm::Format( const SwBorderAttrs *pAttrs )
+void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
OSL_ENSURE( pAttrs, "FlyFrm::Format, pAttrs is 0." );
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index dde2673..c4b94b6 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -21,6 +21,7 @@
#include "frmtool.hxx"
#include "hints.hxx"
#include <fmtornt.hxx>
+#include "rootfrm.hxx"
#include "txtfrm.hxx"
#include "flyfrms.hxx"
#include <dflyobj.hxx>
@@ -128,7 +129,7 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
/// Here the content gets formatted initially.
-void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs )
+void SwFlyInCntFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs )
{
if ( !Frm().Height() )
{
@@ -140,7 +141,7 @@ void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs )
}
Unlock();
}
- SwFlyFrm::Format( pAttrs );
+ SwFlyFrm::Format( pRenderContext, pAttrs );
}
/** Calculate object position
@@ -240,7 +241,7 @@ void SwFlyInCntFrm::MakeAll()
}
if ( !mbValidSize )
- Format( &rAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
if ( !mbValidPos )
{
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index dd4866f..8cc7fd4 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -171,7 +171,7 @@ void SwFlyFreeFrm::MakeAll()
if ( !mbValidSize || bFormatHeightOnly )
{
mbValidSize = false;
- Format( &rAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
bFormatHeightOnly = false;
}
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 4836695..daa8226 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -180,7 +180,7 @@ static long lcl_Undersize( const SwFrm* pFrm )
}
/// "format" the frame (Fixsize is not set here).
-void SwFootnoteContFrm::Format( const SwBorderAttrs * )
+void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
// calculate total border, only one distance to the top
const SwPageFrm* pPage = FindPageFrm();
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index 18b29fa..a54fbbd 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -387,7 +387,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
}
}
-void SwHeadFootFrm::Format(const SwBorderAttrs * pAttrs)
+void SwHeadFootFrm::Format(vcl::RenderContext* pRenderContext, const SwBorderAttrs * pAttrs)
{
OSL_ENSURE( pAttrs, "SwFooterFrm::Format, pAttrs is 0." );
@@ -396,7 +396,7 @@ void SwHeadFootFrm::Format(const SwBorderAttrs * pAttrs)
if ( ! GetEatSpacing() && IsHeaderFrm())
{
- SwLayoutFrm::Format(pAttrs);
+ SwLayoutFrm::Format(pRenderContext, pAttrs);
}
else
{
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 933ef1d..69118df 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -65,7 +65,7 @@ SwBodyFrm::SwBodyFrm( SwFrameFormat *pFormat, SwFrm* pSib ):
mnFrmType = FRM_BODY;
}
-void SwBodyFrm::Format( const SwBorderAttrs * )
+void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
// Formatting of the body is too simple, thus, it gets an own format method.
// Borders etc. are not taken into account here.
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index aa2ba0e..2f60d0f 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1207,7 +1207,7 @@ class ExtraFormatToPositionObjs
};
/// "formats" the frame; Frm and PrtArea
-void SwSectionFrm::Format( const SwBorderAttrs *pAttr )
+void SwSectionFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttr )
{
if( !pSection ) // via DelEmpty
{
@@ -1803,7 +1803,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( !pNew->Lower() ) // Format single column sections
{
pNew->MakePos();
- pLayLeaf->Format(); // In order that the PrtArea is correct for the MoveBwd
+ pLayLeaf->Format(getRootFrm()->GetCurrShell()->GetOut()); // In order that the PrtArea is correct for the MoveBwd
}
else
pNew->SimpleFormat();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 1fd119c..b038505 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1898,7 +1898,7 @@ void SwTabFrm::MakeAll()
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)();
- Format( pAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout &&
@@ -1964,7 +1964,7 @@ void SwTabFrm::MakeAll()
}
mbValidPrtArea = false;
- Format( pAttrs );
+ Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
}
lcl_RecalcTable( *this, 0, aNotify );
m_bLowersFormatted = true;
@@ -2656,7 +2656,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
/// "Formats" the frame; Frm and PrtArea.
/// The fixed size is not adjusted here.
-void SwTabFrm::Format( const SwBorderAttrs *pAttrs )
+void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
OSL_ENSURE( pAttrs, "TabFrm::Format, pAttrs ist 0." );
@@ -3928,7 +3928,7 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
return nBottomLineDist;
}
-void SwRowFrm::Format( const SwBorderAttrs *pAttrs )
+void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
SWRECTFN( this )
OSL_ENSURE( pAttrs, "SwRowFrm::Format without Attrs." );
@@ -4667,7 +4667,7 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
return bRet;
}
-void SwCellFrm::Format( const SwBorderAttrs *pAttrs )
+void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
OSL_ENSURE( pAttrs, "CellFrm::Format, pAttrs ist 0." );
const SwTabFrm* pTab = FindTabFrm();
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index a788a58..11e8ca6 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -21,7 +21,7 @@
#include "cntfrm.hxx"
#include "flyfrm.hxx"
-void SwFrm::Format( const SwBorderAttrs * )
+void SwFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
OSL_FAIL( "Format() of the base class called." );
}
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 73ca1dd..41d943a 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2925,7 +2925,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
*
* The Fixsize is not set here.
*/
-void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs )
+void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
OSL_ENSURE( pAttrs, "LayoutFrm::Format, pAttrs ist 0." );
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index be1b997..dea5367 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1699,7 +1699,7 @@ void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPar
// We calculate the text frame's size and send a notification.
// Shrink() or Grow() to adjust the frame's size to the changed required space.
-void SwTextFrm::Format( const SwBorderAttrs * )
+void SwTextFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs * )
{
SWRECTFN( this )
@@ -1817,7 +1817,7 @@ void SwTextFrm::Format( const SwBorderAttrs * )
}
do
{
- _Format( getRootFrm()->GetCurrShell()->GetOut(), aAccess.GetPara() );
+ _Format( pRenderContext, aAccess.GetPara() );
if( pFootnoteBoss && nFootnoteHeight )
{
const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont();
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index ae679c3..3a38002 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -156,7 +156,7 @@ void SwTextInfo::CtorInitTextInfo( SwTextFrm *pFrm )
if (!m_pPara)
{
SAL_WARN("sw.core", "+SwTextInfo::CTOR: missing paragraph information");
- pFrm->Format();
+ pFrm->Format(pFrm->getRootFrm()->GetCurrShell()->GetOut());
m_pPara = pFrm->GetPara();
}
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index d51b613..636c18c 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2082,7 +2082,7 @@ SwTextFrm* SwTextFrm::GetFormatted( bool bForceQuickFormat )
// format information
// Optimization with FormatQuick()
if( bFormat && !FormatQuick( bForceQuickFormat ) )
- Format();
+ Format(getRootFrm()->GetCurrShell()->GetOut());
}
UNDO_SWAP( this )
commit b948535998791317c96df98fa18271280f9893c2
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jun 26 10:59:57 2015 +0200
SwTextFrm::_Format: use vcl::RenderContext
Change-Id: Ia37257286cce7a4a4a6fdffd2dd0d896d46db548
(cherry picked from commit 6b88a6501a4de7aeb02da8f5efed28925aafc144)
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 6fe9380..28cb0ba8 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -142,7 +142,7 @@ class SwTextFrm: public SwContentFrm
// In order to safe stack space, we split this method:
// _Format calls _Format with parameters
- void _Format( SwParaPortion *pPara );
+ void _Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara );
void _Format( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
const bool bAdjust = false );
void FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf );
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 3f91ead..be1b997 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1638,7 +1638,7 @@ void SwTextFrm::FormatOnceMore( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
}
}
-void SwTextFrm::_Format( SwParaPortion *pPara )
+void SwTextFrm::_Format( vcl::RenderContext* pRenderContext, SwParaPortion *pPara )
{
const bool bIsEmpty = GetText().isEmpty();
@@ -1665,7 +1665,7 @@ void SwTextFrm::_Format( SwParaPortion *pPara )
if ( IsVertical() )
SwapWidthAndHeight();
- SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
+ SwTextFormatInfo aInf( pRenderContext, this );
SwTextFormatter aLine( this, &aInf );
HideAndShowObjects();
@@ -1817,7 +1817,7 @@ void SwTextFrm::Format( const SwBorderAttrs * )
}
do
{
- _Format( aAccess.GetPara() );
+ _Format( getRootFrm()->GetCurrShell()->GetOut(), aAccess.GetPara() );
if( pFootnoteBoss && nFootnoteHeight )
{
const SwFootnoteContFrm* pCont = pFootnoteBoss->FindFootnoteCont();
More information about the Libreoffice-commits
mailing list