diff options
Diffstat (limited to 'sw/source/core/layout/objectformattertxtfrm.cxx')
-rw-r--r-- | sw/source/core/layout/objectformattertxtfrm.cxx | 352 |
1 files changed, 176 insertions, 176 deletions
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 436cfcbc7bc8..0c5aa4aa6e10 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -36,78 +36,78 @@ using namespace ::com::sun::star; class SwForbidFollowFormat { private: - SwTextFrm& mrTextFrm; + SwTextFrame& mrTextFrame; const bool bOldFollowFormatAllowed; public: - explicit SwForbidFollowFormat( SwTextFrm& _rTextFrm ) - : mrTextFrm( _rTextFrm ), - bOldFollowFormatAllowed( _rTextFrm.FollowFormatAllowed() ) + explicit SwForbidFollowFormat( SwTextFrame& _rTextFrame ) + : mrTextFrame( _rTextFrame ), + bOldFollowFormatAllowed( _rTextFrame.FollowFormatAllowed() ) { - mrTextFrm.ForbidFollowFormat(); + mrTextFrame.ForbidFollowFormat(); } ~SwForbidFollowFormat() { if ( bOldFollowFormatAllowed ) { - mrTextFrm.AllowFollowFormat(); + mrTextFrame.AllowFollowFormat(); } } }; -SwObjectFormatterTextFrm::SwObjectFormatterTextFrm( SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, - SwTextFrm* _pMasterAnchorTextFrm, +SwObjectFormatterTextFrame::SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, + SwTextFrame* _pMasterAnchorTextFrame, SwLayAction* _pLayAction ) - : SwObjectFormatter( _rPageFrm, _pLayAction, true ), - mrAnchorTextFrm( _rAnchorTextFrm ), - mpMasterAnchorTextFrm( _pMasterAnchorTextFrm ) + : SwObjectFormatter( _rPageFrame, _pLayAction, true ), + mrAnchorTextFrame( _rAnchorTextFrame ), + mpMasterAnchorTextFrame( _pMasterAnchorTextFrame ) { } -SwObjectFormatterTextFrm::~SwObjectFormatterTextFrm() +SwObjectFormatterTextFrame::~SwObjectFormatterTextFrame() { } -SwObjectFormatterTextFrm* SwObjectFormatterTextFrm::CreateObjFormatter( - SwTextFrm& _rAnchorTextFrm, - const SwPageFrm& _rPageFrm, +SwObjectFormatterTextFrame* SwObjectFormatterTextFrame::CreateObjFormatter( + SwTextFrame& _rAnchorTextFrame, + const SwPageFrame& _rPageFrame, SwLayAction* _pLayAction ) { - SwObjectFormatterTextFrm* pObjFormatter = nullptr; + SwObjectFormatterTextFrame* pObjFormatter = nullptr; - // determine 'master' of <_rAnchorTextFrm>, if anchor frame is a follow text frame. - SwTextFrm* pMasterOfAnchorFrm = nullptr; - if ( _rAnchorTextFrm.IsFollow() ) + // determine 'master' of <_rAnchorTextFrame>, if anchor frame is a follow text frame. + SwTextFrame* pMasterOfAnchorFrame = nullptr; + if ( _rAnchorTextFrame.IsFollow() ) { - pMasterOfAnchorFrm = _rAnchorTextFrm.FindMaster(); - while ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->IsFollow() ) + pMasterOfAnchorFrame = _rAnchorTextFrame.FindMaster(); + while ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->IsFollow() ) { - pMasterOfAnchorFrm = pMasterOfAnchorFrm->FindMaster(); + pMasterOfAnchorFrame = pMasterOfAnchorFrame->FindMaster(); } } // create object formatter, if floating screen objects are registered // at anchor frame (or at 'master' anchor frame) - if ( _rAnchorTextFrm.GetDrawObjs() || - ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->GetDrawObjs() ) ) + if ( _rAnchorTextFrame.GetDrawObjs() || + ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->GetDrawObjs() ) ) { pObjFormatter = - new SwObjectFormatterTextFrm( _rAnchorTextFrm, _rPageFrm, - pMasterOfAnchorFrm, _pLayAction ); + new SwObjectFormatterTextFrame( _rAnchorTextFrame, _rPageFrame, + pMasterOfAnchorFrame, _pLayAction ); } return pObjFormatter; } -SwFrm& SwObjectFormatterTextFrm::GetAnchorFrm() +SwFrame& SwObjectFormatterTextFrame::GetAnchorFrame() { - return mrAnchorTextFrm; + return mrAnchorTextFrame; } // #i40147# - add parameter <_bCheckForMovedFwd>. -bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, +bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool _bCheckForMovedFwd ) { // check, if only as-character anchored object have to be formatted, and @@ -148,7 +148,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, const bool bRestart = _rAnchoredObj.RestartLayoutProcess() && !( _rAnchoredObj.PositionLocked() && - _rAnchoredObj.GetAnchorFrm()->IsInFly() && + _rAnchoredObj.GetAnchorFrame()->IsInFly() && _rAnchoredObj.GetFrameFormat().GetFollowTextFlow().GetValue() ); if ( bRestart ) { @@ -165,7 +165,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // whose the check of a moved forward anchor frame is requested. // revise decision made for i3317: // anchored objects, whose wrapping style influence is temporarly considered, - // have to be considered in method <SwObjectFormatterTextFrm::DoFormatObjs()> + // have to be considered in method <SwObjectFormatterTextFrame::DoFormatObjs()> if ( bSuccess && _rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() && ( _bCheckForMovedFwd || @@ -178,11 +178,11 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // #i26945# - check conditions for move forward of // anchor text frame // determine, if anchor text frame has previous frame - const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr ); + const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr ); // #i40141# - use new method - it also formats the // section the anchor frame is in. - _FormatAnchorFrmForCheckMoveFwd(); + _FormatAnchorFrameForCheckMoveFwd(); // #i35911# if ( _rAnchoredObj.HasClearedEnvironment() ) @@ -190,49 +190,49 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, _rAnchoredObj.SetClearedEnvironment( true ); // #i44049# - consider, that anchor frame // could already been marked to move forward. - SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() ); - if ( pAnchorPageFrm != _rAnchoredObj.GetPageFrm() ) + SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() ); + if ( pAnchorPageFrame != _rAnchoredObj.GetPageFrame() ) { bool bInsert( true ); sal_uInt32 nToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nToPageNum ) ) { - if ( nToPageNum < pAnchorPageFrm->GetPhyPageNum() ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + if ( nToPageNum < pAnchorPageFrame->GetPhyPageNum() ) + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } if ( bInsert ) { - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, - pAnchorPageFrm->GetPhyPageNum() ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, + pAnchorPageFrame->GetPhyPageNum() ); + mrAnchorTextFrame.InvalidatePos(); bSuccess = false; _InvalidatePrevObjs( _rAnchoredObj ); _InvalidateFollowObjs( _rAnchoredObj, true ); } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } - else if ( !mrAnchorTextFrm.IsFollow() && bDoesAnchorHadPrev ) + else if ( !mrAnchorTextFrame.IsFollow() && bDoesAnchorHadPrev ) { // index of anchored object in collection of page numbers and // anchor types sal_uInt32 nIdx( CountOfCollected() ); OSL_ENSURE( nIdx > 0, - "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchored object not collected!?" ); + "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchored object not collected!?" ); --nIdx; sal_uInt32 nToPageNum( 0L ); // #i43913# bool bDummy( false ); // #i58182# - consider new method signature - if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( nIdx ), + if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( nIdx ), GetPgNumOfCollected( nIdx ), IsCollectedAnchoredAtMaster( nIdx ), nToPageNum, bDummy ) ) @@ -241,12 +241,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, // could already been marked to move forward. bool bInsert( true ); sal_uInt32 nMovedFwdToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) ) { if ( nMovedFwdToPageNum < nToPageNum ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } @@ -254,9 +254,9 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, { // Indicate that anchor text frame has to move forward and // invalidate its position to force a re-format. - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, nToPageNum ); - mrAnchorTextFrm.InvalidatePos(); + mrAnchorTextFrame.InvalidatePos(); // Indicate restart of the layout process bSuccess = false; @@ -271,19 +271,19 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" ); } } } // i40155# - mark anchor frame not to wrap around // objects under the condition, that its follow contains all its text. - else if ( !mrAnchorTextFrm.IsFollow() && - mrAnchorTextFrm.GetFollow() && - mrAnchorTextFrm.GetFollow()->GetOfst() == 0 ) + else if ( !mrAnchorTextFrame.IsFollow() && + mrAnchorTextFrame.GetFollow() && + mrAnchorTextFrame.GetFollow()->GetOfst() == 0 ) { - SwLayouter::RemoveMovedFwdFrm( - *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()), - mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( + *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()), + mrAnchorTextFrame ); } } } @@ -291,12 +291,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj, return bSuccess; } -bool SwObjectFormatterTextFrm::DoFormatObjs() +bool SwObjectFormatterTextFrame::DoFormatObjs() { - if ( !mrAnchorTextFrm.IsValid() ) + if ( !mrAnchorTextFrame.IsValid() ) { if ( GetLayAction() && - mrAnchorTextFrm.FindPageFrm() != &GetPageFrm() ) + mrAnchorTextFrame.FindPageFrame() != &GetPageFrame() ) { // notify layout action, thus is can restart the layout process on // a previous page. @@ -305,7 +305,7 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() else { // the anchor text frame has to be valid, thus assert. - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs()> called for invalidate anchor text frame." ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs()> called for invalidate anchor text frame." ); } return false; @@ -313,37 +313,37 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() bool bSuccess( true ); - if ( mrAnchorTextFrm.IsFollow() ) + if ( mrAnchorTextFrame.IsFollow() ) { // Only floating screen objects anchored as-character are directly // registered at a follow text frame. The other floating screen objects // are registered at the 'master' anchor text frame. // Thus, format the other floating screen objects through the 'master' // anchor text frame - OSL_ENSURE( mpMasterAnchorTextFrm, - "SwObjectFormatterTextFrm::DoFormatObjs() - missing 'master' anchor text frame" ); - bSuccess = _FormatObjsAtFrm( mpMasterAnchorTextFrm ); + OSL_ENSURE( mpMasterAnchorTextFrame, + "SwObjectFormatterTextFrame::DoFormatObjs() - missing 'master' anchor text frame" ); + bSuccess = _FormatObjsAtFrame( mpMasterAnchorTextFrame ); if ( bSuccess ) { // format of as-character anchored floating screen objects - no failure // excepted on the format of these objects. - bSuccess = _FormatObjsAtFrm(); + bSuccess = _FormatObjsAtFrame(); } } else { - bSuccess = _FormatObjsAtFrm(); + bSuccess = _FormatObjsAtFrame(); } // consider anchored objects, whose wrapping style influence are temporarly // considered. if ( bSuccess && ( ConsiderWrapOnObjPos() || - ( !mrAnchorTextFrm.IsFollow() && + ( !mrAnchorTextFrame.IsFollow() && _AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) ) { - const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr ); + const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr ); // Format anchor text frame after its objects are formatted. // Note: The format of the anchor frame also formats the invalid @@ -352,13 +352,13 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() // anchor frame for the following check for moved forward anchors // #i40141# - use new method - it also formats the // section the anchor frame is in. - _FormatAnchorFrmForCheckMoveFwd(); + _FormatAnchorFrameForCheckMoveFwd(); sal_uInt32 nToPageNum( 0L ); // #i43913# bool bInFollow( false ); SwAnchoredObject* pObj = nullptr; - if ( !mrAnchorTextFrm.IsFollow() ) + if ( !mrAnchorTextFrame.IsFollow() ) { pObj = _GetFirstObjWithMovedFwdAnchor( // #i35017# - constant name has changed @@ -371,35 +371,35 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() pObj->SetClearedEnvironment( true ); // #i44049# - consider, that anchor frame // could already been marked to move forward. - SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() ); + SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() ); // #i43913# - consider, that anchor frame // is a follow or is in a follow row, which will move forward. - if ( pAnchorPageFrm != pObj->GetPageFrm() || + if ( pAnchorPageFrame != pObj->GetPageFrame() || bInFollow ) { bool bInsert( true ); sal_uInt32 nTmpToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nTmpToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nTmpToPageNum ) ) { - if ( nTmpToPageNum < pAnchorPageFrm->GetPhyPageNum() ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + if ( nTmpToPageNum < pAnchorPageFrame->GetPhyPageNum() ) + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } if ( bInsert ) { - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, - pAnchorPageFrm->GetPhyPageNum() ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, + pAnchorPageFrame->GetPhyPageNum() ); + mrAnchorTextFrame.InvalidatePos(); bSuccess = false; _InvalidatePrevObjs( *pObj ); _InvalidateFollowObjs( *pObj, true ); } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } } @@ -411,12 +411,12 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() // could already been marked to move forward. bool bInsert( true ); sal_uInt32 nMovedFwdToPageNum( 0L ); - const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc()); - if ( SwLayouter::FrmMovedFwdByObjPos( - rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) ) + const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc()); + if ( SwLayouter::FrameMovedFwdByObjPos( + rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) ) { if ( nMovedFwdToPageNum < nToPageNum ) - SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame ); else bInsert = false; } @@ -424,8 +424,8 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() { // Indicate that anchor text frame has to move forward and // invalidate its position to force a re-format. - SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, nToPageNum ); - mrAnchorTextFrm.InvalidatePos(); + SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, nToPageNum ); + mrAnchorTextFrame.InvalidatePos(); // Indicate restart of the layout process bSuccess = false; @@ -440,25 +440,25 @@ bool SwObjectFormatterTextFrm::DoFormatObjs() } else { - OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" ); + OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" ); } } // #i40155# - mark anchor frame not to wrap around // objects under the condition, that its follow contains all its text. - else if ( !mrAnchorTextFrm.IsFollow() && - mrAnchorTextFrm.GetFollow() && - mrAnchorTextFrm.GetFollow()->GetOfst() == 0 ) + else if ( !mrAnchorTextFrame.IsFollow() && + mrAnchorTextFrame.GetFollow() && + mrAnchorTextFrame.GetFollow()->GetOfst() == 0 ) { - SwLayouter::RemoveMovedFwdFrm( - *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()), - mrAnchorTextFrm ); + SwLayouter::RemoveMovedFwdFrame( + *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()), + mrAnchorTextFrame ); } } return bSuccess; } -void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj ) +void SwObjectFormatterTextFrame::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj ) { // invalidate all previous objects, whose wrapping influence on the object // positioning is <NONE_CONCURRENT_POSITIONED>. @@ -469,7 +469,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored // #i35017# - constant name has changed text::WrapInfluenceOnPosition::ONCE_CONCURRENT ) { - const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs(); if ( pObjs ) { // determine start index @@ -491,7 +491,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored } } -void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj, +void SwObjectFormatterTextFrame::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj, const bool _bInclObj ) { if ( _bInclObj ) @@ -499,7 +499,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor _rAnchoredObj.InvalidateObjPosForConsiderWrapInfluence( true ); } - const SwSortedObjs* pObjs = GetPageFrm().GetSortedObjs(); + const SwSortedObjs* pObjs = GetPageFrame().GetSortedObjs(); if ( pObjs ) { // determine start index @@ -511,7 +511,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor } } -SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( +SwAnchoredObject* SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor( const sal_Int16 _nWrapInfluenceOnPosition, sal_uInt32& _noToPageNum, bool& _boInFollow ) @@ -519,7 +519,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i35017# - constant names have changed OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE || _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT, - "<SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" ); + "<SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" ); SwAnchoredObject* pRetAnchoredObj = nullptr; @@ -535,7 +535,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i26945# - use new method <_CheckMovedFwdCondition(..)> // #i43913# // #i58182# - consider new method signature - if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( i ), + if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( i ), GetPgNumOfCollected( i ), IsCollectedAnchoredAtMaster( i ), _noToPageNum, _boInFollow ) ) @@ -551,7 +551,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor( // #i58182# // - replace private method by corresponding static public method -bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( +bool SwObjectFormatterTextFrame::CheckMovedFwdCondition( SwAnchoredObject& _rAnchoredObj, const sal_uInt32 _nFromPageNum, const bool _bAnchoredAtMasterBeforeFormatAnchor, @@ -560,10 +560,10 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( { bool bAnchorIsMovedForward( false ); - SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor(); - if ( pPageFrmOfAnchor ) + SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor(); + if ( pPageFrameOfAnchor ) { - const sal_uInt32 nPageNum = pPageFrmOfAnchor->GetPhyPageNum(); + const sal_uInt32 nPageNum = pPageFrameOfAnchor->GetPhyPageNum(); if ( nPageNum > _nFromPageNum ) { _noToPageNum = nPageNum; @@ -575,9 +575,9 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( // than 1. if ( _noToPageNum > (_nFromPageNum + 1) ) { - SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos(); - if ( pAnchorFrm->IsInTab() && - pAnchorFrm->IsInFollowFlowRow() ) + SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos(); + if ( pAnchorFrame->IsInTab() && + pAnchorFrame->IsInFollowFlowRow() ) { _noToPageNum = _nFromPageNum + 1; } @@ -595,20 +595,20 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( ((_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR) || (_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_PARA))) { - SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos(); - OSL_ENSURE( pAnchorFrm->IsTextFrm(), - "<SwObjectFormatterTextFrm::CheckMovedFwdCondition(..) - wrong type of anchor frame>" ); - SwTextFrm* pAnchorTextFrm = static_cast<SwTextFrm*>(pAnchorFrm); + SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos(); + OSL_ENSURE( pAnchorFrame->IsTextFrame(), + "<SwObjectFormatterTextFrame::CheckMovedFwdCondition(..) - wrong type of anchor frame>" ); + SwTextFrame* pAnchorTextFrame = static_cast<SwTextFrame*>(pAnchorFrame); bool bCheck( false ); - if ( pAnchorTextFrm->IsFollow() ) + if ( pAnchorTextFrame->IsFollow() ) { bCheck = true; } - else if( pAnchorTextFrm->IsInTab() ) + else if( pAnchorTextFrame->IsInTab() ) { - const SwRowFrm* pMasterRow = pAnchorTextFrm->IsInFollowFlowRow(); + const SwRowFrame* pMasterRow = pAnchorTextFrame->IsInFollowFlowRow(); if ( pMasterRow && - pMasterRow->FindPageFrm() == pPageFrmOfAnchor ) + pMasterRow->FindPageFrame() == pPageFrameOfAnchor ) { bCheck = true; } @@ -617,12 +617,12 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( { // check, if found text frame will be on the next page // by checking, if it's in a column, which has no next. - SwFrm* pColFrm = pAnchorTextFrm->FindColFrm(); - while ( pColFrm && !pColFrm->GetNext() ) + SwFrame* pColFrame = pAnchorTextFrame->FindColFrame(); + while ( pColFrame && !pColFrame->GetNext() ) { - pColFrm = pColFrm->FindColFrm(); + pColFrame = pColFrame->FindColFrame(); } - if ( !pColFrm || !pColFrm->GetNext() ) + if ( !pColFrame || !pColFrame->GetNext() ) { _noToPageNum = _nFromPageNum + 1; bAnchorIsMovedForward = true; @@ -636,26 +636,26 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition( } // #i40140# - helper method to format layout frames used by -// method <SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd()> +// method <SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd()> // #i44049# - format till a certain lower frame, if provided. -static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm, - SwFrm* pLastLowerFrm = nullptr ) +static void lcl_FormatContentOfLayoutFrame( SwLayoutFrame* pLayFrame, + SwFrame* pLastLowerFrame = nullptr ) { - SwFrm* pLowerFrm = pLayFrm->GetLower(); - while ( pLowerFrm ) + SwFrame* pLowerFrame = pLayFrame->GetLower(); + while ( pLowerFrame ) { // #i44049# - if ( pLastLowerFrm && pLowerFrm == pLastLowerFrm ) + if ( pLastLowerFrame && pLowerFrame == pLastLowerFrame ) { break; } - if ( pLowerFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pLowerFrm), - pLastLowerFrm ); + if ( pLowerFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pLowerFrame), + pLastLowerFrame ); else - pLowerFrm->Calc(pLowerFrm->getRootFrm()->GetCurrShell()->GetOut()); + pLowerFrame->Calc(pLowerFrame->getRootFrame()->GetCurrShell()->GetOut()); - pLowerFrm = pLowerFrm->GetNext(); + pLowerFrame = pLowerFrame->GetNext(); } } @@ -667,90 +667,90 @@ static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm, to format the frames, which have become invalid due to the anchored object formatting in the iterative object positioning algorithm */ -void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTextFrm ) +void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame ) { // #i47014# - no format of section and previous columns // for follow text frames. - if ( !_rAnchorTextFrm.IsFollow() ) + if ( !_rAnchorTextFrame.IsFollow() ) { // if anchor frame is directly inside a section, format this section and // its previous frames. // Note: It's a very simple format without formatting objects. - if ( _rAnchorTextFrm.IsInSct() ) + if ( _rAnchorTextFrame.IsInSct() ) { - SwFrm* pSectFrm = _rAnchorTextFrm.GetUpper(); - while ( pSectFrm ) + SwFrame* pSectFrame = _rAnchorTextFrame.GetUpper(); + while ( pSectFrame ) { - if ( pSectFrm->IsSctFrm() || pSectFrm->IsCellFrm() ) + if ( pSectFrame->IsSctFrame() || pSectFrame->IsCellFrame() ) { break; } - pSectFrm = pSectFrm->GetUpper(); + pSectFrame = pSectFrame->GetUpper(); } - if ( pSectFrm && pSectFrm->IsSctFrm() ) + if ( pSectFrame && pSectFrame->IsSctFrame() ) { // #i44049# - _rAnchorTextFrm.LockJoin(); - SwFrm* pFrm = pSectFrm->GetUpper()->GetLower(); + _rAnchorTextFrame.LockJoin(); + SwFrame* pFrame = pSectFrame->GetUpper()->GetLower(); // #i49605# - section frame could move forward // by the format of its previous frame. - // Thus, check for valid <pFrm>. - while ( pFrm && pFrm != pSectFrm ) + // Thus, check for valid <pFrame>. + while ( pFrame && pFrame != pSectFrame ) { - if ( pFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) ); + if ( pFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) ); else - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pSectFrm), - &_rAnchorTextFrm ); + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pSectFrame), + &_rAnchorTextFrame ); // #i44049# - _rAnchorTextFrm.UnlockJoin(); + _rAnchorTextFrame.UnlockJoin(); } } // #i40140# - if anchor frame is inside a column, // format the content of the previous columns. // Note: It's a very simple format without formatting objects. - SwFrm* pColFrmOfAnchor = _rAnchorTextFrm.FindColFrm(); - if ( pColFrmOfAnchor ) + SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame(); + if ( pColFrameOfAnchor ) { // #i44049# - _rAnchorTextFrm.LockJoin(); - SwFrm* pColFrm = pColFrmOfAnchor->GetUpper()->GetLower(); - while ( pColFrm != pColFrmOfAnchor ) + _rAnchorTextFrame.LockJoin(); + SwFrame* pColFrame = pColFrameOfAnchor->GetUpper()->GetLower(); + while ( pColFrame != pColFrameOfAnchor ) { - SwFrm* pFrm = pColFrm->GetLower(); - while ( pFrm ) + SwFrame* pFrame = pColFrame->GetLower(); + while ( pFrame ) { - if ( pFrm->IsLayoutFrm() ) - lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) ); + if ( pFrame->IsLayoutFrame() ) + lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) ); else - pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut()); + pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut()); - pFrm = pFrm->GetNext(); + pFrame = pFrame->GetNext(); } - pColFrm = pColFrm->GetNext(); + pColFrame = pColFrame->GetNext(); } // #i44049# - _rAnchorTextFrm.UnlockJoin(); + _rAnchorTextFrame.UnlockJoin(); } } // format anchor frame - format of its follow not needed // #i43255# - forbid follow format, only if anchor text // frame is in table - if ( _rAnchorTextFrm.IsInTab() ) + if ( _rAnchorTextFrame.IsInTab() ) { - SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrm ); - _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut()); + SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrame ); + _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut()); } else { - _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut()); + _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut()); } } @@ -758,19 +758,19 @@ void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTe #i40141# */ -void SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd() +void SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd() { - SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( mrAnchorTextFrm ); + SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( mrAnchorTextFrame ); } /** method to determine if at least one anchored object has state <temporarly consider wrapping style influence> set. */ -bool SwObjectFormatterTextFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence() +bool SwObjectFormatterTextFrame::_AtLeastOneObjIsTmpConsiderWrapInfluence() { bool bRet( false ); - const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs(); + const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs(); if ( pObjs && pObjs->size() > 1 ) { for ( size_t i = 0; i < pObjs->size(); ++i ) |