diff options
Diffstat (limited to 'sw/source/core/frmedt')
-rw-r--r-- | sw/source/core/frmedt/fecopy.cxx | 188 | ||||
-rw-r--r-- | sw/source/core/frmedt/fedesc.cxx | 74 | ||||
-rw-r--r-- | sw/source/core/frmedt/fefly1.cxx | 446 | ||||
-rw-r--r-- | sw/source/core/frmedt/feflyole.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 512 | ||||
-rw-r--r-- | sw/source/core/frmedt/fetab.cxx | 732 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 528 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 900 |
8 files changed, 1698 insertions, 1698 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index f82afebe55b8..55ece42fad2f 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -123,10 +123,10 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) bool bRet; // do we want to copy a FlyFrame? - if( IsFrmSelected() ) + if( IsFrameSelected() ) { // get the FlyFormat - SwFlyFrm* pFly = GetSelectedFlyFrm(); + SwFlyFrame* pFly = GetSelectedFlyFrame(); SwFrameFormat* pFlyFormat = pFly->GetFormat(); SwFormatAnchor aAnchor( pFlyFormat->GetAnchor() ); @@ -226,30 +226,30 @@ bool SwFEShell::Copy( SwDoc* pClpDoc, const OUString* pNewClpText ) return bRet; } -static const Point &lcl_FindBasePos( const SwFrm *pFrm, const Point &rPt ) +static const Point &lcl_FindBasePos( const SwFrame *pFrame, const Point &rPt ) { - const SwFrm *pF = pFrm; - while ( pF && !pF->Frm().IsInside( rPt ) ) + const SwFrame *pF = pFrame; + while ( pF && !pF->Frame().IsInside( rPt ) ) { - if ( pF->IsContentFrm() ) - pF = static_cast<const SwContentFrm*>(pF)->GetFollow(); + if ( pF->IsContentFrame() ) + pF = static_cast<const SwContentFrame*>(pF)->GetFollow(); else pF = nullptr; } if ( pF ) - return pF->Frm().Pos(); + return pF->Frame().Pos(); else - return pFrm->Frm().Pos(); + return pFrame->Frame().Pos(); } -static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* pFly, +static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrame* pFly, const Point& rInsPt, SwFEShell& rDestShell, SwFormatAnchor& rAnchor, Point& rNewPos, bool bCheckFlyRecur ) { bool bRet = true; rAnchor.SetAnchor( &rPos ); - SwContentFrm* pTmpFrm = rNd.GetContentNode()->getLayoutFrm( rDestShell.GetLayout(), &rInsPt, nullptr, false ); - SwFlyFrm *pTmpFly = pTmpFrm->FindFlyFrm(); + SwContentFrame* pTmpFrame = rNd.GetContentNode()->getLayoutFrame( rDestShell.GetLayout(), &rInsPt, nullptr, false ); + SwFlyFrame *pTmpFly = pTmpFrame->FindFlyFrame(); if( pTmpFly && bCheckFlyRecur && pFly->IsUpperOf( *pTmpFly ) ) { bRet = false; @@ -261,18 +261,18 @@ static bool lcl_SetAnchor( const SwPosition& rPos, const SwNode& rNd, SwFlyFrm* const SwNodeIndex& rIdx = *pTmpFly->GetFormat()->GetContent().GetContentIdx(); SwPosition aPos( rIdx ); rAnchor.SetAnchor( &aPos ); - rNewPos = pTmpFly->Frm().Pos(); + rNewPos = pTmpFly->Frame().Pos(); } else { rAnchor.SetType( FLY_AT_PAGE ); rAnchor.SetPageNum( rDestShell.GetPageNumber( rInsPt ) ); - const SwFrm *pPg = pTmpFrm->FindPageFrm(); - rNewPos = pPg->Frm().Pos(); + const SwFrame *pPg = pTmpFrame->FindPageFrame(); + rNewPos = pPg->Frame().Pos(); } } else - rNewPos = ::lcl_FindBasePos( pTmpFrm, rInsPt ); + rNewPos = ::lcl_FindBasePos( pTmpFrame, rInsPt ); return bRet; } @@ -337,11 +337,11 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? Then request the position // from the passed DocumentPosition - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); aPt -= rSttPt - pObj->GetSnapRect().TopLeft(); - SwCrsrMoveState aState( MV_SETONLYTEXT ); - GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); + SwCursorMoveState aState( MV_SETONLYTEXT ); + GetLayout()->GetCursorOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) bRet = false; @@ -351,12 +351,12 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, } else { - SwPaM *pCrsr = pDestShell->GetCrsr(); - if( pCrsr->GetNode().IsNoTextNode() ) + SwPaM *pCursor = pDestShell->GetCursor(); + if( pCursor->GetNode().IsNoTextNode() ) bRet = false; else - bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), - pCrsr->GetNode(), nullptr, rInsPt, + bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), + pCursor->GetNode(), nullptr, rInsPt, *pDestShell, aAnchor, aNewAnch, false ); } @@ -364,10 +364,10 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); - const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); - const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); + const SwRootFrame* pTmpRoot = pDestShell->GetLayout(); + const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); if ( pPg ) - aNewAnch = pPg->Frm().Pos(); + aNewAnch = pPg->Frame().Pos(); } if( bRet ) @@ -379,7 +379,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt, aSet.Put( aAnchor ); SdrObject* pNew = pDestDoc->CloneSdrObj( *pObj, bIsMove && GetDoc() == pDestDoc ); - pFormat = pDestDoc->getIDocumentContentOperations().InsertDrawObj( *pDestShell->GetCrsr(), *pNew, aSet ); + pFormat = pDestDoc->getIDocumentContentOperations().InsertDrawObj( *pDestShell->GetCursor(), *pNew, aSet ); } else pFormat = pDestDoc->getIDocumentLayoutAccess().CopyLayoutFormat( *pFormat, aAnchor, true, true ); @@ -465,9 +465,9 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // (individual boxes in the area are retrieved via the layout) SwFieldType* pTableFieldTyp = pDestShell->GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( RES_TABLEFLD ); - if( IsFrmSelected() ) + if( IsFrameSelected() ) { - SwFlyFrm* pFly = GetSelectedFlyFrm(); + SwFlyFrame* pFly = GetSelectedFlyFrame(); SwFrameFormat* pFlyFormat = pFly->GetFormat(); SwFormatAnchor aAnchor( pFlyFormat->GetAnchor() ); bRet = true; @@ -482,11 +482,11 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? Then request the position // from the passed DocumentPosition - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - aPt -= rSttPt - pFly->Frm().Pos(); - SwCrsrMoveState aState( MV_SETONLYTEXT ); - GetLayout()->GetCrsrOfst( &aPos, aPt, &aState ); + aPt -= rSttPt - pFly->Frame().Pos(); + SwCursorMoveState aState( MV_SETONLYTEXT ); + GetLayout()->GetCursorOfst( &aPos, aPt, &aState ); const SwNode *pNd; if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) bRet = false; @@ -506,11 +506,11 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, } else { - const SwPaM *pCrsr = pDestShell->GetCrsr(); - if( pCrsr->GetNode().IsNoTextNode() ) + const SwPaM *pCursor = pDestShell->GetCursor(); + if( pCursor->GetNode().IsNoTextNode() ) bRet = false; else - bRet = ::lcl_SetAnchor( *pCrsr->GetPoint(), pCrsr->GetNode(), + bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), pCursor->GetNode(), pFly, rInsPt, *pDestShell, aAnchor, aNewAnch, GetDoc() == pDestShell->GetDoc()); } @@ -518,10 +518,10 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, else if ( FLY_AT_PAGE == aAnchor.GetAnchorId() ) { aAnchor.SetPageNum( pDestShell->GetPageNumber( rInsPt ) ); - const SwRootFrm* pTmpRoot = pDestShell->GetLayout(); - const SwFrm* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); + const SwRootFrame* pTmpRoot = pDestShell->GetLayout(); + const SwFrame* pPg = pTmpRoot->GetPageAtPos( rInsPt, nullptr, true ); if ( pPg ) - aNewAnch = pPg->Frm().Pos(); + aNewAnch = pPg->Frame().Pos(); } else { OSL_ENSURE( false, "what anchor is it?" ); @@ -536,12 +536,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { Point aPos( rInsPt ); aPos -= aNewAnch; - aPos -= rSttPt - pFly->Frm().Pos(); + aPos -= rSttPt - pFly->Frame().Pos(); pFlyFormat->SetFormatAttr( SwFormatHoriOrient( aPos.getX(),text::HoriOrientation::NONE, text::RelOrientation::FRAME ) ); pFlyFormat->SetFormatAttr( SwFormatVertOrient( aPos.getY(),text::VertOrientation::NONE, text::RelOrientation::FRAME ) ); } - const Point aPt( pDestShell->GetCrsrDocPos() ); + const Point aPt( pDestShell->GetCursorDocPos() ); if( bIsMove ) GetDoc()->getIDocumentLayoutAccess().DelLayoutFormat( pOldFormat ); @@ -549,12 +549,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, // only select if it can be shifted/copied in the same shell if( bSelectInsert ) { - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrameFormat*>(pFlyFormat)->GetFrm( &aPt ); - if( pFlyFrm ) + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrameFormat*>(pFlyFormat)->GetFrame( &aPt ); + if( pFlyFrame ) { - //JP 12.05.98: should this be in SelectFlyFrm??? + //JP 12.05.98: should this be in SelectFlyFrame??? pDestShell->Imp()->GetDrawView()->UnmarkAll(); - pDestShell->SelectFlyFrm( *pFlyFrm, true ); + pDestShell->SelectFlyFrame( *pFlyFrame, true ); } } @@ -580,24 +580,24 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, SwPosition* pDstPos = nullptr; if( this == pDestShell ) { - // same shell? Then create new Crsr at the + // same shell? Then create new Cursor at the // DocumentPosition passed - pDstPos = new SwPosition( *GetCrsr()->GetPoint() ); + pDstPos = new SwPosition( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - GetLayout()->GetCrsrOfst( pDstPos, aPt ); + GetLayout()->GetCursorOfst( pDstPos, aPt ); if( !pDstPos->nNode.GetNode().IsNoTextNode() ) bRet = true; } - else if( !pDestShell->GetCrsr()->GetNode().IsNoTextNode() ) + else if( !pDestShell->GetCursor()->GetNode().IsNoTextNode() ) { - pDstPos = new SwPosition( *pDestShell->GetCrsr()->GetPoint() ); + pDstPos = new SwPosition( *pDestShell->GetCursor()->GetPoint() ); bRet = true; } if( bRet ) { if( GetDoc() == pDestShell->GetDoc() ) - ParkTableCrsr(); + ParkTableCursor(); bRet = pDestShell->GetDoc()->InsCopyOfTable( *pDstPos, aBoxes,nullptr, bIsMove && this == pDestShell && @@ -606,16 +606,16 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, this != pDestShell ); if( this != pDestShell ) - *pDestShell->GetCrsr()->GetPoint() = *pDstPos; + *pDestShell->GetCursor()->GetPoint() = *pDstPos; - // create all parked Crsr? + // create all parked Cursor? if( GetDoc() == pDestShell->GetDoc() ) - GetCrsr(); + GetCursor(); // JP 16.04.99: Bug 64908 - Set InsPos, to assure the parked // Cursor is positioned at the insert position if( this == pDestShell ) - GetCrsrDocPos() = rInsPt; + GetCursorDocPos() = rInsPt; } delete pDstPos; } @@ -627,12 +627,12 @@ bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt, { // same shell? then request the position // at the passed document position - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); bRet = !aPos.nNode.GetNode().IsNoTextNode(); } - else if( pDestShell->GetCrsr()->GetNode().IsNoTextNode() ) + else if( pDestShell->GetCursor()->GetNode().IsNoTextNode() ) bRet = false; if( bRet ) @@ -722,18 +722,18 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) - aCpyPam.GetMark()->nNode.GetIndex(); sal_uInt32 nCount = nSelCount; SwNodeIndex aClpIdx( aIdx ); - SwPaM* pStartCursor = GetCrsr(); - SwPaM* pCurrCrsr = pStartCursor; + SwPaM* pStartCursor = GetCursor(); + SwPaM* pCurrCursor = pStartCursor; sal_uInt32 nCursorCount = pStartCursor->GetRingContainer().size(); // If the target selection is a multi-selection, often the last and first // cursor of the ring points to identical document positions. Then // we should avoid double insertion of text portions... - while( nCursorCount > 1 && *pCurrCrsr->GetPoint() == - *(pCurrCrsr->GetPrev()->GetPoint()) ) + while( nCursorCount > 1 && *pCurrCursor->GetPoint() == + *(pCurrCursor->GetPrev()->GetPoint()) ) { --nCursorCount; - pCurrCrsr = pCurrCrsr->GetNext(); - pStartCursor = pCurrCrsr; + pCurrCursor = pCurrCursor->GetNext(); + pStartCursor = pCurrCursor; } SwPosition aStartPos( *pStartCursor->GetPoint() ); SwPosition aInsertPos( aStartPos ); // first insertion position @@ -749,23 +749,23 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) PositionPtr( new SwPosition( aInsertPos ) ) ); ++aIdx; aInsertion.first->SetMark(); - if( pStartCursor == pCurrCrsr->GetNext() ) + if( pStartCursor == pCurrCursor->GetNext() ) { // Now we have to look for insertion positions... if( !nMove ) // Annotate the last given insert position aStartPos = aInsertPos; - SwCursor aCrsr( aStartPos, nullptr, false); + SwCursor aCursor( aStartPos, nullptr, false); // Check if we find another insert position by moving // down the last given position - if( aCrsr.UpDown( false, ++nMove, nullptr, 0 ) ) - aInsertPos = *aCrsr.GetPoint(); + if( aCursor.UpDown( false, ++nMove, nullptr, 0 ) ) + aInsertPos = *aCursor.GetPoint(); else // if there is no paragraph we have to create it bCompletePara = nCount > 0; nCursorCount = 0; } else // as long as we find more insert positions in the cursor ring { // we'll take them - pCurrCrsr = pCurrCrsr->GetNext(); - aInsertPos = *pCurrCrsr->GetPoint(); + pCurrCursor = pCurrCursor->GetNext(); + aInsertPos = *pCurrCursor->GetPoint(); --nCursorCount; } // If there are no more paragraphs e.g. at the end of a document, @@ -819,7 +819,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { bool bDelTable = true; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( pSrcNd && @@ -832,7 +832,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { SwPosition aDestPos( *rPaM.GetPoint() ); - bool bParkTableCrsr = false; + bool bParkTableCursor = false; const SwStartNode* pSttNd = rPaM.GetNode().FindTableBoxStartNode(); // TABLE IN TABLE: copy table in table @@ -841,8 +841,8 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) if( IsTableMode() ) // table selection? { GetTableSel( *this, aBoxes ); - ParkTableCrsr(); - bParkTableCrsr = true; + ParkTableCursor(); + bParkTableCursor = true; } else if( !PamHasSelection(rPaM) && rPaM.GetNext() == &rPaM && ( !pSrcNd->GetTable().IsTableComplex() || @@ -856,7 +856,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) } SwNodeIndex aNdIdx( *pDestNd->EndOfSectionNode()); - if( !bParkTableCrsr ) + if( !bParkTableCursor ) { // exit first the complete table // ???? what about only table in a frame ????? @@ -869,8 +869,8 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) bRet = GetDoc()->InsCopyOfTable( aDestPos, aBoxes, &pSrcNd->GetTable() ); - if( bParkTableCrsr ) - GetCrsr(); + if( bParkTableCursor ) + GetCursor(); else { // return to the box @@ -986,11 +986,11 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bIncludingPageFrames ) { if( RES_FLYFRMFMT == pNew->Which() ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFlyFrm = static_cast<SwFlyFrameFormat*>(pNew)-> - GetFrm( &aPt ); - if( pFlyFrm ) - SelectFlyFrm( *pFlyFrm, true ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFlyFrame = static_cast<SwFlyFrameFormat*>(pNew)-> + GetFrame( &aPt ); + if( pFlyFrame ) + SelectFlyFrame( *pFlyFrame, true ); // always pick the first FlyFrame only; the others // were copied to the clipboard via Fly in Fly break; @@ -1133,7 +1133,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 return false; } MovePage( fnPageCurr, fnPageStart ); - SwPaM aCpyPam( *GetCrsr()->GetPoint() ); + SwPaM aCpyPam( *GetCursor()->GetPoint() ); OUString sStartingPageDesc = GetPageDesc( GetCurPageDesc()).GetName(); SwPageDesc* pDesc = rToFill.FindPageDescByName( sStartingPageDesc, true ); if( pDesc ) @@ -1162,7 +1162,7 @@ bool SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 MovePage( fnPageCurr, fnPageEnd ); aCpyPam.SetMark(); - *aCpyPam.GetMark() = *GetCrsr()->GetPoint(); + *aCpyPam.GetMark() = *GetCursor()->GetPoint(); SET_CURR_SHELL( this ); @@ -1266,7 +1266,7 @@ bool SwFEShell::GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) // Not the original size, but the current one. // Otherwise it could happen that for vector graphics // many MB's of memory are allocated. - const Size aSz( GetSelectedFlyFrm()->Prt().SSize() ); + const Size aSz( GetSelectedFlyFrame()->Prt().SSize() ); ScopedVclPtrInstance< VirtualDevice > pVirtDev(*GetWin()); MapMode aTmp( MAP_TWIP ); @@ -1373,14 +1373,14 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) case SwPasteSdr::Replace: { const SwFrameFormat* pFormat(nullptr); - const SwFrm* pAnchor(nullptr); + const SwFrame* pAnchor(nullptr); if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr ) { pFormat = FindFrameFormat( pOldObj ); Point aNullPt; - SwFlyFrm* pFlyFrm = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrm( &aNullPt ); - pAnchor = pFlyFrm ? pFlyFrm->GetAnchorFrm() : nullptr; + SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrameFormat*>(pFormat)->GetFrame( &aNullPt ); + pAnchor = pFlyFrame ? pFlyFrame->GetAnchorFrame() : nullptr; if (!pAnchor || pAnchor->FindFooterOrHeader()) { @@ -1414,14 +1414,14 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) if( dynamic_cast<const SwVirtFlyDrawObj*>( pOldObj) != nullptr ) { // store attributes, then set SdrObject - SfxItemSet aFrmSet( mpDoc->GetAttrPool(), + SfxItemSet aFrameSet( mpDoc->GetAttrPool(), RES_SURROUND, RES_ANCHOR ); - aFrmSet.Set( pFormat->GetAttrSet() ); + aFrameSet.Set( pFormat->GetAttrSet() ); Point aNullPt; - if( pAnchor->IsTextFrm() && static_cast<const SwTextFrm*>(pAnchor)->IsFollow() ) + if( pAnchor->IsTextFrame() && static_cast<const SwTextFrame*>(pAnchor)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnchor); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnchor); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); @@ -1433,7 +1433,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) else aNullPt = aOldObjRect.TopLeft(); - Point aNewAnchor = pAnchor->GetFrmAnchorPos( ::HasWrap( pOldObj ) ); + Point aNewAnchor = pAnchor->GetFrameAnchorPos( ::HasWrap( pOldObj ) ); // OD 2004-04-05 #i26791# - direct positioning of Writer // fly frame object for <SwDoc::Insert(..)> pNewObj->NbcSetRelativePos( aNullPt - aNewAnchor ); @@ -1443,7 +1443,7 @@ void SwFEShell::Paste( SvStream& rStrm, SwPasteSdr nAction, const Point* pPt ) DelSelectedObj(); - GetDoc()->getIDocumentContentOperations().InsertDrawObj( *GetCrsr(), *pNewObj, aFrmSet ); + GetDoc()->getIDocumentContentOperations().InsertDrawObj( *GetCursor(), *pNewObj, aFrameSet ); } else { diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index 95cee40fa3e7..072c0b2f0ea8 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -52,11 +52,11 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) StartAllAction(); - SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); - const SwFrm *pFlow = nullptr; + SwPageFrame *pPage = GetCurrFrame()->FindPageFrame(); + const SwFrame *pFlow = nullptr; ::boost::optional<sal_uInt16> oPageNumOffset; - OSL_ENSURE( !GetCrsr()->HasMark(), "ChgCurPageDesc only without selection!"); + OSL_ENSURE( !GetCursor()->HasMark(), "ChgCurPageDesc only without selection!"); SET_CURR_SHELL( this ); while ( pPage ) @@ -65,7 +65,7 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if( rPgDesc.GetPageDesc() ) { @@ -74,15 +74,15 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) break; } } - pPage = static_cast<SwPageFrm*>( pPage->GetPrev() ); + pPage = static_cast<SwPageFrame*>( pPage->GetPrev() ); } if ( !pPage ) { - pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); + pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); pFlow = pPage->FindFirstBodyContent(); if ( !pFlow ) { - pPage = static_cast<SwPageFrm*>(pPage->GetNext()); + pPage = static_cast<SwPageFrame*>(pPage->GetNext()); pFlow = pPage->FindFirstBodyContent(); OSL_ENSURE( pFlow, "Dokuemnt ohne Inhalt?!?" ); } @@ -93,10 +93,10 @@ void SwFEShell::ChgCurPageDesc( const SwPageDesc& rDesc ) aNew.SetNumOffset( oPageNumOffset ); if ( pFlow->IsInTab() ) - GetDoc()->SetAttr( aNew, *const_cast<SwFormat*>(static_cast<SwFormat const *>(pFlow->FindTabFrm()->GetFormat())) ); + GetDoc()->SetAttr( aNew, *const_cast<SwFormat*>(static_cast<SwFormat const *>(pFlow->FindTabFrame()->GetFormat())) ); else { - SwPaM aPaM( *static_cast<const SwContentFrm*>(pFlow)->GetNode() ); + SwPaM aPaM( *static_cast<const SwContentFrame*>(pFlow)->GetNode() ); GetDoc()->getIDocumentContentOperations().InsertPoolItem( aPaM, aNew ); } EndAllActionAndCall(); @@ -143,12 +143,12 @@ size_t SwFEShell::GetMousePageDesc( const Point &rPt ) const { if( GetLayout() ) { - const SwPageFrm* pPage = - static_cast<const SwPageFrm*>( GetLayout()->Lower() ); + const SwPageFrame* pPage = + static_cast<const SwPageFrame*>( GetLayout()->Lower() ); if( pPage ) { - while( pPage->GetNext() && rPt.Y() > pPage->Frm().Bottom() ) - pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + while( pPage->GetNext() && rPt.Y() > pPage->Frame().Bottom() ) + pPage = static_cast<const SwPageFrame*>( pPage->GetNext() ); SwDoc *pMyDoc = GetDoc(); size_t nPos; if (pMyDoc->ContainsPageDesc( pPage->GetPageDesc(), &nPos ) ) @@ -158,12 +158,12 @@ size_t SwFEShell::GetMousePageDesc( const Point &rPt ) const return 0; } -size_t SwFEShell::GetCurPageDesc( const bool bCalcFrm ) const +size_t SwFEShell::GetCurPageDesc( const bool bCalcFrame ) const { - const SwFrm *pFrm = GetCurrFrm( bCalcFrm ); - if ( pFrm ) + const SwFrame *pFrame = GetCurrFrame( bCalcFrame ); + if ( pFrame ) { - const SwPageFrm *pPage = pFrm->FindPageFrm(); + const SwPageFrame *pPage = pFrame->FindPageFrame(); if ( pPage ) { size_t nPos; @@ -179,45 +179,45 @@ size_t SwFEShell::GetCurPageDesc( const bool bCalcFrm ) const const SwPageDesc* SwFEShell::GetSelectedPageDescs() const { const SwContentNode* pCNd; - const SwFrm* pMkFrm, *pPtFrm; + const SwFrame* pMkFrame, *pPtFrame; const SwPageDesc* pFnd, *pRetDesc = reinterpret_cast<SwPageDesc*>(sal_IntPtr(-1)); const Point aNulPt; - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { if( nullptr != (pCNd = rPaM.GetContentNode() ) && - nullptr != ( pPtFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) ) - pPtFrm = pPtFrm->FindPageFrm(); + nullptr != ( pPtFrame = pCNd->getLayoutFrame( GetLayout(), &aNulPt, nullptr, false )) ) + pPtFrame = pPtFrame->FindPageFrame(); else - pPtFrm = nullptr; + pPtFrame = nullptr; if( rPaM.HasMark() && nullptr != (pCNd = rPaM.GetContentNode( false ) ) && - nullptr != ( pMkFrm = pCNd->getLayoutFrm( GetLayout(), &aNulPt, nullptr, false )) ) - pMkFrm = pMkFrm->FindPageFrm(); + nullptr != ( pMkFrame = pCNd->getLayoutFrame( GetLayout(), &aNulPt, nullptr, false )) ) + pMkFrame = pMkFrame->FindPageFrame(); else - pMkFrm = pPtFrm; + pMkFrame = pPtFrame; - if( !pMkFrm || !pPtFrm ) + if( !pMkFrame || !pPtFrame ) pFnd = nullptr; - else if( pMkFrm == pPtFrm ) - pFnd = static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc(); + else if( pMkFrame == pPtFrame ) + pFnd = static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc(); else { - // swap pointer if PtFrm before MkFrm - if( static_cast<const SwPageFrm*>(pMkFrm)->GetPhyPageNum() > - static_cast<const SwPageFrm*>(pPtFrm)->GetPhyPageNum() ) + // swap pointer if PtFrame before MkFrame + if( static_cast<const SwPageFrame*>(pMkFrame)->GetPhyPageNum() > + static_cast<const SwPageFrame*>(pPtFrame)->GetPhyPageNum() ) { - const SwFrm* pTmp = pMkFrm; pMkFrm = pPtFrm; pPtFrm = pTmp; + const SwFrame* pTmp = pMkFrame; pMkFrame = pPtFrame; pPtFrame = pTmp; } - // now check from MkFrm to PtFrm for equal PageDescs - pFnd = static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc(); - while( pFnd && pMkFrm != pPtFrm ) + // now check from MkFrame to PtFrame for equal PageDescs + pFnd = static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc(); + while( pFnd && pMkFrame != pPtFrame ) { - pMkFrm = pMkFrm->GetNext(); - if( !pMkFrm || pFnd != static_cast<const SwPageFrm*>(pMkFrm)->GetPageDesc() ) + pMkFrame = pMkFrame->GetNext(); + if( !pMkFrame || pFnd != static_cast<const SwPageFrame*>(pMkFrame)->GetPageDesc() ) pFnd = nullptr; } } diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 6daaa57bc1b7..e41ae588bd58 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -89,8 +89,8 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor, else { const SwContentNode *pCntNd = rNode.GetContentNode(); - const SwContentFrm* pCFrm = pCntNd ? pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ) : nullptr; - const SwPageFrm *pPg = pCFrm ? pCFrm->FindPageFrm() : nullptr; + const SwContentFrame* pCFrame = pCntNd ? pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &rPt, nullptr, false ) : nullptr; + const SwPageFrame *pPg = pCFrame ? pCFrame->FindPageFrame() : nullptr; rAnchor.SetPageNum( pPg ? pPg->GetPhyPageNum() : 1 ); rAnchor.SetType( FLY_AT_PAGE ); @@ -101,13 +101,13 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFormatAnchor& rAnchor, static bool lcl_FindAnchorPos( SwDoc& rDoc, const Point& rPt, - const SwFrm& rFrm, + const SwFrame& rFrame, SfxItemSet& rSet ) { bool bRet = true; SwFormatAnchor aNewAnch( static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR )) ); RndStdIds nNew = aNewAnch.GetAnchorId(); - const SwFrm *pNewAnch; + const SwFrame *pNewAnch; //determine new anchor Point aTmpPnt( rPt ); @@ -118,36 +118,36 @@ static bool lcl_FindAnchorPos( case FLY_AT_CHAR: // LAYER_IMPL { // starting from the upper-left corner of the Fly, - // search nearest ContentFrm - const SwFrm* pFrm = rFrm.IsFlyFrm() ? static_cast<const SwFlyFrm&>(rFrm).GetAnchorFrm() - : &rFrm; - pNewAnch = ::FindAnchor( pFrm, aTmpPnt ); + // search nearest ContentFrame + const SwFrame* pFrame = rFrame.IsFlyFrame() ? static_cast<const SwFlyFrame&>(rFrame).GetAnchorFrame() + : &rFrame; + pNewAnch = ::FindAnchor( pFrame, aTmpPnt ); if( pNewAnch->IsProtected() ) { bRet = false; break; } - SwPosition aPos( *static_cast<const SwContentFrm*>(pNewAnch)->GetNode() ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pNewAnch)->GetNode() ); if ((FLY_AT_CHAR == nNew) || (FLY_AS_CHAR == nNew)) { // textnode should be found, as only in those // a content bound frame can be anchored - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly! - if( !pNewAnch->GetCrsrOfst( &aPos, aTmpPnt, &aState ) ) + if( !pNewAnch->GetCursorOfst( &aPos, aTmpPnt, &aState ) ) { - SwContentNode* pCNd = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pNewAnch))->GetNode(); - if( pNewAnch->Frm().Bottom() < aTmpPnt.Y() ) + SwContentNode* pCNd = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pNewAnch))->GetNode(); + if( pNewAnch->Frame().Bottom() < aTmpPnt.Y() ) pCNd->MakeStartIndex( &aPos.nContent ); else pCNd->MakeEndIndex( &aPos.nContent ); } else { - if ( SwCrsrShell::PosInsideInputField( aPos ) ) + if ( SwCursorShell::PosInsideInputField( aPos ) ) { - aPos.nContent = SwCrsrShell::StartOfInputFieldAtPos( aPos ); + aPos.nContent = SwCursorShell::StartOfInputFieldAtPos( aPos ); } } } @@ -158,18 +158,18 @@ static bool lcl_FindAnchorPos( case FLY_AT_FLY: // LAYER_IMPL { // starting from the upper-left corner of the Fly - // search nearest SwFlyFrm - SwCrsrMoveState aState( MV_SETONLYTEXT ); + // search nearest SwFlyFrame + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( rDoc.GetNodes() ); aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly! - rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); + rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetCursorOfst( &aPos, aTmpPnt, &aState ); pNewAnch = ::FindAnchor( - aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( rFrm.getRootFrm(), nullptr, nullptr, false ), - aTmpPnt )->FindFlyFrm(); + aPos.nNode.GetNode().GetContentNode()->getLayoutFrame( rFrame.getRootFrame(), nullptr, nullptr, false ), + aTmpPnt )->FindFlyFrame(); - if( pNewAnch && &rFrm != pNewAnch && !pNewAnch->IsProtected() ) + if( pNewAnch && &rFrame != pNewAnch && !pNewAnch->IsProtected() ) { - aPos.nNode = *static_cast<const SwFlyFrm*>(pNewAnch)->GetFormat()->GetContent(). + aPos.nNode = *static_cast<const SwFlyFrame*>(pNewAnch)->GetFormat()->GetContent(). GetContentIdx(); aNewAnch.SetAnchor( &aPos ); break; @@ -180,7 +180,7 @@ static bool lcl_FindAnchorPos( // no break case FLY_AT_PAGE: - pNewAnch = rFrm.FindPageFrm(); + pNewAnch = rFrame.FindPageFrame(); aNewAnch.SetPageNum( pNewAnch->GetPhyPageNum() ); break; @@ -195,7 +195,7 @@ static bool lcl_FindAnchorPos( //! also used in unoframe.cxx bool sw_ChkAndSetNewAnchor( - const SwFlyFrm& rFly, + const SwFlyFrame& rFly, SfxItemSet& rSet ) { const SwFrameFormat& rFormat = *rFly.GetFormat(); @@ -216,10 +216,10 @@ bool sw_ChkAndSetNewAnchor( "forbidden anchor change in Head/Foot." ); #endif - return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet ); + return ::lcl_FindAnchorPos( *pDoc, rFly.Frame().Pos(), rFly, rSet ); } -void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) +void SwFEShell::SelectFlyFrame( SwFlyFrame& rFrame, bool bNew ) { SET_CURR_SHELL( this ); @@ -233,29 +233,29 @@ void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) SwViewShellImp *pImpl = Imp(); if( GetWin() && (bNew || !pImpl->GetDrawView()->AreObjectsMarked()) ) { - OSL_ENSURE( rFrm.IsFlyFrm(), "SelectFlyFrm will einen Fly" ); + OSL_ENSURE( rFrame.IsFlyFrame(), "SelectFlyFrame will einen Fly" ); // nothing to be done if the Fly already was selected - if (GetSelectedFlyFrm() == &rFrm) + if (GetSelectedFlyFrame() == &rFrame) return; // assure the anchor is drawn - if( rFrm.IsFlyInCntFrm() && rFrm.GetAnchorFrm() ) - rFrm.GetAnchorFrm()->SetCompletePaint(); + if( rFrame.IsFlyInContentFrame() && rFrame.GetAnchorFrame() ) + rFrame.GetAnchorFrame()->SetCompletePaint(); if( pImpl->GetDrawView()->AreObjectsMarked() ) pImpl->GetDrawView()->UnmarkAll(); - pImpl->GetDrawView()->MarkObj( rFrm.GetVirtDrawObj(), + pImpl->GetDrawView()->MarkObj( rFrame.GetVirtDrawObj(), pImpl->GetPageView() ); KillPams(); ClearMark(); - SelFlyGrabCrsr(); + SelFlyGrabCursor(); } } // Get selected fly -SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const +SwFlyFrame* SwFEShell::GetSelectedFlyFrame() const { if ( Imp()->HasDrawView() ) { @@ -268,25 +268,25 @@ SwFlyFrm* SwFEShell::GetSelectedFlyFrm() const SwVirtFlyDrawObj *pFlyObj = dynamic_cast<SwVirtFlyDrawObj*>(pO); - return pFlyObj ? pFlyObj->GetFlyFrm() : nullptr; + return pFlyObj ? pFlyObj->GetFlyFrame() : nullptr; } return nullptr; } // Get current fly in which the cursor is positioned -SwFlyFrm* SwFEShell::GetCurrFlyFrm(const bool bCalcFrm) const +SwFlyFrame* SwFEShell::GetCurrFlyFrame(const bool bCalcFrame) const { - SwContentFrm *pContent = GetCurrFrm(bCalcFrm); - return pContent ? pContent->FindFlyFrm() : nullptr; + SwContentFrame *pContent = GetCurrFrame(bCalcFrame); + return pContent ? pContent->FindFlyFrame() : nullptr; } // Get selected fly, but if none Get current fly in which the cursor is positioned -SwFlyFrm* SwFEShell::GetSelectedOrCurrFlyFrm(const bool bCalcFrm) const +SwFlyFrame* SwFEShell::GetSelectedOrCurrFlyFrame(const bool bCalcFrame) const { - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if (pFly) return pFly; - return GetCurrFlyFrm(bCalcFrm); + return GetCurrFlyFrame(bCalcFrame); } // Returns non-null pointer, if the current Fly could be anchored to another one (so it is inside) @@ -300,7 +300,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); if ( !rMrkList.GetMarkCount() ) { - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) return nullptr; return pFly->GetFormat(); @@ -314,37 +314,37 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() SwFrameFormat *pFormat = FindFrameFormat( pObj ); if( pFormat && FLY_AT_FLY == pFormat->GetAnchor().GetAnchorId() ) { - const SwFrm* pFly; + const SwFrame* pFly; if (SwVirtFlyDrawObj* pFlyObj = dynamic_cast<SwVirtFlyDrawObj *>(pObj)) { - pFly = pFlyObj->GetFlyFrm()->GetAnchorFrm(); + pFly = pFlyObj->GetFlyFrame()->GetAnchorFrame(); } else { - pFly = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm(pObj); + pFly = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame(pObj); } OSL_ENSURE( pFly, "IsFlyInFly: Where's my anchor?" ); - OSL_ENSURE( pFly->IsFlyFrm(), "IsFlyInFly: Funny anchor!" ); - return static_cast<const SwFlyFrm*>(pFly)->GetFormat(); + OSL_ENSURE( pFly->IsFlyFrame(), "IsFlyInFly: Funny anchor!" ); + return static_cast<const SwFlyFrame*>(pFly)->GetFormat(); } Point aTmpPos = pObj->GetCurrentBoundRect().TopLeft(); - SwFrm *pTextFrm; + SwFrame *pTextFrame; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwNodeIndex aSwNodeIndex( GetDoc()->GetNodes() ); SwPosition aPos( aSwNodeIndex ); Point aPoint( aTmpPos ); aPoint.setX(aPoint.getX() - 1); //do not land in the fly!! - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // determine text frame by left-top-corner of object SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pTextFrm = pNd ? pNd->getLayoutFrm(GetLayout(), &aTmpPos, nullptr, false) : nullptr; + pTextFrame = pNd ? pNd->getLayoutFrame(GetLayout(), &aTmpPos, nullptr, false) : nullptr; } - const SwFrm *pTmp = pTextFrm ? ::FindAnchor(pTextFrm, aTmpPos) : nullptr; - const SwFlyFrm *pFly = pTmp ? pTmp->FindFlyFrm() : nullptr; + const SwFrame *pTmp = pTextFrame ? ::FindAnchor(pTextFrame, aTmpPos) : nullptr; + const SwFlyFrame *pFly = pTmp ? pTmp->FindFlyFrame() : nullptr; if( pFly ) return pFly->GetFormat(); return nullptr; @@ -355,7 +355,7 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) SET_CURR_SHELL( this ); // Determine reference point in document coordinates - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) return; @@ -363,14 +363,14 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos ) // Set an anchor starting from the absolute position for paragraph bound Flys // Anchor and new RelPos will be calculated and set by the Fly - if ( pFly->IsFlyAtCntFrm() ) - static_cast<SwFlyAtCntFrm*>(pFly)->SetAbsPos( rAbsPos ); + if ( pFly->IsFlyAtContentFrame() ) + static_cast<SwFlyAtContentFrame*>(pFly)->SetAbsPos( rAbsPos ); else { - const SwFrm *pAnch = pFly->GetAnchorFrm(); - Point aOrient( pAnch->Frm().Pos() ); + const SwFrame *pAnch = pFly->GetAnchorFrame(); + Point aOrient( pAnch->Frame().Pos() ); - if ( pFly->IsFlyInCntFrm() ) + if ( pFly->IsFlyInContentFrame() ) aOrient.setX(rAbsPos.getX()); // calculate RelPos. @@ -406,19 +406,19 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) bool bFlyFrame = dynamic_cast<SwVirtFlyDrawObj *>(pObj) != nullptr; - SwFlyFrm* pFly = nullptr; - const SwFrm* pFooterOrHeader = nullptr; + SwFlyFrame* pFly = nullptr; + const SwFrame* pFooterOrHeader = nullptr; if( bFlyFrame ) { // Calculate reference point in document coordinates - SwContentFrm *pContent = GetCurrFrm( false ); + SwContentFrame *pContent = GetCurrFrame( false ); if( !pContent ) return aRet; - pFly = pContent->FindFlyFrm(); + pFly = pContent->FindFlyFrame(); if ( !pFly ) return aRet; - const SwFrm* pOldAnch = pFly->GetAnchorFrm(); + const SwFrame* pOldAnch = pFly->GetAnchorFrame(); if( !pOldAnch ) return aRet; if ( FLY_AT_PAGE != nAnchorId ) @@ -431,57 +431,57 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) // Necessary for moving 'anchor symbol' at the user interface inside header/footer. else if ( !::CheckControlLayer( pObj ) ) { - SwContentFrm *pContent = GetCurrFrm( false ); + SwContentFrame *pContent = GetCurrFrame( false ); if( !pContent ) return aRet; pFooterOrHeader = pContent->FindFooterOrHeader(); } - // Search nearest SwFlyFrm starting from the upper-left corner + // Search nearest SwFlyFrame starting from the upper-left corner // of the fly - SwContentFrm *pTextFrm = nullptr; + SwContentFrame *pTextFrame = nullptr; { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() ); Point aTmpPnt( rAbsPos ); - GetLayout()->GetCrsrOfst( &aPos, aTmpPnt, &aState ); + GetLayout()->GetCursorOfst( &aPos, aTmpPnt, &aState ); if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex() && (nAnchorId != FLY_AT_CHAR || !PosInsideInputField(aPos))) { SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); assert(pCNode); - pTextFrm = pCNode->getLayoutFrm(GetLayout(), nullptr, &aPos, false); + pTextFrame = pCNode->getLayoutFrame(GetLayout(), nullptr, &aPos, false); } } - const SwFrm *pNewAnch = nullptr; - if( pTextFrm != nullptr ) + const SwFrame *pNewAnch = nullptr; + if( pTextFrame != nullptr ) { if ( FLY_AT_PAGE == nAnchorId ) { - pNewAnch = pTextFrm->FindPageFrm(); + pNewAnch = pTextFrame->FindPageFrame(); } else { - pNewAnch = ::FindAnchor( pTextFrm, rAbsPos ); + pNewAnch = ::FindAnchor( pTextFrame, rAbsPos ); if( FLY_AT_FLY == nAnchorId ) // LAYER_IMPL { - pNewAnch = pNewAnch->FindFlyFrm(); + pNewAnch = pNewAnch->FindFlyFrame(); } } } if( pNewAnch && !pNewAnch->IsProtected() ) { - const SwFlyFrm* pCheck = bFlyFrame ? pNewAnch->FindFlyFrm() : nullptr; + const SwFlyFrame* pCheck = bFlyFrame ? pNewAnch->FindFlyFrame() : nullptr; // If we land inside the frame, make sure // that the frame does not land inside its own content while( pCheck ) { if( pCheck == pFly ) break; - const SwFrm *pTmp = pCheck->GetAnchorFrm(); - pCheck = pTmp ? pTmp->FindFlyFrm() : nullptr; + const SwFrame *pTmp = pCheck->GetAnchorFrame(); + pCheck = pTmp ? pTmp->FindFlyFrame() : nullptr; } // Do not switch from header/footer to another area, @@ -489,7 +489,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) if( !pCheck && pFooterOrHeader == pNewAnch->FindFooterOrHeader() ) { - aRet = pNewAnch->GetFrmAnchorPos( ::HasWrap( pObj ) ); + aRet = pNewAnch->GetFrameAnchorPos( ::HasWrap( pObj ) ); if ( bMoveIt || (nAnchorId == FLY_AT_CHAR) ) { @@ -499,21 +499,21 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) case FLY_AT_PARA: { SwPosition pos = *aAnch.GetContentAnchor(); - pos.nNode = *pTextFrm->GetNode(); + pos.nNode = *pTextFrame->GetNode(); pos.nContent.Assign(nullptr,0); aAnch.SetAnchor( &pos ); break; } case FLY_AT_PAGE: { - aAnch.SetPageNum( static_cast<const SwPageFrm*>(pNewAnch)-> + aAnch.SetPageNum( static_cast<const SwPageFrame*>(pNewAnch)-> GetPhyPageNum() ); break; } case FLY_AT_FLY: { - SwPosition aPos( *static_cast<const SwFlyFrm*>(pNewAnch)->GetFormat()-> + SwPosition aPos( *static_cast<const SwFlyFrame*>(pNewAnch)->GetFormat()-> GetContent().GetContentIdx() ); aAnch.SetAnchor( &aPos ); break; @@ -523,15 +523,15 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) { SwPosition pos = *aAnch.GetContentAnchor(); Point aTmpPnt( rAbsPos ); - if( pTextFrm->GetCrsrOfst( &pos, aTmpPnt ) ) + if( pTextFrame->GetCursorOfst( &pos, aTmpPnt ) ) { SwRect aTmpRect; - pTextFrm->GetCharRect( aTmpRect, pos ); + pTextFrame->GetCharRect( aTmpRect, pos ); aRet = aTmpRect.Pos(); } else { - pos.nNode = *pTextFrm->GetNode(); + pos.nNode = *pTextFrame->GetNode(); pos.nContent.Assign(nullptr,0); } aAnch.SetAnchor( &pos ); @@ -588,14 +588,14 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) return aRet; } -const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchValid, +const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchValid, SwFrameFormat *pParent ) { SET_CURR_SHELL( this ); StartAllAction(); - SwPaM* pCrsr = GetCrsr(); - const Point aPt( GetCrsrDocPos() ); + SwPaM* pCursor = GetCursor(); + const Point aPt( GetCursorDocPos() ); SwSelBoxes aBoxes; bool bMoveContent = true; @@ -604,24 +604,24 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal GetTableSel( *this, aBoxes ); if( !aBoxes.empty() ) { - // Crsr should be removed from the removal area. + // Cursor should be removed from the removal area. // Always put it after/on the table; via the // document position they will be set to the old // position - ParkCrsr( SwNodeIndex( *aBoxes[0]->GetSttNd() )); + ParkCursor( SwNodeIndex( *aBoxes[0]->GetSttNd() )); - // #i127787# pCurCrsr will be deleted in ParkCrsr, - // we better get the current pCurCrsr instead of working with the + // #i127787# pCurrentCursor will be deleted in ParkCursor, + // we better get the current pCurrentCursor instead of working with the // deleted one: - pCrsr = GetCrsr(); + pCursor = GetCursor(); } else bMoveContent = false; } - else if( !pCrsr->HasMark() && !pCrsr->IsMultiSelection() ) + else if( !pCursor->HasMark() && !pCursor->IsMultiSelection() ) bMoveContent = false; - const SwPosition& rPos = *pCrsr->Start(); + const SwPosition& rPos = *pCursor->Start(); SwFormatAnchor& rAnch = const_cast<SwFormatAnchor&>(static_cast<const SwFormatAnchor&>(rSet.Get( RES_ANCHOR ))); RndStdIds eRndId = rAnch.GetAnchorId(); @@ -689,7 +689,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal } } - pRet = GetDoc()->MakeFlyAndMove( *pCrsr, rSet, &aBoxes, pParent ); + pRet = GetDoc()->MakeFlyAndMove( *pCursor, rSet, &aBoxes, pParent ); KillPams(); @@ -700,13 +700,13 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal // calculate new position // JP 24.03.97: also go via page links // chaos::anchor should not lie in the shifted area - pRet->DelFrms(); + pRet->DelFrames(); - const SwFrm* pAnch = ::FindAnchor( GetLayout(), aPt ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pAnch)->GetNode() ); + const SwFrame* pAnch = ::FindAnchor( GetLayout(), aPt ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() ); if ( FLY_AS_CHAR == eRndId ) { - aPos.nContent.Assign( const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pAnch))->GetNode(), 0 ); + aPos.nContent.Assign( const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pAnch))->GetNode(), 0 ); } pOldAnchor->SetAnchor( &aPos ); @@ -732,7 +732,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal if( bVOriChgd ) const_cast<SfxItemSet&>(rSet).Put( aOldV ); - GetDoc()->SetFlyFrmAttr( *pRet, (SfxItemSet&)rSet ); + GetDoc()->SetFlyFrameAttr( *pRet, (SfxItemSet&)rSet ); GetDoc()->GetIDocumentUndoRedo().DoUndo(bDoesUndo); } delete pOldAnchor; @@ -747,9 +747,9 @@ const SwFrameFormat *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, bool bAnchVal if( pRet ) { - SwFlyFrm* pFrm = pRet->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pRet->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else { GetLayout()->SetAssertFlyPages(); @@ -770,8 +770,8 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); StartAllAction(); - SwShellCrsr *pStartCursor = dynamic_cast<SwShellCrsr*>(this->GetSwCrsr()); - SwShellCrsr *pCursor = pStartCursor; + SwShellCursor *pStartCursor = dynamic_cast<SwShellCursor*>(this->GetSwCursor()); + SwShellCursor *pCursor = pStartCursor; do { if (!pCursor) @@ -799,7 +799,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, if( !pAnchor->GetContentAnchor() ) { lcl_SetNewFlyPos( pCursor->GetNode(), - *pAnchor, GetCrsrDocPos() ); + *pAnchor, GetCursorDocPos() ); } break; case FLY_AT_PAGE: @@ -820,25 +820,25 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, pGrfAttrSet, pFrameFormat ); OSL_ENSURE( pFormat, "Doc->getIDocumentContentOperations().Insert(notxt) failed." ); - pCursor = dynamic_cast<SwShellCrsr*>(pCursor->GetNext()); + pCursor = dynamic_cast<SwShellCursor*>(pCursor->GetNext()); } while( pCursor != pStartCursor ); EndAllAction(); if( pFormat ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFrm = pFormat->GetFrm( &aPt ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFrame = pFormat->GetFrame( &aPt ); - if( pFrm ) + if( pFrame ) { // fdo#36681: Invalidate the content and layout to refresh // the picture anchoring properly - SwPageFrm* pPageFrm = pFrm->FindPageFrmOfAnchor(); - pPageFrm->InvalidateFlyLayout(); - pPageFrm->InvalidateContent(); + SwPageFrame* pPageFrame = pFrame->FindPageFrameOfAnchor(); + pPageFrame->InvalidateFlyLayout(); + pPageFrame->InvalidateContent(); - SelectFlyFrm( *pFrm, true ); + SelectFlyFrame( *pFrame, true ); } else GetLayout()->SetAssertFlyPages(); @@ -853,7 +853,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, SwFlyFrameFormat* pFormat = nullptr; SET_CURR_SHELL( this ); StartAllAction(); - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { pFormat = GetDoc()->getIDocumentContentOperations().Insert(rPaM, xObj, pFlyAttrSet, pGrfAttrSet, pFrameFormat ); @@ -864,11 +864,11 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, if( pFormat ) { - const Point aPt( GetCrsrDocPos() ); - SwFlyFrm* pFrm = pFormat->GetFrm( &aPt ); + const Point aPt( GetCursorDocPos() ); + SwFlyFrame* pFrame = pFormat->GetFrame( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -890,14 +890,14 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, // find anchor position SwPaM aPam( mpDoc->GetNodes() ); { - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aTmpPt( rInsertPosition ); - GetLayout()->GetCrsrOfst( aPam.GetPoint(), aTmpPt, &aState ); - const SwFrm* pFrm = aPam.GetContentNode()->getLayoutFrm( GetLayout(), nullptr, nullptr, false ); - const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(), - rInsertPosition.Y() - pFrm->Frm().Top() ); + GetLayout()->GetCursorOfst( aPam.GetPoint(), aTmpPt, &aState ); + const SwFrame* pFrame = aPam.GetContentNode()->getLayoutFrame( GetLayout(), nullptr, nullptr, false ); + const Point aRelPos( rInsertPosition.X() - pFrame->Frame().Left(), + rInsertPosition.Y() - pFrame->Frame().Top() ); rDrawObj.SetRelativePos( aRelPos ); - ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); + ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrame, rFlyAttrSet ); } // insert drawing object into the document creating a new <SwDrawFrameFormat> instance SwDrawFrameFormat* pFormat = GetDoc()->getIDocumentContentOperations().InsertDrawObj( aPam, rDrawObj, rFlyAttrSet ); @@ -942,8 +942,8 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n StartUndo(); long nNewPage; - SwRootFrm* pTmpRootFrm = GetLayout(); - sal_uInt16 nMaxPage = pTmpRootFrm->GetPageNum(); + SwRootFrame* pTmpRootFrame = GetLayout(); + sal_uInt16 nMaxPage = pTmpRootFrame->GetPageNum(); bool bTmpAssert = false; for( auto pFormat : rFillArr ) { @@ -967,7 +967,7 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n static_cast<SwDrawContact*>(pCon)->DisconnectFromLayout(); } else - pFormat->DelFrms(); + pFormat->DelFrames(); bTmpAssert = true; } aNewAnchor.SetPageNum( sal_uInt16(nNewPage) ); @@ -976,21 +976,21 @@ void SwFEShell::SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr, int n } if( bTmpAssert ) - pTmpRootFrm->SetAssertFlyPages(); + pTmpRootFrame->SetAssertFlyPages(); EndUndo(); EndAllAction(); } // All attributes in the "baskets" will be filled with the attributes of the -// current FlyFrms. Attributes which cannot be filled due to being at the +// current FlyFrames. Attributes which cannot be filled due to being at the // wrong place or which are ambiguous (multiple selections) will be removed. -bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const +bool SwFEShell::GetFlyFrameAttr( SfxItemSet &rSet ) const { - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); if (!pFly) { - OSL_ENSURE( false, "GetFlyFrmAttr, no Fly selected." ); + OSL_ENSURE( false, "GetFlyFrameAttr, no Fly selected." ); return false; } @@ -1028,30 +1028,30 @@ bool SwFEShell::GetFlyFrmAttr( SfxItemSet &rSet ) const } // Attributes of the current fly will change. -bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) +bool SwFEShell::SetFlyFrameAttr( SfxItemSet& rSet ) { SET_CURR_SHELL( this ); bool bRet = false; if( rSet.Count() ) { - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); - OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." ); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); + OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." ); if( pFly ) { StartAllAction(); - const Point aPt( pFly->Frm().Pos() ); + const Point aPt( pFly->Frame().Pos() ); if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) sw_ChkAndSetNewAnchor( *pFly, rSet ); SwFlyFrameFormat* pFlyFormat = pFly->GetFormat(); - if( GetDoc()->SetFlyFrmAttr( *pFlyFormat, rSet )) + if( GetDoc()->SetFlyFrameAttr( *pFlyFormat, rSet )) { bRet = true; - SwFlyFrm* pFrm = pFlyFormat->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pFlyFormat->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1065,7 +1065,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) SfxItemSet SwFEShell::makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor) { // The set also includes VERT/HORI_ORIENT, because the align - // shall be changed in FEShell::SetFlyFrmAttr/SetFlyFrmAnchor, + // shall be changed in FEShell::SetFlyFrameAttr/SetFlyFrameAnchor, // possibly as a result of the anchor change. SfxItemSet aSet(rPool, RES_VERT_ORIENT, RES_ANCHOR); aSet.Put(rAnchor); @@ -1100,7 +1100,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } } - if( GetDoc()->SetFlyFrmAttr( *pFormat, rSet )) + if( GetDoc()->SetFlyFrameAttr( *pFormat, rSet )) { bRet = true; Point aTmp; @@ -1112,7 +1112,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet ) } // Reset requested attributes or the ones contained in the set. -bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) +bool SwFEShell::ResetFlyFrameAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) { bool bRet = false; @@ -1120,8 +1120,8 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) { SET_CURR_SHELL( this ); - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); - OSL_ENSURE( pFly, "SetFlyFrmAttr, no Fly selected." ); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); + OSL_ENSURE( pFly, "SetFlyFrameAttr, no Fly selected." ); if( pFly ) { StartAllAction(); @@ -1154,7 +1154,7 @@ bool SwFEShell::ResetFlyFrmAttr( sal_uInt16 nWhich, const SfxItemSet* pSet ) SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const { SwFrameFormat* pRet = nullptr; - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly && ( pRet = static_cast<SwFrameFormat*>(pFly->GetFormat()->DerivedFrom()) ) == GetDoc()->GetDfltFrameFormat() ) pRet = nullptr; @@ -1163,16 +1163,16 @@ SwFrameFormat* SwFEShell::GetSelectedFrameFormat() const void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Point* pDocPos ) { - SwFlyFrm *pFly = nullptr; + SwFlyFrame *pFly = nullptr; if(pDocPos) { const SwFrameFormat* pFormat = GetFormatFromObj( *pDocPos ); if (const SwFlyFrameFormat* pFlyFormat = dynamic_cast<const SwFlyFrameFormat*>(pFormat)) - pFly = pFlyFormat->GetFrm(); + pFly = pFlyFormat->GetFrame(); } else - pFly = GetSelectedFlyFrm(); + pFly = GetSelectedFlyFrame(); OSL_ENSURE( pFly, "SetFrameFormat: no frame" ); if( pFly ) { @@ -1180,7 +1180,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi SET_CURR_SHELL( this ); SwFlyFrameFormat* pFlyFormat = pFly->GetFormat(); - const Point aPt( pFly->Frm().Pos() ); + const Point aPt( pFly->Frame().Pos() ); SfxItemSet* pSet = nullptr; const SfxPoolItem* pItem; @@ -1194,9 +1194,9 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi if( GetDoc()->SetFrameFormatToFly( *pFlyFormat, *pNewFormat, pSet, bKeepOrient )) { - SwFlyFrm* pFrm = pFlyFormat->GetFrm( &aPt ); - if( pFrm ) - SelectFlyFrm( *pFrm, true ); + SwFlyFrame* pFrame = pFlyFormat->GetFrame( &aPt ); + if( pFrame ) + SelectFlyFrame( *pFrame, true ); else GetLayout()->SetAssertFlyPages(); } @@ -1208,7 +1208,7 @@ void SwFEShell::SetFrameFormat( SwFrameFormat *pNewFormat, bool bKeepOrient, Poi const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const { - const SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm(); + const SwFlyFrame* pFly = GetSelectedOrCurrFlyFrame(); if (pFly) return pFly->GetFormat(); return nullptr; @@ -1216,7 +1216,7 @@ const SwFrameFormat* SwFEShell::GetFlyFrameFormat() const SwFrameFormat* SwFEShell::GetFlyFrameFormat() { - SwFlyFrm* pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame* pFly = GetSelectedOrCurrFlyFrame(); if (pFly) return pFly->GetFormat(); return nullptr; @@ -1224,14 +1224,14 @@ SwFrameFormat* SwFEShell::GetFlyFrameFormat() SwRect SwFEShell::GetFlyRect() const { - SwFlyFrm *pFly = GetCurrFlyFrm(false); + SwFlyFrame *pFly = GetCurrFlyFrame(false); if (!pFly) { SwRect aRect; return aRect; } else - return pFly->Frm(); + return pFly->Frame(); } SwRect SwFEShell::GetObjRect() const @@ -1258,7 +1258,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < { Size aResult; - SwFlyFrm *pFly = FindFlyFrm( xObj ); + SwFlyFrame *pFly = FindFlyFrame( xObj ); if ( !pFly ) { aResult = rRect.SSize(); @@ -1275,7 +1275,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // MA we do not allow to clip the Fly, as the OLE server can // request various wishes. Clipping is done via the formatting. // Correct display is done by scaling. - // Scaling is done by SwNoTextFrm::Format by calling + // Scaling is done by SwNoTextFrame::Format by calling // SwWrtShell::CalcAndSetScale() if ( rRect.SSize() != pFly->Prt().SSize() && !bSizeProt ) { @@ -1283,17 +1283,17 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < //JP 28.02.2001: Task 74707 - ask for fly in fly with automatic size - const SwFrm* pAnchor; + const SwFrame* pAnchor; const SwTextNode* pTNd; const SwpHints* pHts; - const SwFormatFrmSize& rFrmSz = pFly->GetFormat()->GetFrmSize(); + const SwFormatFrameSize& rFrameSz = pFly->GetFormat()->GetFrameSize(); if (m_bCheckForOLEInCaption && - 0 != rFrmSz.GetWidthPercent() && - nullptr != (pAnchor = pFly->GetAnchorFrm()) && - pAnchor->IsTextFrm() && + 0 != rFrameSz.GetWidthPercent() && + nullptr != (pAnchor = pFly->GetAnchorFrame()) && + pAnchor->IsTextFrame() && !pAnchor->GetNext() && !pAnchor->GetPrev() && - pAnchor->GetUpper()->IsFlyFrm() && - nullptr != ( pTNd = static_cast<const SwTextFrm*>(pAnchor)->GetNode()->GetTextNode()) && + pAnchor->GetUpper()->IsFlyFrame() && + nullptr != ( pTNd = static_cast<const SwTextFrame*>(pAnchor)->GetNode()->GetTextNode()) && nullptr != ( pHts = pTNd->GetpSwpHints() )) { // search for a sequence field: @@ -1305,24 +1305,24 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < && TYP_SEQFLD == static_cast<const SwFormatField*>(pItem)->GetField()->GetTypeId() ) { // sequence field found - SwFlyFrm* pChgFly = const_cast<SwFlyFrm*>(static_cast<const SwFlyFrm*>(pAnchor->GetUpper())); + SwFlyFrame* pChgFly = const_cast<SwFlyFrame*>(static_cast<const SwFlyFrame*>(pAnchor->GetUpper())); // calculate the changed size: // width must change, height can change - Size aNewSz( aSz.Width() + pChgFly->Frm().Width() - + Size aNewSz( aSz.Width() + pChgFly->Frame().Width() - pFly->Prt().Width(), aSz.Height() ); SwFrameFormat *pFormat = pChgFly->GetFormat(); - SwFormatFrmSize aFrmSz( pFormat->GetFrmSize() ); - aFrmSz.SetWidth( aNewSz.Width() ); - if( ATT_MIN_SIZE != aFrmSz.GetHeightSizeType() ) + SwFormatFrameSize aFrameSz( pFormat->GetFrameSize() ); + aFrameSz.SetWidth( aNewSz.Width() ); + if( ATT_MIN_SIZE != aFrameSz.GetHeightSizeType() ) { - aNewSz.Height() += pChgFly->Frm().Height() - + aNewSz.Height() += pChgFly->Frame().Height() - pFly->Prt().Height(); - if( std::abs( aNewSz.Height() - pChgFly->Frm().Height()) > 1 ) - aFrmSz.SetHeight( aNewSz.Height() ); + if( std::abs( aNewSz.Height() - pChgFly->Frame().Height()) > 1 ) + aFrameSz.SetHeight( aNewSz.Height() ); } // via Doc for the Undo! - pFormat->GetDoc()->SetAttr( aFrmSz, *pFormat ); + pFormat->GetDoc()->SetAttr( aFrameSz, *pFormat ); break; } } @@ -1331,14 +1331,14 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // set the new Size at the fly themself if ( pFly->Prt().Height() > 0 && pFly->Prt().Width() > 0 ) { - aSz.Width() += pFly->Frm().Width() - pFly->Prt().Width(); - aSz.Height()+= pFly->Frm().Height()- pFly->Prt().Height(); + aSz.Width() += pFly->Frame().Width() - pFly->Prt().Width(); + aSz.Height()+= pFly->Frame().Height()- pFly->Prt().Height(); } aResult = pFly->ChgSize( aSz ); // if the object changes, the contour is outside the object - OSL_ENSURE( pFly->Lower()->IsNoTextFrm(), "Request without NoText" ); - SwNoTextNode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetNoTextNode(); + OSL_ENSURE( pFly->Lower()->IsNoTextFrame(), "Request without NoText" ); + SwNoTextNode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetNoTextNode(); OSL_ENSURE( pNd, "Request without Node" ); pNd->SetContour( nullptr ); ClrContourCache(); @@ -1347,7 +1347,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // if only the size is to be adjusted, a position is transported with // allocated values Point aPt( pFly->Prt().Pos() ); - aPt += pFly->Frm().Pos(); + aPt += pFly->Frame().Pos(); if ( rRect.Top() != LONG_MIN && rRect.Pos() != aPt && !bPosProt ) { aPt = rRect.Pos(); @@ -1357,15 +1357,15 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < // in case of paragraph-bound Flys, starting from the new position, // a new anchor is to be set. The anchor and the new RelPos are // calculated by the Fly and set - if( pFly->IsFlyAtCntFrm() ) - static_cast<SwFlyAtCntFrm*>(pFly)->SetAbsPos( aPt ); + if( pFly->IsFlyAtContentFrame() ) + static_cast<SwFlyAtContentFrame*>(pFly)->SetAbsPos( aPt ); else { const SwFrameFormat *pFormat = pFly->GetFormat(); const SwFormatVertOrient &rVert = pFormat->GetVertOrient(); const SwFormatHoriOrient &rHori = pFormat->GetHoriOrient(); - const long lXDiff = aPt.getX() - pFly->Frm().Left(); - const long lYDiff = aPt.getY() - pFly->Frm().Top(); + const long lXDiff = aPt.getX() - pFly->Frame().Left(); + const long lYDiff = aPt.getY() - pFly->Frame().Top(); const Point aTmp( rHori.GetPos() + lXDiff, rVert.GetPos() + lYDiff ); pFly->ChgRelPos( aTmp ); @@ -1375,7 +1375,7 @@ Size SwFEShell::RequestObjectResize( const SwRect &rRect, const uno::Reference < SwFlyFrameFormat *pFlyFrameFormat = pFly->GetFormat(); OSL_ENSURE( pFlyFrameFormat, "fly frame format missing!" ); if ( pFlyFrameFormat ) - pFlyFrameFormat->SetLastFlyFrmPrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect + pFlyFrameFormat->SetLastFlyFramePrtRectPos( pFly->Prt().Pos() ); //stores the value of last Prt rect EndAllAction(); @@ -1389,8 +1389,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwFrameFormats& rSpzArr = *mpDoc->GetSpzFrameFormats(); if( !rSpzArr.empty() ) { - SwNodeIndex& rCrsrNd = GetCrsr()->GetPoint()->nNode; - if( rCrsrNd.GetIndex() > mpDoc->GetNodes().GetEndOfExtras().GetIndex() ) + SwNodeIndex& rCursorNd = GetCursor()->GetPoint()->nNode; + if( rCursorNd.GetIndex() > mpDoc->GetNodes().GetEndOfExtras().GetIndex() ) // Cursor is in the body area! return nullptr; @@ -1400,8 +1400,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwStartNode* pSttNd; if( pIdx && nullptr != ( pSttNd = pIdx->GetNode().GetStartNode() ) && - pSttNd->GetIndex() < rCrsrNd.GetIndex() && - rCrsrNd.GetIndex() < pSttNd->EndOfSectionIndex() ) + pSttNd->GetIndex() < rCursorNd.GetIndex() && + rCursorNd.GetIndex() < pSttNd->EndOfSectionIndex() ) { // found: return immediately return pFormat; @@ -1413,7 +1413,7 @@ SwFrameFormat* SwFEShell::WizardGetFly() void SwFEShell::SetFlyName( const OUString& rName ) { - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly ) GetDoc()->SetFlyName( *static_cast<SwFlyFrameFormat*>(pFly->GetFormat()), rName ); else { @@ -1423,7 +1423,7 @@ void SwFEShell::SetFlyName( const OUString& rName ) OUString SwFEShell::GetFlyName() const { - SwLayoutFrm *pFly = GetSelectedFlyFrm(); + SwLayoutFrame *pFly = GetSelectedFlyFrame(); if( pFly ) return pFly->GetFormat()->GetName(); @@ -1434,10 +1434,10 @@ OUString SwFEShell::GetFlyName() const const uno::Reference < embed::XEmbeddedObject > SwFEShell::GetOleRef() const { uno::Reference < embed::XEmbeddedObject > xObj; - SwFlyFrm * pFly = GetSelectedFlyFrm(); - if (pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrm()) + SwFlyFrame * pFly = GetSelectedFlyFrame(); + if (pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrame()) { - SwOLENode *pNd = static_cast<SwNoTextFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwNoTextFrame*>(pFly->Lower())->GetNode()->GetOLENode(); if (pNd) xObj = pNd->GetOLEObj().GetOleRef(); } @@ -1471,7 +1471,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL, } if (pFlyObj) { - SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); + SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); const SwFormatURL &rURL = pFly->GetFormat()->GetURL(); if( !rURL.GetURL().isEmpty() || rURL.GetMap() ) { @@ -1506,7 +1506,7 @@ const SwFrameFormat* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL, { // append the relative pixel position !! Point aPt( rPt ); - aPt -= pFly->Frm().Pos(); + aPt -= pFly->Frame().Pos(); // without MapMode-Offset, without Offset, o ... !!!!! aPt = GetOut()->LogicToPixel( aPt, MapMode( MAP_TWIP ) ); @@ -1543,10 +1543,10 @@ const Graphic *SwFEShell::GetGrfAtPos( const Point &rPt, } if (pFlyObj) { - SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwGrfNode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode(); + SwGrfNode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode(); if ( pNd ) { if ( pNd->IsGrfLink() ) @@ -1604,12 +1604,12 @@ const SwFrameFormat* SwFEShell::GetFormatFromAnyObj( const Point& rPt ) const const SwFrameFormat* pRet = GetFormatFromObj( rPt ); if( !pRet || RES_FLYFRMFMT == pRet->Which() ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - SwFrm* pFrm = pNd->getLayoutFrm( GetLayout(), &rPt, nullptr, false )->FindFlyFrm(); - pRet = pFrm ? static_cast<SwLayoutFrm*>(pFrm)->GetFormat() : nullptr; + SwFrame* pFrame = pNd->getLayoutFrame( GetLayout(), &rPt, nullptr, false )->FindFlyFrame(); + pRet = pFrame ? static_cast<SwLayoutFrame*>(pFrame)->GetFormat() : nullptr; } return pRet; } @@ -1653,10 +1653,10 @@ ObjCntType SwFEShell::GetObjCntType( const SdrObject& rObj ) const } else if (const SwVirtFlyDrawObj *pFlyObj = dynamic_cast<const SwVirtFlyDrawObj*>(pInvestigatedObj)) { - const SwFlyFrm *pFly = pFlyObj->GetFlyFrm(); - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + const SwFlyFrame *pFly = pFlyObj->GetFlyFrame(); + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - if ( static_cast<const SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode() ) + if ( static_cast<const SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode() ) eType = OBJCNT_GRF; else eType = OBJCNT_OLE; @@ -1757,9 +1757,9 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam SwFrameFormat *pFormat = FindFrameFormat( pObj ); // store attributes, then set the graphic - SfxItemSet aFrmSet( mpDoc->GetAttrPool(), + SfxItemSet aFrameSet( mpDoc->GetAttrPool(), pFormat->GetAttrSet().GetRanges() ); - aFrmSet.Set( pFormat->GetAttrSet() ); + aFrameSet.Set( pFormat->GetAttrSet() ); // set size and position? if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) == nullptr ) @@ -1770,15 +1770,15 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam const long nWidth = rBound.Right() - rBound.Left(); const long nHeight= rBound.Bottom() - rBound.Top(); - aFrmSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, + aFrameSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), std::max( nHeight, long(MINFLY) ))); - if( SfxItemState::SET != aFrmSet.GetItemState( RES_HORI_ORIENT )) - aFrmSet.Put( SwFormatHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); + if( SfxItemState::SET != aFrameSet.GetItemState( RES_HORI_ORIENT )) + aFrameSet.Put( SwFormatHoriOrient( aRelPos.getX(), text::HoriOrientation::NONE, text::RelOrientation::FRAME )); - if( SfxItemState::SET != aFrmSet.GetItemState( RES_VERT_ORIENT )) - aFrmSet.Put( SwFormatVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); + if( SfxItemState::SET != aFrameSet.GetItemState( RES_VERT_ORIENT )) + aFrameSet.Put( SwFormatVertOrient( aRelPos.getY(), text::VertOrientation::NONE, text::RelOrientation::FRAME )); } @@ -1790,7 +1790,7 @@ bool SwFEShell::ReplaceSdrObj( const OUString& rGrfName, const OUString& rFltNam // delete "Sdr-Object", insert the graphic instead DelSelectedObj(); - GetDoc()->getIDocumentContentOperations().Insert( *GetCrsr(), rGrfName, rFltName, pGrf, &aFrmSet, nullptr, nullptr ); + GetDoc()->getIDocumentContentOperations().Insert( *GetCursor(), rGrfName, rFltName, pGrf, &aFrameSet, nullptr, nullptr ); EndUndo(); EndAllAction(); @@ -1803,12 +1803,12 @@ static sal_uInt16 SwFormatGetPageNum(const SwFlyFrameFormat * pFormat) { OSL_ENSURE(pFormat != nullptr, "invalid argument"); - SwFlyFrm * pFrm = pFormat->GetFrm(); + SwFlyFrame * pFrame = pFormat->GetFrame(); sal_uInt16 aResult; - if (pFrm != nullptr) - aResult = pFrm->GetPhyPageNum(); + if (pFrame != nullptr) + aResult = pFrame->GetPhyPageNum(); else aResult = pFormat->GetAnchor().GetPageNum(); @@ -1948,7 +1948,7 @@ void SwFEShell::SetObjTitle( const OUString& rTitle ) SwFrameFormat* pFormat = FindFrameFormat( pObj ); if ( pFormat->Which() == RES_FLYFRMFMT ) { - GetDoc()->SetFlyFrmTitle( dynamic_cast<SwFlyFrameFormat&>(*pFormat), + GetDoc()->SetFlyFrameTitle( dynamic_cast<SwFlyFrameFormat&>(*pFormat), rTitle ); } else @@ -1990,7 +1990,7 @@ void SwFEShell::SetObjDescription( const OUString& rDescription ) SwFrameFormat* pFormat = FindFrameFormat( pObj ); if ( pFormat->Which() == RES_FLYFRMFMT ) { - GetDoc()->SetFlyFrmDescription(dynamic_cast<SwFlyFrameFormat&>(*pFormat), + GetDoc()->SetFlyFrameDescription(dynamic_cast<SwFlyFrameFormat&>(*pFormat), rDescription); } else @@ -2001,7 +2001,7 @@ void SwFEShell::SetObjDescription( const OUString& rDescription ) } } -void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrm * pFly ) +void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedObject >& xObj, SwFlyFrame * pFly ) { #if OSL_DEBUG_LEVEL > 0 SvGlobalName aCLSID( xObj->getClassID() ); @@ -2013,7 +2013,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO #endif if (!pFly) - pFly = FindFlyFrm( xObj ); + pFly = FindFlyFrame( xObj ); OSL_ENSURE( pFly , "No fly frame!" ); SwFrameFormat * pFrameFormat = pFly ? pFly->GetFormat() : nullptr; @@ -2048,7 +2048,7 @@ void SwFEShell::AlignFormulaToBaseline( const uno::Reference < embed::XEmbeddedO const SwFlyFrameFormat *pFlyFrameFormat = pFly->GetFormat(); OSL_ENSURE( pFlyFrameFormat, "fly frame format missing!" ); if ( pFlyFrameFormat ) - nBaseline += pFlyFrameFormat->GetLastFlyFrmPrtRectPos().Y(); + nBaseline += pFlyFrameFormat->GetLastFlyFramePrtRectPos().Y(); const SwFormatVertOrient &rVert = pFrameFormat->GetVertOrient(); SwFormatVertOrient aVert( rVert ); diff --git a/sw/source/core/frmedt/feflyole.cxx b/sw/source/core/frmedt/feflyole.cxx index bfa252acd5e3..451bb1fa252b 100644 --- a/sw/source/core/frmedt/feflyole.cxx +++ b/sw/source/core/frmedt/feflyole.cxx @@ -41,12 +41,12 @@ using namespace com::sun::star; -SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject >& xObj ) const +SwFlyFrame *SwFEShell::FindFlyFrame( const uno::Reference < embed::XEmbeddedObject >& xObj ) const { - SwFlyFrm *pFly = GetSelectedFlyFrm(); - if ( pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + SwFlyFrame *pFly = GetSelectedFlyFrame(); + if ( pFly && pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwOLENode *pNd = static_cast<SwNoTextFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwNoTextFrame*>(pFly->Lower())->GetNode()->GetOLENode(); if ( !pNd || pNd->GetOLEObj().GetOleRef() != xObj ) pFly = nullptr; } @@ -68,15 +68,15 @@ SwFlyFrm *SwFEShell::FindFlyFrm( const uno::Reference < embed::XEmbeddedObject > static_cast<SwOLENode*>(pNd)->GetOLEObj().GetOleRef() == xObj ) { bExist = true; - SwFrm *pFrm = static_cast<SwOLENode*>(pNd)->getLayoutFrm( GetLayout() ); - if ( pFrm ) - pFly = pFrm->FindFlyFrm(); + SwFrame *pFrame = static_cast<SwOLENode*>(pNd)->getLayoutFrame( GetLayout() ); + if ( pFrame ) + pFly = pFrame->FindFlyFrame(); break; } nSttIdx = pStNd->EndOfSectionIndex() + 1; } - OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrm not found." ); + OSL_ENSURE( bExist, "OLE-Object unknown and FlyFrame not found." ); (void)bExist; } return pFly; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 69d6b438f0d0..4526f4e850ff 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -90,7 +90,7 @@ using namespace com::sun::star; -SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) +SwFlyFrame *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) { if ( !pLst ) pLst = pSh->HasDrawView() ? &pSh->Imp()->GetDrawView()->GetMarkedObjectList():nullptr; @@ -99,14 +99,14 @@ SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, SwViewShell *pSh ) { SdrObject *pO = pLst->GetMark( 0 )->GetMarkedSdrObj(); if ( pO && dynamic_cast<const SwVirtFlyDrawObj*>( pO) != nullptr ) - return static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm(); + return static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame(); } return nullptr; } -static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrm* pOldSelFly) +static void lcl_GrabCursor( SwFEShell* pSh, SwFlyFrame* pOldSelFly) { - const SwFrameFormat *pFlyFormat = pSh->SelFlyGrabCrsr(); + const SwFrameFormat *pFlyFormat = pSh->SelFlyGrabCursor(); if( pFlyFormat && !pSh->ActionPend() && (!pOldSelFly || pOldSelFly->GetFormat() != pFlyFormat) ) { @@ -125,7 +125,7 @@ extern bool g_bNoInterrupt; // in swmodule.cxx // --> assure consistent cursor pSh->KillPams(); pSh->ClearMark(); - pSh->SetCrsr( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true); + pSh->SetCursor( pSh->Imp()->GetDrawView()->GetAllMarkedRect().TopLeft(), true); } } @@ -142,7 +142,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) const bool bHadSelection = rMrkList.GetMarkCount(); const bool bAddSelect = 0 != (SW_ADD_SELECT & nFlag); const bool bEnterGroup = 0 != (SW_ENTER_GROUP & nFlag); - SwFlyFrm* pOldSelFly = nullptr; + SwFlyFrame* pOldSelFly = nullptr; const Point aOldPos( pDView->GetAllMarkedRect().TopLeft() ); if( bHadSelection ) @@ -166,18 +166,18 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) // Similar if a fly with protected content is deselected. // For simplicity we put the cursor next to the upper-left // corner. - Point aPt( pOldSelFly->Frm().Pos() ); + Point aPt( pOldSelFly->Frame().Pos() ); aPt.setX(aPt.getX() - 1); bool bUnLockView = !IsViewLocked(); LockView( true ); - SetCrsr( aPt, true ); + SetCursor( aPt, true ); if( bUnLockView ) LockView( false ); } if ( nType & CNT_GRF && - static_cast<SwNoTextFrm*>(pOldSelFly->Lower())->HasAnimation() ) + static_cast<SwNoTextFrame*>(pOldSelFly->Lower())->HasAnimation() ) { - GetWin()->Invalidate( pOldSelFly->Frm().SVRect() ); + GetWin()->Invalidate( pOldSelFly->Frame().SVRect() ); } // Cancel crop mode @@ -249,14 +249,14 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) ::lcl_GrabCursor(this, pOldSelFly); if ( GetCntType() & CNT_GRF ) { - const SwFlyFrm *pTmp = GetFlyFromMarked( &rMrkList, this ); + const SwFlyFrame *pTmp = GetFlyFromMarked( &rMrkList, this ); OSL_ENSURE( pTmp, "Graphic without Fly" ); - if ( static_cast<const SwNoTextFrm*>(pTmp->Lower())->HasAnimation() ) - static_cast<const SwNoTextFrm*>(pTmp->Lower())->StopAnimation( GetOut() ); + if ( static_cast<const SwNoTextFrame*>(pTmp->Lower())->HasAnimation() ) + static_cast<const SwNoTextFrame*>(pTmp->Lower())->StopAnimation( GetOut() ); } } else if ( !pOldSelFly && bHadSelection ) - SetCrsr( aOldPos, true); + SetCursor( aOldPos, true); if( bRet || !bHadSelection ) CallChgLnk(); @@ -297,20 +297,20 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) nullptr == (pMrkList = &Imp()->GetDrawView()->GetMarkedObjectList()) || 1 != pMrkList->GetMarkCount()) return false; - SwFrm* pOld; - SwFlyFrm* pFly = nullptr; + SwFrame* pOld; + SwFlyFrame* pFly = nullptr; SdrObject *pObj = pMrkList->GetMark( 0 )->GetMarkedSdrObj(); if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - pOld = pFly->AnchorFrm(); + pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + pOld = pFly->AnchorFrame(); } else - pOld = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm( pObj ); + pOld = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame( pObj ); bool bRet = false; if( pOld ) { - SwFrm* pNew = pOld; + SwFrame* pNew = pOld; // #i28701# SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj ); SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat(); @@ -320,7 +320,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) return false; if( pOld->IsVertical() ) { - if( pOld->IsTextFrm() ) + if( pOld->IsTextFrame() ) { switch( nDir ) { case SwMove::UP: nDir = SwMove::LEFT; break; @@ -340,25 +340,25 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) switch ( nAnchorId ) { case FLY_AT_PAGE: { - OSL_ENSURE( pOld->IsPageFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsPageFrame(), "Wrong anchor, page expected." ); if( SwMove::UP == nDir ) pNew = pOld->GetPrev(); else if( SwMove::DOWN == nDir ) pNew = pOld->GetNext(); if( pNew && pNew != pOld ) { - aAnch.SetPageNum( static_cast<SwPageFrm*>(pNew)->GetPhyPageNum() ); + aAnch.SetPageNum( static_cast<SwPageFrame*>(pNew)->GetPhyPageNum() ); bRet = true; } break; } case FLY_AT_CHAR: { - OSL_ENSURE( pOld->IsContentFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." ); if( SwMove::LEFT == nDir || SwMove::RIGHT == nDir ) { SwPosition pos = *aAnch.GetContentAnchor(); - SwTextNode* pTextNd = static_cast<SwTextFrm*>(pOld)->GetTextNode(); + SwTextNode* pTextNd = static_cast<SwTextFrame*>(pOld)->GetTextNode(); const sal_Int32 nAct = pos.nContent.GetIndex(); if( SwMove::LEFT == nDir ) { @@ -373,7 +373,7 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) else { const sal_Int32 nMax = - static_cast<SwTextFrm*>(pOld)->GetTextNode()->GetText().getLength(); + static_cast<SwTextFrame*>(pOld)->GetTextNode()->GetText().getLength(); if( nAct < nMax ) { bRet = true; @@ -388,20 +388,20 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) } // no break! case FLY_AT_PARA: { - OSL_ENSURE( pOld->IsContentFrm(), "Wrong anchor, page expected." ); + OSL_ENSURE( pOld->IsContentFrame(), "Wrong anchor, page expected." ); if( SwMove::UP == nDir ) pNew = pOld->FindPrev(); else if( SwMove::DOWN == nDir ) pNew = pOld->FindNext(); - if( pNew && pNew != pOld && pNew->IsContentFrm() ) + if( pNew && pNew != pOld && pNew->IsContentFrame() ) { SwPosition pos = *aAnch.GetContentAnchor(); - SwTextNode* pTextNd = static_cast<SwTextFrm*>(pNew)->GetTextNode(); + SwTextNode* pTextNd = static_cast<SwTextFrame*>(pNew)->GetTextNode(); pos.nNode = *pTextNd; sal_Int32 nTmp = 0; if( bRet ) { - nTmp = static_cast<SwTextFrm*>(pNew)->GetTextNode()->GetText().getLength(); + nTmp = static_cast<SwTextFrame*>(pNew)->GetTextNode()->GetText().getLength(); if( nTmp ) --nTmp; } @@ -415,40 +415,40 @@ bool SwFEShell::MoveAnchor( SwMove nDir ) } case FLY_AT_FLY: { - OSL_ENSURE( pOld->IsFlyFrm(), "Wrong anchor, fly frame expected."); - SwPageFrm* pPage = pOld->FindPageFrm(); + OSL_ENSURE( pOld->IsFlyFrame(), "Wrong anchor, fly frame expected."); + SwPageFrame* pPage = pOld->FindPageFrame(); OSL_ENSURE( pPage, "Where's my page?" ); - SwFlyFrm* pNewFly = nullptr; + SwFlyFrame* pNewFly = nullptr; if( pPage->GetSortedObjs() ) { bool bOld = false; - Point aCenter( pOld->Frm().Left() + pOld->Frm().Width()/2, - pOld->Frm().Top() + pOld->Frm().Height()/2 ); + Point aCenter( pOld->Frame().Left() + pOld->Frame().Width()/2, + pOld->Frame().Top() + pOld->Frame().Height()/2 ); Point aBest; for( size_t i = 0; i<pPage->GetSortedObjs()->size(); ++i ) { SwAnchoredObject* pAnchObj = (*pPage->GetSortedObjs())[i]; - if( dynamic_cast<const SwFlyFrm*>( pAnchObj) != nullptr ) + if( dynamic_cast<const SwFlyFrame*>( pAnchObj) != nullptr ) { - SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(pAnchObj); + SwFlyFrame* pTmp = static_cast<SwFlyFrame*>(pAnchObj); if( pTmp == pOld ) bOld = true; else { - const SwFlyFrm* pCheck = pFly ? pTmp : nullptr; + const SwFlyFrame* pCheck = pFly ? pTmp : nullptr; while( pCheck ) { if( pCheck == pFly ) break; - const SwFrm *pNxt = pCheck->GetAnchorFrm(); - pCheck = pNxt ? pNxt->FindFlyFrm() : nullptr; + const SwFrame *pNxt = pCheck->GetAnchorFrame(); + pCheck = pNxt ? pNxt->FindFlyFrame() : nullptr; } if( pCheck || pTmp->IsProtected() ) continue; - Point aNew( pTmp->Frm().Left() + - pTmp->Frm().Width()/2, - pTmp->Frm().Top() + - pTmp->Frm().Height()/2 ); + Point aNew( pTmp->Frame().Left() + + pTmp->Frame().Width()/2, + pTmp->Frame().Top() + + pTmp->Frame().Height()/2 ); bool bAccept = false; switch( nDir ) { case SwMove::RIGHT: @@ -540,33 +540,33 @@ const SdrMarkList* SwFEShell::_GetMarkList() const return pMarkList; } -FrmTypeFlags SwFEShell::GetSelFrmType() const +FrameTypeFlags SwFEShell::GetSelFrameType() const { - FrmTypeFlags eType; + FrameTypeFlags eType; // get marked frame list, and check if anything is selected const SdrMarkList* pMarkList = _GetMarkList(); if( pMarkList == nullptr || pMarkList->GetMarkCount() == 0 ) - eType = FrmTypeFlags::NONE; + eType = FrameTypeFlags::NONE; else { // obtain marked item as fly frame; if no fly frame, it must // be a draw object - const SwFlyFrm* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))); + const SwFlyFrame* pFly = ::GetFlyFromMarked(pMarkList, const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))); if ( pFly != nullptr ) { - if( pFly->IsFlyLayFrm() ) - eType = FrmTypeFlags::FLY_FREE; - else if( pFly->IsFlyAtCntFrm() ) - eType = FrmTypeFlags::FLY_ATCNT; + if( pFly->IsFlyLayFrame() ) + eType = FrameTypeFlags::FLY_FREE; + else if( pFly->IsFlyAtContentFrame() ) + eType = FrameTypeFlags::FLY_ATCNT; else { - OSL_ENSURE( pFly->IsFlyInCntFrm(), "New frametype?" ); - eType = FrmTypeFlags::FLY_INCNT; + OSL_ENSURE( pFly->IsFlyInContentFrame(), "New frametype?" ); + eType = FrameTypeFlags::FLY_INCNT; } } else - eType = FrmTypeFlags::DRAWOBJ; + eType = FrameTypeFlags::DRAWOBJ; } return eType; @@ -577,7 +577,7 @@ bool SwFEShell::IsSelContainsControl() const { bool bRet = false; - // basically, copy the mechanism from GetSelFrmType(), but call + // basically, copy the mechanism from GetSelFrameType(), but call // CheckControl... if you get a drawing object const SdrMarkList* pMarkList = _GetMarkList(); if( pMarkList != nullptr && pMarkList->GetMarkCount() == 1 ) @@ -714,8 +714,8 @@ long SwFEShell::EndDrag( const Point *, bool ) for(SwViewShell& rSh : GetRingContainer()) { rSh.EndAction(); - if( dynamic_cast<const SwCrsrShell *>(&rSh) != nullptr ) - static_cast<SwCrsrShell*>(&rSh)->CallChgLnk(); + if( dynamic_cast<const SwCursorShell *>(&rSh) != nullptr ) + static_cast<SwCursorShell*>(&rSh)->CallChgLnk(); } GetDoc()->getIDocumentState().SetModified(); @@ -734,32 +734,32 @@ void SwFEShell::BreakDrag() SetChainMarker(); } -// If a fly is selected, pulls the crsr in the first ContentFrm -const SwFrameFormat* SwFEShell::SelFlyGrabCrsr() +// If a fly is selected, pulls the crsr in the first ContentFrame +const SwFrameFormat* SwFEShell::SelFlyGrabCursor() { if ( Imp()->HasDrawView() ) { const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); if( pFly ) { - SwContentFrm *pCFrm = pFly->ContainsContent(); - if ( pCFrm ) + SwContentFrame *pCFrame = pFly->ContainsContent(); + if ( pCFrame ) { - SwContentNode *pCNode = pCFrm->GetNode(); + SwContentNode *pCNode = pCFrame->GetNode(); // --> assure, that the cursor is consistent. KillPams(); ClearMark(); - SwPaM *pCrsr = GetCrsr(); + SwPaM *pCursor = GetCursor(); - pCrsr->GetPoint()->nNode = *pCNode; - pCrsr->GetPoint()->nContent.Assign( pCNode, 0 ); + pCursor->GetPoint()->nNode = *pCNode; + pCursor->GetPoint()->nContent.Assign( pCNode, 0 ); SwRect& rChrRect = (SwRect&)GetCharRect(); rChrRect = pFly->Prt(); - rChrRect.Pos() += pFly->Frm().Pos(); - GetCrsrDocPos() = rChrRect.Pos(); + rChrRect.Pos() += pFly->Frame().Pos(); + GetCursorDocPos() = rChrRect.Pos(); } return pFly->GetFormat(); } @@ -777,34 +777,34 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) // 4. Also Drawing objects can displace frames for( size_t j = 0; j < pLst->GetMarkCount(); ++j ) { - SwPageFrm *pPage; + SwPageFrame *pPage; bool bCheckNeighbours = false; sal_Int16 aHori = text::HoriOrientation::NONE; SwRect aRect; SdrObject *pO = pLst->GetMark( j )->GetMarkedSdrObj(); if ( dynamic_cast<const SwVirtFlyDrawObj*>( pO) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame(); const SwFormatHoriOrient &rHori = pFly->GetFormat()->GetHoriOrient(); aHori = rHori.GetHoriOrient(); if( text::HoriOrientation::NONE != aHori && text::HoriOrientation::CENTER != aHori && - pFly->IsFlyAtCntFrm() ) + pFly->IsFlyAtContentFrame() ) { bCheckNeighbours = true; pFly->InvalidatePos(); - pFly->Frm().Pos().Y() += 1; + pFly->Frame().Pos().Y() += 1; } - pPage = pFly->FindPageFrm(); - aRect = pFly->Frm(); + pPage = pFly->FindPageFrame(); + aRect = pFly->Frame(); } else { - SwFrm* pAnch = static_cast<SwDrawContact*>( GetUserCall(pO) )->GetAnchorFrm( pO ); + SwFrame* pAnch = static_cast<SwDrawContact*>( GetUserCall(pO) )->GetAnchorFrame( pO ); if( !pAnch ) continue; - pPage = pAnch->FindPageFrm(); + pPage = pAnch->FindPageFrame(); // #i68520# - naming changed aRect = GetBoundRectOfAnchoredObj( pO ); } @@ -813,33 +813,33 @@ static void lcl_NotifyNeighbours( const SdrMarkList *pLst ) for ( size_t i = 0; i < nCount; ++i ) { SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) == nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) == nullptr ) continue; - SwFlyFrm* pAct = static_cast<SwFlyFrm*>(pAnchoredObj); + SwFlyFrame* pAct = static_cast<SwFlyFrame*>(pAnchoredObj); SwRect aTmpCalcPnt( pAct->Prt() ); - aTmpCalcPnt += pAct->Frm().Pos(); + aTmpCalcPnt += pAct->Frame().Pos(); if ( aRect.IsOver( aTmpCalcPnt ) ) { - SwContentFrm *pCnt = pAct->ContainsContent(); + SwContentFrame *pCnt = pAct->ContainsContent(); while ( pCnt ) { aTmpCalcPnt = pCnt->Prt(); - aTmpCalcPnt += pCnt->Frm().Pos(); + aTmpCalcPnt += pCnt->Frame().Pos(); if ( aRect.IsOver( aTmpCalcPnt ) ) - static_cast<SwFrm*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG ); - pCnt = pCnt->GetNextContentFrm(); + static_cast<SwFrame*>(pCnt)->Prepare( PREP_FLY_ATTR_CHG ); + pCnt = pCnt->GetNextContentFrame(); } } - if ( bCheckNeighbours && pAct->IsFlyAtCntFrm() ) + if ( bCheckNeighbours && pAct->IsFlyAtContentFrame() ) { const SwFormatHoriOrient &rH = pAct->GetFormat()->GetHoriOrient(); if ( rH.GetHoriOrient() == aHori && - pAct->Frm().Top() <= aRect.Bottom() && - pAct->Frm().Bottom() >= aRect.Top() ) + pAct->Frame().Top() <= aRect.Bottom() && + pAct->Frame().Bottom() >= aRect.Top() ) { pAct->InvalidatePos(); - pAct->Frm().Pos().Y() += 1; + pAct->Frame().Pos().Y() += 1; } } } @@ -852,8 +852,8 @@ void SwFEShell::SelectionToTop( bool bTop ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." ); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); - if ( pFly && pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); + if ( pFly && pFly->IsFlyInContentFrame() ) return; StartAllAction(); @@ -872,8 +872,8 @@ void SwFEShell::SelectionToBottom( bool bBottom ) const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); OSL_ENSURE( rMrkList.GetMarkCount(), "No object selected." ); - SwFlyFrm *pFly = ::GetFlyFromMarked( &rMrkList, this ); - if ( pFly && pFly->IsFlyInCntFrm() ) + SwFlyFrame *pFly = ::GetFlyFromMarked( &rMrkList, this ); + if ( pFly && pFly->IsFlyInContentFrame() ) return; StartAllAction(); @@ -943,7 +943,7 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) InvalidateWindows( SwRect( pObj->GetCurrentBoundRect() ) ); if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFormat *pFormat = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm()->GetFormat(); + SwFormat *pFormat = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame()->GetFormat(); SvxOpaqueItem aOpa( pFormat->GetOpaque() ); aOpa.SetValue( nLayerId == rIDDMA.GetHellId() ); pFormat->SetFormatAttr( aOpa ); @@ -966,13 +966,13 @@ void SwFEShell::SelectionToHell() size_t SwFEShell::IsObjSelected() const { - if ( IsFrmSelected() || !Imp()->HasDrawView() ) + if ( IsFrameSelected() || !Imp()->HasDrawView() ) return 0; return Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount(); } -bool SwFEShell::IsFrmSelected() const +bool SwFEShell::IsFrameSelected() const { if ( !Imp()->HasDrawView() ) return false; @@ -983,7 +983,7 @@ bool SwFEShell::IsFrmSelected() const bool SwFEShell::IsObjSelected( const SdrObject& rObj ) const { - if ( IsFrmSelected() || !Imp()->HasDrawView() ) + if ( IsFrameSelected() || !Imp()->HasDrawView() ) return false; else return Imp()->GetDrawView() @@ -1144,24 +1144,24 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) } if ( bObjInBackground ) { - const SwPageFrm* pPageFrm = GetLayout()->GetPageAtPos( rPt ); - if( pPageFrm ) + const SwPageFrame* pPageFrame = GetLayout()->GetPageAtPos( rPt ); + if( pPageFrame ) { - const SwContentFrm* pContentFrm( pPageFrm->ContainsContent() ); - while ( pContentFrm ) + const SwContentFrame* pContentFrame( pPageFrame->ContainsContent() ); + while ( pContentFrame ) { - if ( pContentFrm->UnionFrm().IsInside( rPt ) ) + if ( pContentFrame->UnionFrame().IsInside( rPt ) ) { - const SwTextFrm* pTextFrm = - dynamic_cast<const SwTextFrm*>(pContentFrm); - if ( pTextFrm ) + const SwTextFrame* pTextFrame = + dynamic_cast<const SwTextFrame*>(pContentFrame); + if ( pTextFrame ) { - SwPosition aPos( *(pTextFrm->GetTextNode()) ); + SwPosition aPos( *(pTextFrame->GetTextNode()) ); Point aTmpPt( rPt ); - if (pTextFrm->GetKeyCrsrOfst(&aPos, aTmpPt)) + if (pTextFrame->GetKeyCursorOfst(&aPos, aTmpPt)) { SwRect aCursorCharRect; - if (pTextFrm->GetCharRect(aCursorCharRect, + if (pTextFrame->GetCharRect(aCursorCharRect, aPos)) { if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) ) @@ -1178,7 +1178,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt) break; } - pContentFrm = pContentFrm->GetNextContentFrm(); + pContentFrame = pContentFrame->GetNextContentFrame(); } } } @@ -1276,7 +1276,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool if( !bNoFly && bNoDraw ) { - SwFlyFrm *pFly = GetCurrFrm( false )->FindFlyFrm(); + SwFlyFrame *pFly = GetCurrFrame( false )->FindFlyFrame(); if( pFly ) pBest = pFly->GetVirtDrawObj(); } @@ -1295,7 +1295,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool { const SdrObject* pStartObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); if( dynamic_cast<const SwVirtFlyDrawObj*>( pStartObj) != nullptr ) - aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrm()->Frm().Pos(); + aPos = static_cast<const SwVirtFlyDrawObj*>(pStartObj)->GetFlyFrame()->Frame().Pos(); else aPos = pStartObj->GetSnapRect().TopLeft(); @@ -1328,41 +1328,41 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool while ( aObjIter.IsMore() ) { SdrObject* pObj = aObjIter.Next(); - bool bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr; - if( ( bNoFly && bFlyFrm ) || - ( bNoDraw && !bFlyFrm ) || + bool bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr; + if( ( bNoFly && bFlyFrame ) || + ( bNoDraw && !bFlyFrame ) || ( eType == GotoObjFlags::DrawSimple && lcl_IsControlGroup( pObj ) ) || ( eType == GotoObjFlags::DrawControl && !lcl_IsControlGroup( pObj ) ) || ( pFilter && !pFilter->includeObject( *pObj ) ) ) continue; - if( bFlyFrm ) + if( bFlyFrame ) { SwVirtFlyDrawObj *pO = static_cast<SwVirtFlyDrawObj*>(pObj); - SwFlyFrm *pFly = pO->GetFlyFrm(); + SwFlyFrame *pFly = pO->GetFlyFrame(); if( GotoObjFlags::FlyAny != ( GotoObjFlags::FlyAny & eType ) ) { switch ( eType ) { - case GotoObjFlags::FlyFrm: - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + case GotoObjFlags::FlyFrame: + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) continue; break; case GotoObjFlags::FlyGrf: if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetGrfNode())) + (pFly->Lower()->IsLayoutFrame() || + !static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetGrfNode())) continue; break; case GotoObjFlags::FlyOLE: if ( pFly->Lower() && - (pFly->Lower()->IsLayoutFrm() || - !static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetOLENode())) + (pFly->Lower()->IsLayoutFrame() || + !static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetOLENode())) continue; break; default: break; } } - aCurPos = pFly->Frm().Pos(); + aCurPos = pFly->Frame().Pos(); } else aCurPos = pObj->GetCurrentBoundRect().TopLeft(); @@ -1378,13 +1378,13 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool while ( aTmpIter.IsMore() ) { SdrObject* pTmpObj = aTmpIter.Next(); - bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pTmpObj) != nullptr; - if( ( bNoFly && bFlyFrm ) || ( bNoDraw && !bFlyFrm ) ) + bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pTmpObj) != nullptr; + if( ( bNoFly && bFlyFrame ) || ( bNoDraw && !bFlyFrame ) ) continue; - if( bFlyFrm ) + if( bFlyFrame ) { SwVirtFlyDrawObj *pO = static_cast<SwVirtFlyDrawObj*>(pTmpObj); - aCurPos = pO->GetFlyFrm()->Frm().Pos(); + aCurPos = pO->GetFlyFrame()->Frame().Pos(); } else aCurPos = pTmpObj->GetCurrentBoundRect().TopLeft(); @@ -1442,14 +1442,14 @@ bool SwFEShell::GotoObj( bool bNext, GotoObjFlags eType ) if ( !pBest ) return false; - bool bFlyFrm = dynamic_cast<const SwVirtFlyDrawObj*>( pBest) != nullptr; - if( bFlyFrm ) + bool bFlyFrame = dynamic_cast<const SwVirtFlyDrawObj*>( pBest) != nullptr; + if( bFlyFrame ) { const SwVirtFlyDrawObj *pO = static_cast<const SwVirtFlyDrawObj*>(pBest); - const SwRect& rFrm = pO->GetFlyFrm()->Frm(); - SelectObj( rFrm.Pos(), 0, const_cast<SdrObject*>(pBest) ); + const SwRect& rFrame = pO->GetFlyFrame()->Frame(); + SelectObj( rFrame.Pos(), 0, const_cast<SdrObject*>(pBest) ); if( !ActionPend() ) - MakeVisible( rFrm ); + MakeVisible( rFrame ); } else { @@ -1584,19 +1584,19 @@ bool SwFEShell::ImpEndCreate() // default for controls character bound, otherwise paragraph bound. SwFormatAnchor aAnch; - const SwFrm *pAnch = nullptr; + const SwFrame *pAnch = nullptr; bool bCharBound = false; if( dynamic_cast<const SdrUnoObj*>( &rSdrObj) != nullptr ) { SwPosition aPos( GetDoc()->GetNodes() ); - SwCrsrMoveState aState( MV_SETONLYTEXT ); + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aPoint( aPt.getX(), aPt.getY() + rBound.GetHeight()/2 ); - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // characterbinding not allowed in readonly-content if( !aPos.nNode.GetNode().IsProtect() ) { - pAnch = aPos.nNode.GetNode().GetContentNode()->getLayoutFrm( GetLayout(), &aPoint, &aPos ); + pAnch = aPos.nNode.GetNode().GetContentNode()->getLayoutFrame( GetLayout(), &aPoint, &aPos ); SwRect aTmp; pAnch->GetCharRect( aTmp, aPos ); @@ -1632,11 +1632,11 @@ bool SwFEShell::ImpEndCreate() //bool bBodyOnly = OBJ_NONE != nIdent; bool bBodyOnly = 0xFFFF == nIdent; bool bAtPage = false; - const SwFrm* pPage = nullptr; - SwCrsrMoveState aState( MV_SETONLYTEXT ); + const SwFrame* pPage = nullptr; + SwCursorMoveState aState( MV_SETONLYTEXT ); Point aPoint( aPt ); SwPosition aPos( GetDoc()->GetNodes() ); - GetLayout()->GetCrsrOfst( &aPos, aPoint, &aState ); + GetLayout()->GetCursorOfst( &aPos, aPoint, &aState ); // do not set in ReadnOnly-content if (aPos.nNode.GetNode().IsProtect()) @@ -1647,7 +1647,7 @@ bool SwFEShell::ImpEndCreate() } SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); - pAnch = pCNode ? pCNode->getLayoutFrm( GetLayout(), &aPoint, nullptr, false ) : nullptr; + pAnch = pCNode ? pCNode->getLayoutFrame( GetLayout(), &aPoint, nullptr, false ) : nullptr; if (!pAnch) { // Hidden content. Anchor to the page instead @@ -1656,33 +1656,33 @@ bool SwFEShell::ImpEndCreate() if( !bAtPage ) { - const SwFlyFrm *pTmp = pAnch->FindFlyFrm(); + const SwFlyFrame *pTmp = pAnch->FindFlyFrame(); if( pTmp ) { - const SwFrm* pTmpFrm = pAnch; + const SwFrame* pTmpFrame = pAnch; SwRect aBound( rBound ); while( pTmp ) { - if( pTmp->Frm().IsInside( aBound ) ) + if( pTmp->Frame().IsInside( aBound ) ) { if( !bBodyOnly || !pTmp->FindFooterOrHeader() ) - pPage = pTmpFrm; + pPage = pTmpFrame; break; } - pTmp = pTmp->GetAnchorFrm() - ? pTmp->GetAnchorFrm()->FindFlyFrm() + pTmp = pTmp->GetAnchorFrame() + ? pTmp->GetAnchorFrame()->FindFlyFrame() : nullptr; - pTmpFrm = pTmp; + pTmpFrame = pTmp; } } if( !pPage ) - pPage = pAnch->FindPageFrm(); + pPage = pAnch->FindPageFrame(); // Always via FindAnchor, to assure the frame will be bound // to the previous. With GetCrsOfst we can also reach the next. THIS IS WRONG. pAnch = ::FindAnchor( pPage, aPt, bBodyOnly ); - aPos.nNode = *static_cast<const SwContentFrm*>(pAnch)->GetNode(); + aPos.nNode = *static_cast<const SwContentFrame*>(pAnch)->GetNode(); // do not set in ReadnOnly-content if( aPos.nNode.GetNode().IsProtect() ) @@ -1698,7 +1698,7 @@ bool SwFEShell::ImpEndCreate() if( bAtPage ) { - pPage = pAnch ? pAnch->FindPageFrm() : GetLayout()->GetPageAtPos(aPoint); + pPage = pAnch ? pAnch->FindPageFrame() : GetLayout()->GetPageAtPos(aPoint); aAnch.SetType( FLY_AT_PAGE ); aAnch.SetPageNum( pPage->GetPhyPageNum() ); @@ -1712,27 +1712,27 @@ bool SwFEShell::ImpEndCreate() // OD 2004-03-30 #i26791# - determine relative object position SwTwips nXOffset; - SwTwips nYOffset = rBound.Top() - pAnch->Frm().Top(); + SwTwips nYOffset = rBound.Top() - pAnch->Frame().Top(); { if( pAnch->IsVertical() ) { nXOffset = nYOffset; - nYOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right(); + nYOffset = pAnch->Frame().Left()+pAnch->Frame().Width()-rBound.Right(); } else if( pAnch->IsRightToLeft() ) - nXOffset = pAnch->Frm().Left()+pAnch->Frm().Width()-rBound.Right(); + nXOffset = pAnch->Frame().Left()+pAnch->Frame().Width()-rBound.Right(); else - nXOffset = rBound.Left() - pAnch->Frm().Left(); - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + nXOffset = rBound.Left() - pAnch->Frame().Left(); + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); // OD 2004-03-30 #i26791# - correction: add frame area height // of master frames. nYOffset += pTmp->IsVertical() ? - pTmp->Frm().Width() : pTmp->Frm().Height(); + pTmp->Frame().Width() : pTmp->Frame().Height(); } while ( pTmp->IsFollow() ); } } @@ -1742,7 +1742,7 @@ bool SwFEShell::ImpEndCreate() // For OBJ_NONE a fly is inserted. const long nWidth = rBound.Right() - rBound.Left(); const long nHeight= rBound.Bottom() - rBound.Top(); - aSet.Put( SwFormatFrmSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), + aSet.Put( SwFormatFrameSize( ATT_MIN_SIZE, std::max( nWidth, long(MINFLY) ), std::max( nHeight, long(MINFLY) ))); SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME ); @@ -1770,35 +1770,35 @@ bool SwFEShell::ImpEndCreate() SdrObject::Free( pRemovedObject ); GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(true); - SwFlyFrm* pFlyFrm; - if( NewFlyFrm( aSet, true ) && + SwFlyFrame* pFlyFrame; + if( NewFlyFrame( aSet, true ) && ::GetHtmlMode( GetDoc()->GetDocShell() ) && - nullptr != ( pFlyFrm = GetSelectedFlyFrm() )) + nullptr != ( pFlyFrame = GetSelectedFlyFrame() )) { SfxItemSet aHtmlSet( GetDoc()->GetAttrPool(), RES_VERT_ORIENT, RES_HORI_ORIENT ); // horizontal orientation: - const bool bLeftFrm = aFlyRect.Left() < - pAnch->Frm().Left() + pAnch->Prt().Left(), + const bool bLeftFrame = aFlyRect.Left() < + pAnch->Frame().Left() + pAnch->Prt().Left(), bLeftPrt = aFlyRect.Left() + aFlyRect.Width() < - pAnch->Frm().Left() + pAnch->Prt().Width()/2; - if( bLeftFrm || bLeftPrt ) + pAnch->Frame().Left() + pAnch->Prt().Width()/2; + if( bLeftFrame || bLeftPrt ) { aHori.SetHoriOrient( text::HoriOrientation::LEFT ); - aHori.SetRelationOrient( bLeftFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bLeftFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } else { - const bool bRightFrm = aFlyRect.Left() > - pAnch->Frm().Left() + pAnch->Prt().Width(); + const bool bRightFrame = aFlyRect.Left() > + pAnch->Frame().Left() + pAnch->Prt().Width(); aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); - aHori.SetRelationOrient( bRightFrm ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); + aHori.SetRelationOrient( bRightFrame ? text::RelOrientation::FRAME : text::RelOrientation::PRINT_AREA ); } aHtmlSet.Put( aHori ); aVert.SetVertOrient( text::VertOrientation::TOP ); aVert.SetRelationOrient( text::RelOrientation::PRINT_AREA ); aHtmlSet.Put( aVert ); - GetDoc()->SetAttr( aHtmlSet, *pFlyFrm->GetFormat() ); + GetDoc()->SetAttr( aHtmlSet, *pFlyFrame->GetFormat() ); } } else @@ -1815,9 +1815,9 @@ bool SwFEShell::ImpEndCreate() SwFormatHoriOrient aHori( nXOffset, text::HoriOrientation::NONE, text::RelOrientation::FRAME ); aSet.Put( aHori ); // OD 2004-03-30 #i26791# - set vertical position - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); assert(pTmp && "Where's my Master?"); @@ -1848,9 +1848,9 @@ bool SwFEShell::ImpEndCreate() aVertical.SetVertOrient( text::VertOrientation::LINE_CENTER ); pFormat->SetFormatAttr( aVertical ); } - if( pAnch->IsTextFrm() && static_cast<const SwTextFrm*>(pAnch)->IsFollow() ) + if( pAnch->IsTextFrame() && static_cast<const SwTextFrame*>(pAnch)->IsFollow() ) { - const SwTextFrm* pTmp = static_cast<const SwTextFrm*>(pAnch); + const SwTextFrame* pTmp = static_cast<const SwTextFrame*>(pAnch); do { pTmp = pTmp->FindMaster(); OSL_ENSURE( pTmp, "Where's my Master?" ); @@ -1865,7 +1865,7 @@ bool SwFEShell::ImpEndCreate() // mark object at frame the object is inserted at. { - SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrm( *pAnch ); + SdrObject* pMarkObj = pContact->GetDrawObjectByAnchorFrame( *pAnch ); if ( pMarkObj ) { Imp()->GetDrawView()->MarkObj( pMarkObj, Imp()->GetPageView() ); @@ -1949,7 +1949,7 @@ bool SwFEShell::EndMark() // frames are not selected this way, except when // it is only one frame SdrMarkList &rMrkList = (SdrMarkList&)pDView->GetMarkedObjectList(); - SwFlyFrm* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); + SwFlyFrame* pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); if ( rMrkList.GetMarkCount() > 1 ) for ( size_t i = 0; i < rMrkList.GetMarkCount(); ++i ) @@ -2083,10 +2083,10 @@ Point SwFEShell::GetAnchorObjDiff() const Point aRet( aRect.TopLeft() ); - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { - SwFlyFrm *pFly = GetSelectedFlyFrm(); - aRet -= pFly->GetAnchorFrm()->Frm().Pos(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); + aRet -= pFly->GetAnchorFrame()->Frame().Pos(); } else { @@ -2158,7 +2158,7 @@ bool SwFEShell::IsGroupAllowed() const { bIsGroupAllowed = true; const SdrObject* pUpGroup = nullptr; - const SwFrm* pHeaderFooterFrm = nullptr; + const SwFrame* pHeaderFooterFrame = nullptr; const SdrMarkList &rMrkList = Imp()->GetDrawView()->GetMarkedObjectList(); for ( size_t i = 0; bIsGroupAllowed && i < rMrkList.GetMarkCount(); ++i ) { @@ -2175,14 +2175,14 @@ bool SwFEShell::IsGroupAllowed() const // same header/footer or not in header/footer. if ( bIsGroupAllowed ) { - const SwFrm* pAnchorFrm = nullptr; + const SwFrame* pAnchorFrame = nullptr; if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - const SwFlyFrm* pFlyFrm = - static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - if ( pFlyFrm ) + const SwFlyFrame* pFlyFrame = + static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + if ( pFlyFrame ) { - pAnchorFrm = pFlyFrm->GetAnchorFrm(); + pAnchorFrame = pFlyFrame->GetAnchorFrame(); } } else @@ -2190,19 +2190,19 @@ bool SwFEShell::IsGroupAllowed() const SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall( pObj )); if ( pDrawContact ) { - pAnchorFrm = pDrawContact->GetAnchorFrm( pObj ); + pAnchorFrame = pDrawContact->GetAnchorFrame( pObj ); } } - if ( pAnchorFrm ) + if ( pAnchorFrame ) { if ( i ) { bIsGroupAllowed = - ( pAnchorFrm->FindFooterOrHeader() == pHeaderFooterFrm ); + ( pAnchorFrame->FindFooterOrHeader() == pHeaderFooterFrame ); } else { - pHeaderFooterFrm = pAnchorFrm->FindFooterOrHeader(); + pHeaderFooterFrame = pAnchorFrame->FindFooterOrHeader(); } } } @@ -2272,7 +2272,7 @@ void SwFEShell::MirrorSelection( bool bHorizontal ) // jump to named frame (Graphic/OLE) -bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm ) +bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrame ) { bool bRet = false; static sal_uInt8 const aChkArr[ 4 ] = { @@ -2287,31 +2287,31 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm ) { SET_CURR_SHELL( this ); - SwFlyFrm* pFrm = SwIterator<SwFlyFrm,SwFormat>( *pFlyFormat ).First(); - if( pFrm ) + SwFlyFrame* pFrame = SwIterator<SwFlyFrame,SwFormat>( *pFlyFormat ).First(); + if( pFrame ) { - if( bSelFrm ) + if( bSelFrame ) { - SelectObj( pFrm->Frm().Pos(), 0, pFrm->GetVirtDrawObj() ); + SelectObj( pFrame->Frame().Pos(), 0, pFrame->GetVirtDrawObj() ); if( !ActionPend() ) - MakeVisible( pFrm->Frm() ); + MakeVisible( pFrame->Frame() ); } else { - SwContentFrm *pCFrm = pFrm->ContainsContent(); - if ( pCFrm ) + SwContentFrame *pCFrame = pFrame->ContainsContent(); + if ( pCFrame ) { - SwContentNode *pCNode = pCFrm->GetNode(); + SwContentNode *pCNode = pCFrame->GetNode(); ClearMark(); - SwPaM* pCrsr = GetCrsr(); + SwPaM* pCursor = GetCursor(); - pCrsr->GetPoint()->nNode = *pCNode; - pCrsr->GetPoint()->nContent.Assign( pCNode, 0 ); + pCursor->GetPoint()->nNode = *pCNode; + pCursor->GetPoint()->nContent.Assign( pCNode, 0 ); SwRect& rChrRect = (SwRect&)GetCharRect(); - rChrRect = pFrm->Prt(); - rChrRect.Pos() += pFrm->Frm().Pos(); - GetCrsrDocPos() = rChrRect.Pos(); + rChrRect = pFrame->Prt(); + rChrRect.Pos() += pFrame->Frame().Pos(); + GetCursorDocPos() = rChrRect.Pos(); } } bRet = true; @@ -2336,11 +2336,11 @@ void SwFEShell::MakeSelVisible() if ( Imp()->HasDrawView() && Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() ) { - GetCurrFrm(); // just to trigger formatting in case the selected object is not formatted. + GetCurrFrame(); // just to trigger formatting in case the selected object is not formatted. MakeVisible( Imp()->GetDrawView()->GetAllMarkedRect() ); } else - SwCrsrShell::MakeSelVisible(); + SwCursorShell::MakeSelVisible(); } // how is the selected object protected? @@ -2361,13 +2361,13 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); if ( (FlyProtectFlags::Content & eType) && pFly->GetFormat()->GetProtect().IsContentProtected() ) nChk |= FlyProtectFlags::Content; - if ( pFly->Lower() && pFly->Lower()->IsNoTextFrm() ) + if ( pFly->Lower() && pFly->Lower()->IsNoTextFrame() ) { - SwOLENode *pNd = static_cast<SwContentFrm*>(pFly->Lower())->GetNode()->GetOLENode(); + SwOLENode *pNd = static_cast<SwContentFrame*>(pFly->Lower())->GetNode()->GetOLENode(); uno::Reference < embed::XEmbeddedObject > xObj( pNd ? pNd->GetOLEObj().GetOleRef() : nullptr ); if ( xObj.is() ) { @@ -2392,13 +2392,13 @@ FlyProtectFlags SwFEShell::IsSelObjProtected( FlyProtectFlags eType ) const if( nChk == eType ) return eType; } - const SwFrm* pAnch; + const SwFrame* pAnch; if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) - pAnch = static_cast<SwVirtFlyDrawObj*>( pObj )->GetFlyFrm()->GetAnchorFrm(); + pAnch = static_cast<SwVirtFlyDrawObj*>( pObj )->GetFlyFrame()->GetAnchorFrame(); else { SwDrawContact* pTmp = static_cast<SwDrawContact*>(GetUserCall(pObj)); - pAnch = pTmp ? pTmp->GetAnchorFrm( pObj ) : nullptr; + pAnch = pTmp ? pTmp->GetAnchorFrame( pObj ) : nullptr; } if( pAnch && pAnch->IsProtected() ) return eType; @@ -2489,11 +2489,11 @@ void SwFEShell::CheckUnboundObjects() { const Rectangle &rBound = pObj->GetSnapRect(); const Point aPt( rBound.TopLeft() ); - const SwFrm *pPage = GetLayout()->Lower(); - const SwFrm *pLast = pPage; - while ( pPage && !pPage->Frm().IsInside( aPt ) ) + const SwFrame *pPage = GetLayout()->Lower(); + const SwFrame *pLast = pPage; + while ( pPage && !pPage->Frame().IsInside( aPt ) ) { - if ( aPt.Y() > pPage->Frm().Bottom() ) + if ( aPt.Y() > pPage->Frame().Bottom() ) pLast = pPage; pPage = pPage->GetNext(); } @@ -2509,8 +2509,8 @@ void SwFEShell::CheckUnboundObjects() SwFormatAnchor aAnch; { - const SwFrm *pAnch = ::FindAnchor( pPage, aPt, true ); - SwPosition aPos( *static_cast<const SwContentFrm*>(pAnch)->GetNode() ); + const SwFrame *pAnch = ::FindAnchor( pPage, aPt, true ); + SwPosition aPos( *static_cast<const SwContentFrame*>(pAnch)->GetNode() ); aAnch.SetType( FLY_AT_PARA ); aAnch.SetAnchor( &aPos ); const_cast<SwRect&>(GetCharRect()).Pos() = aPt; @@ -2572,8 +2572,8 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrameFormat &rSource, if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ) && dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr ) { - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); - rRect = pFly->Frm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); + rRect = pFly->Frame(); // Target and source should not be equal and the list // should not be cyclic @@ -2604,7 +2604,7 @@ SwChainRet SwFEShell::Chain( SwFrameFormat &rSource, const Point &rPt ) pDView->SetHitTolerancePixel( 0 ); pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ); pDView->SetHitTolerancePixel( nOld ); - SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); SwFlyFrameFormat *pFormat = pFly->GetFormat(); GetDoc()->Chain(rSource, *pFormat); @@ -2631,17 +2631,17 @@ void SwFEShell::SetChainMarker() { bool bDelFrom = true, bDelTo = true; - if ( IsFrmSelected() ) + if ( IsFrameSelected() ) { - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if ( pFly->GetPrevLink() ) { bDelFrom = false; - const SwFrm *pPre = pFly->GetPrevLink(); + const SwFrame *pPre = pFly->GetPrevLink(); - Point aStart( pPre->Frm().Right(), pPre->Frm().Bottom()); - Point aEnd(pFly->Frm().Pos()); + Point aStart( pPre->Frame().Right(), pPre->Frame().Bottom()); + Point aEnd(pFly->Frame().Pos()); if (!m_pChainFrom) { @@ -2652,10 +2652,10 @@ void SwFEShell::SetChainMarker() if ( pFly->GetNextLink() ) { bDelTo = false; - const SwFlyFrm *pNxt = pFly->GetNextLink(); + const SwFlyFrame *pNxt = pFly->GetNextLink(); - Point aStart( pFly->Frm().Right(), pFly->Frm().Bottom()); - Point aEnd(pNxt->Frm().Pos()); + Point aStart( pFly->Frame().Right(), pFly->Frame().Bottom()); + Point aEnd(pNxt->Frame().Pos()); if (!m_pChainTo) { @@ -2678,27 +2678,27 @@ void SwFEShell::SetChainMarker() long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const { - SwFrm *pFrm = GetCurrFrm(); - // Is the cursor at this moment in a SectionFrm? - if( pFrm && pFrm->IsInSct() ) + SwFrame *pFrame = GetCurrFrame(); + // Is the cursor at this moment in a SectionFrame? + if( pFrame && pFrame->IsInSct() ) { - SwSectionFrm* pSect = pFrm->FindSctFrm(); + SwSectionFrame* pSect = pFrame->FindSctFrame(); do { // Is it the right one? if( pSect->KnowsFormat( rFormat ) ) - return pSect->Frm().Width(); + return pSect->Frame().Width(); // for nested areas - pSect = pSect->GetUpper()->FindSctFrm(); + pSect = pSect->GetUpper()->FindSctFrame(); } while( pSect ); } - SwIterator<SwSectionFrm,SwFormat> aIter( rFormat ); - for ( SwSectionFrm* pSct = aIter.First(); pSct; pSct = aIter.Next() ) + SwIterator<SwSectionFrame,SwFormat> aIter( rFormat ); + for ( SwSectionFrame* pSct = aIter.First(); pSct; pSct = aIter.Next() ) { if( !pSct->IsFollow() ) { - return pSct->Frm().Width(); + return pSct->Frame().Width(); } } return 0; @@ -2916,16 +2916,16 @@ const Color SwFEShell::GetShapeBackgrd() const if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) == nullptr ) { // determine page frame of the frame the shape is anchored. - const SwFrm* pAnchorFrm = - static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj ); - OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!"); - if ( pAnchorFrm ) + const SwFrame* pAnchorFrame = + static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj ); + OSL_ENSURE( pAnchorFrame, "inconsistent modell - no anchor at shape!"); + if ( pAnchorFrame ) { - const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm(); - OSL_ENSURE( pPageFrm, "inconsistent modell - no page!"); - if ( pPageFrm ) + const SwPageFrame* pPageFrame = pAnchorFrame->FindPageFrame(); + OSL_ENSURE( pPageFrame, "inconsistent modell - no page!"); + if ( pPageFrame ) { - aRetColor = pPageFrm->GetDrawBackgrdColor(); + aRetColor = pPageFrame->GetDrawBackgrdColor(); } } } @@ -2964,16 +2964,16 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) == nullptr ) { // determine page frame of the frame the shape is anchored. - const SwFrm* pAnchorFrm = - static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrm( pSdrObj ); - OSL_ENSURE( pAnchorFrm, "inconsistent modell - no anchor at shape!"); - if ( pAnchorFrm ) + const SwFrame* pAnchorFrame = + static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj ); + OSL_ENSURE( pAnchorFrame, "inconsistent modell - no anchor at shape!"); + if ( pAnchorFrame ) { - const SwPageFrm* pPageFrm = pAnchorFrm->FindPageFrm(); - OSL_ENSURE( pPageFrm, "inconsistent modell - no page!"); - if ( pPageFrm ) + const SwPageFrame* pPageFrame = pAnchorFrame->FindPageFrame(); + OSL_ENSURE( pPageFrame, "inconsistent modell - no page!"); + if ( pPageFrame ) { - bRet = pPageFrm->IsRightToLeft(); + bRet = pPageFrame->IsRightToLeft(); } } } @@ -2986,14 +2986,14 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const Point SwFEShell::GetRelativePagePosition(const Point& rDocPos) { Point aRet(-1, -1); - const SwFrm *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->Frm().IsInside( rDocPos ) ) + const SwFrame *pPage = GetLayout()->Lower(); + while ( pPage && !pPage->Frame().IsInside( rDocPos ) ) { pPage = pPage->GetNext(); } if(pPage) { - aRet = rDocPos - pPage->Frm().TopLeft(); + aRet = rDocPos - pPage->Frame().TopLeft(); } return aRet; } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index d529b64dc3f5..a03f227e55a6 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -73,43 +73,43 @@ inline bool IsSame( long nA, long nB ) { return std::abs(nA-nB) <= COLFUZZY; } // table column cache SwTabCols *pLastCols = nullptr; const SwTable *g_pColumnCacheLastTable = nullptr; -const SwTabFrm *g_pColumnCacheLastTabFrm = nullptr; -const SwFrm *g_pColumnCacheLastCellFrm = nullptr; +const SwTabFrame *g_pColumnCacheLastTabFrame = nullptr; +const SwFrame *g_pColumnCacheLastCellFrame = nullptr; // table row cache SwTabCols *pLastRows = nullptr; const SwTable *g_pRowCacheLastTable = nullptr; -const SwTabFrm *g_pRowCacheLastTabFrm = nullptr; -const SwFrm *g_pRowCacheLastCellFrm = nullptr; +const SwTabFrame *g_pRowCacheLastTabFrame = nullptr; +const SwFrame *g_pRowCacheLastCellFrame = nullptr; class TableWait { const ::std::unique_ptr<SwWait> m_pWait; // this seems really fishy: do some locking, if an arbitrary number of lines is exceeded static const size_t our_kLineLimit = 20; - static bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2) - { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrm && our_kLineLimit < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); } + static bool ShouldWait(size_t nCnt, SwFrame *pFrame, size_t nCnt2) + { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrame && our_kLineLimit < pFrame->ImplFindTabFrame()->GetTable()->GetTabLines().size()); } public: - TableWait(size_t nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t nCnt2 = 0) - : m_pWait( ShouldWait(nCnt, pFrm, nCnt2) ? ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true )) : nullptr ) + TableWait(size_t nCnt, SwFrame *pFrame, SwDocShell &rDocShell, size_t nCnt2 = 0) + : m_pWait( ShouldWait(nCnt, pFrame, nCnt2) ? ::std::unique_ptr<SwWait>(new SwWait( rDocShell, true )) : nullptr ) { } }; void SwFEShell::ParkCursorInTab() { - SwCursor * pSwCrsr = GetSwCrsr(); + SwCursor * pSwCursor = GetSwCursor(); - OSL_ENSURE(pSwCrsr, "no SwCursor"); + OSL_ENSURE(pSwCursor, "no SwCursor"); - SwPosition aStartPos = *pSwCrsr->GetPoint(), aEndPos = aStartPos; + SwPosition aStartPos = *pSwCursor->GetPoint(), aEndPos = aStartPos; /* Search least and greatest position in current cursor ring. */ - for(SwPaM& rTmpCrsr : pSwCrsr->GetRingContainer()) + for(SwPaM& rTmpCursor : pSwCursor->GetRingContainer()) { - SwCursor* pTmpCrsr = static_cast<SwCursor *>(&rTmpCrsr); - const SwPosition * pPt = pTmpCrsr->GetPoint(), - * pMk = pTmpCrsr->GetMark(); + SwCursor* pTmpCursor = static_cast<SwCursor *>(&rTmpCursor); + const SwPosition * pPt = pTmpCursor->GetPoint(), + * pMk = pTmpCursor->GetMark(); if (*pPt < aStartPos) aStartPos = *pPt; @@ -132,8 +132,8 @@ void SwFEShell::ParkCursorInTab() /* Set cursor to end of selection to ensure IsLastCellInRow works properly. */ { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; } /* Move the cursor out of the columns to delete and stay in the @@ -146,15 +146,15 @@ void SwFEShell::ParkCursorInTab() it to the next cell. */ { - SwCursor aTmpCrsr( aStartPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aStartPos, nullptr, false ); + *pSwCursor = aTmpCursor; } - if (! pSwCrsr->GoPrevCell()) + if (! pSwCursor->GoPrevCell()) { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; - pSwCrsr->GoNextCell(); + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; + pSwCursor->GoNextCell(); } } else @@ -164,15 +164,15 @@ void SwFEShell::ParkCursorInTab() to the previous cell. */ { - SwCursor aTmpCrsr( aEndPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; + SwCursor aTmpCursor( aEndPos, nullptr, false ); + *pSwCursor = aTmpCursor; } - if (! pSwCrsr->GoNextCell()) + if (! pSwCursor->GoNextCell()) { - SwCursor aTmpCrsr( aStartPos, nullptr, false ); - *pSwCrsr = aTmpCrsr; - pSwCrsr->GoPrevCell(); + SwCursor aTmpCursor( aStartPos, nullptr, false ); + *pSwCursor = aTmpCursor; + pSwCursor->GoPrevCell(); } } } @@ -180,11 +180,11 @@ void SwFEShell::ParkCursorInTab() bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -200,7 +200,7 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) if (bSelectAll) { // Set the end of the selection to the last paragraph of the last cell of the table. - SwPaM* pPaM = getShellCrsr(false); + SwPaM* pPaM = getShellCursor(false); SwNode* pNode = pPaM->Start()->nNode.GetNode().FindTableNode()->EndOfSectionNode(); // pNode is the end node of the table, we want the last node before the end node of the last cell. pPaM->End()->nNode = pNode->GetIndex() - 2; @@ -208,7 +208,7 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) } GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_ROW ); - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); bool bRet = false; if ( aBoxes.size() ) @@ -221,11 +221,11 @@ bool SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -246,7 +246,7 @@ bool SwFEShell::InsertCol( sal_uInt16 nCnt, bool bBehind ) SwSelBoxes aBoxes; GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); bool bRet = false; if( !aBoxes.empty() ) @@ -276,11 +276,11 @@ bool SwFEShell::IsLastCellInRow() const bool SwFEShell::DeleteCol() { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -296,13 +296,13 @@ bool SwFEShell::DeleteCol() GetTableSel( *this, aBoxes, nsSwTableSearchType::TBLSEARCH_COL ); if ( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // remove crsr from the deletion area. // Put them behind/on the table; via the // document position they will be put to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); ParkCursorInTab(); @@ -327,11 +327,11 @@ bool SwFEShell::DeleteTable() bool SwFEShell::DeleteRow(bool bCompleteTable) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -348,7 +348,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // Delete cursors from the deletion area. // Then the cursor is: @@ -356,7 +356,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) // 2. the preceding row, if there is another row before this // 3. otherwise below the table { - SwTableNode* pTableNd = static_cast<SwContentFrm*>(pFrm)->GetNode()->FindTableNode(); + SwTableNode* pTableNd = static_cast<SwContentFrame*>(pFrame)->GetNode()->FindTableNode(); // search all boxes / lines _FndBox aFndBox( nullptr, nullptr ); @@ -422,7 +422,7 @@ bool SwFEShell::DeleteRow(bool bCompleteTable) if( pCNd ) { - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); pPam->GetPoint()->nNode = aIdx; pPam->GetPoint()->nContent.Assign( pCNd, 0 ); pPam->SetMark(); // both want something @@ -448,8 +448,8 @@ sal_uInt16 SwFEShell::MergeTab() sal_uInt16 nRet = TBLMERGE_NOSELECTION; if( IsTableMode() ) { - SwShellTableCrsr* pTableCrsr = GetTableCrsr(); - const SwTableNode* pTableNd = pTableCrsr->GetNode().FindTableNode(); + SwShellTableCursor* pTableCursor = GetTableCursor(); + const SwTableNode* pTableNd = pTableCursor->GetNode().FindTableNode(); if( dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, @@ -460,11 +460,11 @@ sal_uInt16 SwFEShell::MergeTab() SET_CURR_SHELL( this ); StartAllAction(); - TableWait aWait(pTableCrsr->GetSelectedBoxesCount(), nullptr, + TableWait aWait(pTableCursor->GetSelectedBoxesCount(), nullptr, *GetDoc()->GetDocShell(), pTableNd->GetTable().GetTabLines().size() ); - nRet = GetDoc()->MergeTable( *pTableCrsr ); + nRet = GetDoc()->MergeTable( *pTableCursor ); KillPams(); @@ -477,11 +477,11 @@ sal_uInt16 SwFEShell::MergeTab() bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) { // check if Point/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -503,7 +503,7 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) GetTableSel( *this, aBoxes ); if( !aBoxes.empty() ) { - TableWait aWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() ); + TableWait aWait( nCnt, pFrame, *GetDoc()->GetDocShell(), aBoxes.size() ); // now delete the columns bRet = GetDoc()->SplitTable( aBoxes, bVert, nCnt, bSameHeight ); @@ -517,9 +517,9 @@ bool SwFEShell::SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight ) return bRet; } -void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const +void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrame *pBox ) const { - const SwTabFrm *pTab = pBox->FindTabFrm(); + const SwTabFrame *pTab = pBox->FindTabFrame(); if ( pLastCols ) { bool bDel = true; @@ -528,23 +528,23 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const bDel = false; SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); - const sal_uLong nLeftMin = (pTab->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); - const sal_uLong nRightMax = (pTab->Frm().*fnRect->fnGetRight)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const SwPageFrame* pPage = pTab->FindPageFrame(); + const sal_uLong nLeftMin = (pTab->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); + const sal_uLong nRightMax = (pTab->Frame().*fnRect->fnGetRight)() - + (pPage->Frame().*fnRect->fnGetLeft)(); - if (g_pColumnCacheLastTabFrm != pTab) + if (g_pColumnCacheLastTabFrame != pTab) { - // if TabFrm was changed, we only shift a little bit + // if TabFrame was changed, we only shift a little bit // as the width is the same - SWRECTFNX( g_pColumnCacheLastTabFrm ) - if ((g_pColumnCacheLastTabFrm->Frm().*fnRectX->fnGetWidth)() == - (pTab->Frm().*fnRect->fnGetWidth)() ) + SWRECTFNX( g_pColumnCacheLastTabFrame ) + if ((g_pColumnCacheLastTabFrame->Frame().*fnRectX->fnGetWidth)() == + (pTab->Frame().*fnRect->fnGetWidth)() ) { pLastCols->SetLeftMin( nLeftMin ); - g_pColumnCacheLastTabFrm = pTab; + g_pColumnCacheLastTabFrame = pTab; } else bDel = true; @@ -556,11 +556,11 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const pLastCols->GetRight () == (sal_uInt16)(pTab->Prt().*fnRect->fnGetRight)()&& pLastCols->GetRightMax() == (sal_uInt16)nRightMax - pLastCols->GetLeftMin() ) { - if (g_pColumnCacheLastCellFrm != pBox) + if (g_pColumnCacheLastCellFrame != pBox) { pTab->GetTable()->GetTabCols( *pLastCols, - static_cast<const SwCellFrm*>(pBox)->GetTabBox(), true); - g_pColumnCacheLastCellFrm = pBox; + static_cast<const SwCellFrame*>(pBox)->GetTabBox(), true); + g_pColumnCacheLastCellFrame = pBox; } rToFill = *pLastCols; } @@ -572,12 +572,12 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastCols ) { - SwDoc::GetTabCols( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabCols( rToFill, nullptr, static_cast<const SwCellFrame*>(pBox) ); pLastCols = new SwTabCols( rToFill ); g_pColumnCacheLastTable = pTab->GetTable(); - g_pColumnCacheLastTabFrm = pTab; - g_pColumnCacheLastCellFrm= pBox; + g_pColumnCacheLastTabFrame = pTab; + g_pColumnCacheLastCellFrame= pBox; } #if OSL_DEBUG_LEVEL > 1 @@ -590,9 +590,9 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const #endif } -void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const +void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrame *pBox ) const { - const SwTabFrm *pTab = pBox->FindTabFrm(); + const SwTabFrame *pTab = pBox->FindTabFrame(); if ( pLastRows ) { bool bDel = true; @@ -600,15 +600,15 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const { bDel = false; SWRECTFN( pTab ) - const SwPageFrm* pPage = pTab->FindPageFrm(); + const SwPageFrame* pPage = pTab->FindPageFrame(); const long nLeftMin = ( bVert ? - pTab->GetPrtLeft() - pPage->Frm().Left() : - pTab->GetPrtTop() - pPage->Frm().Top() ); + pTab->GetPrtLeft() - pPage->Frame().Left() : + pTab->GetPrtTop() - pPage->Frame().Top() ); const long nLeft = bVert ? LONG_MAX : 0; const long nRight = (pTab->Prt().*fnRect->fnGetHeight)(); const long nRightMax = bVert ? nRight : LONG_MAX; - if (g_pRowCacheLastTabFrm != pTab || g_pRowCacheLastCellFrm != pBox) + if (g_pRowCacheLastTabFrame != pTab || g_pRowCacheLastCellFrame != pBox) bDel = true; if ( !bDel && @@ -627,18 +627,18 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastRows ) { - SwDoc::GetTabRows( rToFill, nullptr, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabRows( rToFill, nullptr, static_cast<const SwCellFrame*>(pBox) ); pLastRows = new SwTabCols( rToFill ); g_pRowCacheLastTable = pTab->GetTable(); - g_pRowCacheLastTabFrm = pTab; - g_pRowCacheLastCellFrm = pBox; + g_pRowCacheLastTabFrame = pTab; + g_pRowCacheLastCellFrame = pBox; } } void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) { - SwFrm *pBox = GetCurrFrm(); + SwFrame *pBox = GetCurrFrame(); if( !pBox || !pBox->IsInTab() ) return; @@ -647,39 +647,39 @@ void SwFEShell::SetTabCols( const SwTabCols &rNew, bool bCurRowOnly ) do { pBox = pBox->GetUpper(); - } while ( !pBox->IsCellFrm() ); + } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<SwCellFrm*>(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<SwCellFrame*>(pBox) ); EndAllActionAndCall(); } void SwFEShell::GetTabCols( SwTabCols &rToFill ) const { - const SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + const SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; do - { pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); + { pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); - _GetTabCols( rToFill, pFrm ); + _GetTabCols( rToFill, pFrame ); } void SwFEShell::GetTabRows( SwTabCols &rToFill ) const { - const SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + const SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; do - { pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); + { pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); - _GetTabRows( rToFill, pFrm ); + _GetTabRows( rToFill, pFrame ); } void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) { - SwFrm *pBox = GetCurrFrm(); + SwFrame *pBox = GetCurrFrame(); if( !pBox || !pBox->IsInTab() ) return; @@ -688,27 +688,27 @@ void SwFEShell::SetTabRows( const SwTabCols &rNew, bool bCurColOnly ) do { pBox = pBox->GetUpper(); - } while ( !pBox->IsCellFrm() ); + } while ( !pBox->IsCellFrame() ); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<SwCellFrm*>(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<SwCellFrame*>(pBox) ); EndAllActionAndCall(); } void SwFEShell::GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if ( pBox ) _GetTabRows( rToFill, pBox ); } void SwFEShell::SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt ) { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if( pBox ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<const SwCellFrm*>(pBox) ); + GetDoc()->SetTabRows( rNew, bCurColOnly, nullptr, static_cast<const SwCellFrame*>(pBox) ); EndAllActionAndCall(); } } @@ -717,26 +717,26 @@ void SwFEShell::SetRowSplit( const SwFormatRowSplit& rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowSplit( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowSplit( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } void SwFEShell::GetRowSplit( SwFormatRowSplit*& rpSz ) const { - SwDoc::GetRowSplit( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowSplit( *getShellCursor( false ), rpSz ); } -void SwFEShell::SetRowHeight( const SwFormatFrmSize &rNew ) +void SwFEShell::SetRowHeight( const SwFormatFrameSize &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowHeight( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowHeight( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } -void SwFEShell::GetRowHeight( SwFormatFrmSize *& rpSz ) const +void SwFEShell::GetRowHeight( SwFormatFrameSize *& rpSz ) const { - SwDoc::GetRowHeight( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowHeight( *getShellCursor( false ), rpSz ); } bool SwFEShell::BalanceRowHeight( bool bTstOnly ) @@ -744,7 +744,7 @@ bool SwFEShell::BalanceRowHeight( bool bTstOnly ) SET_CURR_SHELL( this ); if( !bTstOnly ) StartAllAction(); - bool bRet = GetDoc()->BalanceRowHeight( *getShellCrsr( false ), bTstOnly ); + bool bRet = GetDoc()->BalanceRowHeight( *getShellCursor( false ), bTstOnly ); if( !bTstOnly ) EndAllActionAndCall(); return bRet; @@ -754,20 +754,20 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetRowBackground( *getShellCrsr( false ), rNew ); + GetDoc()->SetRowBackground( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const { - return SwDoc::GetRowBackground( *getShellCrsr( false ), rToFill ); + return SwDoc::GetRowBackground( *getShellCursor( false ), rToFill ); } void SwFEShell::SetTabBorders( const SfxItemSet& rSet ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabBorders( *getShellCrsr( false ), rSet ); + GetDoc()->SetTabBorders( *getShellCursor( false ), rSet ); EndAllActionAndCall(); } @@ -776,73 +776,73 @@ void SwFEShell::SetTabLineStyle( const Color* pColor, bool bSetLine, { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabLineStyle( *getShellCrsr( false ), + GetDoc()->SetTabLineStyle( *getShellCursor( false ), pColor, bSetLine, pBorderLine ); EndAllActionAndCall(); } void SwFEShell::GetTabBorders( SfxItemSet& rSet ) const { - SwDoc::GetTabBorders( *getShellCrsr( false ), rSet ); + SwDoc::GetTabBorders( *getShellCursor( false ), rSet ); } void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), rNew ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const { - return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCursor( false ), rToFill ); } void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), rNew ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), rNew ); EndAllActionAndCall(); } bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const { - return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCursor( false ), rToFill ); } void SwFEShell::SetBoxAlign( sal_uInt16 nAlign ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAlign( *getShellCrsr( false ), nAlign ); + GetDoc()->SetBoxAlign( *getShellCursor( false ), nAlign ); EndAllActionAndCall(); } sal_uInt16 SwFEShell::GetBoxAlign() const { - return SwDoc::GetBoxAlign( *getShellCrsr( false ) ); + return SwDoc::GetBoxAlign( *getShellCursor( false ) ); } void SwFEShell::SetTabBackground( const SvxBrushItem &rNew ) { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return; SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetAttr( rNew, *pFrm->ImplFindTabFrm()->GetFormat() ); + GetDoc()->SetAttr( rNew, *pFrame->ImplFindTabFrame()->GetFormat() ); EndAllAction(); // no call, nothing changes! GetDoc()->getIDocumentState().SetModified(); } void SwFEShell::GetTabBackground( SvxBrushItem &rToFill ) const { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) - rToFill = pFrm->ImplFindTabFrm()->GetFormat()->makeBackgroundBrushItem(); + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) + rToFill = pFrame->ImplFindTabFrame()->GetFormat()->makeBackgroundBrushItem(); } bool SwFEShell::HasWholeTabSelection() const @@ -854,7 +854,7 @@ bool SwFEShell::HasWholeTabSelection() const ::GetTableSelCrs( *this, aBoxes ); if( !aBoxes.empty() ) { - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); return pTableNd && aBoxes[0]->GetSttIdx() - 1 == pTableNd->EndOfSectionNode()->StartOfSectionIndex() && aBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1 == pTableNd->EndOfSectionIndex(); @@ -865,12 +865,12 @@ bool SwFEShell::HasWholeTabSelection() const bool SwFEShell::HasBoxSelection() const { - if(!IsCrsrInTable()) + if(!IsCursorInTable()) return false; // whole table selected? if( IsTableMode() ) return true; - SwPaM* pPam = GetCrsr(); + SwPaM* pPam = GetCursor(); // empty boxes are also selected as the absence of selection bool bChg = false; if( pPam->GetPoint() == pPam->End()) @@ -912,9 +912,9 @@ void SwFEShell::ProtectCells() SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetBoxAttr( *getShellCrsr( false ), aProt ); + GetDoc()->SetBoxAttr( *getShellCursor( false ), aProt ); - if( !IsCrsrReadonly() ) + if( !IsCursorReadonly() ) { if( IsTableMode() ) ClearMark(); @@ -934,13 +934,13 @@ void SwFEShell::UnProtectCells() ::GetTableSelCrs( *this, aBoxes ); else { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } @@ -955,21 +955,21 @@ void SwFEShell::UnProtectTables() { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->UnProtectTables( *GetCrsr() ); + GetDoc()->UnProtectTables( *GetCursor() ); EndAllActionAndCall(); } bool SwFEShell::HasTableAnyProtection( const OUString* pTableName, bool* pFullTableProtection ) { - return GetDoc()->HasTableAnyProtection( GetCrsr()->GetPoint(), pTableName, + return GetDoc()->HasTableAnyProtection( GetCursor()->GetPoint(), pTableName, pFullTableProtection ); } bool SwFEShell::CanUnProtectCells() const { bool bUnProtectAvailable = false; - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); if( pTableNd && !pTableNd->IsProtect() ) { SwSelBoxes aBoxes; @@ -977,13 +977,13 @@ bool SwFEShell::CanUnProtectCells() const ::GetTableSelCrs( *this, aBoxes ); else { - SwFrm *pFrm = GetCurrFrm(); + SwFrame *pFrame = GetCurrFrame(); do { - pFrm = pFrm->GetUpper(); - } while ( pFrm && !pFrm->IsCellFrm() ); - if( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( pFrame && !pFrame->IsCellFrame() ); + if( pFrame ) { - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } } @@ -995,8 +995,8 @@ bool SwFEShell::CanUnProtectCells() const sal_uInt16 SwFEShell::GetRowsToRepeat() const { - const SwFrm *pFrm = GetCurrFrm(); - const SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr; + const SwFrame *pFrame = GetCurrFrame(); + const SwTabFrame *pTab = pFrame ? pFrame->FindTabFrame() : nullptr; if( pTab ) return pTab->GetTable()->GetRowsToRepeat(); return 0; @@ -1004,8 +1004,8 @@ sal_uInt16 SwFEShell::GetRowsToRepeat() const void SwFEShell::SetRowsToRepeat( sal_uInt16 nSet ) { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = pFrm ? pFrm->FindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = pFrame ? pFrame->FindTabFrame() : nullptr; if( pTab && pTab->GetTable()->GetRowsToRepeat() != nSet ) { SwWait aWait( *GetDoc()->GetDocShell(), true ); @@ -1022,26 +1022,26 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) sal_uInt16 nRet = USHRT_MAX; Point aTmpPt; const SwContentNode *pNd; - const SwContentFrm *pFrm; + const SwContentFrame *pFrame; if( nullptr != ( pNd = rPos.nNode.GetNode().GetContentNode() )) - pFrm = pNd->getLayoutFrm( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, &rPos, false ); + pFrame = pNd->getLayoutFrame( pNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aTmpPt, &rPos, false ); else - pFrm = nullptr; + pFrame = nullptr; - if ( pFrm && pFrm->IsInTab() ) + if ( pFrame && pFrame->IsInTab() ) { - const SwFrm* pRow = pFrm->GetUpper(); - while ( !pRow->GetUpper()->IsTabFrm() ) + const SwFrame* pRow = pFrame->GetUpper(); + while ( !pRow->GetUpper()->IsTabFrame() ) pRow = pRow->GetUpper(); - const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper()); - const SwTableLine* pTabLine = static_cast<const SwRowFrm*>(pRow)->GetTabLine(); + const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper()); + const SwTableLine* pTabLine = static_cast<const SwRowFrame*>(pRow)->GetTabLine(); sal_uInt16 nI = 0; - while ( nI < pTabFrm->GetTable()->GetTabLines().size() ) + while ( nI < pTabFrame->GetTable()->GetTabLines().size() ) { - if ( pTabFrm->GetTable()->GetTabLines()[ nI ] == pTabLine ) + if ( pTabFrame->GetTable()->GetTabLines()[ nI ] == pTabLine ) { nRet = nI; break; @@ -1056,7 +1056,7 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) sal_uInt16 SwFEShell::GetRowSelectionFromTop() const { sal_uInt16 nRet = 0; - const SwPaM* pPaM = IsTableMode() ? GetTableCrsr() : _GetCrsr(); + const SwPaM* pPaM = IsTableMode() ? GetTableCursor() : _GetCursor(); const sal_uInt16 nPtLine = lcl_GetRowNumber( *pPaM->GetPoint() ); if ( !IsTableMode() ) @@ -1091,18 +1091,18 @@ bool SwFEShell::CheckHeadline( bool bRepeat ) const bool bRet = false; if ( !IsTableMode() ) { - SwFrm *pFrm = GetCurrFrm(); // DONE MULTIIHEADER - SwTabFrm* pTab = (pFrm && pFrm->IsInTab()) ? pFrm->FindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); // DONE MULTIIHEADER + SwTabFrame* pTab = (pFrame && pFrame->IsInTab()) ? pFrame->FindTabFrame() : nullptr; if (pTab) { if ( bRepeat ) { - bRet = pTab->IsFollow() && pTab->IsInHeadline( *pFrm ); + bRet = pTab->IsFollow() && pTab->IsInHeadline( *pFrame ); } else { - bRet = static_cast<SwLayoutFrm*>(pTab->Lower())->IsAnLower( pFrm ) || - pTab->IsInHeadline( *pFrm ); + bRet = static_cast<SwLayoutFrame*>(pTab->Lower())->IsAnLower( pFrame ) || + pTab->IsInHeadline( *pFrame ); } } } @@ -1119,7 +1119,7 @@ void SwFEShell::AdjustCellWidth( bool bBalance ) TableWait aWait(::std::numeric_limits<size_t>::max(), nullptr, *GetDoc()->GetDocShell()); - GetDoc()->AdjustCellWidth( *getShellCrsr( false ), bBalance ); + GetDoc()->AdjustCellWidth( *getShellCursor( false ), bBalance ); EndAllActionAndCall(); } @@ -1127,8 +1127,8 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const { // at least one row with content should be contained in the selection - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; SwSelBoxes aBoxes; @@ -1141,14 +1141,14 @@ bool SwFEShell::IsAdjustCellWidthAllowed( bool bBalance ) const { do { - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - while (pFrm && !pFrm->IsCellFrm()); + while (pFrame && !pFrame->IsCellFrame()); - if (!pFrm) + if (!pFrame) return false; - SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox())); + SwTableBox *pBox = const_cast<SwTableBox*>(static_cast<const SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox())); aBoxes.insert( pBox ); } @@ -1180,7 +1180,7 @@ bool SwFEShell::SetTableStyle(const SwTableAutoFormat& rStyle) // make sure SwDoc has the style GetDoc()->GetTableStyles().AddAutoFormat(rStyle); - SwTableNode *pTableNode = const_cast<SwTableNode*>(IsCrsrInTable()); + SwTableNode *pTableNode = const_cast<SwTableNode*>(IsCursorInTable()); if (!pTableNode) return false; @@ -1193,7 +1193,7 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD { if (!pTableNode) { - pTableNode = const_cast<SwTableNode*>(IsCrsrInTable()); + pTableNode = const_cast<SwTableNode*>(IsCursorInTable()); if (!pTableNode || pTableNode->GetTable().IsTableComplex()) return false; } @@ -1206,7 +1206,7 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD SwSelBoxes aBoxes; if ( !IsTableMode() ) // if cursors are not current - GetCrsr(); + GetCursor(); // whole table or only current selection if( IsTableMode() ) @@ -1238,14 +1238,14 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool bResetD bool SwFEShell::GetTableAutoFormat( SwTableAutoFormat& rGet ) { - const SwTableNode *pTableNd = IsCrsrInTable(); + const SwTableNode *pTableNd = IsCursorInTable(); if( !pTableNd || pTableNd->GetTable().IsTableComplex() ) return false; SwSelBoxes aBoxes; if ( !IsTableMode() ) // if cursor are not current - GetCrsr(); + GetCursor(); // whole table or only current selection if( IsTableMode() ) @@ -1266,11 +1266,11 @@ bool SwFEShell::GetTableAutoFormat( SwTableAutoFormat& rGet ) bool SwFEShell::DeleteTableSel() { // check if SPoint/Mark of current cursor are in a table - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - if( dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + if( dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -1286,14 +1286,14 @@ bool SwFEShell::DeleteTableSel() GetTableSelCrs( *this, aBoxes ); if( !aBoxes.empty() ) { - TableWait aWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() ); + TableWait aWait( aBoxes.size(), pFrame, *GetDoc()->GetDocShell() ); // cursor should be removed from deletion area. // Put them behind/on the table; via the document // position they'll be set to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); - ParkCrsr( SwNodeIndex( *static_cast<SwCellFrm*>(pFrm)->GetTabBox()->GetSttNd() )); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); + ParkCursor( SwNodeIndex( *static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetSttNd() )); bRet = GetDoc()->DeleteRowCol( aBoxes ); @@ -1311,27 +1311,27 @@ size_t SwFEShell::GetCurTabColNum() const //!!!GetCurMouseTabColNum() mitpflegen!!!! size_t nRet = 0; - SwFrm *pFrm = GetCurrFrm(); - OSL_ENSURE( pFrm, "Crsr parked?" ); + SwFrame *pFrame = GetCurrFrame(); + OSL_ENSURE( pFrame, "Cursor parked?" ); // check if SPoint/Mark of current cursor are in a table - if( pFrm && pFrm->IsInTab() ) + if( pFrame && pFrame->IsInTab() ) { do { // JP 26.09.95: why compare with ContentFrame // and not with CellFrame ???? - pFrm = pFrm->GetUpper(); - } while ( !pFrm->IsCellFrm() ); - SWRECTFN( pFrm ) + pFrame = pFrame->GetUpper(); + } while ( !pFrame->IsCellFrame() ); + SWRECTFN( pFrame ) - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); // get TabCols, as only via these we get to the position SwTabCols aTabCols; GetTabCols( aTabCols ); - if( pFrm->FindTabFrm()->IsRightToLeft() ) + if( pFrame->FindTabFrame()->IsRightToLeft() ) { - long nX = (pFrm->Frm().*fnRect->fnGetRight)() - (pPage->Frm().*fnRect->fnGetLeft)(); + long nX = (pFrame->Frame().*fnRect->fnGetRight)() - (pPage->Frame().*fnRect->fnGetLeft)(); const long nRight = aTabCols.GetLeftMin() + aTabCols.GetRight();; @@ -1348,8 +1348,8 @@ size_t SwFEShell::GetCurTabColNum() const } else { - const long nX = (pFrm->Frm().*fnRect->fnGetLeft)() - - (pPage->Frm().*fnRect->fnGetLeft)(); + const long nX = (pFrame->Frame().*fnRect->fnGetLeft)() - + (pPage->Frame().*fnRect->fnGetLeft)(); const long nLeft = aTabCols.GetLeftMin(); @@ -1367,31 +1367,31 @@ size_t SwFEShell::GetCurTabColNum() const return nRet; } -static const SwFrm *lcl_FindFrmInTab( const SwLayoutFrm *pLay, const Point &rPt, SwTwips nFuzzy ) +static const SwFrame *lcl_FindFrameInTab( const SwLayoutFrame *pLay, const Point &rPt, SwTwips nFuzzy ) { - const SwFrm *pFrm = pLay->Lower(); + const SwFrame *pFrame = pLay->Lower(); - while( pFrm && pLay->IsAnLower( pFrm ) ) + while( pFrame && pLay->IsAnLower( pFrame ) ) { - if ( pFrm->Frm().IsNear( rPt, nFuzzy ) ) + if ( pFrame->Frame().IsNear( rPt, nFuzzy ) ) { - if ( pFrm->IsLayoutFrm() ) + if ( pFrame->IsLayoutFrame() ) { - const SwFrm *pTmp = ::lcl_FindFrmInTab( static_cast<const SwLayoutFrm*>(pFrm), rPt, nFuzzy ); + const SwFrame *pTmp = ::lcl_FindFrameInTab( static_cast<const SwLayoutFrame*>(pFrame), rPt, nFuzzy ); if ( pTmp ) return pTmp; } - return pFrm; + return pFrame; } - pFrm = pFrm->FindNext(); + pFrame = pFrame->FindNext(); } return nullptr; } -static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, +static const SwCellFrame *lcl_FindFrame( const SwLayoutFrame *pLay, const Point &rPt, SwTwips nFuzzy, bool* pbRow, bool* pbCol ) { // bMouseMoveRowCols : @@ -1403,39 +1403,39 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, bool bCloseToRow = false; bool bCloseToCol = false; - const SwFrm *pFrm = pLay->ContainsContent(); - const SwFrm* pRet = nullptr; + const SwFrame *pFrame = pLay->ContainsContent(); + const SwFrame* pRet = nullptr; - if ( pFrm ) + if ( pFrame ) { do { - if ( pFrm->IsInTab() ) - pFrm = const_cast<SwFrm*>(pFrm)->ImplFindTabFrm(); + if ( pFrame->IsInTab() ) + pFrame = const_cast<SwFrame*>(pFrame)->ImplFindTabFrame(); - if (!pFrm) + if (!pFrame) break; - if ( pFrm->IsTabFrm() ) + if ( pFrame->IsTabFrame() ) { Point aPt( rPt ); - bool bSearchForFrmInTab = true; + bool bSearchForFrameInTab = true; SwTwips nTmpFuzzy = nFuzzy; if ( !bMouseMoveRowCols ) { // We ignore nested tables for the enhanced table selection: - while ( pFrm->GetUpper()->IsInTab() ) - pFrm = pFrm->GetUpper()->FindTabFrm(); + while ( pFrame->GetUpper()->IsInTab() ) + pFrame = pFrame->GetUpper()->FindTabFrame(); // We first check if the given point is 'close' to the left or top // border of the table frame: - OSL_ENSURE( pFrm, "Nested table frame without outer table" ); - SWRECTFN( pFrm ) - const bool bRTL = pFrm->IsRightToLeft(); + OSL_ENSURE( pFrame, "Nested table frame without outer table" ); + SWRECTFN( pFrame ) + const bool bRTL = pFrame->IsRightToLeft(); - SwRect aTabRect = pFrm->Prt(); - aTabRect.Pos() += pFrm->Frm().Pos(); + SwRect aTabRect = pFrame->Prt(); + aTabRect.Pos() += pFrame->Frame().Pos(); const SwTwips nLeft = bRTL ? (aTabRect.*fnRect->fnGetRight)() : @@ -1453,11 +1453,11 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, if ( bCloseToCol && 2 * nYDiff > nFuzzy ) { - const SwFrm* pPrev = pFrm->GetPrev(); + const SwFrame* pPrev = pFrame->GetPrev(); if ( pPrev ) { SwRect aPrevRect = pPrev->Prt(); - aPrevRect.Pos() += pPrev->Frm().Pos(); + aPrevRect.Pos() += pPrev->Frame().Pos(); if( aPrevRect.IsInside( rPt ) ) { @@ -1477,29 +1477,29 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, rPointY = nTop; if ( !bCloseToRow && !bCloseToCol ) - bSearchForFrmInTab = false; + bSearchForFrameInTab = false; - // Since the point has been adjusted, we call lcl_FindFrmInTab() + // Since the point has been adjusted, we call lcl_FindFrameInTab() // with a fuzzy value of 1: nTmpFuzzy = 1; } - const SwFrm* pTmp = bSearchForFrmInTab ? - ::lcl_FindFrmInTab( static_cast<const SwLayoutFrm*>(pFrm), aPt, nTmpFuzzy ) : + const SwFrame* pTmp = bSearchForFrameInTab ? + ::lcl_FindFrameInTab( static_cast<const SwLayoutFrame*>(pFrame), aPt, nTmpFuzzy ) : nullptr; if ( pTmp ) { - pFrm = pTmp; + pFrame = pTmp; break; } } - pFrm = pFrm->FindNextCnt(); + pFrame = pFrame->FindNextCnt(); - } while ( pFrm && pLay->IsAnLower( pFrm ) ); + } while ( pFrame && pLay->IsAnLower( pFrame ) ); } - if ( pFrm && pFrm->IsInTab() && pLay->IsAnLower( pFrm ) ) + if ( pFrame && pFrame->IsInTab() && pLay->IsAnLower( pFrame ) ) { do { @@ -1508,20 +1508,20 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, if ( bMouseMoveRowCols ) { // find the next cell frame - while ( pFrm && !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while ( pFrame && !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); } else { // find the most upper cell frame: - while ( pFrm && - ( !pFrm->IsCellFrm() || - !pFrm->GetUpper()->GetUpper()->IsTabFrm() || - pFrm->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) - pFrm = pFrm->GetUpper(); + while ( pFrame && + ( !pFrame->IsCellFrame() || + !pFrame->GetUpper()->GetUpper()->IsTabFrame() || + pFrame->GetUpper()->GetUpper()->GetUpper()->IsInTab() ) ) + pFrame = pFrame->GetUpper(); } - if ( pFrm ) // Note: this condition should be the same like the while condition!!! + if ( pFrame ) // Note: this condition should be the same like the while condition!!! { // #i32329# Enhanced table selection // used for hotspot selection of tab/cols/rows @@ -1534,18 +1534,18 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, { *pbRow = bCloseToRow; *pbCol = bCloseToCol; - pRet = pFrm; + pRet = pFrame; break; } } else { // used for mouse move of columns/rows - const SwTabFrm* pTabFrm = pFrm->FindTabFrm(); - SwRect aTabRect = pTabFrm->Prt(); - aTabRect.Pos() += pTabFrm->Frm().Pos(); + const SwTabFrame* pTabFrame = pFrame->FindTabFrame(); + SwRect aTabRect = pTabFrame->Prt(); + aTabRect.Pos() += pTabFrame->Frame().Pos(); - SWRECTFN( pTabFrm ) + SWRECTFN( pTabFrame ) const SwTwips nTabTop = (aTabRect.*fnRect->fnGetTop)(); const SwTwips nMouseTop = bVert ? rPt.X() : rPt.Y(); @@ -1553,31 +1553,31 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, // Do not allow to drag upper table border: if ( !::IsSame( nTabTop, nMouseTop ) ) { - if ( ::IsSame( pFrm->Frm().Left(), rPt.X() ) || - ::IsSame( pFrm->Frm().Right(),rPt.X() ) ) + if ( ::IsSame( pFrame->Frame().Left(), rPt.X() ) || + ::IsSame( pFrame->Frame().Right(),rPt.X() ) ) { if ( pbRow ) *pbRow = false; - pRet = pFrm; + pRet = pFrame; break; } - if ( ::IsSame( pFrm->Frm().Top(), rPt.Y() ) || - ::IsSame( pFrm->Frm().Bottom(),rPt.Y() ) ) + if ( ::IsSame( pFrame->Frame().Top(), rPt.Y() ) || + ::IsSame( pFrame->Frame().Bottom(),rPt.Y() ) ) { if ( pbRow ) *pbRow = true; - pRet = pFrm; + pRet = pFrame; break; } } } - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - } while ( pFrm ); + } while ( pFrame ); } // robust: - OSL_ENSURE( !pRet || pRet->IsCellFrm(), "lcl_FindFrm() is supposed to find a cell frame!" ); - return pRet && pRet->IsCellFrm() ? static_cast<const SwCellFrm*>(pRet) : nullptr; + OSL_ENSURE( !pRet || pRet->IsCellFrame(), "lcl_FindFrame() is supposed to find a cell frame!" ); + return pRet && pRet->IsCellFrame() ? static_cast<const SwCellFrame*>(pRet) : nullptr; } // pbCol = 0 => Used for moving table rows/cols with mouse @@ -1585,9 +1585,9 @@ static const SwCellFrm *lcl_FindFrm( const SwLayoutFrm *pLay, const Point &rPt, #define ENHANCED_TABLE_SELECTION_FUZZY 10 -const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) const +const SwFrame* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) const { - const SwPageFrm *pPage = static_cast<SwPageFrm*>(GetLayout()->Lower()); + const SwPageFrame *pPage = static_cast<SwPageFrame*>(GetLayout()->Lower()); vcl::Window* pOutWin = GetWin(); SwTwips nFuzzy = COLFUZZY; if( pOutWin ) @@ -1599,13 +1599,13 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con nFuzzy = aTmp.Width(); } - while ( pPage && !pPage->Frm().IsNear( rPt, nFuzzy ) ) - pPage = static_cast<const SwPageFrm*>(pPage->GetNext()); + while ( pPage && !pPage->Frame().IsNear( rPt, nFuzzy ) ) + pPage = static_cast<const SwPageFrame*>(pPage->GetNext()); - const SwCellFrm *pFrm = nullptr; + const SwCellFrame *pFrame = nullptr; if ( pPage ) { - // We cannot search the box by GetCrsrOfst or GetContentPos. + // We cannot search the box by GetCursorOfst or GetContentPos. // This would lead to a performance collapse for documents // with a lot of paragraphs/tables on one page //(BrowseMode!) @@ -1613,24 +1613,24 @@ const SwFrm* SwFEShell::GetBox( const Point &rPt, bool* pbRow, bool* pbCol ) con // check flys first if ( pPage->GetSortedObjs() ) { - for ( size_t i = 0; !pFrm && i < pPage->GetSortedObjs()->size(); ++i ) + for ( size_t i = 0; !pFrame && i < pPage->GetSortedObjs()->size(); ++i ) { SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i]; - if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr ) + if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr ) { - pFrm = lcl_FindFrm( static_cast<SwFlyFrm*>(pObj), + pFrame = lcl_FindFrame( static_cast<SwFlyFrame*>(pObj), rPt, nFuzzy, pbRow, pbCol ); } } } - const SwLayoutFrm *pLay = static_cast<const SwLayoutFrm*>(pPage->Lower()); - while ( pLay && !pFrm ) + const SwLayoutFrame *pLay = static_cast<const SwLayoutFrame*>(pPage->Lower()); + while ( pLay && !pFrame ) { - pFrm = lcl_FindFrm( pLay, rPt, nFuzzy, pbRow, pbCol ); - pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext()); + pFrame = lcl_FindFrame( pLay, rPt, nFuzzy, pbRow, pbCol ); + pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext()); } } - return pFrm; + return pFrame; } /* Helper function*/ @@ -1664,10 +1664,10 @@ static double lcl_DistancePoint2Segment( const Point& rA, const Point& rB, const } /* Helper function*/ -static Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& rPoint, bool bRowDrag ) +static Point lcl_ProjectOntoClosestTableFrame( const SwTabFrame& rTab, const Point& rPoint, bool bRowDrag ) { Point aRet( rPoint ); - const SwTabFrm* pCurrentTab = &rTab; + const SwTabFrame* pCurrentTab = &rTab; const bool bVert = pCurrentTab->IsVertical(); const bool bRTL = pCurrentTab->IsRightToLeft(); @@ -1704,7 +1704,7 @@ static Point lcl_ProjectOntoClosestTableFrm( const SwTabFrm& rTab, const Point& while ( pCurrentTab ) { SwRect aTabRect( pCurrentTab->Prt() ); - aTabRect += pCurrentTab->Frm().Pos(); + aTabRect += pCurrentTab->Frame().Pos(); if ( bLeft ) { @@ -1774,57 +1774,57 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr // pEnd is set during dragging. for ( sal_uInt16 i = 0; i < ( pEnd ? 2 : 1 ); ++i ) { - const SwCellFrm* pFrm = - static_cast<const SwCellFrm*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) ); + const SwCellFrame* pFrame = + static_cast<const SwCellFrame*>(GetBox( paPt[i], &pbRow[i], &pbCol[i] ) ); - if( pFrm ) + if( pFrame ) { - while( pFrm && pFrm->Lower() && pFrm->Lower()->IsRowFrm() ) - pFrm = static_cast<const SwCellFrm*>( static_cast<const SwLayoutFrm*>( pFrm->Lower() )->Lower() ); - if( pFrm && pFrm->GetTabBox()->GetSttNd() && - pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() ) - pFrm = nullptr; + while( pFrame && pFrame->Lower() && pFrame->Lower()->IsRowFrame() ) + pFrame = static_cast<const SwCellFrame*>( static_cast<const SwLayoutFrame*>( pFrame->Lower() )->Lower() ); + if( pFrame && pFrame->GetTabBox()->GetSttNd() && + pFrame->GetTabBox()->GetSttNd()->IsInProtectSect() ) + pFrame = nullptr; } - if ( pFrm ) + if ( pFrame ) { - const SwContentFrm* pContent = ::GetCellContent( *pFrm ); + const SwContentFrame* pContent = ::GetCellContent( *pFrame ); - if ( pContent && pContent->IsTextFrm() ) + if ( pContent && pContent->IsTextFrame() ) { ppPos[i] = new SwPosition( *pContent->GetNode() ); ppPos[i]->nContent.Assign( const_cast<SwContentNode*>(pContent->GetNode()), 0 ); // paPt[i] will not be used any longer, now we use it to store // a position inside the content frame - paPt[i] = pContent->Frm().Center(); + paPt[i] = pContent->Frame().Center(); } } // no calculation of end frame if start frame has not been found. - if ( 1 == i || !ppPos[0] || !pEnd || !pFrm ) + if ( 1 == i || !ppPos[0] || !pEnd || !pFrame ) break; // find 'closest' table frame to pEnd: - const SwTabFrm* pCurrentTab = pFrm->FindTabFrm(); + const SwTabFrame* pCurrentTab = pFrame->FindTabFrame(); if ( pCurrentTab->IsFollow() ) pCurrentTab = pCurrentTab->FindMaster( true ); - const Point aProjection = lcl_ProjectOntoClosestTableFrm( *pCurrentTab, *pEnd, bRowDrag ); + const Point aProjection = lcl_ProjectOntoClosestTableFrame( *pCurrentTab, *pEnd, bRowDrag ); paPt[1] = aProjection; } if ( ppPos[0] ) { - SwShellCrsr* pCrsr = _GetCrsr(); - SwCrsrSaveState aSaveState( *pCrsr ); - SwPosition aOldPos( *pCrsr->GetPoint() ); + SwShellCursor* pCursor = _GetCursor(); + SwCursorSaveState aSaveState( *pCursor ); + SwPosition aOldPos( *pCursor->GetPoint() ); - pCrsr->DeleteMark(); - *pCrsr->GetPoint() = *ppPos[0]; - pCrsr->GetPtPos() = paPt[0]; + pCursor->DeleteMark(); + *pCursor->GetPoint() = *ppPos[0]; + pCursor->GetPtPos() = paPt[0]; - if ( !pCrsr->IsInProtectTable() ) + if ( !pCursor->IsInProtectTable() ) { bool bNewSelection = true; @@ -1833,20 +1833,20 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr if ( ppPos[1]->nNode.GetNode().StartOfSectionNode() != aOldPos.nNode.GetNode().StartOfSectionNode() ) { - pCrsr->SetMark(); - SwCrsrSaveState aSaveState2( *pCrsr ); - *pCrsr->GetPoint() = *ppPos[1]; - pCrsr->GetPtPos() = paPt[1]; + pCursor->SetMark(); + SwCursorSaveState aSaveState2( *pCursor ); + *pCursor->GetPoint() = *ppPos[1]; + pCursor->GetPtPos() = paPt[1]; - if ( pCrsr->IsInProtectTable( false, false ) ) + if ( pCursor->IsInProtectTable( false, false ) ) { - pCrsr->RestoreSavePos(); + pCursor->RestoreSavePos(); bNewSelection = false; } } else { - pCrsr->RestoreSavePos(); + pCursor->RestoreSavePos(); bNewSelection = false; } } @@ -1856,14 +1856,14 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr // #i35543# SelTableRowCol should remove any existing // table cursor: if ( IsTableMode() ) - TableCrsrToCursor(); + TableCursorToCursor(); if ( pbRow[0] && pbCol[0] ) - bRet = SwCrsrShell::SelTable(); + bRet = SwCursorShell::SelTable(); else if ( pbRow[0] ) - bRet = SwCrsrShell::_SelTableRowOrCol( true, true ); + bRet = SwCursorShell::_SelTableRowOrCol( true, true ); else if ( pbCol[0] ) - bRet = SwCrsrShell::_SelTableRowOrCol( false, true ); + bRet = SwCursorShell::_SelTableRowOrCol( false, true ); } else bRet = true; @@ -1884,37 +1884,37 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const bool bSelect = false; // First try: Do we get the row/col move cursor? - const SwCellFrm* pFrm = static_cast<const SwCellFrm*>(GetBox( rPt, &bRow )); + const SwCellFrame* pFrame = static_cast<const SwCellFrame*>(GetBox( rPt, &bRow )); - if ( !pFrm ) + if ( !pFrame ) { // Second try: Do we get the row/col/tab selection cursor? - pFrm = static_cast<const SwCellFrm*>(GetBox( rPt, &bRow, &bCol )); + pFrame = static_cast<const SwCellFrame*>(GetBox( rPt, &bRow, &bCol )); bSelect = true; } - if( pFrm ) + if( pFrame ) { - while( pFrm && pFrm->Lower() && pFrm->Lower()->IsRowFrm() ) - pFrm = static_cast<const SwCellFrm*>(static_cast<const SwLayoutFrm*>(pFrm->Lower())->Lower()); - if( pFrm && pFrm->GetTabBox()->GetSttNd() && - pFrm->GetTabBox()->GetSttNd()->IsInProtectSect() ) - pFrm = nullptr; + while( pFrame && pFrame->Lower() && pFrame->Lower()->IsRowFrame() ) + pFrame = static_cast<const SwCellFrame*>(static_cast<const SwLayoutFrame*>(pFrame->Lower())->Lower()); + if( pFrame && pFrame->GetTabBox()->GetSttNd() && + pFrame->GetTabBox()->GetSttNd()->IsInProtectSect() ) + pFrame = nullptr; } - if( pFrm ) + if( pFrame ) { if ( !bSelect ) { - if ( pFrm->IsVertical() ) + if ( pFrame->IsVertical() ) nRet = bRow ? SwTab::COL_VERT : SwTab::ROW_VERT; else nRet = bRow ? SwTab::ROW_HORI : SwTab::COL_HORI; } else { - const SwTabFrm* pTabFrm = pFrm->FindTabFrm(); - if ( pTabFrm->IsVertical() ) + const SwTabFrame* pTabFrame = pFrame->FindTabFrame(); + if ( pTabFrame->IsVertical() ) { if ( bRow && bCol ) { @@ -1933,13 +1933,13 @@ SwTab SwFEShell::WhichMouseTabCol( const Point &rPt ) const { if ( bRow && bCol ) { - nRet = pTabFrm->IsRightToLeft() ? + nRet = pTabFrame->IsRightToLeft() ? SwTab::SEL_HORI_RTL : SwTab::SEL_HORI; } else if ( bRow ) { - nRet = pTabFrm->IsRightToLeft() ? + nRet = pTabFrame->IsRightToLeft() ? SwTab::ROWSEL_HORI_RTL : SwTab::ROWSEL_HORI; } @@ -2016,7 +2016,7 @@ bool SwFEShell::IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode, void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if ( pBox ) _GetTabCols( rToFill, pBox ); } @@ -2024,12 +2024,12 @@ void SwFEShell::GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const void SwFEShell::SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly, const Point &rPt ) { - const SwFrm *pBox = GetBox( rPt ); + const SwFrame *pBox = GetBox( rPt ); if( pBox ) { SET_CURR_SHELL( this ); StartAllAction(); - GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<const SwCellFrm*>(pBox) ); + GetDoc()->SetTabCols( rNew, bCurRowOnly, nullptr, static_cast<const SwCellFrame*>(pBox) ); EndAllActionAndCall(); } } @@ -2045,11 +2045,11 @@ size_t SwFEShell::GetCurMouseTabColNum( const Point &rPt ) const //!!!GetCurTabColNum() mitpflegen!!!! size_t nRet = 0; - const SwFrm *pFrm = GetBox( rPt ); - OSL_ENSURE( pFrm, "Table not found" ); - if( pFrm ) + const SwFrame *pFrame = GetBox( rPt ); + OSL_ENSURE( pFrame, "Table not found" ); + if( pFrame ) { - const long nX = pFrm->Frm().Left(); + const long nX = pFrame->Frame().Left(); // get TabCols, only via these we get the position SwTabCols aTabCols; @@ -2078,19 +2078,19 @@ void ClearFEShellTabCols() void SwFEShell::GetTableAttr( SfxItemSet &rSet ) const { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) - rSet.Put( pFrm->ImplFindTabFrm()->GetFormat()->GetAttrSet() ); + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) + rSet.Put( pFrame->ImplFindTabFrame()->GetFormat()->GetAttrSet() ); } void SwFEShell::SetTableAttr( const SfxItemSet &rNew ) { - SwFrm *pFrm = GetCurrFrm(); - if( pFrm && pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( pFrame && pFrame->IsInTab() ) { SET_CURR_SHELL( this ); StartAllAction(); - SwTabFrm *pTab = pFrm->FindTabFrm(); + SwTabFrame *pTab = pFrame->FindTabFrame(); pTab->GetTable()->SetHTMLTableLayout( nullptr ); GetDoc()->SetAttr( rNew, *pTab->GetFormat() ); GetDoc()->getIDocumentState().SetModified(); @@ -2103,11 +2103,11 @@ void SwFEShell::SetTableAttr( const SfxItemSet &rNew ) * @param bUp true: move up, false: move down * @returns true if successful */ -static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) +static bool lcl_GoTableRow( SwCursorShell* pShell, bool bUp ) { OSL_ENSURE( pShell != nullptr, "need shell" ); - SwPaM* pPam = pShell->GetCrsr(); + SwPaM* pPam = pShell->GetCursor(); const SwStartNode* pTableBox = pPam->GetNode().FindTableBoxStartNode(); OSL_ENSURE( pTableBox != nullptr, "I'm living in a box... NOT!" ); @@ -2127,12 +2127,12 @@ static bool lcl_GoTableRow( SwCrsrShell* pShell, bool bUp ) // aender eine Zellenbreite/-Hoehe/Spaltenbreite/Zeilenhoehe bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; if( nsTableChgWidthHeightType::WH_FLAG_INSDEL & eType && - dynamic_cast< const SwDDETable* >(pFrm->ImplFindTabFrm()->GetTable()) != nullptr ) + dynamic_cast< const SwDDETable* >(pFrame->ImplFindTabFrame()->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, ERRCODE_MSG_INFO | ERRCODE_BUTTON_DEF_OK ); @@ -2143,22 +2143,22 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) StartAllAction(); do { - pFrm = pFrm->GetUpper(); - } while( !pFrm->IsCellFrm() ); + pFrame = pFrame->GetUpper(); + } while( !pFrame->IsCellFrame() ); - SwTabFrm *pTab = pFrm->ImplFindTabFrm(); + SwTabFrame *pTab = pFrame->ImplFindTabFrame(); // if the table is in relative values (USHRT_MAX) // then it should be recalculated to absolute values now - const SwFormatFrmSize& rTableFrmSz = pTab->GetFormat()->GetFrmSize(); + const SwFormatFrameSize& rTableFrameSz = pTab->GetFormat()->GetFrameSize(); SWRECTFN( pTab ) long nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)(); if( TBLVAR_CHGABS == pTab->GetTable()->GetTableChgMode() && ( eType & nsTableChgWidthHeightType::WH_COL_LEFT || eType & nsTableChgWidthHeightType::WH_COL_RIGHT ) && text::HoriOrientation::NONE == pTab->GetFormat()->GetHoriOrient().GetHoriOrient() && - nPrtWidth != rTableFrmSz.GetWidth() ) + nPrtWidth != rTableFrameSz.GetWidth() ) { - SwFormatFrmSize aSz( rTableFrmSz ); + SwFormatFrameSize aSz( rTableFrameSz ); aSz.SetWidth( pTab->Prt().Width() ); pTab->GetFormat()->SetFormatAttr( aSz ); } @@ -2166,7 +2166,7 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) if( (eType & (nsTableChgWidthHeightType::WH_FLAG_BIGGER | nsTableChgWidthHeightType::WH_FLAG_INSDEL)) == (nsTableChgWidthHeightType::WH_FLAG_BIGGER | nsTableChgWidthHeightType::WH_FLAG_INSDEL) ) { - nDiff = sal_uInt16((pFrm->Frm().*fnRect->fnGetWidth)()); + nDiff = sal_uInt16((pFrame->Frame().*fnRect->fnGetWidth)()); // we must move the cursor outside the current cell before // deleting the cells. @@ -2192,12 +2192,12 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) } SwTwips nLogDiff = nDiff; - nLogDiff *= pTab->GetFormat()->GetFrmSize().GetWidth(); + nLogDiff *= pTab->GetFormat()->GetFrameSize().GetWidth(); nLogDiff /= nPrtWidth; /** The cells are destroyed in here */ bool bRet = GetDoc()->SetColRowWidthHeight( - *const_cast<SwTableBox*>(static_cast<SwCellFrm*>(pFrm)->GetTabBox()), + *const_cast<SwTableBox*>(static_cast<SwCellFrame*>(pFrame)->GetTabBox()), eType, nDiff, nLogDiff ); delete pLastCols, pLastCols = nullptr; @@ -2233,7 +2233,7 @@ bool SwFEShell::SetColRowWidthHeight( sal_uInt16 eType, sal_uInt16 nDiff ) } static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormula& rFormula, - SwCellFrms& rCells ) + SwCellFrames& rCells ) { SwTableBoxFormula aTmp( rFormula ); SwSelBoxes aBoxes; @@ -2241,7 +2241,7 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul for (size_t nSelBoxes = aBoxes.size(); nSelBoxes; ) { SwTableBox* pBox = aBoxes[ --nSelBoxes ]; - SwCellFrms::iterator iC; + SwCellFrames::iterator iC; for( iC = rCells.begin(); iC != rCells.end(); ++iC ) if( (*iC)->GetTabBox() == pBox ) break; // found @@ -2256,20 +2256,20 @@ static bool lcl_IsFormulaSelBoxes( const SwTable& rTable, const SwTableBoxFormul // ask formula for auto-sum bool SwFEShell::GetAutoSum( OUString& rFormula ) const { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = pFrm ? pFrm->ImplFindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = pFrame ? pFrame->ImplFindTabFrame() : nullptr; if( !pTab ) return false; - SwCellFrms aCells; + SwCellFrames aCells; OUString sFields; if( ::GetAutoSumSel( *this, aCells )) { sal_uInt16 nW = 0; for( size_t n = aCells.size(); n; ) { - SwCellFrm* pCFrm = aCells[ --n ]; - sal_uInt16 nBoxW = pCFrm->GetTabBox()->IsFormulaOrValueBox(); + SwCellFrame* pCFrame = aCells[ --n ]; + sal_uInt16 nBoxW = pCFrame->GetTabBox()->IsFormulaOrValueBox(); if( !nBoxW ) break; @@ -2280,7 +2280,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // formula only if box is contained if( RES_BOXATR_FORMULA == nBoxW && - !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells)) { nW = RES_BOXATR_VALUE; @@ -2298,7 +2298,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const { // search for values, Value/Formula/Text found -> include if( RES_BOXATR_FORMULA == nBoxW && - ::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + ::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells )) break; else if( USHRT_MAX != nBoxW ) @@ -2312,7 +2312,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // all boxes contained in the selection if( RES_BOXATR_FORMULA == nBoxW ) { - if( !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrm-> + if( !::lcl_IsFormulaSelBoxes( *pTab->GetTable(), pCFrame-> GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells )) { // redo only for values! @@ -2339,7 +2339,7 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const // possibly allow texts?? break; - sFields = "<" + pCFrm->GetTabBox()->GetName() + ">" + sFields; + sFields = "<" + pCFrame->GetTabBox()->GetName() + ">" + sFields; } } @@ -2354,25 +2354,25 @@ bool SwFEShell::GetAutoSum( OUString& rFormula ) const bool SwFEShell::IsTableRightToLeft() const { - SwFrm *pFrm = GetCurrFrm(); - if( !pFrm || !pFrm->IsInTab() ) + SwFrame *pFrame = GetCurrFrame(); + if( !pFrame || !pFrame->IsInTab() ) return false; - return pFrm->ImplFindTabFrm()->IsRightToLeft(); + return pFrame->ImplFindTabFrame()->IsRightToLeft(); } bool SwFEShell::IsMouseTableRightToLeft(const Point &rPt) const { - SwFrm *pFrm = const_cast<SwFrm *>(GetBox( rPt )); - const SwTabFrm* pTabFrm = pFrm ? pFrm->ImplFindTabFrm() : nullptr; - OSL_ENSURE( pTabFrm, "Table not found" ); - return pTabFrm && pTabFrm->IsRightToLeft(); + SwFrame *pFrame = const_cast<SwFrame *>(GetBox( rPt )); + const SwTabFrame* pTabFrame = pFrame ? pFrame->ImplFindTabFrame() : nullptr; + OSL_ENSURE( pTabFrame, "Table not found" ); + return pTabFrame && pTabFrame->IsRightToLeft(); } bool SwFEShell::IsTableVertical() const { - SwFrm *pFrm = GetCurrFrm(); - SwTabFrm *pTab = (pFrm && pFrm->IsInTab()) ? pFrm->ImplFindTabFrm() : nullptr; + SwFrame *pFrame = GetCurrFrame(); + SwTabFrame *pTab = (pFrame && pFrame->IsInTab()) ? pFrame->ImplFindTabFrame() : nullptr; if (!pTab) return false; return pTab->IsVertical(); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 5c39c10f4d68..7c5043fa0040 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -57,7 +57,7 @@ void SwFEShell::EndAllActionAndCall() { for(SwViewShell& rCurrentShell : GetRingContainer()) { - if( dynamic_cast<const SwCrsrShell*>( &rCurrentShell) != nullptr ) + if( dynamic_cast<const SwCursorShell*>( &rCurrentShell) != nullptr ) { static_cast<SwFEShell*>(&rCurrentShell)->EndAction(); static_cast<SwFEShell*>(&rCurrentShell)->CallChgLnk(); @@ -77,125 +77,125 @@ Point SwFEShell::GetContentPos( const Point& rPoint, bool bNext ) const const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, const uno::Reference < embed::XEmbeddedObject >& xObj ) const { - const SwFrm *pFrm = Imp()->HasDrawView() + const SwFrame *pFrame = Imp()->HasDrawView() ? ::GetFlyFromMarked( &Imp()->GetDrawView()->GetMarkedObjectList(), const_cast<SwViewShell*>(static_cast<SwViewShell const *>(this))) : nullptr; - if( !pFrm ) + if( !pFrame ) { if( pPt ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); + pFrame = pNd->getLayoutFrame( GetLayout(), pPt ); } else { const bool bOldCallbackActionEnabled = GetLayout()->IsCallbackActionEnabled(); if( bOldCallbackActionEnabled ) GetLayout()->SetCallbackActionEnabled( false ); - pFrm = GetCurrFrm(); + pFrame = GetCurrFrame(); if( bOldCallbackActionEnabled ) GetLayout()->SetCallbackActionEnabled( true ); } } - if( !pFrm ) - return GetLayout()->Frm(); + if( !pFrame ) + return GetLayout()->Frame(); - bool bFrm = true; + bool bFrame = true; switch ( eType ) { - case RECT_PAGE_PRT: bFrm = false; /* no break */ - case RECT_PAGE : pFrm = pFrm->FindPageFrm(); + case RECT_PAGE_PRT: bFrame = false; /* no break */ + case RECT_PAGE : pFrame = pFrame->FindPageFrame(); break; - case RECT_PAGE_CALC: pFrm->Calc(Imp()->GetShell()->GetOut()); - pFrm = pFrm->FindPageFrm(); - pFrm->Calc(Imp()->GetShell()->GetOut()); + case RECT_PAGE_CALC: pFrame->Calc(Imp()->GetShell()->GetOut()); + pFrame = pFrame->FindPageFrame(); + pFrame->Calc(Imp()->GetShell()->GetOut()); break; - case RECT_FLY_PRT_EMBEDDED: bFrm = false; /* no break */ - case RECT_FLY_EMBEDDED: pFrm = xObj.is() ? FindFlyFrm( xObj ) - : pFrm->IsFlyFrm() - ? pFrm - : pFrm->FindFlyFrm(); + case RECT_FLY_PRT_EMBEDDED: bFrame = false; /* no break */ + case RECT_FLY_EMBEDDED: pFrame = xObj.is() ? FindFlyFrame( xObj ) + : pFrame->IsFlyFrame() + ? pFrame + : pFrame->FindFlyFrame(); break; case RECT_OUTTABSECTION_PRT: - case RECT_OUTTABSECTION : if( pFrm->IsInTab() ) - pFrm = pFrm->FindTabFrm(); + case RECT_OUTTABSECTION : if( pFrame->IsInTab() ) + pFrame = pFrame->FindTabFrame(); else { OSL_FAIL( "Missing Table" ); } /* no break */ case RECT_SECTION_PRT: - case RECT_SECTION: if( pFrm->IsInSct() ) - pFrm = pFrm->FindSctFrm(); + case RECT_SECTION: if( pFrame->IsInSct() ) + pFrame = pFrame->FindSctFrame(); else { OSL_FAIL( "Missing section" ); } if( RECT_OUTTABSECTION_PRT == eType || RECT_SECTION_PRT == eType ) - bFrm = false; + bFrame = false; break; - case RECT_HEADERFOOTER_PRT: bFrm = false; /* no break */ - case RECT_HEADERFOOTER: if( nullptr == (pFrm = pFrm->FindFooterOrHeader()) ) - return GetLayout()->Frm(); + case RECT_HEADERFOOTER_PRT: bFrame = false; /* no break */ + case RECT_HEADERFOOTER: if( nullptr == (pFrame = pFrame->FindFooterOrHeader()) ) + return GetLayout()->Frame(); break; case RECT_PAGES_AREA: return GetLayout()->GetPagesArea(); default: break; } - return bFrm ? pFrm->Frm() : pFrm->Prt(); + return bFrame ? pFrame->Frame() : pFrame->Prt(); } sal_uInt16 SwFEShell::GetPageNumber( const Point &rPoint ) const { - const SwFrm *pPage = GetLayout()->Lower(); - while ( pPage && !pPage->Frm().IsInside( rPoint ) ) + const SwFrame *pPage = GetLayout()->Lower(); + while ( pPage && !pPage->Frame().IsInside( rPoint ) ) pPage = pPage->GetNext(); if ( pPage ) - return static_cast<const SwPageFrm*>(pPage)->GetPhyPageNum(); + return static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum(); else return 0; } -bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const +bool SwFEShell::GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay) const { - const SwFrm *pPage; + const SwFrame *pPage; - if ( bAtCrsrPos ) // get page of Crsr + if ( bAtCursorPos ) // get page of Cursor { - pPage = GetCurrFrm( false ); + pPage = GetCurrFrame( false ); if ( pPage ) - pPage = pPage->FindPageFrm(); + pPage = pPage->FindPageFrame(); } else if ( nYPos > -1 ) // determine page via the position { pPage = GetLayout()->Lower(); - while( pPage && (pPage->Frm().Bottom() < nYPos || - nYPos < pPage->Frm().Top() ) ) + while( pPage && (pPage->Frame().Bottom() < nYPos || + nYPos < pPage->Frame().Top() ) ) pPage = pPage->GetNext(); } else // first visible page { pPage = Imp()->GetFirstVisPage(GetOut()); - if ( pPage && static_cast<const SwPageFrm*>(pPage)->IsEmptyPage() ) + if ( pPage && static_cast<const SwPageFrame*>(pPage)->IsEmptyPage() ) pPage = pPage->GetNext(); } if( pPage ) { - rPhyNum = static_cast<const SwPageFrm*>(pPage)->GetPhyPageNum(); - rVirtNum = static_cast<const SwPageFrm*>(pPage)->GetVirtPageNum(); - const SvxNumberType& rNum = static_cast<const SwPageFrm*>(pPage)->GetPageDesc()->GetNumType(); + rPhyNum = static_cast<const SwPageFrame*>(pPage)->GetPhyPageNum(); + rVirtNum = static_cast<const SwPageFrame*>(pPage)->GetVirtPageNum(); + const SvxNumberType& rNum = static_cast<const SwPageFrame*>(pPage)->GetPageDesc()->GetNumType(); rDisplay = rNum.GetNumStr( rVirtNum ); } @@ -204,73 +204,73 @@ bool SwFEShell::GetPageNumber( long nYPos, bool bAtCrsrPos, sal_uInt16& rPhyNum, bool SwFEShell::IsDirectlyInSection() const { - SwFrm* pFrm = GetCurrFrm( false ); - return pFrm && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm(); + SwFrame* pFrame = GetCurrFrame( false ); + return pFrame && pFrame->GetUpper() && pFrame->GetUpper()->IsSctFrame(); } -FrmTypeFlags SwFEShell::GetFrmType( const Point *pPt, bool bStopAtFly ) const +FrameTypeFlags SwFEShell::GetFrameType( const Point *pPt, bool bStopAtFly ) const { - FrmTypeFlags nReturn = FrmTypeFlags::NONE; - const SwFrm *pFrm; + FrameTypeFlags nReturn = FrameTypeFlags::NONE; + const SwFrame *pFrame; if ( pPt ) { - SwPosition aPos( *GetCrsr()->GetPoint() ); + SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); - GetLayout()->GetCrsrOfst( &aPos, aPt ); + GetLayout()->GetCursorOfst( &aPos, aPt ); SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); - pFrm = pNd->getLayoutFrm( GetLayout(), pPt ); + pFrame = pNd->getLayoutFrame( GetLayout(), pPt ); } else - pFrm = GetCurrFrm( false ); - while ( pFrm ) + pFrame = GetCurrFrame( false ); + while ( pFrame ) { - switch ( pFrm->GetType() ) + switch ( pFrame->GetType() ) { - case FRM_COLUMN: if( pFrm->GetUpper()->IsSctFrm() ) + case FRM_COLUMN: if( pFrame->GetUpper()->IsSctFrame() ) { // Check, if isn't not only a single column // from a section with footnotes at the end. - if( pFrm->GetNext() || pFrm->GetPrev() ) + if( pFrame->GetNext() || pFrame->GetPrev() ) // Sectioncolumns - nReturn |= ( nReturn & FrmTypeFlags::TABLE ) ? - FrmTypeFlags::COLSECTOUTTAB : FrmTypeFlags::COLSECT; + nReturn |= ( nReturn & FrameTypeFlags::TABLE ) ? + FrameTypeFlags::COLSECTOUTTAB : FrameTypeFlags::COLSECT; } else // only pages and frame columns - nReturn |= FrmTypeFlags::COLUMN; + nReturn |= FrameTypeFlags::COLUMN; break; - case FRM_PAGE: nReturn |= FrmTypeFlags::PAGE; - if( static_cast<const SwPageFrm*>(pFrm)->IsFootnotePage() ) - nReturn |= FrmTypeFlags::FTNPAGE; + case FRM_PAGE: nReturn |= FrameTypeFlags::PAGE; + if( static_cast<const SwPageFrame*>(pFrame)->IsFootnotePage() ) + nReturn |= FrameTypeFlags::FTNPAGE; break; - case FRM_HEADER: nReturn |= FrmTypeFlags::HEADER; break; - case FRM_FOOTER: nReturn |= FrmTypeFlags::FOOTER; break; - case FRM_BODY: if( pFrm->GetUpper()->IsPageFrm() ) // not for ColumnFrms - nReturn |= FrmTypeFlags::BODY; + case FRM_HEADER: nReturn |= FrameTypeFlags::HEADER; break; + case FRM_FOOTER: nReturn |= FrameTypeFlags::FOOTER; break; + case FRM_BODY: if( pFrame->GetUpper()->IsPageFrame() ) // not for ColumnFrames + nReturn |= FrameTypeFlags::BODY; break; - case FRM_FTN: nReturn |= FrmTypeFlags::FOOTNOTE; break; - case FRM_FLY: if( static_cast<const SwFlyFrm*>(pFrm)->IsFlyLayFrm() ) - nReturn |= FrmTypeFlags::FLY_FREE; - else if ( static_cast<const SwFlyFrm*>(pFrm)->IsFlyAtCntFrm() ) - nReturn |= FrmTypeFlags::FLY_ATCNT; + case FRM_FTN: nReturn |= FrameTypeFlags::FOOTNOTE; break; + case FRM_FLY: if( static_cast<const SwFlyFrame*>(pFrame)->IsFlyLayFrame() ) + nReturn |= FrameTypeFlags::FLY_FREE; + else if ( static_cast<const SwFlyFrame*>(pFrame)->IsFlyAtContentFrame() ) + nReturn |= FrameTypeFlags::FLY_ATCNT; else { - OSL_ENSURE( static_cast<const SwFlyFrm*>(pFrm)->IsFlyInCntFrm(), + OSL_ENSURE( static_cast<const SwFlyFrame*>(pFrame)->IsFlyInContentFrame(), "New frametype?" ); - nReturn |= FrmTypeFlags::FLY_INCNT; + nReturn |= FrameTypeFlags::FLY_INCNT; } - nReturn |= FrmTypeFlags::FLY_ANY; + nReturn |= FrameTypeFlags::FLY_ANY; if( bStopAtFly ) return nReturn; break; case FRM_TAB: case FRM_ROW: - case FRM_CELL: nReturn |= FrmTypeFlags::TABLE; break; + case FRM_CELL: nReturn |= FrameTypeFlags::TABLE; break; default: /* do nothing */ break; } - if ( pFrm->IsFlyFrm() ) - pFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(); + if ( pFrame->IsFlyFrame() ) + pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(); else - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } return nReturn; } @@ -278,7 +278,7 @@ FrmTypeFlags SwFEShell::GetFrmType( const Point *pPt, bool bStopAtFly ) const void SwFEShell::ShGetFcs( bool bUpdate ) { ::SetShell( this ); - SwCrsrShell::ShGetFcs( bUpdate ); + SwCursorShell::ShGetFcs( bUpdate ); if ( HasDrawView() ) { @@ -290,7 +290,7 @@ void SwFEShell::ShGetFcs( bool bUpdate ) void SwFEShell::ShLooseFcs() { - SwCrsrShell::ShLooseFcs(); + SwCursorShell::ShLooseFcs(); if ( HasDrawView() && Imp()->GetDrawView()->AreObjectsMarked() ) { @@ -301,35 +301,35 @@ void SwFEShell::ShLooseFcs() sal_uInt16 SwFEShell::GetPhyPageNum() { - SwFrm *pFrm = GetCurrFrm(); - if ( pFrm ) - return pFrm->GetPhyPageNum(); + SwFrame *pFrame = GetCurrFrame(); + if ( pFrame ) + return pFrame->GetPhyPageNum(); return 0; } -sal_uInt16 SwFEShell::GetVirtPageNum( const bool bCalcFrm ) +sal_uInt16 SwFEShell::GetVirtPageNum( const bool bCalcFrame ) { - SwFrm *pFrm = GetCurrFrm( bCalcFrm ); - if ( pFrm ) - return pFrm->GetVirtPageNum(); + SwFrame *pFrame = GetCurrFrame( bCalcFrame ); + if ( pFrame ) + return pFrame->GetVirtPageNum(); return 0; } -static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis ) +static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrame* pPage, SwFEShell* pThis ) { pThis->StartAllAction(); OSL_ENSURE( pPage->FindFirstBodyContent(), - "SwFEShell _SetAPageOffset() without ContentFrm" ); + "SwFEShell _SetAPageOffset() without ContentFrame" ); SwFormatPageDesc aDesc( pPage->GetPageDesc() ); aDesc.SetNumOffset( nOffset ); - SwFrm *pFrm = pThis->GetCurrFrm( false ); - if ( pFrm->IsInTab() ) - pThis->GetDoc()->SetAttr( aDesc, *pFrm->FindTabFrm()->GetFormat() ); + SwFrame *pFrame = pThis->GetCurrFrame( false ); + if ( pFrame->IsInTab() ) + pThis->GetDoc()->SetAttr( aDesc, *pFrame->FindTabFrame()->GetFormat() ); else { - pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCrsr(), aDesc ); + pThis->GetDoc()->getIDocumentContentOperations().InsertPoolItem( *pThis->GetCursor(), aDesc ); } pThis->EndAllAction(); @@ -338,48 +338,48 @@ static void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* void SwFEShell::SetNewPageOffset( sal_uInt16 nOffset ) { GetLayout()->SetVirtPageNum( true ); - const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); - lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this ); + const SwPageFrame *pPage = GetCurrFrame( false )->FindPageFrame(); + lcl_SetAPageOffset( nOffset, const_cast<SwPageFrame*>(pPage), this ); } void SwFEShell::SetPageOffset( sal_uInt16 nOffset ) { - const SwPageFrm *pPage = GetCurrFrm( false )->FindPageFrm(); - const SwRootFrm* pDocLayout = GetLayout(); + const SwPageFrame *pPage = GetCurrFrame( false )->FindPageFrame(); + const SwRootFrame* pDocLayout = GetLayout(); while ( pPage ) { - const SwFrm *pFlow = pPage->FindFirstBodyContent(); + const SwFrame *pFlow = pPage->FindFirstBodyContent(); if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc(); if ( rPgDesc.GetNumOffset() ) { pDocLayout->SetVirtPageNum( true ); - lcl_SetAPageOffset( nOffset, const_cast<SwPageFrm*>(pPage), this ); + lcl_SetAPageOffset( nOffset, const_cast<SwPageFrame*>(pPage), this ); break; } } - pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwPageFrame*>(pPage->GetPrev()); } } sal_uInt16 SwFEShell::GetPageOffset() const { - const SwPageFrm *pPage = GetCurrFrm()->FindPageFrm(); + const SwPageFrame *pPage = GetCurrFrame()->FindPageFrame(); while ( pPage ) { - const SwFrm *pFlow = pPage->FindFirstBodyContent(); + const SwFrame *pFlow = pPage->FindFirstBodyContent(); if ( pFlow ) { if ( pFlow->IsInTab() ) - pFlow = pFlow->FindTabFrm(); + pFlow = pFlow->FindTabFrame(); ::boost::optional<sal_uInt16> oNumOffset = pFlow->GetAttrSet()->GetPageDesc().GetNumOffset(); if ( oNumOffset ) return oNumOffset.get(); } - pPage = static_cast<const SwPageFrm*>(pPage->GetPrev()); + pPage = static_cast<const SwPageFrame*>(pPage->GetPrev()); } return 0; } @@ -391,7 +391,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con const bool bCpyBrd ) { // get node index of cursor position, SwDoc can do everything else itself - SwContentFrm *pCnt = LTYPE_DRAW==eType ? nullptr : GetCurrFrm( false ); + SwContentFrame *pCnt = LTYPE_DRAW==eType ? nullptr : GetCurrFrame( false ); if( LTYPE_DRAW==eType || pCnt ) { StartAllAction(); @@ -409,7 +409,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if (bInnerCntIsFly) { // pass down index to the startnode for flys - nIdx = pCnt->FindFlyFrm()-> + nIdx = pCnt->FindFlyFrame()-> GetFormat()->GetContent().GetContentIdx()->GetIndex(); } break; @@ -417,7 +417,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if( pCnt->IsInTab() ) { // pass down index to the TableNode for tables - const SwTable& rTable = *pCnt->FindTabFrm()->GetTable(); + const SwTable& rTable = *pCnt->FindTabFrame()->GetTable(); nIdx = rTable.GetTabSortBoxes()[ 0 ] ->GetSttNd()->FindTableNode()->GetIndex(); } @@ -458,7 +458,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con } break; default: - OSL_ENSURE( false, "Crsr neither in table nor in fly." ); + OSL_ENSURE( false, "Cursor neither in table nor in fly." ); } if( nIdx ) @@ -487,9 +487,9 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con SfxItemSet aSet(makeItemSetFromFormatAnchor(GetDoc()->GetAttrPool(), aAnc)); - SwFlyFrm *pFly = GetSelectedOrCurrFlyFrm(); + SwFlyFrame *pFly = GetSelectedOrCurrFlyFrame(); SwFlyFrameFormat* pInnerFlyFormat = pFly->GetFormat(); - GetDoc()->SetFlyFrmAttr(*pInnerFlyFormat, aSet); + GetDoc()->SetFlyFrameAttr(*pInnerFlyFormat, aSet); //put a hard-break after the graphic to keep it separated //from the caption text if the outer frame is resized @@ -500,9 +500,9 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const OUString &rText, con if (pFlyFormat) { - const Point aPt(GetCrsrDocPos()); - if (SwFlyFrm* pFrm = pFlyFormat->GetFrm(&aPt)) - SelectFlyFrm(*pFrm, true); + const Point aPt(GetCursorDocPos()); + if (SwFlyFrame* pFrame = pFlyFormat->GetFrame(&aPt)) + SelectFlyFrame(*pFrame, true); } EndUndo(); EndAllActionAndCall(); @@ -520,19 +520,19 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) if(IsTableMode()) { // Sort table - // check if Point/Mark of current Crsr are in one table - SwFrm *pFrm = GetCurrFrm( false ); - OSL_ENSURE( pFrm->FindTabFrm(), "Crsr not in table." ); + // check if Point/Mark of current Cursor are in one table + SwFrame *pFrame = GetCurrFrame( false ); + OSL_ENSURE( pFrame->FindTabFrame(), "Cursor not in table." ); // search boxes via the layout SwSelBoxes aBoxes; GetTableSel(*this, aBoxes); - // The Crsr should be removed from the deletion area. + // The Cursor should be removed from the deletion area. // Always put them behind/on the table; via the // document position they will always be set to the old position - while( !pFrm->IsCellFrm() ) - pFrm = pFrm->GetUpper(); + while( !pFrame->IsCellFrame() ) + pFrame = pFrame->GetUpper(); { /* ParkCursor->ParkCursorTab */ ParkCursorInTab(); @@ -544,7 +544,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) else { // Sort text nothing else - for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) + for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { SwPaM* pPam = &rPaM; @@ -578,41 +578,41 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) return bRet; } -sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, +sal_uInt16 SwFEShell::_GetCurColNum( const SwFrame *pFrame, SwGetCurColNumPara* pPara ) const { sal_uInt16 nRet = 0; - while ( pFrm ) + while ( pFrame ) { - pFrm = pFrm->GetUpper(); - if( pFrm && pFrm->IsColumnFrm() ) + pFrame = pFrame->GetUpper(); + if( pFrame && pFrame->IsColumnFrame() ) { - const SwFrm *pCurFrm = pFrm; + const SwFrame *pCurFrame = pFrame; do { ++nRet; - pFrm = pFrm->GetPrev(); - } while ( pFrm ); + pFrame = pFrame->GetPrev(); + } while ( pFrame ); if( pPara ) { // now search the format, determining the columness - pFrm = pCurFrm->GetUpper(); - while( pFrm ) + pFrame = pCurFrame->GetUpper(); + while( pFrame ) { - if( ( FRM_PAGE | FRM_FLY | FRM_SECTION ) & pFrm->GetType() ) + if( ( FRM_PAGE | FRM_FLY | FRM_SECTION ) & pFrame->GetType() ) { - pPara->pFrameFormat = static_cast<const SwLayoutFrm*>(pFrm)->GetFormat(); - pPara->pPrtRect = &pFrm->Prt(); - pPara->pFrmRect = &pFrm->Frm(); + pPara->pFrameFormat = static_cast<const SwLayoutFrame*>(pFrame)->GetFormat(); + pPara->pPrtRect = &pFrame->Prt(); + pPara->pFrameRect = &pFrame->Frame(); break; } - pFrm = pFrm->GetUpper(); + pFrame = pFrame->GetUpper(); } - if( !pFrm ) + if( !pFrame ) { pPara->pFrameFormat = nullptr; pPara->pPrtRect = nullptr; - pPara->pFrmRect = nullptr; + pPara->pFrameRect = nullptr; } } break; @@ -623,22 +623,22 @@ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const { - OSL_ENSURE( GetCurrFrm(), "Crsr parked?" ); - return _GetCurColNum( GetCurrFrm(), pPara ); + OSL_ENSURE( GetCurrFrame(), "Cursor parked?" ); + return _GetCurColNum( GetCurrFrame(), pPara ); } sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const { sal_uInt16 nRet = 0; - SwFrm* pFrm = GetCurrFrm(); - OSL_ENSURE( pFrm, "Crsr parked?" ); - if( pFrm ) + SwFrame* pFrame = GetCurrFrame(); + OSL_ENSURE( pFrame, "Cursor parked?" ); + if( pFrame ) { - pFrm = pFrm->IsInTab() ? static_cast<SwFrm*>(pFrm->FindTabFrm()) - : static_cast<SwFrm*>(pFrm->FindSctFrm()); - OSL_ENSURE( pFrm, "No Tab, no Sect" ); - if( pFrm ) - nRet = _GetCurColNum( pFrm, pPara ); + pFrame = pFrame->IsInTab() ? static_cast<SwFrame*>(pFrame->FindTabFrame()) + : static_cast<SwFrame*>(pFrame->FindSctFrame()); + OSL_ENSURE( pFrame, "No Tab, no Sect" ); + if( pFrame ) + nRet = _GetCurColNum( pFrame, pPara ); } return nRet; } @@ -674,20 +674,20 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, bool _bMirror, Point* _opRef, Size* _opPercent, - const SwFormatFrmSize* pFormatFrmSize) const + const SwFormatFrameSize* pFormatFrameSize) const { - const SwFrm* pFrm; - const SwFlyFrm* pFly; + const SwFrame* pFrame; + const SwFlyFrame* pFly; if( _opRef ) { - pFrm = GetCurrFrm(); - if( nullptr != ( pFly = pFrm->FindFlyFrm() ) ) - pFrm = pFly->GetAnchorFrm(); + pFrame = GetCurrFrame(); + if( nullptr != ( pFly = pFrame->FindFlyFrame() ) ) + pFrame = pFly->GetAnchorFrame(); } else { - pFly = GetSelectedFlyFrm(); - pFrm = pFly ? pFly->GetAnchorFrm() : GetCurrFrm(); + pFly = GetSelectedFlyFrame(); + pFrame = pFly ? pFly->GetAnchorFrame() : GetCurrFrame(); } bool bWrapThrough = false; @@ -698,7 +698,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, bWrapThrough = rSurround.GetSurround() == SURROUND_THROUGHT; } - const SwPageFrm* pPage = pFrm->FindPageFrm(); + const SwPageFrame* pPage = pFrame->FindPageFrame(); _bMirror = _bMirror && !pPage->OnRightPage(); Point aPos; @@ -708,26 +708,26 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, if ((FLY_AT_PAGE == _nAnchorId) || (FLY_AT_FLY == _nAnchorId)) // LAYER_IMPL { - const SwFrm* pTmp = pFrm; + const SwFrame* pTmp = pFrame; // #i22305# if ((FLY_AT_PAGE == _nAnchorId) || ((FLY_AT_FLY == _nAnchorId) && !_bFollowTextFlow)) { - pFrm = pPage; + pFrame = pPage; } else { - pFrm = pFrm->FindFlyFrm(); + pFrame = pFrame->FindFlyFrame(); } - if ( !pFrm ) - pFrm = pTmp; - _orRect = pFrm->Frm(); - SWRECTFN( pFrm ) - bRTL = pFrm->IsRightToLeft(); + if ( !pFrame ) + pFrame = pTmp; + _orRect = pFrame->Frame(); + SWRECTFN( pFrame ) + bRTL = pFrame->IsRightToLeft(); if ( bRTL ) - aPos = pFrm->Frm().TopRight(); + aPos = pFrame->Frame().TopRight(); else - aPos = (pFrm->Frm().*fnRect->fnGetPos)(); + aPos = (pFrame->Frame().*fnRect->fnGetPos)(); if( bVert || bVertL2R ) { @@ -737,10 +737,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrm->Prt().Height(); + case text::RelOrientation::FRAME_RIGHT: aPos.Y() += pFrame->Prt().Height(); // no break! case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrm->Prt().Top(); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.Y() += pFrame->Prt().Top(); break; default: break; } } @@ -749,11 +749,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); // no break case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Left(); break; - default: aPos.X() += pFrm->Frm().Width(); + case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Left(); break; + default: aPos.X() += pFrame->Frame().Width(); } } else if ( bRTL ) @@ -761,11 +761,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Width(); // no break! case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrm->Prt().Left() - - pFrm->Frm().Width(); break; + case text::RelOrientation::FRAME_LEFT: aPos.X() += pFrame->Prt().Left() - + pFrame->Frame().Width(); break; default: break; } } @@ -774,10 +774,10 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::PAGE_RIGHT: - case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrm->Prt().Width(); + case text::RelOrientation::FRAME_RIGHT: aPos.X() += pFrame->Prt().Width(); // no break! case text::RelOrientation::PRINT_AREA: - case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrm->Prt().Left(); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.X() += pFrame->Prt().Left(); break; default:break; } } @@ -789,7 +789,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.X() -= pFrm->GetRightMargin(); + aPos.X() -= pFrame->GetRightMargin(); } break; } @@ -801,7 +801,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.X() += pFrm->GetLeftMargin(); + aPos.X() += pFrame->GetLeftMargin(); } break; } @@ -813,47 +813,47 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, case text::RelOrientation::PRINT_AREA: case text::RelOrientation::PAGE_PRINT_AREA: { - if ( pFrm->IsPageFrm() ) + if ( pFrame->IsPageFrame() ) { aPos.Y() = - static_cast<const SwPageFrm*>(pFrm)->PrtWithoutHeaderAndFooter().Top(); + static_cast<const SwPageFrame*>(pFrame)->PrtWithoutHeaderAndFooter().Top(); } else { - aPos.Y() += pFrm->Prt().Top(); + aPos.Y() += pFrame->Prt().Top(); } } break; } } if ( _opPercent ) - *_opPercent = pFrm->Prt().SSize(); + *_opPercent = pFrame->Prt().SSize(); } else { - const SwFrm* pUpper = ( pFrm->IsPageFrm() || pFrm->IsFlyFrm() ) ? - pFrm : pFrm->GetUpper(); + const SwFrame* pUpper = ( pFrame->IsPageFrame() || pFrame->IsFlyFrame() ) ? + pFrame : pFrame->GetUpper(); SWRECTFN( pUpper ); if ( _opPercent ) { // If the size is relative from page, then full size should be counted from the page frame. - if (pFormatFrmSize && pFormatFrmSize->GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) - _opPercent->setWidth(pPage->Frm().Width()); + if (pFormatFrameSize && pFormatFrameSize->GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME) + _opPercent->setWidth(pPage->Frame().Width()); else _opPercent->setWidth(pUpper->Prt().Width()); - if (pFormatFrmSize && pFormatFrmSize->GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) + if (pFormatFrameSize && pFormatFrameSize->GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME) // If the size is relative from page, then full size should be counted from the page frame. - _opPercent->setHeight(pPage->Frm().Height()); + _opPercent->setHeight(pPage->Frame().Height()); else _opPercent->setHeight(pUpper->Prt().Height()); } - bRTL = pFrm->IsRightToLeft(); + bRTL = pFrame->IsRightToLeft(); if ( bRTL ) - aPos = pFrm->Frm().TopRight(); + aPos = pFrame->Frame().TopRight(); else - aPos = (pFrm->Frm().*fnRect->fnGetPos)(); + aPos = (pFrame->Frame().*fnRect->fnGetPos)(); // #i17567# - allow negative positions // for fly frames anchor to paragraph/to character. if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR)) @@ -866,16 +866,16 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // new class <SwEnvironmentOfAnchoredObject> objectpositioning::SwEnvironmentOfAnchoredObject aEnvOfObj( _bFollowTextFlow ); - const SwLayoutFrm& rHoriEnvironLayFrm = - aEnvOfObj.GetHoriEnvironmentLayoutFrm( *pFrm ); - const SwLayoutFrm& rVertEnvironLayFrm = - aEnvOfObj.GetVertEnvironmentLayoutFrm( *pFrm ); - SwRect aHoriEnvironRect( rHoriEnvironLayFrm.Frm() ); + const SwLayoutFrame& rHoriEnvironLayFrame = + aEnvOfObj.GetHoriEnvironmentLayoutFrame( *pFrame ); + const SwLayoutFrame& rVertEnvironLayFrame = + aEnvOfObj.GetVertEnvironmentLayoutFrame( *pFrame ); + SwRect aHoriEnvironRect( rHoriEnvironLayFrame.Frame() ); SwRect aVertEnvironRect; if ( _bFollowTextFlow ) { - aVertEnvironRect = rVertEnvironLayFrm.Prt(); - aVertEnvironRect.Pos() += rVertEnvironLayFrm.Frm().Pos(); + aVertEnvironRect = rVertEnvironLayFrame.Prt(); + aVertEnvironRect.Pos() += rVertEnvironLayFrame.Frame().Pos(); // #i18732# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned // to page areas. @@ -897,9 +897,9 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } else { - OSL_ENSURE( rVertEnvironLayFrm.IsPageFrm(), + OSL_ENSURE( rVertEnvironLayFrame.IsPageFrame(), "<SwFEShell::CalcBoundRect(..)> - not following text flow, but vertical environment *not* page!" ); - aVertEnvironRect = rVertEnvironLayFrm.Frm(); + aVertEnvironRect = rVertEnvironLayFrame.Frame(); // #i18732# - adjustment vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned // to page areas. @@ -910,7 +910,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.X() = aVertEnvironRect.Right(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setX(aPos.getX() - rVertEnvironLayFrm.GetRightMargin()); + aPos.setX(aPos.getX() - rVertEnvironLayFrame.GetRightMargin()); } } else if ( bVertL2R ) @@ -918,7 +918,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.X() = aVertEnvironRect.Left(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setX(aPos.getX() + rVertEnvironLayFrm.GetLeftMargin()); + aPos.setX(aPos.getX() + rVertEnvironLayFrame.GetLeftMargin()); } } else @@ -926,12 +926,12 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos.Y() = aVertEnvironRect.Top(); if ( _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) { - aPos.setY(aPos.getY() + rVertEnvironLayFrm.GetTopMargin()); + aPos.setY(aPos.getY() + rVertEnvironLayFrame.GetTopMargin()); // add height of page header - const SwFrm* pTmpFrm = rVertEnvironLayFrm.Lower(); - if ( pTmpFrm->IsHeaderFrm() ) + const SwFrame* pTmpFrame = rVertEnvironLayFrame.Lower(); + if ( pTmpFrame->IsHeaderFrame() ) { - aPos.setY(aPos.getY() + pTmpFrm->Frm().Height()); + aPos.setY(aPos.getY() + pTmpFrame->Frame().Height()); } } } @@ -941,11 +941,11 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // #i22341# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is anchored to // character and vertical aligned at character or top of line - // <pFrm>, which is the anchor frame or the proposed anchor frame, + // <pFrame>, which is the anchor frame or the proposed anchor frame, // doesn't have to be a text frame (e.g. edit a to-page anchored // fly frame). Thus, assure this. - const SwTextFrm* pTextFrm( dynamic_cast<const SwTextFrm*>(pFrm) ); - if ( pTextFrm && + const SwTextFrame* pTextFrame( dynamic_cast<const SwTextFrame*>(pFrame) ); + if ( pTextFrame && (_nAnchorId == FLY_AT_CHAR) && ( _eVertRelOrient == text::RelOrientation::CHAR || _eVertRelOrient == text::RelOrientation::TEXT_LINE ) ) @@ -956,13 +956,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, SwRect aChRect; if ( _pToCharContentPos ) { - pTextFrm->GetAutoPos( aChRect, *_pToCharContentPos ); + pTextFrame->GetAutoPos( aChRect, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetAutoPos( aChRect, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetAutoPos( aChRect, aDefaultContentPos ); } nTop = (aChRect.*fnRect->fnGetBottom)(); } @@ -970,13 +970,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { if ( _pToCharContentPos ) { - pTextFrm->GetTopOfLine( nTop, *_pToCharContentPos ); + pTextFrame->GetTopOfLine( nTop, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetTopOfLine( nTop, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetTopOfLine( nTop, aDefaultContentPos ); } } if ( bVert || bVertL2R ) @@ -992,7 +992,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // #i26945# - adjust horizontal 'virtual' anchor // position (<aPos.X()> respectively <aPos.Y()>), if object is // anchored to character and horizontal aligned at character. - if ( pTextFrm && + if ( pTextFrame && (_nAnchorId == FLY_AT_CHAR) && _eHoriRelOrient == text::RelOrientation::CHAR ) { @@ -1000,13 +1000,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, SwRect aChRect; if ( _pToCharContentPos ) { - pTextFrm->GetAutoPos( aChRect, *_pToCharContentPos ); + pTextFrame->GetAutoPos( aChRect, *_pToCharContentPos ); } else { // No content position provided. Thus, use a default one. - SwPosition aDefaultContentPos( *(pTextFrm->GetTextNode()) ); - pTextFrm->GetAutoPos( aChRect, aDefaultContentPos ); + SwPosition aDefaultContentPos( *(pTextFrame->GetTextNode()) ); + pTextFrame->GetAutoPos( aChRect, aDefaultContentPos ); } nLeft = (aChRect.*fnRect->fnGetLeft)(); if ( bVert || bVertL2R ) @@ -1035,17 +1035,17 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } else { - if( _opRef && pFly && pFly->IsFlyInCntFrm() ) - *_opRef = static_cast<const SwFlyInCntFrm*>( pFly )->GetRefPoint(); + if( _opRef && pFly && pFly->IsFlyInContentFrame() ) + *_opRef = static_cast<const SwFlyInContentFrame*>( pFly )->GetRefPoint(); - _orRect = pUpper->Frm(); - if( !pUpper->IsBodyFrm() ) + _orRect = pUpper->Frame(); + if( !pUpper->IsBodyFrame() ) { _orRect += pUpper->Prt().Pos(); _orRect.SSize( pUpper->Prt().SSize() ); - if ( pUpper->IsCellFrm() )//MA_FLY_HEIGHT + if ( pUpper->IsCellFrame() )//MA_FLY_HEIGHT { - const SwFrm* pTab = pUpper->FindTabFrm(); + const SwFrame* pTab = pUpper->FindTabFrame(); long nBottom = (pTab->GetUpper()->*fnRect->fnGetPrtBottom)(); (_orRect.*fnRect->fnSetBottom)( nBottom ); } @@ -1059,8 +1059,8 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } } - const SwTwips nBaseOfstForFly = ( pFrm->IsTextFrm() && pFly ) ? - static_cast<const SwTextFrm*>(pFrm)->GetBaseOfstForFly( !bWrapThrough ) : + const SwTwips nBaseOfstForFly = ( pFrame->IsTextFrame() && pFly ) ? + static_cast<const SwTextFrame*>(pFrame)->GetBaseOfstForFly( !bWrapThrough ) : 0; if( bVert || bVertL2R ) { @@ -1072,30 +1072,30 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { case text::RelOrientation::FRAME_RIGHT: { - aPos.setY(aPos.getY() + pFrm->Prt().Height()); - aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + aPos.setY(aPos.getY() + pFrame->Prt().Height()); + aPos += (pFrame->Prt().*fnRect->fnGetPos)(); break; } case text::RelOrientation::PRINT_AREA: { - aPos += (pFrm->Prt().*fnRect->fnGetPos)(); + aPos += (pFrame->Prt().*fnRect->fnGetPos)(); aPos.setY(aPos.getY() + nBaseOfstForFly); break; } case text::RelOrientation::PAGE_RIGHT: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Bottom()); + aPos.setY(pPage->Frame().Top() + pPage->Prt().Bottom()); break; } case text::RelOrientation::PAGE_PRINT_AREA: { - aPos.setY(pPage->Frm().Top() + pPage->Prt().Top()); + aPos.setY(pPage->Frame().Top() + pPage->Prt().Top()); break; } case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: { - aPos.setY(pPage->Frm().Top()); + aPos.setY(pPage->Frame().Top()); break; } case text::RelOrientation::FRAME: @@ -1110,13 +1110,13 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { switch ( _eHoriRelOrient ) { - case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrm->Prt().Left()); break; + case text::RelOrientation::FRAME_RIGHT: aPos.setX(aPos.getX() + pFrame->Prt().Left()); break; case text::RelOrientation::FRAME: - case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrm->Frm().Width()); break; - case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrm->Prt().Right()); break; + case text::RelOrientation::FRAME_LEFT: aPos.setX(aPos.getX() + pFrame->Frame().Width()); break; + case text::RelOrientation::PRINT_AREA: aPos.setX(aPos.getX() + pFrame->Prt().Right()); break; case text::RelOrientation::PAGE_LEFT: - case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->Frm().Right()); break; - case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->Frm().Left() + case text::RelOrientation::PAGE_FRAME: aPos.setX(pPage->Frame().Right()); break; + case text::RelOrientation::PAGE_PRINT_AREA: aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; default: break; } @@ -1126,28 +1126,28 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::FRAME_LEFT: - aPos.setX(pFrm->Frm().Left() + - pFrm->Prt().Left()); + aPos.setX(pFrame->Frame().Left() + + pFrame->Prt().Left()); break; case text::RelOrientation::PRINT_AREA: - aPos.setX(pFrm->Frm().Left() + pFrm->Prt().Left() + - pFrm->Prt().Width()); + aPos.setX(pFrame->Frame().Left() + pFrame->Prt().Left() + + pFrame->Prt().Width()); aPos.setX(aPos.getX() + nBaseOfstForFly); break; case text::RelOrientation::PAGE_LEFT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left() + + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left() + pPage->Prt().Width()); break; case text::RelOrientation::PAGE_RIGHT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Right()); + aPos.setX(pPage->Frame().Right()); break; case text::RelOrientation::FRAME: @@ -1161,22 +1161,22 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, switch ( _eHoriRelOrient ) { case text::RelOrientation::FRAME_RIGHT: - aPos.X() += pFrm->Prt().Width(); - aPos += pFrm->Prt().Pos(); + aPos.X() += pFrame->Prt().Width(); + aPos += pFrame->Prt().Pos(); break; case text::RelOrientation::PRINT_AREA: - aPos += pFrm->Prt().Pos(); + aPos += pFrame->Prt().Pos(); aPos.setX(aPos.getX() + nBaseOfstForFly); break; case text::RelOrientation::PAGE_RIGHT: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Right()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Right()); break; case text::RelOrientation::PAGE_PRINT_AREA: - aPos.setX(pPage->Frm().Left() + pPage->Prt().Left()); + aPos.setX(pPage->Frame().Left() + pPage->Prt().Left()); break; case text::RelOrientation::PAGE_LEFT: case text::RelOrientation::PAGE_FRAME: - aPos.setX(pPage->Frm().Left()); + aPos.setX(pPage->Frame().Left()); break; case text::RelOrientation::FRAME: aPos.setX(aPos.getX() + nBaseOfstForFly); @@ -1204,7 +1204,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, Size SwFEShell::GetGraphicDefaultSize() const { Size aRet; - SwFlyFrm *pFly = GetSelectedFlyFrm(); + SwFlyFrame *pFly = GetSelectedFlyFrame(); if ( pFly ) { // #i32951# - due to issue #i28701# no format of a @@ -1213,17 +1213,17 @@ Size SwFEShell::GetGraphicDefaultSize() const // line) that the anchor frame isn't formatted and its printing area // size is (0,0). If this is the case the printing area of the upper // of the anchor frame is taken. - const SwFrm* pAnchorFrm = pFly->GetAnchorFrm(); - aRet = pAnchorFrm->Prt().SSize(); + const SwFrame* pAnchorFrame = pFly->GetAnchorFrame(); + aRet = pAnchorFrame->Prt().SSize(); if ( aRet.Width() == 0 && aRet.Height() == 0 && - pAnchorFrm->GetUpper() ) + pAnchorFrame->GetUpper() ) { - aRet = pAnchorFrm->GetUpper()->Prt().SSize(); + aRet = pAnchorFrame->GetUpper()->Prt().SSize(); } SwRect aBound; CalcBoundRect( aBound, pFly->GetFormat()->GetAnchor().GetAnchorId()); - if ( pFly->GetAnchorFrm()->IsVertical() ) + if ( pFly->GetAnchorFrame()->IsVertical() ) aRet.Width() = aBound.Width(); else aRet.Height() = aBound.Height(); @@ -1231,7 +1231,7 @@ Size SwFEShell::GetGraphicDefaultSize() const return aRet; } -bool SwFEShell::IsFrmVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2R) const +bool SwFEShell::IsFrameVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2R) const { bool bVert = false; bRTL = false; @@ -1246,25 +1246,25 @@ bool SwFEShell::IsFrmVertical(const bool bEnvironment, bool& bRTL, bool& bVertL2 SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); if ( !pObj ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation" ); return bVert; } // #i26791# SwContact* pContact = static_cast<SwContact*>(GetUserCall( pObj )); if ( !pContact ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing SwContact instance at marked object -> This is a serious situation" ); return bVert; } - const SwFrm* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrm(); + const SwFrame* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrame(); if ( !pRef ) { - OSL_FAIL( "<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation" ); + OSL_FAIL( "<SwFEShell::IsFrameVertical(..)> - missing anchor frame at marked object -> This is a serious situation" ); return bVert; } if ( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr && !bEnvironment ) - pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); + pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrame(); bVert = pRef->IsVertical(); bRTL = pRef->IsRightToLeft(); @@ -1288,7 +1288,7 @@ void SwFEShell::ToggleHeaderFooterEdit() ClearMark(); } - SwCrsrShell::ToggleHeaderFooterEdit(); + SwCursorShell::ToggleHeaderFooterEdit(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 098be6bf7132..40cf9bb9e488 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -88,80 +88,80 @@ struct _CmpLPt typedef o3tl::sorted_vector<_CmpLPt> _MergePos; -struct _Sort_CellFrm +struct _Sort_CellFrame { - const SwCellFrm* pFrm; + const SwCellFrame* pFrame; - explicit _Sort_CellFrm( const SwCellFrm& rCFrm ) - : pFrm( &rCFrm ) {} + explicit _Sort_CellFrame( const SwCellFrame& rCFrame ) + : pFrame( &rCFrame ) {} }; -static const SwLayoutFrm *lcl_FindCellFrm( const SwLayoutFrm *pLay ) +static const SwLayoutFrame *lcl_FindCellFrame( const SwLayoutFrame *pLay ) { - while ( pLay && !pLay->IsCellFrm() ) + while ( pLay && !pLay->IsCellFrame() ) pLay = pLay->GetUpper(); return pLay; } -static const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay ) +static const SwLayoutFrame *lcl_FindNextCellFrame( const SwLayoutFrame *pLay ) { // ensure we leave the cell (sections) - const SwLayoutFrm *pTmp = pLay; + const SwLayoutFrame *pTmp = pLay; do { pTmp = pTmp->GetNextLayoutLeaf(); } while( pLay->IsAnLower( pTmp ) ); - while( pTmp && !pTmp->IsCellFrm() ) + while( pTmp && !pTmp->IsCellFrame() ) pTmp = pTmp->GetUpper(); return pTmp; } -void GetTableSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes ) +void GetTableSelCrs( const SwCursorShell &rShell, SwSelBoxes& rBoxes ) { rBoxes.clear(); - if( rShell.IsTableMode() && const_cast<SwCrsrShell&>(rShell).UpdateTableSelBoxes()) + if( rShell.IsTableMode() && const_cast<SwCursorShell&>(rShell).UpdateTableSelBoxes()) { - rBoxes.insert(rShell.GetTableCrsr()->GetSelectedBoxes()); + rBoxes.insert(rShell.GetTableCursor()->GetSelectedBoxes()); } } -void GetTableSelCrs( const SwTableCursor& rTableCrsr, SwSelBoxes& rBoxes ) +void GetTableSelCrs( const SwTableCursor& rTableCursor, SwSelBoxes& rBoxes ) { rBoxes.clear(); - if (rTableCrsr.IsChgd() || !rTableCrsr.GetSelectedBoxesCount()) + if (rTableCursor.IsChgd() || !rTableCursor.GetSelectedBoxesCount()) { - SwTableCursor* pTCrsr = const_cast<SwTableCursor*>(&rTableCrsr); - pTCrsr->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCrsrs( *pTCrsr ); + SwTableCursor* pTCursor = const_cast<SwTableCursor*>(&rTableCursor); + pTCursor->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCursors( *pTCursor ); } - if (rTableCrsr.GetSelectedBoxesCount()) + if (rTableCursor.GetSelectedBoxesCount()) { - rBoxes.insert(rTableCrsr.GetSelectedBoxes()); + rBoxes.insert(rTableCursor.GetSelectedBoxes()); } } -void GetTableSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes, +void GetTableSel( const SwCursorShell& rShell, SwSelBoxes& rBoxes, const SwTableSearchType eSearchType ) { // get start and end cell if ( !rShell.IsTableMode() ) - rShell.GetCrsr(); + rShell.GetCursor(); - GetTableSel( *rShell.getShellCrsr(false), rBoxes, eSearchType ); + GetTableSel( *rShell.getShellCursor(false), rBoxes, eSearchType ); } -void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, +void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTableSearchType eSearchType ) { // get start and end cell - OSL_ENSURE( rCrsr.GetContentNode() && rCrsr.GetContentNode( false ), + OSL_ENSURE( rCursor.GetContentNode() && rCursor.GetContentNode( false ), "Tabselection not on Cnt." ); // Row-selection: // Check for complex tables. If Yes, search selected boxes via // the layout. Otherwise via the table structure (for macros !!) - const SwContentNode* pContentNd = rCrsr.GetNode().GetContentNode(); + const SwContentNode* pContentNd = rCursor.GetNode().GetContentNode(); const SwTableNode* pTableNd = pContentNd ? pContentNd->FindTableNode() : nullptr; if( pTableNd && pTableNd->GetTable().IsNewModel() ) { @@ -173,7 +173,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, default: eSearch = SwTable::SEARCH_NONE; break; } const bool bChkP = 0 != ( nsSwTableSearchType::TBLSEARCH_PROTECT & eSearchType ); - pTableNd->GetTable().CreateSelection( rCrsr, rBoxes, eSearch, bChkP ); + pTableNd->GetTable().CreateSelection( rCursor, rBoxes, eSearch, bChkP ); return; } if( nsSwTableSearchType::TBLSEARCH_ROW == ((~nsSwTableSearchType::TBLSEARCH_PROTECT ) & eSearchType ) && @@ -182,7 +182,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTable& rTable = pTableNd->GetTable(); const SwTableLines& rLines = rTable.GetTabLines(); - const SwNode& rMarkNode = rCrsr.GetNode( false ); + const SwNode& rMarkNode = rCursor.GetNode( false ); const sal_uLong nMarkSectionStart = rMarkNode.StartOfSectionIndex(); const SwTableBox* pMarkBox = rTable.GetTableBox( nMarkSectionStart ); @@ -191,7 +191,7 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : nullptr; sal_uInt16 nSttPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" ); - pLine = rTable.GetTableBox( rCrsr.GetNode().StartOfSectionIndex() )->GetUpper(); + pLine = rTable.GetTableBox( rCursor.GetNode().StartOfSectionIndex() )->GetUpper(); sal_uInt16 nEndPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nEndPos, "Where is my row in the table?" ); // pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX @@ -220,28 +220,28 @@ void GetTableSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes, else { Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } - const SwContentNode *pCntNd = rCrsr.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd ? - pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : nullptr; - pCntNd = rCrsr.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd ? - pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : nullptr; + const SwContentNode *pCntNd = rCursor.GetContentNode(); + const SwLayoutFrame *pStart = pCntNd ? + pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper() : nullptr; + pCntNd = rCursor.GetContentNode(false); + const SwLayoutFrame *pEnd = pCntNd ? + pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper() : nullptr; if( pStart && pEnd ) GetTableSel( pStart, pEnd, rBoxes, nullptr, eSearchType ); } } -void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, - SwSelBoxes& rBoxes, SwCellFrms* pCells, +void GetTableSel( const SwLayoutFrame* pStart, const SwLayoutFrame* pEnd, + SwSelBoxes& rBoxes, SwCellFrames* pCells, const SwTableSearchType eSearchType ) { - const SwTabFrm* pStartTab = pStart->FindTabFrm(); + const SwTabFrame* pStartTab = pStart->FindTabFrame(); if ( !pStartTab ) { OSL_FAIL( "GetTableSel without start table" ); @@ -264,16 +264,16 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, Point aCurrentTopRight( 0, LONG_MAX ); Point aCurrentBottomLeft( LONG_MAX, 0 ); Point aCurrentBottomRight( 0, 0 ); - const SwCellFrm* pCurrentTopLeftFrm = nullptr; - const SwCellFrm* pCurrentTopRightFrm = nullptr; - const SwCellFrm* pCurrentBottomLeftFrm = nullptr; - const SwCellFrm* pCurrentBottomRightFrm = nullptr; + const SwCellFrame* pCurrentTopLeftFrame = nullptr; + const SwCellFrame* pCurrentTopRightFrame = nullptr; + const SwCellFrame* pCurrentBottomLeftFrame = nullptr; + const SwCellFrame* pCurrentBottomRightFrame = nullptr; // Now find boxes for each entry and emit for (size_t i = 0; i < aUnions.size() && bTableIsValid; ++i) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); if( !pTable->IsValid() && nLoopMax ) { bTableIsValid = false; @@ -281,9 +281,9 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, } // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow && bTableIsValid ) { @@ -293,9 +293,9 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, break; } - if ( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if ( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) { @@ -305,11 +305,11 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame ohne Celle" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) { SwTableBox* pBox = const_cast<SwTableBox*>( - static_cast<const SwCellFrm*>(pCell)->GetTabBox()); + static_cast<const SwCellFrame*>(pCell)->GetTabBox()); // check for cell protection?? if( !bChkProtected || !pBox->GetFrameFormat()->GetProtect().IsContentProtected() ) @@ -317,17 +317,17 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, if ( pCells ) { - const Point aTopLeft( pCell->Frm().TopLeft() ); - const Point aTopRight( pCell->Frm().TopRight() ); - const Point aBottomLeft( pCell->Frm().BottomLeft() ); - const Point aBottomRight( pCell->Frm().BottomRight() ); + const Point aTopLeft( pCell->Frame().TopLeft() ); + const Point aTopRight( pCell->Frame().TopRight() ); + const Point aBottomLeft( pCell->Frame().BottomLeft() ); + const Point aBottomRight( pCell->Frame().BottomRight() ); if ( aTopLeft.getY() < aCurrentTopLeft.getY() || ( aTopLeft.getY() == aCurrentTopLeft.getY() && aTopLeft.getX() < aCurrentTopLeft.getX() ) ) { aCurrentTopLeft = aTopLeft; - pCurrentTopLeftFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentTopLeftFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aTopRight.getY() < aCurrentTopRight.getY() || @@ -335,7 +335,7 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aTopRight.getX() > aCurrentTopRight.getX() ) ) { aCurrentTopRight = aTopRight; - pCurrentTopRightFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentTopRightFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aBottomLeft.getY() > aCurrentBottomLeft.getY() || @@ -343,7 +343,7 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aBottomLeft.getX() < aCurrentBottomLeft.getX() ) ) { aCurrentBottomLeft = aBottomLeft; - pCurrentBottomLeftFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentBottomLeftFrame = static_cast<const SwCellFrame*>( pCell ); } if ( aBottomRight.getY() > aCurrentBottomRight.getY() || @@ -351,32 +351,32 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, aBottomRight.getX() > aCurrentBottomRight.getX() ) ) { aCurrentBottomRight = aBottomRight; - pCurrentBottomRightFrm = static_cast<const SwCellFrm*>( pCell ); + pCurrentBottomRightFrame = static_cast<const SwCellFrame*>( pCell ); } } } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } if ( pCells ) { pCells->clear(); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentTopLeftFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentTopRightFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentBottomLeftFrm) ); - pCells->push_back( const_cast< SwCellFrm* >(pCurrentBottomRightFrm) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentTopLeftFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentTopRightFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentBottomLeftFrame) ); + pCells->push_back( const_cast< SwCellFrame* >(pCurrentBottomRightFrame) ); } if( bTableIsValid ) @@ -385,13 +385,13 @@ void GetTableSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd, SwDeletionChecker aDelCheck( pStart ); // otherwise quickly "calculate" the table layout and start over - SwTabFrm *pTable = aUnions.front().GetTable(); + SwTabFrame *pTable = aUnions.front().GetTable(); while( pTable ) { if( pTable->IsValid() ) pTable->InvalidatePos(); pTable->SetONECalcLowers(); - pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut()); + pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut()); pTable->SetCompletePaint(); if( nullptr == (pTable = pTable->GetFollow()) ) break; @@ -430,10 +430,10 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) // #i22135# - Also the content of the table could be // invisible - e.g. in a hidden section // Robust: check, if content was found (e.g. empty table cells) - if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) + if ( !pCNd || pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) return false; - const SwLayoutFrm *pStart = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); + const SwLayoutFrame *pStart = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); OSL_ENSURE( pStart, "without frame nothing works" ); aIdx = rEndNd; @@ -442,12 +442,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) pCNd = aIdx.GetNodes().GoNextSection( &aIdx, false, false ); // #i22135# - Robust: check, if content was found and if it's visible - if ( !pCNd || pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) + if ( !pCNd || pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() ) == nullptr ) { return false; } - const SwLayoutFrm *pEnd = pCNd->getLayoutFrm( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); + const SwLayoutFrame *pEnd = pCNd->getLayoutFrame( pCNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aNullPos )->GetUpper(); OSL_ENSURE( pEnd, "without frame nothing works" ); bool bValidChartSel; @@ -472,7 +472,7 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; SwSelUnion *pUnion = &rSelUnion; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); SWRECTFN( pTable ) bool bRTL = pTable->IsRightToLeft(); @@ -483,12 +483,12 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - std::deque< _Sort_CellFrm > aCellFrms; + std::deque< _Sort_CellFrame > aCellFrames; // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow && bTableIsValid && bValidChartSel ) { @@ -498,9 +498,9 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( bValidChartSel && bTableIsValid && pCell && pRow->IsAnLower( pCell ) ) @@ -511,40 +511,40 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame ohne Celle" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame ohne Celle" ); const SwRect& rUnion = pUnion->GetUnion(), - & rFrmRect = pCell->Frm(); + & rFrameRect = pCell->Frame(); const long nUnionRight = rUnion.Right(); const long nUnionBottom = rUnion.Bottom(); - const long nFrmRight = rFrmRect.Right(); - const long nFrmBottom = rFrmRect.Bottom(); + const long nFrameRight = rFrameRect.Right(); + const long nFrameBottom = rFrameRect.Bottom(); - // ignore if FrmRect is outside the union + // ignore if FrameRect is outside the union const long nXFuzzy = bVert ? 0 : 20; const long nYFuzzy = bVert ? 20 : 0; - if( !( rUnion.Top() + nYFuzzy > nFrmBottom || - nUnionBottom < rFrmRect.Top() + nYFuzzy || - rUnion.Left() + nXFuzzy > nFrmRight || - nUnionRight < rFrmRect.Left() + nXFuzzy )) + if( !( rUnion.Top() + nYFuzzy > nFrameBottom || + nUnionBottom < rFrameRect.Top() + nYFuzzy || + rUnion.Left() + nXFuzzy > nFrameRight || + nUnionRight < rFrameRect.Left() + nXFuzzy )) { - // ok, rUnion is _not_ completely outside of rFrmRect + // ok, rUnion is _not_ completely outside of rFrameRect // if not completely inside the union, then // for Chart it is an invalid selection - if( rUnion.Left() <= rFrmRect.Left() + nXFuzzy && - rFrmRect.Left() <= nUnionRight && - rUnion.Left() <= nFrmRight && - nFrmRight <= nUnionRight + nXFuzzy && - rUnion.Top() <= rFrmRect.Top() + nYFuzzy && - rFrmRect.Top() <= nUnionBottom && - rUnion.Top() <= nFrmBottom && - nFrmBottom <= nUnionBottom+ nYFuzzy ) - - aCellFrms.push_back( - _Sort_CellFrm( *static_cast<const SwCellFrm*>(pCell)) ); + if( rUnion.Left() <= rFrameRect.Left() + nXFuzzy && + rFrameRect.Left() <= nUnionRight && + rUnion.Left() <= nFrameRight && + nFrameRight <= nUnionRight + nXFuzzy && + rUnion.Top() <= rFrameRect.Top() + nYFuzzy && + rFrameRect.Top() <= nUnionBottom && + rUnion.Top() <= nFrameBottom && + nFrameBottom <= nUnionBottom+ nYFuzzy ) + + aCellFrames.push_back( + _Sort_CellFrame( *static_cast<const SwCellFrame*>(pCell)) ); else { bValidChartSel = false; @@ -553,15 +553,15 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } if( !bValidChartSel ) @@ -575,10 +575,10 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) long nXPos = 0; long nHeight = 0; - for( n = 0 ; n < aCellFrms.size(); ++n ) + for( n = 0 ; n < aCellFrames.size(); ++n ) { - const _Sort_CellFrm& rCF = aCellFrms[ n ]; - if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos ) + const _Sort_CellFrame& rCF = aCellFrames[ n ]; + if( (rCF.pFrame->Frame().*fnRect->fnGetTop)() != nYPos ) { // new row if( n ) @@ -592,20 +592,20 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) } } nCellCnt = 1; - nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)(); - nHeight = (rCF.pFrm->Frm().*fnRect->fnGetHeight)(); + nYPos = (rCF.pFrame->Frame().*fnRect->fnGetTop)(); + nHeight = (rCF.pFrame->Frame().*fnRect->fnGetHeight)(); nXPos = bRTL ? - (rCF.pFrm->Frm().*fnRect->fnGetLeft)() : - (rCF.pFrm->Frm().*fnRect->fnGetRight)(); + (rCF.pFrame->Frame().*fnRect->fnGetLeft)() : + (rCF.pFrame->Frame().*fnRect->fnGetRight)(); } else if( nXPos == ( bRTL ? - (rCF.pFrm->Frm().*fnRect->fnGetRight)() : - (rCF.pFrm->Frm().*fnRect->fnGetLeft)() ) && - nHeight == (rCF.pFrm->Frm().*fnRect->fnGetHeight)() ) + (rCF.pFrame->Frame().*fnRect->fnGetRight)() : + (rCF.pFrame->Frame().*fnRect->fnGetLeft)() ) && + nHeight == (rCF.pFrame->Frame().*fnRect->fnGetHeight)() ) { nXPos += ( bRTL ? (-1) : 1 ) * - (rCF.pFrm->Frm().*fnRect->fnGetWidth)(); + (rCF.pFrame->Frame().*fnRect->fnGetWidth)(); ++nCellCnt; } else @@ -627,13 +627,13 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) break; // otherwise quickly "calculate" table layout and start over - SwTabFrm *pTable = aUnions.front().GetTable(); + SwTabFrame *pTable = aUnions.front().GetTable(); for( i = 0; i < aUnions.size(); ++i ) { if( pTable->IsValid() ) pTable->InvalidatePos(); pTable->SetONECalcLowers(); - pTable->Calc(pTable->getRootFrm()->GetCurrShell()->GetOut()); + pTable->Calc(pTable->getRootFrame()->GetCurrShell()->GetOut()); pTable->SetCompletePaint(); if( nullptr == (pTable = pTable->GetFollow()) ) break; @@ -646,42 +646,42 @@ bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd ) return bValidChartSel; } -bool IsFrmInTableSel( const SwRect& rUnion, const SwFrm* pCell ) +bool IsFrameInTableSel( const SwRect& rUnion, const SwFrame* pCell ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without Gazelle" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without Gazelle" ); - if( pCell->FindTabFrm()->IsVertical() ) - return rUnion.Right() >= pCell->Frm().Right() && - rUnion.Left() <= pCell->Frm().Left() && - (( rUnion.Top() <= pCell->Frm().Top()+20 && - rUnion.Bottom() > pCell->Frm().Top() ) || - ( rUnion.Top() >= pCell->Frm().Top() && - rUnion.Bottom() < pCell->Frm().Bottom() )); + if( pCell->FindTabFrame()->IsVertical() ) + return rUnion.Right() >= pCell->Frame().Right() && + rUnion.Left() <= pCell->Frame().Left() && + (( rUnion.Top() <= pCell->Frame().Top()+20 && + rUnion.Bottom() > pCell->Frame().Top() ) || + ( rUnion.Top() >= pCell->Frame().Top() && + rUnion.Bottom() < pCell->Frame().Bottom() )); return - rUnion.Top() <= pCell->Frm().Top() && - rUnion.Bottom() >= pCell->Frm().Bottom() && + rUnion.Top() <= pCell->Frame().Top() && + rUnion.Bottom() >= pCell->Frame().Bottom() && - (( rUnion.Left() <= pCell->Frm().Left()+20 && - rUnion.Right() > pCell->Frm().Left() ) || + (( rUnion.Left() <= pCell->Frame().Left()+20 && + rUnion.Right() > pCell->Frame().Left() ) || - ( rUnion.Left() >= pCell->Frm().Left() && - rUnion.Right() < pCell->Frm().Right() )); + ( rUnion.Left() >= pCell->Frame().Left() && + rUnion.Right() < pCell->Frame().Right() )); } -bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) +bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes ) { - SwShellCrsr* pCrsr = rShell.m_pCurCrsr; + SwShellCursor* pCursor = rShell.m_pCurrentCursor; if ( rShell.IsTableMode() ) - pCrsr = rShell.m_pTableCrsr; + pCursor = rShell.m_pTableCursor; - const SwLayoutFrm *pStart = pCrsr->GetContentNode()->getLayoutFrm( rShell.GetLayout(), - &pCrsr->GetPtPos() )->GetUpper(), - *pEnd = pCrsr->GetContentNode(false)->getLayoutFrm( rShell.GetLayout(), - &pCrsr->GetMkPos() )->GetUpper(); + const SwLayoutFrame *pStart = pCursor->GetContentNode()->getLayoutFrame( rShell.GetLayout(), + &pCursor->GetPtPos() )->GetUpper(), + *pEnd = pCursor->GetContentNode(false)->getLayoutFrame( rShell.GetLayout(), + &pCursor->GetMkPos() )->GetUpper(); - const SwLayoutFrm* pSttCell = pStart; - while( pSttCell && !pSttCell->IsCellFrm() ) + const SwLayoutFrame* pSttCell = pStart; + while( pSttCell && !pSttCell->IsCellFrame() ) pSttCell = pSttCell->GetUpper(); // First, compute tables and rectangles @@ -697,19 +697,19 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) for( i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow ) { - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwCellFrm* pUpperCell = nullptr; - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwCellFrame* pUpperCell = nullptr; + const SwLayoutFrame *pCell = pRow->FirstCell(); while( pCell && pRow->IsAnLower( pCell ) ) { @@ -728,29 +728,29 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) - pUpperCell = static_cast<const SwCellFrm*>(pCell); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) + pUpperCell = static_cast<const SwCellFrame*>(pCell); if( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } if( pUpperCell ) - rBoxes.push_back( const_cast< SwCellFrm* >(pUpperCell) ); + rBoxes.push_back( const_cast< SwCellFrame* >(pUpperCell) ); } if( bFound ) { i = aUnions.size(); break; } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } @@ -766,18 +766,18 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) for( i = 0; i < aUnions.size(); ++i ) { SwSelUnion *pUnion = &aUnions[i]; - const SwTabFrm *pTable = pUnion->GetTable(); + const SwTabFrame *pTable = pUnion->GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while( pRow ) { - if( pRow->Frm().IsOver( pUnion->GetUnion() ) ) + if( pRow->Frame().IsOver( pUnion->GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while( pCell && pRow->IsAnLower( pCell ) ) { @@ -796,20 +796,20 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( pUnion->GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( pUnion->GetUnion(), pCell ) ) { - SwCellFrm* pC = const_cast<SwCellFrm*>(static_cast<const SwCellFrm*>(pCell)); + SwCellFrame* pC = const_cast<SwCellFrame*>(static_cast<const SwCellFrame*>(pCell)); rBoxes.push_back( pC ); } if( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } if( !bTstRow ) @@ -818,7 +818,7 @@ bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes ) break; } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } } @@ -913,10 +913,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, Point aPt( 0, 0 ); const SwContentNode* pCntNd = rPam.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); pCntNd = rPam.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); // First, compute tables and rectangles @@ -938,45 +938,45 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, for ( auto & rSelUnion : aUnions ) { - const SwTabFrm *pTabFrm = rSelUnion.GetTable(); + const SwTabFrame *pTabFrame = rSelUnion.GetTable(); SwRect &rUnion = rSelUnion.GetUnion(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTabFrm->IsFollow() ? - pTabFrm->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTabFrm->Lower()); + const SwLayoutFrame* pRow = pTabFrame->IsFollow() ? + pTabFrame->GetFirstNonHeadlineRow() : + static_cast<const SwLayoutFrame*>(pTabFrame->Lower()); while ( pRow ) { - if ( pRow->Frm().IsOver( rUnion ) ) + if ( pRow->Frame().IsOver( rUnion ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while ( pCell && pRow->IsAnLower( pCell ) ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); // overlap in full width? - if( rUnion.Top() <= pCell->Frm().Top() && - rUnion.Bottom() >= pCell->Frm().Bottom() ) + if( rUnion.Top() <= pCell->Frame().Top() && + rUnion.Bottom() >= pCell->Frame().Bottom() ) { - SwTableBox* pBox = const_cast<SwTableBox*>(static_cast<const SwCellFrm*>(pCell)->GetTabBox()); + SwTableBox* pBox = const_cast<SwTableBox*>(static_cast<const SwCellFrame*>(pCell)->GetTabBox()); // only overlap to the right? - if( ( rUnion.Left() - COLFUZZY ) <= pCell->Frm().Left() && - ( rUnion.Right() - COLFUZZY ) > pCell->Frm().Left() ) + if( ( rUnion.Left() - COLFUZZY ) <= pCell->Frame().Left() && + ( rUnion.Right() - COLFUZZY ) > pCell->Frame().Left() ) { - if( ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) + if( ( rUnion.Right() + COLFUZZY ) < pCell->Frame().Right() ) { sal_uInt16 nInsPos = pBox->GetUpper()-> GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos ); pBox->ClaimFrameFormat(); - SwFormatFrmSize aNew( - pBox->GetFrameFormat()->GetFrmSize() ); - nWidth = rUnion.Right() - pCell->Frm().Left(); + SwFormatFrameSize aNew( + pBox->GetFrameFormat()->GetFrameSize() ); + nWidth = rUnion.Right() - pCell->Frame().Left(); nWidth = nWidth * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); long nTmpWidth = aNew.GetWidth() - nWidth; aNew.SetWidth( nWidth ); pBox->GetFrameFormat()->SetFormatAttr( aNew ); @@ -984,7 +984,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos ]; @@ -1001,26 +1001,26 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); } } // overlapping on left- or right-side - else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frm().Left() && - ( rUnion.Right() + COLFUZZY ) < pCell->Frm().Right() ) + else if( ( rUnion.Left() - COLFUZZY ) >= pCell->Frame().Left() && + ( rUnion.Right() + COLFUZZY ) < pCell->Frame().Right() ) { sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos, 2 ); pBox->ClaimFrameFormat(); - SwFormatFrmSize aNew( - pBox->GetFrameFormat()->GetFrmSize() ); - long nLeft = rUnion.Left() - pCell->Frm().Left(); + SwFormatFrameSize aNew( + pBox->GetFrameFormat()->GetFrameSize() ); + long nLeft = rUnion.Left() - pCell->Frame().Left(); nLeft = nLeft * aNew.GetWidth() / - pCell->Frm().Width(); - long nRight = pCell->Frm().Right() - rUnion.Right(); + pCell->Frame().Width(); + long nRight = pCell->Frame().Right() - rUnion.Right(); nRight = nRight * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); nWidth = aNew.GetWidth() - nLeft - nRight; aNew.SetWidth( nLeft ); @@ -1049,7 +1049,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( - _CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(), + _CmpLPt( (pCell->Frame().*fnRect->fnGetPos)(), pBox, bVert ) ); pBox = pBox->GetUpper()->GetTabBoxes()[ nInsPos+1 ]; @@ -1061,23 +1061,23 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pUndo->AddNewBox( pBox->GetSttIdx() ); } // is right side of box part of the selected area? - else if( ( pCell->Frm().Right() - COLFUZZY ) < rUnion.Right() && - ( pCell->Frm().Right() - COLFUZZY ) > rUnion.Left() && - ( pCell->Frm().Left() + COLFUZZY ) < rUnion.Left() ) + else if( ( pCell->Frame().Right() - COLFUZZY ) < rUnion.Right() && + ( pCell->Frame().Right() - COLFUZZY ) > rUnion.Left() && + ( pCell->Frame().Left() + COLFUZZY ) < rUnion.Left() ) { // then we should insert a new box and adjust the widths sal_uInt16 nInsPos = pBox->GetUpper()->GetTabBoxes().GetPos( pBox )+1; lcl_InsTableBox( pTableNd, pDoc, pBox, nInsPos ); - SwFormatFrmSize aNew(pBox->GetFrameFormat()->GetFrmSize() ); - long nLeft = rUnion.Left() - pCell->Frm().Left(), - nRight = pCell->Frm().Right() - rUnion.Left(); + SwFormatFrameSize aNew(pBox->GetFrameFormat()->GetFrameSize() ); + long nLeft = rUnion.Left() - pCell->Frame().Left(), + nRight = pCell->Frame().Right() - rUnion.Left(); nLeft = nLeft * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); nRight = nRight * aNew.GetWidth() / - pCell->Frm().Width(); + pCell->Frame().Width(); aNew.SetWidth( nLeft ); pBox->ClaimFrameFormat()->SetFormatAttr( aNew ); @@ -1091,7 +1091,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, pLastBox = pBox; rBoxes.insert( pBox ); aPosArr.insert( _CmpLPt( Point( rUnion.Left(), - pCell->Frm().Top()), pBox, bVert )); + pCell->Frame().Top()), pBox, bVert )); if( pUndo ) pUndo->AddNewBox( pBox->GetSttIdx() ); @@ -1099,16 +1099,16 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); // --> Check if table cell is not empty - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } @@ -1133,7 +1133,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, SwPaM aPam( pDoc->GetNodes() ); #if defined( DEL_ONLY_EMPTY_LINES ) - nWidth = pFirstBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pFirstBox->GetFrameFormat()->GetFrameSize().GetWidth(); bool bEmptyLine = sal_True; sal_uInt16 n, nSttPos = 0; @@ -1145,7 +1145,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( bEmptyLine && !IsEmptyBox( *rPt.pSelBox, aPam )) bEmptyLine = sal_False; if( bCalcWidth ) - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); } else { @@ -1178,7 +1178,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } #elif defined( DEL_EMPTY_BOXES_AT_START_AND_END ) - nWidth = pFirstBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth = pFirstBox->GetFrameFormat()->GetFrameSize().GetWidth(); sal_uInt16 n, nSttPos = 0, nSEndPos = 0, nESttPos = 0; for( n = 0; n < aPosArr.Count(); ++n ) @@ -1196,7 +1196,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, nESttPos = n+1; if( bCalcWidth ) - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); } else { @@ -1280,7 +1280,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, if( bCalcWidth ) { if( nY == ( bVert ? rPt.X() : rPt.Y() ) ) // same Y level? - nWidth += rPt.pSelBox->GetFrameFormat()->GetFrmSize().GetWidth(); + nWidth += rPt.pSelBox->GetFrameFormat()->GetFrameSize().GetWidth(); else bCalcWidth = false; // one line ready } @@ -1383,7 +1383,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, } // set width of the box - (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrmSize( ATT_VAR_SIZE, nWidth, 0 )); + (*ppMergeBox)->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 )); if( pUndo ) pUndo->AddNewBox( (*ppMergeBox)->GetSttIdx() ); } @@ -1431,10 +1431,10 @@ sal_uInt16 CheckMergeSel( const SwPaM& rPam ) Point aPt; const SwContentNode* pCntNd = rPam.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); pCntNd = rPam.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPt )->GetUpper(); GetTableSel( pStart, pEnd, aBoxes, nullptr ); return CheckMergeSel( aBoxes ); @@ -1487,46 +1487,46 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes ) return eRet; } -static SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish, +static SwTwips lcl_CalcWish( const SwLayoutFrame *pCell, long nWish, const long nAct ) { - const SwLayoutFrm *pTmp = pCell; + const SwLayoutFrame *pTmp = pCell; if ( !nWish ) nWish = 1; const bool bRTL = pCell->IsRightToLeft(); SwTwips nRet = bRTL ? - nAct - pCell->Frm().Width() : + nAct - pCell->Frame().Width() : 0; while ( pTmp ) { while ( pTmp->GetPrev() ) { - pTmp = static_cast<const SwLayoutFrm*>(pTmp->GetPrev()); - sal_Int64 nTmp = pTmp->GetFormat()->GetFrmSize().GetWidth(); + pTmp = static_cast<const SwLayoutFrame*>(pTmp->GetPrev()); + sal_Int64 nTmp = pTmp->GetFormat()->GetFrameSize().GetWidth(); // multiply in 64-bit to avoid overflow here! nRet += ( bRTL ? ( -1 ) : 1 ) * nTmp * nAct / nWish; } pTmp = pTmp->GetUpper()->GetUpper(); - if ( pTmp && !pTmp->IsCellFrm() ) + if ( pTmp && !pTmp->IsCellFrame() ) pTmp = nullptr; } return nRet; } -static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, - const SwLayoutFrm *&rpEnd, +static void lcl_FindStartEndRow( const SwLayoutFrame *&rpStart, + const SwLayoutFrame *&rpEnd, const int bChkProtected ) { // Put Start at beginning of a row. // Put End at the end of its row. - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetUpper()->Lower()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetUpper()->Lower()); while ( rpEnd->GetNext() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetNext()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetNext()); - std::deque<const SwLayoutFrm *> aSttArr, aEndArr; - const SwLayoutFrm *pTmp; + std::deque<const SwLayoutFrame *> aSttArr, aEndArr; + const SwLayoutFrame *pTmp; for( pTmp = rpStart; (FRM_CELL|FRM_ROW) & pTmp->GetType(); pTmp = pTmp->GetUpper() ) { @@ -1538,7 +1538,7 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, aEndArr.push_front( pTmp ); } - for( std::deque<const SwLayoutFrm *>::size_type n = 0; n < aEndArr.size() && n < aSttArr.size(); ++n ) + for( std::deque<const SwLayoutFrame *>::size_type n = 0; n < aEndArr.size() && n < aSttArr.size(); ++n ) if( aSttArr[ n ] != aEndArr[ n ] ) { // first unequal line or box - all odds are @@ -1556,18 +1556,18 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, rpEnd = aEndArr[ n+1 ]; if( n ) { - const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>(aSttArr[ n-1 ]); - const SwTableLines& rLns = pCellFrm-> + const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>(aSttArr[ n-1 ]); + const SwTableLines& rLns = pCellFrame-> GetTabBox()->GetTabLines(); - if( rLns[ 0 ] == static_cast<const SwRowFrm*>(aSttArr[ n ])->GetTabLine() && + if( rLns[ 0 ] == static_cast<const SwRowFrame*>(aSttArr[ n ])->GetTabLine() && rLns[ rLns.size() - 1 ] == - static_cast<const SwRowFrm*>(aEndArr[ n ])->GetTabLine() ) + static_cast<const SwRowFrame*>(aEndArr[ n ])->GetTabLine() ) { - rpStart = rpEnd = pCellFrm; + rpStart = rpEnd = pCellFrame; while ( rpStart->GetPrev() ) - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetPrev()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetPrev()); while ( rpEnd->GetNext() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetNext()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetNext()); } } } @@ -1579,34 +1579,34 @@ static void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, // Beginning and end should not be in protected cells while ( rpStart->GetFormat()->GetProtect().IsContentProtected() ) - rpStart = static_cast<const SwLayoutFrm*>(rpStart->GetNext()); + rpStart = static_cast<const SwLayoutFrame*>(rpStart->GetNext()); while ( rpEnd->GetFormat()->GetProtect().IsContentProtected() ) - rpEnd = static_cast<const SwLayoutFrm*>(rpEnd->GetPrev()); + rpEnd = static_cast<const SwLayoutFrame*>(rpEnd->GetPrev()); } -static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, - const SwLayoutFrm *&rpEnd, +static void lcl_FindStartEndCol( const SwLayoutFrame *&rpStart, + const SwLayoutFrame *&rpEnd, const int bChkProtected ) { // Beginning and end vertical till the border of the table; // Consider the whole table, including master and follows. - // In order to start we need the mother-tableFrm + // In order to start we need the mother-tableFrame if( !rpStart ) return; - const SwTabFrm *pOrg = rpStart->FindTabFrm(); - const SwTabFrm *pTab = pOrg; + const SwTabFrame *pOrg = rpStart->FindTabFrame(); + const SwTabFrame *pTab = pOrg; SWRECTFN( pTab ) bool bRTL = pTab->IsRightToLeft(); - const long nTmpWish = pOrg->GetFormat()->GetFrmSize().GetWidth(); + const long nTmpWish = pOrg->GetFormat()->GetFrameSize().GetWidth(); const long nWish = ( nTmpWish > 0 ) ? nTmpWish : 1; while ( pTab->IsFollow() ) { - const SwFrm *pTmp = pTab->FindPrev(); - OSL_ENSURE( pTmp->IsTabFrm(), "Predecessor of Follow is not Master." ); - pTab = static_cast<const SwTabFrm*>(pTmp); + const SwFrame *pTmp = pTab->FindPrev(); + OSL_ENSURE( pTmp->IsTabFrame(), "Predecessor of Follow is not Master." ); + pTab = static_cast<const SwTabFrame*>(pTmp); } SwTwips nSX = 0; @@ -1614,24 +1614,24 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->GetTable()->IsNewModel() ) { - nSX = (rpStart->Frm().*fnRect->fnGetLeft )(); - nSX2 = (rpStart->Frm().*fnRect->fnGetRight)(); + nSX = (rpStart->Frame().*fnRect->fnGetLeft )(); + nSX2 = (rpStart->Frame().*fnRect->fnGetRight)(); } else { const SwTwips nPrtWidth = (pTab->Prt().*fnRect->fnGetWidth)(); nSX = ::lcl_CalcWish( rpStart, nWish, nPrtWidth ) + (pTab->*fnRect->fnGetPrtLeft)(); - nSX2 = nSX + (rpStart->GetFormat()->GetFrmSize().GetWidth() * nPrtWidth / nWish); + nSX2 = nSX + (rpStart->GetFormat()->GetFrameSize().GetWidth() * nPrtWidth / nWish); } - const SwLayoutFrm *pTmp = pTab->FirstCell(); + const SwLayoutFrame *pTmp = pTab->FirstCell(); while ( pTmp && - (!pTmp->IsCellFrm() || - ( ( ! bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() < nSX && - (pTmp->Frm().*fnRect->fnGetRight)()< nSX2 ) || - ( bRTL && (pTmp->Frm().*fnRect->fnGetLeft)() > nSX && - (pTmp->Frm().*fnRect->fnGetRight)()> nSX2 ) ) ) ) + (!pTmp->IsCellFrame() || + ( ( ! bRTL && (pTmp->Frame().*fnRect->fnGetLeft)() < nSX && + (pTmp->Frame().*fnRect->fnGetRight)()< nSX2 ) || + ( bRTL && (pTmp->Frame().*fnRect->fnGetLeft)() > nSX && + (pTmp->Frame().*fnRect->fnGetRight)()> nSX2 ) ) ) ) pTmp = pTmp->GetNextLayoutLeaf(); if ( pTmp ) @@ -1639,7 +1639,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, pTab = pOrg; - const SwTabFrm* pLastValidTab = pTab; + const SwTabFrame* pLastValidTab = pTab; while ( pTab->GetFollow() ) { @@ -1650,7 +1650,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->HasFollowFlowLine() ) { pTab = pTab->GetFollow(); - const SwFrm* pTmpRow = pTab->GetFirstNonHeadlineRow(); + const SwFrame* pTmpRow = pTab->GetFirstNonHeadlineRow(); if ( pTmpRow && pTmpRow->GetNext() ) pLastValidTab = pTab; } @@ -1663,7 +1663,7 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, if ( pTab->GetTable()->IsNewModel() ) { - nEX = (rpEnd->Frm().*fnRect->fnGetLeft )(); + nEX = (rpEnd->Frame().*fnRect->fnGetLeft )(); } else { @@ -1671,19 +1671,19 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, nEX = ::lcl_CalcWish( rpEnd, nWish, nPrtWidth ) + (pTab->*fnRect->fnGetPrtLeft)(); } - const SwContentFrm* pLastContent = pTab->FindLastContent(); + const SwContentFrame* pLastContent = pTab->FindLastContent(); rpEnd = pLastContent ? pLastContent->GetUpper() : nullptr; // --> Made code robust. If pTab does not have a lower, // we would crash here. if ( !pLastContent ) return; - while( !rpEnd->IsCellFrm() ) + while( !rpEnd->IsCellFrame() ) rpEnd = rpEnd->GetUpper(); - while ( ( bRTL && (rpEnd->Frm().*fnRect->fnGetLeft)() < nEX ) || - ( ! bRTL && (rpEnd->Frm().*fnRect->fnGetLeft)() > nEX ) ) + while ( ( bRTL && (rpEnd->Frame().*fnRect->fnGetLeft)() < nEX ) || + ( ! bRTL && (rpEnd->Frame().*fnRect->fnGetLeft)() > nEX ) ) { - const SwLayoutFrm* pTmpLeaf = rpEnd->GetPrevLayoutLeaf(); + const SwLayoutFrame* pTmpLeaf = rpEnd->GetPrevLayoutLeaf(); if( !pTmpLeaf || !pTab->IsAnLower( pTmpLeaf ) ) break; rpEnd = pTmpLeaf; @@ -1696,21 +1696,21 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, // If necessary we should search backwards again while ( rpStart->GetFormat()->GetProtect().IsContentProtected() ) { - const SwLayoutFrm *pTmpLeaf = rpStart; + const SwLayoutFrame *pTmpLeaf = rpStart; pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() > nEX ) // first skip line + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() > nEX ) // first skip line pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() < nSX && - (pTmpLeaf->Frm().*fnRect->fnGetRight)()< nSX2 ) + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() < nSX && + (pTmpLeaf->Frame().*fnRect->fnGetRight)()< nSX2 ) pTmpLeaf = pTmpLeaf->GetNextLayoutLeaf(); - const SwTabFrm *pTmpTab = rpStart->FindTabFrm(); + const SwTabFrame *pTmpTab = rpStart->FindTabFrame(); if ( !pTmpTab->IsAnLower( pTmpLeaf ) ) { pTmpTab = pTmpTab->GetFollow(); rpStart = pTmpTab->FirstCell(); while ( rpStart && - (rpStart->Frm().*fnRect->fnGetLeft)() < nSX && - (rpStart->Frm().*fnRect->fnGetRight)()< nSX2 ) + (rpStart->Frame().*fnRect->fnGetLeft)() < nSX && + (rpStart->Frame().*fnRect->fnGetRight)()< nSX2 ) rpStart = rpStart->GetNextLayoutLeaf(); } else @@ -1718,21 +1718,21 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, } while ( rpEnd->GetFormat()->GetProtect().IsContentProtected() ) { - const SwLayoutFrm *pTmpLeaf = rpEnd; + const SwLayoutFrame *pTmpLeaf = rpEnd; pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() < nEX )//erstmal die Zeile ueberspr. + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() < nEX )//erstmal die Zeile ueberspr. pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - while ( pTmpLeaf && (pTmpLeaf->Frm().*fnRect->fnGetLeft)() > nEX ) + while ( pTmpLeaf && (pTmpLeaf->Frame().*fnRect->fnGetLeft)() > nEX ) pTmpLeaf = pTmpLeaf->GetPrevLayoutLeaf(); - const SwTabFrm *pTmpTab = rpEnd->FindTabFrm(); + const SwTabFrame *pTmpTab = rpEnd->FindTabFrame(); if ( !pTmpLeaf || !pTmpTab->IsAnLower( pTmpLeaf ) ) { - pTmpTab = static_cast<const SwTabFrm*>(pTmpTab->FindPrev()); - OSL_ENSURE( pTmpTab->IsTabFrm(), "Predecessor of Follow not Master."); + pTmpTab = static_cast<const SwTabFrame*>(pTmpTab->FindPrev()); + OSL_ENSURE( pTmpTab->IsTabFrame(), "Predecessor of Follow not Master."); rpEnd = pTmpTab->FindLastContent()->GetUpper(); - while( !rpEnd->IsCellFrm() ) + while( !rpEnd->IsCellFrame() ) rpEnd = rpEnd->GetUpper(); - while ( (rpEnd->Frm().*fnRect->fnGetLeft)() > nEX ) + while ( (rpEnd->Frame().*fnRect->fnGetLeft)() > nEX ) rpEnd = rpEnd->GetPrevLayoutLeaf(); } else @@ -1740,22 +1740,22 @@ static void lcl_FindStartEndCol( const SwLayoutFrm *&rpStart, } } -void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, - const SwLayoutFrm *pEnd, const SwTableSearchType eSearchType ) +void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrame *pStart, + const SwLayoutFrame *pEnd, const SwTableSearchType eSearchType ) { - while ( pStart && !pStart->IsCellFrm() ) + while ( pStart && !pStart->IsCellFrame() ) pStart = pStart->GetUpper(); - while ( pEnd && !pEnd->IsCellFrm() ) + while ( pEnd && !pEnd->IsCellFrame() ) pEnd = pEnd->GetUpper(); if ( !pStart || !pEnd ) { - OSL_FAIL( "MakeSelUnions with pStart or pEnd not in CellFrm" ); + OSL_FAIL( "MakeSelUnions with pStart or pEnd not in CellFrame" ); return; } - const SwTabFrm *pTable = pStart->FindTabFrm(); - const SwTabFrm *pEndTable = pEnd->FindTabFrm(); + const SwTabFrame *pTable = pStart->FindTabFrame(); + const SwTabFrame *pEndTable = pEnd->FindTabFrame(); if( !pTable || !pEndTable ) return; bool bExchange = false; @@ -1771,12 +1771,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, else { SWRECTFN( pTable ) - long nSttTop = (pStart->Frm().*fnRect->fnGetTop)(); - long nEndTop = (pEnd->Frm().*fnRect->fnGetTop)(); + long nSttTop = (pStart->Frame().*fnRect->fnGetTop)(); + long nEndTop = (pEnd->Frame().*fnRect->fnGetTop)(); if( nSttTop == nEndTop ) { - if( (pStart->Frm().*fnRect->fnGetLeft)() > - (pEnd->Frm().*fnRect->fnGetLeft)() ) + if( (pStart->Frame().*fnRect->fnGetLeft)() > + (pEnd->Frame().*fnRect->fnGetLeft)() ) bExchange = true; } else if( bVert == ( nSttTop < nEndTop ) ) @@ -1784,7 +1784,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } if ( bExchange ) { - const SwLayoutFrm *pTmp = pStart; + const SwLayoutFrame *pTmp = pStart; pStart = pEnd; pEnd = pTmp; // do no resort pTable and pEndTable, set new below @@ -1801,12 +1801,12 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, if ( !pEnd || !pStart ) return; // Made code robust. // retrieve again, as they have been moved - pTable = pStart->FindTabFrm(); - pEndTable = pEnd->FindTabFrm(); + pTable = pStart->FindTabFrame(); + pEndTable = pEnd->FindTabFrame(); - const long nStSz = pStart->GetFormat()->GetFrmSize().GetWidth(); - const long nEdSz = pEnd->GetFormat()->GetFrmSize().GetWidth(); - const long nWish = std::max( 1L, pTable->GetFormat()->GetFrmSize().GetWidth() ); + const long nStSz = pStart->GetFormat()->GetFrameSize().GetWidth(); + const long nEdSz = pEnd->GetFormat()->GetFrameSize().GetWidth(); + const long nWish = std::max( 1L, pTable->GetFormat()->GetFrameSize().GetWidth() ); while ( pTable ) { SWRECTFN( pTable ) @@ -1823,13 +1823,13 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, long nSt2; long nEd2; if( pTable->IsAnLower( pStart ) ) - nSt2 = (pStart->Frm().*fnRect->fnGetTop)(); + nSt2 = (pStart->Frame().*fnRect->fnGetTop)(); else - nSt2 = (pTable->Frm().*fnRect->fnGetTop)(); + nSt2 = (pTable->Frame().*fnRect->fnGetTop)(); if( pTable->IsAnLower( pEnd ) ) - nEd2 = (pEnd->Frm().*fnRect->fnGetBottom)(); + nEd2 = (pEnd->Frame().*fnRect->fnGetBottom)(); else - nEd2 = (pTable->Frm().*fnRect->fnGetBottom)(); + nEd2 = (pTable->Frame().*fnRect->fnGetBottom)(); Point aSt, aEd; if( nSt1 > nEd1 ) { @@ -1864,58 +1864,58 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, // erroneous results could occur during split/merge. // To prevent these we will determine the first and last row // within the union and use their values for a new union - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); - while ( pRow && !pRow->Frm().IsOver( aUnion ) ) - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + while ( pRow && !pRow->Frame().IsOver( aUnion ) ) + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); // #i31976# // A follow flow row may contain emtpy cells. These are not // considered by FirstCell(). Therefore we have to find // the first cell manually: - const SwFrm* pTmpCell = nullptr; + const SwFrame* pTmpCell = nullptr; if ( pTable->IsFollow() && pRow && pRow->IsInFollowFlowRow() ) { - const SwFrm* pTmpRow = pRow; - while ( pTmpRow && pTmpRow->IsRowFrm() ) + const SwFrame* pTmpRow = pRow; + while ( pTmpRow && pTmpRow->IsRowFrame() ) { - pTmpCell = static_cast<const SwRowFrm*>(pTmpRow)->Lower(); - pTmpRow = static_cast<const SwCellFrm*>(pTmpCell)->Lower(); + pTmpCell = static_cast<const SwRowFrame*>(pTmpRow)->Lower(); + pTmpRow = static_cast<const SwCellFrame*>(pTmpCell)->Lower(); } - OSL_ENSURE( !pTmpCell || pTmpCell->IsCellFrm(), "Lower of rowframe != cellframe?!" ); + OSL_ENSURE( !pTmpCell || pTmpCell->IsCellFrame(), "Lower of rowframe != cellframe?!" ); } - const SwLayoutFrm* pFirst = pTmpCell ? - static_cast<const SwLayoutFrm*>(pTmpCell) : + const SwLayoutFrame* pFirst = pTmpCell ? + static_cast<const SwLayoutFrame*>(pTmpCell) : pRow ? pRow->FirstCell() : nullptr; - while ( pFirst && !::IsFrmInTableSel( aUnion, pFirst ) ) + while ( pFirst && !::IsFrameInTableSel( aUnion, pFirst ) ) { if ( pFirst->GetNext() ) { - pFirst = static_cast<const SwLayoutFrm*>(pFirst->GetNext()); - if ( pFirst->Lower() && pFirst->Lower()->IsRowFrm() ) + pFirst = static_cast<const SwLayoutFrame*>(pFirst->GetNext()); + if ( pFirst->Lower() && pFirst->Lower()->IsRowFrame() ) pFirst = pFirst->FirstCell(); } else - pFirst = ::lcl_FindNextCellFrm( pFirst ); + pFirst = ::lcl_FindNextCellFrame( pFirst ); } - const SwLayoutFrm* pLast = nullptr; - const SwFrm* pLastContent = pTable->FindLastContent(); + const SwLayoutFrame* pLast = nullptr; + const SwFrame* pLastContent = pTable->FindLastContent(); if ( pLastContent ) - pLast = ::lcl_FindCellFrm( pLastContent->GetUpper() ); + pLast = ::lcl_FindCellFrame( pLastContent->GetUpper() ); - while ( pLast && !::IsFrmInTableSel( aUnion, pLast ) ) - pLast = ::lcl_FindCellFrm( pLast->GetPrevLayoutLeaf() ); + while ( pLast && !::IsFrameInTableSel( aUnion, pLast ) ) + pLast = ::lcl_FindCellFrame( pLast->GetPrevLayoutLeaf() ); if ( pFirst && pLast ) //Robust { - aUnion = pFirst->Frm(); - aUnion.Union( pLast->Frm() ); + aUnion = pFirst->Frame(); + aUnion.Union( pLast->Frame() ); } else aUnion.Width( 0 ); @@ -1923,7 +1923,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, if( (aUnion.*fnRect->fnGetWidth)() ) { - rUnions.push_back(SwSelUnion(aUnion, const_cast<SwTabFrm*>(pTable))); + rUnions.push_back(SwSelUnion(aUnion, const_cast<SwTabFrame*>(pTable))); } pTable = pTable->GetFollow(); @@ -1932,16 +1932,16 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart, } } -bool CheckSplitCells( const SwCrsrShell& rShell, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursorShell& rShell, sal_uInt16 nDiv, const SwTableSearchType eSearchType ) { if( !rShell.IsTableMode() ) - rShell.GetCrsr(); + rShell.GetCursor(); - return CheckSplitCells( *rShell.getShellCrsr(false), nDiv, eSearchType ); + return CheckSplitCells( *rShell.getShellCursor(false), nDiv, eSearchType ); } -bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, +bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, const SwTableSearchType eSearchType ) { if( 1 >= nDiv ) @@ -1951,18 +1951,18 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // Get start and end cell Point aPtPos, aMkPos; - const SwShellCrsr* pShCrsr = dynamic_cast<const SwShellCrsr*>(&rCrsr); - if( pShCrsr ) + const SwShellCursor* pShCursor = dynamic_cast<const SwShellCursor*>(&rCursor); + if( pShCursor ) { - aPtPos = pShCrsr->GetPtPos(); - aMkPos = pShCrsr->GetMkPos(); + aPtPos = pShCursor->GetPtPos(); + aMkPos = pShCursor->GetMkPos(); } - const SwContentNode* pCntNd = rCrsr.GetContentNode(); - const SwLayoutFrm *pStart = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + const SwContentNode* pCntNd = rCursor.GetContentNode(); + const SwLayoutFrame *pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aPtPos )->GetUpper(); - pCntNd = rCrsr.GetContentNode(false); - const SwLayoutFrm *pEnd = pCntNd->getLayoutFrm( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), + pCntNd = rCursor.GetContentNode(false); + const SwLayoutFrame *pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), &aMkPos )->GetUpper(); SWRECTFN( pStart->GetUpper() ) @@ -1975,39 +1975,39 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // now search boxes for each entry and emit for ( auto rSelUnion : aUnions ) { - const SwTabFrm *pTable = rSelUnion.GetTable(); + const SwTabFrame *pTable = rSelUnion.GetTable(); // Skip any repeated headlines in the follow: - const SwLayoutFrm* pRow = pTable->IsFollow() ? + const SwLayoutFrame* pRow = pTable->IsFollow() ? pTable->GetFirstNonHeadlineRow() : - static_cast<const SwLayoutFrm*>(pTable->Lower()); + static_cast<const SwLayoutFrame*>(pTable->Lower()); while ( pRow ) { - if ( pRow->Frm().IsOver( rSelUnion.GetUnion() ) ) + if ( pRow->Frame().IsOver( rSelUnion.GetUnion() ) ) { - const SwLayoutFrm *pCell = pRow->FirstCell(); + const SwLayoutFrame *pCell = pRow->FirstCell(); while ( pCell && pRow->IsAnLower( pCell ) ) { - OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" ); - if( ::IsFrmInTableSel( rSelUnion.GetUnion(), pCell ) ) + OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" ); + if( ::IsFrameInTableSel( rSelUnion.GetUnion(), pCell ) ) { - if( (pCell->Frm().*fnRect->fnGetWidth)() < nMinValue ) + if( (pCell->Frame().*fnRect->fnGetWidth)() < nMinValue ) return false; } if ( pCell->GetNext() ) { - pCell = static_cast<const SwLayoutFrm*>(pCell->GetNext()); - if ( pCell->Lower() && pCell->Lower()->IsRowFrm() ) + pCell = static_cast<const SwLayoutFrame*>(pCell->GetNext()); + if ( pCell->Lower() && pCell->Lower()->IsRowFrame() ) pCell = pCell->FirstCell(); } else - pCell = ::lcl_FindNextCellFrm( pCell ); + pCell = ::lcl_FindNextCellFrame( pCell ); } } - pRow = static_cast<const SwLayoutFrm*>(pRow->GetNext()); + pRow = static_cast<const SwLayoutFrame*>(pRow->GetNext()); } } return true; @@ -2017,18 +2017,18 @@ bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv, // into a new structure, retaining the table structure // new: SS for targeted erasing/restoring of the layout -static void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrm *pUpper, SwFrm *pSibling ) +static void lcl_InsertRow( SwTableLine &rLine, SwLayoutFrame *pUpper, SwFrame *pSibling ) { - SwRowFrm *pRow = new SwRowFrm( rLine, pUpper ); - if ( pUpper->IsTabFrm() && static_cast<SwTabFrm*>(pUpper)->IsFollow() ) + SwRowFrame *pRow = new SwRowFrame( rLine, pUpper ); + if ( pUpper->IsTabFrame() && static_cast<SwTabFrame*>(pUpper)->IsFollow() ) { - SwTabFrm* pTabFrm = static_cast<SwTabFrm*>(pUpper); - pTabFrm->FindMaster()->InvalidatePos(); //can absorb the line + SwTabFrame* pTabFrame = static_cast<SwTabFrame*>(pUpper); + pTabFrame->FindMaster()->InvalidatePos(); //can absorb the line - if ( pSibling && pTabFrm->IsInHeadline( *pSibling ) ) + if ( pSibling && pTabFrame->IsInHeadline( *pSibling ) ) { // Skip any repeated headlines in the follow: - pSibling = pTabFrm->GetFirstNonHeadlineRow(); + pSibling = pTabFrame->GetFirstNonHeadlineRow(); } } pRow->Paste( pUpper, pSibling ); @@ -2133,20 +2133,20 @@ void _FndBox::SetTableLines( const SwTable &rTable ) pLineBehind = rTable.GetTabLines()[nPos]; } -inline void UnsetFollow( SwFlowFrm *pTab ) +inline void UnsetFollow( SwFlowFrame *pTab ) { pTab->m_pPrecede = nullptr; } //When bAccTableDispose is FALSE,the acc table should not be disposed. -//void _FndBox::DelFrms( SwTable &rTable ) -void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) +//void _FndBox::DelFrames( SwTable &rTable ) +void _FndBox::DelFrames( SwTable &rTable, bool bAccTableDispose ) { // All lines between pLineBefore and pLineBehind should be cut // from the layout and erased. // If this creates empty Follows we should destroy these. // If a master is destroyed, the follow should become master. - // Always a TabFrm should remain. + // Always a TabFrame should remain. sal_uInt16 nStPos = 0; sal_uInt16 nEndPos= rTable.GetTabLines().size() - 1; @@ -2173,42 +2173,42 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) for ( sal_uInt16 i = nStPos; i <= nEndPos; ++i) { SwFrameFormat *pFormat = rTable.GetTabLines()[i]->GetFrameFormat(); - SwIterator<SwRowFrm,SwFormat> aIter( *pFormat ); - for ( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() ) + SwIterator<SwRowFrame,SwFormat> aIter( *pFormat ); + for ( SwRowFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { - if ( pFrm->GetTabLine() == rTable.GetTabLines()[i] ) + if ( pFrame->GetTabLine() == rTable.GetTabLines()[i] ) { bool bDel = true; - SwTabFrm *pUp = !pFrm->GetPrev() && !pFrm->GetNext() ? - static_cast<SwTabFrm*>(pFrm->GetUpper()) : nullptr; + SwTabFrame *pUp = !pFrame->GetPrev() && !pFrame->GetNext() ? + static_cast<SwTabFrame*>(pFrame->GetUpper()) : nullptr; if ( !pUp ) { const sal_uInt16 nRepeat = - static_cast<SwTabFrm*>(pFrm->GetUpper())->GetTable()->GetRowsToRepeat(); + static_cast<SwTabFrame*>(pFrame->GetUpper())->GetTable()->GetRowsToRepeat(); if ( nRepeat > 0 && - static_cast<SwTabFrm*>(pFrm->GetUpper())->IsFollow() ) + static_cast<SwTabFrame*>(pFrame->GetUpper())->IsFollow() ) { - if ( !pFrm->GetNext() ) + if ( !pFrame->GetNext() ) { - SwRowFrm* pFirstNonHeadline = - static_cast<SwTabFrm*>(pFrm->GetUpper())->GetFirstNonHeadlineRow(); - if ( pFirstNonHeadline == pFrm ) + SwRowFrame* pFirstNonHeadline = + static_cast<SwTabFrame*>(pFrame->GetUpper())->GetFirstNonHeadlineRow(); + if ( pFirstNonHeadline == pFrame ) { - pUp = static_cast<SwTabFrm*>(pFrm->GetUpper()); + pUp = static_cast<SwTabFrame*>(pFrame->GetUpper()); } } } } if ( pUp ) { - SwTabFrm *pFollow = pUp->GetFollow(); - SwTabFrm *pPrev = pUp->IsFollow() ? pUp : nullptr; + SwTabFrame *pFollow = pUp->GetFollow(); + SwTabFrame *pPrev = pUp->IsFollow() ? pUp : nullptr; if ( pPrev ) { - SwFrm *pTmp = pPrev->FindPrev(); - OSL_ENSURE( pTmp->IsTabFrm(), + SwFrame *pTmp = pPrev->FindPrev(); + OSL_ENSURE( pTmp->IsTabFrame(), "Predecessor of Follow is no Master."); - pPrev = static_cast<SwTabFrm*>(pTmp); + pPrev = static_cast<SwTabFrame*>(pTmp); } if ( pPrev ) { @@ -2222,90 +2222,90 @@ void _FndBox::DelFrms( SwTable &rTable, bool bAccTableDispose ) else if ( pFollow ) ::UnsetFollow( pFollow ); - // A TableFrm should always remain! + // A TableFrame should always remain! if ( pPrev || pFollow ) { // OD 26.08.2003 #i18103# - if table is in a section, // lock the section, to avoid its delete. { - SwSectionFrm* pSctFrm = pUp->FindSctFrm(); + SwSectionFrame* pSctFrame = pUp->FindSctFrame(); bool bOldSectLock = false; - if ( pSctFrm ) + if ( pSctFrame ) { - bOldSectLock = pSctFrm->IsColLocked(); - pSctFrm->ColLock(); + bOldSectLock = pSctFrame->IsColLocked(); + pSctFrame->ColLock(); } pUp->Cut(); - if ( pSctFrm && !bOldSectLock ) + if ( pSctFrame && !bOldSectLock ) { - pSctFrm->ColUnlock(); + pSctFrame->ColUnlock(); } } - SwFrm::DestroyFrm(pUp); + SwFrame::DestroyFrame(pUp); bDel = false; // Row goes to /dev/null. } } if ( bDel ) { - SwFrm* pTabFrm = pFrm->GetUpper(); - if ( pTabFrm->IsTabFrm() && - !pFrm->GetNext() && - static_cast<SwTabFrm*>(pTabFrm)->GetFollow() ) + SwFrame* pTabFrame = pFrame->GetUpper(); + if ( pTabFrame->IsTabFrame() && + !pFrame->GetNext() && + static_cast<SwTabFrame*>(pTabFrame)->GetFollow() ) { // We do not delete the follow flow line, // this will be done automatically in the // next turn. - static_cast<SwTabFrm*>(pTabFrm)->SetFollowFlowLine( false ); + static_cast<SwTabFrame*>(pTabFrame)->SetFollowFlowLine( false ); } //Set acc table dispose state - pFrm->SetAccTableDispose( bAccTableDispose ); - pFrm->Cut(); + pFrame->SetAccTableDispose( bAccTableDispose ); + pFrame->Cut(); //Set acc table dispose state to default value. - pFrm->SetAccTableDispose( true ); - SwFrm::DestroyFrm(pFrm); + pFrame->SetAccTableDispose( true ); + SwFrame::DestroyFrame(pFrame); } } } } } -static bool lcl_IsLineOfTableFrm( const SwTabFrm& rTable, const SwFrm& rChk ) +static bool lcl_IsLineOfTableFrame( const SwTabFrame& rTable, const SwFrame& rChk ) { - const SwTabFrm* pTableFrm = rChk.FindTabFrm(); - if( pTableFrm->IsFollow() ) - pTableFrm = pTableFrm->FindMaster( true ); - return &rTable == pTableFrm; + const SwTabFrame* pTableFrame = rChk.FindTabFrame(); + if( pTableFrame->IsFollow() ) + pTableFrame = pTableFrame->FindMaster( true ); + return &rTable == pTableFrame; } -static void lcl_UpdateRepeatedHeadlines( SwTabFrm& rTabFrm, bool bCalcLowers ) +static void lcl_UpdateRepeatedHeadlines( SwTabFrame& rTabFrame, bool bCalcLowers ) { - OSL_ENSURE( rTabFrm.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" ); + OSL_ENSURE( rTabFrame.IsFollow(), "lcl_UpdateRepeatedHeadlines called for non-follow tab" ); // Delete remaining headlines: - SwRowFrm* pLower = nullptr; - while ( nullptr != ( pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()) ) && pLower->IsRepeatedHeadline() ) + SwRowFrame* pLower = nullptr; + while ( nullptr != ( pLower = static_cast<SwRowFrame*>(rTabFrame.Lower()) ) && pLower->IsRepeatedHeadline() ) { pLower->Cut(); - SwFrm::DestroyFrm(pLower); + SwFrame::DestroyFrame(pLower); } // Insert fresh set of headlines: - pLower = static_cast<SwRowFrm*>(rTabFrm.Lower()); - SwTable& rTable = *rTabFrm.GetTable(); + pLower = static_cast<SwRowFrame*>(rTabFrame.Lower()); + SwTable& rTable = *rTabFrame.GetTable(); const sal_uInt16 nRepeat = rTable.GetRowsToRepeat(); for ( sal_uInt16 nIdx = 0; nIdx < nRepeat; ++nIdx ) { - SwRowFrm* pHeadline = new SwRowFrm( *rTable.GetTabLines()[ nIdx ], &rTabFrm ); + SwRowFrame* pHeadline = new SwRowFrame( *rTable.GetTabLines()[ nIdx ], &rTabFrame ); pHeadline->SetRepeatedHeadline( true ); - pHeadline->Paste( &rTabFrm, pLower ); + pHeadline->Paste( &rTabFrame, pLower ); pHeadline->RegistFlys(); } if ( bCalcLowers ) - rTabFrm.SetCalcLowers(); + rTabFrame.SetCalcLowers(); } -void _FndBox::MakeFrms( SwTable &rTable ) +void _FndBox::MakeFrames( SwTable &rTable ) { // All lines between pLineBefore and pLineBehind should be re-generated in layout. // And this for all instances of a table (for example in header/footer). @@ -2327,24 +2327,24 @@ void _FndBox::MakeFrms( SwTable &rTable ) --nEndPos; } // now big insert operation for all tables. - SwIterator<SwTabFrm,SwFormat> aTabIter( *rTable.GetFrameFormat() ); - for ( SwTabFrm *pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) + SwIterator<SwTabFrame,SwFormat> aTabIter( *rTable.GetFrameFormat() ); + for ( SwTabFrame *pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) { if ( !pTable->IsFollow() ) { - SwRowFrm *pSibling = nullptr; - SwFrm *pUpperFrm = nullptr; + SwRowFrame *pSibling = nullptr; + SwFrame *pUpperFrame = nullptr; int i; for ( i = rTable.GetTabLines().size()-1; i >= 0 && !pSibling; --i ) { SwTableLine *pLine = pLineBehind ? pLineBehind : rTable.GetTabLines()[static_cast<sal_uInt16>(i)]; - SwIterator<SwRowFrm,SwFormat> aIter( *pLine->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLine->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( pSibling->GetTabLine() != pLine || - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || pSibling->IsRepeatedHeadline() || // #i53647# If !pLineBehind, // IsInSplitTableRow() should be checked. @@ -2356,19 +2356,19 @@ void _FndBox::MakeFrms( SwTable &rTable ) } if ( pSibling ) { - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); if ( !pLineBehind ) pSibling = nullptr; } else // ???? or is this the last Follow of the table ???? - pUpperFrm = pTable; + pUpperFrame = pTable; for ( sal_uInt16 j = nStPos; j <= nEndPos; ++j ) ::lcl_InsertRow( *rTable.GetTabLines()[j], - static_cast<SwLayoutFrm*>(pUpperFrm), pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + static_cast<SwLayoutFrame*>(pUpperFrame), pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } else if ( rTable.GetRowsToRepeat() > 0 ) { @@ -2378,10 +2378,10 @@ void _FndBox::MakeFrms( SwTable &rTable ) } } -void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, +void _FndBox::MakeNewFrames( SwTable &rTable, const sal_uInt16 nNumber, const bool bBehind ) { - // Create Frms for newly inserted lines + // Create Frames for newly inserted lines // bBehind == true: before pLineBehind // == false: after pLineBefore const sal_uInt16 nBfPos = pLineBefore ? @@ -2398,26 +2398,26 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, ((nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().size()) - (nBfPos != USHRT_MAX ? nBfPos + 1 : 0)) / (nNumber + 1); - // search the Master-TabFrm - SwIterator<SwTabFrm,SwFormat> aTabIter( *rTable.GetFrameFormat() ); - SwTabFrm *pTable; + // search the Master-TabFrame + SwIterator<SwTabFrame,SwFormat> aTabIter( *rTable.GetFrameFormat() ); + SwTabFrame *pTable; for ( pTable = aTabIter.First(); pTable; pTable = aTabIter.Next() ) { if( !pTable->IsFollow() ) { - SwRowFrm* pSibling = nullptr; - SwLayoutFrm *pUpperFrm = nullptr; + SwRowFrame* pSibling = nullptr; + SwLayoutFrame *pUpperFrame = nullptr; if ( bBehind ) { if ( pLineBehind ) { - SwIterator<SwRowFrm,SwFormat> aIter( *pLineBehind->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLineBehind->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( // only consider row frames associated with pLineBehind: pSibling->GetTabLine() != pLineBehind || // only consider row frames that are in pTables Master-Follow chain: - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || // only consider row frames that are not repeated headlines: pSibling->IsRepeatedHeadline() || // only consider row frames that are not follow flow rows @@ -2427,12 +2427,12 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, } } if ( pSibling ) - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); else { while( pTable->GetFollow() ) pTable = pTable->GetFollow(); - pUpperFrm = pTable; + pUpperFrame = pTable; } const sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos : rTable.GetTabLines().size(); @@ -2440,9 +2440,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, sal_uInt16 i = nBfPos != USHRT_MAX ? nBfPos + 1 + nCnt : nCnt; for ( ; i < nMax; ++i ) - ::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrm, pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + ::lcl_InsertRow( *rTable.GetTabLines()[i], pUpperFrame, pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } else // insert before { @@ -2454,14 +2454,14 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, { SwTableLine* pLine = pLineBefore ? pLineBefore : rTable.GetTabLines()[i]; - SwIterator<SwRowFrm,SwFormat> aIter( *pLine->GetFrameFormat() ); + SwIterator<SwRowFrame,SwFormat> aIter( *pLine->GetFrameFormat() ); pSibling = aIter.First(); while ( pSibling && ( // only consider row frames associated with pLineBefore: pSibling->GetTabLine() != pLine || // only consider row frames that are in pTables Master-Follow chain: - !lcl_IsLineOfTableFrm( *pTable, *pSibling ) || + !lcl_IsLineOfTableFrame( *pTable, *pSibling ) || // only consider row frames that are not repeated headlines: pSibling->IsRepeatedHeadline() || // 1. case: pLineBefore == 0: @@ -2477,9 +2477,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, } } - pUpperFrm = pSibling->GetUpper(); + pUpperFrame = pSibling->GetUpper(); if ( pLineBefore ) - pSibling = static_cast<SwRowFrm*>( pSibling->GetNext() ); + pSibling = static_cast<SwRowFrame*>( pSibling->GetNext() ); sal_uInt16 nMax = nBhPos != USHRT_MAX ? nBhPos - nCnt : @@ -2488,9 +2488,9 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, i = nBfPos != USHRT_MAX ? nBfPos + 1 : 0; for ( ; i < nMax; ++i ) ::lcl_InsertRow( *rTable.GetTabLines()[i], - pUpperFrm, pSibling ); - if ( pUpperFrm->IsTabFrm() ) - static_cast<SwTabFrm*>(pUpperFrm)->SetCalcLowers(); + pUpperFrame, pSibling ); + if ( pUpperFrame->IsTabFrame() ) + static_cast<SwTabFrame*>(pUpperFrame)->SetCalcLowers(); } } } @@ -2511,8 +2511,8 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, lcl_UpdateRepeatedHeadlines( *pTable, true ); } - OSL_ENSURE( static_cast<SwRowFrm*>(pTable->Lower())->GetTabLine() == - rTable.GetTabLines()[0], "MakeNewFrms: Table corruption!" ); + OSL_ENSURE( static_cast<SwRowFrame*>(pTable->Lower())->GetTabLine() == + rTable.GetTabLines()[0], "MakeNewFrames: Table corruption!" ); } } } @@ -2520,7 +2520,7 @@ void _FndBox::MakeNewFrms( SwTable &rTable, const sal_uInt16 nNumber, bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const { - // Should we call MakeFrms here? + // Should we call MakeFrames here? if ( !pLineBefore && !pLineBehind && rTable.GetTabLines().size() ) return true; @@ -2552,8 +2552,8 @@ bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const if ( rTable.GetRowsToRepeat() > 0 ) { // oops: should the repeated headline have been deleted?? - SwIterator<SwTabFrm,SwFormat> aIter( *rTable.GetFrameFormat() ); - for( SwTabFrm* pTable = aIter.First(); pTable; pTable = aIter.Next() ) + SwIterator<SwTabFrame,SwFormat> aIter( *rTable.GetFrameFormat() ); + for( SwTabFrame* pTable = aIter.First(); pTable; pTable = aIter.Next() ) { if( pTable->IsFollow() ) { @@ -2576,7 +2576,7 @@ bool _FndBox::AreLinesToRestore( const SwTable &rTable ) const return false; // The structure of the deleted lines is more complex due to split lines. - // A call of MakeFrms() is necessary. + // A call of MakeFrames() is necessary. return true; } |