From 49c2b9808df8a6b197dec666dfc0cda6321a4306 Mon Sep 17 00:00:00 2001 From: Robinson Tryon Date: Wed, 25 Nov 2015 06:03:10 -0500 Subject: bin/rename-sw-abbreviations.sh This commit renames the most annoying abbreviations in Writer (and partially in the shared code too). Change-Id: I77e5134f42f25e3786afa36b7a505c7e3237a9e8 --- sw/source/core/layout/findfrm.cxx | 1024 ++++++++++++++++++------------------- 1 file changed, 512 insertions(+), 512 deletions(-) (limited to 'sw/source/core/layout/findfrm.cxx') diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 5376296e9801..38dd5a78c7ff 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -33,20 +33,20 @@ #include #include -/// Searches the first ContentFrm in BodyText below the page. -SwLayoutFrm *SwFootnoteBossFrm::FindBodyCont() +/// Searches the first ContentFrame in BodyText below the page. +SwLayoutFrame *SwFootnoteBossFrame::FindBodyCont() { - SwFrm *pLay = Lower(); - while ( pLay && !pLay->IsBodyFrm() ) + SwFrame *pLay = Lower(); + while ( pLay && !pLay->IsBodyFrame() ) pLay = pLay->GetNext(); - return static_cast(pLay); + return static_cast(pLay); } -/// Searches the last ContentFrm in BodyText below the page. -SwContentFrm *SwPageFrm::FindLastBodyContent() +/// Searches the last ContentFrame in BodyText below the page. +SwContentFrame *SwPageFrame::FindLastBodyContent() { - SwContentFrm *pRet = FindFirstBodyContent(); - SwContentFrm *pNxt = pRet; + SwContentFrame *pRet = FindFirstBodyContent(); + SwContentFrame *pNxt = pRet; while ( pNxt && pNxt->IsInDocBody() && IsAnLower( pNxt ) ) { pRet = pNxt; pNxt = pNxt->FindNextCnt(); @@ -55,42 +55,42 @@ SwContentFrm *SwPageFrm::FindLastBodyContent() } /** - * Checks if the frame contains one or more ContentFrm's anywhere in his - * subsidiary structure; if so the first found ContentFrm is returned. + * Checks if the frame contains one or more ContentFrame's anywhere in his + * subsidiary structure; if so the first found ContentFrame is returned. */ -const SwContentFrm *SwLayoutFrm::ContainsContent() const +const SwContentFrame *SwLayoutFrame::ContainsContent() const { //Search downwards the layout leaf and if there is no content, jump to the //next leaf until content is found or we leave "this". //Sections: Content next to sections would not be found this way (empty - //sections directly next to ContentFrm) therefore we need to recursively + //sections directly next to ContentFrame) therefore we need to recursively //search for them even if it's more complex. - const SwLayoutFrm *pLayLeaf = this; + const SwLayoutFrame *pLayLeaf = this; do { - while ( (!pLayLeaf->IsSctFrm() || pLayLeaf == this ) && - pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() ) - pLayLeaf = static_cast(pLayLeaf->Lower()); + while ( (!pLayLeaf->IsSctFrame() || pLayLeaf == this ) && + pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() ) + pLayLeaf = static_cast(pLayLeaf->Lower()); - if( pLayLeaf->IsSctFrm() && pLayLeaf != this ) + if( pLayLeaf->IsSctFrame() && pLayLeaf != this ) { - const SwContentFrm *pCnt = pLayLeaf->ContainsContent(); + const SwContentFrame *pCnt = pLayLeaf->ContainsContent(); if( pCnt ) return pCnt; if( pLayLeaf->GetNext() ) { - if( pLayLeaf->GetNext()->IsLayoutFrm() ) + if( pLayLeaf->GetNext()->IsLayoutFrame() ) { - pLayLeaf = static_cast(pLayLeaf->GetNext()); + pLayLeaf = static_cast(pLayLeaf->GetNext()); continue; } else - return static_cast(pLayLeaf->GetNext()); + return static_cast(pLayLeaf->GetNext()); } } else if ( pLayLeaf->Lower() ) - return static_cast(pLayLeaf->Lower()); + return static_cast(pLayLeaf->Lower()); pLayLeaf = pLayLeaf->GetNextLayoutLeaf(); if( !IsAnLower( pLayLeaf) ) @@ -101,46 +101,46 @@ const SwContentFrm *SwLayoutFrm::ContainsContent() const /** * Calls ContainsAny first to reach the innermost cell. From there we walk back - * up to the first SwCellFrm. Since we use SectionFrms, ContainsContent()->GetUpper() + * up to the first SwCellFrame. Since we use SectionFrames, ContainsContent()->GetUpper() * is not enough anymore. */ -const SwCellFrm *SwLayoutFrm::FirstCell() const +const SwCellFrame *SwLayoutFrame::FirstCell() const { - const SwFrm* pCnt = ContainsAny(); - while( pCnt && !pCnt->IsCellFrm() ) + const SwFrame* pCnt = ContainsAny(); + while( pCnt && !pCnt->IsCellFrame() ) pCnt = pCnt->GetUpper(); - return static_cast(pCnt); + return static_cast(pCnt); } -/** return ContentFrms, sections, and tables. +/** return ContentFrames, sections, and tables. * * @param _bInvestigateFootnoteForSections controls investigation of content of footnotes for sections. * @see ContainsContent */ -const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSections ) const +const SwFrame *SwLayoutFrame::ContainsAny( const bool _bInvestigateFootnoteForSections ) const { //Search downwards the layout leaf and if there is no content, jump to the //next leaf until content is found, we leave "this" or until we found - //a SectionFrm or a TabFrm. + //a SectionFrame or a TabFrame. - const SwLayoutFrm *pLayLeaf = this; - const bool bNoFootnote = IsSctFrm() && !_bInvestigateFootnoteForSections; + const SwLayoutFrame *pLayLeaf = this; + const bool bNoFootnote = IsSctFrame() && !_bInvestigateFootnoteForSections; do { - while ( ( (!pLayLeaf->IsSctFrm() && !pLayLeaf->IsTabFrm()) + while ( ( (!pLayLeaf->IsSctFrame() && !pLayLeaf->IsTabFrame()) || pLayLeaf == this ) && - pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() ) - pLayLeaf = static_cast(pLayLeaf->Lower()); + pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() ) + pLayLeaf = static_cast(pLayLeaf->Lower()); - if( ( pLayLeaf->IsTabFrm() || pLayLeaf->IsSctFrm() ) + if( ( pLayLeaf->IsTabFrame() || pLayLeaf->IsSctFrame() ) && pLayLeaf != this ) { - // Now we also return "deleted" SectionFrms so they can be + // Now we also return "deleted" SectionFrames so they can be // maintained on SaveContent and RestoreContent return pLayLeaf; } else if ( pLayLeaf->Lower() ) - return static_cast(pLayLeaf->Lower()); + return static_cast(pLayLeaf->Lower()); pLayLeaf = pLayLeaf->GetNextLayoutLeaf(); if( bNoFootnote && pLayLeaf && pLayLeaf->IsInFootnote() ) @@ -156,57 +156,57 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSectio return nullptr; } -const SwFrm* SwFrm::GetLower() const +const SwFrame* SwFrame::GetLower() const { - return IsLayoutFrm() ? static_cast(this)->Lower() : nullptr; + return IsLayoutFrame() ? static_cast(this)->Lower() : nullptr; } -SwFrm* SwFrm::GetLower() +SwFrame* SwFrame::GetLower() { - return IsLayoutFrm() ? static_cast(this)->Lower() : nullptr; + return IsLayoutFrame() ? static_cast(this)->Lower() : nullptr; } -SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote ) +SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote ) { - if ( GetPrev() && GetPrev()->IsContentFrm() ) - return static_cast(GetPrev()); + if ( GetPrev() && GetPrev()->IsContentFrame() ) + return static_cast(GetPrev()); else return _FindPrevCnt( _bInSameFootnote ); } -const SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote ) const +const SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote ) const { - if ( GetPrev() && GetPrev()->IsContentFrm() ) - return static_cast(GetPrev()); + if ( GetPrev() && GetPrev()->IsContentFrame() ) + return static_cast(GetPrev()); else - return const_cast(this)->_FindPrevCnt( _bInSameFootnote ); + return const_cast(this)->_FindPrevCnt( _bInSameFootnote ); } -SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote ) +SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) { - if ( mpNext && mpNext->IsContentFrm() ) - return static_cast(mpNext); + if ( mpNext && mpNext->IsContentFrame() ) + return static_cast(mpNext); else return _FindNextCnt( _bInSameFootnote ); } -const SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote ) const +const SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) const { - if ( mpNext && mpNext->IsContentFrm() ) - return static_cast(mpNext); + if ( mpNext && mpNext->IsContentFrame() ) + return static_cast(mpNext); else - return const_cast(this)->_FindNextCnt( _bInSameFootnote ); + return const_cast(this)->_FindNextCnt( _bInSameFootnote ); } -bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const +bool SwLayoutFrame::IsAnLower( const SwFrame *pAssumed ) const { - const SwFrm *pUp = pAssumed; + const SwFrame *pUp = pAssumed; while ( pUp ) { if ( pUp == this ) return true; - if ( pUp->IsFlyFrm() ) - pUp = static_cast(pUp)->GetAnchorFrm(); + if ( pUp->IsFlyFrame() ) + pUp = static_cast(pUp)->GetAnchorFrame(); else pUp = pUp->GetUpper(); } @@ -219,22 +219,22 @@ bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const OD 08.11.2002 - refactoring of pseudo-local method in for #104840#. - @param _aCheckRefLayFrm - constant reference of an instance of class which + @param _aCheckRefLayFrame + constant reference of an instance of class which is used as the reference for the relative position check. @return true, if is positioned before the layout frame

*/ -bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const +bool SwLayoutFrame::IsBefore( const SwLayoutFrame* _pCheckRefLayFrame ) const { - OSL_ENSURE( !IsRootFrm() , " called at a ."); - OSL_ENSURE( !_pCheckRefLayFrm->IsRootFrm() , " called with a ."); + OSL_ENSURE( !IsRootFrame() , " called at a ."); + OSL_ENSURE( !_pCheckRefLayFrame->IsRootFrame() , " called with a ."); bool bReturn; // check, if on different pages - const SwPageFrm *pMyPage = FindPageFrm(); - const SwPageFrm *pCheckRefPage = _pCheckRefLayFrm->FindPageFrm(); + const SwPageFrame *pMyPage = FindPageFrame(); + const SwPageFrame *pCheckRefPage = _pCheckRefLayFrame->FindPageFrame(); if( pMyPage != pCheckRefPage ) { // being on different page as check reference @@ -244,9 +244,9 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const { // being on same page as check reference // --> search my supreme parent , which doesn't contain check reference. - const SwLayoutFrm* pUp = this; + const SwLayoutFrame* pUp = this; while ( pUp->GetUpper() && - !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrm ) + !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrame ) ) pUp = pUp->GetUpper(); if( !pUp->GetUpper() ) @@ -258,11 +258,11 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const { // travel through the next's of and check if one of these // contain the check reference. - const SwLayoutFrm* pUpNext = static_cast(pUp->GetNext()); + const SwLayoutFrame* pUpNext = static_cast(pUp->GetNext()); while ( pUpNext && - !pUpNext->IsAnLower( _pCheckRefLayFrm ) ) + !pUpNext->IsAnLower( _pCheckRefLayFrame ) ) { - pUpNext = static_cast(pUpNext->GetNext()); + pUpNext = static_cast(pUpNext->GetNext()); } bReturn = pUpNext != nullptr; } @@ -273,25 +273,25 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const // Local helper functions for GetNextLayoutLeaf -static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext ) +static const SwFrame* lcl_FindLayoutFrame( const SwFrame* pFrame, bool bNext ) { - const SwFrm* pRet = nullptr; - if ( pFrm->IsFlyFrm() ) - pRet = bNext ? static_cast(pFrm)->GetNextLink() : static_cast(pFrm)->GetPrevLink(); + const SwFrame* pRet = nullptr; + if ( pFrame->IsFlyFrame() ) + pRet = bNext ? static_cast(pFrame)->GetNextLink() : static_cast(pFrame)->GetPrevLink(); else - pRet = bNext ? pFrm->GetNext() : pFrm->GetPrev(); + pRet = bNext ? pFrame->GetNext() : pFrame->GetPrev(); return pRet; } -static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd ) +static const SwFrame* lcl_GetLower( const SwFrame* pFrame, bool bFwd ) { - if ( !pFrm->IsLayoutFrm() ) + if ( !pFrame->IsLayoutFrame() ) return nullptr; return bFwd ? - static_cast(pFrm)->Lower() : - static_cast(pFrm)->GetLastLower(); + static_cast(pFrame)->Lower() : + static_cast(pFrame)->GetLastLower(); } /** @@ -299,30 +299,30 @@ static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd ) * have a lower which is a LayoutFrame. That means, pLower can be 0 or a * content frame. * - * However, pLower may be a TabFrm + * However, pLower may be a TabFrame */ -const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const +const SwLayoutFrame *SwFrame::ImplGetNextLayoutLeaf( bool bFwd ) const { - const SwFrm *pFrm = this; - const SwLayoutFrm *pLayoutFrm = nullptr; - const SwFrm *p = nullptr; + const SwFrame *pFrame = this; + const SwLayoutFrame *pLayoutFrame = nullptr; + const SwFrame *p = nullptr; bool bGoingUp = !bFwd; // false for forward, true for backward do { bool bGoingFwdOrBwd = false; - bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrm, bFwd ) ) ) ); + bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrame, bFwd ) ) ) ); if ( !bGoingDown ) { // I cannot go down, because either I'm currently going up or // because the is no lower. // I'll try to go forward: - bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrm, bFwd ) ) ); + bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrame, bFwd ) ) ); if ( !bGoingFwdOrBwd ) { // I cannot go forward, because there is no next frame. // I'll try to go up: - bGoingUp = (nullptr != (p = pFrm->GetUpper() ) ); + bGoingUp = (nullptr != (p = pFrame->GetUpper() ) ); if ( !bGoingUp ) { // I cannot go up, because there is no upper frame. @@ -334,43 +334,43 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const // If I could not go down or forward, I'll have to go up bGoingUp = !bGoingFwdOrBwd && !bGoingDown; - pFrm = p; - p = lcl_GetLower( pFrm, true ); + pFrame = p; + p = lcl_GetLower( pFrame, true ); - } while( ( p && !p->IsFlowFrm() ) || - pFrm == this || - nullptr == ( pLayoutFrm = pFrm->IsLayoutFrm() ? static_cast(pFrm) : nullptr ) || - pLayoutFrm->IsAnLower( this ) ); + } while( ( p && !p->IsFlowFrame() ) || + pFrame == this || + nullptr == ( pLayoutFrame = pFrame->IsLayoutFrame() ? static_cast(pFrame) : nullptr ) || + pLayoutFrame->IsAnLower( this ) ); - return pLayoutFrm; + return pLayoutFrame; } /** - * Walk back inside the tree: grab the subordinate Frm if one exists and the + * Walk back inside the tree: grab the subordinate Frame if one exists and the * last step was not moving up a level (this would lead to an infinite up/down * loop!). With this we ensure that during walking back we search through all * sub trees. If we walked downwards we have to go to the end of the chain first - * because we go backwards from the last Frm inside another Frm. Walking + * because we go backwards from the last Frame inside another Frame. Walking * forward works the same. * - * @warning fixes here may also need to be applied to the @{lcl_NextFrm} method above + * @warning fixes here may also need to be applied to the @{lcl_NextFrame} method above */ -const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const +const SwContentFrame* SwContentFrame::ImplGetNextContentFrame( bool bFwd ) const { - const SwFrm *pFrm = this; - const SwContentFrm *pContentFrm = nullptr; + const SwFrame *pFrame = this; + const SwContentFrame *pContentFrame = nullptr; bool bGoingUp = false; do { - const SwFrm *p = nullptr; + const SwFrame *p = nullptr; bool bGoingFwdOrBwd = false; - bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrm, true ) ) ) ); + bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrame, true ) ) ) ); if ( !bGoingDown ) { - bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) ); + bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrame, bFwd ) ) ); if ( !bGoingFwdOrBwd ) { - bGoingUp = ( nullptr != ( p = pFrm->GetUpper() ) ); + bGoingUp = ( nullptr != ( p = pFrame->GetUpper() ) ); if ( !bGoingUp ) { return nullptr; @@ -387,161 +387,161 @@ const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const p = p->GetNext(); } - pFrm = p; - } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? static_cast(pFrm) : nullptr) )); + pFrame = p; + } while ( nullptr == (pContentFrame = (pFrame->IsContentFrame() ? static_cast(pFrame) : nullptr) )); - return pContentFrm; + return pContentFrame; } -SwPageFrm* SwFrm::ImplFindPageFrm() +SwPageFrame* SwFrame::ImplFindPageFrame() { - SwFrm *pRet = this; - while ( pRet && !pRet->IsPageFrm() ) + SwFrame *pRet = this; + while ( pRet && !pRet->IsPageFrame() ) { if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) + else if ( pRet->IsFlyFrame() ) { - // #i28701# - use new method - const auto pFly(static_cast(pRet)); - pRet = pFly->GetPageFrm(); + // #i28701# - use new method + const auto pFly(static_cast(pRet)); + pRet = pFly->GetPageFrame(); if (pRet == nullptr) - pRet = pFly->AnchorFrm(); + pRet = pFly->AnchorFrame(); } else return nullptr; } - return static_cast(pRet); + return static_cast(pRet); } -SwFootnoteBossFrm* SwFrm::FindFootnoteBossFrm( bool bFootnotes ) +SwFootnoteBossFrame* SwFrame::FindFootnoteBossFrame( bool bFootnotes ) { - SwFrm *pRet = this; + SwFrame *pRet = this; // Footnote bosses can't exist inside a table; also sections with columns // don't contain footnote texts there if( pRet->IsInTab() ) - pRet = pRet->FindTabFrm(); - while ( pRet && !pRet->IsFootnoteBossFrm() ) + pRet = pRet->FindTabFrame(); + while ( pRet && !pRet->IsFootnoteBossFrame() ) { if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) + else if ( pRet->IsFlyFrame() ) { - // #i28701# - use new method - if ( static_cast(pRet)->GetPageFrm() ) - pRet = static_cast(pRet)->GetPageFrm(); + // #i28701# - use new method + if ( static_cast(pRet)->GetPageFrame() ) + pRet = static_cast(pRet)->GetPageFrame(); else - pRet = static_cast(pRet)->AnchorFrm(); + pRet = static_cast(pRet)->AnchorFrame(); } else return nullptr; } - if( bFootnotes && pRet && pRet->IsColumnFrm() && + if( bFootnotes && pRet && pRet->IsColumnFrame() && !pRet->GetNext() && !pRet->GetPrev() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); - OSL_ENSURE( pSct, "FindFootnoteBossFrm: Single column outside section?" ); + SwSectionFrame* pSct = pRet->FindSctFrame(); + OSL_ENSURE( pSct, "FindFootnoteBossFrame: Single column outside section?" ); if( !pSct->IsFootnoteAtEnd() ) - return pSct->FindFootnoteBossFrm( true ); + return pSct->FindFootnoteBossFrame( true ); } - return static_cast(pRet); + return static_cast(pRet); } -SwTabFrm* SwFrm::ImplFindTabFrm() +SwTabFrame* SwFrame::ImplFindTabFrame() { - SwFrm *pRet = this; - while ( !pRet->IsTabFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsTabFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast(pRet); + return static_cast(pRet); } -SwSectionFrm* SwFrm::ImplFindSctFrm() +SwSectionFrame* SwFrame::ImplFindSctFrame() { - SwFrm *pRet = this; - while ( !pRet->IsSctFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsSctFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast(pRet); + return static_cast(pRet); } -SwFootnoteFrm *SwFrm::ImplFindFootnoteFrm() +SwFootnoteFrame *SwFrame::ImplFindFootnoteFrame() { - SwFrm *pRet = this; - while ( !pRet->IsFootnoteFrm() ) + SwFrame *pRet = this; + while ( !pRet->IsFootnoteFrame() ) { pRet = pRet->GetUpper(); if ( !pRet ) return nullptr; } - return static_cast(pRet); + return static_cast(pRet); } -SwFlyFrm *SwFrm::ImplFindFlyFrm() +SwFlyFrame *SwFrame::ImplFindFlyFrame() { - SwFrm *pRet = this; + SwFrame *pRet = this; do { - if ( pRet->IsFlyFrm() ) - return static_cast(pRet); + if ( pRet->IsFlyFrame() ) + return static_cast(pRet); else pRet = pRet->GetUpper(); } while ( pRet ); return nullptr; } -SwFrm *SwFrm::FindColFrm() +SwFrame *SwFrame::FindColFrame() { - SwFrm *pFrm = this; + SwFrame *pFrame = this; do - { pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsColumnFrm() ); - return pFrm; + { pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsColumnFrame() ); + return pFrame; } -SwRowFrm *SwFrm::FindRowFrm() +SwRowFrame *SwFrame::FindRowFrame() { - SwFrm *pFrm = this; + SwFrame *pFrame = this; do - { pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsRowFrm() ); - return dynamic_cast< SwRowFrm* >( pFrm ); + { pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsRowFrame() ); + return dynamic_cast< SwRowFrame* >( pFrame ); } -SwFrm* SwFrm::FindFooterOrHeader() +SwFrame* SwFrame::FindFooterOrHeader() { - SwFrm* pRet = this; + SwFrame* pRet = this; do { if (pRet->GetType() & FRM_HEADFOOT) //header and footer return pRet; else if ( pRet->GetUpper() ) pRet = pRet->GetUpper(); - else if ( pRet->IsFlyFrm() ) - pRet = static_cast(pRet)->AnchorFrm(); + else if ( pRet->IsFlyFrame() ) + pRet = static_cast(pRet)->AnchorFrame(); else return nullptr; } while ( pRet ); return pRet; } -const SwFootnoteFrm* SwFootnoteContFrm::FindFootNote() const +const SwFootnoteFrame* SwFootnoteContFrame::FindFootNote() const { - const SwFootnoteFrm* pRet = static_cast(Lower()); + const SwFootnoteFrame* pRet = static_cast(Lower()); if( pRet && !pRet->GetAttr()->GetFootnote().IsEndNote() ) return pRet; return nullptr; } -const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const +const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const { - const SwPageFrm* pRet = nullptr; + const SwPageFrame* pRet = nullptr; SwRect aRect; if ( pSize ) @@ -550,15 +550,15 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b aRect.SSize() = *pSize; } - const SwFrm* pPage = Lower(); + const SwFrame* pPage = Lower(); if ( !bExtend ) { - if( !Frm().IsInside( rPt ) ) + if( !Frame().IsInside( rPt ) ) return nullptr; // skip pages above point: - while( pPage && rPt.Y() > pPage->Frm().Bottom() ) + while( pPage && rPt.Y() > pPage->Frame().Bottom() ) pPage = pPage->GetNext(); } @@ -567,12 +567,12 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b while ( pPage && !pRet ) { - const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm(); + const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frame(); if ( (!pSize && rBoundRect.IsInside(rPt)) || (pSize && rBoundRect.IsOver(aRect)) ) { - pRet = static_cast(pPage); + pRet = static_cast(pPage); } pPage = pPage->GetNext(); @@ -581,26 +581,26 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b return pRet; } -bool SwRootFrm::IsBetweenPages(const Point& rPt) const +bool SwRootFrame::IsBetweenPages(const Point& rPt) const { - if (!Frm().IsInside(rPt)) + if (!Frame().IsInside(rPt)) return false; // top visible page - const SwFrm* pPage = Lower(); + const SwFrame* pPage = Lower(); if (pPage == nullptr) return false; // skip pages above point: - while (pPage && rPt.Y() > pPage->Frm().Bottom()) + while (pPage && rPt.Y() > pPage->Frame().Bottom()) pPage = pPage->GetNext(); if (pPage && - rPt.X() >= pPage->Frm().Left() && - rPt.X() <= pPage->Frm().Right()) + rPt.X() >= pPage->Frame().Left() && + rPt.X() <= pPage->Frame().Right()) { // Trivial case when we're right in between. - if (!pPage->Frm().IsInside(rPt)) + if (!pPage->Frame().IsInside(rPt)) return true; // In normal mode the gap is large enough and @@ -612,8 +612,8 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden()) { // If we are really close to the bottom or top of a page. - const auto toEdge = std::min(std::abs(pPage->Frm().Top() - rPt.Y()), - std::abs(pPage->Frm().Bottom() - rPt.Y())); + const auto toEdge = std::min(std::abs(pPage->Frame().Top() - rPt.Y()), + std::abs(pPage->Frame().Bottom() - rPt.Y())); return toEdge <= MmToTwips(2.0); } } @@ -621,46 +621,46 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const return false; } -const SwAttrSet* SwFrm::GetAttrSet() const +const SwAttrSet* SwFrame::GetAttrSet() const { - if ( IsContentFrm() ) - return &static_cast(this)->GetNode()->GetSwAttrSet(); + if ( IsContentFrame() ) + return &static_cast(this)->GetNode()->GetSwAttrSet(); else - return &static_cast(this)->GetFormat()->GetAttrSet(); + return &static_cast(this)->GetFormat()->GetAttrSet(); } //UUUU -drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrm::getSdrAllFillAttributesHelper() const +drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrame::getSdrAllFillAttributesHelper() const { - if(IsContentFrm()) + if(IsContentFrame()) { - return static_cast< const SwContentFrm* >(this)->GetNode()->getSdrAllFillAttributesHelper(); + return static_cast< const SwContentFrame* >(this)->GetNode()->getSdrAllFillAttributesHelper(); } else { - return static_cast< const SwLayoutFrm* >(this)->GetFormat()->getSdrAllFillAttributesHelper(); + return static_cast< const SwLayoutFrame* >(this)->GetFormat()->getSdrAllFillAttributesHelper(); } } -bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const +bool SwFrame::supportsFullDrawingLayerFillAttributeSet() const { - if (IsContentFrm()) + if (IsContentFrame()) { return true; } else { - return static_cast< const SwLayoutFrm* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet(); + return static_cast< const SwLayoutFrame* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet(); } } /* - * SwFrm::_FindNext(), _FindPrev(), InvalidateNextPos() - * _FindNextCnt() visits tables and sections and only returns SwContentFrms. + * SwFrame::_FindNext(), _FindPrev(), InvalidateNextPos() + * _FindNextCnt() visits tables and sections and only returns SwContentFrames. * * Description Invalidates the position of the next frame. - * This is the direct successor or in case of ContentFrms the next - * ContentFrm which sits in the same flow as I do: + * This is the direct successor or in case of ContentFrames the next + * ContentFrame which sits in the same flow as I do: * - body, * - footnote, * - in headers/footers the notification only needs to be forwarded @@ -670,24 +670,24 @@ bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const * - in principle tables behave exactly like the Contents * - sections also */ -// This helper function is an equivalent to the ImplGetNextContentFrm() method, -// besides ContentFrames this function also returns TabFrms and SectionFrms. -static SwFrm* lcl_NextFrm( SwFrm* pFrm ) +// This helper function is an equivalent to the ImplGetNextContentFrame() method, +// besides ContentFrames this function also returns TabFrames and SectionFrames. +static SwFrame* lcl_NextFrame( SwFrame* pFrame ) { - SwFrm *pRet = nullptr; + SwFrame *pRet = nullptr; bool bGoingUp = false; do { - SwFrm *p = nullptr; + SwFrame *p = nullptr; bool bGoingFwd = false; - bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrm->IsLayoutFrm() ? static_cast(pFrm)->Lower() : nullptr))); + bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrame->IsLayoutFrame() ? static_cast(pFrame)->Lower() : nullptr))); if( !bGoingDown ) { - bGoingFwd = (nullptr != (p = ( pFrm->IsFlyFrm() ? static_cast(pFrm)->GetNextLink() : pFrm->GetNext()))); + bGoingFwd = (nullptr != (p = ( pFrame->IsFlyFrame() ? static_cast(pFrame)->GetNextLink() : pFrame->GetNext()))); if ( !bGoingFwd ) { - bGoingUp = (nullptr != (p = pFrm->GetUpper())); + bGoingUp = (nullptr != (p = pFrame->GetUpper())); if ( !bGoingUp ) { return nullptr; @@ -695,69 +695,69 @@ static SwFrm* lcl_NextFrm( SwFrm* pFrm ) } } bGoingUp = !(bGoingFwd || bGoingDown); - pFrm = p; - } while ( nullptr == (pRet = ( ( pFrm->IsContentFrm() || ( !bGoingUp && - ( pFrm->IsTabFrm() || pFrm->IsSctFrm() ) ) )? pFrm : nullptr ) ) ); + pFrame = p; + } while ( nullptr == (pRet = ( ( pFrame->IsContentFrame() || ( !bGoingUp && + ( pFrame->IsTabFrame() || pFrame->IsSctFrame() ) ) )? pFrame : nullptr ) ) ); return pRet; } -SwFrm *SwFrm::_FindNext() +SwFrame *SwFrame::_FindNext() { bool bIgnoreTab = false; - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { //The last Content of the table gets picked up and his follower is //returned. To be able to deactivate the special case for tables //(see below) bIgnoreTab will be set. - if ( static_cast(this)->GetFollow() ) - return static_cast(this)->GetFollow(); + if ( static_cast(this)->GetFollow() ) + return static_cast(this)->GetFollow(); - pThis = static_cast(this)->FindLastContent(); + pThis = static_cast(this)->FindLastContent(); if ( !pThis ) pThis = this; bIgnoreTab = true; } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { //The last Content of the section gets picked and his follower is returned. - if ( static_cast(this)->GetFollow() ) - return static_cast(this)->GetFollow(); + if ( static_cast(this)->GetFollow() ) + return static_cast(this)->GetFollow(); - pThis = static_cast(this)->FindLastContent(); + pThis = static_cast(this)->FindLastContent(); if ( !pThis ) pThis = this; } - else if ( IsContentFrm() ) + else if ( IsContentFrame() ) { - if( static_cast(this)->GetFollow() ) - return static_cast(this)->GetFollow(); + if( static_cast(this)->GetFollow() ) + return static_cast(this)->GetFollow(); } - else if ( IsRowFrm() ) + else if ( IsRowFrame() ) { - SwFrm* pMyUpper = GetUpper(); - if ( pMyUpper->IsTabFrm() && static_cast(pMyUpper)->GetFollow() ) - return static_cast(pMyUpper)->GetFollow()->GetLower(); + SwFrame* pMyUpper = GetUpper(); + if ( pMyUpper->IsTabFrame() && static_cast(pMyUpper)->GetFollow() ) + return static_cast(pMyUpper)->GetFollow()->GetLower(); else return nullptr; } else return nullptr; - SwFrm* pRet = nullptr; + SwFrame* pRet = nullptr; const bool bFootnote = pThis->IsInFootnote(); if ( !bIgnoreTab && pThis->IsInTab() ) { - SwLayoutFrm *pUp = pThis->GetUpper(); - while (pUp && !pUp->IsCellFrm()) + SwLayoutFrame *pUp = pThis->GetUpper(); + while (pUp && !pUp->IsCellFrame()) pUp = pUp->GetUpper(); SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell."); - SwFrm* pNxt = pUp ? static_cast(pUp)->GetFollowCell() : nullptr; + SwFrame* pNxt = pUp ? static_cast(pUp)->GetFollowCell() : nullptr; if ( pNxt ) - pNxt = static_cast(pNxt)->ContainsContent(); + pNxt = static_cast(pNxt)->ContainsContent(); if ( !pNxt ) { - pNxt = lcl_NextFrm( pThis ); + pNxt = lcl_NextFrame( pThis ); if (pUp && pUp->IsAnLower(pNxt)) pRet = pNxt; } @@ -767,7 +767,7 @@ SwFrm *SwFrm::_FindNext() else { const bool bBody = pThis->IsInDocBody(); - SwFrm *pNxtCnt = lcl_NextFrm( pThis ); + SwFrame *pNxtCnt = lcl_NextFrame( pThis ); if ( pNxtCnt ) { if ( bBody || bFootnote ) @@ -777,43 +777,43 @@ SwFrm *SwFrm::_FindNext() // OD 02.04.2003 #108446# - check for endnote, only if found // next content isn't contained in a section, that collect its // endnotes at its end. - bool bEndn = IsInSct() && !IsSctFrm() && + bool bEndn = IsInSct() && !IsSctFrame() && ( !pNxtCnt->IsInSct() || - !pNxtCnt->FindSctFrm()->IsEndnAtEnd() + !pNxtCnt->FindSctFrame()->IsEndnAtEnd() ); if ( ( bBody && pNxtCnt->IsInDocBody() ) || ( pNxtCnt->IsInFootnote() && ( bFootnote || - ( bEndn && pNxtCnt->FindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() ) + ( bEndn && pNxtCnt->FindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() ) ) ) ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; break; } - pNxtCnt = lcl_NextFrm( pNxtCnt ); + pNxtCnt = lcl_NextFrame( pNxtCnt ); } } else if ( pThis->IsInFly() ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; } else //footer-/or header section { - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pNxtCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pNxtCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() && - !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() ) + !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) { - pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm() + pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame() : pNxtCnt; } } @@ -821,7 +821,7 @@ SwFrm *SwFrm::_FindNext() } if( pRet && pRet->IsInSct() ) { - SwSectionFrm* pSct = pRet->FindSctFrm(); + SwSectionFrame* pSct = pRet->FindSctFrame(); //Footnotes in frames with columns must not return the section which //contains the footnote if( !pSct->IsAnLower( this ) && @@ -832,42 +832,42 @@ SwFrm *SwFrm::_FindNext() } // #i27138# - add parameter <_bInSameFootnote> -SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) +SwContentFrame *SwFrame::_FindNextCnt( const bool _bInSameFootnote ) { - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { - if ( static_cast(this)->GetFollow() ) + if ( static_cast(this)->GetFollow() ) { - pThis = static_cast(this)->GetFollow()->ContainsContent(); + pThis = static_cast(this)->GetFollow()->ContainsContent(); if( pThis ) - return static_cast(pThis); + return static_cast(pThis); } - pThis = static_cast(this)->FindLastContent(); + pThis = static_cast(this)->FindLastContent(); if ( !pThis ) return nullptr; } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { - if ( static_cast(this)->GetFollow() ) + if ( static_cast(this)->GetFollow() ) { - pThis = static_cast(this)->GetFollow()->ContainsContent(); + pThis = static_cast(this)->GetFollow()->ContainsContent(); if( pThis ) - return static_cast(pThis); + return static_cast(pThis); } - pThis = static_cast(this)->FindLastContent(); + pThis = static_cast(this)->FindLastContent(); if ( !pThis ) return nullptr; } - else if ( IsContentFrm() && static_cast(this)->GetFollow() ) - return static_cast(this)->GetFollow(); + else if ( IsContentFrame() && static_cast(this)->GetFollow() ) + return static_cast(this)->GetFollow(); - if ( pThis->IsContentFrm() ) + if ( pThis->IsContentFrame() ) { const bool bBody = pThis->IsInDocBody(); const bool bFootnote = pThis->IsInFootnote(); - SwContentFrm *pNxtCnt = static_cast(pThis)->GetNextContentFrm(); + SwContentFrame *pNxtCnt = static_cast(pThis)->GetNextContentFrame(); if ( pNxtCnt ) { // #i27138# @@ -879,7 +879,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) if ( (bBody && pNxtCnt->IsInDocBody()) || (bFootnote && pNxtCnt->IsInFootnote()) ) return pNxtCnt; - pNxtCnt = pNxtCnt->GetNextContentFrm(); + pNxtCnt = pNxtCnt->GetNextContentFrame(); } } // #i27138# @@ -887,25 +887,25 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) { // handling for environments 'each footnote': // Assure that found next content frame belongs to the same footnotes - const SwFootnoteFrm* pFootnoteFrmOfNext( pNxtCnt->FindFootnoteFrm() ); - const SwFootnoteFrm* pFootnoteFrmOfCurr( pThis->FindFootnoteFrm() ); - OSL_ENSURE( pFootnoteFrmOfCurr, - "FindFootnoteFrame() ); + const SwFootnoteFrame* pFootnoteFrameOfCurr( pThis->FindFootnoteFrame() ); + OSL_ENSURE( pFootnoteFrameOfCurr, + "GetFollow() ) + else if ( pFootnoteFrameOfCurr->GetFollow() ) { // next content frame has to be the first content frame // in the follow footnote, which contains a content frame. - SwFootnoteFrm* pFollowFootnoteFrmOfCurr( - const_cast(pFootnoteFrmOfCurr) ); + SwFootnoteFrame* pFollowFootnoteFrameOfCurr( + const_cast(pFootnoteFrameOfCurr) ); pNxtCnt = nullptr; do { - pFollowFootnoteFrmOfCurr = pFollowFootnoteFrmOfCurr->GetFollow(); - pNxtCnt = pFollowFootnoteFrmOfCurr->ContainsContent(); - } while ( !pNxtCnt && pFollowFootnoteFrmOfCurr->GetFollow() ); + pFollowFootnoteFrameOfCurr = pFollowFootnoteFrameOfCurr->GetFollow(); + pNxtCnt = pFollowFootnoteFrameOfCurr->ContainsContent(); + } while ( !pNxtCnt && pFollowFootnoteFrameOfCurr->GetFollow() ); return pNxtCnt; } else @@ -922,13 +922,13 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) else { // handling for environments 'page header' and 'page footer': - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pNxtCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pNxtCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() && - !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() ) + !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) return pNxtCnt; @@ -943,115 +943,115 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote ) OD 2005-11-30 #i27138# */ -SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote ) +SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote ) { - if ( !IsFlowFrm() ) + if ( !IsFlowFrame() ) { // nothing to do, if current frame isn't a flow frame. return nullptr; } - SwContentFrm* pPrevContentFrm( nullptr ); + SwContentFrame* pPrevContentFrame( nullptr ); - // Because method is used to travel + // Because method is used to travel // through the layout, a content frame, at which the travel starts, is needed. - SwContentFrm* pCurrContentFrm = dynamic_cast(this); + SwContentFrame* pCurrContentFrame = dynamic_cast(this); // perform shortcut, if current frame is a follow, and - // determine , if current frame is a table or section frame - if ( pCurrContentFrm && pCurrContentFrm->IsFollow() ) + // determine , if current frame is a table or section frame + if ( pCurrContentFrame && pCurrContentFrame->IsFollow() ) { // previous content frame is its master content frame - pPrevContentFrm = pCurrContentFrm->FindMaster(); + pPrevContentFrame = pCurrContentFrame->FindMaster(); } - else if ( IsTabFrm() ) + else if ( IsTabFrame() ) { - SwTabFrm* pTabFrm( static_cast(this) ); - if ( pTabFrm->IsFollow() ) + SwTabFrame* pTabFrame( static_cast(this) ); + if ( pTabFrame->IsFollow() ) { // previous content frame is the last content of its master table frame - pPrevContentFrm = pTabFrm->FindMaster()->FindLastContent(); + pPrevContentFrame = pTabFrame->FindMaster()->FindLastContent(); } else { // start content frame for the search is the first content frame of // the table frame. - pCurrContentFrm = pTabFrm->ContainsContent(); + pCurrContentFrame = pTabFrame->ContainsContent(); } } - else if ( IsSctFrm() ) + else if ( IsSctFrame() ) { - SwSectionFrm* pSectFrm( static_cast(this) ); - if ( pSectFrm->IsFollow() ) + SwSectionFrame* pSectFrame( static_cast(this) ); + if ( pSectFrame->IsFollow() ) { // previous content frame is the last content of its master section frame - pPrevContentFrm = pSectFrm->FindMaster()->FindLastContent(); + pPrevContentFrame = pSectFrame->FindMaster()->FindLastContent(); } else { // start content frame for the search is the first content frame of // the section frame. - pCurrContentFrm = pSectFrm->ContainsContent(); + pCurrContentFrame = pSectFrame->ContainsContent(); } } // search for next content frame, depending on the environment, in which // the current frame is in. - if ( !pPrevContentFrm && pCurrContentFrm ) + if ( !pPrevContentFrame && pCurrContentFrame ) { - pPrevContentFrm = pCurrContentFrm->GetPrevContentFrm(); - if ( pPrevContentFrm ) + pPrevContentFrame = pCurrContentFrame->GetPrevContentFrame(); + if ( pPrevContentFrame ) { - if ( pCurrContentFrm->IsInFly() ) + if ( pCurrContentFrame->IsInFly() ) { // handling for environments 'unlinked fly frame' and // 'group of linked fly frames': - // Nothing to do, is the one + // Nothing to do, is the one } else { - const bool bInDocBody = pCurrContentFrm->IsInDocBody(); - const bool bInFootnote = pCurrContentFrm->IsInFootnote(); + const bool bInDocBody = pCurrContentFrame->IsInDocBody(); + const bool bInFootnote = pCurrContentFrame->IsInFootnote(); if ( bInDocBody || ( bInFootnote && !_bInSameFootnote ) ) { // handling for environments 'footnotes' and 'document body frames': // Assure that found previous frame is also in one of these // environments. Otherwise, travel further - while ( pPrevContentFrm ) + while ( pPrevContentFrame ) { - if ( ( bInDocBody && pPrevContentFrm->IsInDocBody() ) || - ( bInFootnote && pPrevContentFrm->IsInFootnote() ) ) + if ( ( bInDocBody && pPrevContentFrame->IsInDocBody() ) || + ( bInFootnote && pPrevContentFrame->IsInFootnote() ) ) { break; } - pPrevContentFrm = pPrevContentFrm->GetPrevContentFrm(); + pPrevContentFrame = pPrevContentFrame->GetPrevContentFrame(); } } else if ( bInFootnote && _bInSameFootnote ) { // handling for environments 'each footnote': // Assure that found next content frame belongs to the same footnotes - const SwFootnoteFrm* pFootnoteFrmOfPrev( pPrevContentFrm->FindFootnoteFrm() ); - const SwFootnoteFrm* pFootnoteFrmOfCurr( pCurrContentFrm->FindFootnoteFrm() ); - if ( pFootnoteFrmOfPrev != pFootnoteFrmOfCurr ) + const SwFootnoteFrame* pFootnoteFrameOfPrev( pPrevContentFrame->FindFootnoteFrame() ); + const SwFootnoteFrame* pFootnoteFrameOfCurr( pCurrContentFrame->FindFootnoteFrame() ); + if ( pFootnoteFrameOfPrev != pFootnoteFrameOfCurr ) { - if ( pFootnoteFrmOfCurr->GetMaster() ) + if ( pFootnoteFrameOfCurr->GetMaster() ) { - SwFootnoteFrm* pMasterFootnoteFrmOfCurr( - const_cast(pFootnoteFrmOfCurr) ); - pPrevContentFrm = nullptr; + SwFootnoteFrame* pMasterFootnoteFrameOfCurr( + const_cast(pFootnoteFrameOfCurr) ); + pPrevContentFrame = nullptr; // correct wrong loop-condition do { - pMasterFootnoteFrmOfCurr = pMasterFootnoteFrmOfCurr->GetMaster(); - pPrevContentFrm = pMasterFootnoteFrmOfCurr->FindLastContent(); - } while ( !pPrevContentFrm && - pMasterFootnoteFrmOfCurr->GetMaster() ); + pMasterFootnoteFrameOfCurr = pMasterFootnoteFrameOfCurr->GetMaster(); + pPrevContentFrame = pMasterFootnoteFrameOfCurr->FindLastContent(); + } while ( !pPrevContentFrame && + pMasterFootnoteFrameOfCurr->GetMaster() ); } else { // current content frame is the first content in the // footnote - no previous content exists. - pPrevContentFrm = nullptr; + pPrevContentFrame = nullptr; } } } @@ -1059,55 +1059,55 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote ) { // handling for environments 'page header' and 'page footer': // Assure that found previous frame is also in the same - // page header respectively page footer as - // Note: At this point its clear, that has + // page header respectively page footer as + // Note: At this point its clear, that has // to be inside a page header or page footer and that - // neither nor are + // neither nor are // inside a fly frame. // Thus, method can be used. - OSL_ENSURE( pCurrContentFrm->FindFooterOrHeader(), - " - unknown layout situation: current frame should be in page header or page footer" ); - OSL_ENSURE( !pPrevContentFrm->IsInFly(), - " - unknown layout situation: found previous frame should *not* be inside a fly frame." ); - if ( pPrevContentFrm->FindFooterOrHeader() != - pCurrContentFrm->FindFooterOrHeader() ) + OSL_ENSURE( pCurrContentFrame->FindFooterOrHeader(), + " - unknown layout situation: current frame should be in page header or page footer" ); + OSL_ENSURE( !pPrevContentFrame->IsInFly(), + " - unknown layout situation: found previous frame should *not* be inside a fly frame." ); + if ( pPrevContentFrame->FindFooterOrHeader() != + pCurrContentFrame->FindFooterOrHeader() ) { - pPrevContentFrm = nullptr; + pPrevContentFrame = nullptr; } } } } } - return pPrevContentFrm; + return pPrevContentFrame; } -SwFrm *SwFrm::_FindPrev() +SwFrame *SwFrame::_FindPrev() { bool bIgnoreTab = false; - SwFrm *pThis = this; + SwFrame *pThis = this; - if ( IsTabFrm() ) + if ( IsTabFrame() ) { //The first Content of the table gets picked up and his predecessor is //returned. To be able to deactivate the special case for tables //(see below) bIgnoreTab will be set. - if ( static_cast(this)->IsFollow() ) - return static_cast(this)->FindMaster(); + if ( static_cast(this)->IsFollow() ) + return static_cast(this)->FindMaster(); else - pThis = static_cast(this)->ContainsContent(); + pThis = static_cast(this)->ContainsContent(); bIgnoreTab = true; } - if ( pThis && pThis->IsContentFrm() ) + if ( pThis && pThis->IsContentFrame() ) { - SwContentFrm *pPrvCnt = static_cast(pThis)->GetPrevContentFrm(); + SwContentFrame *pPrvCnt = static_cast(pThis)->GetPrevContentFrame(); if( !pPrvCnt ) return nullptr; if ( !bIgnoreTab && pThis->IsInTab() ) { - SwLayoutFrm *pUp = pThis->GetUpper(); - while (pUp && !pUp->IsCellFrm()) + SwLayoutFrame *pUp = pThis->GetUpper(); + while (pUp && !pUp->IsCellFrame()) pUp = pUp->GetUpper(); SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell."); if (pUp && pUp->IsAnLower(pPrvCnt)) @@ -1115,7 +1115,7 @@ SwFrm *SwFrm::_FindPrev() } else { - SwFrm* pRet; + SwFrame* pRet; const bool bBody = pThis->IsInDocBody(); const bool bFootnote = !bBody && pThis->IsInFootnote(); if ( bBody || bFootnote ) @@ -1125,32 +1125,32 @@ SwFrm *SwFrm::_FindPrev() if ( (bBody && pPrvCnt->IsInDocBody()) || (bFootnote && pPrvCnt->IsInFootnote()) ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast(pPrvCnt); return pRet; } - pPrvCnt = pPrvCnt->GetPrevContentFrm(); + pPrvCnt = pPrvCnt->GetPrevContentFrame(); } } else if ( pThis->IsInFly() ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast(pPrvCnt); return pRet; } else // footer or header or Fly { - const SwFrm *pUp = pThis->GetUpper(); - const SwFrm *pCntUp = pPrvCnt->GetUpper(); + const SwFrame *pUp = pThis->GetUpper(); + const SwFrame *pCntUp = pPrvCnt->GetUpper(); while ( pUp && pUp->GetUpper() && - !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() ) + !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() ) pUp = pUp->GetUpper(); while ( pCntUp && pCntUp->GetUpper() ) pCntUp = pCntUp->GetUpper(); if ( pCntUp == pUp ) { - pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm() - : static_cast(pPrvCnt); + pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame() + : static_cast(pPrvCnt); return pRet; } } @@ -1159,46 +1159,46 @@ SwFrm *SwFrm::_FindPrev() return nullptr; } -void SwFrm::ImplInvalidateNextPos( bool bNoFootnote ) +void SwFrame::ImplInvalidateNextPos( bool bNoFootnote ) { - SwFrm *pFrm; - if ( nullptr != (pFrm = _FindNext()) ) + SwFrame *pFrame; + if ( nullptr != (pFrame = _FindNext()) ) { - if( pFrm->IsSctFrm() ) + if( pFrame->IsSctFrame() ) { - while( pFrm && pFrm->IsSctFrm() ) + while( pFrame && pFrame->IsSctFrame() ) { - if( static_cast(pFrm)->GetSection() ) + if( static_cast(pFrame)->GetSection() ) { - SwFrm* pTmp = static_cast(pFrm)->ContainsAny(); + SwFrame* pTmp = static_cast(pFrame)->ContainsAny(); if( pTmp ) pTmp->InvalidatePos(); else if( !bNoFootnote ) - static_cast(pFrm)->InvalidateFootnotePos(); - if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm ) - pFrm->InvalidatePos(); + static_cast(pFrame)->InvalidateFootnotePos(); + if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame ) + pFrame->InvalidatePos(); return; } - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); } - if( pFrm ) + if( pFrame ) { - if ( pFrm->IsSctFrm()) + if ( pFrame->IsSctFrame()) { // We need to invalidate the section's content so it gets // the chance to flow to a different page. - SwFrm* pTmp = static_cast(pFrm)->ContainsAny(); + SwFrame* pTmp = static_cast(pFrame)->ContainsAny(); if( pTmp ) pTmp->InvalidatePos(); - if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm ) - pFrm->InvalidatePos(); + if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame ) + pFrame->InvalidatePos(); } else - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } else - pFrm->InvalidatePos(); + pFrame->InvalidatePos(); } } @@ -1206,65 +1206,65 @@ void SwFrm::ImplInvalidateNextPos( bool bNoFootnote ) OD 09.01.2004 #i11859# - FME 2004-04-19 #i27145# Moved function from SwTextFrm to SwFrm + FME 2004-04-19 #i27145# Moved function from SwTextFrame to SwFrame */ -void SwFrm::InvalidateNextPrtArea() +void SwFrame::InvalidateNextPrtArea() { // determine next frame - SwFrm* pNextFrm = FindNext(); + SwFrame* pNextFrame = FindNext(); // skip empty section frames and hidden text frames { - while ( pNextFrm && - ( ( pNextFrm->IsSctFrm() && - !static_cast(pNextFrm)->GetSection() ) || - ( pNextFrm->IsTextFrm() && - static_cast(pNextFrm)->IsHiddenNow() ) ) ) + while ( pNextFrame && + ( ( pNextFrame->IsSctFrame() && + !static_cast(pNextFrame)->GetSection() ) || + ( pNextFrame->IsTextFrame() && + static_cast(pNextFrame)->IsHiddenNow() ) ) ) { - pNextFrm = pNextFrm->FindNext(); + pNextFrame = pNextFrame->FindNext(); } } // Invalidate printing area of found next frame - if ( pNextFrm ) + if ( pNextFrame ) { - if ( pNextFrm->IsSctFrm() ) + if ( pNextFrame->IsSctFrame() ) { // Invalidate printing area of found section frame, if // (1) this text frame isn't in a section OR // (2) found section frame isn't a follow of the section frame this // text frame is in. - if ( !IsInSct() || FindSctFrm()->GetFollow() != pNextFrm ) + if ( !IsInSct() || FindSctFrame()->GetFollow() != pNextFrame ) { - pNextFrm->InvalidatePrt(); + pNextFrame->InvalidatePrt(); } // Invalidate printing area of first content in found section. - SwFrm* pFstContentOfSctFrm = - static_cast(pNextFrm)->ContainsAny(); - if ( pFstContentOfSctFrm ) + SwFrame* pFstContentOfSctFrame = + static_cast(pNextFrame)->ContainsAny(); + if ( pFstContentOfSctFrame ) { - pFstContentOfSctFrm->InvalidatePrt(); + pFstContentOfSctFrame->InvalidatePrt(); } } else { - pNextFrm->InvalidatePrt(); + pNextFrame->InvalidatePrt(); } } } /// @returns true if the frame _directly_ sits in a section with columns /// but not if it sits in a table which itself sits in a section with columns. -static bool lcl_IsInColSct( const SwFrm *pUp ) +static bool lcl_IsInColSct( const SwFrame *pUp ) { bool bRet = false; while( pUp ) { - if( pUp->IsColumnFrm() ) + if( pUp->IsColumnFrame() ) bRet = true; - else if( pUp->IsSctFrm() ) + else if( pUp->IsSctFrame() ) return bRet; - else if( pUp->IsTabFrm() ) + else if( pUp->IsTabFrame() ) return false; pUp = pUp->GetUpper(); } @@ -1276,40 +1276,40 @@ static bool lcl_IsInColSct( const SwFrm *pUp ) OD 08.08.2003 #110978# method replaced 'old' method . Determines, if frame is moveable in given environment. if no environment - is given (parameter _pLayoutFrm == 0L), the movability in the actual + is given (parameter _pLayoutFrame == 0L), the movability in the actual environment (GetUpper()) is checked. */ -bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const +bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const { bool bRetVal = false; - if ( !_pLayoutFrm ) + if ( !_pLayoutFrame ) { - _pLayoutFrm = GetUpper(); + _pLayoutFrame = GetUpper(); } - if ( _pLayoutFrm && IsFlowFrm() ) + if ( _pLayoutFrame && IsFlowFrame() ) { - if ( _pLayoutFrm->IsInSct() && lcl_IsInColSct( _pLayoutFrm ) ) + if ( _pLayoutFrame->IsInSct() && lcl_IsInColSct( _pLayoutFrame ) ) { bRetVal = true; } - else if ( _pLayoutFrm->IsInFly() || - _pLayoutFrm->IsInDocBody() || - _pLayoutFrm->IsInFootnote() ) + else if ( _pLayoutFrame->IsInFly() || + _pLayoutFrame->IsInDocBody() || + _pLayoutFrame->IsInFootnote() ) { - if ( _pLayoutFrm->IsInTab() && !IsTabFrm() && - ( !IsContentFrm() || !const_cast(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) ) + if ( _pLayoutFrame->IsInTab() && !IsTabFrame() && + ( !IsContentFrame() || !const_cast(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) ) { bRetVal = false; } else { - if ( _pLayoutFrm->IsInFly() ) + if ( _pLayoutFrame->IsInFly() ) { // if fly frame has a follow (next linked fly frame), // frame is moveable. - if ( const_cast(_pLayoutFrm)->FindFlyFrm()->GetNextLink() ) + if ( const_cast(_pLayoutFrame)->FindFlyFrame()->GetNextLink() ) { bRetVal = true; } @@ -1318,8 +1318,8 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const // if environment is columned, frame is moveable, if // it isn't in last column. // search for column frame - const SwFrm* pCol = _pLayoutFrm; - while ( pCol && !pCol->IsColumnFrm() ) + const SwFrame* pCol = _pLayoutFrame; + while ( pCol && !pCol->IsColumnFrame() ) { pCol = pCol->GetUpper(); } @@ -1341,36 +1341,36 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const return bRetVal; } -void SwFrm::SetInfFlags() +void SwFrame::SetInfFlags() { - if ( !IsFlyFrm() && !GetUpper() ) //not yet pasted, no information available + if ( !IsFlyFrame() && !GetUpper() ) //not yet pasted, no information available return; mbInfInvalid = mbInfBody = mbInfTab = mbInfFly = mbInfFootnote = mbInfSct = false; - SwFrm *pFrm = this; - if( IsFootnoteContFrm() ) + SwFrame *pFrame = this; + if( IsFootnoteContFrame() ) mbInfFootnote = true; do { // mbInfBody is only set in the page body, but not in the column body - if ( pFrm->IsBodyFrm() && !mbInfFootnote && pFrm->GetUpper() - && pFrm->GetUpper()->IsPageFrm() ) + if ( pFrame->IsBodyFrame() && !mbInfFootnote && pFrame->GetUpper() + && pFrame->GetUpper()->IsPageFrame() ) mbInfBody = true; - else if ( pFrm->IsTabFrm() || pFrm->IsCellFrm() ) + else if ( pFrame->IsTabFrame() || pFrame->IsCellFrame() ) { mbInfTab = true; } - else if ( pFrm->IsFlyFrm() ) + else if ( pFrame->IsFlyFrame() ) mbInfFly = true; - else if ( pFrm->IsSctFrm() ) + else if ( pFrame->IsSctFrame() ) mbInfSct = true; - else if ( pFrm->IsFootnoteFrm() ) + else if ( pFrame->IsFootnoteFrame() ) mbInfFootnote = true; - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); - } while ( pFrm && !pFrm->IsPageFrm() ); //there is nothing above the page + } while ( pFrame && !pFrame->IsPageFrame() ); //there is nothing above the page } /** Updates the vertical or the righttoleft-flags. @@ -1378,7 +1378,7 @@ void SwFrm::SetInfFlags() * If the property is derived, it's from the upper or (for fly frames) from * the anchor. Otherwise we've to call a virtual method to check the property. */ -void SwFrm::SetDirFlags( bool bVert ) +void SwFrame::SetDirFlags( bool bVert ) { if( bVert ) { @@ -1386,8 +1386,8 @@ void SwFrm::SetDirFlags( bool bVert ) // vertical flag of upper/anchor is valid. if( mbDerivedVert ) { - const SwFrm* pAsk = IsFlyFrm() ? - static_cast(this)->GetAnchorFrm() : GetUpper(); + const SwFrame* pAsk = IsFlyFrame() ? + static_cast(this)->GetAnchorFrame() : GetUpper(); OSL_ENSURE( pAsk != this, "Autsch! Stack overflow is about to happen" ); @@ -1412,8 +1412,8 @@ void SwFrm::SetDirFlags( bool bVert ) CheckDirection( bVert ); if( mbDerivedR2L ) { - const SwFrm* pAsk = IsFlyFrm() ? - static_cast(this)->GetAnchorFrm() : GetUpper(); + const SwFrame* pAsk = IsFlyFrame() ? + static_cast(this)->GetAnchorFrame() : GetUpper(); OSL_ENSURE( pAsk != this, "Oops! Stack overflow is about to happen" ); @@ -1426,66 +1426,66 @@ void SwFrm::SetDirFlags( bool bVert ) } } -SwLayoutFrm* SwFrm::GetNextCellLeaf( MakePageType ) +SwLayoutFrame* SwFrame::GetNextCellLeaf( MakePageType ) { - SwFrm* pTmpFrm = this; - while (pTmpFrm && !pTmpFrm->IsCellFrm()) - pTmpFrm = pTmpFrm->GetUpper(); + SwFrame* pTmpFrame = this; + while (pTmpFrame && !pTmpFrame->IsCellFrame()) + pTmpFrame = pTmpFrame->GetUpper(); - SAL_WARN_IF(!pTmpFrm, "sw.core", "SwFrm::GetNextCellLeaf() without cell"); - return pTmpFrm ? static_cast(pTmpFrm)->GetFollowCell() : nullptr; + SAL_WARN_IF(!pTmpFrame, "sw.core", "SwFrame::GetNextCellLeaf() without cell"); + return pTmpFrame ? static_cast(pTmpFrame)->GetFollowCell() : nullptr; } -SwLayoutFrm* SwFrm::GetPrevCellLeaf( MakePageType ) +SwLayoutFrame* SwFrame::GetPrevCellLeaf( MakePageType ) { - SwFrm* pTmpFrm = this; - while ( !pTmpFrm->IsCellFrm() ) - pTmpFrm = pTmpFrm->GetUpper(); + SwFrame* pTmpFrame = this; + while ( !pTmpFrame->IsCellFrame() ) + pTmpFrame = pTmpFrame->GetUpper(); - OSL_ENSURE( pTmpFrm, "SwFrm::GetNextPreviousLeaf() without cell" ); - return static_cast(pTmpFrm)->GetPreviousCell(); + OSL_ENSURE( pTmpFrame, "SwFrame::GetNextPreviousLeaf() without cell" ); + return static_cast(pTmpFrame)->GetPreviousCell(); } -static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow, - const SwCellFrm& rOrigCell, - const SwRowFrm& rCorrRow, +static SwCellFrame* lcl_FindCorrespondingCellFrame( const SwRowFrame& rOrigRow, + const SwCellFrame& rOrigCell, + const SwRowFrame& rCorrRow, bool bInFollow ) { - SwCellFrm* pRet = nullptr; - const SwCellFrm* pCell = static_cast(rOrigRow.Lower()); - SwCellFrm* pCorrCell = const_cast(static_cast(rCorrRow.Lower())); + SwCellFrame* pRet = nullptr; + const SwCellFrame* pCell = static_cast(rOrigRow.Lower()); + SwCellFrame* pCorrCell = const_cast(static_cast(rCorrRow.Lower())); while ( pCell != &rOrigCell && !pCell->IsAnLower( &rOrigCell ) ) { - pCell = static_cast(pCell->GetNext()); - pCorrCell = static_cast(pCorrCell->GetNext()); + pCell = static_cast(pCell->GetNext()); + pCorrCell = static_cast(pCorrCell->GetNext()); } - assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrm does not work"); + assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrame does not work"); if ( pCell != &rOrigCell ) { // rOrigCell must be a lower of pCell. We need to recurse into the rows: - assert(pCell->Lower() && pCell->Lower()->IsRowFrm() && - "lcl_FindCorrespondingCellFrm does not work"); + assert(pCell->Lower() && pCell->Lower()->IsRowFrame() && + "lcl_FindCorrespondingCellFrame does not work"); - const SwRowFrm* pRow = static_cast(pCell->Lower()); + const SwRowFrame* pRow = static_cast(pCell->Lower()); while ( !pRow->IsAnLower( &rOrigCell ) ) - pRow = static_cast(pRow->GetNext()); + pRow = static_cast(pRow->GetNext()); - SwRowFrm* pCorrRow = nullptr; + SwRowFrame* pCorrRow = nullptr; if ( bInFollow ) pCorrRow = pRow->GetFollowRow(); else { - SwRowFrm* pTmpRow = static_cast(pCorrCell->GetLastLower()); + SwRowFrame* pTmpRow = static_cast(pCorrCell->GetLastLower()); if ( pTmpRow && pTmpRow->GetFollowRow() == pRow ) pCorrRow = pTmpRow; } if ( pCorrRow ) - pRet = lcl_FindCorrespondingCellFrm( *pRow, rOrigCell, *pCorrRow, bInFollow ); + pRet = lcl_FindCorrespondingCellFrame( *pRow, rOrigCell, *pCorrRow, bInFollow ); } else pRet = pCorrCell; @@ -1494,9 +1494,9 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow, } // VERSION OF GetFollowCell() that assumes that we always have a follow flow line: -SwCellFrm* SwCellFrm::GetFollowCell() const +SwCellFrame* SwCellFrame::GetFollowCell() const { - SwCellFrm* pRet = nullptr; + SwCellFrame* pRet = nullptr; // NEW TABLES // Covered cells do not have follow cells! @@ -1505,19 +1505,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const return nullptr; // find most upper row frame - const SwFrm* pRow = GetUpper(); + const SwFrame* pRow = GetUpper(); - while (pRow && (!pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm())) + while (pRow && (!pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame())) pRow = pRow->GetUpper(); if (!pRow) return nullptr; - const SwTabFrm* pTabFrm = static_cast(pRow->GetUpper()); - if (!pTabFrm || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine()) + const SwTabFrame* pTabFrame = static_cast(pRow->GetUpper()); + if (!pTabFrame || !pTabFrame->GetFollow() || !pTabFrame->HasFollowFlowLine()) return nullptr; - const SwCellFrm* pThisCell = this; + const SwCellFrame* pThisCell = this; // Get last cell of the current table frame that belongs to the rowspan: if ( nRowSpan > 1 ) @@ -1534,19 +1534,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const } } - const SwRowFrm* pFollowRow = nullptr; + const SwRowFrame* pFollowRow = nullptr; if ( !pRow->GetNext() && nullptr != ( pFollowRow = pRow->IsInSplitTableRow() ) && ( !pFollowRow->IsRowSpanLine() || nRowSpan > 1 ) ) - pRet = lcl_FindCorrespondingCellFrm( *static_cast(pRow), *pThisCell, *pFollowRow, true ); + pRet = lcl_FindCorrespondingCellFrame( *static_cast(pRow), *pThisCell, *pFollowRow, true ); return pRet; } // VERSION OF GetPreviousCell() THAT ASSUMES THAT WE ALWAYS HAVE A FFL -SwCellFrm* SwCellFrm::GetPreviousCell() const +SwCellFrame* SwCellFrame::GetPreviousCell() const { - SwCellFrm* pRet = nullptr; + SwCellFrame* pRet = nullptr; // NEW TABLES // Covered cells do not have previous cells! @@ -1554,29 +1554,29 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const return nullptr; // find most upper row frame - const SwFrm* pRow = GetUpper(); - while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = GetUpper(); + while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrm(), "GetPreviousCell without Table" ); + OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrame(), "GetPreviousCell without Table" ); - const SwTabFrm* pTab = static_cast(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast(pRow->GetUpper()); if ( pTab->IsFollow() ) { - const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow(); const bool bIsInFirstLine = ( pTmp == pRow ); if ( bIsInFirstLine ) { - SwTabFrm *pMaster = pTab->FindMaster(); + SwTabFrame *pMaster = pTab->FindMaster(); if ( pMaster && pMaster->HasFollowFlowLine() ) { - SwRowFrm* pMasterRow = static_cast(pMaster->GetLastLower()); + SwRowFrame* pMasterRow = static_cast(pMaster->GetLastLower()); if ( pMasterRow ) - pRet = lcl_FindCorrespondingCellFrm( *static_cast(pRow), *this, *pMasterRow, false ); + pRet = lcl_FindCorrespondingCellFrame( *static_cast(pRow), *this, *pMasterRow, false ); if ( pRet && pRet->GetTabBox()->getRowSpan() < 1 ) - pRet = &const_cast(pRet->FindStartEndOfRowSpanCell( true, true )); + pRet = &const_cast(pRet->FindStartEndOfRowSpanCell( true, true )); } } } @@ -1585,30 +1585,30 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const } // --> NEW TABLES -const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const +const SwCellFrame& SwCellFrame::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const { - const SwCellFrm* pRet = nullptr; + const SwCellFrame* pRet = nullptr; - const SwTabFrm* pTableFrm = dynamic_cast(GetUpper()->GetUpper()); + const SwTabFrame* pTableFrame = dynamic_cast(GetUpper()->GetUpper()); - if ( !bStart && pTableFrm && pTableFrm->IsFollow() && pTableFrm->IsInHeadline( *this ) ) + if ( !bStart && pTableFrame && pTableFrame->IsFollow() && pTableFrame->IsInHeadline( *this ) ) return *this; - OSL_ENSURE( pTableFrm && + OSL_ENSURE( pTableFrame && ( (bStart && GetTabBox()->getRowSpan() < 1) || (!bStart && GetLayoutRowSpan() > 1) ), - "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" ); + "SwCellFrame::FindStartRowSpanCell: No rowspan, no table, no cookies" ); - if ( pTableFrm ) + if ( pTableFrame ) { - const SwTable* pTable = pTableFrm->GetTable(); + const SwTable* pTable = pTableFrame->GetTable(); sal_uInt16 nMax = USHRT_MAX; if ( bCurrentTableOnly ) { - const SwFrm* pCurrentRow = GetUpper(); - const bool bDoNotEnterHeadline = bStart && pTableFrm->IsFollow() && - !pTableFrm->IsInHeadline( *pCurrentRow ); + const SwFrame* pCurrentRow = GetUpper(); + const bool bDoNotEnterHeadline = bStart && pTableFrame->IsFollow() && + !pTableFrame->IsInHeadline( *pCurrentRow ); // check how many rows we are allowed to go up or down until we reach the end of // the current table frame: @@ -1618,8 +1618,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren if ( bStart ) { // do not enter a repeated headline: - if ( bDoNotEnterHeadline && pTableFrm->IsFollow() && - pTableFrm->IsInHeadline( *pCurrentRow->GetPrev() ) ) + if ( bDoNotEnterHeadline && pTableFrame->IsFollow() && + pTableFrame->IsInHeadline( *pCurrentRow->GetPrev() ) ) break; pCurrentRow = pCurrentRow->GetPrev(); @@ -1632,23 +1632,23 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } // By passing the nMax value for Find*OfRowSpan (in case of bCurrentTableOnly - // is set) we assure that we find a rMasterBox that has a SwCellFrm in + // is set) we assure that we find a rMasterBox that has a SwCellFrame in // the current table frame: const SwTableBox& rMasterBox = bStart ? GetTabBox()->FindStartOfRowSpan( *pTable, nMax ) : GetTabBox()->FindEndOfRowSpan( *pTable, nMax ); - SwIterator aIter( *rMasterBox.GetFrameFormat() ); + SwIterator aIter( *rMasterBox.GetFrameFormat() ); - for ( SwCellFrm* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() ) + for ( SwCellFrame* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() ) { if ( pMasterCell->GetTabBox() == &rMasterBox ) { - const SwTabFrm* pMasterTable = static_cast(pMasterCell->GetUpper()->GetUpper()); + const SwTabFrame* pMasterTable = static_cast(pMasterCell->GetUpper()->GetUpper()); if ( bCurrentTableOnly ) { - if ( pMasterTable == pTableFrm ) + if ( pMasterTable == pTableFrame ) { pRet = pMasterCell; break; @@ -1656,9 +1656,9 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } else { - if ( pMasterTable == pTableFrm || - ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) || - (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) ) + if ( pMasterTable == pTableFrame || + ( (bStart && pMasterTable->IsAnFollow(pTableFrame)) || + (!bStart && pTableFrame->IsAnFollow(pMasterTable)) ) ) { pRet = pMasterCell; break; @@ -1668,91 +1668,91 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren } } - assert(pRet && "SwCellFrm::FindStartRowSpanCell: No result"); + assert(pRet && "SwCellFrame::FindStartRowSpanCell: No result"); return *pRet; } // <-- NEW TABLES -const SwRowFrm* SwFrm::IsInSplitTableRow() const +const SwRowFrame* SwFrame::IsInSplitTableRow() const { OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" ); - const SwFrm* pRow = this; + const SwFrame* pRow = this; // find most upper row frame - while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) ) + while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) ) pRow = pRow->GetUpper(); if ( !pRow ) return nullptr; - OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" ); + OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" ); - const SwTabFrm* pTab = static_cast(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast(pRow->GetUpper()); // If most upper row frame is a headline row, the current frame // can't be in a splitted table row. Thus, add corresponding condition. if ( pRow->GetNext() || pTab->GetTable()->IsHeadline( - *(static_cast(pRow)->GetTabLine()) ) || + *(static_cast(pRow)->GetTabLine()) ) || !pTab->HasFollowFlowLine() || !pTab->GetFollow() ) return nullptr; // skip headline - const SwRowFrm* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow(); + const SwRowFrame* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow(); - OSL_ENSURE( pFollowRow, "SwFrm::IsInSplitTableRow() does not work" ); + OSL_ENSURE( pFollowRow, "SwFrame::IsInSplitTableRow() does not work" ); return pFollowRow; } -const SwRowFrm* SwFrm::IsInFollowFlowRow() const +const SwRowFrame* SwFrame::IsInFollowFlowRow() const { OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" ); // find most upper row frame - const SwFrm* pRow = this; - while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) ) + const SwFrame* pRow = this; + while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) ) pRow = pRow->GetUpper(); if ( !pRow ) return nullptr; - OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" ); + OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" ); - const SwTabFrm* pTab = static_cast(pRow->GetUpper()); + const SwTabFrame* pTab = static_cast(pRow->GetUpper()); - const SwTabFrm* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr; + const SwTabFrame* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr; if ( !pMaster || !pMaster->HasFollowFlowLine() ) return nullptr; - const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow(); const bool bIsInFirstLine = ( pTmp == pRow ); if ( !bIsInFirstLine ) return nullptr; - const SwRowFrm* pMasterRow = static_cast(pMaster->GetLastLower()); + const SwRowFrame* pMasterRow = static_cast(pMaster->GetLastLower()); return pMasterRow; } -bool SwFrm::IsInBalancedSection() const +bool SwFrame::IsInBalancedSection() const { bool bRet = false; if ( IsInSct() ) { - const SwSectionFrm* pSectionFrm = FindSctFrm(); - if ( pSectionFrm ) - bRet = pSectionFrm->IsBalancedSection(); + const SwSectionFrame* pSectionFrame = FindSctFrame(); + if ( pSectionFrame ) + bRet = pSectionFrame->IsBalancedSection(); } return bRet; } -const SwFrm* SwLayoutFrm::GetLastLower() const +const SwFrame* SwLayoutFrame::GetLastLower() const { - const SwFrm* pRet = Lower(); + const SwFrame* pRet = Lower(); if ( !pRet ) return nullptr; while ( pRet->GetNext() ) -- cgit