From ba150b06401959fca0b38e41683846891b712d33 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 1 Jun 2018 20:52:35 +0200 Subject: sw_redlinehide: convert to GetDep() Change-Id: I3b128fe797e8fd6989821cfd540dc5e630e74d37 --- sw/source/core/layout/hffrm.cxx | 4 ++-- sw/source/core/layout/newfrm.cxx | 2 +- sw/source/core/layout/pagechg.cxx | 6 +++--- sw/source/core/layout/sectfrm.cxx | 2 +- sw/source/core/layout/ssfrm.cxx | 2 +- sw/source/core/layout/tabfrm.cxx | 6 ++++-- sw/source/core/text/txtfrm.cxx | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) (limited to 'sw/source/core') diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index c2d2a46718c6..437b8992a243 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -688,7 +688,7 @@ void SwPageFrame::PrepareHeader() if ( !pLay ) return; - const SwFormatHeader &rH = static_cast(GetRegisteredIn())->GetHeader(); + const SwFormatHeader &rH = static_cast(GetDep())->GetHeader(); const SwViewShell *pSh = getRootFrame()->GetCurrShell(); const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() || @@ -729,7 +729,7 @@ void SwPageFrame::PrepareFooter() if ( !pLay ) return; - const SwFormatFooter &rF = static_cast(GetRegisteredIn())->GetFooter(); + const SwFormatFooter &rF = static_cast(GetDep())->GetFooter(); while ( pLay->GetNext() ) pLay = static_cast(pLay->GetNext()); diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index ced2ab2b407e..37bea6e97e65 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -472,7 +472,7 @@ void SwRootFrame::DestroyImpl() if(pBlink) pBlink->FrameDelete( this ); - SwFrameFormat *pRegisteredInNonConst = static_cast(GetRegisteredInNonConst()); + SwFrameFormat *pRegisteredInNonConst = static_cast(GetDep()); if ( pRegisteredInNonConst ) { SwDoc *pDoc = pRegisteredInNonConst->GetDoc(); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index a6f7c810064d..a85934d0af6e 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -2451,7 +2451,7 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode(); if ( aHeaderArea.IsInside( rPt ) ) { - if (!bHideWhitespaceMode || static_cast(GetRegisteredIn())->GetHeader().IsActive()) + if (!bHideWhitespaceMode || static_cast(GetDep())->GetHeader().IsActive()) { rControl = Header; return true; @@ -2463,7 +2463,7 @@ bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rC Size( getFrameArea().Width(), getFrameArea().Bottom() - nLowerLimit ) ); if ( aFooterArea.IsInside( rPt ) && - (!bHideWhitespaceMode || static_cast(GetRegisteredIn())->GetFooter().IsActive()) ) + (!bHideWhitespaceMode || static_cast(GetDep())->GetFooter().IsActive()) ) { rControl = Footer; return true; @@ -2488,7 +2488,7 @@ bool SwPageFrame::CheckPageHeightValidForHideWhitespace(SwTwips nDiff) if (nDiff < 0) { // Content frame doesn't fit the actual size, check if it fits the nominal one. - const SwFrameFormat* pPageFormat = static_cast(GetRegisteredIn()); + const SwFrameFormat* pPageFormat = static_cast(GetDep()); const Size& rPageSize = pPageFormat->GetFrameSize().GetSize(); long nWhitespace = rPageSize.getHeight() - getFrameArea().Height(); if (nWhitespace > -nDiff) diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 1a0a8dca9ff1..b82cc656d54e 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -2556,7 +2556,7 @@ void SwSectionFrame::SwClientNotify( const SwModify& rMod, const SfxHint& rHint // #i117863# const SwSectionFrameMoveAndDeleteHint* pHint = dynamic_cast(&rHint); - if ( pHint && pHint->GetId() == SfxHintId::Dying && &rMod == GetRegisteredIn() ) + if (pHint && pHint->GetId() == SfxHintId::Dying && &rMod == GetDep()) { SwSectionFrame::MoveContentAndDelete( this, pHint->IsSaveContent() ); } diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index b2fd7113c0b4..5ec16d3509d0 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -436,7 +436,7 @@ SwContentFrame::~SwContentFrame() void SwTextFrame::RegisterToNode(SwTextNode & rNode) { - assert(&rNode != GetRegisteredIn()); + assert(&rNode != GetDep()); m_pMergedPara = sw::CheckParaRedlineMerge(*this, rNode); if (!m_pMergedPara) { diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 90cc289b2b21..501d756f714f 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1480,12 +1480,14 @@ bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDont if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt, *(pCnt->FindPageFrame()) ) ) { - if ( pCnt->GetRegisteredIn() == pLoopControlCond ) + SwTextNode const*const pTextNode( + static_cast(pCnt)->GetTextNodeFirst()); + if (pTextNode == pLoopControlCond) ++nLoopControlRuns; else { nLoopControlRuns = 0; - pLoopControlCond = pCnt->GetRegisteredIn(); + pLoopControlCond = pTextNode; } if ( nLoopControlRuns < nLoopControlMax ) diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 9dabd4d230bb..b60a0cc2a5b4 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -651,7 +651,7 @@ void SwTextFrame::DestroyImpl() } else { - SwTextNode *const pNode(static_cast(GetRegisteredIn())); + SwTextNode *const pNode(static_cast(GetDep())); if (pNode) { RemoveFootnotesForNode(*this, *pNode); -- cgit v1.2.3