summaryrefslogtreecommitdiff
path: root/sw/source/core/layout
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx152
-rw-r--r--sw/source/core/layout/anchoredobject.cxx232
-rw-r--r--sw/source/core/layout/atrfrm.cxx290
-rw-r--r--sw/source/core/layout/calcmove.cxx934
-rw-r--r--sw/source/core/layout/colfrm.cxx136
-rw-r--r--sw/source/core/layout/dbg_lay.cxx272
-rw-r--r--sw/source/core/layout/dumpfilter.cxx4
-rw-r--r--sw/source/core/layout/findfrm.cxx1024
-rw-r--r--sw/source/core/layout/flowfrm.cxx974
-rw-r--r--sw/source/core/layout/fly.cxx1010
-rw-r--r--sw/source/core/layout/flycnt.cxx632
-rw-r--r--sw/source/core/layout/flyincnt.cxx86
-rw-r--r--sw/source/core/layout/flylay.cxx602
-rw-r--r--sw/source/core/layout/flypos.cxx8
-rw-r--r--sw/source/core/layout/frmtool.cxx1566
-rw-r--r--sw/source/core/layout/ftnfrm.cxx1292
-rw-r--r--sw/source/core/layout/hffrm.cxx274
-rw-r--r--sw/source/core/layout/layact.cxx672
-rw-r--r--sw/source/core/layout/laycache.cxx220
-rw-r--r--sw/source/core/layout/layhelp.hxx34
-rw-r--r--sw/source/core/layout/layouter.cxx158
-rw-r--r--sw/source/core/layout/movedfwdfrmsbyobjpos.cxx44
-rw-r--r--sw/source/core/layout/newfrm.cxx220
-rw-r--r--sw/source/core/layout/objectformatter.cxx176
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.cxx86
-rw-r--r--sw/source/core/layout/objectformatterlayfrm.hxx20
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx352
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.hxx32
-rw-r--r--sw/source/core/layout/pagechg.cxx748
-rw-r--r--sw/source/core/layout/pagedesc.cxx72
-rw-r--r--sw/source/core/layout/paintfrm.cxx1148
-rw-r--r--sw/source/core/layout/sectfrm.cxx1154
-rw-r--r--sw/source/core/layout/softpagebreak.cxx48
-rw-r--r--sw/source/core/layout/ssfrm.cxx356
-rw-r--r--sw/source/core/layout/swselectionlist.cxx36
-rw-r--r--sw/source/core/layout/tabfrm.cxx1922
-rw-r--r--sw/source/core/layout/trvlfrm.cxx1168
-rw-r--r--sw/source/core/layout/unusedf.cxx30
-rw-r--r--sw/source/core/layout/virtoutp.cxx16
-rw-r--r--sw/source/core/layout/virtoutp.hxx2
-rw-r--r--sw/source/core/layout/wsfrm.cxx1556
41 files changed, 9879 insertions, 9879 deletions
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 2d09ae61a509..da6c2fff6ee4 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -41,7 +41,7 @@ class SwPosNotify
private:
SwAnchoredDrawObject* mpAnchoredDrawObj;
SwRect maOldObjRect;
- SwPageFrm* mpOldPageFrm;
+ SwPageFrame* mpOldPageFrame;
public:
explicit SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj );
@@ -55,25 +55,25 @@ SwPosNotify::SwPosNotify( SwAnchoredDrawObject* _pAnchoredDrawObj ) :
{
maOldObjRect = mpAnchoredDrawObj->GetObjRect();
// --> #i35640# - determine correct page frame
- mpOldPageFrm = mpAnchoredDrawObj->GetPageFrm();
+ mpOldPageFrame = mpAnchoredDrawObj->GetPageFrame();
}
SwPosNotify::~SwPosNotify()
{
if ( maOldObjRect != mpAnchoredDrawObj->GetObjRect() )
{
- if( maOldObjRect.HasArea() && mpOldPageFrm )
+ if( maOldObjRect.HasArea() && mpOldPageFrame )
{
- mpAnchoredDrawObj->NotifyBackground( mpOldPageFrm, maOldObjRect,
+ mpAnchoredDrawObj->NotifyBackground( mpOldPageFrame, maOldObjRect,
PREP_FLY_LEAVE );
}
SwRect aNewObjRect( mpAnchoredDrawObj->GetObjRect() );
if( aNewObjRect.HasArea() )
{
// --> #i35640# - determine correct page frame
- SwPageFrm* pNewPageFrm = mpAnchoredDrawObj->GetPageFrm();
- if( pNewPageFrm )
- mpAnchoredDrawObj->NotifyBackground( pNewPageFrm, aNewObjRect,
+ SwPageFrame* pNewPageFrame = mpAnchoredDrawObj->GetPageFrame();
+ if( pNewPageFrame )
+ mpAnchoredDrawObj->NotifyBackground( pNewPageFrame, aNewObjRect,
PREP_FLY_ARRIVE );
}
@@ -84,10 +84,10 @@ SwPosNotify::~SwPosNotify()
// --> #i43255# - refine condition to avoid unneeded
// invalidations: anchored object had to be on the page of its anchor
// text frame.
- if ( mpAnchoredDrawObj->GetAnchorFrm()->IsTextFrm() &&
- mpOldPageFrm == mpAnchoredDrawObj->GetAnchorFrm()->FindPageFrm() )
+ if ( mpAnchoredDrawObj->GetAnchorFrame()->IsTextFrame() &&
+ mpOldPageFrame == mpAnchoredDrawObj->GetAnchorFrame()->FindPageFrame() )
{
- mpAnchoredDrawObj->AnchorFrm()->Prepare( PREP_FLY_LEAVE );
+ mpAnchoredDrawObj->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
}
// indicate a restart of the layout process
@@ -104,13 +104,13 @@ SwPosNotify::~SwPosNotify()
mpAnchoredDrawObj->SetConsiderForTextWrap( true );
// invalidate 'background' in order to allow its 'background'
// to wrap around it.
- mpAnchoredDrawObj->NotifyBackground( mpAnchoredDrawObj->GetPageFrm(),
+ mpAnchoredDrawObj->NotifyBackground( mpAnchoredDrawObj->GetPageFrame(),
mpAnchoredDrawObj->GetObjRectWithSpaces(),
PREP_FLY_ARRIVE );
// invalidate position of anchor frame in order to force
// a re-format of the anchor frame, which also causes a
// re-format of the invalid previous frames of the anchor frame.
- mpAnchoredDrawObj->AnchorFrm()->InvalidatePos();
+ mpAnchoredDrawObj->AnchorFrame()->InvalidatePos();
}
}
}
@@ -231,11 +231,11 @@ bool SwAnchoredDrawObject::IsOutsidePage() const
{
bool bOutsidePage( false );
- if ( !NotYetPositioned() && GetPageFrm() )
+ if ( !NotYetPositioned() && GetPageFrame() )
{
SwRect aTmpRect( GetObjRect() );
bOutsidePage =
- ( aTmpRect.Intersection( GetPageFrm()->Frm() ) != GetObjRect() );
+ ( aTmpRect.Intersection( GetPageFrame()->Frame() ) != GetObjRect() );
}
return bOutsidePage;
@@ -339,7 +339,7 @@ void SwAnchoredDrawObject::MakeObjPos()
// the anchor frame is valid.
if ( dynamic_cast< const SwDrawVirtObj* >(GetDrawObj()) == nullptr &&
!pDrawContact->ObjAnchoredAsChar() &&
- GetAnchorFrm()->IsValid() )
+ GetAnchorFrame()->IsValid() )
{
pDrawContact->ChkPage();
}
@@ -347,9 +347,9 @@ void SwAnchoredDrawObject::MakeObjPos()
// --> #i62875#
if ( mbCaptureAfterLayoutDirChange &&
- GetPageFrm() )
+ GetPageFrame() )
{
- SwRect aPageRect( GetPageFrm()->Frm() );
+ SwRect aPageRect( GetPageFrame()->Frame() );
SwRect aObjRect( GetObjRect() );
if ( aObjRect.Right() >= aPageRect.Right() + 10 )
{
@@ -388,14 +388,14 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
// position. E.g., for at-character anchored object this can be the follow
// frame of the anchor frame, which contains the anchor character.
const bool bFormatAnchor =
- !static_cast<const SwTextFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() &&
+ !static_cast<const SwTextFrame*>( GetAnchorFrameContainingAnchPos() )->IsAnyJoinLocked() &&
!ConsiderObjWrapInfluenceOnObjPos() &&
!ConsiderObjWrapInfluenceOfOtherObjs();
if ( bFormatAnchor )
{
// --> #i50356#
- GetAnchorFrmContainingAnchPos()->Calc(GetAnchorFrmContainingAnchPos()->getRootFrm()->GetCurrShell()->GetOut());
+ GetAnchorFrameContainingAnchPos()->Calc(GetAnchorFrameContainingAnchPos()->getRootFrame()->GetCurrShell()->GetOut());
}
bool bOscillationDetected = false;
@@ -419,7 +419,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
aObjPositioning.CalcPosition();
// get further needed results of the positioning algorithm
- SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() );
+ SetVertPosOrientFrame ( aObjPositioning.GetVertPosOrientFrame() );
_SetDrawObjAnchor();
// check for object position oscillation, if position has changed.
@@ -434,7 +434,7 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtPara()
if ( bFormatAnchor )
{
// --> #i50356#
- GetAnchorFrmContainingAnchPos()->Calc(GetAnchorFrmContainingAnchPos()->getRootFrm()->GetCurrShell()->GetOut());
+ GetAnchorFrameContainingAnchPos()->Calc(GetAnchorFrameContainingAnchPos()->getRootFrame()->GetCurrShell()->GetOut());
}
// --> #i3317#
@@ -481,15 +481,15 @@ void SwAnchoredDrawObject::_MakeObjPosAnchoredAtLayout()
// especially for the xml-filter to the OpenOffice.org file format
{
const Point aNewAnchorPos =
- GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
+ GetAnchorFrame()->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) );
DrawObj()->SetAnchorPos( aNewAnchorPos );
// --> #i70122# - missing invalidation
InvalidateObjRectWithSpaces();
}
SetCurrRelPos( aObjPositioning.GetRelPos() );
- const SwFrm* pAnchorFrm = GetAnchorFrm();
- SWRECTFN( pAnchorFrm );
- const Point aAnchPos( (pAnchorFrm->Frm().*fnRect->fnGetPos)() );
+ const SwFrame* pAnchorFrame = GetAnchorFrame();
+ SWRECTFN( pAnchorFrame );
+ const Point aAnchPos( (pAnchorFrame->Frame().*fnRect->fnGetPos)() );
SetObjLeft( aAnchPos.X() + GetCurrRelPos().X() );
SetObjTop( aAnchPos.Y() + GetCurrRelPos().Y() );
}
@@ -499,7 +499,7 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor()
// new anchor position
// --> #i31698# -
Point aNewAnchorPos =
- GetAnchorFrm()->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
+ GetAnchorFrame()->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) );
Point aCurrAnchorPos = GetDrawObj()->GetAnchorPos();
if ( aNewAnchorPos != aCurrAnchorPos )
{
@@ -519,32 +519,32 @@ void SwAnchoredDrawObject::_SetDrawObjAnchor()
#i28701#
*/
-void SwAnchoredDrawObject::_InvalidatePage( SwPageFrm* _pPageFrm )
+void SwAnchoredDrawObject::_InvalidatePage( SwPageFrame* _pPageFrame )
{
- if ( _pPageFrm && !_pPageFrm->GetFormat()->GetDoc()->IsInDtor() )
+ if ( _pPageFrame && !_pPageFrame->GetFormat()->GetDoc()->IsInDtor() )
{
- if ( _pPageFrm->GetUpper() )
+ if ( _pPageFrame->GetUpper() )
{
// --> #i35007# - correct invalidation for as-character
// anchored objects.
if ( GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR )
{
- _pPageFrm->InvalidateFlyInCnt();
+ _pPageFrame->InvalidateFlyInCnt();
}
else
{
- _pPageFrm->InvalidateFlyLayout();
+ _pPageFrame->InvalidateFlyLayout();
}
- SwRootFrm* pRootFrm = static_cast<SwRootFrm*>(_pPageFrm->GetUpper());
- pRootFrm->DisallowTurbo();
- if ( pRootFrm->GetTurbo() )
+ SwRootFrame* pRootFrame = static_cast<SwRootFrame*>(_pPageFrame->GetUpper());
+ pRootFrame->DisallowTurbo();
+ if ( pRootFrame->GetTurbo() )
{
- const SwContentFrm* pTmpFrm = pRootFrm->GetTurbo();
- pRootFrm->ResetTurbo();
- pTmpFrm->InvalidatePage();
+ const SwContentFrame* pTmpFrame = pRootFrame->GetTurbo();
+ pRootFrame->ResetTurbo();
+ pTmpFrame->InvalidatePage();
}
- pRootFrm->SetIdleFlags();
+ pRootFrame->SetIdleFlags();
}
}
}
@@ -560,43 +560,43 @@ void SwAnchoredDrawObject::InvalidateObjPos()
InvalidateObjRectWithSpaces();
// --> #i44339# - check, if anchor frame exists.
- if ( GetAnchorFrm() )
+ if ( GetAnchorFrame() )
{
// --> #118547# - notify anchor frame of as-character
// anchored object, because its positioned by the format of its anchor frame.
// --> #i44559# - assure, that text hint is already
// existing in the text frame
- if ( dynamic_cast< const SwTextFrm* >(GetAnchorFrm()) != nullptr &&
+ if ( dynamic_cast< const SwTextFrame* >(GetAnchorFrame()) != nullptr &&
(GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AS_CHAR) )
{
- SwTextFrm* pAnchorTextFrm( static_cast<SwTextFrm*>(AnchorFrm()) );
- if ( pAnchorTextFrm->GetTextNode()->GetpSwpHints() &&
- pAnchorTextFrm->CalcFlyPos( &GetFrameFormat() ) != COMPLETE_STRING )
+ SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );
+ if ( pAnchorTextFrame->GetTextNode()->GetpSwpHints() &&
+ pAnchorTextFrame->CalcFlyPos( &GetFrameFormat() ) != COMPLETE_STRING )
{
- AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
+ AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
}
}
- SwPageFrm* pPageFrm = AnchorFrm()->FindPageFrm();
- _InvalidatePage( pPageFrm );
+ SwPageFrame* pPageFrame = AnchorFrame()->FindPageFrame();
+ _InvalidatePage( pPageFrame );
// --> #i32270# - also invalidate page frame, at which the
// drawing object is registered at.
- SwPageFrm* pPageFrmRegisteredAt = GetPageFrm();
- if ( pPageFrmRegisteredAt &&
- pPageFrmRegisteredAt != pPageFrm )
+ SwPageFrame* pPageFrameRegisteredAt = GetPageFrame();
+ if ( pPageFrameRegisteredAt &&
+ pPageFrameRegisteredAt != pPageFrame )
{
- _InvalidatePage( pPageFrmRegisteredAt );
+ _InvalidatePage( pPageFrameRegisteredAt );
}
- // #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
- // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // #i33751#, #i34060# - method <GetPageFrameOfAnchor()>
+ // is replaced by method <FindPageFrameOfAnchor()>. It's return value
// have to be checked.
- SwPageFrm* pPageFrmOfAnchor = FindPageFrmOfAnchor();
- if ( pPageFrmOfAnchor &&
- pPageFrmOfAnchor != pPageFrm &&
- pPageFrmOfAnchor != pPageFrmRegisteredAt )
+ SwPageFrame* pPageFrameOfAnchor = FindPageFrameOfAnchor();
+ if ( pPageFrameOfAnchor &&
+ pPageFrameOfAnchor != pPageFrame &&
+ pPageFrameOfAnchor != pPageFrameRegisteredAt )
{
- _InvalidatePage( pPageFrmOfAnchor );
+ _InvalidatePage( pPageFrameOfAnchor );
}
}
}
@@ -627,7 +627,7 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
{
bool bGroupShape = dynamic_cast<const SdrObjGroup*>( GetDrawObj() );
// Resize objects with relative width or height
- if ( !bGroupShape && GetPageFrm( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) )
+ if ( !bGroupShape && GetPageFrame( ) && ( GetDrawObj( )->GetRelativeWidth( ) || GetDrawObj()->GetRelativeHeight( ) ) )
{
Rectangle aCurrObjRect = GetDrawObj()->GetCurrentBoundRect();
@@ -637,9 +637,9 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
Rectangle aPageRect;
if (GetDrawObj()->GetRelativeWidthRelation() == text::RelOrientation::FRAME)
// Exclude margins.
- aPageRect = GetPageFrm()->Prt().SVRect();
+ aPageRect = GetPageFrame()->Prt().SVRect();
else
- aPageRect = GetPageFrm( )->GetBoundRect( GetPageFrm()->getRootFrm()->GetCurrShell()->GetOut() ).SVRect();
+ aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect();
nTargetWidth = aPageRect.GetWidth( ) * (*GetDrawObj( )->GetRelativeWidth());
}
@@ -649,15 +649,15 @@ const SwRect SwAnchoredDrawObject::GetObjBoundRect() const
Rectangle aPageRect;
if (GetDrawObj()->GetRelativeHeightRelation() == text::RelOrientation::FRAME)
// Exclude margins.
- aPageRect = GetPageFrm()->Prt().SVRect();
+ aPageRect = GetPageFrame()->Prt().SVRect();
else
- aPageRect = GetPageFrm( )->GetBoundRect( GetPageFrm()->getRootFrm()->GetCurrShell()->GetOut() ).SVRect();
+ aPageRect = GetPageFrame( )->GetBoundRect( GetPageFrame()->getRootFrame()->GetCurrShell()->GetOut() ).SVRect();
nTargetHeight = aPageRect.GetHeight( ) * (*GetDrawObj( )->GetRelativeHeight());
}
if ( nTargetWidth != aCurrObjRect.GetWidth( ) || nTargetHeight != aCurrObjRect.GetHeight( ) )
{
- SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrm()->GetFormat()->GetDoc());
+ SwDoc* pDoc = const_cast<SwDoc*>(GetPageFrame()->GetFormat()->GetDoc());
bool bModified = pDoc->getIDocumentState().IsModified();
const_cast< SdrObject* >( GetDrawObj() )->Resize( aCurrObjRect.TopLeft(),
Fraction( nTargetWidth, aCurrObjRect.GetWidth() ),
@@ -689,16 +689,16 @@ bool SwAnchoredDrawObject::_SetObjLeft( const SwTwips _nLeft )
#i33313# - add second optional parameter <_pNewObjRect>
*/
-void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrm* _pNewAnchorFrm,
+void SwAnchoredDrawObject::AdjustPositioningAttr( const SwFrame* _pNewAnchorFrame,
const SwRect* _pNewObjRect )
{
SwTwips nHoriRelPos = 0;
SwTwips nVertRelPos = 0;
- const Point aAnchorPos = _pNewAnchorFrm->GetFrmAnchorPos( ::HasWrap( GetDrawObj() ) );
+ const Point aAnchorPos = _pNewAnchorFrame->GetFrameAnchorPos( ::HasWrap( GetDrawObj() ) );
// --> #i33313#
const SwRect aObjRect( _pNewObjRect ? *_pNewObjRect : GetObjRect() );
- const bool bVert = _pNewAnchorFrm->IsVertical();
- const bool bR2L = _pNewAnchorFrm->IsRightToLeft();
+ const bool bVert = _pNewAnchorFrame->IsVertical();
+ const bool bR2L = _pNewAnchorFrame->IsRightToLeft();
if ( bVert )
{
nHoriRelPos = aObjRect.Top() - aAnchorPos.Y();
@@ -819,11 +819,11 @@ void SwAnchoredDrawObject::_SetPositioningAttr()
static_cast<SwDrawFrameFormat&>(GetFrameFormat()).PosAttrSet();
}
-void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
+void SwAnchoredDrawObject::NotifyBackground( SwPageFrame* _pPageFrame,
const SwRect& _rRect,
PrepareHint _eHint )
{
- ::Notify_Background( GetDrawObj(), _pPageFrm, _rRect, _eHint, true );
+ ::Notify_Background( GetDrawObj(), _pPageFrame, _rRect, _eHint, true );
}
/** method to assure that anchored object is registered at the correct
@@ -833,16 +833,16 @@ void SwAnchoredDrawObject::NotifyBackground( SwPageFrm* _pPageFrm,
*/
void SwAnchoredDrawObject::RegisterAtCorrectPage()
{
- SwPageFrm* pPageFrm( nullptr );
- if ( GetVertPosOrientFrm() )
+ SwPageFrame* pPageFrame( nullptr );
+ if ( GetVertPosOrientFrame() )
{
- pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm());
+ pPageFrame = const_cast<SwPageFrame*>(GetVertPosOrientFrame()->FindPageFrame());
}
- if ( pPageFrm && GetPageFrm() != pPageFrm )
+ if ( pPageFrame && GetPageFrame() != pPageFrame )
{
- if ( GetPageFrm() )
- GetPageFrm()->RemoveDrawObjFromPage( *this );
- pPageFrm->AppendDrawObjToPage( *this );
+ if ( GetPageFrame() )
+ GetPageFrame()->RemoveDrawObjFromPage( *this );
+ pPageFrame->AppendDrawObjToPage( *this );
}
}
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index d054a05d50c2..ff0df5e38a84 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -67,13 +67,13 @@ SwObjPositioningInProgress::~SwObjPositioningInProgress()
SwAnchoredObject::SwAnchoredObject() :
mpDrawObj( nullptr ),
- mpAnchorFrm( nullptr ),
+ mpAnchorFrame( nullptr ),
// --> #i28701#
- mpPageFrm( nullptr ),
+ mpPageFrame( nullptr ),
maRelPos(),
maLastCharRect(),
mnLastTopOfLine( 0L ),
- mpVertPosOrientFrm( nullptr ),
+ mpVertPosOrientFrame( nullptr ),
// --> #i28701#
mbPositioningInProgress( false ),
mbConsiderForTextWrap( false ),
@@ -92,18 +92,18 @@ SwAnchoredObject::SwAnchoredObject() :
{
}
-void SwAnchoredObject::ClearVertPosOrientFrm()
+void SwAnchoredObject::ClearVertPosOrientFrame()
{
- if (mpVertPosOrientFrm)
+ if (mpVertPosOrientFrame)
{
- const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->ClearVertPosOrientFrmFor(this);
- mpVertPosOrientFrm = nullptr;
+ const_cast<SwLayoutFrame*>(mpVertPosOrientFrame)->ClearVertPosOrientFrameFor(this);
+ mpVertPosOrientFrame = nullptr;
}
}
SwAnchoredObject::~SwAnchoredObject()
{
- ClearVertPosOrientFrm();
+ ClearVertPosOrientFrame();
}
void SwAnchoredObject::SetDrawObj( SdrObject& _rDrawObj )
@@ -115,11 +115,11 @@ void SwAnchoredObject::SetDrawObj( SdrObject& _rDrawObj )
-void SwAnchoredObject::ChgAnchorFrm( SwFrm* _pNewAnchorFrm )
+void SwAnchoredObject::ChgAnchorFrame( SwFrame* _pNewAnchorFrame )
{
- mpAnchorFrm = _pNewAnchorFrm;
+ mpAnchorFrame = _pNewAnchorFrame;
- if ( mpAnchorFrm )
+ if ( mpAnchorFrame )
{
ObjectAttachedToAnchorFrame();
}
@@ -128,51 +128,51 @@ void SwAnchoredObject::ChgAnchorFrm( SwFrm* _pNewAnchorFrm )
/** determine anchor frame containing the anchor position
#i26945#
- the anchor frame, which is determined, is <mpAnchorFrm>
+ the anchor frame, which is determined, is <mpAnchorFrame>
for an at-page, at-frame or at-paragraph anchored object
and the anchor character frame for an at-character and as-character
anchored object.
*/
-SwFrm* SwAnchoredObject::GetAnchorFrmContainingAnchPos()
+SwFrame* SwAnchoredObject::GetAnchorFrameContainingAnchPos()
{
- SwFrm* pAnchorFrmContainingAnchPos = FindAnchorCharFrm();
- if ( !pAnchorFrmContainingAnchPos )
+ SwFrame* pAnchorFrameContainingAnchPos = FindAnchorCharFrame();
+ if ( !pAnchorFrameContainingAnchPos )
{
- pAnchorFrmContainingAnchPos = AnchorFrm();
+ pAnchorFrameContainingAnchPos = AnchorFrame();
}
- return pAnchorFrmContainingAnchPos;
+ return pAnchorFrameContainingAnchPos;
}
-void SwAnchoredObject::SetPageFrm( SwPageFrm* _pNewPageFrm )
+void SwAnchoredObject::SetPageFrame( SwPageFrame* _pNewPageFrame )
{
- if ( mpPageFrm != _pNewPageFrm )
+ if ( mpPageFrame != _pNewPageFrame )
{
// clear member, which denotes the layout frame at which the vertical
// position is oriented at, if it doesn't fit to the new page frame.
- if ( GetVertPosOrientFrm() &&
- ( !_pNewPageFrm ||
- _pNewPageFrm != GetVertPosOrientFrm()->FindPageFrm() ) )
+ if ( GetVertPosOrientFrame() &&
+ ( !_pNewPageFrame ||
+ _pNewPageFrame != GetVertPosOrientFrame()->FindPageFrame() ) )
{
- ClearVertPosOrientFrm();
+ ClearVertPosOrientFrame();
}
// assign new page frame
- mpPageFrm = _pNewPageFrm;
+ mpPageFrame = _pNewPageFrame;
}
}
-SwTwips SwAnchoredObject::GetRelCharX( const SwFrm* pFrm ) const
+SwTwips SwAnchoredObject::GetRelCharX( const SwFrame* pFrame ) const
{
- return maLastCharRect.Left() - pFrm->Frm().Left();
+ return maLastCharRect.Left() - pFrame->Frame().Left();
}
-SwTwips SwAnchoredObject::GetRelCharY( const SwFrm* pFrm ) const
+SwTwips SwAnchoredObject::GetRelCharY( const SwFrame* pFrame ) const
{
- return maLastCharRect.Bottom() - pFrm->Frm().Top();
+ return maLastCharRect.Bottom() - pFrame->Frame().Top();
}
void SwAnchoredObject::AddLastCharY( long nDiff )
@@ -185,15 +185,15 @@ void SwAnchoredObject::ResetLastCharRectHeight()
maLastCharRect.Height( 0 );
}
-void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm )
+void SwAnchoredObject::SetVertPosOrientFrame( const SwLayoutFrame& _rVertPosOrientFrame )
{
- ClearVertPosOrientFrm();
+ ClearVertPosOrientFrame();
- mpVertPosOrientFrm = &_rVertPosOrientFrm;
- const_cast<SwLayoutFrm*>(mpVertPosOrientFrm)->SetVertPosOrientFrmFor(this);
+ mpVertPosOrientFrame = &_rVertPosOrientFrame;
+ const_cast<SwLayoutFrame*>(mpVertPosOrientFrame)->SetVertPosOrientFrameFor(this);
// #i28701# - take over functionality of deleted method
- // <SwFlyAtCntFrm::AssertPage()>: assure for at-paragraph and at-character
+ // <SwFlyAtContentFrame::AssertPage()>: assure for at-paragraph and at-character
// an anchored object, that it is registered at the correct page frame
RegisterAtCorrectPage();
}
@@ -218,8 +218,8 @@ void SwAnchoredObject::AddLastTopOfLineY( SwTwips _nDiff )
void SwAnchoredObject::CheckCharRectAndTopOfLine(
const bool _bCheckForParaPorInf )
{
- if ( GetAnchorFrm() &&
- GetAnchorFrm()->IsTextFrm() )
+ if ( GetAnchorFrame() &&
+ GetAnchorFrame()->IsTextFrame() )
{
const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor();
if ( (rAnch.GetAnchorId() == FLY_AT_CHAR) &&
@@ -231,12 +231,12 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
// anchor character rectangle respectively the top of the line.
// Thus, a format of this frame is avoided to determine the
// paragraph portion information.
- // --> #i26945# - use new method <FindAnchorCharFrm()>
- const SwTextFrm& aAnchorCharFrm = *(FindAnchorCharFrm());
- if ( !_bCheckForParaPorInf || aAnchorCharFrm.HasPara() )
+ // --> #i26945# - use new method <FindAnchorCharFrame()>
+ const SwTextFrame& aAnchorCharFrame = *(FindAnchorCharFrame());
+ if ( !_bCheckForParaPorInf || aAnchorCharFrame.HasPara() )
{
- _CheckCharRect( rAnch, aAnchorCharFrm );
- _CheckTopOfLine( rAnch, aAnchorCharFrm );
+ _CheckCharRect( rAnch, aAnchorCharFrame );
+ _CheckTopOfLine( rAnch, aAnchorCharFrame );
}
}
}
@@ -250,14 +250,14 @@ void SwAnchoredObject::CheckCharRectAndTopOfLine(
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- improvement - add second parameter <_rAnchorCharFrm>
+ improvement - add second parameter <_rAnchorCharFrame>
*/
void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch,
- const SwTextFrm& _rAnchorCharFrm )
+ const SwTextFrame& _rAnchorCharFrame )
{
// determine rectangle of anchor character. If not exist, abort operation
SwRect aCharRect;
- if ( !_rAnchorCharFrm.GetAutoPos( aCharRect, *_rAnch.GetContentAnchor() ) )
+ if ( !_rAnchorCharFrame.GetAutoPos( aCharRect, *_rAnch.GetContentAnchor() ) )
{
return;
}
@@ -266,7 +266,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch,
{
// check positioning and alignment for invalidation of position
{
- SWRECTFN( (&_rAnchorCharFrm) );
+ SWRECTFN( (&_rAnchorCharFrame) );
// determine positioning and alignment
SwFormatVertOrient aVert( GetFrameFormat().GetVertOrient() );
SwFormatHoriOrient aHori( GetFrameFormat().GetHoriOrient() );
@@ -294,7 +294,7 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch,
// #i26945#, #i35911# - unlock position of
// anchored object, if it isn't registered at the page,
// where its anchor character frame is on.
- if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() )
+ if ( GetPageFrame() != _rAnchorCharFrame.FindPageFrame() )
{
UnlockPosition();
}
@@ -314,13 +314,13 @@ void SwAnchoredObject::_CheckCharRect( const SwFormatAnchor& _rAnch,
is updated. This is checked for change and depending on the applied
positioning, it's decided, if the Writer fly frame has to be invalidated.
- improvement - add second parameter <_rAnchorCharFrm>
+ improvement - add second parameter <_rAnchorCharFrame>
*/
void SwAnchoredObject::_CheckTopOfLine( const SwFormatAnchor& _rAnch,
- const SwTextFrm& _rAnchorCharFrm )
+ const SwTextFrame& _rAnchorCharFrame )
{
SwTwips nTopOfLine = 0L;
- if ( _rAnchorCharFrm.GetTopOfLine( nTopOfLine, *_rAnch.GetContentAnchor() ) )
+ if ( _rAnchorCharFrame.GetTopOfLine( nTopOfLine, *_rAnch.GetContentAnchor() ) )
{
if ( nTopOfLine != mnLastTopOfLine )
{
@@ -330,7 +330,7 @@ void SwAnchoredObject::_CheckTopOfLine( const SwFormatAnchor& _rAnch,
// #i26945#, #i35911# - unlock position of
// anchored object, if it isn't registered at the page,
// where its anchor character frame is on.
- if ( GetPageFrm() != _rAnchorCharFrm.FindPageFrm() )
+ if ( GetPageFrame() != _rAnchorCharFrame.FindPageFrame() )
{
UnlockPosition();
}
@@ -370,11 +370,11 @@ void SwAnchoredObject::ObjectAttachedToAnchorFrame()
void SwAnchoredObject::UpdateLayoutDir()
{
SwFrameFormat::tLayoutDir nLayoutDir = SwFrameFormat::HORI_L2R;
- const SwFrm* pAnchorFrm = GetAnchorFrm();
- if ( pAnchorFrm )
+ const SwFrame* pAnchorFrame = GetAnchorFrame();
+ if ( pAnchorFrame )
{
- const bool bVert = pAnchorFrm->IsVertical();
- const bool bR2L = pAnchorFrm->IsRightToLeft();
+ const bool bVert = pAnchorFrame->IsVertical();
+ const bool bR2L = pAnchorFrame->IsRightToLeft();
if ( bVert )
{
nLayoutDir = SwFrameFormat::VERT_R2L;
@@ -407,7 +407,7 @@ void SwAnchoredObject::InvalidateObjPosForConsiderWrapInfluence(
// invalidate 'background', if requested
if ( _bNotifyBackgrd )
{
- NotifyBackground( GetPageFrm(), GetObjRectWithSpaces(), PREP_FLY_LEAVE );
+ NotifyBackground( GetPageFrame(), GetObjRectWithSpaces(), PREP_FLY_LEAVE );
}
}
}
@@ -460,7 +460,7 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOfOtherObjs() const
{
bool bRet( false );
- const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs();
+ const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs();
if ( pObjs->size() > 1 )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -535,29 +535,29 @@ bool SwAnchoredObject::HasClearedEnvironment() const
bool bHasClearedEnvironment( false );
// --> #i43913# - layout frame, vertical position is orient at, has to be set.
- OSL_ENSURE( GetVertPosOrientFrm(),
+ OSL_ENSURE( GetVertPosOrientFrame(),
"<SwAnchoredObject::HasClearedEnvironment()> - layout frame missing, at which the vertical position is oriented at." );
- if ( GetVertPosOrientFrm() &&
- GetAnchorFrm()->IsTextFrm() &&
- !static_cast<const SwTextFrm*>(GetAnchorFrm())->IsFollow() &&
- static_cast<const SwTextFrm*>(GetAnchorFrm())->FindPageFrm()->GetPhyPageNum() >=
- GetPageFrm()->GetPhyPageNum() )
+ if ( GetVertPosOrientFrame() &&
+ GetAnchorFrame()->IsTextFrame() &&
+ !static_cast<const SwTextFrame*>(GetAnchorFrame())->IsFollow() &&
+ static_cast<const SwTextFrame*>(GetAnchorFrame())->FindPageFrame()->GetPhyPageNum() >=
+ GetPageFrame()->GetPhyPageNum() )
{
- const SwFrm* pTmpFrm = GetVertPosOrientFrm()->Lower();
- while ( pTmpFrm && pTmpFrm->IsLayoutFrm() && !pTmpFrm->IsTabFrm() )
+ const SwFrame* pTmpFrame = GetVertPosOrientFrame()->Lower();
+ while ( pTmpFrame && pTmpFrame->IsLayoutFrame() && !pTmpFrame->IsTabFrame() )
{
- pTmpFrm = static_cast<const SwLayoutFrm*>(pTmpFrm)->Lower();
+ pTmpFrame = static_cast<const SwLayoutFrame*>(pTmpFrame)->Lower();
}
- if ( !pTmpFrm )
+ if ( !pTmpFrame )
{
bHasClearedEnvironment = true;
}
- else if ( pTmpFrm->IsTextFrm() && !pTmpFrm->GetNext() )
+ else if ( pTmpFrame->IsTextFrame() && !pTmpFrame->GetNext() )
{
- const SwTextFrm* pTmpTextFrm = static_cast<const SwTextFrm*>(pTmpFrm);
- if ( pTmpTextFrm->IsUndersized() ||
- ( pTmpTextFrm->GetFollow() &&
- pTmpTextFrm->GetFollow()->GetOfst() == 0 ) )
+ const SwTextFrame* pTmpTextFrame = static_cast<const SwTextFrame*>(pTmpFrame);
+ if ( pTmpTextFrame->IsUndersized() ||
+ ( pTmpTextFrame->GetFollow() &&
+ pTmpTextFrame->GetFollow()->GetOfst() == 0 ) )
{
bHasClearedEnvironment = true;
}
@@ -629,14 +629,14 @@ void SwAnchoredObject::SetObjLeft( const SwTwips _nLeft)
*/
void SwAnchoredObject::UpdateObjInSortedList()
{
- if ( GetAnchorFrm() )
+ if ( GetAnchorFrame() )
{
if ( GetFrameFormat().getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) )
{
// invalidate position of all anchored objects at anchor frame
- if ( GetAnchorFrm()->GetDrawObjs() )
+ if ( GetAnchorFrame()->GetDrawObjs() )
{
- const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs();
+ const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs();
// determine start index
for ( size_t i = 0; i < pObjs->size(); ++i )
{
@@ -648,9 +648,9 @@ void SwAnchoredObject::UpdateObjInSortedList()
}
}
// invalidate all following anchored objects on the page frame
- if ( GetPageFrm() && GetPageFrm()->GetSortedObjs() )
+ if ( GetPageFrame() && GetPageFrame()->GetSortedObjs() )
{
- const SwSortedObjs* pObjs = GetPageFrm()->GetSortedObjs();
+ const SwSortedObjs* pObjs = GetPageFrame()->GetSortedObjs();
// determine start index
for ( size_t i = pObjs->ListPosOf( *this ) + 1; i < pObjs->size(); ++i )
{
@@ -663,12 +663,12 @@ void SwAnchoredObject::UpdateObjInSortedList()
}
}
// update its position in the sorted object list of its anchor frame
- AnchorFrm()->GetDrawObjs()->Update( *this );
+ AnchorFrame()->GetDrawObjs()->Update( *this );
// update its position in the sorted object list of its page frame
// note: as-character anchored object aren't registered at a page frame
if ( GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR )
{
- GetPageFrm()->GetSortedObjs()->Update( *this );
+ GetPageFrame()->GetSortedObjs()->Update( *this );
}
}
}
@@ -694,18 +694,18 @@ bool SwAnchoredObject::InvalidationOfPosAllowed() const
can be found. Thus, the return type changed to be a pointer and can
be NULL.
*/
-SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
+SwPageFrame* SwAnchoredObject::FindPageFrameOfAnchor()
{
- SwPageFrm* pRetPageFrm = nullptr;
+ SwPageFrame* pRetPageFrame = nullptr;
// --> #i44339# - check, if anchor frame exists.
- if ( mpAnchorFrm )
+ if ( mpAnchorFrame )
{
- // --> #i26945# - use new method <GetAnchorFrmContainingAnchPos()>
- pRetPageFrm = GetAnchorFrmContainingAnchPos()->FindPageFrm();
+ // --> #i26945# - use new method <GetAnchorFrameContainingAnchPos()>
+ pRetPageFrame = GetAnchorFrameContainingAnchPos()->FindPageFrame();
}
- return pRetPageFrm;
+ return pRetPageFrame;
}
/** get frame, which contains the anchor character, if the object
@@ -713,27 +713,27 @@ SwPageFrm* SwAnchoredObject::FindPageFrmOfAnchor()
#i26945#
- @return SwTextFrm*
+ @return SwTextFrame*
text frame containing the anchor character. It's NULL, if the object
isn't anchored at-character resp. as-character.
*/
-SwTextFrm* SwAnchoredObject::FindAnchorCharFrm()
+SwTextFrame* SwAnchoredObject::FindAnchorCharFrame()
{
- SwTextFrm* pAnchorCharFrm( nullptr );
+ SwTextFrame* pAnchorCharFrame( nullptr );
// --> #i44339# - check, if anchor frame exists.
- if ( mpAnchorFrm )
+ if ( mpAnchorFrame )
{
const SwFormatAnchor& rAnch = GetFrameFormat().GetAnchor();
if ((rAnch.GetAnchorId() == FLY_AT_CHAR) ||
(rAnch.GetAnchorId() == FLY_AS_CHAR))
{
- pAnchorCharFrm = &(static_cast<SwTextFrm*>(AnchorFrm())->
- GetFrmAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() ));
+ pAnchorCharFrame = &(static_cast<SwTextFrame*>(AnchorFrame())->
+ GetFrameAtOfst( rAnch.GetContentAnchor()->nContent.GetIndex() ));
}
}
- return pAnchorCharFrm;
+ return pAnchorCharFrame;
}
/** method to determine, if a format on the anchored object is possible
@@ -762,7 +762,7 @@ void SwAnchoredObject::SetTmpConsiderWrapInfluence( const bool _bTmpConsiderWrap
void SwAnchoredObject::SetTmpConsiderWrapInfluenceOfOtherObjs( const bool bTmpConsiderWrapInfluence )
{
- const SwSortedObjs* pObjs = GetAnchorFrm()->GetDrawObjs();
+ const SwSortedObjs* pObjs = GetAnchorFrame()->GetDrawObjs();
if ( pObjs->size() > 1 )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -789,17 +789,17 @@ bool SwAnchoredObject::OverlapsPrevColumn() const
{
bool bOverlapsPrevColumn( false );
- if ( mpAnchorFrm && mpAnchorFrm->IsTextFrm() )
+ if ( mpAnchorFrame && mpAnchorFrame->IsTextFrame() )
{
- const SwFrm* pColFrm = mpAnchorFrm->FindColFrm();
- if ( pColFrm && pColFrm->GetPrev() )
+ const SwFrame* pColFrame = mpAnchorFrame->FindColFrame();
+ if ( pColFrame && pColFrame->GetPrev() )
{
- const SwFrm* pTmpColFrm = pColFrm->GetPrev();
+ const SwFrame* pTmpColFrame = pColFrame->GetPrev();
SwRect aChkRect;
- while ( pTmpColFrm )
+ while ( pTmpColFrame )
{
- aChkRect.Union( pTmpColFrm->Frm() );
- pTmpColFrm = pTmpColFrm->GetPrev();
+ aChkRect.Union( pTmpColFrame->Frame() );
+ pTmpColFrame = pTmpColFrame->GetPrev();
}
bOverlapsPrevColumn = GetObjRect().IsOver( aChkRect );
}
@@ -814,14 +814,14 @@ bool SwAnchoredObject::OverlapsPrevColumn() const
#i30669#
Usage: Needed layout information for WW8 export
*/
-Point SwAnchoredObject::GetRelPosToAnchorFrm() const
+Point SwAnchoredObject::GetRelPosToAnchorFrame() const
{
Point aRelPos;
- OSL_ENSURE( GetAnchorFrm(),
- "<SwAnchoredObject::GetRelPosToAnchorFrm()> - missing anchor frame." );
+ OSL_ENSURE( GetAnchorFrame(),
+ "<SwAnchoredObject::GetRelPosToAnchorFrame()> - missing anchor frame." );
aRelPos = GetObjRect().Pos();
- aRelPos -= GetAnchorFrm()->Frm().Pos();
+ aRelPos -= GetAnchorFrame()->Frame().Pos();
return aRelPos;
}
@@ -837,41 +837,41 @@ Point SwAnchoredObject::GetRelPosToAnchorFrm() const
the position relative to the table cell is determined. Output
parameter <_obRelToTableCell> reflects this situation
*/
-Point SwAnchoredObject::GetRelPosToPageFrm( const bool _bFollowTextFlow,
+Point SwAnchoredObject::GetRelPosToPageFrame( const bool _bFollowTextFlow,
bool& _obRelToTableCell ) const
{
Point aRelPos;
_obRelToTableCell = false;
- OSL_ENSURE( GetAnchorFrm(),
- "<SwAnchoredObject::GetRelPosToPageFrm()> - missing anchor frame." );
- OSL_ENSURE( GetAnchorFrm()->FindPageFrm(),
- "<SwAnchoredObject::GetRelPosToPageFrm()> - missing page frame." );
+ OSL_ENSURE( GetAnchorFrame(),
+ "<SwAnchoredObject::GetRelPosToPageFrame()> - missing anchor frame." );
+ OSL_ENSURE( GetAnchorFrame()->FindPageFrame(),
+ "<SwAnchoredObject::GetRelPosToPageFrame()> - missing page frame." );
aRelPos = GetObjRect().Pos();
// --> #i33818# - search for cell frame, if object has to
// follow the text flow.
- const SwFrm* pFrm( nullptr );
- if ( _bFollowTextFlow && !GetAnchorFrm()->IsPageFrm() )
+ const SwFrame* pFrame( nullptr );
+ if ( _bFollowTextFlow && !GetAnchorFrame()->IsPageFrame() )
{
- pFrm = GetAnchorFrm()->GetUpper();
- while ( !pFrm->IsCellFrm() && !pFrm->IsPageFrm() )
+ pFrame = GetAnchorFrame()->GetUpper();
+ while ( !pFrame->IsCellFrame() && !pFrame->IsPageFrame() )
{
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
}
}
else
{
- pFrm = GetAnchorFrm()->FindPageFrm();
+ pFrame = GetAnchorFrame()->FindPageFrame();
}
- if ( pFrm->IsCellFrm() )
+ if ( pFrame->IsCellFrame() )
{
- aRelPos -= ( pFrm->Frm().Pos() + pFrm->Prt().Pos() );
+ aRelPos -= ( pFrame->Frame().Pos() + pFrame->Prt().Pos() );
_obRelToTableCell = true;
}
else
{
- aRelPos -= pFrm->Frm().Pos();
+ aRelPos -= pFrame->Frame().Pos();
}
return aRelPos;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index c8d4ca656fc8..9e0b50c15fb4 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -117,14 +117,14 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
// It's suboptimal if the format is deleted beforehand.
SwIterator<SwClient,SwFrameFormat> aIter(*pFormat);
for(SwClient* pLast = aIter.First(); bDel && pLast; pLast = aIter.Next())
- if(dynamic_cast<const SwFrm*>( pLast ) == nullptr || !SwXHeadFootText::IsXHeadFootText(pLast))
+ if(dynamic_cast<const SwFrame*>( pLast ) == nullptr || !SwXHeadFootText::IsXHeadFootText(pLast))
bDel = false;
}
if ( bDel )
{
- // If there is a Crsr registered in one of the nodes, we need to call the
- // ParkCrsr in an (arbitrary) shell.
+ // If there is a Cursor registered in one of the nodes, we need to call the
+ // ParkCursor in an (arbitrary) shell.
SwFormatContent& rCnt = (SwFormatContent&)pFormat->GetContent();
if ( rCnt.GetContentIdx() )
{
@@ -135,8 +135,8 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
// complete content is checked for cursors and the complete content
// is deleted on below made method call <pDoc->getIDocumentContentOperations().DeleteSection(pNode)>
SwNodeIndex aIdx( *rCnt.GetContentIdx(), 0 );
- // If there is a Crsr registered in one of the nodes, we need to call the
- // ParkCrsr in an (arbitrary) shell.
+ // If there is a Cursor registered in one of the nodes, we need to call the
+ // ParkCursor in an (arbitrary) shell.
pNode = & aIdx.GetNode();
sal_uInt32 nEnd = pNode->EndOfSectionIndex();
while ( aIdx < nEnd )
@@ -144,10 +144,10 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
if ( pNode->IsContentNode() &&
static_cast<SwContentNode*>(pNode)->HasWriterListeners() )
{
- SwCrsrShell *pShell = SwIterator<SwCrsrShell,SwContentNode>( *static_cast<SwContentNode*>(pNode) ).First();
+ SwCursorShell *pShell = SwIterator<SwCursorShell,SwContentNode>( *static_cast<SwContentNode*>(pNode) ).First();
if( pShell )
{
- pShell->ParkCrsr( aIdx );
+ pShell->ParkCursor( aIdx );
aIdx = nEnd-1;
}
}
@@ -169,20 +169,20 @@ void DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat )
}
// Partially implemented inline in hxx
-SwFormatFrmSize::SwFormatFrmSize( SwFrmSize eSize, SwTwips nWidth, SwTwips nHeight )
+SwFormatFrameSize::SwFormatFrameSize( SwFrameSize eSize, SwTwips nWidth, SwTwips nHeight )
: SfxPoolItem( RES_FRM_SIZE ),
m_aSize( nWidth, nHeight ),
- m_eFrmHeightType( eSize ),
- m_eFrmWidthType( ATT_FIX_SIZE )
+ m_eFrameHeightType( eSize ),
+ m_eFrameWidthType( ATT_FIX_SIZE )
{
m_nWidthPercent = m_eWidthPercentRelation = m_nHeightPercent = m_eHeightPercentRelation = 0;
}
-SwFormatFrmSize& SwFormatFrmSize::operator=( const SwFormatFrmSize& rCpy )
+SwFormatFrameSize& SwFormatFrameSize::operator=( const SwFormatFrameSize& rCpy )
{
m_aSize = rCpy.GetSize();
- m_eFrmHeightType = rCpy.GetHeightSizeType();
- m_eFrmWidthType = rCpy.GetWidthSizeType();
+ m_eFrameHeightType = rCpy.GetHeightSizeType();
+ m_eFrameWidthType = rCpy.GetWidthSizeType();
m_nHeightPercent = rCpy.GetHeightPercent();
m_eHeightPercentRelation = rCpy.GetHeightPercentRelation();
m_nWidthPercent = rCpy.GetWidthPercent();
@@ -190,24 +190,24 @@ SwFormatFrmSize& SwFormatFrmSize::operator=( const SwFormatFrmSize& rCpy )
return *this;
}
-bool SwFormatFrmSize::operator==( const SfxPoolItem& rAttr ) const
+bool SwFormatFrameSize::operator==( const SfxPoolItem& rAttr ) const
{
assert(SfxPoolItem::operator==(rAttr));
- return( m_eFrmHeightType == static_cast<const SwFormatFrmSize&>(rAttr).m_eFrmHeightType &&
- m_eFrmWidthType == static_cast<const SwFormatFrmSize&>(rAttr).m_eFrmWidthType &&
- m_aSize == static_cast<const SwFormatFrmSize&>(rAttr).GetSize()&&
- m_nWidthPercent == static_cast<const SwFormatFrmSize&>(rAttr).GetWidthPercent() &&
- m_eWidthPercentRelation == static_cast<const SwFormatFrmSize&>(rAttr).GetWidthPercentRelation() &&
- m_nHeightPercent == static_cast<const SwFormatFrmSize&>(rAttr).GetHeightPercent() &&
- m_eHeightPercentRelation == static_cast<const SwFormatFrmSize&>(rAttr).GetHeightPercentRelation() );
+ return( m_eFrameHeightType == static_cast<const SwFormatFrameSize&>(rAttr).m_eFrameHeightType &&
+ m_eFrameWidthType == static_cast<const SwFormatFrameSize&>(rAttr).m_eFrameWidthType &&
+ m_aSize == static_cast<const SwFormatFrameSize&>(rAttr).GetSize()&&
+ m_nWidthPercent == static_cast<const SwFormatFrameSize&>(rAttr).GetWidthPercent() &&
+ m_eWidthPercentRelation == static_cast<const SwFormatFrameSize&>(rAttr).GetWidthPercentRelation() &&
+ m_nHeightPercent == static_cast<const SwFormatFrameSize&>(rAttr).GetHeightPercent() &&
+ m_eHeightPercentRelation == static_cast<const SwFormatFrameSize&>(rAttr).GetHeightPercentRelation() );
}
-SfxPoolItem* SwFormatFrmSize::Clone( SfxItemPool* ) const
+SfxPoolItem* SwFormatFrameSize::Clone( SfxItemPool* ) const
{
- return new SwFormatFrmSize( *this );
+ return new SwFormatFrameSize( *this );
}
-bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
+bool SwFormatFrameSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
{
// here we convert always!
nMemberId &= ~CONVERT_TWIPS;
@@ -222,22 +222,22 @@ bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
}
break;
case MID_FRMSIZE_REL_HEIGHT:
- rVal <<= (sal_Int16)(GetHeightPercent() != SwFormatFrmSize::SYNCED ? GetHeightPercent() : 0);
+ rVal <<= (sal_Int16)(GetHeightPercent() != SwFormatFrameSize::SYNCED ? GetHeightPercent() : 0);
break;
case MID_FRMSIZE_REL_HEIGHT_RELATION:
rVal <<= GetHeightPercentRelation();
break;
case MID_FRMSIZE_REL_WIDTH:
- rVal <<= (sal_Int16)(GetWidthPercent() != SwFormatFrmSize::SYNCED ? GetWidthPercent() : 0);
+ rVal <<= (sal_Int16)(GetWidthPercent() != SwFormatFrameSize::SYNCED ? GetWidthPercent() : 0);
break;
case MID_FRMSIZE_REL_WIDTH_RELATION:
rVal <<= GetWidthPercentRelation();
break;
case MID_FRMSIZE_IS_SYNC_HEIGHT_TO_WIDTH:
- rVal <<= SwFormatFrmSize::SYNCED == GetHeightPercent();
+ rVal <<= SwFormatFrameSize::SYNCED == GetHeightPercent();
break;
case MID_FRMSIZE_IS_SYNC_WIDTH_TO_HEIGHT:
- rVal <<= SwFormatFrmSize::SYNCED == GetWidthPercent();
+ rVal <<= SwFormatFrameSize::SYNCED == GetWidthPercent();
break;
case MID_FRMSIZE_WIDTH :
rVal <<= (sal_Int32)convertTwipToMm100(m_aSize.Width());
@@ -262,7 +262,7 @@ bool SwFormatFrmSize::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
return true;
}
-bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
+bool SwFormatFrameSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bConvert = 0 != (nMemberId&CONVERT_TWIPS);
nMemberId &= ~CONVERT_TWIPS;
@@ -293,7 +293,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Int16 nSet = 0;
rVal >>= nSet;
- if(nSet >= 0 && nSet < SwFormatFrmSize::SYNCED)
+ if(nSet >= 0 && nSet < SwFormatFrameSize::SYNCED)
SetHeightPercent((sal_uInt8)nSet);
else
bRet = false;
@@ -310,7 +310,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
sal_Int16 nSet = 0;
rVal >>= nSet;
- if(nSet >= 0 && nSet < SwFormatFrmSize::SYNCED)
+ if(nSet >= 0 && nSet < SwFormatFrameSize::SYNCED)
SetWidthPercent((sal_uInt8)nSet);
else
bRet = false;
@@ -327,8 +327,8 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bSet = *static_cast<sal_Bool const *>(rVal.getValue());
if(bSet)
- SetHeightPercent(SwFormatFrmSize::SYNCED);
- else if( SwFormatFrmSize::SYNCED == GetHeightPercent() )
+ SetHeightPercent(SwFormatFrameSize::SYNCED);
+ else if( SwFormatFrameSize::SYNCED == GetHeightPercent() )
SetHeightPercent( 0 );
}
break;
@@ -336,8 +336,8 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
bool bSet = *static_cast<sal_Bool const *>(rVal.getValue());
if(bSet)
- SetWidthPercent(SwFormatFrmSize::SYNCED);
- else if( SwFormatFrmSize::SYNCED == GetWidthPercent() )
+ SetWidthPercent(SwFormatFrameSize::SYNCED);
+ else if( SwFormatFrameSize::SYNCED == GetWidthPercent() )
SetWidthPercent(0);
}
break;
@@ -376,7 +376,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nType = 0;
if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE )
{
- SetHeightSizeType((SwFrmSize)nType);
+ SetHeightSizeType((SwFrameSize)nType);
}
else
bRet = false;
@@ -393,7 +393,7 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
sal_Int16 nType = 0;
if((rVal >>= nType) && nType >= 0 && nType <= ATT_MIN_SIZE )
{
- SetWidthSizeType((SwFrmSize)nType);
+ SetWidthSizeType((SwFrameSize)nType);
}
else
bRet = false;
@@ -405,17 +405,17 @@ bool SwFormatFrmSize::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return bRet;
}
-void SwFormatFrmSize::dumpAsXml(xmlTextWriterPtr pWriter) const
+void SwFormatFrameSize::dumpAsXml(xmlTextWriterPtr pWriter) const
{
- xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatFrmSize"));
+ xmlTextWriterStartElement(pWriter, BAD_CAST("swFormatFrameSize"));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
std::stringstream aSize;
aSize << m_aSize;
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("size"), BAD_CAST(aSize.str().c_str()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmHeightType"), BAD_CAST(OString::number(m_eFrmHeightType).getStr()));
- xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrmWidthType"), BAD_CAST(OString::number(m_eFrmWidthType).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameHeightType"), BAD_CAST(OString::number(m_eFrameHeightType).getStr()));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eFrameWidthType"), BAD_CAST(OString::number(m_eFrameWidthType).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nWidthPercent"), BAD_CAST(OString::number(m_nWidthPercent).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("eWidthPercentRelation"), BAD_CAST(OString::number(m_eWidthPercentRelation).getStr()));
xmlTextWriterWriteAttribute(pWriter, BAD_CAST("nHeightPercent"), BAD_CAST(OString::number(m_nHeightPercent).getStr()));
@@ -2500,10 +2500,10 @@ IMPL_FIXEDMEMPOOL_NEWDEL_DLL( SwFrameFormat )
SwFrameFormat::SwFrameFormat(
SwAttrPool& rPool,
const sal_Char* pFormatNm,
- SwFrameFormat *pDrvdFrm,
+ SwFrameFormat *pDrvdFrame,
sal_uInt16 nFormatWhich,
const sal_uInt16* pWhichRange)
-: SwFormat(rPool, pFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrm, nFormatWhich),
+: SwFormat(rPool, pFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrame, nFormatWhich),
m_wXObject(),
maFillAttributes()
{
@@ -2512,10 +2512,10 @@ SwFrameFormat::SwFrameFormat(
SwFrameFormat::SwFrameFormat(
SwAttrPool& rPool,
const OUString &rFormatNm,
- SwFrameFormat *pDrvdFrm,
+ SwFrameFormat *pDrvdFrame,
sal_uInt16 nFormatWhich,
const sal_uInt16* pWhichRange)
-: SwFormat(rPool, rFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrm, nFormatWhich),
+: SwFormat(rPool, rFormatNm, (pWhichRange ? pWhichRange : aFrameFormatSetRange), pDrvdFrame, nFormatWhich),
m_wXObject(),
maFillAttributes()
{
@@ -2636,28 +2636,28 @@ void SwFrameFormat::RegisterToFormat( SwFormat& rFormat )
rFormat.Add( this );
}
-/// Delete all Frms that are registered in aDepend.
-void SwFrameFormat::DelFrms()
+/// Delete all Frames that are registered in aDepend.
+void SwFrameFormat::DelFrames()
{
- SwIterator<SwFrm,SwFormat> aIter( *this );
- SwFrm * pLast = aIter.First();
+ SwIterator<SwFrame,SwFormat> aIter( *this );
+ SwFrame * pLast = aIter.First();
if( pLast )
do {
pLast->Cut();
- SwFrm::DestroyFrm(pLast);
+ SwFrame::DestroyFrame(pLast);
} while( nullptr != ( pLast = aIter.Next() ));
}
-void SwFrameFormat::MakeFrms()
+void SwFrameFormat::MakeFrames()
{
OSL_ENSURE( false, "Sorry not implemented." );
}
SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
- const bool bCalcFrm ) const
+ const bool bCalcFrame ) const
{
SwRect aRet;
- SwFrm *pFrm = nullptr;
+ SwFrame *pFrame = nullptr;
if( dynamic_cast<const SwSectionFormat*>( this ) != nullptr )
{
// get the Frame using Node2Layout
@@ -2665,9 +2665,9 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
if( pSectNd )
{
SwNode2Layout aTmp( *pSectNd, pSectNd->GetIndex() - 1 );
- pFrm = aTmp.NextFrm();
+ pFrame = aTmp.NextFrame();
- if( pFrm && !pFrm->KnowsFormat(*this) )
+ if( pFrame && !pFrame->KnowsFormat(*this) )
{
// the Section doesn't have his own Frame, so if someone
// needs the real size, we have to implement this by requesting
@@ -2675,29 +2675,29 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint,
// PROBLEM: what happens if SectionFrames overlaps multiple
// pages?
if( bPrtArea )
- aRet = pFrm->Prt();
+ aRet = pFrame->Prt();
else
{
- aRet = pFrm->Frm();
+ aRet = pFrame->Frame();
--aRet.Pos().Y();
}
- pFrm = nullptr; // the rect is finished by now
+ pFrame = nullptr; // the rect is finished by now
}
}
}
else
{
- const sal_uInt16 nFrmType = RES_FLYFRMFMT == Which() ? FRM_FLY : USHRT_MAX;
- pFrm = ::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrmType, pPoint,
- nullptr, bCalcFrm );
+ const sal_uInt16 nFrameType = RES_FLYFRMFMT == Which() ? FRM_FLY : USHRT_MAX;
+ pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrameType, pPoint,
+ nullptr, bCalcFrame );
}
- if( pFrm )
+ if( pFrame )
{
if( bPrtArea )
- aRet = pFrm->Prt();
+ aRet = pFrame->Prt();
else
- aRet = pFrm->Frm();
+ aRet = pFrame->Frame();
}
return aRet;
}
@@ -2720,7 +2720,7 @@ SdrObject* SwFrameFormat::FindRealSdrObject()
if( RES_FLYFRMFMT == Which() )
{
Point aNullPt;
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *this, FRM_FLY,
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *this, FRM_FLY,
&aNullPt ));
return pFly ? pFly->GetVirtDrawObj() : nullptr;
}
@@ -2731,10 +2731,10 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const
{
//Also linking from inside to outside or from outside to inside is not
//allowed.
- SwFlyFrm *pSFly = SwIterator<SwFlyFrm,SwFormat>(*this).First();
+ SwFlyFrame *pSFly = SwIterator<SwFlyFrame,SwFormat>(*this).First();
if( pSFly )
{
- SwFlyFrm *pAskFly = SwIterator<SwFlyFrm,SwFormat>(rFormat).First();
+ SwFlyFrame *pAskFly = SwIterator<SwFlyFrame,SwFormat>(rFormat).First();
if( pAskFly )
return pSFly->IsLowerOf( pAskFly );
}
@@ -2847,12 +2847,12 @@ IMPL_FIXEDMEMPOOL_NEWDEL( SwFlyFrameFormat )
SwFlyFrameFormat::~SwFlyFrameFormat()
{
- SwIterator<SwFlyFrm,SwFormat> aIter( *this );
- SwFlyFrm * pLast = aIter.First();
+ SwIterator<SwFlyFrame,SwFormat> aIter( *this );
+ SwFlyFrame * pLast = aIter.First();
if( pLast )
do
{
- SwFrm::DestroyFrm(pLast);
+ SwFrame::DestroyFrame(pLast);
} while( nullptr != ( pLast = aIter.Next() ));
SwIterator<SwFlyDrawContact,SwFormat> a2ndIter( *this );
@@ -2864,9 +2864,9 @@ SwFlyFrameFormat::~SwFlyFrameFormat()
} while( nullptr != ( pC = a2ndIter.Next() ));
}
-/// Creates the Frms if the format describes a paragraph-bound frame.
-/// MA: 1994-02-14: creates the Frms also for frames anchored at page.
-void SwFlyFrameFormat::MakeFrms()
+/// Creates the Frames if the format describes a paragraph-bound frame.
+/// MA: 1994-02-14: creates the Frames also for frames anchored at page.
+void SwFlyFrameFormat::MakeFrames()
{
// is there a layout?
if( !GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
@@ -2903,7 +2903,7 @@ void SwFlyFrameFormat::MakeFrms()
}
if ( pCNd )
{
- if( SwIterator<SwFrm,SwContentNode>( *pCNd ).First() )
+ if( SwIterator<SwFrame,SwContentNode>( *pCNd ).First() )
{
pModify = pCNd;
}
@@ -2930,14 +2930,14 @@ void SwFlyFrameFormat::MakeFrms()
case FLY_AT_PAGE:
{
sal_uInt16 nPgNum = aAnchorAttr.GetPageNum();
- SwPageFrm *pPage = static_cast<SwPageFrm*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower());
if( nPgNum == 0 && aAnchorAttr.GetContentAnchor() )
{
SwContentNode *pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode();
- SwIterator<SwFrm,SwContentNode> aIter( *pCNd );
- for ( SwFrm* pFrm = aIter.First(); pFrm != nullptr; pFrm = aIter.Next() )
+ SwIterator<SwFrame,SwContentNode> aIter( *pCNd );
+ for ( SwFrame* pFrame = aIter.First(); pFrame != nullptr; pFrame = aIter.Next() )
{
- pPage = pFrm->FindPageFrm();
+ pPage = pFrame->FindPageFrame();
if( pPage )
{
nPgNum = pPage->GetPhyPageNum();
@@ -2956,7 +2956,7 @@ void SwFlyFrameFormat::MakeFrms()
pPage->PlaceFly( nullptr, this );
break;
}
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
break;
@@ -2966,38 +2966,38 @@ void SwFlyFrameFormat::MakeFrms()
if( pModify )
{
- SwIterator<SwFrm,SwModify> aIter( *pModify );
- for( SwFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ SwIterator<SwFrame,SwModify> aIter( *pModify );
+ for( SwFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
{
- bool bAdd = !pFrm->IsContentFrm() ||
- !static_cast<SwContentFrm*>(pFrm)->IsFollow();
+ bool bAdd = !pFrame->IsContentFrame() ||
+ !static_cast<SwContentFrame*>(pFrame)->IsFollow();
- if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrm->IsFlyFrm() )
+ if ( FLY_AT_FLY == aAnchorAttr.GetAnchorId() && !pFrame->IsFlyFrame() )
{
- SwFrm* pFlyFrm = pFrm->FindFlyFrm();
- if ( pFlyFrm )
+ SwFrame* pFlyFrame = pFrame->FindFlyFrame();
+ if ( pFlyFrame )
{
- pFrm = pFlyFrm;
+ pFrame = pFlyFrame;
}
else
{
aAnchorAttr.SetType( FLY_AT_PARA );
SetFormatAttr( aAnchorAttr );
- MakeFrms();
+ MakeFrames();
return;
}
}
- if( pFrm->GetDrawObjs() )
+ if( pFrame->GetDrawObjs() )
{
// #i28701# - new type <SwSortedObjs>
- SwSortedObjs &rObjs = *pFrm->GetDrawObjs();
+ SwSortedObjs &rObjs = *pFrame->GetDrawObjs();
for( size_t i = 0; i < rObjs.size(); ++i)
{
// #i28701# - consider changed type of
// <SwSortedObjs> entries.
SwAnchoredObject* pObj = rObjs[i];
- if( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr &&
+ if( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr &&
(&pObj->GetFrameFormat()) == this )
{
bAdd = false;
@@ -3008,29 +3008,29 @@ void SwFlyFrameFormat::MakeFrms()
if( bAdd )
{
- SwFlyFrm *pFly;
+ SwFlyFrame *pFly;
switch( aAnchorAttr.GetAnchorId() )
{
case FLY_AT_FLY:
- pFly = new SwFlyLayFrm( this, pFrm, pFrm );
+ pFly = new SwFlyLayFrame( this, pFrame, pFrame );
break;
case FLY_AT_PARA:
case FLY_AT_CHAR:
- pFly = new SwFlyAtCntFrm( this, pFrm, pFrm );
+ pFly = new SwFlyAtContentFrame( this, pFrame, pFrame );
break;
default:
assert(false && "Neuer Ankertyp" );
//fall-through
case FLY_AS_CHAR:
- pFly = new SwFlyInCntFrm( this, pFrm, pFrm );
+ pFly = new SwFlyInContentFrame( this, pFrame, pFrame );
break;
}
- pFrm->AppendFly( pFly );
+ pFrame->AppendFly( pFly );
pFly->GetFormat()->SetObjTitle(GetObjTitle());
pFly->GetFormat()->SetObjDescription(GetObjDescription());
- SwPageFrm *pPage = pFly->FindPageFrm();
+ SwPageFrame *pPage = pFly->FindPageFrame();
if( pPage )
::RegistFlys( pPage, pFly );
}
@@ -3038,18 +3038,18 @@ void SwFlyFrameFormat::MakeFrms()
}
}
-SwFlyFrm* SwFlyFrameFormat::GetFrm( const Point* pPoint, const bool bCalcFrm ) const
+SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint, const bool bCalcFrame ) const
{
- return static_cast<SwFlyFrm*>(::GetFrmOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY,
- pPoint, nullptr, bCalcFrm ));
+ return static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), FRM_FLY,
+ pPoint, nullptr, bCalcFrame ));
}
-SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const bool bCalcFrm ) const
+SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj( const Point* pPoint, const bool bCalcFrame ) const
{
- SwFlyFrm* pFlyFrm( GetFrm( pPoint, bCalcFrm ) );
- if ( pFlyFrm )
+ SwFlyFrame* pFlyFrame( GetFrame( pPoint, bCalcFrame ) );
+ if ( pFlyFrame )
{
- return dynamic_cast<SwAnchoredObject*>(pFlyFrm);
+ return dynamic_cast<SwAnchoredObject*>(pFlyFrame);
}
else
{
@@ -3064,7 +3064,7 @@ bool SwFlyFrameFormat::GetInfo( SfxPoolItem& rInfo ) const
{
case RES_CONTENT_VISIBLE:
{
- static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFormat>( *this ).First();
+ static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrame,SwFormat>( *this ).First();
}
bRet = false;
break;
@@ -3199,7 +3199,7 @@ bool SwFlyFrameFormat::IsBackgroundTransparent() const
background is "inherited" from its parent/grandparent.
This is the case, if no background graphic is set and the background
color is "no fill"/"auto fill"
- NOTE: condition is "copied" from method <SwFrm::GetBackgroundBrush(..).
+ NOTE: condition is "copied" from method <SwFrame::GetBackgroundBrush(..).
@return true, if background brush is "inherited" from parent/grandparent
*/
@@ -3225,7 +3225,7 @@ bool SwFlyFrameFormat::IsBackgroundBrushInherited() const
SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat,
const SwFormatAnchor& _rNewAnchorFormat,
- SwFlyFrm* _pKeepThisFlyFrm )
+ SwFlyFrame* _pKeepThisFlyFrame )
: mrFlyFrameFormat( _rFlyFrameFormat ),
mbAnchorNodeChanged( false )
{
@@ -3243,33 +3243,33 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat
_rNewAnchorFormat.GetContentAnchor()->nNode )
{
// determine 'old' number of anchor frames
- sal_uInt32 nOldNumOfAnchFrm( 0L );
- SwIterator<SwFrm,SwContentNode> aOldIter( *(aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) );
- for( SwFrm* pOld = aOldIter.First(); pOld; pOld = aOldIter.Next() )
+ sal_uInt32 nOldNumOfAnchFrame( 0L );
+ SwIterator<SwFrame,SwContentNode> aOldIter( *(aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) );
+ for( SwFrame* pOld = aOldIter.First(); pOld; pOld = aOldIter.Next() )
{
- ++nOldNumOfAnchFrm;
+ ++nOldNumOfAnchFrame;
}
// determine 'new' number of anchor frames
- sal_uInt32 nNewNumOfAnchFrm( 0L );
- SwIterator<SwFrm,SwContentNode> aNewIter( *(_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) );
- for( SwFrm* pNew = aNewIter.First(); pNew; pNew = aNewIter.Next() )
+ sal_uInt32 nNewNumOfAnchFrame( 0L );
+ SwIterator<SwFrame,SwContentNode> aNewIter( *(_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) );
+ for( SwFrame* pNew = aNewIter.First(); pNew; pNew = aNewIter.Next() )
{
- ++nNewNumOfAnchFrm;
+ ++nNewNumOfAnchFrame;
}
- if ( nOldNumOfAnchFrm != nNewNumOfAnchFrm )
+ if ( nOldNumOfAnchFrame != nNewNumOfAnchFrame )
{
- // delete existing fly frames except <_pKeepThisFlyFrm>
- SwIterator<SwFrm,SwFormat> aIter( mrFlyFrameFormat );
- SwFrm* pFrm = aIter.First();
- if ( pFrm )
+ // delete existing fly frames except <_pKeepThisFlyFrame>
+ SwIterator<SwFrame,SwFormat> aIter( mrFlyFrameFormat );
+ SwFrame* pFrame = aIter.First();
+ if ( pFrame )
{
do {
- if ( pFrm != _pKeepThisFlyFrm )
+ if ( pFrame != _pKeepThisFlyFrame )
{
- pFrm->Cut();
- SwFrm::DestroyFrm(pFrm);
+ pFrame->Cut();
+ SwFrame::DestroyFrame(pFrame);
}
- } while( nullptr != ( pFrm = aIter.Next() ));
+ } while( nullptr != ( pFrame = aIter.Next() ));
}
// indicate, that re-creation of fly frames necessary
mbAnchorNodeChanged = true;
@@ -3282,7 +3282,7 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg()
{
if ( mbAnchorNodeChanged )
{
- mrFlyFrameFormat.MakeFrms();
+ mrFlyFrameFormat.MakeFrames();
}
}
@@ -3297,14 +3297,14 @@ SwDrawFrameFormat::~SwDrawFrameFormat()
delete pContact;
}
-void SwDrawFrameFormat::MakeFrms()
+void SwDrawFrameFormat::MakeFrames()
{
SwDrawContact *pContact = static_cast<SwDrawContact*>(FindContactObj());
if ( pContact )
pContact->ConnectToLayout();
}
-void SwDrawFrameFormat::DelFrms()
+void SwDrawFrameFormat::DelFrames()
{
SwDrawContact *pContact = static_cast<SwDrawContact *>(FindContactObj());
if ( pContact ) //for the reader and other unpredictable things.
@@ -3371,7 +3371,7 @@ OUString SwDrawFrameFormat::GetDescription() const
}
IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
- const SwFlyFrm *pFly ) const
+ const SwFlyFrame *pFly ) const
{
const SwFormatURL &rURL = GetURL();
if( !rURL.GetMap() )
@@ -3379,37 +3379,37 @@ IMapObject* SwFrameFormat::GetIMapObject( const Point& rPoint,
if( !pFly )
{
- pFly = SwIterator<SwFlyFrm,SwFormat>( *this ).First();
+ pFly = SwIterator<SwFlyFrame,SwFormat>( *this ).First();
if( !pFly )
return nullptr;
}
//Original size for OLE and graphic is TwipSize, otherwise the size of
//FrameFormat of the Fly.
- const SwFrm *pRef;
+ const SwFrame *pRef;
const SwNoTextNode *pNd = nullptr;
Size aOrigSz;
- if( pFly->Lower() && pFly->Lower()->IsNoTextFrm() )
+ if( pFly->Lower() && pFly->Lower()->IsNoTextFrame() )
{
pRef = pFly->Lower();
- pNd = static_cast<const SwContentFrm*>(pRef)->GetNode()->GetNoTextNode();
+ pNd = static_cast<const SwContentFrame*>(pRef)->GetNode()->GetNoTextNode();
aOrigSz = pNd->GetTwipSize();
}
else
{
pRef = pFly;
- aOrigSz = pFly->GetFormat()->GetFrmSize().GetSize();
+ aOrigSz = pFly->GetFormat()->GetFrameSize().GetSize();
}
if( aOrigSz.Width() != 0 && aOrigSz.Height() != 0 )
{
Point aPos( rPoint );
- Size aActSz ( pRef == pFly ? pFly->Frm().SSize() : pRef->Prt().SSize() );
+ Size aActSz ( pRef == pFly ? pFly->Frame().SSize() : pRef->Prt().SSize() );
const MapMode aSrc ( MAP_TWIP );
const MapMode aDest( MAP_100TH_MM );
aOrigSz = OutputDevice::LogicToLogic( aOrigSz, aSrc, aDest );
aActSz = OutputDevice::LogicToLogic( aActSz, aSrc, aDest );
- aPos -= pRef->Frm().Pos();
+ aPos -= pRef->Frame().Pos();
aPos -= pRef->Prt().Pos();
aPos = OutputDevice::LogicToLogic( aPos, aSrc, aDest );
sal_uInt32 nFlags = 0;
@@ -3459,21 +3459,21 @@ bool IsFlyFrameFormatInHeader(const SwFrameFormat& rFormat)
const SwFlyFrameFormat* pFlyFrameFormat = dynamic_cast<const SwFlyFrameFormat*>(&rFormat);
if (!pFlyFrameFormat)
return false;
- SwFlyFrm* pFlyFrm = pFlyFrameFormat->GetFrm();
- if (!pFlyFrm) // fdo#54648: "hidden" drawing object has no layout frame
+ SwFlyFrame* pFlyFrame = pFlyFrameFormat->GetFrame();
+ if (!pFlyFrame) // fdo#54648: "hidden" drawing object has no layout frame
{
return false;
}
- SwPageFrm* pPageFrm = pFlyFrm->FindPageFrmOfAnchor();
- SwFrm* pHeader = pPageFrm->Lower();
+ SwPageFrame* pPageFrame = pFlyFrame->FindPageFrameOfAnchor();
+ SwFrame* pHeader = pPageFrame->Lower();
if (pHeader->GetType() == FRM_HEADER)
{
- const SwFrm* pFrm = pFlyFrm->GetAnchorFrm();
- while (pFrm)
+ const SwFrame* pFrame = pFlyFrame->GetAnchorFrame();
+ while (pFrame)
{
- if (pFrm == pHeader)
+ if (pFrame == pHeader)
return true;
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
}
}
return false;
@@ -3507,8 +3507,8 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc)
{
assert(!rAnchor.GetContentAnchor()
// for invalid documents that lack text:anchor-page-number
- // it may have an anchor before MakeFrms() is called
- || (!SwIterator<SwFrm, SwFrameFormat>(**it).First()));
+ // it may have an anchor before MakeFrames() is called
+ || (!SwIterator<SwFrame, SwFrameFormat>(**it).First()));
}
else
{
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index 9469f2abe40c..cac6574158d9 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -47,45 +47,45 @@
// Move methods
-/// Return value tells whether the Frm should be moved.
-bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & )
+/// Return value tells whether the Frame should be moved.
+bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool & )
{
- if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()))
+ if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove()))
{
// Floating back a frm uses a bit of time unfortunately.
- // The most common case is the following: The Frm wants to float to
- // somewhere where the FixSize is the same that the Frm itself has already.
- // In that case it's pretty easy to check if the Frm has enough space
+ // The most common case is the following: The Frame wants to float to
+ // somewhere where the FixSize is the same that the Frame itself has already.
+ // In that case it's pretty easy to check if the Frame has enough space
// for its VarSize. If this is NOT the case, we already know that
// we don't need to move.
- // The Frm checks itself whether it has enough space - respecting the fact
+ // The Frame checks itself whether it has enough space - respecting the fact
// that it could possibly split itself if needed.
- // If, however, the FixSize differs from the Frm or Flys are involved
+ // If, however, the FixSize differs from the Frame or Flys are involved
// (either in the old or the new position), checking is pointless,
- // and we have to move the Frm just to see what happens - if there's
+ // and we have to move the Frame just to see what happens - if there's
// some space available to do it, that is.
// The FixSize of the containers of Contents is always the width.
// If we moved more than one sheet back (for example jumping over empty
- // pages), we have to move either way. Otherwise, if the Frm doesn't fit
+ // pages), we have to move either way. Otherwise, if the Frame doesn't fit
// into the page, empty pages wouldn't be respected anymore.
sal_uInt8 nMoveAnyway = 0;
- SwPageFrm * const pNewPage = pNewUpper->FindPageFrm();
- SwPageFrm *pOldPage = FindPageFrm();
+ SwPageFrame * const pNewPage = pNewUpper->FindPageFrame();
+ SwPageFrame *pOldPage = FindPageFrame();
- if ( SwFlowFrm::IsMoveBwdJump() )
+ if ( SwFlowFrame::IsMoveBwdJump() )
return true;
if( IsInFootnote() && IsInSct() )
{
- SwFootnoteFrm* pFootnote = FindFootnoteFrm();
- SwSectionFrm* pMySect = pFootnote->FindSctFrm();
+ SwFootnoteFrame* pFootnote = FindFootnoteFrame();
+ SwSectionFrame* pMySect = pFootnote->FindSctFrame();
if( pMySect && pMySect->IsFootnoteLock() )
{
- SwSectionFrm *pSect = pNewUpper->FindSctFrm();
+ SwSectionFrame *pSect = pNewUpper->FindSctFrame();
while( pSect && pSect->IsInFootnote() )
- pSect = pSect->GetUpper()->FindSctFrm();
+ pSect = pSect->GetUpper()->FindSctFrame();
OSL_ENSURE( pSect, "Escaping footnote" );
if( pSect != pMySect )
return false;
@@ -101,39 +101,39 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & )
// OD 2004-05-26 #i25904# - do *not* move backward,
// if <nMoveAnyway> equals 3 and no space is left in new upper.
- nMoveAnyway |= BwdMoveNecessary( pOldPage, Frm() );
+ nMoveAnyway |= BwdMoveNecessary( pOldPage, Frame() );
{
const IDocumentSettingAccess& rIDSA = pNewPage->GetFormat()->getIDocumentSettingAccess();
SwTwips nSpace = 0;
SwRect aRect( pNewUpper->Prt() );
- aRect.Pos() += pNewUpper->Frm().Pos();
- const SwFrm *pPrevFrm = pNewUpper->Lower();
- while ( pPrevFrm )
+ aRect.Pos() += pNewUpper->Frame().Pos();
+ const SwFrame *pPrevFrame = pNewUpper->Lower();
+ while ( pPrevFrame )
{
- SwTwips nNewTop = (pPrevFrm->Frm().*fnRectX->fnGetBottom)();
+ SwTwips nNewTop = (pPrevFrame->Frame().*fnRectX->fnGetBottom)();
// OD 2004-03-01 #106629#:
// consider lower spacing of last frame in a table cell
{
// check, if last frame is inside table and if it includes
// its lower spacing.
- if ( !pPrevFrm->GetNext() && pPrevFrm->IsInTab() &&
+ if ( !pPrevFrame->GetNext() && pPrevFrame->IsInTab() &&
rIDSA.get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS) )
{
- const SwFrm* pLastFrm = pPrevFrm;
+ const SwFrame* pLastFrame = pPrevFrame;
// if last frame is a section, take its last content
- if ( pPrevFrm->IsSctFrm() )
+ if ( pPrevFrame->IsSctFrame() )
{
- pLastFrm = static_cast<const SwSectionFrm*>(pPrevFrm)->FindLastContent();
- if ( pLastFrm &&
- pLastFrm->FindTabFrm() != pPrevFrm->FindTabFrm() )
+ pLastFrame = static_cast<const SwSectionFrame*>(pPrevFrame)->FindLastContent();
+ if ( pLastFrame &&
+ pLastFrame->FindTabFrame() != pPrevFrame->FindTabFrame() )
{
- pLastFrm = pLastFrm->FindTabFrm();
+ pLastFrame = pLastFrame->FindTabFrame();
}
}
- if ( pLastFrm )
+ if ( pLastFrame )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pLastFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pLastFrame );
const SwBorderAttrs& rAttrs = *aAccess.Get();
nNewTop -= rAttrs.GetULSpace().GetLower();
}
@@ -141,19 +141,19 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & )
}
(aRect.*fnRectX->fnSetTop)( nNewTop );
- pPrevFrm = pPrevFrm->GetNext();
+ pPrevFrame = pPrevFrame->GetNext();
}
nMoveAnyway |= BwdMoveNecessary( pNewPage, aRect);
//determine space left in new upper frame
nSpace = (aRect.*fnRectX->fnGetHeight)();
- const SwViewShell *pSh = pNewUpper->getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = pNewUpper->getRootFrame()->GetCurrShell();
if ( IsInFootnote() ||
(pSh && pSh->GetViewOptions()->getBrowseMode()) ||
- pNewUpper->IsCellFrm() ||
- ( pNewUpper->IsInSct() && ( pNewUpper->IsSctFrm() ||
- ( pNewUpper->IsColBodyFrm() &&
+ pNewUpper->IsCellFrame() ||
+ ( pNewUpper->IsInSct() && ( pNewUpper->IsSctFrame() ||
+ ( pNewUpper->IsColBodyFrame() &&
!pNewUpper->GetUpper()->GetPrev() &&
!pNewUpper->GetUpper()->GetNext() ) ) ) )
nSpace += pNewUpper->Grow( LONG_MAX, true );
@@ -185,7 +185,7 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & )
// It's impossible for _WouldFit to return a usable result if
// we have a fresh multi-column section - so we really have to
// float back unless there is no space.
- return pNewUpper->IsInSct() && pNewUpper->IsColBodyFrm() &&
+ return pNewUpper->IsInSct() && pNewUpper->IsColBodyFrame() &&
!(pNewUpper->Prt().*fnRectX->fnGetWidth)() &&
( pNewUpper->GetUpper()->GetPrev() ||
pNewUpper->GetUpper()->GetNext() );
@@ -201,30 +201,30 @@ bool SwContentFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool & )
// Calc methods
// Two little friendships form a secret society
-inline void PrepareLock( SwFlowFrm *pTab )
+inline void PrepareLock( SwFlowFrame *pTab )
{
pTab->LockJoin();
}
-inline void PrepareUnlock( SwFlowFrm *pTab )
+inline void PrepareUnlock( SwFlowFrame *pTab )
{
pTab->UnlockJoin();
}
// hopefully, one day this function simply will return 'false'
-static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm )
+static bool lcl_IsCalcUpperAllowed( const SwFrame& rFrame )
{
- return !rFrm.GetUpper()->IsSctFrm() &&
- !rFrm.GetUpper()->IsFooterFrm() &&
+ return !rFrame.GetUpper()->IsSctFrame() &&
+ !rFrame.GetUpper()->IsFooterFrame() &&
// #i23129#, #i36347# - no format of upper Writer fly frame
- !rFrm.GetUpper()->IsFlyFrm() &&
- !( rFrm.GetUpper()->IsTabFrm() && rFrm.GetUpper()->GetUpper()->IsInTab() ) &&
- !( rFrm.IsTabFrm() && rFrm.GetUpper()->IsInTab() );
+ !rFrame.GetUpper()->IsFlyFrame() &&
+ !( rFrame.GetUpper()->IsTabFrame() && rFrame.GetUpper()->GetUpper()->IsInTab() ) &&
+ !( rFrame.IsTabFrame() && rFrame.GetUpper()->IsInTab() );
}
/** Prepares the Frame for "formatting" (MakeAll()).
*
- * This method serves to save stack space: To calculate the position of the Frm
+ * This method serves to save stack space: To calculate the position of the Frame
* we have to make sure that the positions of Upper and Prev respectively are
* valid. This may require a recursive call (a loop would be quite expensive,
* as it's not required very often).
@@ -239,7 +239,7 @@ static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm )
*
* @see MakeAll()
*/
-void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext)
+void SwFrame::PrepareMake(vcl::RenderContext* pRenderContext)
{
StackHack aHack;
if ( GetUpper() )
@@ -250,29 +250,29 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext)
if ( !GetUpper() )
return;
- const bool bCnt = IsContentFrm();
- const bool bTab = IsTabFrm();
+ const bool bCnt = IsContentFrame();
+ const bool bTab = IsTabFrame();
bool bNoSect = IsInSct();
bool bOldTabLock = false, bFoll = false;
- SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : nullptr;
+ SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr;
if ( bTab )
{
- pThis = static_cast<SwTabFrm*>(this);
- bOldTabLock = static_cast<SwTabFrm*>(this)->IsJoinLocked();
- ::PrepareLock( static_cast<SwTabFrm*>(this) );
+ pThis = static_cast<SwTabFrame*>(this);
+ bOldTabLock = static_cast<SwTabFrame*>(this)->IsJoinLocked();
+ ::PrepareLock( static_cast<SwTabFrame*>(this) );
bFoll = pThis->IsFollow();
}
- else if( IsSctFrm() )
+ else if( IsSctFrame() )
{
- pThis = static_cast<SwSectionFrm*>(this);
+ pThis = static_cast<SwSectionFrame*>(this);
bFoll = pThis->IsFollow();
bNoSect = false;
}
else if ( bCnt && (bFoll = pThis->IsFollow()) && GetPrev() )
{
//Do not follow the chain when we need only one instance
- const SwTextFrm* pMaster = static_cast<SwContentFrm*>(this)->FindMaster();
+ const SwTextFrame* pMaster = static_cast<SwContentFrame*>(this)->FindMaster();
if ( pMaster && pMaster->IsLocked() )
{
MakeAll(pRenderContext);
@@ -287,42 +287,42 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext)
!GetPrev()->GetAttrSet()->GetKeep().GetValue();
if ( bFormatPrev )
{
- SwFrm *pFrm = GetUpper()->Lower();
- while ( pFrm != this )
+ SwFrame *pFrame = GetUpper()->Lower();
+ while ( pFrame != this )
{
- OSL_ENSURE( pFrm, ":-( Layout unstable (this not found)." );
- if ( !pFrm )
+ OSL_ENSURE( pFrame, ":-( Layout unstable (this not found)." );
+ if ( !pFrame )
return; //Oioioioi ...
- if ( !pFrm->IsValid() )
+ if ( !pFrame->IsValid() )
{
// A small interference that hopefully improves on the stability:
- // If I'm Follow AND neighbor of a Frm before me, it would delete
+ // If I'm Follow AND neighbor of a Frame before me, it would delete
// me when formatting. This as you can see could easily become a
// confusing situation that we want to avoid.
- if ( bFoll && pFrm->IsFlowFrm() &&
- (SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) )
+ if ( bFoll && pFrame->IsFlowFrame() &&
+ (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) )
break;
- pFrm->MakeAll(pRenderContext);
- if( IsSctFrm() && !static_cast<SwSectionFrm*>(this)->GetSection() )
+ pFrame->MakeAll(pRenderContext);
+ if( IsSctFrame() && !static_cast<SwSectionFrame*>(this)->GetSection() )
break;
}
- // With ContentFrms, the chain may be broken while walking through
+ // With ContentFrames, the chain may be broken while walking through
// it. Therefore we have to figure out the follower in a bit more
// complicated way. However, I'll HAVE to get back to myself
// sometime again.
- pFrm = pFrm->FindNext();
+ pFrame = pFrame->FindNext();
- // If we started out in a SectionFrm, it might have happened that
+ // If we started out in a SectionFrame, it might have happened that
// we landed in a Section Follow via the MakeAll calls.
- // FindNext only gives us the SectionFrm, not it's content - we
+ // FindNext only gives us the SectionFrame, not it's content - we
// won't find ourselves anymore!
- if( bNoSect && pFrm && pFrm->IsSctFrm() )
+ if( bNoSect && pFrame && pFrame->IsSctFrame() )
{
- SwFrm* pCnt = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
+ SwFrame* pCnt = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
if( pCnt )
- pFrm = pCnt;
+ pFrame = pCnt;
}
}
OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone II)." );
@@ -336,155 +336,155 @@ void SwFrm::PrepareMake(vcl::RenderContext* pRenderContext)
}
if ( bTab && !bOldTabLock )
- ::PrepareUnlock( static_cast<SwTabFrm*>(this) );
+ ::PrepareUnlock( static_cast<SwTabFrame*>(this) );
}
MakeAll(pRenderContext);
}
-void SwFrm::OptPrepareMake()
+void SwFrame::OptPrepareMake()
{
// #i23129#, #i36347# - no format of upper Writer fly frame
- if ( GetUpper() && !GetUpper()->IsFooterFrm() &&
- !GetUpper()->IsFlyFrm() )
+ if ( GetUpper() && !GetUpper()->IsFooterFrame() &&
+ !GetUpper()->IsFlyFrame() )
{
{
- SwFrmDeleteGuard aDeleteGuard(this);
- GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
+ SwFrameDeleteGuard aDeleteGuard(this);
+ GetUpper()->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr);
}
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
return;
}
if ( GetPrev() && !GetPrev()->IsValid() )
- PrepareMake(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
+ PrepareMake(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr);
else
{
StackHack aHack;
- MakeAll(IsRootFrm() ? nullptr : getRootFrm()->GetCurrShell()->GetOut());
+ MakeAll(IsRootFrame() ? nullptr : getRootFrame()->GetCurrShell()->GetOut());
}
}
-void SwFrm::PrepareCrsr()
+void SwFrame::PrepareCursor()
{
StackHack aHack;
- if( GetUpper() && !GetUpper()->IsSctFrm() )
+ if( GetUpper() && !GetUpper()->IsSctFrame() )
{
- GetUpper()->PrepareCrsr();
- GetUpper()->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
+ GetUpper()->PrepareCursor();
+ GetUpper()->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr);
OSL_ENSURE( GetUpper(), ":-( Layout unstable (Upper gone)." );
if ( !GetUpper() )
return;
- const bool bCnt = IsContentFrm();
- const bool bTab = IsTabFrm();
+ const bool bCnt = IsContentFrame();
+ const bool bTab = IsTabFrame();
bool bNoSect = IsInSct();
bool bOldTabLock = false, bFoll;
- SwFlowFrm* pThis = bCnt ? static_cast<SwContentFrm*>(this) : nullptr;
+ SwFlowFrame* pThis = bCnt ? static_cast<SwContentFrame*>(this) : nullptr;
if ( bTab )
{
- bOldTabLock = static_cast<SwTabFrm*>(this)->IsJoinLocked();
- ::PrepareLock( static_cast<SwTabFrm*>(this) );
- pThis = static_cast<SwTabFrm*>(this);
+ bOldTabLock = static_cast<SwTabFrame*>(this)->IsJoinLocked();
+ ::PrepareLock( static_cast<SwTabFrame*>(this) );
+ pThis = static_cast<SwTabFrame*>(this);
}
- else if( IsSctFrm() )
+ else if( IsSctFrame() )
{
- pThis = static_cast<SwSectionFrm*>(this);
+ pThis = static_cast<SwSectionFrame*>(this);
bNoSect = false;
}
bFoll = pThis && pThis->IsFollow();
- SwFrm *pFrm = GetUpper()->Lower();
- while ( pFrm != this )
+ SwFrame *pFrame = GetUpper()->Lower();
+ while ( pFrame != this )
{
- OSL_ENSURE( pFrm, ":-( Layout unstable (this not found)." );
- if ( !pFrm )
+ OSL_ENSURE( pFrame, ":-( Layout unstable (this not found)." );
+ if ( !pFrame )
return; //Oioioioi ...
- if ( !pFrm->IsValid() )
+ if ( !pFrame->IsValid() )
{
// A small interference that hopefully improves on the stability:
- // If I'm Follow AND neighbor of a Frm before me, it would delete
+ // If I'm Follow AND neighbor of a Frame before me, it would delete
// me when formatting. This as you can see could easily become a
// confusing situation that we want to avoid.
- if ( bFoll && pFrm->IsFlowFrm() &&
- (SwFlowFrm::CastFlowFrm(pFrm))->IsAnFollow( pThis ) )
+ if ( bFoll && pFrame->IsFlowFrame() &&
+ (SwFlowFrame::CastFlowFrame(pFrame))->IsAnFollow( pThis ) )
break;
- pFrm->MakeAll(getRootFrm()->GetCurrShell()->GetOut());
+ pFrame->MakeAll(getRootFrame()->GetCurrShell()->GetOut());
}
- // With ContentFrms, the chain may be broken while walking through
+ // With ContentFrames, the chain may be broken while walking through
// it. Therefore we have to figure out the follower in a bit more
// complicated way. However, I'll HAVE to get back to myself
// sometime again.
- pFrm = pFrm->FindNext();
- if( bNoSect && pFrm && pFrm->IsSctFrm() )
+ pFrame = pFrame->FindNext();
+ if( bNoSect && pFrame && pFrame->IsSctFrame() )
{
- SwFrm* pCnt = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
+ SwFrame* pCnt = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
if( pCnt )
- pFrm = pCnt;
+ pFrame = pCnt;
}
}
OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone II)." );
if ( !GetUpper() )
return;
- GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut());
OSL_ENSURE( GetUpper(), "Layout unstable (Upper gone III)." );
if ( bTab && !bOldTabLock )
- ::PrepareUnlock( static_cast<SwTabFrm*>(this) );
+ ::PrepareUnlock( static_cast<SwTabFrame*>(this) );
}
- Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr);
+ Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr);
}
-// Here we return GetPrev(); however we will ignore empty SectionFrms
-static SwFrm* lcl_Prev( SwFrm* pFrm, bool bSectPrv = true )
+// Here we return GetPrev(); however we will ignore empty SectionFrames
+static SwFrame* lcl_Prev( SwFrame* pFrame, bool bSectPrv = true )
{
- SwFrm* pRet = pFrm->GetPrev();
- if( !pRet && pFrm->GetUpper() && pFrm->GetUpper()->IsSctFrm() &&
- bSectPrv && !pFrm->IsColumnFrm() )
- pRet = pFrm->GetUpper()->GetPrev();
- while( pRet && pRet->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pRet)->GetSection() )
+ SwFrame* pRet = pFrame->GetPrev();
+ if( !pRet && pFrame->GetUpper() && pFrame->GetUpper()->IsSctFrame() &&
+ bSectPrv && !pFrame->IsColumnFrame() )
+ pRet = pFrame->GetUpper()->GetPrev();
+ while( pRet && pRet->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pRet)->GetSection() )
pRet = pRet->GetPrev();
return pRet;
}
-static SwFrm* lcl_NotHiddenPrev( SwFrm* pFrm )
+static SwFrame* lcl_NotHiddenPrev( SwFrame* pFrame )
{
- SwFrm *pRet = pFrm;
+ SwFrame *pRet = pFrame;
do
{
pRet = lcl_Prev( pRet );
- } while ( pRet && pRet->IsTextFrm() && static_cast<SwTextFrm*>(pRet)->IsHiddenNow() );
+ } while ( pRet && pRet->IsTextFrame() && static_cast<SwTextFrame*>(pRet)->IsHiddenNow() );
return pRet;
}
-void SwFrm::MakePos()
+void SwFrame::MakePos()
{
if ( !mbValidPos )
{
mbValidPos = true;
bool bUseUpper = false;
- SwFrm* pPrv = lcl_Prev( this );
+ SwFrame* pPrv = lcl_Prev( this );
if ( pPrv &&
- ( !pPrv->IsContentFrm() ||
- ( static_cast<SwContentFrm*>(pPrv)->GetFollow() != this ) )
+ ( !pPrv->IsContentFrame() ||
+ ( static_cast<SwContentFrame*>(pPrv)->GetFollow() != this ) )
)
{
if ( !StackHack::IsLocked() &&
- ( !IsInSct() || IsSctFrm() ) &&
- !pPrv->IsSctFrm() &&
+ ( !IsInSct() || IsSctFrame() ) &&
+ !pPrv->IsSctFrame() &&
!pPrv->GetAttrSet()->GetKeep().GetValue()
)
{
- pPrv->Calc(getRootFrm()->GetCurrShell() ? getRootFrm()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish!
+ pPrv->Calc(getRootFrame()->GetCurrShell() ? getRootFrame()->GetCurrShell()->GetOut() : nullptr); // This may cause Prev to vanish!
}
- else if ( pPrv->Frm().Top() == 0 )
+ else if ( pPrv->Frame().Top() == 0 )
{
bUseUpper = true;
}
@@ -492,42 +492,42 @@ void SwFrm::MakePos()
pPrv = lcl_Prev( this, false );
const sal_uInt16 nMyType = GetType();
- SWRECTFN( ( IsCellFrm() && GetUpper() ? GetUpper() : this ) )
+ SWRECTFN( ( IsCellFrame() && GetUpper() ? GetUpper() : this ) )
if ( !bUseUpper && pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
+ maFrame.Pos( pPrv->Frame().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
bool bR2L = IsRightToLeft();
if( bR2L )
- (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() -
- (maFrm.*fnRect->fnGetWidth)() );
+ (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() -
+ (maFrame.*fnRect->fnGetWidth)() );
else
- (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() +
- (pPrv->Frm().*fnRect->fnGetWidth)() );
+ (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() +
+ (pPrv->Frame().*fnRect->fnGetWidth)() );
// cells may now leave their uppers
if( bVert && FRM_CELL & nMyType && !mbReverse )
- maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + pPrv->Frm().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width());
}
else if( bVert && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
else
{
if ( bVertL2R )
- maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
else
- maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width());
}
}
else
- maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height());
+ maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height());
}
else if ( GetUpper() )
{
- // OD 15.10.2002 #103517# - add safeguard for <SwFooterFrm::Calc()>
+ // OD 15.10.2002 #103517# - add safeguard for <SwFooterFrame::Calc()>
// If parent frame is a footer frame and its <ColLocked()>, then
// do *not* calculate it.
// NOTE: Footer frame is <ColLocked()> during its
@@ -536,79 +536,79 @@ void SwFrm::MakePos()
// #i56850#
// - no format of upper Writer fly frame, which is anchored
// at-paragraph or at-character.
- if ( !GetUpper()->IsTabFrm() &&
- !( IsTabFrm() && GetUpper()->IsInTab() ) &&
- !GetUpper()->IsSctFrm() &&
- !dynamic_cast<SwFlyAtCntFrm*>(GetUpper()) &&
- !( GetUpper()->IsFooterFrm() &&
+ if ( !GetUpper()->IsTabFrame() &&
+ !( IsTabFrame() && GetUpper()->IsInTab() ) &&
+ !GetUpper()->IsSctFrame() &&
+ !dynamic_cast<SwFlyAtContentFrame*>(GetUpper()) &&
+ !( GetUpper()->IsFooterFrame() &&
GetUpper()->IsColLocked() )
)
{
- GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut());
}
pPrv = lcl_Prev( this, false );
if ( !bUseUpper && pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
+ maFrame.Pos( pPrv->Frame().Pos() );
if( FRM_NEIGHBOUR & nMyType )
{
bool bR2L = IsRightToLeft();
if( bR2L )
- (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() -
- (maFrm.*fnRect->fnGetWidth)() );
+ (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() -
+ (maFrame.*fnRect->fnGetWidth)() );
else
- (maFrm.*fnRect->fnSetPosX)( (maFrm.*fnRect->fnGetLeft)() +
- (pPrv->Frm().*fnRect->fnGetWidth)() );
+ (maFrame.*fnRect->fnSetPosX)( (maFrame.*fnRect->fnGetLeft)() +
+ (pPrv->Frame().*fnRect->fnGetWidth)() );
// cells may now leave their uppers
if( bVert && FRM_CELL & nMyType && !mbReverse )
- maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + pPrv->Frm().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + pPrv->Frame().Width());
}
else if( bVert && FRM_NOTE_VERT & nMyType )
{
if( mbReverse )
- maFrm.Pos().setX(maFrm.Pos().getX() + pPrv->Frm().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() + pPrv->Frame().Width());
else
- maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width());
}
else
- maFrm.Pos().setY(maFrm.Pos().getY() + pPrv->Frm().Height());
+ maFrame.Pos().setY(maFrame.Pos().getY() + pPrv->Frame().Height());
}
else
{
- maFrm.Pos( GetUpper()->Frm().Pos() );
- if( GetUpper()->IsFlyFrm() )
- maFrm.Pos() += static_cast<SwFlyFrm*>(GetUpper())->ContentPos();
+ maFrame.Pos( GetUpper()->Frame().Pos() );
+ if( GetUpper()->IsFlyFrame() )
+ maFrame.Pos() += static_cast<SwFlyFrame*>(GetUpper())->ContentPos();
else
- maFrm.Pos() += GetUpper()->Prt().Pos();
+ maFrame.Pos() += GetUpper()->Prt().Pos();
if( FRM_NEIGHBOUR & nMyType && IsRightToLeft() )
{
if( bVert )
- maFrm.Pos().setY(maFrm.Pos().getY() + GetUpper()->Prt().Height()
- - maFrm.Height());
+ maFrame.Pos().setY(maFrame.Pos().getY() + GetUpper()->Prt().Height()
+ - maFrame.Height());
else
- maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width()
- - maFrm.Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width()
+ - maFrame.Width());
}
else if( bVert && !bVertL2R && FRM_NOTE_VERT & nMyType && !mbReverse )
- maFrm.Pos().setX(maFrm.Pos().getX() - maFrm.Width() + GetUpper()->Prt().Width());
+ maFrame.Pos().setX(maFrame.Pos().getX() - maFrame.Width() + GetUpper()->Prt().Width());
}
}
else
{
- maFrm.Pos().setX(0);
- maFrm.Pos().setY(0);
+ maFrame.Pos().setX(0);
+ maFrame.Pos().setY(0);
}
- if( IsBodyFrm() && bVert && !bVertL2R && !mbReverse && GetUpper() )
- maFrm.Pos().setX(maFrm.Pos().getX() + GetUpper()->Prt().Width() - maFrm.Width());
+ if( IsBodyFrame() && bVert && !bVertL2R && !mbReverse && GetUpper() )
+ maFrame.Pos().setX(maFrame.Pos().getX() + GetUpper()->Prt().Width() - maFrame.Width());
mbValidPos = true;
}
}
// #i28701# - new type <SwSortedObjs>
-static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long& rBot )
+static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrame* pFrame, long& rBot )
{
// And then there can be paragraph anchored frames that sit below their paragraph.
long nMax = 0;
@@ -618,16 +618,16 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long
// entries.
SwAnchoredObject* pObj = (*pSortedObjs)[i];
long nTmp = 0;
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
- if( pFly->Frm().Top() != FAR_AWAY &&
- ( pFrm->IsPageFrm() ? pFly->IsFlyLayFrm() :
- ( pFly->IsFlyAtCntFrm() &&
- ( pFrm->IsBodyFrm() ? pFly->GetAnchorFrm()->IsInDocBody() :
- pFly->GetAnchorFrm()->IsInFootnote() ) ) ) )
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj);
+ if( pFly->Frame().Top() != FAR_AWAY &&
+ ( pFrame->IsPageFrame() ? pFly->IsFlyLayFrame() :
+ ( pFly->IsFlyAtContentFrame() &&
+ ( pFrame->IsBodyFrame() ? pFly->GetAnchorFrame()->IsInDocBody() :
+ pFly->GetAnchorFrame()->IsInFootnote() ) ) ) )
{
- nTmp = pFly->Frm().Bottom();
+ nTmp = pFly->Frame().Bottom();
}
}
else
@@ -638,33 +638,33 @@ static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, const SwFrm* pFrm, long
rBot = std::max( rBot, nMax );
}
-size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const
+size_t SwPageFrame::GetContentHeight(const long nTop, const long nBottom) const
{
- OSL_ENSURE(!(FindBodyCont() && FindBodyCont()->Lower() && FindBodyCont()->Lower()->IsColumnFrm()),
- "SwPageFrm::GetContentHeight(): No support for columns.");
+ OSL_ENSURE(!(FindBodyCont() && FindBodyCont()->Lower() && FindBodyCont()->Lower()->IsColumnFrame()),
+ "SwPageFrame::GetContentHeight(): No support for columns.");
// In pages without columns, the content defines the size.
- long nBot = Frm().Top() + nTop;
- const SwFrm *pFrm = Lower();
- while (pFrm)
+ long nBot = Frame().Top() + nTop;
+ const SwFrame *pFrame = Lower();
+ while (pFrame)
{
long nTmp = 0;
- const SwFrm *pCnt = static_cast<const SwLayoutFrm*>(pFrm)->ContainsAny();
- while (pCnt && (pCnt->GetUpper() == pFrm ||
- static_cast<const SwLayoutFrm*>(pFrm)->IsAnLower(pCnt)))
+ const SwFrame *pCnt = static_cast<const SwLayoutFrame*>(pFrame)->ContainsAny();
+ while (pCnt && (pCnt->GetUpper() == pFrame ||
+ static_cast<const SwLayoutFrame*>(pFrame)->IsAnLower(pCnt)))
{
- nTmp += pCnt->Frm().Height();
- if (pCnt->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pCnt)->IsUndersized())
+ nTmp += pCnt->Frame().Height();
+ if (pCnt->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pCnt)->IsUndersized())
{
- // This TextFrm would like to be a bit bigger.
- nTmp += static_cast<const SwTextFrm*>(pCnt)->GetParHeight()
+ // This TextFrame would like to be a bit bigger.
+ nTmp += static_cast<const SwTextFrame*>(pCnt)->GetParHeight()
- pCnt->Prt().Height();
}
- else if (pCnt->IsSctFrm())
+ else if (pCnt->IsSctFrame())
{
// Grow if undersized, but don't shrink if oversized.
- const auto delta = static_cast<const SwSectionFrm*>(pCnt)->CalcUndersize();
+ const auto delta = static_cast<const SwSectionFrame*>(pCnt)->CalcUndersize();
if (delta > 0)
nTmp += delta;
}
@@ -672,45 +672,45 @@ size_t SwPageFrm::GetContentHeight(const long nTop, const long nBottom) const
pCnt = pCnt->FindNext();
}
// OD 29.10.2002 #97265# - consider invalid body frame properties
- if (pFrm->IsBodyFrm() &&
- (!pFrm->GetValidSizeFlag() ||
- !pFrm->GetValidPrtAreaFlag()) &&
- (pFrm->Frm().Height() < pFrm->Prt().Height())
+ if (pFrame->IsBodyFrame() &&
+ (!pFrame->GetValidSizeFlag() ||
+ !pFrame->GetValidPrtAreaFlag()) &&
+ (pFrame->Frame().Height() < pFrame->Prt().Height())
)
{
- nTmp = std::min(nTmp, pFrm->Frm().Height());
+ nTmp = std::min(nTmp, pFrame->Frame().Height());
}
else
{
// OD 30.10.2002 #97265# - assert invalid lower property
- OSL_ENSURE(!(pFrm->Frm().Height() < pFrm->Prt().Height()),
- "SwPageFrm::GetContentHeight(): Lower with frame height < printing height");
- nTmp += pFrm->Frm().Height() - pFrm->Prt().Height();
+ OSL_ENSURE(!(pFrame->Frame().Height() < pFrame->Prt().Height()),
+ "SwPageFrame::GetContentHeight(): Lower with frame height < printing height");
+ nTmp += pFrame->Frame().Height() - pFrame->Prt().Height();
}
- if (!pFrm->IsBodyFrm())
- nTmp = std::min(nTmp, pFrm->Frm().Height());
+ if (!pFrame->IsBodyFrame())
+ nTmp = std::min(nTmp, pFrame->Frame().Height());
nBot += nTmp;
// Here we check whether paragraph anchored objects
// protrude outside the Body/FootnoteCont.
- if (m_pSortedObjs && !pFrm->IsHeaderFrm() &&
- !pFrm->IsFooterFrm())
- lcl_CheckObjects(m_pSortedObjs, pFrm, nBot);
- pFrm = pFrm->GetNext();
+ if (m_pSortedObjs && !pFrame->IsHeaderFrame() &&
+ !pFrame->IsFooterFrame())
+ lcl_CheckObjects(m_pSortedObjs, pFrame, nBot);
+ pFrame = pFrame->GetNext();
}
nBot += nBottom;
// And the page anchored ones
if (m_pSortedObjs)
lcl_CheckObjects(m_pSortedObjs, this, nBot);
- nBot -= Frm().Top();
+ nBot -= Frame().Top();
return nBot;
}
-void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
+void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
- const SwRect aOldRect( Frm() ); // Adjust root size
+ const SwRect aOldRect( Frame() ); // Adjust root size
const SwLayNotify aNotify( this ); // takes care of the notification in the dtor
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;
@@ -726,8 +726,8 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( IsEmptyPage() )
{
- Frm().Width( 0 ); Prt().Width( 0 );
- Frm().Height( 0 ); Prt().Height( 0 );
+ Frame().Width( 0 ); Prt().Width( 0 );
+ Frame().Height( 0 ); Prt().Height( 0 );
Prt().Left( 0 ); Prt().Top( 0 );
mbValidSize = mbValidPrtArea = true;
}
@@ -735,12 +735,12 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
if (!pAccess)
{
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
assert(pAttrs);
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if (pSh && pSh->GetViewOptions()->getBrowseMode())
{
// In BrowseView, we use fixed settings
@@ -748,20 +748,20 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
const long nTop = pAttrs->CalcTopLine() + aBorder.Height();
const long nBottom = pAttrs->CalcBottomLine()+ aBorder.Height();
- long nWidth = GetUpper() ? static_cast<SwRootFrm*>(GetUpper())->GetBrowseWidth() : 0;
+ long nWidth = GetUpper() ? static_cast<SwRootFrame*>(GetUpper())->GetBrowseWidth() : 0;
const auto nDefWidth = pSh->GetBrowseWidth();
if (nWidth < nDefWidth)
nWidth = nDefWidth;
nWidth += + 2 * aBorder.Width();
nWidth = std::max( nWidth, 2L * aBorder.Width() + 4L*MM50 );
- Frm().Width( nWidth );
+ Frame().Width( nWidth );
- SwLayoutFrm *pBody = FindBodyCont();
- if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
+ SwLayoutFrame *pBody = FindBodyCont();
+ if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
// Columns have a fixed height
- Frm().Height( pAttrs->GetSize().Height() );
+ Frame().Height( pAttrs->GetSize().Height() );
}
else
{
@@ -777,21 +777,21 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
}
// #i35143# - Assure, that the page
// doesn't exceed the defined browse height.
- Frm().Height( std::min( nBot, BROWSE_HEIGHT ) );
+ Frame().Height( std::min( nBot, BROWSE_HEIGHT ) );
}
Prt().Left ( pAttrs->CalcLeftLine() + aBorder.Width() );
Prt().Top ( nTop );
- Prt().Width( Frm().Width() - ( Prt().Left()
+ Prt().Width( Frame().Width() - ( Prt().Left()
+ pAttrs->CalcRightLine() + aBorder.Width() ) );
- Prt().Height( Frm().Height() - (nTop + nBottom) );
+ Prt().Height( Frame().Height() - (nTop + nBottom) );
mbValidSize = mbValidPrtArea = true;
continue;
}
else if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden())
{
long height = 0;
- SwLayoutFrm *pBody = FindBodyCont();
- if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
+ SwLayoutFrame *pBody = FindBodyCont();
+ if ( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
// Columns have a fixed height
height = pAttrs->GetSize().Height();
@@ -804,7 +804,7 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
if (height > 0)
{
- ChgSize(Size(Frm().Width(), height));
+ ChgSize(Size(Frame().Width(), height));
Prt().Top(0);
Prt().Height(height);
@@ -820,20 +820,20 @@ void SwPageFrm::MakeAll(vcl::RenderContext* pRenderContext)
// Set FixSize. For pages, this is not done from Upper, but from
// the attribute.
//FIXME: This resets the size when (mbValidSize && !mbValidPrtArea).
- Frm().SSize( pAttrs->GetSize() );
+ Frame().SSize( pAttrs->GetSize() );
Format( pRenderContext, pAttrs );
}
}
} //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
- if ( Frm() != aOldRect && GetUpper() )
- static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
+ if ( Frame() != aOldRect && GetUpper() )
+ static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
- OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrm.Width(),
+ OSL_ENSURE( !GetUpper() || GetUpper()->Prt().Width() >= maFrame.Width(),
"Upper (Root) must be wide enough to contain the widest page");
}
-void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwLayoutFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
PROTOCOL_ENTER( this, PROT_MAKEALL, 0, nullptr )
@@ -841,7 +841,7 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const SwLayNotify aNotify( this );
bool bVert = IsVertical();
- SwRectFn fnRect = ( IsNeighbourFrm() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
+ SwRectFn fnRect = ( IsNeighbourFrame() == bVert )? fnRectHori : ( IsVertLR() ? fnRectVertL2R : fnRectVert );
std::unique_ptr<SwBorderAttrAccess> pAccess;
const SwBorderAttrs*pAttrs = nullptr;
@@ -867,32 +867,32 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
mbValidPrtArea = false;
SwTwips nPrtWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
- if( bVert && ( IsBodyFrm() || IsFootnoteContFrm() ) )
+ if( bVert && ( IsBodyFrame() || IsFootnoteContFrame() ) )
{
- SwFrm* pNxt = GetPrev();
- while( pNxt && !pNxt->IsHeaderFrm() )
+ SwFrame* pNxt = GetPrev();
+ while( pNxt && !pNxt->IsHeaderFrame() )
pNxt = pNxt->GetPrev();
if( pNxt )
- nPrtWidth -= pNxt->Frm().Height();
+ nPrtWidth -= pNxt->Frame().Height();
pNxt = GetNext();
- while( pNxt && !pNxt->IsFooterFrm() )
+ while( pNxt && !pNxt->IsFooterFrame() )
pNxt = pNxt->GetNext();
if( pNxt )
- nPrtWidth -= pNxt->Frm().Height();
+ nPrtWidth -= pNxt->Frame().Height();
}
- const long nDiff = nPrtWidth - (Frm().*fnRect->fnGetWidth)();
+ const long nDiff = nPrtWidth - (Frame().*fnRect->fnGetWidth)();
- if( IsNeighbourFrm() && IsRightToLeft() )
- (Frm().*fnRect->fnSubLeft)( nDiff );
+ if( IsNeighbourFrame() && IsRightToLeft() )
+ (Frame().*fnRect->fnSubLeft)( nDiff );
else
- (Frm().*fnRect->fnAddRight)( nDiff );
+ (Frame().*fnRect->fnAddRight)( nDiff );
}
else
{
// Don't leave your upper
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
- if( (Frm().*fnRect->fnOverStep)( nDeadLine ) )
+ if( (Frame().*fnRect->fnOverStep)( nDeadLine ) )
mbValidSize = false;
}
}
@@ -902,10 +902,10 @@ void SwLayoutFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !pAccess )
{
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
- Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
+ Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
}
} //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
}
@@ -922,7 +922,7 @@ bool SwTextNode::IsCollapse() const
// The paragraph is collapsed only if the NdAfter is the end of a cell
bool bInTable = this->FindTableNode( ) != nullptr;
- SwSortedObjs* pObjs = this->getLayoutFrm( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )->GetDrawObjs( );
+ SwSortedObjs* pObjs = this->getLayoutFrame( GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() )->GetDrawObjs( );
const size_t nObjs = ( pObjs != nullptr ) ? pObjs->size( ) : 0;
return pNdBefore!=nullptr && pNdAfter!=nullptr && nObjs == 0 && bInTable;
@@ -931,17 +931,17 @@ bool SwTextNode::IsCollapse() const
return false;
}
-bool SwFrm::IsCollapse() const
+bool SwFrame::IsCollapse() const
{
- if (!IsTextFrm())
+ if (!IsTextFrame())
return false;
- const SwTextFrm *pTextFrm = static_cast<const SwTextFrm*>(this);
- const SwTextNode *pTextNode = pTextFrm->GetTextNode();
+ const SwTextFrame *pTextFrame = static_cast<const SwTextFrame*>(this);
+ const SwTextNode *pTextNode = pTextFrame->GetTextNode();
return pTextNode && pTextNode->IsCollapse();
}
-bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
+bool SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{
bool bSizeChgd = false;
@@ -950,24 +950,24 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
mbValidPrtArea = true;
SWRECTFN( this )
- const bool bTextFrm = IsTextFrm();
+ const bool bTextFrame = IsTextFrame();
SwTwips nUpper = 0;
- if ( bTextFrm && static_cast<SwTextFrm*>(this)->IsHiddenNow() )
+ if ( bTextFrame && static_cast<SwTextFrame*>(this)->IsHiddenNow() )
{
- if ( static_cast<SwTextFrm*>(this)->HasFollow() )
- static_cast<SwTextFrm*>(this)->JoinFrm();
+ if ( static_cast<SwTextFrame*>(this)->HasFollow() )
+ static_cast<SwTextFrame*>(this)->JoinFrame();
if( (Prt().*fnRect->fnGetHeight)() )
- static_cast<SwTextFrm*>(this)->HideHidden();
+ static_cast<SwTextFrame*>(this)->HideHidden();
Prt().Pos().setX(0);
Prt().Pos().setY(0);
- (Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
+ (Prt().*fnRect->fnSetWidth)( (Frame().*fnRect->fnGetWidth)() );
(Prt().*fnRect->fnSetHeight)( 0 );
- nUpper = -( (Frm().*fnRect->fnGetHeight)() );
+ nUpper = -( (Frame().*fnRect->fnGetHeight)() );
}
else
{
- // Simplification: ContentFrms are always variable in height!
+ // Simplification: ContentFrames are always variable in height!
// At the FixSize, the surrounding Frame enforces the size;
// the borders are simply subtracted.
@@ -975,15 +975,15 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
const long nRight = rAttrs.CalcRight( this );
(this->*fnRect->fnSetXMargins)( nLeft, nRight );
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
SwTwips nWidthArea;
if( pSh && 0!=(nWidthArea=(pSh->VisArea().*fnRect->fnGetWidth)()) &&
- GetUpper()->IsPageBodyFrm() && // but not for BodyFrms in Columns
+ GetUpper()->IsPageBodyFrame() && // but not for BodyFrames in Columns
pSh->GetViewOptions()->getBrowseMode() )
{
// Do not protrude the edge of the visible area. The page may be
// wider, because there may be objects with excess width
- // (RootFrm::ImplCalcBrowseWidth())
+ // (RootFrame::ImplCalcBrowseWidth())
long nMinWidth = 0;
for (size_t i = 0; GetDrawObjs() && i < GetDrawObjs()->size(); ++i)
@@ -992,9 +992,9 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
// <SwSortedObjs> entries
SwAnchoredObject* pObj = (*GetDrawObjs())[i];
const SwFrameFormat& rFormat = pObj->GetFrameFormat();
- const bool bFly = dynamic_cast<const SwFlyFrm*>( pObj) != nullptr;
+ const bool bFly = dynamic_cast<const SwFlyFrame*>( pObj) != nullptr;
if ((bFly && (FAR_AWAY == pObj->GetObjRect().Width()))
- || rFormat.GetFrmSize().GetWidthPercent())
+ || rFormat.GetFrameSize().GetWidthPercent())
{
continue;
}
@@ -1002,7 +1002,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( FLY_AS_CHAR == rFormat.GetAnchor().GetAnchorId() )
{
nMinWidth = std::max( nMinWidth,
- bFly ? rFormat.GetFrmSize().GetWidth()
+ bFly ? rFormat.GetFrameSize().GetWidth()
: pObj->GetObjRect().Width() );
}
}
@@ -1021,8 +1021,8 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
// The PrtArea should already be at least MINLAY wide, matching the
// minimal values of the UI
(Prt().*fnRect->fnSetWidth)( std::min( long(MINLAY),
- (Frm().*fnRect->fnGetWidth)() ) );
- SwTwips nTmp = (Frm().*fnRect->fnGetWidth)() -
+ (Frame().*fnRect->fnGetWidth)() ) );
+ SwTwips nTmp = (Frame().*fnRect->fnGetWidth)() -
(Prt().*fnRect->fnGetWidth)();
if( (Prt().*fnRect->fnGetLeft)() > nTmp )
(Prt().*fnRect->fnSetLeft)( nTmp );
@@ -1037,7 +1037,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
// that are given by UL- and LRSpace. There might be a spacing
// in all directions however; this may be caused by borders
// and / or shadows.
- // 4. The spacing for TextFrms corresponds to the interline lead,
+ // 4. The spacing for TextFrames corresponds to the interline lead,
// at a minimum.
nUpper = CalcUpperSpace( &rAttrs );
@@ -1050,7 +1050,7 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
(Prt().*fnRect->fnSetPosY)( (!bVert || mbReverse) ? nUpper : nLower);
nUpper += nLower;
- nUpper -= (Frm().*fnRect->fnGetHeight)() -
+ nUpper -= (Frame().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetHeight)();
}
// If there's a difference between old and new size, call Grow() or
@@ -1058,9 +1058,9 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
if ( nUpper )
{
if ( nUpper > 0 )
- GrowFrm( nUpper );
+ GrowFrame( nUpper );
else
- ShrinkFrm( -nUpper );
+ ShrinkFrame( -nUpper );
bSizeChgd = true;
}
}
@@ -1071,19 +1071,19 @@ bool SwContentFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
// - loop prevention
const int cnStopFormat = 15;
-inline void ValidateSz( SwFrm *pFrm )
+inline void ValidateSz( SwFrame *pFrame )
{
- if ( pFrm )
+ if ( pFrame )
{
- pFrm->mbValidSize = true;
- pFrm->mbValidPrtArea = true;
+ pFrame->mbValidSize = true;
+ pFrame->mbValidPrtArea = true;
}
}
-void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
OSL_ENSURE( GetUpper(), "no Upper?" );
- OSL_ENSURE( IsTextFrm(), "MakeAll(), NoText" );
+ OSL_ENSURE( IsTextFrame(), "MakeAll(), NoText" );
if ( !IsFollow() && StackHack::IsLocked() )
return;
@@ -1091,13 +1091,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( IsJoinLocked() )
return;
- OSL_ENSURE( !static_cast<SwTextFrm*>(this)->IsSwapped(), "Calculation of a swapped frame" );
+ OSL_ENSURE( !static_cast<SwTextFrame*>(this)->IsSwapped(), "Calculation of a swapped frame" );
StackHack aHack;
- if ( static_cast<SwTextFrm*>(this)->IsLocked() )
+ if ( static_cast<SwTextFrame*>(this)->IsLocked() )
{
- OSL_FAIL( "Format for locked TextFrm." );
+ OSL_FAIL( "Format for locked TextFrame." );
return;
}
@@ -1131,12 +1131,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bool bMakePage = true;
// bMovedBwd gets set to true when the frame flows backwards
bool bMovedBwd = false;
- // as long as bMovedFwd is false, the Frm may flow backwards (until
+ // as long as bMovedFwd is false, the Frame may flow backwards (until
// it has been moved forward once)
bool bMovedFwd = false;
sal_Bool bFormatted = sal_False; // For the widow/orphan rules, we encourage the
- // last ContentFrm of a chain to format. This only
- // needs to happen once. Every time the Frm is
+ // last ContentFrame of a chain to format. This only
+ // needs to happen once. Every time the Frame is
// moved, the flag will have to be reset.
bool bMustFit = false; // Once the emergency brake is pulled,
// no other prepares will be triggered
@@ -1149,10 +1149,10 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const bool bTab = IsInTab();
const bool bFootnote = IsInFootnote();
const bool bSct = IsInSct();
- Point aOldFrmPos; // This is so we can compare with the last pos
+ Point aOldFramePos; // This is so we can compare with the last pos
Point aOldPrtPos; // and determine whether it makes sense to Prepare
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
// OD 2004-02-26 #i25029#
@@ -1166,42 +1166,42 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
SwSaveFootnoteHeight *pSaveFootnote = nullptr;
if ( bFootnote )
{
- SwFootnoteFrm *pFootnote = FindFootnoteFrm();
- SwSectionFrm* pSct = pFootnote->FindSctFrm();
- if ( !static_cast<SwTextFrm*>(pFootnote->GetRef())->IsLocked() )
+ SwFootnoteFrame *pFootnote = FindFootnoteFrame();
+ SwSectionFrame* pSct = pFootnote->FindSctFrame();
+ if ( !static_cast<SwTextFrame*>(pFootnote->GetRef())->IsLocked() )
{
- SwFootnoteBossFrm* pBoss = pFootnote->GetRef()->FindFootnoteBossFrm(
+ SwFootnoteBossFrame* pBoss = pFootnote->GetRef()->FindFootnoteBossFrame(
pFootnote->GetAttr()->GetFootnote().IsEndNote() );
if( !pSct || pSct->IsColLocked() || !pSct->Growable() )
pSaveFootnote = new SwSaveFootnoteHeight( pBoss,
- static_cast<SwTextFrm*>(pFootnote->GetRef())->GetFootnoteLine( pFootnote->GetAttr() ) );
+ static_cast<SwTextFrame*>(pFootnote->GetRef())->GetFootnoteLine( pFootnote->GetAttr() ) );
}
}
- if ( GetUpper()->IsSctFrm() &&
+ if ( GetUpper()->IsSctFrame() &&
HasFollow() &&
- &GetFollow()->GetFrm() == GetNext() )
+ &GetFollow()->GetFrame() == GetNext() )
{
- dynamic_cast<SwTextFrm&>(*this).JoinFrm();
+ dynamic_cast<SwTextFrame&>(*this).JoinFrame();
}
// #i28701# - move master forward, if it has to move,
// because of its object positioning.
- if ( !static_cast<SwTextFrm*>(this)->IsFollow() )
+ if ( !static_cast<SwTextFrame*>(this)->IsFollow() )
{
sal_uInt32 nToPageNum = 0L;
- const bool bMoveFwdByObjPos = SwLayouter::FrmMovedFwdByObjPos(
+ const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos(
*(GetAttrSet()->GetDoc()),
- *(static_cast<SwTextFrm*>(this)),
+ *(static_cast<SwTextFrame*>(this)),
nToPageNum );
// #i58182#
// Also move a paragraph forward, which is the first one inside a table cell.
if ( bMoveFwdByObjPos &&
- FindPageFrm()->GetPhyPageNum() < nToPageNum &&
+ FindPageFrame()->GetPhyPageNum() < nToPageNum &&
( lcl_Prev( this ) ||
- GetUpper()->IsCellFrm() ||
- ( GetUpper()->IsSctFrm() &&
- GetUpper()->GetUpper()->IsCellFrm() ) ) &&
+ GetUpper()->IsCellFrame() ||
+ ( GetUpper()->IsSctFrame() &&
+ GetUpper()->GetUpper()->IsCellFrame() ) ) &&
IsMoveable() )
{
bMovedFwd = true;
@@ -1211,7 +1211,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// If a Follow sits next to it's Master and doesn't fit, we know it can
// be moved right now.
- if ( lcl_Prev( this ) && static_cast<SwTextFrm*>(this)->IsFollow() && IsMoveable() )
+ if ( lcl_Prev( this ) && static_cast<SwTextFrame*>(this)->IsFollow() && IsMoveable() )
{
bMovedFwd = true;
// OD 2004-03-02 #106629# - If follow frame is in table, it's master
@@ -1229,12 +1229,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// reference, it can be moved forward.
if ( bFootnote && !mbValidPos )
{
- SwFootnoteFrm* pFootnote = FindFootnoteFrm();
- SwContentFrm* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr;
+ SwFootnoteFrame* pFootnote = FindFootnoteFrame();
+ SwContentFrame* pRefCnt = pFootnote ? pFootnote->GetRef() : nullptr;
if ( pRefCnt && !pRefCnt->IsValid() )
{
- SwFootnoteBossFrm* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrm();
- SwFootnoteBossFrm* pFootnoteBossOfRef = pRefCnt->FindFootnoteBossFrm();
+ SwFootnoteBossFrame* pFootnoteBossOfFootnote = pFootnote->FindFootnoteBossFrame();
+ SwFootnoteBossFrame* pFootnoteBossOfRef = pRefCnt->FindFootnoteBossFrame();
//<loop of movefwd until condition held or no move>
if ( pFootnoteBossOfFootnote && pFootnoteBossOfRef &&
pFootnoteBossOfFootnote != pFootnoteBossOfRef &&
@@ -1253,11 +1253,11 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea )
{
// - loop prevention
- SwRect aOldFrm_StopFormat( Frm() );
+ SwRect aOldFrame_StopFormat( Frame() );
SwRect aOldPrt_StopFormat( Prt() );
if ( (bMoveable = IsMoveable()) )
{
- SwFrm *pPre = GetIndPrev();
+ SwFrame *pPre = GetIndPrev();
if ( CheckMoveFwd( bMakePage, bKeep, bMovedBwd ) )
{
SWREFRESHFN( this )
@@ -1270,14 +1270,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
GetUpper()->ResetCompletePaint();
// The predecessor was invalidated, so this is obsolete as well now.
OSL_ENSURE( pPre, "missing old Prev" );
- if( !pPre->IsSctFrm() )
+ if( !pPre->IsSctFrame() )
::ValidateSz( pPre );
}
bMoveable = IsMoveable();
}
}
- aOldFrmPos = (Frm().*fnRect->fnGetPos)();
+ aOldFramePos = (Frame().*fnRect->fnGetPos)();
aOldPrtPos = (Prt().*fnRect->fnGetPos)();
if ( !mbValidPos )
@@ -1295,23 +1295,23 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// frame area width changes its width from 0 to something greater
// than 0.
// Note: A text frame can be in such a situation, if the format is
- // triggered by method call <SwCrsrShell::SetCrsr()> after
+ // triggered by method call <SwCursorShell::SetCursor()> after
// loading the document.
- const SwTwips nNewFrmWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
- if ( mbValidPrtArea && nNewFrmWidth > 0 &&
- (Frm().*fnRect->fnGetWidth)() == 0 &&
+ const SwTwips nNewFrameWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
+ if ( mbValidPrtArea && nNewFrameWidth > 0 &&
+ (Frame().*fnRect->fnGetWidth)() == 0 &&
(Prt().*fnRect->fnGetWidth)() == 0 )
{
mbValidPrtArea = false;
}
- (Frm().*fnRect->fnSetWidth)( nNewFrmWidth );
+ (Frame().*fnRect->fnSetWidth)( nNewFrameWidth );
// When a lower of a vertically aligned fly frame changes its size we need to recalculate content pos.
- if( GetUpper() && GetUpper()->IsFlyFrm() &&
+ if( GetUpper() && GetUpper()->IsFlyFrame() &&
GetUpper()->GetFormat()->GetTextVertAdjust().GetValue() != SDRTEXTVERTADJUST_TOP )
{
- static_cast<SwFlyFrm*>(GetUpper())->InvalidateContentPos();
+ static_cast<SwFlyFrame*>(GetUpper())->InvalidateContentPos();
GetUpper()->SetCompletePaint();
}
}
@@ -1319,29 +1319,29 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
const long nOldW = (Prt().*fnRect->fnGetWidth)();
// #i34730# - keep current frame height
- const SwTwips nOldH = (Frm().*fnRect->fnGetHeight)();
+ const SwTwips nOldH = (Frame().*fnRect->fnGetHeight)();
MakePrtArea( rAttrs );
if ( nOldW != (Prt().*fnRect->fnGetWidth)() )
Prepare( PREP_FIXSIZE_CHG );
// #i34730# - check, if frame height has changed.
// If yes, send a PREP_ADJUST_FRM and invalidate the size flag to
// force a format. The format will check in its method
- // <SwTextFrm::CalcPreps()>, if the already formatted lines still
+ // <SwTextFrame::CalcPreps()>, if the already formatted lines still
// fit and if not, performs necessary actions.
// #i40150# - no check, if frame is undersized.
if ( mbValidSize && !IsUndersized() &&
- nOldH != (Frm().*fnRect->fnGetHeight)() )
+ nOldH != (Frame().*fnRect->fnGetHeight)() )
{
// #115759# - no PREP_ADJUST_FRM and size
// invalidation, if height decreases only by the additional
// lower space as last content of a table cell and an existing
// follow containing one line exists.
- const SwTwips nHDiff = nOldH - (Frm().*fnRect->fnGetHeight)();
- const bool bNoPrepAdjustFrm =
+ const SwTwips nHDiff = nOldH - (Frame().*fnRect->fnGetHeight)();
+ const bool bNoPrepAdjustFrame =
nHDiff > 0 && IsInTab() && GetFollow() &&
- ( 1 == static_cast<SwTextFrm*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || (static_cast<SwTextFrm*>(GetFollow())->Frm().*fnRect->fnGetWidth)() < 0 ) &&
+ ( 1 == static_cast<SwTextFrame*>(GetFollow())->GetLineCount( COMPLETE_STRING ) || (static_cast<SwTextFrame*>(GetFollow())->Frame().*fnRect->fnGetWidth)() < 0 ) &&
GetFollow()->CalcAddLowerSpaceAsLastInTableCell() == nHDiff;
- if ( !bNoPrepAdjustFrm )
+ if ( !bNoPrepAdjustFrame )
{
Prepare( PREP_ADJUST_FRM );
mbValidSize = false;
@@ -1349,7 +1349,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
}
- // To make the widow and orphan rules work, we need to notify the ContentFrm.
+ // To make the widow and orphan rules work, we need to notify the ContentFrame.
// Criteria:
// - It needs to be movable (otherwise, splitting doesn't make sense)
// - It needs to overlap with the lower edge of the PrtArea of the Upper
@@ -1358,12 +1358,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bool bWidow = true;
const SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
if ( bMoveable && !bFormatted && ( GetFollow() ||
- ( (Frm().*fnRect->fnOverStep)( nDeadLine ) ) ) )
+ ( (Frame().*fnRect->fnOverStep)( nDeadLine ) ) ) )
{
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = bWidow = false;
}
- if( (Frm().*fnRect->fnGetPos)() != aOldFrmPos ||
+ if( (Frame().*fnRect->fnGetPos)() != aOldFramePos ||
(Prt().*fnRect->fnGetPos)() != aOldPrtPos )
{
// In this Prepare, an _InvalidateSize() might happen.
@@ -1388,12 +1388,12 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// without change occur.
if ( nConsecutiveFormatsWithoutChange <= cnStopFormat )
{
- Format(getRootFrm()->GetCurrShell()->GetOut());
+ Format(getRootFrame()->GetCurrShell()->GetOut());
}
#if OSL_DEBUG_LEVEL > 0
else
{
- OSL_FAIL( "debug assertion: <SwContentFrm::MakeAll()> - format of text frame suppressed by fix b6448963" );
+ OSL_FAIL( "debug assertion: <SwContentFrame::MakeAll()> - format of text frame suppressed by fix b6448963" );
}
#endif
}
@@ -1406,7 +1406,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( !lcl_Prev( this ) &&
!bMovedFwd &&
( bMoveable || ( bFly && !bTab ) ) &&
- ( !bFootnote || !GetUpper()->FindFootnoteFrm()->GetPrev() )
+ ( !bFootnote || !GetUpper()->FindFootnoteFrame()->GetPrev() )
&& MoveBwd( bDummy ) )
{
SWREFRESHFN( this )
@@ -1420,14 +1420,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
bMoveable = IsMoveable();
SWREFRESHFN( this )
}
- Point aOldPos = (Frm().*fnRect->fnGetPos)();
+ Point aOldPos = (Frame().*fnRect->fnGetPos)();
MakePos();
- if( aOldPos != (Frm().*fnRect->fnGetPos)() )
+ if( aOldPos != (Frame().*fnRect->fnGetPos)() )
{
Prepare( PREP_POS_CHGD, static_cast<const void*>(&bFormatted), false );
if ( !mbValidSize )
{
- (Frm().*fnRect->fnSetWidth)( (GetUpper()->
+ (Frame().*fnRect->fnSetWidth)( (GetUpper()->
Prt().*fnRect->fnGetWidth)() );
if ( !mbValidPrtArea )
{
@@ -1440,15 +1440,15 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
Prepare( PREP_WIDOWS_ORPHANS, nullptr, false );
mbValidSize = true;
bFormatted = sal_True;
- Format(getRootFrm()->GetCurrShell()->GetOut());
+ Format(getRootFrame()->GetCurrShell()->GetOut());
}
}
- SwFrm *pNxt = HasFollow() ? nullptr : FindNext();
- while( pNxt && pNxt->IsSctFrm() )
+ SwFrame *pNxt = HasFollow() ? nullptr : FindNext();
+ while( pNxt && pNxt->IsSctFrame() )
{ // Leave empty sections out, go into the other ones.
- if( static_cast<SwSectionFrm*>(pNxt)->GetSection() )
+ if( static_cast<SwSectionFrame*>(pNxt)->GetSection() )
{
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pNxt)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pNxt)->ContainsAny();
if( pTmp )
{
pNxt = pTmp;
@@ -1459,13 +1459,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
if ( pNxt )
{
- pNxt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
if( mbValidPos && !GetIndNext() )
{
- SwSectionFrm *pSct = FindSctFrm();
+ SwSectionFrame *pSct = FindSctFrame();
if( pSct && !pSct->GetValidSizeFlag() )
{
- SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
+ SwSectionFrame* pNxtSct = pNxt->FindSctFrame();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
mbValidPos = false;
}
@@ -1476,7 +1476,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
}
- // In footnotes, the TextFrm may validate itself, which can lead to the
+ // In footnotes, the TextFrame may validate itself, which can lead to the
// situation that it's position is wrong despite being "valid".
if ( mbValidPos )
{
@@ -1493,14 +1493,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
mbValidPos = false;
MakePos();
- aOldFrmPos = (Frm().*fnRect->fnGetPos)();
+ aOldFramePos = (Frame().*fnRect->fnGetPos)();
aOldPrtPos = (Prt().*fnRect->fnGetPos)();
}
}
// - loop prevention
{
- if ( aOldFrm_StopFormat == Frm() &&
+ if ( aOldFrame_StopFormat == Frame() &&
aOldPrt_StopFormat == Prt() )
{
++nConsecutiveFormatsWithoutChange;
@@ -1517,10 +1517,10 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// Done?
// Attention: because height == 0, it's better to use Top()+Height() instead of
- // Bottom(). This might happen with undersized TextFrms on the lower edge of a
+ // Bottom(). This might happen with undersized TextFrames on the lower edge of a
// multi-column section
const long nPrtBottom = (GetUpper()->*fnRect->fnGetPrtBottom)();
- const long nBottomDist = (Frm().*fnRect->fnBottomDist)( nPrtBottom );
+ const long nBottomDist = (Frame().*fnRect->fnBottomDist)( nPrtBottom );
if( nBottomDist >= 0 )
{
if ( bKeep && bMoveable )
@@ -1533,14 +1533,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// bMoveFwdInvalid is required for #38407#. This was originally solved
// in flowfrm.cxx rev 1.38, but broke the above schema and
// preferred to play towers of hanoi (#43669#).
- SwFrm *pNxt = HasFollow() ? nullptr : FindNext();
+ SwFrame *pNxt = HasFollow() ? nullptr : FindNext();
// For sections we prefer the content, because it can change
// the page if required.
- while( pNxt && pNxt->IsSctFrm() )
+ while( pNxt && pNxt->IsSctFrame() )
{
- if( static_cast<SwSectionFrm*>(pNxt)->GetSection() )
+ if( static_cast<SwSectionFrame*>(pNxt)->GetSection() )
{
- pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny();
+ pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny();
break;
}
pNxt = pNxt->FindNext();
@@ -1550,9 +1550,9 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const bool bMoveFwdInvalid = nullptr != GetIndNext();
const bool bNxtNew =
( 0 == (pNxt->Prt().*fnRect->fnGetHeight)() ) &&
- (!pNxt->IsTextFrm() ||!static_cast<SwTextFrm*>(pNxt)->IsHiddenNow());
+ (!pNxt->IsTextFrame() ||!static_cast<SwTextFrame*>(pNxt)->IsHiddenNow());
- pNxt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
if ( !bMovedBwd &&
((bMoveFwdInvalid && !GetIndNext()) ||
@@ -1570,14 +1570,14 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// I don't fit into my parents, so it's time to make changes
// as constructively as possible.
- //If I'm NOT allowed to leave the parent Frm, I've got a problem.
+ //If I'm NOT allowed to leave the parent Frame, I've got a problem.
// Following Arthur Dent, we do the only thing that you can do with
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable || IsUndersized() )
{
if( !bMoveable && IsInTab() )
{
- long nDiff = -(Frm().*fnRect->fnBottomDist)(
+ long nDiff = -(Frame().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
long nReal = GetUpper()->Grow( nDiff );
if( nReal )
@@ -1593,13 +1593,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// as well.
// If I'm unable to split (WouldFit()) and can't be fitted, I'm going
- // to tell my TextFrm part that, if possible, we still need to split despite
+ // to tell my TextFrame part that, if possible, we still need to split despite
// the "don't split" attribute.
bool bMoveOrFit = false;
bool bDontMoveMe = !GetIndPrev();
if( bDontMoveMe && IsInSct() )
{
- SwFootnoteBossFrm* pBoss = FindFootnoteBossFrm();
+ SwFootnoteBossFrame* pBoss = FindFootnoteBossFrame();
bDontMoveMe = !pBoss->IsInSct() ||
( !pBoss->Lower()->GetNext() && !pBoss->GetPrev() );
}
@@ -1610,7 +1610,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
nullptr != GetNextCellLeaf( MAKEPAGE_NONE ) )
bDontMoveMe = false;
- if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() >
+ if ( bDontMoveMe && (Frame().*fnRect->fnGetHeight)() >
(GetUpper()->Prt().*fnRect->fnGetHeight)() )
{
if ( !bFitPromise )
@@ -1626,7 +1626,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
continue;
}
/*
- * In earlier days, we never tried to fit TextFrms in
+ * In earlier days, we never tried to fit TextFrames in
* frames and sections using bMoveOrFit by ignoring
* its attributes (Widows, Keep).
* This should have been done at least for column frames;
@@ -1635,38 +1635,38 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
* the attributes.
*/
else if ( !bFootnote && bMoveable &&
- ( !bFly || !FindFlyFrm()->IsColLocked() ) &&
- ( !bSct || !FindSctFrm()->IsColLocked() ) )
+ ( !bFly || !FindFlyFrame()->IsColLocked() ) &&
+ ( !bSct || !FindSctFrame()->IsColLocked() ) )
bMoveOrFit = true;
}
#if OSL_DEBUG_LEVEL > 0
else
{
- OSL_FAIL( "+TextFrm didn't respect WouldFit promise." );
+ OSL_FAIL( "+TextFrame didn't respect WouldFit promise." );
}
#endif
}
// Let's see if I can find some space somewhere...
// footnotes in the neighbourhood are moved into _MoveFootnoteCntFwd
- SwFrm *pPre = GetIndPrev();
- SwFrm *pOldUp = GetUpper();
+ SwFrame *pPre = GetIndPrev();
+ SwFrame *pOldUp = GetUpper();
/* MA 13. Oct. 98: What is this supposed to be!?
- * AMA 14. Dec 98: If a column section can't find any space for its first ContentFrm, it should be
+ * AMA 14. Dec 98: If a column section can't find any space for its first ContentFrame, it should be
* moved not only to the next column, but probably even to the next page, creating
* a section-follow there.
*/
- if( IsInSct() && bMovedFwd && bMakePage && pOldUp->IsColBodyFrm() &&
- pOldUp->GetUpper()->GetUpper()->IsSctFrm() &&
+ if( IsInSct() && bMovedFwd && bMakePage && pOldUp->IsColBodyFrame() &&
+ pOldUp->GetUpper()->GetUpper()->IsSctFrame() &&
( pPre || pOldUp->GetUpper()->GetPrev() ) &&
- static_cast<SwSectionFrm*>(pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) )
+ static_cast<SwSectionFrame*>(pOldUp->GetUpper()->GetUpper())->MoveAllowed(this) )
{
bMovedFwd = false;
}
- const bool bCheckForGrownBody = pOldUp->IsBodyFrm();
- const long nOldBodyHeight = (pOldUp->Frm().*fnRect->fnGetHeight)();
+ const bool bCheckForGrownBody = pOldUp->IsBodyFrame();
+ const long nOldBodyHeight = (pOldUp->Frame().*fnRect->fnGetHeight)();
if ( !bMovedFwd && !MoveFwd( bMakePage, false ) )
bMakePage = false;
@@ -1679,7 +1679,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// If pOldUp was a footnote frame, it has been deleted inside MoveFwd.
// Therefore we only check for growing body frames.
if ( bCheckForGrownBody && ! bMovedBwd && pOldUp != GetUpper() &&
- (pOldUp->Frm().*fnRect->fnGetHeight)() > nOldBodyHeight )
+ (pOldUp->Frame().*fnRect->fnGetHeight)() > nOldBodyHeight )
{
bMovedFwd = false;
}
@@ -1701,13 +1701,13 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
#if OSL_DEBUG_LEVEL > 0
- OSL_FAIL( "LoopControl in SwContentFrm::MakeAll" );
+ OSL_FAIL( "LoopControl in SwContentFrame::MakeAll" );
#endif
}
if ( bMovedBwd && GetUpper() )
{ // Retire invalidations that have become useless.
GetUpper()->ResetCompletePaint();
- if( pPre && !pPre->IsSctFrm() )
+ if( pPre && !pPre->IsSctFrame() )
::ValidateSz( pPre );
}
@@ -1718,7 +1718,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
LOOPING_LOUIE_LIGHT( bMovedFwd && bMovedBwd && !IsInBalancedSection() &&
(
- ( bFootnote && !FindFootnoteFrm()->GetRef()->IsInSct() ) ||
+ ( bFootnote && !FindFootnoteFrame()->GetRef()->IsInSct() ) ||
// #i33887#
( IsInSct() && bKeep )
@@ -1726,7 +1726,7 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// ... add your conditions here ...
),
- static_cast<SwTextFrm&>(*this) );
+ static_cast<SwTextFrame&>(*this) );
delete pSaveFootnote;
@@ -1744,92 +1744,92 @@ void SwContentFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
SetFlyLock( false );
}
-void MakeNxt( SwFrm *pFrm, SwFrm *pNxt )
+void MakeNxt( SwFrame *pFrame, SwFrame *pNxt )
{
// fix(25455): Validate, otherwise this leads to a recursion.
- // The first try, cancelling with pFrm = 0 if !Valid, leads to a problem, as
+ // The first try, cancelling with pFrame = 0 if !Valid, leads to a problem, as
// the Keep may not be considered properly anymore (27417).
- const bool bOldPos = pFrm->GetValidPosFlag();
- const bool bOldSz = pFrm->GetValidSizeFlag();
- const bool bOldPrt = pFrm->GetValidPrtAreaFlag();
- pFrm->mbValidPos = pFrm->mbValidPrtArea = pFrm->mbValidSize = true;
+ const bool bOldPos = pFrame->GetValidPosFlag();
+ const bool bOldSz = pFrame->GetValidSizeFlag();
+ const bool bOldPrt = pFrame->GetValidPrtAreaFlag();
+ pFrame->mbValidPos = pFrame->mbValidPrtArea = pFrame->mbValidSize = true;
- // fix(29272): Don't call MakeAll - there, pFrm might be invalidated again, and
+ // fix(29272): Don't call MakeAll - there, pFrame might be invalidated again, and
// we recursively end up in here again.
- if ( pNxt->IsContentFrm() )
+ if ( pNxt->IsContentFrame() )
{
- SwContentNotify aNotify( static_cast<SwContentFrm*>(pNxt) );
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNxt );
+ SwContentNotify aNotify( static_cast<SwContentFrame*>(pNxt) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( !pNxt->GetValidSizeFlag() )
{
if( pNxt->IsVertical() )
- pNxt->Frm().Height( pNxt->GetUpper()->Prt().Height() );
+ pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() );
else
- pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() );
+ pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() );
}
- static_cast<SwContentFrm*>(pNxt)->MakePrtArea( rAttrs );
- pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
+ static_cast<SwContentFrame*>(pNxt)->MakePrtArea( rAttrs );
+ pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
}
else
{
- SwLayNotify aNotify( static_cast<SwLayoutFrm*>(pNxt) );
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNxt );
+ SwLayNotify aNotify( static_cast<SwLayoutFrame*>(pNxt) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNxt );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( !pNxt->GetValidSizeFlag() )
{
if( pNxt->IsVertical() )
- pNxt->Frm().Height( pNxt->GetUpper()->Prt().Height() );
+ pNxt->Frame().Height( pNxt->GetUpper()->Prt().Height() );
else
- pNxt->Frm().Width( pNxt->GetUpper()->Prt().Width() );
+ pNxt->Frame().Width( pNxt->GetUpper()->Prt().Width() );
}
- pNxt->Format( pNxt->getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
+ pNxt->Format( pNxt->getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
}
- pFrm->mbValidPos = bOldPos;
- pFrm->mbValidSize = bOldSz;
- pFrm->mbValidPrtArea = bOldPrt;
+ pFrame->mbValidPos = bOldPos;
+ pFrame->mbValidSize = bOldSz;
+ pFrame->mbValidPrtArea = bOldPrt;
}
/// This routine checks whether there are no other FootnoteBosses
-/// between the pFrm's FootnoteBoss and the pNxt's FootnoteBoss.
-static bool lcl_IsNextFootnoteBoss( const SwFrm *pFrm, const SwFrm* pNxt )
+/// between the pFrame's FootnoteBoss and the pNxt's FootnoteBoss.
+static bool lcl_IsNextFootnoteBoss( const SwFrame *pFrame, const SwFrame* pNxt )
{
- assert(pFrm && pNxt && "lcl_IsNextFootnoteBoss: No Frames?");
- pFrm = pFrm->FindFootnoteBossFrm();
- pNxt = pNxt->FindFootnoteBossFrm();
- // If pFrm is a last column, we use the page instead.
- while( pFrm && pFrm->IsColumnFrm() && !pFrm->GetNext() )
- pFrm = pFrm->GetUpper()->FindFootnoteBossFrm();
+ assert(pFrame && pNxt && "lcl_IsNextFootnoteBoss: No Frames?");
+ pFrame = pFrame->FindFootnoteBossFrame();
+ pNxt = pNxt->FindFootnoteBossFrame();
+ // If pFrame is a last column, we use the page instead.
+ while( pFrame && pFrame->IsColumnFrame() && !pFrame->GetNext() )
+ pFrame = pFrame->GetUpper()->FindFootnoteBossFrame();
// If pNxt is a first column, we use the page instead.
- while( pNxt && pNxt->IsColumnFrm() && !pNxt->GetPrev() )
- pNxt = pNxt->GetUpper()->FindFootnoteBossFrm();
- // So.. now pFrm and pNxt are either two adjacent pages or columns.
- return pFrm && pNxt && pFrm->GetNext() == pNxt;
+ while( pNxt && pNxt->IsColumnFrame() && !pNxt->GetPrev() )
+ pNxt = pNxt->GetUpper()->FindFootnoteBossFrame();
+ // So.. now pFrame and pNxt are either two adjacent pages or columns.
+ return pFrame && pNxt && pFrame->GetNext() == pNxt;
}
-bool SwContentFrm::_WouldFit( SwTwips nSpace,
- SwLayoutFrm *pNewUpper,
+bool SwContentFrame::_WouldFit( SwTwips nSpace,
+ SwLayoutFrame *pNewUpper,
bool bTstMove,
const bool bObjsInNewUpper )
{
// To have the footnote select it's place carefully, it needs
// to be moved in any case if there is at least one page/column
// between the footnote and the new Upper.
- SwFootnoteFrm* pFootnoteFrm = nullptr;
+ SwFootnoteFrame* pFootnoteFrame = nullptr;
if ( IsInFootnote() )
{
if( !lcl_IsNextFootnoteBoss( pNewUpper, this ) )
return true;
- pFootnoteFrm = FindFootnoteFrm();
+ pFootnoteFrame = FindFootnoteFrame();
}
bool bRet;
bool bSplit = !pNewUpper->Lower();
- SwContentFrm *pFrm = this;
- const SwFrm *pTmpPrev = pNewUpper->Lower();
- if( pTmpPrev && pTmpPrev->IsFootnoteFrm() )
- pTmpPrev = static_cast<const SwFootnoteFrm*>(pTmpPrev)->Lower();
+ SwContentFrame *pFrame = this;
+ const SwFrame *pTmpPrev = pNewUpper->Lower();
+ if( pTmpPrev && pTmpPrev->IsFootnoteFrame() )
+ pTmpPrev = static_cast<const SwFootnoteFrame*>(pTmpPrev)->Lower();
while ( pTmpPrev && pTmpPrev->GetNext() )
pTmpPrev = pTmpPrev->GetNext();
do
@@ -1840,50 +1840,50 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
bool bOldSplit = bSplit;
if ( bTstMove || IsInFly() || ( IsInSct() &&
- ( pFrm->GetUpper()->IsColBodyFrm() || ( pFootnoteFrm &&
- pFootnoteFrm->GetUpper()->GetUpper()->IsColumnFrm() ) ) ) )
+ ( pFrame->GetUpper()->IsColBodyFrame() || ( pFootnoteFrame &&
+ pFootnoteFrame->GetUpper()->GetUpper()->IsColumnFrame() ) ) ) )
{
// This is going to get a bit insidious now. If you're faint of heart,
// you'd better look away here. If a Fly contains columns, then the Contents
- // are movable, except ones in the last column (see SwFrm::IsMoveable()).
+ // are movable, except ones in the last column (see SwFrame::IsMoveable()).
// Of course they're allowed to float back. WouldFit() only returns a usable
- // value if the Frm is movable. To fool WouldFit() into believing there's
- // a movable Frm, I'm just going to hang it somewhere else for the time.
- // The same procedure applies for column sections to make SwSectionFrm::Growable()
+ // value if the Frame is movable. To fool WouldFit() into believing there's
+ // a movable Frame, I'm just going to hang it somewhere else for the time.
+ // The same procedure applies for column sections to make SwSectionFrame::Growable()
// return the proper value.
- // Within footnotes, we may even need to put the SwFootnoteFrm somewhere else, if
- // there's no SwFootnoteFrm there.
- SwFrm* pTmpFrm = pFrm->IsInFootnote() && !pNewUpper->FindFootnoteFrm() ?
- static_cast<SwFrm*>(pFrm->FindFootnoteFrm()) : pFrm;
- SwLayoutFrm *pUp = pTmpFrm->GetUpper();
- SwFrm *pOldNext = pTmpFrm->GetNext();
- pTmpFrm->RemoveFromLayout();
- pTmpFrm->InsertBefore( pNewUpper, nullptr );
- if ( pFrm->IsTextFrm() &&
+ // Within footnotes, we may even need to put the SwFootnoteFrame somewhere else, if
+ // there's no SwFootnoteFrame there.
+ SwFrame* pTmpFrame = pFrame->IsInFootnote() && !pNewUpper->FindFootnoteFrame() ?
+ static_cast<SwFrame*>(pFrame->FindFootnoteFrame()) : pFrame;
+ SwLayoutFrame *pUp = pTmpFrame->GetUpper();
+ SwFrame *pOldNext = pTmpFrame->GetNext();
+ pTmpFrame->RemoveFromLayout();
+ pTmpFrame->InsertBefore( pNewUpper, nullptr );
+ if ( pFrame->IsTextFrame() &&
( bTstMove ||
- static_cast<SwTextFrm*>(pFrm)->HasFollow() ||
- ( !static_cast<SwTextFrm*>(pFrm)->HasPara() &&
- !static_cast<SwTextFrm*>(pFrm)->IsEmpty()
+ static_cast<SwTextFrame*>(pFrame)->HasFollow() ||
+ ( !static_cast<SwTextFrame*>(pFrame)->HasPara() &&
+ !static_cast<SwTextFrame*>(pFrame)->IsEmpty()
)
)
)
{
bTstMove = true;
- bRet = static_cast<SwTextFrm*>(pFrm)->TestFormat( pTmpPrev, nSpace, bSplit );
+ bRet = static_cast<SwTextFrame*>(pFrame)->TestFormat( pTmpPrev, nSpace, bSplit );
}
else
- bRet = pFrm->WouldFit( nSpace, bSplit, false );
+ bRet = pFrame->WouldFit( nSpace, bSplit, false );
- pTmpFrm->RemoveFromLayout();
- pTmpFrm->InsertBefore( pUp, pOldNext );
+ pTmpFrame->RemoveFromLayout();
+ pTmpFrame->InsertBefore( pUp, pOldNext );
}
else
{
- bRet = pFrm->WouldFit( nSpace, bSplit, false );
+ bRet = pFrame->WouldFit( nSpace, bSplit, false );
nSecondCheck = !bSplit ? 1 : 0;
}
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
// Sad but true: We need to consider the spacing in our calculation.
@@ -1899,23 +1899,23 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
// in balanced columned section frames we do not want the
// common border
bool bCommonBorder = true;
- if ( pFrm->IsInSct() && pFrm->GetUpper()->IsColBodyFrm() )
+ if ( pFrame->IsInSct() && pFrame->GetUpper()->IsColBodyFrame() )
{
- const SwSectionFrm* pSct = pFrm->FindSctFrm();
+ const SwSectionFrame* pSct = pFrame->FindSctFrame();
bCommonBorder = pSct->GetFormat()->GetBalancedColumns().GetValue();
}
// #i46181#
nSecondCheck = ( 1 == nSecondCheck &&
- pFrm == this &&
- IsTextFrm() &&
+ pFrame == this &&
+ IsTextFrame() &&
bCommonBorder &&
- !static_cast<const SwTextFrm*>(this)->IsEmpty() ) ?
+ !static_cast<const SwTextFrame*>(this)->IsEmpty() ) ?
nUpper :
0;
nUpper += bCommonBorder ?
- rAttrs.GetBottomLine( *(pFrm) ) :
+ rAttrs.GetBottomLine( *(pFrame) ) :
rAttrs.CalcBottomLine();
}
@@ -1924,10 +1924,10 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
// #i46181#
nSecondCheck = 0;
- if( pFrm->IsVertical() )
- nUpper = pFrm->Frm().Width() - pFrm->Prt().Width();
+ if( pFrame->IsVertical() )
+ nUpper = pFrame->Frame().Width() - pFrame->Prt().Width();
else
- nUpper = pFrm->Frm().Height() - pFrm->Prt().Height();
+ nUpper = pFrame->Frame().Height() - pFrame->Prt().Height();
}
nSpace -= nUpper;
@@ -1941,14 +1941,14 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
{
// The following code is intended to solve a (rare) problem
// causing some frames not to move backward:
- // SwTextFrm::WouldFit() claims that the whole paragraph
+ // SwTextFrame::WouldFit() claims that the whole paragraph
// fits into the given space and subtracts the height of
// all lines from nSpace. nSpace - nUpper is not a valid
// indicator if the frame should be allowed to move backward.
// We do a second check with the original remaining space
// reduced by the required upper space:
nOldSpace -= nSecondCheck;
- const bool bSecondRet = nOldSpace >= 0 && pFrm->WouldFit( nOldSpace, bOldSplit, false );
+ const bool bSecondRet = nOldSpace >= 0 && pFrame->WouldFit( nOldSpace, bOldSplit, false );
if ( bSecondRet && bOldSplit && nOldSpace >= 0 )
{
bRet = true;
@@ -1969,27 +1969,27 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
}
}
- if ( bRet && !bSplit && pFrm->IsKeep( rAttrs.GetAttrSet() ) )
+ if ( bRet && !bSplit && pFrame->IsKeep( rAttrs.GetAttrSet() ) )
{
if( bTstMove )
{
- while( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->HasFollow() )
+ while( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->HasFollow() )
{
- pFrm = static_cast<SwTextFrm*>(pFrm)->GetFollow();
+ pFrame = static_cast<SwTextFrame*>(pFrame)->GetFollow();
}
// OD 11.04.2003 #108824# - If last follow frame of <this> text
// frame isn't valid, a formatting of the next content frame
// doesn't makes sense. Thus, return true.
- if ( IsAnFollow( pFrm ) && !pFrm->IsValid() )
+ if ( IsAnFollow( pFrame ) && !pFrame->IsValid() )
{
- OSL_FAIL( "Only a warning for task 108824:/n<SwContentFrm::_WouldFit(..) - follow not valid!" );
+ OSL_FAIL( "Only a warning for task 108824:/n<SwContentFrame::_WouldFit(..) - follow not valid!" );
return true;
}
}
- SwFrm *pNxt;
- if( nullptr != (pNxt = pFrm->FindNext()) && pNxt->IsContentFrm() &&
- ( !pFootnoteFrm || ( pNxt->IsInFootnote() &&
- pNxt->FindFootnoteFrm()->GetAttr() == pFootnoteFrm->GetAttr() ) ) )
+ SwFrame *pNxt;
+ if( nullptr != (pNxt = pFrame->FindNext()) && pNxt->IsContentFrame() &&
+ ( !pFootnoteFrame || ( pNxt->IsInFootnote() &&
+ pNxt->FindFootnoteFrame()->GetAttr() == pFootnoteFrame->GetAttr() ) ) )
{
// TestFormat(?) does not like paragraph- or character anchored objects.
@@ -2002,7 +2002,7 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
}
if ( !pNxt->IsValid() )
- MakeNxt( pFrm, pNxt );
+ MakeNxt( pFrame, pNxt );
// Little trick: if the next has a predecessor, then the paragraph
// spacing has been calculated already, and we don't need to re-calculate
@@ -2011,20 +2011,20 @@ bool SwContentFrm::_WouldFit( SwTwips nSpace,
pTmpPrev = nullptr;
else
{
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsHiddenNow() )
- pTmpPrev = lcl_NotHiddenPrev( pFrm );
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow() )
+ pTmpPrev = lcl_NotHiddenPrev( pFrame );
else
- pTmpPrev = pFrm;
+ pTmpPrev = pFrame;
}
- pFrm = static_cast<SwContentFrm*>(pNxt);
+ pFrame = static_cast<SwContentFrame*>(pNxt);
}
else
- pFrm = nullptr;
+ pFrame = nullptr;
}
else
- pFrm = nullptr;
+ pFrame = nullptr;
- } while ( bRet && pFrm );
+ } while ( bRet && pFrame );
return bRet;
}
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 9c5b9796c18f..a583a1abeae6 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -32,16 +32,16 @@
#include <IDocumentState.hxx>
#include <IDocumentLayoutAccess.hxx>
-SwColumnFrm::SwColumnFrm( SwFrameFormat *pFormat, SwFrm* pSib ):
- SwFootnoteBossFrm( pFormat, pSib )
+SwColumnFrame::SwColumnFrame( SwFrameFormat *pFormat, SwFrame* pSib ):
+ SwFootnoteBossFrame( pFormat, pSib )
{
- mnFrmType = FRM_COLUMN;
- SwBodyFrm* pColBody = new SwBodyFrm( pFormat->GetDoc()->GetDfltFrameFormat(), pSib );
- pColBody->InsertBehind( this, nullptr ); // ColumnFrms now with BodyFrm
+ mnFrameType = FRM_COLUMN;
+ SwBodyFrame* pColBody = new SwBodyFrame( pFormat->GetDoc()->GetDfltFrameFormat(), pSib );
+ pColBody->InsertBehind( this, nullptr ); // ColumnFrames now with BodyFrame
SetMaxFootnoteHeight( LONG_MAX );
}
-void SwColumnFrm::DestroyImpl()
+void SwColumnFrame::DestroyImpl()
{
SwFrameFormat *pFormat = GetFormat();
SwDoc *pDoc;
@@ -53,53 +53,53 @@ void SwColumnFrm::DestroyImpl()
pDoc->DelFrameFormat( pFormat );
}
- SwFootnoteBossFrm::DestroyImpl();
+ SwFootnoteBossFrame::DestroyImpl();
}
-SwColumnFrm::~SwColumnFrm()
+SwColumnFrame::~SwColumnFrame()
{
}
-static void lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt )
+static void lcl_RemoveColumns( SwLayoutFrame *pCont, sal_uInt16 nCnt )
{
- OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrame(),
"no columns to remove." );
- SwColumnFrm *pColumn = static_cast<SwColumnFrm*>(pCont->Lower());
+ SwColumnFrame *pColumn = static_cast<SwColumnFrame*>(pCont->Lower());
sw_RemoveFootnotes( pColumn, true, true );
while ( pColumn->GetNext() )
{
- OSL_ENSURE( pColumn->GetNext()->IsColumnFrm(),
+ OSL_ENSURE( pColumn->GetNext()->IsColumnFrame(),
"neighbor of ColumnFrame is no ColumnFrame." );
- pColumn = static_cast<SwColumnFrm*>(pColumn->GetNext());
+ pColumn = static_cast<SwColumnFrame*>(pColumn->GetNext());
}
for ( sal_uInt16 i = 0; i < nCnt; ++i )
{
- SwColumnFrm *pTmp = static_cast<SwColumnFrm*>(pColumn->GetPrev());
+ SwColumnFrame *pTmp = static_cast<SwColumnFrame*>(pColumn->GetPrev());
pColumn->Cut();
- SwFrm::DestroyFrm(pColumn); //format is going to be destroyed in the DTor if needed.
+ SwFrame::DestroyFrame(pColumn); //format is going to be destroyed in the DTor if needed.
pColumn = pTmp;
}
}
-static SwLayoutFrm * lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount )
+static SwLayoutFrame * lcl_FindColumns( SwLayoutFrame *pLay, sal_uInt16 nCount )
{
- SwFrm *pCol = pLay->Lower();
- if ( pLay->IsPageFrm() )
- pCol = static_cast<SwPageFrm*>(pLay)->FindBodyCont()->Lower();
+ SwFrame *pCol = pLay->Lower();
+ if ( pLay->IsPageFrame() )
+ pCol = static_cast<SwPageFrame*>(pLay)->FindBodyCont()->Lower();
- if ( pCol && pCol->IsColumnFrm() )
+ if ( pCol && pCol->IsColumnFrame() )
{
- SwFrm *pTmp = pCol;
+ SwFrame *pTmp = pCol;
sal_uInt16 i;
for ( i = 0; pTmp; pTmp = pTmp->GetNext(), ++i )
/* do nothing */;
- return i == nCount ? static_cast<SwLayoutFrm*>(pCol) : nullptr;
+ return i == nCount ? static_cast<SwLayoutFrame*>(pCol) : nullptr;
}
return nullptr;
}
-static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
+static bool lcl_AddColumns( SwLayoutFrame *pCont, sal_uInt16 nCount )
{
SwDoc *pDoc = pCont->GetFormat()->GetDoc();
const bool bMod = pDoc->getIDocumentState().IsModified();
@@ -108,16 +108,16 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
//the same column settings we can add them to the same format.
//The neighbour can be searched using the format, however the owner of the
//attribute depends on the frame type.
- SwLayoutFrm *pAttrOwner = pCont;
- if ( pCont->IsBodyFrm() )
- pAttrOwner = pCont->FindPageFrm();
- SwLayoutFrm *pNeighbourCol = nullptr;
- SwIterator<SwLayoutFrm,SwFormat> aIter( *pAttrOwner->GetFormat() );
- SwLayoutFrm *pNeighbour = aIter.First();
+ SwLayoutFrame *pAttrOwner = pCont;
+ if ( pCont->IsBodyFrame() )
+ pAttrOwner = pCont->FindPageFrame();
+ SwLayoutFrame *pNeighbourCol = nullptr;
+ SwIterator<SwLayoutFrame,SwFormat> aIter( *pAttrOwner->GetFormat() );
+ SwLayoutFrame *pNeighbour = aIter.First();
sal_uInt16 nAdd = 0;
- SwFrm *pCol = pCont->Lower();
- if ( pCol && pCol->IsColumnFrm() )
+ SwFrame *pCol = pCont->Lower();
+ if ( pCol && pCol->IsColumnFrame() )
for ( nAdd = 1; pCol; pCol = pCol->GetNext(), ++nAdd )
/* do nothing */;
while ( pNeighbour )
@@ -130,23 +130,23 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
}
bool bRet;
- SwTwips nMax = pCont->IsPageBodyFrm() ?
- pCont->FindPageFrm()->GetMaxFootnoteHeight() : LONG_MAX;
+ SwTwips nMax = pCont->IsPageBodyFrame() ?
+ pCont->FindPageFrame()->GetMaxFootnoteHeight() : LONG_MAX;
if ( pNeighbourCol )
{
bRet = false;
- SwFrm *pTmp = pCont->Lower();
+ SwFrame *pTmp = pCont->Lower();
while ( pTmp )
{
pTmp = pTmp->GetNext();
- pNeighbourCol = static_cast<SwLayoutFrm*>(pNeighbourCol->GetNext());
+ pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext());
}
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
- SwColumnFrm *pTmpCol = new SwColumnFrm( pNeighbourCol->GetFormat(), pCont );
+ SwColumnFrame *pTmpCol = new SwColumnFrame( pNeighbourCol->GetFormat(), pCont );
pTmpCol->SetMaxFootnoteHeight( nMax );
pTmpCol->InsertBefore( pCont, nullptr );
- pNeighbourCol = static_cast<SwLayoutFrm*>(pNeighbourCol->GetNext());
+ pNeighbourCol = static_cast<SwLayoutFrame*>(pNeighbourCol->GetNext());
}
}
else
@@ -155,7 +155,7 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
for ( sal_uInt16 i = 0; i < nCount; ++i )
{
SwFrameFormat *pFormat = pDoc->MakeFrameFormat( aEmptyOUStr, pDoc->GetDfltFrameFormat());
- SwColumnFrm *pTmp = new SwColumnFrm( pFormat, pCont );
+ SwColumnFrame *pTmp = new SwColumnFrame( pFormat, pCont );
pTmp->SetMaxFootnoteHeight( nMax );
pTmp->Paste( pCont );
}
@@ -176,23 +176,23 @@ static bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount )
* @param rNew
* @param bChgFootnote if true, the columnframe will be inserted or removed, if necessary.
*/
-void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
+void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
const bool bChgFootnote )
{
if ( rOld.GetNumCols() <= 1 && rNew.GetNumCols() <= 1 && !bChgFootnote )
return;
// #i97379#
// If current lower is a no text frame, then columns are not allowed
- if ( Lower() && Lower()->IsNoTextFrm() &&
+ if ( Lower() && Lower()->IsNoTextFrame() &&
rNew.GetNumCols() > 1 )
{
return;
}
sal_uInt16 nNewNum, nOldNum = 1;
- if( Lower() && Lower()->IsColumnFrm() )
+ if( Lower() && Lower()->IsColumnFrame() )
{
- SwFrm* pCol = Lower();
+ SwFrame* pCol = Lower();
while( nullptr != (pCol=pCol->GetNext()) )
++nOldNum;
}
@@ -200,8 +200,8 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
if( !nNewNum )
++nNewNum;
bool bAtEnd;
- if( IsSctFrm() )
- bAtEnd = static_cast<SwSectionFrm*>(this)->IsAnyNoteAtEnd();
+ if( IsSctFrame() )
+ bAtEnd = static_cast<SwSectionFrame*>(this)->IsAnyNoteAtEnd();
else
bAtEnd = false;
@@ -209,22 +209,22 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
bool bAdjustAttributes = nOldNum != rOld.GetNumCols();
//The content is saved and restored if the column count is different.
- SwFrm *pSave = nullptr;
+ SwFrame *pSave = nullptr;
if( nOldNum != nNewNum || bChgFootnote )
{
SwDoc *pDoc = GetFormat()->GetDoc();
OSL_ENSURE( pDoc, "FrameFormat doesn't return a document." );
// SaveContent would also suck up the content of the footnote container
// and store it within the normal text flow.
- if( IsPageBodyFrm() )
- pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->RemoveFootnotes( static_cast<SwPageFrm*>(GetUpper()) );
+ if( IsPageBodyFrame() )
+ pDoc->getIDocumentLayoutAccess().GetCurrentLayout()->RemoveFootnotes( static_cast<SwPageFrame*>(GetUpper()) );
pSave = ::SaveContent( this );
//If columns exist, they get deleted if a column count of 0 or 1 is requested.
if ( nNewNum == 1 && !bAtEnd )
{
::lcl_RemoveColumns( this, nOldNum );
- if ( IsBodyFrm() )
+ if ( IsBodyFrame() )
SetFrameFormat( pDoc->GetDfltFrameFormat() );
else
GetFormat()->SetFormatAttr( SwFormatFillOrder() );
@@ -234,11 +234,11 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
}
if ( nOldNum == 1 )
{
- if ( IsBodyFrm() )
+ if ( IsBodyFrame() )
SetFrameFormat( pDoc->GetColumnContFormat() );
else
GetFormat()->SetFormatAttr( SwFormatFillOrder( ATT_LEFT_TO_RIGHT ) );
- if( !Lower() || !Lower()->IsColumnFrm() )
+ if( !Lower() || !Lower()->IsColumnFrame() )
--nOldNum;
}
if ( nOldNum > nNewNum )
@@ -278,15 +278,15 @@ void SwLayoutFrm::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew,
//actions during setup.
if ( pSave )
{
- OSL_ENSURE( Lower() && Lower()->IsLayoutFrm() &&
- static_cast<SwLayoutFrm*>(Lower())->Lower() &&
- static_cast<SwLayoutFrm*>(Lower())->Lower()->IsLayoutFrm(),
- "no column body." ); // ColumnFrms contain BodyFrms
- ::RestoreContent( pSave, static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()), nullptr, true );
+ OSL_ENSURE( Lower() && Lower()->IsLayoutFrame() &&
+ static_cast<SwLayoutFrame*>(Lower())->Lower() &&
+ static_cast<SwLayoutFrame*>(Lower())->Lower()->IsLayoutFrame(),
+ "no column body." ); // ColumnFrames contain BodyFrames
+ ::RestoreContent( pSave, static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(Lower())->Lower()), nullptr, true );
}
}
-void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttributes )
+void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttributes )
{
if( !Lower()->GetNext() )
{
@@ -306,10 +306,10 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute
if ( !bAdjustAttributes )
{
long nAvail = (Prt().*fnRect->fnGetWidth)();
- for ( SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(Lower());
+ for ( SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower());
pCol;
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext()) )
- nAvail -= (pCol->Frm().*fnRect->fnGetWidth)();
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext()) )
+ nAvail -= (pCol->Frame().*fnRect->fnGetWidth)();
if ( !nAvail )
return;
}
@@ -322,7 +322,7 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute
const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 2) ) : 0;
const bool bR2L = IsRightToLeft();
- SwFrm *pCol = bR2L ? GetLastLower() : Lower();
+ SwFrame *pCol = bR2L ? GetLastLower() : Lower();
// #i27399#
// bOrtho means we have to adjust the column frames manually. Otherwise
@@ -344,12 +344,12 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute
pCol->ChgSize( aColSz );
- // With this, the ColumnBodyFrms from page columns gets adjusted and
+ // With this, the ColumnBodyFrames from page columns gets adjusted and
// their bFixHeight flag is set so they won't shrink/grow.
- // Don't use the flag with frame columns because BodyFrms in frame
+ // Don't use the flag with frame columns because BodyFrames in frame
// columns can grow/shrink.
- if( IsBodyFrm() )
- static_cast<SwLayoutFrm*>(pCol)->Lower()->ChgSize( aColSz );
+ if( IsBodyFrame() )
+ static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz );
nAvail -= nWidth;
}
@@ -393,8 +393,8 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute
aUL.SetUpper( pC->GetUpper());
aUL.SetLower( pC->GetLower());
- static_cast<SwLayoutFrm*>(pCol)->GetFormat()->SetFormatAttr( aLR );
- static_cast<SwLayoutFrm*>(pCol)->GetFormat()->SetFormatAttr( aUL );
+ static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aLR );
+ static_cast<SwLayoutFrame*>(pCol)->GetFormat()->SetFormatAttr( aUL );
}
nGutter += aLR.GetLeft() + aLR.GetRight();
@@ -426,8 +426,8 @@ void SwLayoutFrm::AdjustColumns( const SwFormatCol *pAttr, bool bAdjustAttribute
pCol->ChgSize( aColSz );
- if( IsBodyFrm() )
- static_cast<SwLayoutFrm*>(pCol)->Lower()->ChgSize( aColSz );
+ if( IsBodyFrame() )
+ static_cast<SwLayoutFrame*>(pCol)->Lower()->ChgSize( aColSz );
nAvail -= nWidth;
}
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 07b64636aeb2..80182070235d 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -27,7 +27,7 @@
* be used. PROTOCOL_ENTER(...) additionally logs the leaving of a method.
*
* The PROTOCOL macros accept the following parameters:
- * 1. A pointer to an SwFrm (usually "this" or "rThis")
+ * 1. A pointer to an SwFrame (usually "this" or "rThis")
* 2. The function group i.e. PROT_MAKEALL. This is used to decide (inline)
* whether this event shall be logged at the current time.
* 3. The action, usually 0. For example ACT_START indents output in the log
@@ -39,13 +39,13 @@
* a pointer to the value which defines how much to grow.
*
* The log file is called "dbg_lay.out", which is saved in the current (BIN-)
- * directory. The file contains lines with FrmId, function group and additional
+ * directory. The file contains lines with FrameId, function group and additional
* information.
*
* What exactly is going to be logged, can be defined as follows:
* 1. The static variable SwProtocol::nRecord contains the function groups
* which shall be logged.
- * A value of i.e. PROT_GROW causes calls to SwFrm::Grow to be
+ * A value of i.e. PROT_GROW causes calls to SwFrame::Grow to be
* logged; PROT_MAKEALL logs the calls to xxx::MakeAll.
* The PROT_XY values can be combined using binary OR, the default value
* is null - no method calls are logged.
@@ -54,7 +54,7 @@
* The member nTypes can be set to values like FRM_PAGE or FRM_SECTION and
* may be combined using binary OR. The default values is 0xFFFF - meaning
* all frame types.
- * 3. The SwImplProtocol class contains an ArrayPointer to FrmIds which need to be
+ * 3. The SwImplProtocol class contains an ArrayPointer to FrameIds which need to be
* tracked. If the pointer is null, all frames will be logged; otherwise
* only frames of linked from the array will be logged.
*
@@ -62,12 +62,12 @@
* in SwProtocol::Init() or change the debugger. There are several possible
* places in the debugger:
* 1. Set a breakpoint in SwProtocol::Init() and manipulate nRecord there, set
- * FrmIds accordingly then start logging during program start.
+ * FrameIds accordingly then start logging during program start.
* 2. Set a breakpoint before any PROTOCOL or PROTOCOL_ENTER macro during
* program execution, then set the lowest bit (PROT_INIT) of
* SwProtocol::nRecord. This activates the function group of the following
* macro and causes it to be logged in the future.
- * 3. There's a special case for 2: If one uses 2. in SwRootFrm::Paint(..),
+ * 3. There's a special case for 2: If one uses 2. in SwRootFrame::Paint(..),
* the log settings are taken from the file "dbg_lay.ini"!
* In this INI-file you can have comment lines starting with a '#'.
* The sections "[frmid]", "[frmtype]" and "[record]" are relevant.
@@ -76,7 +76,7 @@
* In the [frmtype] section, the frame types which should be logged are
* listed; default is USHRT_MAX which means that all types are logged.
* It's possible to remove types from the list using '!' in front of a
- * value. The value !0xC000 would for example exclude SwContentFrms from
+ * value. The value !0xC000 would for example exclude SwContentFrames from
* logging.
* In the [record] section the functions group which should be logged are
* listed; default is 0 which means that none are logged. It's also
@@ -85,14 +85,14 @@
* #Functions: all, except PRTARE
* [record] 0xFFFFFFFE !0x200
* [frmid]
- * #the following FrmIds:
+ * #the following FrameIds:
* 1 2 12 13 14 15
- * #no layout frames, except ColumnFrms
+ * #no layout frames, except ColumnFrames
* [frmtype] !0x3FFF 0x4
*
* As soon as the logging is in process, one can manipulate many things in
* SwImplProtocol::_Record(...) using a debugger, especially concerning
- * frame types and FrmIds.
+ * frame types and FrameIds.
*/
#include "dbg_lay.hxx"
@@ -106,41 +106,41 @@
sal_uLong SwProtocol::nRecord = 0;
SwImplProtocol* SwProtocol::pImpl = nullptr;
-static sal_uLong lcl_GetFrameId( const SwFrm* pFrm )
+static sal_uLong lcl_GetFrameId( const SwFrame* pFrame )
{
#if OSL_DEBUG_LEVEL > 1
static bool bFrameId = false;
if( bFrameId )
- return pFrm->GetFrmId();
+ return pFrame->GetFrameId();
#endif
- if( pFrm && pFrm->IsTextFrm() )
- return static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetIndex();
+ if( pFrame && pFrame->IsTextFrame() )
+ return static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetIndex();
return 0;
}
class SwImplProtocol
{
SvFileStream *pStream; // output stream
- std::set<sal_uInt16> *pFrmIds; // which FrmIds shall be logged ( NULL == all)
+ std::set<sal_uInt16> *pFrameIds; // which FrameIds shall be logged ( NULL == all)
std::vector<long> aVars; // variables
OStringBuffer aLayer; // indentation of output (" " per start/end)
sal_uInt16 nTypes; // which types shall be logged
sal_uInt16 nLineCount; // printed lines
sal_uInt16 nMaxLines; // max lines to be printed
- sal_uInt8 nInitFile; // range (FrmId,FrmType,Record) during reading of the INI file
+ sal_uInt8 nInitFile; // range (FrameId,FrameType,Record) during reading of the INI file
sal_uInt8 nTestMode; // special for test formatting, logging may only be done in test formatting.
- void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam );
+ void _Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam );
bool NewStream();
void CheckLine( OString& rLine );
- static void SectFunc( OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam );
+ static void SectFunc( OStringBuffer& rOut, const SwFrame* pFrame, sal_uLong nAct, void* pParam );
public:
SwImplProtocol();
~SwImplProtocol();
// logging
- void Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
- { if( pStream ) _Record( pFrm, nFunction, nAct, pParam ); }
- bool InsertFrm( sal_uInt16 nFrmId ); // take FrmId for logging
- bool DeleteFrm( sal_uInt16 nFrmId ); // remove FrmId; don't log him anymore
+ void Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+ { if( pStream ) _Record( pFrame, nFunction, nAct, pParam ); }
+ bool InsertFrame( sal_uInt16 nFrameId ); // take FrameId for logging
+ bool DeleteFrame( sal_uInt16 nFrameId ); // remove FrameId; don't log him anymore
void FileInit(); // read the INI file
void ChkStream() { if( !pStream ) NewStream(); }
};
@@ -159,12 +159,12 @@ public:
class SwImplEnterLeave
{
protected:
- const SwFrm* pFrm; // the frame
+ const SwFrame* pFrame; // the frame
sal_uLong nFunction, nAction; // the function, the action if needed
void* pParam; // further parameter
public:
- SwImplEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
- : pFrm( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
+ SwImplEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ : pFrame( pF ), nFunction( nFunct ), nAction( nAct ), pParam( pPar ) {}
virtual ~SwImplEnterLeave() {}
virtual void Enter(); // message when entering
virtual void Leave(); // message when leaving
@@ -172,37 +172,37 @@ public:
class SwSizeEnterLeave : public SwImplEnterLeave
{
- long nFrmHeight;
+ long nFrameHeight;
public:
- SwSizeEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
- : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmHeight( pF->Frm().Height() ) {}
+ SwSizeEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->Frame().Height() ) {}
virtual ~SwSizeEnterLeave() {}
virtual void Leave() override; // resize message
};
class SwUpperEnterLeave : public SwImplEnterLeave
{
- sal_uInt16 nFrmId;
+ sal_uInt16 nFrameId;
public:
- SwUpperEnterLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
- : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrmId( 0 ) {}
+ SwUpperEnterLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameId( 0 ) {}
virtual ~SwUpperEnterLeave() {}
virtual void Enter() override; // message
- virtual void Leave() override; // message of FrmId from upper
+ virtual void Leave() override; // message of FrameId from upper
};
-class SwFrmChangesLeave : public SwImplEnterLeave
+class SwFrameChangesLeave : public SwImplEnterLeave
{
- SwRect aFrm;
+ SwRect aFrame;
public:
- SwFrmChangesLeave( const SwFrm* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
- : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrm( pF->Frm() ) {}
- virtual ~SwFrmChangesLeave() {}
+ SwFrameChangesLeave( const SwFrame* pF, sal_uLong nFunct, sal_uLong nAct, void* pPar )
+ : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->Frame() ) {}
+ virtual ~SwFrameChangesLeave() {}
virtual void Enter() override; // no message
- virtual void Leave() override; // message when resizing the Frm area
+ virtual void Leave() override; // message when resizing the Frame area
};
-void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+void SwProtocol::Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
if( Start() )
{ // We reach this point if SwProtocol::nRecord is binary OR'd with PROT_INIT(0x1) using the debugger
@@ -220,12 +220,12 @@ void SwProtocol::Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct,
}
if( !pImpl ) // Create Impl object if needed
pImpl = new SwImplProtocol();
- pImpl->Record( pFrm, nFunction, nAct, pParam ); // ...and start logging
+ pImpl->Record( pFrame, nFunction, nAct, pParam ); // ...and start logging
}
// The following function gets called when pulling in the writer DLL through
// TextInit(..) and gives the possibility to release functions
-// and/or FrmIds to the debugger
+// and/or FrameIds to the debugger
void SwProtocol::Init()
{
@@ -255,7 +255,7 @@ void SwProtocol::Stop()
}
SwImplProtocol::SwImplProtocol()
- : pStream( nullptr ), pFrmIds( nullptr ), nTypes( 0xffff ),
+ : pStream( nullptr ), pFrameIds( nullptr ), nTypes( 0xffff ),
nLineCount( 0 ), nMaxLines( USHRT_MAX ), nTestMode( 0 )
{
NewStream();
@@ -281,8 +281,8 @@ SwImplProtocol::~SwImplProtocol()
pStream->Close();
delete pStream;
}
- pFrmIds->clear();
- delete pFrmIds;
+ pFrameIds->clear();
+ delete pFrameIds;
aVars.clear();
}
@@ -293,15 +293,15 @@ void SwImplProtocol::CheckLine( OString& rLine )
rLine = rLine.replace( '\t', ' ' );
if( '#' == rLine[0] ) // comments start with '#'
return;
- if( '[' == rLine[0] ) // section: FrmIds, type or funciton
+ if( '[' == rLine[0] ) // section: FrameIds, type or funciton
{
OString aTmp = rLine.getToken(0, ']');
- if (aTmp == "[frmid") // section FrmIds
+ if (aTmp == "[frmid") // section FrameIds
{
nInitFile = 1;
- pFrmIds->clear();
- delete pFrmIds;
- pFrmIds = nullptr; // default: log all frames
+ pFrameIds->clear();
+ delete pFrameIds;
+ pFrameIds = nullptr; // default: log all frames
}
else if (aTmp == "[frmtype")// section types
{
@@ -349,7 +349,7 @@ void SwImplProtocol::CheckLine( OString& rLine )
sscanf( aTok.getStr(), "%li", &nVal );
switch ( nInitFile )
{
- case 1: InsertFrm( sal_uInt16( nVal ) ); // add FrmId
+ case 1: InsertFrame( sal_uInt16( nVal ) ); // add FrameId
break;
case 2: {
sal_uInt16 nNew = (sal_uInt16)nVal;
@@ -436,57 +436,57 @@ static void lcl_Start(OStringBuffer& rOut, OStringBuffer& rLay, sal_uLong nActio
/// output the ValidSize-, ValidPos- and ValidPrtArea-Flag ("Sz","Ps","PA")
/// of the frame; "+" stands for valid, "-" stands for invalid.
-static void lcl_Flags(OStringBuffer& rOut, const SwFrm* pFrm)
+static void lcl_Flags(OStringBuffer& rOut, const SwFrame* pFrame)
{
rOut.append(" Sz");
- rOut.append(pFrm->GetValidSizeFlag() ? '+' : '-');
+ rOut.append(pFrame->GetValidSizeFlag() ? '+' : '-');
rOut.append(" Ps");
- rOut.append(pFrm->GetValidPosFlag() ? '+' : '-');
+ rOut.append(pFrame->GetValidPosFlag() ? '+' : '-');
rOut.append(" PA");
- rOut.append(pFrm->GetValidPrtAreaFlag() ? '+' : '-');
+ rOut.append(pFrame->GetValidPrtAreaFlag() ? '+' : '-');
}
/// output the type of the frame as plain text.
-static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm )
+static void lcl_FrameType( OStringBuffer& rOut, const SwFrame* pFrame )
{
- if( pFrm->IsTextFrm() )
+ if( pFrame->IsTextFrame() )
rOut.append("Text ");
- else if( pFrm->IsLayoutFrm() )
+ else if( pFrame->IsLayoutFrame() )
{
- if( pFrm->IsPageFrm() )
+ if( pFrame->IsPageFrame() )
rOut.append("Page ");
- else if( pFrm->IsColumnFrm() )
+ else if( pFrame->IsColumnFrame() )
rOut.append("Col ");
- else if( pFrm->IsBodyFrm() )
+ else if( pFrame->IsBodyFrame() )
{
- if( pFrm->GetUpper() && pFrm->IsColBodyFrm() )
+ if( pFrame->GetUpper() && pFrame->IsColBodyFrame() )
rOut.append("(Col)");
rOut.append("Body ");
}
- else if( pFrm->IsRootFrm() )
+ else if( pFrame->IsRootFrame() )
rOut.append("Root ");
- else if( pFrm->IsCellFrm() )
+ else if( pFrame->IsCellFrame() )
rOut.append("Cell ");
- else if( pFrm->IsTabFrm() )
+ else if( pFrame->IsTabFrame() )
rOut.append("Tab ");
- else if( pFrm->IsRowFrm() )
+ else if( pFrame->IsRowFrame() )
rOut.append("Row ");
- else if( pFrm->IsSctFrm() )
+ else if( pFrame->IsSctFrame() )
rOut.append("Sect ");
- else if( pFrm->IsHeaderFrm() )
+ else if( pFrame->IsHeaderFrame() )
rOut.append("Header ");
- else if( pFrm->IsFooterFrm() )
+ else if( pFrame->IsFooterFrame() )
rOut.append("Footer ");
- else if( pFrm->IsFootnoteFrm() )
+ else if( pFrame->IsFootnoteFrame() )
rOut.append("Footnote ");
- else if( pFrm->IsFootnoteContFrm() )
+ else if( pFrame->IsFootnoteContFrame() )
rOut.append("FootnoteCont ");
- else if( pFrm->IsFlyFrm() )
+ else if( pFrame->IsFlyFrame() )
rOut.append("Fly ");
else
rOut.append("Layout ");
}
- else if( pFrm->IsNoTextFrm() )
+ else if( pFrame->IsNoTextFrame() )
rOut.append("NoText ");
else
rOut.append("Not impl. ");
@@ -496,19 +496,19 @@ static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm )
* Is only called if the PROTOCOL macro finds out,
* that this function should be recorded ( @see{SwProtocol::nRecord} ).
*
- * In this method we also check if FrmId and frame type should be logged.
+ * In this method we also check if FrameId and frame type should be logged.
*/
-void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam )
+void SwImplProtocol::_Record( const SwFrame* pFrame, sal_uLong nFunction, sal_uLong nAct, void* pParam )
{
sal_uInt16 nSpecial = 0;
if( nSpecial ) // the possible debugger manipulations
{
- sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrm ));
+ sal_uInt16 nId = sal_uInt16(lcl_GetFrameId( pFrame ));
switch ( nSpecial )
{
- case 1: InsertFrm( nId ); break;
- case 2: DeleteFrm( nId ); break;
- case 3: pFrmIds->clear(); delete pFrmIds; pFrmIds = nullptr; break;
+ case 1: InsertFrame( nId ); break;
+ case 2: DeleteFrame( nId ); break;
+ case 3: pFrameIds->clear(); delete pFrameIds; pFrameIds = nullptr; break;
case 4: delete pStream; pStream = nullptr; break;
}
return;
@@ -516,27 +516,27 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
if( !pStream && !NewStream() )
return; // still no stream
- if( pFrmIds && !pFrmIds->count( sal_uInt16(lcl_GetFrameId( pFrm )) ) )
- return; // doesn't belong to the wished FrmIds
+ if( pFrameIds && !pFrameIds->count( sal_uInt16(lcl_GetFrameId( pFrame )) ) )
+ return; // doesn't belong to the wished FrameIds
- if( !(pFrm->GetType() & nTypes) )
+ if( !(pFrame->GetType() & nTypes) )
return; // the type is unwanted
if( 1 == nTestMode && nFunction != PROT_TESTFORMAT )
return; // we may only log inside a test formatting
bool bTmp = false;
OStringBuffer aOut(aLayer);
- aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(pFrm)));
+ aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(pFrame)));
aOut.append(' ');
- lcl_FrameType( aOut, pFrm ); // then the frame type
+ lcl_FrameType( aOut, pFrame ); // then the frame type
switch ( nFunction ) // and the function
{
- case PROT_SNAPSHOT: lcl_Flags( aOut, pFrm );
+ case PROT_SNAPSHOT: lcl_Flags( aOut, pFrame );
break;
case PROT_MAKEALL: aOut.append("MakeAll");
lcl_Start( aOut, aLayer, nAct );
if( nAct == ACT_START )
- lcl_Flags( aOut, pFrm );
+ lcl_Flags( aOut, pFrame );
break;
case PROT_MOVE_FWD: bTmp = true; // NoBreak
case PROT_MOVE_BWD:
@@ -585,7 +585,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
case PROT_SIZE: aOut.append("Size");
lcl_Start( aOut, aLayer, nAct );
aOut.append(' ');
- aOut.append(static_cast<sal_Int64>(pFrm->Frm().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height()));
break;
case PROT_LEAF: aOut.append("Prev/NextLeaf");
lcl_Start( aOut, aLayer, nAct );
@@ -593,13 +593,13 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
if( pParam )
{
aOut.append(' ');
- aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam))));
+ aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
}
break;
case PROT_FILE_INIT: FileInit();
aOut.append("Initialize");
break;
- case PROT_SECTION: SectFunc(aOut, pFrm, nAct, pParam);
+ case PROT_SECTION: SectFunc(aOut, pFrame, nAct, pParam);
break;
case PROT_CUT: bTmp = true; // NoBreak
case PROT_PASTE:
@@ -607,7 +607,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
aOut.append("Cut from ");
else
aOut.append("Paste to ");
- aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam))));
+ aOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
break;
case PROT_TESTFORMAT:
aOut.append("Test");
@@ -619,33 +619,33 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
break;
case PROT_FRMCHANGES:
{
- SwRect& rFrm = *static_cast<SwRect*>(pParam);
- if( pFrm->Frm().Pos() != rFrm.Pos() )
+ SwRect& rFrame = *static_cast<SwRect*>(pParam);
+ if( pFrame->Frame().Pos() != rFrame.Pos() )
{
aOut.append("PosChg: (");
- aOut.append(static_cast<sal_Int64>(rFrm.Left()));
+ aOut.append(static_cast<sal_Int64>(rFrame.Left()));
aOut.append(", ");
- aOut.append(static_cast<sal_Int64>(rFrm.Top()));
+ aOut.append(static_cast<sal_Int64>(rFrame.Top()));
aOut.append(") (");
- aOut.append(static_cast<sal_Int64>(pFrm->Frm().Left()));
+ aOut.append(static_cast<sal_Int64>(pFrame->Frame().Left()));
aOut.append(", ");
- aOut.append(static_cast<sal_Int64>(pFrm->Frm().Top()));
+ aOut.append(static_cast<sal_Int64>(pFrame->Frame().Top()));
aOut.append(") ");
}
- if( pFrm->Frm().Height() != rFrm.Height() )
+ if( pFrame->Frame().Height() != rFrame.Height() )
{
aOut.append("Height: ");
- aOut.append(static_cast<sal_Int64>(rFrm.Height()));
+ aOut.append(static_cast<sal_Int64>(rFrame.Height()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrm->Frm().Height()));
+ aOut.append(static_cast<sal_Int64>(pFrame->Frame().Height()));
aOut.append(" ");
}
- if( pFrm->Frm().Width() != rFrm.Width() )
+ if( pFrame->Frame().Width() != rFrame.Width() )
{
aOut.append("Width: ");
- aOut.append(static_cast<sal_Int64>(rFrm.Width()));
+ aOut.append(static_cast<sal_Int64>(rFrame.Width()));
aOut.append(" -> ");
- aOut.append(static_cast<sal_Int64>(pFrm->Frm().Width()));
+ aOut.append(static_cast<sal_Int64>(pFrame->Frame().Width()));
aOut.append(' ');
}
break;
@@ -658,14 +658,14 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong
SwProtocol::SetRecord( 0 ); // => end f logging
}
-/// Handle the output of the SectionFrms.
-void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct, void* pParam)
+/// Handle the output of the SectionFrames.
+void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrame* , sal_uLong nAct, void* pParam)
{
bool bTmp = false;
switch( nAct )
{
case ACT_MERGE: rOut.append("Merge Section ");
- rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam))));
+ rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
break;
case ACT_CREATE_MASTER: bTmp = true; // NoBreak
case ACT_CREATE_FOLLOW: rOut.append("Create Section ");
@@ -673,7 +673,7 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct
rOut.append("Master to ");
else
rOut.append("Follow from ");
- rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam))));
+ rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
break;
case ACT_DEL_MASTER: bTmp = true; // NoBreak
case ACT_DEL_FOLLOW: rOut.append("Delete Section ");
@@ -681,34 +681,34 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct
rOut.append("Master to ");
else
rOut.append("Follow from ");
- rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrm*>(pParam))));
+ rOut.append(static_cast<sal_Int64>(lcl_GetFrameId(static_cast<SwFrame*>(pParam))));
break;
}
}
/**
- * if pFrmIds==NULL all Frames will be logged. But as soon as pFrmIds are
- * set, only the added FrmIds are being logged.
+ * if pFrameIds==NULL all Frames will be logged. But as soon as pFrameIds are
+ * set, only the added FrameIds are being logged.
*
- * @param nId new FrmId for logging
- * @return TRUE if newly added, FALSE if FrmId is already under control
+ * @param nId new FrameId for logging
+ * @return TRUE if newly added, FALSE if FrameId is already under control
*/
-bool SwImplProtocol::InsertFrm( sal_uInt16 nId )
+bool SwImplProtocol::InsertFrame( sal_uInt16 nId )
{
- if( !pFrmIds )
- pFrmIds = new std::set<sal_uInt16>;
- if( pFrmIds->count( nId ) )
+ if( !pFrameIds )
+ pFrameIds = new std::set<sal_uInt16>;
+ if( pFrameIds->count( nId ) )
return false;
- pFrmIds->insert( nId );
+ pFrameIds->insert( nId );
return true;
}
-/// Removes a FrmId from the pFrmIds array, so that it won't be logged anymore.
-bool SwImplProtocol::DeleteFrm( sal_uInt16 nId )
+/// Removes a FrameId from the pFrameIds array, so that it won't be logged anymore.
+bool SwImplProtocol::DeleteFrame( sal_uInt16 nId )
{
- if( !pFrmIds )
+ if( !pFrameIds )
return false;
- if ( pFrmIds->erase(nId) )
+ if ( pFrameIds->erase(nId) )
return true;
return false;
}
@@ -718,17 +718,17 @@ bool SwImplProtocol::DeleteFrm( sal_uInt16 nId )
* The task here is to find the right SwImplEnterLeave object based on the
* function; everything else is then done in his Ctor/Dtor.
*/
-void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar )
+void SwEnterLeave::Ctor( const SwFrame* pFrame, sal_uLong nFunc, sal_uLong nAct, void* pPar )
{
switch( nFunc )
{
case PROT_ADJUSTN :
case PROT_GROW:
- case PROT_SHRINK : pImpl = new SwSizeEnterLeave( pFrm, nFunc, nAct, pPar ); break;
+ case PROT_SHRINK : pImpl = new SwSizeEnterLeave( pFrame, nFunc, nAct, pPar ); break;
case PROT_MOVE_FWD:
- case PROT_MOVE_BWD : pImpl = new SwUpperEnterLeave( pFrm, nFunc, nAct, pPar ); break;
- case PROT_FRMCHANGES : pImpl = new SwFrmChangesLeave( pFrm, nFunc, nAct, pPar ); break;
- default: pImpl = new SwImplEnterLeave( pFrm, nFunc, nAct, pPar ); break;
+ case PROT_MOVE_BWD : pImpl = new SwUpperEnterLeave( pFrame, nFunc, nAct, pPar ); break;
+ case PROT_FRMCHANGES : pImpl = new SwFrameChangesLeave( pFrame, nFunc, nAct, pPar ); break;
+ default: pImpl = new SwImplEnterLeave( pFrame, nFunc, nAct, pPar ); break;
}
pImpl->Enter();
}
@@ -748,40 +748,40 @@ void SwEnterLeave::Dtor()
void SwImplEnterLeave::Enter()
{
- SwProtocol::Record( pFrm, nFunction, ACT_START, pParam );
+ SwProtocol::Record( pFrame, nFunction, ACT_START, pParam );
}
void SwImplEnterLeave::Leave()
{
- SwProtocol::Record( pFrm, nFunction, ACT_END, pParam );
+ SwProtocol::Record( pFrame, nFunction, ACT_END, pParam );
}
void SwSizeEnterLeave::Leave()
{
- nFrmHeight = pFrm->Frm().Height() - nFrmHeight;
- SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmHeight );
+ nFrameHeight = pFrame->Frame().Height() - nFrameHeight;
+ SwProtocol::Record( pFrame, nFunction, ACT_END, &nFrameHeight );
}
void SwUpperEnterLeave::Enter()
{
- nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
- SwProtocol::Record( pFrm, nFunction, ACT_START, &nFrmId );
+ nFrameId = pFrame->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrame->GetUpper() )) : 0;
+ SwProtocol::Record( pFrame, nFunction, ACT_START, &nFrameId );
}
void SwUpperEnterLeave::Leave()
{
- nFrmId = pFrm->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrm->GetUpper() )) : 0;
- SwProtocol::Record( pFrm, nFunction, ACT_END, &nFrmId );
+ nFrameId = pFrame->GetUpper() ? sal_uInt16(lcl_GetFrameId( pFrame->GetUpper() )) : 0;
+ SwProtocol::Record( pFrame, nFunction, ACT_END, &nFrameId );
}
-void SwFrmChangesLeave::Enter()
+void SwFrameChangesLeave::Enter()
{
}
-void SwFrmChangesLeave::Leave()
+void SwFrameChangesLeave::Leave()
{
- if( pFrm->Frm() != aFrm )
- SwProtocol::Record( pFrm, PROT_FRMCHANGES, 0, &aFrm );
+ if( pFrame->Frame() != aFrame )
+ SwProtocol::Record( pFrame, PROT_FRMCHANGES, 0, &aFrame );
}
#endif // DBG_UTIL
diff --git a/sw/source/core/layout/dumpfilter.cxx b/sw/source/core/layout/dumpfilter.cxx
index 9ec20ba597b1..36d28c7d4403 100644
--- a/sw/source/core/layout/dumpfilter.cxx
+++ b/sw/source/core/layout/dumpfilter.cxx
@@ -87,12 +87,12 @@ namespace sw
utl::MediaDescriptor::PROP_OUTPUTSTREAM(),
uno::Reference< io::XOutputStream >() );
- // Actually get the SwRootFrm to call dumpAsXml
+ // Actually get the SwRootFrame to call dumpAsXml
uno::Reference< lang::XUnoTunnel > xDocTunnel( m_xSrcDoc, uno::UNO_QUERY );
SwXTextDocument* pXDoc = UnoTunnelGetImplementation< SwXTextDocument >( xDocTunnel );
if ( pXDoc )
{
- SwRootFrm* pLayout = pXDoc->GetDocShell()->GetWrtShell()->GetLayout();
+ SwRootFrame* pLayout = pXDoc->GetDocShell()->GetWrtShell()->GetLayout();
// Get sure that the whole layout is processed: set a visible area
// even though there isn't any need of it
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index 5376296e9801..38dd5a78c7ff 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -33,20 +33,20 @@
#include <calbck.hxx>
#include <viewopt.hxx>
-/// Searches the first ContentFrm in BodyText below the page.
-SwLayoutFrm *SwFootnoteBossFrm::FindBodyCont()
+/// Searches the first ContentFrame in BodyText below the page.
+SwLayoutFrame *SwFootnoteBossFrame::FindBodyCont()
{
- SwFrm *pLay = Lower();
- while ( pLay && !pLay->IsBodyFrm() )
+ SwFrame *pLay = Lower();
+ while ( pLay && !pLay->IsBodyFrame() )
pLay = pLay->GetNext();
- return static_cast<SwLayoutFrm*>(pLay);
+ return static_cast<SwLayoutFrame*>(pLay);
}
-/// Searches the last ContentFrm in BodyText below the page.
-SwContentFrm *SwPageFrm::FindLastBodyContent()
+/// Searches the last ContentFrame in BodyText below the page.
+SwContentFrame *SwPageFrame::FindLastBodyContent()
{
- SwContentFrm *pRet = FindFirstBodyContent();
- SwContentFrm *pNxt = pRet;
+ SwContentFrame *pRet = FindFirstBodyContent();
+ SwContentFrame *pNxt = pRet;
while ( pNxt && pNxt->IsInDocBody() && IsAnLower( pNxt ) )
{ pRet = pNxt;
pNxt = pNxt->FindNextCnt();
@@ -55,42 +55,42 @@ SwContentFrm *SwPageFrm::FindLastBodyContent()
}
/**
- * Checks if the frame contains one or more ContentFrm's anywhere in his
- * subsidiary structure; if so the first found ContentFrm is returned.
+ * Checks if the frame contains one or more ContentFrame's anywhere in his
+ * subsidiary structure; if so the first found ContentFrame is returned.
*/
-const SwContentFrm *SwLayoutFrm::ContainsContent() const
+const SwContentFrame *SwLayoutFrame::ContainsContent() const
{
//Search downwards the layout leaf and if there is no content, jump to the
//next leaf until content is found or we leave "this".
//Sections: Content next to sections would not be found this way (empty
- //sections directly next to ContentFrm) therefore we need to recursively
+ //sections directly next to ContentFrame) therefore we need to recursively
//search for them even if it's more complex.
- const SwLayoutFrm *pLayLeaf = this;
+ const SwLayoutFrame *pLayLeaf = this;
do
{
- while ( (!pLayLeaf->IsSctFrm() || pLayLeaf == this ) &&
- pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() )
- pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->Lower());
+ while ( (!pLayLeaf->IsSctFrame() || pLayLeaf == this ) &&
+ pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() )
+ pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->Lower());
- if( pLayLeaf->IsSctFrm() && pLayLeaf != this )
+ if( pLayLeaf->IsSctFrame() && pLayLeaf != this )
{
- const SwContentFrm *pCnt = pLayLeaf->ContainsContent();
+ const SwContentFrame *pCnt = pLayLeaf->ContainsContent();
if( pCnt )
return pCnt;
if( pLayLeaf->GetNext() )
{
- if( pLayLeaf->GetNext()->IsLayoutFrm() )
+ if( pLayLeaf->GetNext()->IsLayoutFrame() )
{
- pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->GetNext());
+ pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->GetNext());
continue;
}
else
- return static_cast<const SwContentFrm*>(pLayLeaf->GetNext());
+ return static_cast<const SwContentFrame*>(pLayLeaf->GetNext());
}
}
else if ( pLayLeaf->Lower() )
- return static_cast<const SwContentFrm*>(pLayLeaf->Lower());
+ return static_cast<const SwContentFrame*>(pLayLeaf->Lower());
pLayLeaf = pLayLeaf->GetNextLayoutLeaf();
if( !IsAnLower( pLayLeaf) )
@@ -101,46 +101,46 @@ const SwContentFrm *SwLayoutFrm::ContainsContent() const
/**
* Calls ContainsAny first to reach the innermost cell. From there we walk back
- * up to the first SwCellFrm. Since we use SectionFrms, ContainsContent()->GetUpper()
+ * up to the first SwCellFrame. Since we use SectionFrames, ContainsContent()->GetUpper()
* is not enough anymore.
*/
-const SwCellFrm *SwLayoutFrm::FirstCell() const
+const SwCellFrame *SwLayoutFrame::FirstCell() const
{
- const SwFrm* pCnt = ContainsAny();
- while( pCnt && !pCnt->IsCellFrm() )
+ const SwFrame* pCnt = ContainsAny();
+ while( pCnt && !pCnt->IsCellFrame() )
pCnt = pCnt->GetUpper();
- return static_cast<const SwCellFrm*>(pCnt);
+ return static_cast<const SwCellFrame*>(pCnt);
}
-/** return ContentFrms, sections, and tables.
+/** return ContentFrames, sections, and tables.
*
* @param _bInvestigateFootnoteForSections controls investigation of content of footnotes for sections.
* @see ContainsContent
*/
-const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSections ) const
+const SwFrame *SwLayoutFrame::ContainsAny( const bool _bInvestigateFootnoteForSections ) const
{
//Search downwards the layout leaf and if there is no content, jump to the
//next leaf until content is found, we leave "this" or until we found
- //a SectionFrm or a TabFrm.
+ //a SectionFrame or a TabFrame.
- const SwLayoutFrm *pLayLeaf = this;
- const bool bNoFootnote = IsSctFrm() && !_bInvestigateFootnoteForSections;
+ const SwLayoutFrame *pLayLeaf = this;
+ const bool bNoFootnote = IsSctFrame() && !_bInvestigateFootnoteForSections;
do
{
- while ( ( (!pLayLeaf->IsSctFrm() && !pLayLeaf->IsTabFrm())
+ while ( ( (!pLayLeaf->IsSctFrame() && !pLayLeaf->IsTabFrame())
|| pLayLeaf == this ) &&
- pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrm() )
- pLayLeaf = static_cast<const SwLayoutFrm*>(pLayLeaf->Lower());
+ pLayLeaf->Lower() && pLayLeaf->Lower()->IsLayoutFrame() )
+ pLayLeaf = static_cast<const SwLayoutFrame*>(pLayLeaf->Lower());
- if( ( pLayLeaf->IsTabFrm() || pLayLeaf->IsSctFrm() )
+ if( ( pLayLeaf->IsTabFrame() || pLayLeaf->IsSctFrame() )
&& pLayLeaf != this )
{
- // Now we also return "deleted" SectionFrms so they can be
+ // Now we also return "deleted" SectionFrames so they can be
// maintained on SaveContent and RestoreContent
return pLayLeaf;
}
else if ( pLayLeaf->Lower() )
- return static_cast<const SwContentFrm*>(pLayLeaf->Lower());
+ return static_cast<const SwContentFrame*>(pLayLeaf->Lower());
pLayLeaf = pLayLeaf->GetNextLayoutLeaf();
if( bNoFootnote && pLayLeaf && pLayLeaf->IsInFootnote() )
@@ -156,57 +156,57 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFootnoteForSectio
return nullptr;
}
-const SwFrm* SwFrm::GetLower() const
+const SwFrame* SwFrame::GetLower() const
{
- return IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(this)->Lower() : nullptr;
+ return IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(this)->Lower() : nullptr;
}
-SwFrm* SwFrm::GetLower()
+SwFrame* SwFrame::GetLower()
{
- return IsLayoutFrm() ? static_cast<SwLayoutFrm*>(this)->Lower() : nullptr;
+ return IsLayoutFrame() ? static_cast<SwLayoutFrame*>(this)->Lower() : nullptr;
}
-SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote )
+SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote )
{
- if ( GetPrev() && GetPrev()->IsContentFrm() )
- return static_cast<SwContentFrm*>(GetPrev());
+ if ( GetPrev() && GetPrev()->IsContentFrame() )
+ return static_cast<SwContentFrame*>(GetPrev());
else
return _FindPrevCnt( _bInSameFootnote );
}
-const SwContentFrm* SwFrm::FindPrevCnt( const bool _bInSameFootnote ) const
+const SwContentFrame* SwFrame::FindPrevCnt( const bool _bInSameFootnote ) const
{
- if ( GetPrev() && GetPrev()->IsContentFrm() )
- return static_cast<const SwContentFrm*>(GetPrev());
+ if ( GetPrev() && GetPrev()->IsContentFrame() )
+ return static_cast<const SwContentFrame*>(GetPrev());
else
- return const_cast<SwFrm*>(this)->_FindPrevCnt( _bInSameFootnote );
+ return const_cast<SwFrame*>(this)->_FindPrevCnt( _bInSameFootnote );
}
-SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote )
+SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote )
{
- if ( mpNext && mpNext->IsContentFrm() )
- return static_cast<SwContentFrm*>(mpNext);
+ if ( mpNext && mpNext->IsContentFrame() )
+ return static_cast<SwContentFrame*>(mpNext);
else
return _FindNextCnt( _bInSameFootnote );
}
-const SwContentFrm *SwFrm::FindNextCnt( const bool _bInSameFootnote ) const
+const SwContentFrame *SwFrame::FindNextCnt( const bool _bInSameFootnote ) const
{
- if ( mpNext && mpNext->IsContentFrm() )
- return static_cast<SwContentFrm*>(mpNext);
+ if ( mpNext && mpNext->IsContentFrame() )
+ return static_cast<SwContentFrame*>(mpNext);
else
- return const_cast<SwFrm*>(this)->_FindNextCnt( _bInSameFootnote );
+ return const_cast<SwFrame*>(this)->_FindNextCnt( _bInSameFootnote );
}
-bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
+bool SwLayoutFrame::IsAnLower( const SwFrame *pAssumed ) const
{
- const SwFrm *pUp = pAssumed;
+ const SwFrame *pUp = pAssumed;
while ( pUp )
{
if ( pUp == this )
return true;
- if ( pUp->IsFlyFrm() )
- pUp = static_cast<const SwFlyFrm*>(pUp)->GetAnchorFrm();
+ if ( pUp->IsFlyFrame() )
+ pUp = static_cast<const SwFlyFrame*>(pUp)->GetAnchorFrame();
else
pUp = pUp->GetUpper();
}
@@ -219,22 +219,22 @@ bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const
OD 08.11.2002 - refactoring of pseudo-local method <lcl_Apres(..)> in
<txtftn.cxx> for #104840#.
- @param _aCheckRefLayFrm
- constant reference of an instance of class <SwLayoutFrm> which
+ @param _aCheckRefLayFrame
+ constant reference of an instance of class <SwLayoutFrame> which
is used as the reference for the relative position check.
@return true, if <this> is positioned before the layout frame <p>
*/
-bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
+bool SwLayoutFrame::IsBefore( const SwLayoutFrame* _pCheckRefLayFrame ) const
{
- OSL_ENSURE( !IsRootFrm() , "<IsBefore> called at a <SwRootFrm>.");
- OSL_ENSURE( !_pCheckRefLayFrm->IsRootFrm() , "<IsBefore> called with a <SwRootFrm>.");
+ OSL_ENSURE( !IsRootFrame() , "<IsBefore> called at a <SwRootFrame>.");
+ OSL_ENSURE( !_pCheckRefLayFrame->IsRootFrame() , "<IsBefore> called with a <SwRootFrame>.");
bool bReturn;
// check, if on different pages
- const SwPageFrm *pMyPage = FindPageFrm();
- const SwPageFrm *pCheckRefPage = _pCheckRefLayFrm->FindPageFrm();
+ const SwPageFrame *pMyPage = FindPageFrame();
+ const SwPageFrame *pCheckRefPage = _pCheckRefLayFrame->FindPageFrame();
if( pMyPage != pCheckRefPage )
{
// being on different page as check reference
@@ -244,9 +244,9 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
{
// being on same page as check reference
// --> search my supreme parent <pUp>, which doesn't contain check reference.
- const SwLayoutFrm* pUp = this;
+ const SwLayoutFrame* pUp = this;
while ( pUp->GetUpper() &&
- !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrm )
+ !pUp->GetUpper()->IsAnLower( _pCheckRefLayFrame )
)
pUp = pUp->GetUpper();
if( !pUp->GetUpper() )
@@ -258,11 +258,11 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
{
// travel through the next's of <pUp> and check if one of these
// contain the check reference.
- const SwLayoutFrm* pUpNext = static_cast<const SwLayoutFrm*>(pUp->GetNext());
+ const SwLayoutFrame* pUpNext = static_cast<const SwLayoutFrame*>(pUp->GetNext());
while ( pUpNext &&
- !pUpNext->IsAnLower( _pCheckRefLayFrm ) )
+ !pUpNext->IsAnLower( _pCheckRefLayFrame ) )
{
- pUpNext = static_cast<const SwLayoutFrm*>(pUpNext->GetNext());
+ pUpNext = static_cast<const SwLayoutFrame*>(pUpNext->GetNext());
}
bReturn = pUpNext != nullptr;
}
@@ -273,25 +273,25 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const
// Local helper functions for GetNextLayoutLeaf
-static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext )
+static const SwFrame* lcl_FindLayoutFrame( const SwFrame* pFrame, bool bNext )
{
- const SwFrm* pRet = nullptr;
- if ( pFrm->IsFlyFrm() )
- pRet = bNext ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink();
+ const SwFrame* pRet = nullptr;
+ if ( pFrame->IsFlyFrame() )
+ pRet = bNext ? static_cast<const SwFlyFrame*>(pFrame)->GetNextLink() : static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink();
else
- pRet = bNext ? pFrm->GetNext() : pFrm->GetPrev();
+ pRet = bNext ? pFrame->GetNext() : pFrame->GetPrev();
return pRet;
}
-static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd )
+static const SwFrame* lcl_GetLower( const SwFrame* pFrame, bool bFwd )
{
- if ( !pFrm->IsLayoutFrm() )
+ if ( !pFrame->IsLayoutFrame() )
return nullptr;
return bFwd ?
- static_cast<const SwLayoutFrm*>(pFrm)->Lower() :
- static_cast<const SwLayoutFrm*>(pFrm)->GetLastLower();
+ static_cast<const SwLayoutFrame*>(pFrame)->Lower() :
+ static_cast<const SwLayoutFrame*>(pFrame)->GetLastLower();
}
/**
@@ -299,30 +299,30 @@ static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd )
* have a lower which is a LayoutFrame. That means, pLower can be 0 or a
* content frame.
*
- * However, pLower may be a TabFrm
+ * However, pLower may be a TabFrame
*/
-const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
+const SwLayoutFrame *SwFrame::ImplGetNextLayoutLeaf( bool bFwd ) const
{
- const SwFrm *pFrm = this;
- const SwLayoutFrm *pLayoutFrm = nullptr;
- const SwFrm *p = nullptr;
+ const SwFrame *pFrame = this;
+ const SwLayoutFrame *pLayoutFrame = nullptr;
+ const SwFrame *p = nullptr;
bool bGoingUp = !bFwd; // false for forward, true for backward
do {
bool bGoingFwdOrBwd = false;
- bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrm, bFwd ) ) ) );
+ bool bGoingDown = ( !bGoingUp && ( nullptr != (p = lcl_GetLower( pFrame, bFwd ) ) ) );
if ( !bGoingDown )
{
// I cannot go down, because either I'm currently going up or
// because the is no lower.
// I'll try to go forward:
- bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
+ bGoingFwdOrBwd = (nullptr != (p = lcl_FindLayoutFrame( pFrame, bFwd ) ) );
if ( !bGoingFwdOrBwd )
{
// I cannot go forward, because there is no next frame.
// I'll try to go up:
- bGoingUp = (nullptr != (p = pFrm->GetUpper() ) );
+ bGoingUp = (nullptr != (p = pFrame->GetUpper() ) );
if ( !bGoingUp )
{
// I cannot go up, because there is no upper frame.
@@ -334,43 +334,43 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const
// If I could not go down or forward, I'll have to go up
bGoingUp = !bGoingFwdOrBwd && !bGoingDown;
- pFrm = p;
- p = lcl_GetLower( pFrm, true );
+ pFrame = p;
+ p = lcl_GetLower( pFrame, true );
- } while( ( p && !p->IsFlowFrm() ) ||
- pFrm == this ||
- nullptr == ( pLayoutFrm = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm) : nullptr ) ||
- pLayoutFrm->IsAnLower( this ) );
+ } while( ( p && !p->IsFlowFrame() ) ||
+ pFrame == this ||
+ nullptr == ( pLayoutFrame = pFrame->IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(pFrame) : nullptr ) ||
+ pLayoutFrame->IsAnLower( this ) );
- return pLayoutFrm;
+ return pLayoutFrame;
}
/**
- * Walk back inside the tree: grab the subordinate Frm if one exists and the
+ * Walk back inside the tree: grab the subordinate Frame if one exists and the
* last step was not moving up a level (this would lead to an infinite up/down
* loop!). With this we ensure that during walking back we search through all
* sub trees. If we walked downwards we have to go to the end of the chain first
- * because we go backwards from the last Frm inside another Frm. Walking
+ * because we go backwards from the last Frame inside another Frame. Walking
* forward works the same.
*
- * @warning fixes here may also need to be applied to the @{lcl_NextFrm} method above
+ * @warning fixes here may also need to be applied to the @{lcl_NextFrame} method above
*/
-const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const
+const SwContentFrame* SwContentFrame::ImplGetNextContentFrame( bool bFwd ) const
{
- const SwFrm *pFrm = this;
- const SwContentFrm *pContentFrm = nullptr;
+ const SwFrame *pFrame = this;
+ const SwContentFrame *pContentFrame = nullptr;
bool bGoingUp = false;
do {
- const SwFrm *p = nullptr;
+ const SwFrame *p = nullptr;
bool bGoingFwdOrBwd = false;
- bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrm, true ) ) ) );
+ bool bGoingDown = ( !bGoingUp && ( nullptr != ( p = lcl_GetLower( pFrame, true ) ) ) );
if ( !bGoingDown )
{
- bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrm, bFwd ) ) );
+ bGoingFwdOrBwd = ( nullptr != ( p = lcl_FindLayoutFrame( pFrame, bFwd ) ) );
if ( !bGoingFwdOrBwd )
{
- bGoingUp = ( nullptr != ( p = pFrm->GetUpper() ) );
+ bGoingUp = ( nullptr != ( p = pFrame->GetUpper() ) );
if ( !bGoingUp )
{
return nullptr;
@@ -387,161 +387,161 @@ const SwContentFrm* SwContentFrm::ImplGetNextContentFrm( bool bFwd ) const
p = p->GetNext();
}
- pFrm = p;
- } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? static_cast<const SwContentFrm*>(pFrm) : nullptr) ));
+ pFrame = p;
+ } while ( nullptr == (pContentFrame = (pFrame->IsContentFrame() ? static_cast<const SwContentFrame*>(pFrame) : nullptr) ));
- return pContentFrm;
+ return pContentFrame;
}
-SwPageFrm* SwFrm::ImplFindPageFrm()
+SwPageFrame* SwFrame::ImplFindPageFrame()
{
- SwFrm *pRet = this;
- while ( pRet && !pRet->IsPageFrm() )
+ SwFrame *pRet = this;
+ while ( pRet && !pRet->IsPageFrame() )
{
if ( pRet->GetUpper() )
pRet = pRet->GetUpper();
- else if ( pRet->IsFlyFrm() )
+ else if ( pRet->IsFlyFrame() )
{
- // #i28701# - use new method <GetPageFrm()>
- const auto pFly(static_cast<SwFlyFrm*>(pRet));
- pRet = pFly->GetPageFrm();
+ // #i28701# - use new method <GetPageFrame()>
+ const auto pFly(static_cast<SwFlyFrame*>(pRet));
+ pRet = pFly->GetPageFrame();
if (pRet == nullptr)
- pRet = pFly->AnchorFrm();
+ pRet = pFly->AnchorFrame();
}
else
return nullptr;
}
- return static_cast<SwPageFrm*>(pRet);
+ return static_cast<SwPageFrame*>(pRet);
}
-SwFootnoteBossFrm* SwFrm::FindFootnoteBossFrm( bool bFootnotes )
+SwFootnoteBossFrame* SwFrame::FindFootnoteBossFrame( bool bFootnotes )
{
- SwFrm *pRet = this;
+ SwFrame *pRet = this;
// Footnote bosses can't exist inside a table; also sections with columns
// don't contain footnote texts there
if( pRet->IsInTab() )
- pRet = pRet->FindTabFrm();
- while ( pRet && !pRet->IsFootnoteBossFrm() )
+ pRet = pRet->FindTabFrame();
+ while ( pRet && !pRet->IsFootnoteBossFrame() )
{
if ( pRet->GetUpper() )
pRet = pRet->GetUpper();
- else if ( pRet->IsFlyFrm() )
+ else if ( pRet->IsFlyFrame() )
{
- // #i28701# - use new method <GetPageFrm()>
- if ( static_cast<SwFlyFrm*>(pRet)->GetPageFrm() )
- pRet = static_cast<SwFlyFrm*>(pRet)->GetPageFrm();
+ // #i28701# - use new method <GetPageFrame()>
+ if ( static_cast<SwFlyFrame*>(pRet)->GetPageFrame() )
+ pRet = static_cast<SwFlyFrame*>(pRet)->GetPageFrame();
else
- pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm();
+ pRet = static_cast<SwFlyFrame*>(pRet)->AnchorFrame();
}
else
return nullptr;
}
- if( bFootnotes && pRet && pRet->IsColumnFrm() &&
+ if( bFootnotes && pRet && pRet->IsColumnFrame() &&
!pRet->GetNext() && !pRet->GetPrev() )
{
- SwSectionFrm* pSct = pRet->FindSctFrm();
- OSL_ENSURE( pSct, "FindFootnoteBossFrm: Single column outside section?" );
+ SwSectionFrame* pSct = pRet->FindSctFrame();
+ OSL_ENSURE( pSct, "FindFootnoteBossFrame: Single column outside section?" );
if( !pSct->IsFootnoteAtEnd() )
- return pSct->FindFootnoteBossFrm( true );
+ return pSct->FindFootnoteBossFrame( true );
}
- return static_cast<SwFootnoteBossFrm*>(pRet);
+ return static_cast<SwFootnoteBossFrame*>(pRet);
}
-SwTabFrm* SwFrm::ImplFindTabFrm()
+SwTabFrame* SwFrame::ImplFindTabFrame()
{
- SwFrm *pRet = this;
- while ( !pRet->IsTabFrm() )
+ SwFrame *pRet = this;
+ while ( !pRet->IsTabFrame() )
{
pRet = pRet->GetUpper();
if ( !pRet )
return nullptr;
}
- return static_cast<SwTabFrm*>(pRet);
+ return static_cast<SwTabFrame*>(pRet);
}
-SwSectionFrm* SwFrm::ImplFindSctFrm()
+SwSectionFrame* SwFrame::ImplFindSctFrame()
{
- SwFrm *pRet = this;
- while ( !pRet->IsSctFrm() )
+ SwFrame *pRet = this;
+ while ( !pRet->IsSctFrame() )
{
pRet = pRet->GetUpper();
if ( !pRet )
return nullptr;
}
- return static_cast<SwSectionFrm*>(pRet);
+ return static_cast<SwSectionFrame*>(pRet);
}
-SwFootnoteFrm *SwFrm::ImplFindFootnoteFrm()
+SwFootnoteFrame *SwFrame::ImplFindFootnoteFrame()
{
- SwFrm *pRet = this;
- while ( !pRet->IsFootnoteFrm() )
+ SwFrame *pRet = this;
+ while ( !pRet->IsFootnoteFrame() )
{
pRet = pRet->GetUpper();
if ( !pRet )
return nullptr;
}
- return static_cast<SwFootnoteFrm*>(pRet);
+ return static_cast<SwFootnoteFrame*>(pRet);
}
-SwFlyFrm *SwFrm::ImplFindFlyFrm()
+SwFlyFrame *SwFrame::ImplFindFlyFrame()
{
- SwFrm *pRet = this;
+ SwFrame *pRet = this;
do
{
- if ( pRet->IsFlyFrm() )
- return static_cast<SwFlyFrm*>(pRet);
+ if ( pRet->IsFlyFrame() )
+ return static_cast<SwFlyFrame*>(pRet);
else
pRet = pRet->GetUpper();
} while ( pRet );
return nullptr;
}
-SwFrm *SwFrm::FindColFrm()
+SwFrame *SwFrame::FindColFrame()
{
- SwFrm *pFrm = this;
+ SwFrame *pFrame = this;
do
- { pFrm = pFrm->GetUpper();
- } while ( pFrm && !pFrm->IsColumnFrm() );
- return pFrm;
+ { pFrame = pFrame->GetUpper();
+ } while ( pFrame && !pFrame->IsColumnFrame() );
+ return pFrame;
}
-SwRowFrm *SwFrm::FindRowFrm()
+SwRowFrame *SwFrame::FindRowFrame()
{
- SwFrm *pFrm = this;
+ SwFrame *pFrame = this;
do
- { pFrm = pFrm->GetUpper();
- } while ( pFrm && !pFrm->IsRowFrm() );
- return dynamic_cast< SwRowFrm* >( pFrm );
+ { pFrame = pFrame->GetUpper();
+ } while ( pFrame && !pFrame->IsRowFrame() );
+ return dynamic_cast< SwRowFrame* >( pFrame );
}
-SwFrm* SwFrm::FindFooterOrHeader()
+SwFrame* SwFrame::FindFooterOrHeader()
{
- SwFrm* pRet = this;
+ SwFrame* pRet = this;
do
{
if (pRet->GetType() & FRM_HEADFOOT) //header and footer
return pRet;
else if ( pRet->GetUpper() )
pRet = pRet->GetUpper();
- else if ( pRet->IsFlyFrm() )
- pRet = static_cast<SwFlyFrm*>(pRet)->AnchorFrm();
+ else if ( pRet->IsFlyFrame() )
+ pRet = static_cast<SwFlyFrame*>(pRet)->AnchorFrame();
else
return nullptr;
} while ( pRet );
return pRet;
}
-const SwFootnoteFrm* SwFootnoteContFrm::FindFootNote() const
+const SwFootnoteFrame* SwFootnoteContFrame::FindFootNote() const
{
- const SwFootnoteFrm* pRet = static_cast<const SwFootnoteFrm*>(Lower());
+ const SwFootnoteFrame* pRet = static_cast<const SwFootnoteFrame*>(Lower());
if( pRet && !pRet->GetAttr()->GetFootnote().IsEndNote() )
return pRet;
return nullptr;
}
-const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const
+const SwPageFrame* SwRootFrame::GetPageAtPos( const Point& rPt, const Size* pSize, bool bExtend ) const
{
- const SwPageFrm* pRet = nullptr;
+ const SwPageFrame* pRet = nullptr;
SwRect aRect;
if ( pSize )
@@ -550,15 +550,15 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
aRect.SSize() = *pSize;
}
- const SwFrm* pPage = Lower();
+ const SwFrame* pPage = Lower();
if ( !bExtend )
{
- if( !Frm().IsInside( rPt ) )
+ if( !Frame().IsInside( rPt ) )
return nullptr;
// skip pages above point:
- while( pPage && rPt.Y() > pPage->Frm().Bottom() )
+ while( pPage && rPt.Y() > pPage->Frame().Bottom() )
pPage = pPage->GetNext();
}
@@ -567,12 +567,12 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
while ( pPage && !pRet )
{
- const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frm();
+ const SwRect& rBoundRect = bExtend ? maPageRects[ nPageIdx++ ] : pPage->Frame();
if ( (!pSize && rBoundRect.IsInside(rPt)) ||
(pSize && rBoundRect.IsOver(aRect)) )
{
- pRet = static_cast<const SwPageFrm*>(pPage);
+ pRet = static_cast<const SwPageFrame*>(pPage);
}
pPage = pPage->GetNext();
@@ -581,26 +581,26 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b
return pRet;
}
-bool SwRootFrm::IsBetweenPages(const Point& rPt) const
+bool SwRootFrame::IsBetweenPages(const Point& rPt) const
{
- if (!Frm().IsInside(rPt))
+ if (!Frame().IsInside(rPt))
return false;
// top visible page
- const SwFrm* pPage = Lower();
+ const SwFrame* pPage = Lower();
if (pPage == nullptr)
return false;
// skip pages above point:
- while (pPage && rPt.Y() > pPage->Frm().Bottom())
+ while (pPage && rPt.Y() > pPage->Frame().Bottom())
pPage = pPage->GetNext();
if (pPage &&
- rPt.X() >= pPage->Frm().Left() &&
- rPt.X() <= pPage->Frm().Right())
+ rPt.X() >= pPage->Frame().Left() &&
+ rPt.X() <= pPage->Frame().Right())
{
// Trivial case when we're right in between.
- if (!pPage->Frm().IsInside(rPt))
+ if (!pPage->Frame().IsInside(rPt))
return true;
// In normal mode the gap is large enough and
@@ -612,8 +612,8 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const
if (pSh && pSh->GetViewOptions()->IsWhitespaceHidden())
{
// If we are really close to the bottom or top of a page.
- const auto toEdge = std::min(std::abs(pPage->Frm().Top() - rPt.Y()),
- std::abs(pPage->Frm().Bottom() - rPt.Y()));
+ const auto toEdge = std::min(std::abs(pPage->Frame().Top() - rPt.Y()),
+ std::abs(pPage->Frame().Bottom() - rPt.Y()));
return toEdge <= MmToTwips(2.0);
}
}
@@ -621,46 +621,46 @@ bool SwRootFrm::IsBetweenPages(const Point& rPt) const
return false;
}
-const SwAttrSet* SwFrm::GetAttrSet() const
+const SwAttrSet* SwFrame::GetAttrSet() const
{
- if ( IsContentFrm() )
- return &static_cast<const SwContentFrm*>(this)->GetNode()->GetSwAttrSet();
+ if ( IsContentFrame() )
+ return &static_cast<const SwContentFrame*>(this)->GetNode()->GetSwAttrSet();
else
- return &static_cast<const SwLayoutFrm*>(this)->GetFormat()->GetAttrSet();
+ return &static_cast<const SwLayoutFrame*>(this)->GetFormat()->GetAttrSet();
}
//UUUU
-drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrm::getSdrAllFillAttributesHelper() const
+drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrame::getSdrAllFillAttributesHelper() const
{
- if(IsContentFrm())
+ if(IsContentFrame())
{
- return static_cast< const SwContentFrm* >(this)->GetNode()->getSdrAllFillAttributesHelper();
+ return static_cast< const SwContentFrame* >(this)->GetNode()->getSdrAllFillAttributesHelper();
}
else
{
- return static_cast< const SwLayoutFrm* >(this)->GetFormat()->getSdrAllFillAttributesHelper();
+ return static_cast< const SwLayoutFrame* >(this)->GetFormat()->getSdrAllFillAttributesHelper();
}
}
-bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const
+bool SwFrame::supportsFullDrawingLayerFillAttributeSet() const
{
- if (IsContentFrm())
+ if (IsContentFrame())
{
return true;
}
else
{
- return static_cast< const SwLayoutFrm* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet();
+ return static_cast< const SwLayoutFrame* >(this)->GetFormat()->supportsFullDrawingLayerFillAttributeSet();
}
}
/*
- * SwFrm::_FindNext(), _FindPrev(), InvalidateNextPos()
- * _FindNextCnt() visits tables and sections and only returns SwContentFrms.
+ * SwFrame::_FindNext(), _FindPrev(), InvalidateNextPos()
+ * _FindNextCnt() visits tables and sections and only returns SwContentFrames.
*
* Description Invalidates the position of the next frame.
- * This is the direct successor or in case of ContentFrms the next
- * ContentFrm which sits in the same flow as I do:
+ * This is the direct successor or in case of ContentFrames the next
+ * ContentFrame which sits in the same flow as I do:
* - body,
* - footnote,
* - in headers/footers the notification only needs to be forwarded
@@ -670,24 +670,24 @@ bool SwFrm::supportsFullDrawingLayerFillAttributeSet() const
* - in principle tables behave exactly like the Contents
* - sections also
*/
-// This helper function is an equivalent to the ImplGetNextContentFrm() method,
-// besides ContentFrames this function also returns TabFrms and SectionFrms.
-static SwFrm* lcl_NextFrm( SwFrm* pFrm )
+// This helper function is an equivalent to the ImplGetNextContentFrame() method,
+// besides ContentFrames this function also returns TabFrames and SectionFrames.
+static SwFrame* lcl_NextFrame( SwFrame* pFrame )
{
- SwFrm *pRet = nullptr;
+ SwFrame *pRet = nullptr;
bool bGoingUp = false;
do {
- SwFrm *p = nullptr;
+ SwFrame *p = nullptr;
bool bGoingFwd = false;
- bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrm->IsLayoutFrm() ? static_cast<SwLayoutFrm*>(pFrm)->Lower() : nullptr)));
+ bool bGoingDown = (!bGoingUp && ( nullptr != (p = pFrame->IsLayoutFrame() ? static_cast<SwLayoutFrame*>(pFrame)->Lower() : nullptr)));
if( !bGoingDown )
{
- bGoingFwd = (nullptr != (p = ( pFrm->IsFlyFrm() ? static_cast<SwFlyFrm*>(pFrm)->GetNextLink() : pFrm->GetNext())));
+ bGoingFwd = (nullptr != (p = ( pFrame->IsFlyFrame() ? static_cast<SwFlyFrame*>(pFrame)->GetNextLink() : pFrame->GetNext())));
if ( !bGoingFwd )
{
- bGoingUp = (nullptr != (p = pFrm->GetUpper()));
+ bGoingUp = (nullptr != (p = pFrame->GetUpper()));
if ( !bGoingUp )
{
return nullptr;
@@ -695,69 +695,69 @@ static SwFrm* lcl_NextFrm( SwFrm* pFrm )
}
}
bGoingUp = !(bGoingFwd || bGoingDown);
- pFrm = p;
- } while ( nullptr == (pRet = ( ( pFrm->IsContentFrm() || ( !bGoingUp &&
- ( pFrm->IsTabFrm() || pFrm->IsSctFrm() ) ) )? pFrm : nullptr ) ) );
+ pFrame = p;
+ } while ( nullptr == (pRet = ( ( pFrame->IsContentFrame() || ( !bGoingUp &&
+ ( pFrame->IsTabFrame() || pFrame->IsSctFrame() ) ) )? pFrame : nullptr ) ) );
return pRet;
}
-SwFrm *SwFrm::_FindNext()
+SwFrame *SwFrame::_FindNext()
{
bool bIgnoreTab = false;
- SwFrm *pThis = this;
+ SwFrame *pThis = this;
- if ( IsTabFrm() )
+ if ( IsTabFrame() )
{
//The last Content of the table gets picked up and his follower is
//returned. To be able to deactivate the special case for tables
//(see below) bIgnoreTab will be set.
- if ( static_cast<SwTabFrm*>(this)->GetFollow() )
- return static_cast<SwTabFrm*>(this)->GetFollow();
+ if ( static_cast<SwTabFrame*>(this)->GetFollow() )
+ return static_cast<SwTabFrame*>(this)->GetFollow();
- pThis = static_cast<SwTabFrm*>(this)->FindLastContent();
+ pThis = static_cast<SwTabFrame*>(this)->FindLastContent();
if ( !pThis )
pThis = this;
bIgnoreTab = true;
}
- else if ( IsSctFrm() )
+ else if ( IsSctFrame() )
{
//The last Content of the section gets picked and his follower is returned.
- if ( static_cast<SwSectionFrm*>(this)->GetFollow() )
- return static_cast<SwSectionFrm*>(this)->GetFollow();
+ if ( static_cast<SwSectionFrame*>(this)->GetFollow() )
+ return static_cast<SwSectionFrame*>(this)->GetFollow();
- pThis = static_cast<SwSectionFrm*>(this)->FindLastContent();
+ pThis = static_cast<SwSectionFrame*>(this)->FindLastContent();
if ( !pThis )
pThis = this;
}
- else if ( IsContentFrm() )
+ else if ( IsContentFrame() )
{
- if( static_cast<SwContentFrm*>(this)->GetFollow() )
- return static_cast<SwContentFrm*>(this)->GetFollow();
+ if( static_cast<SwContentFrame*>(this)->GetFollow() )
+ return static_cast<SwContentFrame*>(this)->GetFollow();
}
- else if ( IsRowFrm() )
+ else if ( IsRowFrame() )
{
- SwFrm* pMyUpper = GetUpper();
- if ( pMyUpper->IsTabFrm() && static_cast<SwTabFrm*>(pMyUpper)->GetFollow() )
- return static_cast<SwTabFrm*>(pMyUpper)->GetFollow()->GetLower();
+ SwFrame* pMyUpper = GetUpper();
+ if ( pMyUpper->IsTabFrame() && static_cast<SwTabFrame*>(pMyUpper)->GetFollow() )
+ return static_cast<SwTabFrame*>(pMyUpper)->GetFollow()->GetLower();
else return nullptr;
}
else
return nullptr;
- SwFrm* pRet = nullptr;
+ SwFrame* pRet = nullptr;
const bool bFootnote = pThis->IsInFootnote();
if ( !bIgnoreTab && pThis->IsInTab() )
{
- SwLayoutFrm *pUp = pThis->GetUpper();
- while (pUp && !pUp->IsCellFrm())
+ SwLayoutFrame *pUp = pThis->GetUpper();
+ while (pUp && !pUp->IsCellFrame())
pUp = pUp->GetUpper();
SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell.");
- SwFrm* pNxt = pUp ? static_cast<SwCellFrm*>(pUp)->GetFollowCell() : nullptr;
+ SwFrame* pNxt = pUp ? static_cast<SwCellFrame*>(pUp)->GetFollowCell() : nullptr;
if ( pNxt )
- pNxt = static_cast<SwCellFrm*>(pNxt)->ContainsContent();
+ pNxt = static_cast<SwCellFrame*>(pNxt)->ContainsContent();
if ( !pNxt )
{
- pNxt = lcl_NextFrm( pThis );
+ pNxt = lcl_NextFrame( pThis );
if (pUp && pUp->IsAnLower(pNxt))
pRet = pNxt;
}
@@ -767,7 +767,7 @@ SwFrm *SwFrm::_FindNext()
else
{
const bool bBody = pThis->IsInDocBody();
- SwFrm *pNxtCnt = lcl_NextFrm( pThis );
+ SwFrame *pNxtCnt = lcl_NextFrame( pThis );
if ( pNxtCnt )
{
if ( bBody || bFootnote )
@@ -777,43 +777,43 @@ SwFrm *SwFrm::_FindNext()
// OD 02.04.2003 #108446# - check for endnote, only if found
// next content isn't contained in a section, that collect its
// endnotes at its end.
- bool bEndn = IsInSct() && !IsSctFrm() &&
+ bool bEndn = IsInSct() && !IsSctFrame() &&
( !pNxtCnt->IsInSct() ||
- !pNxtCnt->FindSctFrm()->IsEndnAtEnd()
+ !pNxtCnt->FindSctFrame()->IsEndnAtEnd()
);
if ( ( bBody && pNxtCnt->IsInDocBody() ) ||
( pNxtCnt->IsInFootnote() &&
( bFootnote ||
- ( bEndn && pNxtCnt->FindFootnoteFrm()->GetAttr()->GetFootnote().IsEndNote() )
+ ( bEndn && pNxtCnt->FindFootnoteFrame()->GetAttr()->GetFootnote().IsEndNote() )
)
)
)
{
- pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm()
+ pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame()
: pNxtCnt;
break;
}
- pNxtCnt = lcl_NextFrm( pNxtCnt );
+ pNxtCnt = lcl_NextFrame( pNxtCnt );
}
}
else if ( pThis->IsInFly() )
{
- pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm()
+ pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame()
: pNxtCnt;
}
else //footer-/or header section
{
- const SwFrm *pUp = pThis->GetUpper();
- const SwFrm *pCntUp = pNxtCnt->GetUpper();
+ const SwFrame *pUp = pThis->GetUpper();
+ const SwFrame *pCntUp = pNxtCnt->GetUpper();
while ( pUp && pUp->GetUpper() &&
- !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() )
+ !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() )
pUp = pUp->GetUpper();
while ( pCntUp && pCntUp->GetUpper() &&
- !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() )
+ !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() )
pCntUp = pCntUp->GetUpper();
if ( pCntUp == pUp )
{
- pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrm()
+ pRet = pNxtCnt->IsInTab() ? pNxtCnt->FindTabFrame()
: pNxtCnt;
}
}
@@ -821,7 +821,7 @@ SwFrm *SwFrm::_FindNext()
}
if( pRet && pRet->IsInSct() )
{
- SwSectionFrm* pSct = pRet->FindSctFrm();
+ SwSectionFrame* pSct = pRet->FindSctFrame();
//Footnotes in frames with columns must not return the section which
//contains the footnote
if( !pSct->IsAnLower( this ) &&
@@ -832,42 +832,42 @@ SwFrm *SwFrm::_FindNext()
}
// #i27138# - add parameter <_bInSameFootnote>
-SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
+SwContentFrame *SwFrame::_FindNextCnt( const bool _bInSameFootnote )
{
- SwFrm *pThis = this;
+ SwFrame *pThis = this;
- if ( IsTabFrm() )
+ if ( IsTabFrame() )
{
- if ( static_cast<SwTabFrm*>(this)->GetFollow() )
+ if ( static_cast<SwTabFrame*>(this)->GetFollow() )
{
- pThis = static_cast<SwTabFrm*>(this)->GetFollow()->ContainsContent();
+ pThis = static_cast<SwTabFrame*>(this)->GetFollow()->ContainsContent();
if( pThis )
- return static_cast<SwContentFrm*>(pThis);
+ return static_cast<SwContentFrame*>(pThis);
}
- pThis = static_cast<SwTabFrm*>(this)->FindLastContent();
+ pThis = static_cast<SwTabFrame*>(this)->FindLastContent();
if ( !pThis )
return nullptr;
}
- else if ( IsSctFrm() )
+ else if ( IsSctFrame() )
{
- if ( static_cast<SwSectionFrm*>(this)->GetFollow() )
+ if ( static_cast<SwSectionFrame*>(this)->GetFollow() )
{
- pThis = static_cast<SwSectionFrm*>(this)->GetFollow()->ContainsContent();
+ pThis = static_cast<SwSectionFrame*>(this)->GetFollow()->ContainsContent();
if( pThis )
- return static_cast<SwContentFrm*>(pThis);
+ return static_cast<SwContentFrame*>(pThis);
}
- pThis = static_cast<SwSectionFrm*>(this)->FindLastContent();
+ pThis = static_cast<SwSectionFrame*>(this)->FindLastContent();
if ( !pThis )
return nullptr;
}
- else if ( IsContentFrm() && static_cast<SwContentFrm*>(this)->GetFollow() )
- return static_cast<SwContentFrm*>(this)->GetFollow();
+ else if ( IsContentFrame() && static_cast<SwContentFrame*>(this)->GetFollow() )
+ return static_cast<SwContentFrame*>(this)->GetFollow();
- if ( pThis->IsContentFrm() )
+ if ( pThis->IsContentFrame() )
{
const bool bBody = pThis->IsInDocBody();
const bool bFootnote = pThis->IsInFootnote();
- SwContentFrm *pNxtCnt = static_cast<SwContentFrm*>(pThis)->GetNextContentFrm();
+ SwContentFrame *pNxtCnt = static_cast<SwContentFrame*>(pThis)->GetNextContentFrame();
if ( pNxtCnt )
{
// #i27138#
@@ -879,7 +879,7 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
if ( (bBody && pNxtCnt->IsInDocBody()) ||
(bFootnote && pNxtCnt->IsInFootnote()) )
return pNxtCnt;
- pNxtCnt = pNxtCnt->GetNextContentFrm();
+ pNxtCnt = pNxtCnt->GetNextContentFrame();
}
}
// #i27138#
@@ -887,25 +887,25 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
{
// handling for environments 'each footnote':
// Assure that found next content frame belongs to the same footnotes
- const SwFootnoteFrm* pFootnoteFrmOfNext( pNxtCnt->FindFootnoteFrm() );
- const SwFootnoteFrm* pFootnoteFrmOfCurr( pThis->FindFootnoteFrm() );
- OSL_ENSURE( pFootnoteFrmOfCurr,
- "<SwFrm::_FindNextCnt() - unknown layout situation: current frame has to have an upper footnote frame." );
- if ( pFootnoteFrmOfNext == pFootnoteFrmOfCurr )
+ const SwFootnoteFrame* pFootnoteFrameOfNext( pNxtCnt->FindFootnoteFrame() );
+ const SwFootnoteFrame* pFootnoteFrameOfCurr( pThis->FindFootnoteFrame() );
+ OSL_ENSURE( pFootnoteFrameOfCurr,
+ "<SwFrame::_FindNextCnt() - unknown layout situation: current frame has to have an upper footnote frame." );
+ if ( pFootnoteFrameOfNext == pFootnoteFrameOfCurr )
{
return pNxtCnt;
}
- else if ( pFootnoteFrmOfCurr->GetFollow() )
+ else if ( pFootnoteFrameOfCurr->GetFollow() )
{
// next content frame has to be the first content frame
// in the follow footnote, which contains a content frame.
- SwFootnoteFrm* pFollowFootnoteFrmOfCurr(
- const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) );
+ SwFootnoteFrame* pFollowFootnoteFrameOfCurr(
+ const_cast<SwFootnoteFrame*>(pFootnoteFrameOfCurr) );
pNxtCnt = nullptr;
do {
- pFollowFootnoteFrmOfCurr = pFollowFootnoteFrmOfCurr->GetFollow();
- pNxtCnt = pFollowFootnoteFrmOfCurr->ContainsContent();
- } while ( !pNxtCnt && pFollowFootnoteFrmOfCurr->GetFollow() );
+ pFollowFootnoteFrameOfCurr = pFollowFootnoteFrameOfCurr->GetFollow();
+ pNxtCnt = pFollowFootnoteFrameOfCurr->ContainsContent();
+ } while ( !pNxtCnt && pFollowFootnoteFrameOfCurr->GetFollow() );
return pNxtCnt;
}
else
@@ -922,13 +922,13 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
else
{
// handling for environments 'page header' and 'page footer':
- const SwFrm *pUp = pThis->GetUpper();
- const SwFrm *pCntUp = pNxtCnt->GetUpper();
+ const SwFrame *pUp = pThis->GetUpper();
+ const SwFrame *pCntUp = pNxtCnt->GetUpper();
while ( pUp && pUp->GetUpper() &&
- !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() )
+ !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() )
pUp = pUp->GetUpper();
while ( pCntUp && pCntUp->GetUpper() &&
- !pCntUp->IsHeaderFrm() && !pCntUp->IsFooterFrm() )
+ !pCntUp->IsHeaderFrame() && !pCntUp->IsFooterFrame() )
pCntUp = pCntUp->GetUpper();
if ( pCntUp == pUp )
return pNxtCnt;
@@ -943,115 +943,115 @@ SwContentFrm *SwFrm::_FindNextCnt( const bool _bInSameFootnote )
OD 2005-11-30 #i27138#
*/
-SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
+SwContentFrame* SwFrame::_FindPrevCnt( const bool _bInSameFootnote )
{
- if ( !IsFlowFrm() )
+ if ( !IsFlowFrame() )
{
// nothing to do, if current frame isn't a flow frame.
return nullptr;
}
- SwContentFrm* pPrevContentFrm( nullptr );
+ SwContentFrame* pPrevContentFrame( nullptr );
- // Because method <SwContentFrm::GetPrevContentFrm()> is used to travel
+ // Because method <SwContentFrame::GetPrevContentFrame()> is used to travel
// through the layout, a content frame, at which the travel starts, is needed.
- SwContentFrm* pCurrContentFrm = dynamic_cast<SwContentFrm*>(this);
+ SwContentFrame* pCurrContentFrame = dynamic_cast<SwContentFrame*>(this);
// perform shortcut, if current frame is a follow, and
- // determine <pCurrContentFrm>, if current frame is a table or section frame
- if ( pCurrContentFrm && pCurrContentFrm->IsFollow() )
+ // determine <pCurrContentFrame>, if current frame is a table or section frame
+ if ( pCurrContentFrame && pCurrContentFrame->IsFollow() )
{
// previous content frame is its master content frame
- pPrevContentFrm = pCurrContentFrm->FindMaster();
+ pPrevContentFrame = pCurrContentFrame->FindMaster();
}
- else if ( IsTabFrm() )
+ else if ( IsTabFrame() )
{
- SwTabFrm* pTabFrm( static_cast<SwTabFrm*>(this) );
- if ( pTabFrm->IsFollow() )
+ SwTabFrame* pTabFrame( static_cast<SwTabFrame*>(this) );
+ if ( pTabFrame->IsFollow() )
{
// previous content frame is the last content of its master table frame
- pPrevContentFrm = pTabFrm->FindMaster()->FindLastContent();
+ pPrevContentFrame = pTabFrame->FindMaster()->FindLastContent();
}
else
{
// start content frame for the search is the first content frame of
// the table frame.
- pCurrContentFrm = pTabFrm->ContainsContent();
+ pCurrContentFrame = pTabFrame->ContainsContent();
}
}
- else if ( IsSctFrm() )
+ else if ( IsSctFrame() )
{
- SwSectionFrm* pSectFrm( static_cast<SwSectionFrm*>(this) );
- if ( pSectFrm->IsFollow() )
+ SwSectionFrame* pSectFrame( static_cast<SwSectionFrame*>(this) );
+ if ( pSectFrame->IsFollow() )
{
// previous content frame is the last content of its master section frame
- pPrevContentFrm = pSectFrm->FindMaster()->FindLastContent();
+ pPrevContentFrame = pSectFrame->FindMaster()->FindLastContent();
}
else
{
// start content frame for the search is the first content frame of
// the section frame.
- pCurrContentFrm = pSectFrm->ContainsContent();
+ pCurrContentFrame = pSectFrame->ContainsContent();
}
}
// search for next content frame, depending on the environment, in which
// the current frame is in.
- if ( !pPrevContentFrm && pCurrContentFrm )
+ if ( !pPrevContentFrame && pCurrContentFrame )
{
- pPrevContentFrm = pCurrContentFrm->GetPrevContentFrm();
- if ( pPrevContentFrm )
+ pPrevContentFrame = pCurrContentFrame->GetPrevContentFrame();
+ if ( pPrevContentFrame )
{
- if ( pCurrContentFrm->IsInFly() )
+ if ( pCurrContentFrame->IsInFly() )
{
// handling for environments 'unlinked fly frame' and
// 'group of linked fly frames':
- // Nothing to do, <pPrevContentFrm> is the one
+ // Nothing to do, <pPrevContentFrame> is the one
}
else
{
- const bool bInDocBody = pCurrContentFrm->IsInDocBody();
- const bool bInFootnote = pCurrContentFrm->IsInFootnote();
+ const bool bInDocBody = pCurrContentFrame->IsInDocBody();
+ const bool bInFootnote = pCurrContentFrame->IsInFootnote();
if ( bInDocBody || ( bInFootnote && !_bInSameFootnote ) )
{
// handling for environments 'footnotes' and 'document body frames':
// Assure that found previous frame is also in one of these
// environments. Otherwise, travel further
- while ( pPrevContentFrm )
+ while ( pPrevContentFrame )
{
- if ( ( bInDocBody && pPrevContentFrm->IsInDocBody() ) ||
- ( bInFootnote && pPrevContentFrm->IsInFootnote() ) )
+ if ( ( bInDocBody && pPrevContentFrame->IsInDocBody() ) ||
+ ( bInFootnote && pPrevContentFrame->IsInFootnote() ) )
{
break;
}
- pPrevContentFrm = pPrevContentFrm->GetPrevContentFrm();
+ pPrevContentFrame = pPrevContentFrame->GetPrevContentFrame();
}
}
else if ( bInFootnote && _bInSameFootnote )
{
// handling for environments 'each footnote':
// Assure that found next content frame belongs to the same footnotes
- const SwFootnoteFrm* pFootnoteFrmOfPrev( pPrevContentFrm->FindFootnoteFrm() );
- const SwFootnoteFrm* pFootnoteFrmOfCurr( pCurrContentFrm->FindFootnoteFrm() );
- if ( pFootnoteFrmOfPrev != pFootnoteFrmOfCurr )
+ const SwFootnoteFrame* pFootnoteFrameOfPrev( pPrevContentFrame->FindFootnoteFrame() );
+ const SwFootnoteFrame* pFootnoteFrameOfCurr( pCurrContentFrame->FindFootnoteFrame() );
+ if ( pFootnoteFrameOfPrev != pFootnoteFrameOfCurr )
{
- if ( pFootnoteFrmOfCurr->GetMaster() )
+ if ( pFootnoteFrameOfCurr->GetMaster() )
{
- SwFootnoteFrm* pMasterFootnoteFrmOfCurr(
- const_cast<SwFootnoteFrm*>(pFootnoteFrmOfCurr) );
- pPrevContentFrm = nullptr;
+ SwFootnoteFrame* pMasterFootnoteFrameOfCurr(
+ const_cast<SwFootnoteFrame*>(pFootnoteFrameOfCurr) );
+ pPrevContentFrame = nullptr;
// correct wrong loop-condition
do {
- pMasterFootnoteFrmOfCurr = pMasterFootnoteFrmOfCurr->GetMaster();
- pPrevContentFrm = pMasterFootnoteFrmOfCurr->FindLastContent();
- } while ( !pPrevContentFrm &&
- pMasterFootnoteFrmOfCurr->GetMaster() );
+ pMasterFootnoteFrameOfCurr = pMasterFootnoteFrameOfCurr->GetMaster();
+ pPrevContentFrame = pMasterFootnoteFrameOfCurr->FindLastContent();
+ } while ( !pPrevContentFrame &&
+ pMasterFootnoteFrameOfCurr->GetMaster() );
}
else
{
// current content frame is the first content in the
// footnote - no previous content exists.
- pPrevContentFrm = nullptr;
+ pPrevContentFrame = nullptr;
}
}
}
@@ -1059,55 +1059,55 @@ SwContentFrm* SwFrm::_FindPrevCnt( const bool _bInSameFootnote )
{
// handling for environments 'page header' and 'page footer':
// Assure that found previous frame is also in the same
- // page header respectively page footer as <pCurrContentFrm>
- // Note: At this point its clear, that <pCurrContentFrm> has
+ // page header respectively page footer as <pCurrContentFrame>
+ // Note: At this point its clear, that <pCurrContentFrame> has
// to be inside a page header or page footer and that
- // neither <pCurrContentFrm> nor <pPrevContentFrm> are
+ // neither <pCurrContentFrame> nor <pPrevContentFrame> are
// inside a fly frame.
// Thus, method <FindFooterOrHeader()> can be used.
- OSL_ENSURE( pCurrContentFrm->FindFooterOrHeader(),
- "<SwFrm::_FindPrevCnt()> - unknown layout situation: current frame should be in page header or page footer" );
- OSL_ENSURE( !pPrevContentFrm->IsInFly(),
- "<SwFrm::_FindPrevCnt()> - unknown layout situation: found previous frame should *not* be inside a fly frame." );
- if ( pPrevContentFrm->FindFooterOrHeader() !=
- pCurrContentFrm->FindFooterOrHeader() )
+ OSL_ENSURE( pCurrContentFrame->FindFooterOrHeader(),
+ "<SwFrame::_FindPrevCnt()> - unknown layout situation: current frame should be in page header or page footer" );
+ OSL_ENSURE( !pPrevContentFrame->IsInFly(),
+ "<SwFrame::_FindPrevCnt()> - unknown layout situation: found previous frame should *not* be inside a fly frame." );
+ if ( pPrevContentFrame->FindFooterOrHeader() !=
+ pCurrContentFrame->FindFooterOrHeader() )
{
- pPrevContentFrm = nullptr;
+ pPrevContentFrame = nullptr;
}
}
}
}
}
- return pPrevContentFrm;
+ return pPrevContentFrame;
}
-SwFrm *SwFrm::_FindPrev()
+SwFrame *SwFrame::_FindPrev()
{
bool bIgnoreTab = false;
- SwFrm *pThis = this;
+ SwFrame *pThis = this;
- if ( IsTabFrm() )
+ if ( IsTabFrame() )
{
//The first Content of the table gets picked up and his predecessor is
//returned. To be able to deactivate the special case for tables
//(see below) bIgnoreTab will be set.
- if ( static_cast<SwTabFrm*>(this)->IsFollow() )
- return static_cast<SwTabFrm*>(this)->FindMaster();
+ if ( static_cast<SwTabFrame*>(this)->IsFollow() )
+ return static_cast<SwTabFrame*>(this)->FindMaster();
else
- pThis = static_cast<SwTabFrm*>(this)->ContainsContent();
+ pThis = static_cast<SwTabFrame*>(this)->ContainsContent();
bIgnoreTab = true;
}
- if ( pThis && pThis->IsContentFrm() )
+ if ( pThis && pThis->IsContentFrame() )
{
- SwContentFrm *pPrvCnt = static_cast<SwContentFrm*>(pThis)->GetPrevContentFrm();
+ SwContentFrame *pPrvCnt = static_cast<SwContentFrame*>(pThis)->GetPrevContentFrame();
if( !pPrvCnt )
return nullptr;
if ( !bIgnoreTab && pThis->IsInTab() )
{
- SwLayoutFrm *pUp = pThis->GetUpper();
- while (pUp && !pUp->IsCellFrm())
+ SwLayoutFrame *pUp = pThis->GetUpper();
+ while (pUp && !pUp->IsCellFrame())
pUp = pUp->GetUpper();
SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell.");
if (pUp && pUp->IsAnLower(pPrvCnt))
@@ -1115,7 +1115,7 @@ SwFrm *SwFrm::_FindPrev()
}
else
{
- SwFrm* pRet;
+ SwFrame* pRet;
const bool bBody = pThis->IsInDocBody();
const bool bFootnote = !bBody && pThis->IsInFootnote();
if ( bBody || bFootnote )
@@ -1125,32 +1125,32 @@ SwFrm *SwFrm::_FindPrev()
if ( (bBody && pPrvCnt->IsInDocBody()) ||
(bFootnote && pPrvCnt->IsInFootnote()) )
{
- pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm()
- : static_cast<SwFrm*>(pPrvCnt);
+ pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame()
+ : static_cast<SwFrame*>(pPrvCnt);
return pRet;
}
- pPrvCnt = pPrvCnt->GetPrevContentFrm();
+ pPrvCnt = pPrvCnt->GetPrevContentFrame();
}
}
else if ( pThis->IsInFly() )
{
- pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm()
- : static_cast<SwFrm*>(pPrvCnt);
+ pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame()
+ : static_cast<SwFrame*>(pPrvCnt);
return pRet;
}
else // footer or header or Fly
{
- const SwFrm *pUp = pThis->GetUpper();
- const SwFrm *pCntUp = pPrvCnt->GetUpper();
+ const SwFrame *pUp = pThis->GetUpper();
+ const SwFrame *pCntUp = pPrvCnt->GetUpper();
while ( pUp && pUp->GetUpper() &&
- !pUp->IsHeaderFrm() && !pUp->IsFooterFrm() )
+ !pUp->IsHeaderFrame() && !pUp->IsFooterFrame() )
pUp = pUp->GetUpper();
while ( pCntUp && pCntUp->GetUpper() )
pCntUp = pCntUp->GetUpper();
if ( pCntUp == pUp )
{
- pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrm()
- : static_cast<SwFrm*>(pPrvCnt);
+ pRet = pPrvCnt->IsInTab() ? pPrvCnt->FindTabFrame()
+ : static_cast<SwFrame*>(pPrvCnt);
return pRet;
}
}
@@ -1159,46 +1159,46 @@ SwFrm *SwFrm::_FindPrev()
return nullptr;
}
-void SwFrm::ImplInvalidateNextPos( bool bNoFootnote )
+void SwFrame::ImplInvalidateNextPos( bool bNoFootnote )
{
- SwFrm *pFrm;
- if ( nullptr != (pFrm = _FindNext()) )
+ SwFrame *pFrame;
+ if ( nullptr != (pFrame = _FindNext()) )
{
- if( pFrm->IsSctFrm() )
+ if( pFrame->IsSctFrame() )
{
- while( pFrm && pFrm->IsSctFrm() )
+ while( pFrame && pFrame->IsSctFrame() )
{
- if( static_cast<SwSectionFrm*>(pFrm)->GetSection() )
+ if( static_cast<SwSectionFrame*>(pFrame)->GetSection() )
{
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
if( pTmp )
pTmp->InvalidatePos();
else if( !bNoFootnote )
- static_cast<SwSectionFrm*>(pFrm)->InvalidateFootnotePos();
- if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm )
- pFrm->InvalidatePos();
+ static_cast<SwSectionFrame*>(pFrame)->InvalidateFootnotePos();
+ if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame )
+ pFrame->InvalidatePos();
return;
}
- pFrm = pFrm->FindNext();
+ pFrame = pFrame->FindNext();
}
- if( pFrm )
+ if( pFrame )
{
- if ( pFrm->IsSctFrm())
+ if ( pFrame->IsSctFrame())
{
// We need to invalidate the section's content so it gets
// the chance to flow to a different page.
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
if( pTmp )
pTmp->InvalidatePos();
- if( !IsInSct() || FindSctFrm()->GetFollow() != pFrm )
- pFrm->InvalidatePos();
+ if( !IsInSct() || FindSctFrame()->GetFollow() != pFrame )
+ pFrame->InvalidatePos();
}
else
- pFrm->InvalidatePos();
+ pFrame->InvalidatePos();
}
}
else
- pFrm->InvalidatePos();
+ pFrame->InvalidatePos();
}
}
@@ -1206,65 +1206,65 @@ void SwFrm::ImplInvalidateNextPos( bool bNoFootnote )
OD 09.01.2004 #i11859#
- FME 2004-04-19 #i27145# Moved function from SwTextFrm to SwFrm
+ FME 2004-04-19 #i27145# Moved function from SwTextFrame to SwFrame
*/
-void SwFrm::InvalidateNextPrtArea()
+void SwFrame::InvalidateNextPrtArea()
{
// determine next frame
- SwFrm* pNextFrm = FindNext();
+ SwFrame* pNextFrame = FindNext();
// skip empty section frames and hidden text frames
{
- while ( pNextFrm &&
- ( ( pNextFrm->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pNextFrm)->GetSection() ) ||
- ( pNextFrm->IsTextFrm() &&
- static_cast<SwTextFrm*>(pNextFrm)->IsHiddenNow() ) ) )
+ while ( pNextFrame &&
+ ( ( pNextFrame->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pNextFrame)->GetSection() ) ||
+ ( pNextFrame->IsTextFrame() &&
+ static_cast<SwTextFrame*>(pNextFrame)->IsHiddenNow() ) ) )
{
- pNextFrm = pNextFrm->FindNext();
+ pNextFrame = pNextFrame->FindNext();
}
}
// Invalidate printing area of found next frame
- if ( pNextFrm )
+ if ( pNextFrame )
{
- if ( pNextFrm->IsSctFrm() )
+ if ( pNextFrame->IsSctFrame() )
{
// Invalidate printing area of found section frame, if
// (1) this text frame isn't in a section OR
// (2) found section frame isn't a follow of the section frame this
// text frame is in.
- if ( !IsInSct() || FindSctFrm()->GetFollow() != pNextFrm )
+ if ( !IsInSct() || FindSctFrame()->GetFollow() != pNextFrame )
{
- pNextFrm->InvalidatePrt();
+ pNextFrame->InvalidatePrt();
}
// Invalidate printing area of first content in found section.
- SwFrm* pFstContentOfSctFrm =
- static_cast<SwSectionFrm*>(pNextFrm)->ContainsAny();
- if ( pFstContentOfSctFrm )
+ SwFrame* pFstContentOfSctFrame =
+ static_cast<SwSectionFrame*>(pNextFrame)->ContainsAny();
+ if ( pFstContentOfSctFrame )
{
- pFstContentOfSctFrm->InvalidatePrt();
+ pFstContentOfSctFrame->InvalidatePrt();
}
}
else
{
- pNextFrm->InvalidatePrt();
+ pNextFrame->InvalidatePrt();
}
}
}
/// @returns true if the frame _directly_ sits in a section with columns
/// but not if it sits in a table which itself sits in a section with columns.
-static bool lcl_IsInColSct( const SwFrm *pUp )
+static bool lcl_IsInColSct( const SwFrame *pUp )
{
bool bRet = false;
while( pUp )
{
- if( pUp->IsColumnFrm() )
+ if( pUp->IsColumnFrame() )
bRet = true;
- else if( pUp->IsSctFrm() )
+ else if( pUp->IsSctFrame() )
return bRet;
- else if( pUp->IsTabFrm() )
+ else if( pUp->IsTabFrame() )
return false;
pUp = pUp->GetUpper();
}
@@ -1276,40 +1276,40 @@ static bool lcl_IsInColSct( const SwFrm *pUp )
OD 08.08.2003 #110978#
method replaced 'old' method <sal_Bool IsMoveable() const>.
Determines, if frame is moveable in given environment. if no environment
- is given (parameter _pLayoutFrm == 0L), the movability in the actual
+ is given (parameter _pLayoutFrame == 0L), the movability in the actual
environment (<this->GetUpper()) is checked.
*/
-bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const
+bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const
{
bool bRetVal = false;
- if ( !_pLayoutFrm )
+ if ( !_pLayoutFrame )
{
- _pLayoutFrm = GetUpper();
+ _pLayoutFrame = GetUpper();
}
- if ( _pLayoutFrm && IsFlowFrm() )
+ if ( _pLayoutFrame && IsFlowFrame() )
{
- if ( _pLayoutFrm->IsInSct() && lcl_IsInColSct( _pLayoutFrm ) )
+ if ( _pLayoutFrame->IsInSct() && lcl_IsInColSct( _pLayoutFrame ) )
{
bRetVal = true;
}
- else if ( _pLayoutFrm->IsInFly() ||
- _pLayoutFrm->IsInDocBody() ||
- _pLayoutFrm->IsInFootnote() )
+ else if ( _pLayoutFrame->IsInFly() ||
+ _pLayoutFrame->IsInDocBody() ||
+ _pLayoutFrame->IsInFootnote() )
{
- if ( _pLayoutFrm->IsInTab() && !IsTabFrm() &&
- ( !IsContentFrm() || !const_cast<SwFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) )
+ if ( _pLayoutFrame->IsInTab() && !IsTabFrame() &&
+ ( !IsContentFrame() || !const_cast<SwFrame*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) )
{
bRetVal = false;
}
else
{
- if ( _pLayoutFrm->IsInFly() )
+ if ( _pLayoutFrame->IsInFly() )
{
// if fly frame has a follow (next linked fly frame),
// frame is moveable.
- if ( const_cast<SwLayoutFrm*>(_pLayoutFrm)->FindFlyFrm()->GetNextLink() )
+ if ( const_cast<SwLayoutFrame*>(_pLayoutFrame)->FindFlyFrame()->GetNextLink() )
{
bRetVal = true;
}
@@ -1318,8 +1318,8 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const
// if environment is columned, frame is moveable, if
// it isn't in last column.
// search for column frame
- const SwFrm* pCol = _pLayoutFrm;
- while ( pCol && !pCol->IsColumnFrm() )
+ const SwFrame* pCol = _pLayoutFrame;
+ while ( pCol && !pCol->IsColumnFrame() )
{
pCol = pCol->GetUpper();
}
@@ -1341,36 +1341,36 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const
return bRetVal;
}
-void SwFrm::SetInfFlags()
+void SwFrame::SetInfFlags()
{
- if ( !IsFlyFrm() && !GetUpper() ) //not yet pasted, no information available
+ if ( !IsFlyFrame() && !GetUpper() ) //not yet pasted, no information available
return;
mbInfInvalid = mbInfBody = mbInfTab = mbInfFly = mbInfFootnote = mbInfSct = false;
- SwFrm *pFrm = this;
- if( IsFootnoteContFrm() )
+ SwFrame *pFrame = this;
+ if( IsFootnoteContFrame() )
mbInfFootnote = true;
do
{
// mbInfBody is only set in the page body, but not in the column body
- if ( pFrm->IsBodyFrm() && !mbInfFootnote && pFrm->GetUpper()
- && pFrm->GetUpper()->IsPageFrm() )
+ if ( pFrame->IsBodyFrame() && !mbInfFootnote && pFrame->GetUpper()
+ && pFrame->GetUpper()->IsPageFrame() )
mbInfBody = true;
- else if ( pFrm->IsTabFrm() || pFrm->IsCellFrm() )
+ else if ( pFrame->IsTabFrame() || pFrame->IsCellFrame() )
{
mbInfTab = true;
}
- else if ( pFrm->IsFlyFrm() )
+ else if ( pFrame->IsFlyFrame() )
mbInfFly = true;
- else if ( pFrm->IsSctFrm() )
+ else if ( pFrame->IsSctFrame() )
mbInfSct = true;
- else if ( pFrm->IsFootnoteFrm() )
+ else if ( pFrame->IsFootnoteFrame() )
mbInfFootnote = true;
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
- } while ( pFrm && !pFrm->IsPageFrm() ); //there is nothing above the page
+ } while ( pFrame && !pFrame->IsPageFrame() ); //there is nothing above the page
}
/** Updates the vertical or the righttoleft-flags.
@@ -1378,7 +1378,7 @@ void SwFrm::SetInfFlags()
* If the property is derived, it's from the upper or (for fly frames) from
* the anchor. Otherwise we've to call a virtual method to check the property.
*/
-void SwFrm::SetDirFlags( bool bVert )
+void SwFrame::SetDirFlags( bool bVert )
{
if( bVert )
{
@@ -1386,8 +1386,8 @@ void SwFrm::SetDirFlags( bool bVert )
// vertical flag of upper/anchor is valid.
if( mbDerivedVert )
{
- const SwFrm* pAsk = IsFlyFrm() ?
- static_cast<SwFlyFrm*>(this)->GetAnchorFrm() : GetUpper();
+ const SwFrame* pAsk = IsFlyFrame() ?
+ static_cast<SwFlyFrame*>(this)->GetAnchorFrame() : GetUpper();
OSL_ENSURE( pAsk != this, "Autsch! Stack overflow is about to happen" );
@@ -1412,8 +1412,8 @@ void SwFrm::SetDirFlags( bool bVert )
CheckDirection( bVert );
if( mbDerivedR2L )
{
- const SwFrm* pAsk = IsFlyFrm() ?
- static_cast<SwFlyFrm*>(this)->GetAnchorFrm() : GetUpper();
+ const SwFrame* pAsk = IsFlyFrame() ?
+ static_cast<SwFlyFrame*>(this)->GetAnchorFrame() : GetUpper();
OSL_ENSURE( pAsk != this, "Oops! Stack overflow is about to happen" );
@@ -1426,66 +1426,66 @@ void SwFrm::SetDirFlags( bool bVert )
}
}
-SwLayoutFrm* SwFrm::GetNextCellLeaf( MakePageType )
+SwLayoutFrame* SwFrame::GetNextCellLeaf( MakePageType )
{
- SwFrm* pTmpFrm = this;
- while (pTmpFrm && !pTmpFrm->IsCellFrm())
- pTmpFrm = pTmpFrm->GetUpper();
+ SwFrame* pTmpFrame = this;
+ while (pTmpFrame && !pTmpFrame->IsCellFrame())
+ pTmpFrame = pTmpFrame->GetUpper();
- SAL_WARN_IF(!pTmpFrm, "sw.core", "SwFrm::GetNextCellLeaf() without cell");
- return pTmpFrm ? static_cast<SwCellFrm*>(pTmpFrm)->GetFollowCell() : nullptr;
+ SAL_WARN_IF(!pTmpFrame, "sw.core", "SwFrame::GetNextCellLeaf() without cell");
+ return pTmpFrame ? static_cast<SwCellFrame*>(pTmpFrame)->GetFollowCell() : nullptr;
}
-SwLayoutFrm* SwFrm::GetPrevCellLeaf( MakePageType )
+SwLayoutFrame* SwFrame::GetPrevCellLeaf( MakePageType )
{
- SwFrm* pTmpFrm = this;
- while ( !pTmpFrm->IsCellFrm() )
- pTmpFrm = pTmpFrm->GetUpper();
+ SwFrame* pTmpFrame = this;
+ while ( !pTmpFrame->IsCellFrame() )
+ pTmpFrame = pTmpFrame->GetUpper();
- OSL_ENSURE( pTmpFrm, "SwFrm::GetNextPreviousLeaf() without cell" );
- return static_cast<SwCellFrm*>(pTmpFrm)->GetPreviousCell();
+ OSL_ENSURE( pTmpFrame, "SwFrame::GetNextPreviousLeaf() without cell" );
+ return static_cast<SwCellFrame*>(pTmpFrame)->GetPreviousCell();
}
-static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
- const SwCellFrm& rOrigCell,
- const SwRowFrm& rCorrRow,
+static SwCellFrame* lcl_FindCorrespondingCellFrame( const SwRowFrame& rOrigRow,
+ const SwCellFrame& rOrigCell,
+ const SwRowFrame& rCorrRow,
bool bInFollow )
{
- SwCellFrm* pRet = nullptr;
- const SwCellFrm* pCell = static_cast<const SwCellFrm*>(rOrigRow.Lower());
- SwCellFrm* pCorrCell = const_cast<SwCellFrm*>(static_cast<const SwCellFrm*>(rCorrRow.Lower()));
+ SwCellFrame* pRet = nullptr;
+ const SwCellFrame* pCell = static_cast<const SwCellFrame*>(rOrigRow.Lower());
+ SwCellFrame* pCorrCell = const_cast<SwCellFrame*>(static_cast<const SwCellFrame*>(rCorrRow.Lower()));
while ( pCell != &rOrigCell && !pCell->IsAnLower( &rOrigCell ) )
{
- pCell = static_cast<const SwCellFrm*>(pCell->GetNext());
- pCorrCell = static_cast<SwCellFrm*>(pCorrCell->GetNext());
+ pCell = static_cast<const SwCellFrame*>(pCell->GetNext());
+ pCorrCell = static_cast<SwCellFrame*>(pCorrCell->GetNext());
}
- assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrm does not work");
+ assert(pCell && pCorrCell && "lcl_FindCorrespondingCellFrame does not work");
if ( pCell != &rOrigCell )
{
// rOrigCell must be a lower of pCell. We need to recurse into the rows:
- assert(pCell->Lower() && pCell->Lower()->IsRowFrm() &&
- "lcl_FindCorrespondingCellFrm does not work");
+ assert(pCell->Lower() && pCell->Lower()->IsRowFrame() &&
+ "lcl_FindCorrespondingCellFrame does not work");
- const SwRowFrm* pRow = static_cast<const SwRowFrm*>(pCell->Lower());
+ const SwRowFrame* pRow = static_cast<const SwRowFrame*>(pCell->Lower());
while ( !pRow->IsAnLower( &rOrigCell ) )
- pRow = static_cast<const SwRowFrm*>(pRow->GetNext());
+ pRow = static_cast<const SwRowFrame*>(pRow->GetNext());
- SwRowFrm* pCorrRow = nullptr;
+ SwRowFrame* pCorrRow = nullptr;
if ( bInFollow )
pCorrRow = pRow->GetFollowRow();
else
{
- SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pCorrCell->GetLastLower());
+ SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pCorrCell->GetLastLower());
if ( pTmpRow && pTmpRow->GetFollowRow() == pRow )
pCorrRow = pTmpRow;
}
if ( pCorrRow )
- pRet = lcl_FindCorrespondingCellFrm( *pRow, rOrigCell, *pCorrRow, bInFollow );
+ pRet = lcl_FindCorrespondingCellFrame( *pRow, rOrigCell, *pCorrRow, bInFollow );
}
else
pRet = pCorrCell;
@@ -1494,9 +1494,9 @@ static SwCellFrm* lcl_FindCorrespondingCellFrm( const SwRowFrm& rOrigRow,
}
// VERSION OF GetFollowCell() that assumes that we always have a follow flow line:
-SwCellFrm* SwCellFrm::GetFollowCell() const
+SwCellFrame* SwCellFrame::GetFollowCell() const
{
- SwCellFrm* pRet = nullptr;
+ SwCellFrame* pRet = nullptr;
// NEW TABLES
// Covered cells do not have follow cells!
@@ -1505,19 +1505,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
return nullptr;
// find most upper row frame
- const SwFrm* pRow = GetUpper();
+ const SwFrame* pRow = GetUpper();
- while (pRow && (!pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm()))
+ while (pRow && (!pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame()))
pRow = pRow->GetUpper();
if (!pRow)
return nullptr;
- const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pRow->GetUpper());
- if (!pTabFrm || !pTabFrm->GetFollow() || !pTabFrm->HasFollowFlowLine())
+ const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pRow->GetUpper());
+ if (!pTabFrame || !pTabFrame->GetFollow() || !pTabFrame->HasFollowFlowLine())
return nullptr;
- const SwCellFrm* pThisCell = this;
+ const SwCellFrame* pThisCell = this;
// Get last cell of the current table frame that belongs to the rowspan:
if ( nRowSpan > 1 )
@@ -1534,19 +1534,19 @@ SwCellFrm* SwCellFrm::GetFollowCell() const
}
}
- const SwRowFrm* pFollowRow = nullptr;
+ const SwRowFrame* pFollowRow = nullptr;
if ( !pRow->GetNext() &&
nullptr != ( pFollowRow = pRow->IsInSplitTableRow() ) &&
( !pFollowRow->IsRowSpanLine() || nRowSpan > 1 ) )
- pRet = lcl_FindCorrespondingCellFrm( *static_cast<const SwRowFrm*>(pRow), *pThisCell, *pFollowRow, true );
+ pRet = lcl_FindCorrespondingCellFrame( *static_cast<const SwRowFrame*>(pRow), *pThisCell, *pFollowRow, true );
return pRet;
}
// VERSION OF GetPreviousCell() THAT ASSUMES THAT WE ALWAYS HAVE A FFL
-SwCellFrm* SwCellFrm::GetPreviousCell() const
+SwCellFrame* SwCellFrame::GetPreviousCell() const
{
- SwCellFrm* pRet = nullptr;
+ SwCellFrame* pRet = nullptr;
// NEW TABLES
// Covered cells do not have previous cells!
@@ -1554,29 +1554,29 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const
return nullptr;
// find most upper row frame
- const SwFrm* pRow = GetUpper();
- while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() )
+ const SwFrame* pRow = GetUpper();
+ while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() )
pRow = pRow->GetUpper();
- OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrm(), "GetPreviousCell without Table" );
+ OSL_ENSURE( pRow->GetUpper() && pRow->GetUpper()->IsTabFrame(), "GetPreviousCell without Table" );
- const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper());
+ const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper());
if ( pTab->IsFollow() )
{
- const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow();
+ const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow();
const bool bIsInFirstLine = ( pTmp == pRow );
if ( bIsInFirstLine )
{
- SwTabFrm *pMaster = pTab->FindMaster();
+ SwTabFrame *pMaster = pTab->FindMaster();
if ( pMaster && pMaster->HasFollowFlowLine() )
{
- SwRowFrm* pMasterRow = static_cast<SwRowFrm*>(pMaster->GetLastLower());
+ SwRowFrame* pMasterRow = static_cast<SwRowFrame*>(pMaster->GetLastLower());
if ( pMasterRow )
- pRet = lcl_FindCorrespondingCellFrm( *static_cast<const SwRowFrm*>(pRow), *this, *pMasterRow, false );
+ pRet = lcl_FindCorrespondingCellFrame( *static_cast<const SwRowFrame*>(pRow), *this, *pMasterRow, false );
if ( pRet && pRet->GetTabBox()->getRowSpan() < 1 )
- pRet = &const_cast<SwCellFrm&>(pRet->FindStartEndOfRowSpanCell( true, true ));
+ pRet = &const_cast<SwCellFrame&>(pRet->FindStartEndOfRowSpanCell( true, true ));
}
}
}
@@ -1585,30 +1585,30 @@ SwCellFrm* SwCellFrm::GetPreviousCell() const
}
// --> NEW TABLES
-const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const
+const SwCellFrame& SwCellFrame::FindStartEndOfRowSpanCell( bool bStart, bool bCurrentTableOnly ) const
{
- const SwCellFrm* pRet = nullptr;
+ const SwCellFrame* pRet = nullptr;
- const SwTabFrm* pTableFrm = dynamic_cast<const SwTabFrm*>(GetUpper()->GetUpper());
+ const SwTabFrame* pTableFrame = dynamic_cast<const SwTabFrame*>(GetUpper()->GetUpper());
- if ( !bStart && pTableFrm && pTableFrm->IsFollow() && pTableFrm->IsInHeadline( *this ) )
+ if ( !bStart && pTableFrame && pTableFrame->IsFollow() && pTableFrame->IsInHeadline( *this ) )
return *this;
- OSL_ENSURE( pTableFrm &&
+ OSL_ENSURE( pTableFrame &&
( (bStart && GetTabBox()->getRowSpan() < 1) ||
(!bStart && GetLayoutRowSpan() > 1) ),
- "SwCellFrm::FindStartRowSpanCell: No rowspan, no table, no cookies" );
+ "SwCellFrame::FindStartRowSpanCell: No rowspan, no table, no cookies" );
- if ( pTableFrm )
+ if ( pTableFrame )
{
- const SwTable* pTable = pTableFrm->GetTable();
+ const SwTable* pTable = pTableFrame->GetTable();
sal_uInt16 nMax = USHRT_MAX;
if ( bCurrentTableOnly )
{
- const SwFrm* pCurrentRow = GetUpper();
- const bool bDoNotEnterHeadline = bStart && pTableFrm->IsFollow() &&
- !pTableFrm->IsInHeadline( *pCurrentRow );
+ const SwFrame* pCurrentRow = GetUpper();
+ const bool bDoNotEnterHeadline = bStart && pTableFrame->IsFollow() &&
+ !pTableFrame->IsInHeadline( *pCurrentRow );
// check how many rows we are allowed to go up or down until we reach the end of
// the current table frame:
@@ -1618,8 +1618,8 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
if ( bStart )
{
// do not enter a repeated headline:
- if ( bDoNotEnterHeadline && pTableFrm->IsFollow() &&
- pTableFrm->IsInHeadline( *pCurrentRow->GetPrev() ) )
+ if ( bDoNotEnterHeadline && pTableFrame->IsFollow() &&
+ pTableFrame->IsInHeadline( *pCurrentRow->GetPrev() ) )
break;
pCurrentRow = pCurrentRow->GetPrev();
@@ -1632,23 +1632,23 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
}
// By passing the nMax value for Find*OfRowSpan (in case of bCurrentTableOnly
- // is set) we assure that we find a rMasterBox that has a SwCellFrm in
+ // is set) we assure that we find a rMasterBox that has a SwCellFrame in
// the current table frame:
const SwTableBox& rMasterBox = bStart ?
GetTabBox()->FindStartOfRowSpan( *pTable, nMax ) :
GetTabBox()->FindEndOfRowSpan( *pTable, nMax );
- SwIterator<SwCellFrm,SwFormat> aIter( *rMasterBox.GetFrameFormat() );
+ SwIterator<SwCellFrame,SwFormat> aIter( *rMasterBox.GetFrameFormat() );
- for ( SwCellFrm* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() )
+ for ( SwCellFrame* pMasterCell = aIter.First(); pMasterCell; pMasterCell = aIter.Next() )
{
if ( pMasterCell->GetTabBox() == &rMasterBox )
{
- const SwTabFrm* pMasterTable = static_cast<const SwTabFrm*>(pMasterCell->GetUpper()->GetUpper());
+ const SwTabFrame* pMasterTable = static_cast<const SwTabFrame*>(pMasterCell->GetUpper()->GetUpper());
if ( bCurrentTableOnly )
{
- if ( pMasterTable == pTableFrm )
+ if ( pMasterTable == pTableFrame )
{
pRet = pMasterCell;
break;
@@ -1656,9 +1656,9 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
}
else
{
- if ( pMasterTable == pTableFrm ||
- ( (bStart && pMasterTable->IsAnFollow(pTableFrm)) ||
- (!bStart && pTableFrm->IsAnFollow(pMasterTable)) ) )
+ if ( pMasterTable == pTableFrame ||
+ ( (bStart && pMasterTable->IsAnFollow(pTableFrame)) ||
+ (!bStart && pTableFrame->IsAnFollow(pMasterTable)) ) )
{
pRet = pMasterCell;
break;
@@ -1668,91 +1668,91 @@ const SwCellFrm& SwCellFrm::FindStartEndOfRowSpanCell( bool bStart, bool bCurren
}
}
- assert(pRet && "SwCellFrm::FindStartRowSpanCell: No result");
+ assert(pRet && "SwCellFrame::FindStartRowSpanCell: No result");
return *pRet;
}
// <-- NEW TABLES
-const SwRowFrm* SwFrm::IsInSplitTableRow() const
+const SwRowFrame* SwFrame::IsInSplitTableRow() const
{
OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" );
- const SwFrm* pRow = this;
+ const SwFrame* pRow = this;
// find most upper row frame
- while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) )
+ while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) )
pRow = pRow->GetUpper();
if ( !pRow ) return nullptr;
- OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
+ OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" );
- const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper());
+ const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper());
// If most upper row frame is a headline row, the current frame
// can't be in a splitted table row. Thus, add corresponding condition.
if ( pRow->GetNext() ||
pTab->GetTable()->IsHeadline(
- *(static_cast<const SwRowFrm*>(pRow)->GetTabLine()) ) ||
+ *(static_cast<const SwRowFrame*>(pRow)->GetTabLine()) ) ||
!pTab->HasFollowFlowLine() ||
!pTab->GetFollow() )
return nullptr;
// skip headline
- const SwRowFrm* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow();
+ const SwRowFrame* pFollowRow = pTab->GetFollow()->GetFirstNonHeadlineRow();
- OSL_ENSURE( pFollowRow, "SwFrm::IsInSplitTableRow() does not work" );
+ OSL_ENSURE( pFollowRow, "SwFrame::IsInSplitTableRow() does not work" );
return pFollowRow;
}
-const SwRowFrm* SwFrm::IsInFollowFlowRow() const
+const SwRowFrame* SwFrame::IsInFollowFlowRow() const
{
OSL_ENSURE( IsInTab(), "IsInSplitTableRow should only be called for frames in tables" );
// find most upper row frame
- const SwFrm* pRow = this;
- while( pRow && ( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ) )
+ const SwFrame* pRow = this;
+ while( pRow && ( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ) )
pRow = pRow->GetUpper();
if ( !pRow ) return nullptr;
- OSL_ENSURE( pRow->GetUpper()->IsTabFrm(), "Confusion in table layout" );
+ OSL_ENSURE( pRow->GetUpper()->IsTabFrame(), "Confusion in table layout" );
- const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pRow->GetUpper());
+ const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pRow->GetUpper());
- const SwTabFrm* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr;
+ const SwTabFrame* pMaster = pTab->IsFollow() ? pTab->FindMaster() : nullptr;
if ( !pMaster || !pMaster->HasFollowFlowLine() )
return nullptr;
- const SwFrm* pTmp = pTab->GetFirstNonHeadlineRow();
+ const SwFrame* pTmp = pTab->GetFirstNonHeadlineRow();
const bool bIsInFirstLine = ( pTmp == pRow );
if ( !bIsInFirstLine )
return nullptr;
- const SwRowFrm* pMasterRow = static_cast<const SwRowFrm*>(pMaster->GetLastLower());
+ const SwRowFrame* pMasterRow = static_cast<const SwRowFrame*>(pMaster->GetLastLower());
return pMasterRow;
}
-bool SwFrm::IsInBalancedSection() const
+bool SwFrame::IsInBalancedSection() const
{
bool bRet = false;
if ( IsInSct() )
{
- const SwSectionFrm* pSectionFrm = FindSctFrm();
- if ( pSectionFrm )
- bRet = pSectionFrm->IsBalancedSection();
+ const SwSectionFrame* pSectionFrame = FindSctFrame();
+ if ( pSectionFrame )
+ bRet = pSectionFrame->IsBalancedSection();
}
return bRet;
}
-const SwFrm* SwLayoutFrm::GetLastLower() const
+const SwFrame* SwLayoutFrame::GetLastLower() const
{
- const SwFrm* pRet = Lower();
+ const SwFrame* pRet = Lower();
if ( !pRet )
return nullptr;
while ( pRet->GetNext() )
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 65b9f03923ab..850fc4e303be 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -57,10 +57,10 @@
#include <IDocumentDrawModelAccess.hxx>
#include <o3tl/make_unique.hxx>
-bool SwFlowFrm::m_bMoveBwdJump = false;
+bool SwFlowFrame::m_bMoveBwdJump = false;
-SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
- m_rThis( rFrm ),
+SwFlowFrame::SwFlowFrame( SwFrame &rFrame ) :
+ m_rThis( rFrame ),
m_pFollow( nullptr ),
m_pPrecede( nullptr ),
m_bLockJoin( false ),
@@ -68,7 +68,7 @@ SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
m_bFlyLock( false )
{}
-SwFlowFrm::~SwFlowFrm()
+SwFlowFrame::~SwFlowFrame()
{
if (m_pFollow)
{
@@ -80,7 +80,7 @@ SwFlowFrm::~SwFlowFrm()
}
}
-void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow)
+void SwFlowFrame::SetFollow(SwFlowFrame *const pFollow)
{
if (m_pFollow)
{
@@ -100,61 +100,61 @@ void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow)
}
/// @return true if any follow has the JoinLocked flag
-bool SwFlowFrm::HasLockedFollow() const
+bool SwFlowFrame::HasLockedFollow() const
{
- const SwFlowFrm* pFrm = GetFollow();
- while( pFrm )
+ const SwFlowFrame* pFrame = GetFollow();
+ while( pFrame )
{
- if( pFrm->IsJoinLocked() )
+ if( pFrame->IsJoinLocked() )
return true;
- pFrm = pFrm->GetFollow();
+ pFrame = pFrame->GetFollow();
}
return false;
}
-bool SwFlowFrm::IsKeepFwdMoveAllowed()
+bool SwFlowFrame::IsKeepFwdMoveAllowed()
{
// If all the predecessors up to the first of the chain have
// the 'keep' attribute set, and the first of the chain's
// IsFwdMoveAllowed returns false, then we're not allowed to move.
- SwFrm *pFrm = &m_rThis;
- if ( !pFrm->IsInFootnote() )
+ SwFrame *pFrame = &m_rThis;
+ if ( !pFrame->IsInFootnote() )
do
- { if ( pFrm->GetAttrSet()->GetKeep().GetValue() )
- pFrm = pFrm->GetIndPrev();
+ { if ( pFrame->GetAttrSet()->GetKeep().GetValue() )
+ pFrame = pFrame->GetIndPrev();
else
return true;
- } while ( pFrm );
+ } while ( pFrame );
//See IsFwdMoveAllowed()
bool bRet = false;
- if ( pFrm && pFrm->GetIndPrev() )
+ if ( pFrame && pFrame->GetIndPrev() )
bRet = true;
return bRet;
}
-void SwFlowFrm::CheckKeep()
+void SwFlowFrame::CheckKeep()
{
// Kick off the "last" predecessor with a 'keep' attribute, because
// it's possible for the whole troop to move back.
- SwFrm *pPre = m_rThis.GetIndPrev();
- if( pPre->IsSctFrm() )
+ SwFrame *pPre = m_rThis.GetIndPrev();
+ if( pPre->IsSctFrame() )
{
- SwFrm *pLast = static_cast<SwSectionFrm*>(pPre)->FindLastContent();
- if( pLast && pLast->FindSctFrm() == pPre )
+ SwFrame *pLast = static_cast<SwSectionFrame*>(pPre)->FindLastContent();
+ if( pLast && pLast->FindSctFrame() == pPre )
pPre = pLast;
else
return;
}
- SwFrm* pTmp;
+ SwFrame* pTmp;
bool bKeep;
while ( (bKeep = pPre->GetAttrSet()->GetKeep().GetValue()) &&
nullptr != ( pTmp = pPre->GetIndPrev() ) )
{
- if( pTmp->IsSctFrm() )
+ if( pTmp->IsSctFrame() )
{
- SwFrm *pLast = static_cast<SwSectionFrm*>(pTmp)->FindLastContent();
- if( pLast && pLast->FindSctFrm() == pTmp )
+ SwFrame *pLast = static_cast<SwSectionFrame*>(pTmp)->FindLastContent();
+ if( pLast && pLast->FindSctFrame() == pTmp )
pTmp = pLast;
else
break;
@@ -165,7 +165,7 @@ void SwFlowFrm::CheckKeep()
pPre->InvalidatePos();
}
-bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
+bool SwFlowFrame::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const
{
// 1. The keep attribute is ignored inside footnotes
// 2. For compatibility reasons, the keep attribute is
@@ -175,10 +175,10 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
// or break before attributes set for the next content (or next table)
bool bKeep = bCheckIfLastRowShouldKeep ||
( !m_rThis.IsInFootnote() &&
- ( !m_rThis.IsInTab() || m_rThis.IsTabFrm() ) &&
+ ( !m_rThis.IsInTab() || m_rThis.IsTabFrame() ) &&
rAttrs.GetKeep().GetValue() );
- OSL_ENSURE( !bCheckIfLastRowShouldKeep || m_rThis.IsTabFrm(),
+ OSL_ENSURE( !bCheckIfLastRowShouldKeep || m_rThis.IsTabFrame(),
"IsKeep with bCheckIfLastRowShouldKeep should only be used for tabfrms" );
// Ignore keep attribute if there are break situations:
@@ -197,9 +197,9 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
}
if ( bKeep )
{
- SwFrm *pNxt;
+ SwFrame *pNxt;
if( nullptr != (pNxt = m_rThis.FindNextCnt()) &&
- (!m_pFollow || pNxt != &m_pFollow->GetFrm()))
+ (!m_pFollow || pNxt != &m_pFollow->GetFrame()))
{
// The last row of a table only keeps with the next content
// it they are in the same section:
@@ -207,14 +207,14 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
{
const SwSection* pThisSection = nullptr;
const SwSection* pNextSection = nullptr;
- const SwSectionFrm* pThisSectionFrm = m_rThis.FindSctFrm();
- const SwSectionFrm* pNextSectionFrm = pNxt->FindSctFrm();
+ const SwSectionFrame* pThisSectionFrame = m_rThis.FindSctFrame();
+ const SwSectionFrame* pNextSectionFrame = pNxt->FindSctFrame();
- if ( pThisSectionFrm )
- pThisSection = pThisSectionFrm->GetSection();
+ if ( pThisSectionFrame )
+ pThisSection = pThisSectionFrame->GetSection();
- if ( pNextSectionFrm )
- pNextSection = pNextSectionFrm->GetSection();
+ if ( pNextSectionFrame )
+ pNextSection = pNextSectionFrame->GetSection();
if ( pThisSection != pNextSection )
bKeep = false;
@@ -226,8 +226,8 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
if ( pNxt->IsInTab() )
{
- SwTabFrm* pTab = pNxt->FindTabFrm();
- if ( ! m_rThis.IsInTab() || m_rThis.FindTabFrm() != pTab )
+ SwTabFrame* pTab = pNxt->FindTabFrame();
+ if ( ! m_rThis.IsInTab() || m_rThis.FindTabFrame() != pTab )
pSet = &pTab->GetFormat()->GetAttrSet();
}
@@ -254,7 +254,7 @@ bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep
return bKeep;
}
-sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect )
+sal_uInt8 SwFlowFrame::BwdMoveNecessary( const SwPageFrame *pPage, const SwRect &rRect )
{
// The return value helps deciding whether we need to flow back (3),
// or whether we can use the good old WouldFit (0, 1), or if
@@ -275,13 +275,13 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
// it's likely that it will follow me with the flow. A test formatting is
// not allowed in that case, however!
sal_uInt8 nRet = 0;
- SwFlowFrm *pTmp = this;
+ SwFlowFrame *pTmp = this;
do
{ // If there are objects hanging either on me or on a follow, we can't
// do a test formatting, because paragraph bound objects wouldn't
// be properly considered, and character bound objects shouldn't
// be test formatted at all.
- if( pTmp->GetFrm().GetDrawObjs() )
+ if( pTmp->GetFrame().GetDrawObjs() )
nRet = 1;
pTmp = pTmp->GetFollow();
} while ( !nRet && pTmp );
@@ -300,17 +300,17 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
if ( aRect.IsOver( rRect ) &&
rFormat.GetSurround().GetSurround() != SURROUND_THROUGHT )
{
- if( m_rThis.IsLayoutFrm() && //Fly Lower of This?
+ if( m_rThis.IsLayoutFrame() && //Fly Lower of This?
Is_Lower_Of( &m_rThis, pObj->GetDrawObj() ) )
continue;
- if( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pObj);
+ const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pObj);
if ( pFly->IsAnLower( &m_rThis ) )//This Lower of Fly?
continue;
}
- const SwFrm* pAnchor = pObj->GetAnchorFrm();
+ const SwFrame* pAnchor = pObj->GetAnchorFrame();
if ( pAnchor == &m_rThis )
{
nRet |= 1;
@@ -319,7 +319,7 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
// Don't do this if the object is anchored behind me in the text
// flow, because then I wouldn't evade it.
- if ( ::IsFrmInSameKontext( pAnchor, &m_rThis ) )
+ if ( ::IsFrameInSameKontext( pAnchor, &m_rThis ) )
{
if ( rFormat.GetAnchor().GetAnchorId() == FLY_AT_PARA )
{
@@ -333,15 +333,15 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
if( ULONG_MAX == nIndex )
{
const SwNode *pNode;
- if ( m_rThis.IsContentFrm() )
- pNode = static_cast<SwContentFrm&>(m_rThis).GetNode();
- else if( m_rThis.IsSctFrm() )
- pNode = static_cast<SwSectionFormat*>(static_cast<SwSectionFrm&>(m_rThis).
+ if ( m_rThis.IsContentFrame() )
+ pNode = static_cast<SwContentFrame&>(m_rThis).GetNode();
+ else if( m_rThis.IsSctFrame() )
+ pNode = static_cast<SwSectionFormat*>(static_cast<SwSectionFrame&>(m_rThis).
GetFormat())->GetSectionNode();
else
{
- OSL_ENSURE( m_rThis.IsTabFrm(), "new FowFrm?" );
- pNode = static_cast<SwTabFrm&>(m_rThis).GetTable()->
+ OSL_ENSURE( m_rThis.IsTabFrame(), "new FowFrame?" );
+ pNode = static_cast<SwTabFrame&>(m_rThis).GetTable()->
GetTabSortBoxes()[0]->GetSttNd()->FindTableNode();
}
nIndex = pNode->GetIndex();
@@ -362,21 +362,21 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe
/// A specialized form of Cut(), which relocates a whole chain (this and the following,
/// in particular). During this process, only the minimum operations and notifications are done.
-SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
+SwLayoutFrame *SwFlowFrame::CutTree( SwFrame *pStart )
{
// Cut the Start and all the neighbours; they are chained together and
// a handle to the first one is returned. Residuals are invalidated
// as appropriate.
- SwLayoutFrm *pLay = pStart->GetUpper();
+ SwLayoutFrame *pLay = pStart->GetUpper();
if ( pLay->IsInFootnote() )
- pLay = pLay->FindFootnoteFrm();
+ pLay = pLay->FindFootnoteFrame();
// #i58846#
// <pPrepare( PREP_QUOVADIS )> only for frames in footnotes
if( pStart->IsInFootnote() )
{
- SwFrm* pTmp = pStart->GetIndPrev();
+ SwFrame* pTmp = pStart->GetIndPrev();
if( pTmp )
pTmp->Prepare( PREP_QUOVADIS );
}
@@ -391,35 +391,35 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
pStart->mpPrev = nullptr;
}
- if ( pLay->IsFootnoteFrm() )
+ if ( pLay->IsFootnoteFrame() )
{
if ( !pLay->Lower() && !pLay->IsColLocked() &&
- !static_cast<SwFootnoteFrm*>(pLay)->IsBackMoveLocked() )
+ !static_cast<SwFootnoteFrame*>(pLay)->IsBackMoveLocked() )
{
pLay->Cut();
- SwFrm::DestroyFrm(pLay);
+ SwFrame::DestroyFrame(pLay);
}
else
{
- bool bUnlock = !static_cast<SwFootnoteFrm*>(pLay)->IsBackMoveLocked();
- static_cast<SwFootnoteFrm*>(pLay)->LockBackMove();
+ bool bUnlock = !static_cast<SwFootnoteFrame*>(pLay)->IsBackMoveLocked();
+ static_cast<SwFootnoteFrame*>(pLay)->LockBackMove();
pLay->InvalidateSize();
- pLay->Calc(pLay->getRootFrm()->GetCurrShell()->GetOut());
- SwContentFrm *pCnt = pLay->ContainsContent();
+ pLay->Calc(pLay->getRootFrame()->GetCurrShell()->GetOut());
+ SwContentFrame *pCnt = pLay->ContainsContent();
while ( pCnt && pLay->IsAnLower( pCnt ) )
{
- // It's possible for the CntFrm to be locked, and we don't want
+ // It's possible for the ContentFrame to be locked, and we don't want
// to end up in an endless page migration, so we're not even
// going to call Calc!
- OSL_ENSURE( pCnt->IsTextFrm(), "The Graphic has landed." );
- if ( static_cast<SwTextFrm*>(pCnt)->IsLocked() ||
- static_cast<SwTextFrm*>(pCnt)->GetFollow() == pStart )
+ OSL_ENSURE( pCnt->IsTextFrame(), "The Graphic has landed." );
+ if ( static_cast<SwTextFrame*>(pCnt)->IsLocked() ||
+ static_cast<SwTextFrame*>(pCnt)->GetFollow() == pStart )
break;
- pCnt->Calc(pCnt->getRootFrm()->GetCurrShell()->GetOut());
- pCnt = pCnt->GetNextContentFrm();
+ pCnt->Calc(pCnt->getRootFrame()->GetCurrShell()->GetOut());
+ pCnt = pCnt->GetNextContentFrame();
}
if( bUnlock )
- static_cast<SwFootnoteFrm*>(pLay)->UnlockBackMove();
+ static_cast<SwFootnoteFrame*>(pLay)->UnlockBackMove();
}
pLay = nullptr;
}
@@ -428,10 +428,10 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart )
/// A specialized form of Paste(), which relocates a whole chain (this and the following,
/// in particular). During this process, only the minimum operations and notifications are done.
-bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
- SwFrm *pOldParent )
+bool SwFlowFrame::PasteTree( SwFrame *pStart, SwLayoutFrame *pParent, SwFrame *pSibling,
+ SwFrame *pOldParent )
{
- // returns true if there's a LayoutFrm in the chain.
+ // returns true if there's a LayoutFrame in the chain.
bool bRet = false;
// The chain beginning with pStart is inserted before pSibling
@@ -462,7 +462,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
//add the pStart after the last child.
// pParent->Lower()->pNext = pStart;
{
- SwFrm* pTemp = pParent->m_pLower;
+ SwFrame* pTemp = pParent->m_pLower;
while (pTemp)
{
if (pTemp->mpNext)
@@ -478,7 +478,7 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
//End modification for #i100782#,04/03/2009
// #i27145#
- if ( pParent->IsSctFrm() )
+ if ( pParent->IsSctFrame() )
{
// We have no sibling because pParent is a section frame and
// has just been created to contain some content. The printing
@@ -488,8 +488,8 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
pParent->InvalidateNextPrtArea();
}
}
- SwFrm *pFloat = pStart;
- SwFrm *pLst = nullptr;
+ SwFrame *pFloat = pStart;
+ SwFrame *pLst = nullptr;
SWRECTFN( pParent )
SwTwips nGrowVal = 0;
do
@@ -497,17 +497,17 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
pFloat->_InvalidateAll();
pFloat->CheckDirChange();
- // I'm a friend of the TextFrm and thus am allowed to do many things.
+ // I'm a friend of the TextFrame and thus am allowed to do many things.
// The CacheIdx idea seems to be a bit risky!
- if ( pFloat->IsTextFrm() )
+ if ( pFloat->IsTextFrame() )
{
- if ( static_cast<SwTextFrm*>(pFloat)->GetCacheIdx() != USHRT_MAX )
- static_cast<SwTextFrm*>(pFloat)->Init(); // I'm his friend.
+ if ( static_cast<SwTextFrame*>(pFloat)->GetCacheIdx() != USHRT_MAX )
+ static_cast<SwTextFrame*>(pFloat)->Init(); // I'm his friend.
}
else
bRet = true;
- nGrowVal += (pFloat->Frm().*fnRect->fnGetHeight)();
+ nGrowVal += (pFloat->Frame().*fnRect->fnGetHeight)();
if ( pFloat->GetNext() )
pFloat = pFloat->GetNext();
else
@@ -523,37 +523,37 @@ bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling,
pSibling->mpPrev = pLst;
if( pSibling->IsInFootnote() )
{
- if( pSibling->IsSctFrm() )
- pSibling = static_cast<SwSectionFrm*>(pSibling)->ContainsAny();
+ if( pSibling->IsSctFrame() )
+ pSibling = static_cast<SwSectionFrame*>(pSibling)->ContainsAny();
if( pSibling )
pSibling->Prepare( PREP_ERGOSUM );
}
}
if ( nGrowVal )
{
- if ( pOldParent && pOldParent->IsBodyFrm() ) // For variable page height while browsing
+ if ( pOldParent && pOldParent->IsBodyFrame() ) // For variable page height while browsing
pOldParent->Shrink( nGrowVal );
pParent->Grow( nGrowVal );
}
- if ( pParent->IsFootnoteFrm() )
- static_cast<SwFootnoteFrm*>(pParent)->InvalidateNxtFootnoteCnts( pParent->FindPageFrm() );
+ if ( pParent->IsFootnoteFrame() )
+ static_cast<SwFootnoteFrame*>(pParent)->InvalidateNxtFootnoteCnts( pParent->FindPageFrame() );
return bRet;
}
-void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
+void SwFlowFrame::MoveSubTree( SwLayoutFrame* pParent, SwFrame* pSibling )
{
OSL_ENSURE( pParent, "No parent given." );
OSL_ENSURE( m_rThis.GetUpper(), "Where are we coming from?" );
// Be economical with notifications if an action is running.
- SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
const SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
const bool bComplete = pImp && pImp->IsAction() && pImp->GetLayAction().IsComplete();
if ( !bComplete )
{
- SwFrm *pPre = m_rThis.GetIndPrev();
+ SwFrame *pPre = m_rThis.GetIndPrev();
if ( pPre )
{
pPre->SetRetouche();
@@ -572,28 +572,28 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
}
}
- SwPageFrm *pOldPage = m_rThis.FindPageFrm();
+ SwPageFrame *pOldPage = m_rThis.FindPageFrame();
- SwLayoutFrm *pOldParent;
+ SwLayoutFrame *pOldParent;
bool bInvaLay;
{
//JoinLock pParent for the lifetime of the Cut/Paste call to avoid
- //SwSectionFrm::MergeNext removing the pParent we're trying to reparent
+ //SwSectionFrame::MergeNext removing the pParent we're trying to reparent
//into
- FlowFrmJoinLockGuard aJoinGuard(pParent);
+ FlowFrameJoinLockGuard aJoinGuard(pParent);
pOldParent = CutTree( &m_rThis );
bInvaLay = PasteTree( &m_rThis, pParent, pSibling, pOldParent );
}
- // If, by cutting & pasting, an empty SectionFrm came into existence, it should
+ // If, by cutting & pasting, an empty SectionFrame came into existence, it should
// disappear automatically.
- SwSectionFrm *pSct;
+ SwSectionFrame *pSct;
// #126020# - adjust check for empty section
// #130797# - correct fix #126020#
if ( pOldParent && !pOldParent->Lower() &&
( pOldParent->IsInSct() &&
- !(pSct = pOldParent->FindSctFrm())->ContainsContent() &&
+ !(pSct = pOldParent->FindSctFrame())->ContainsContent() &&
!pSct->ContainsAny( true ) ) )
{
pSct->DelEmpty( false );
@@ -601,25 +601,25 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
// If we're in a column section, we'd rather not call Calc "from below"
if( !m_rThis.IsInSct() &&
- ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrm() && !m_rThis.GetUpper()->IsInTab() ) ) )
- m_rThis.GetUpper()->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
- else if( m_rThis.GetUpper()->IsSctFrm() )
+ ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrame() && !m_rThis.GetUpper()->IsInTab() ) ) )
+ m_rThis.GetUpper()->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
+ else if( m_rThis.GetUpper()->IsSctFrame() )
{
- SwSectionFrm* pTmpSct = static_cast<SwSectionFrm*>(m_rThis.GetUpper());
+ SwSectionFrame* pTmpSct = static_cast<SwSectionFrame*>(m_rThis.GetUpper());
bool bOld = pTmpSct->IsContentLocked();
pTmpSct->SetContentLock( true );
- pTmpSct->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
+ pTmpSct->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
if( !bOld )
pTmpSct->SetContentLock( false );
}
- SwPageFrm *pPage = m_rThis.FindPageFrm();
+ SwPageFrame *pPage = m_rThis.FindPageFrame();
if ( pOldPage != pPage )
{
m_rThis.InvalidatePage( pPage );
- if ( m_rThis.IsLayoutFrm() )
+ if ( m_rThis.IsLayoutFrame() )
{
- SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(&m_rThis)->ContainsContent();
+ SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(&m_rThis)->ContainsContent();
if ( pCnt )
pCnt->InvalidatePage( pPage );
}
@@ -629,13 +629,13 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling )
m_rThis._InvalidateLineNum();
}
}
- if ( bInvaLay || (pSibling && pSibling->IsLayoutFrm()) )
+ if ( bInvaLay || (pSibling && pSibling->IsLayoutFrame()) )
m_rThis.GetUpper()->InvalidatePage( pPage );
}
-bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
+bool SwFlowFrame::IsAnFollow( const SwFlowFrame *pAssumed ) const
{
- const SwFlowFrm *pFoll = this;
+ const SwFlowFrame *pFoll = this;
do
{ if ( pAssumed == pFoll )
return true;
@@ -644,31 +644,31 @@ bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const
return false;
}
-SwTextFrm* SwContentFrm::FindMaster() const
+SwTextFrame* SwContentFrame::FindMaster() const
{
- OSL_ENSURE( IsFollow(), "SwContentFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwContentFrame::FindMaster(): !IsFollow" );
- const SwContentFrm* pPrec = GetPrecede();
+ const SwContentFrame* pPrec = GetPrecede();
if ( pPrec && pPrec->HasFollow() && pPrec->GetFollow() == this )
{
- OSL_ENSURE( pPrec->IsTextFrm(), "NoTextFrm with follow found" );
- return const_cast<SwTextFrm*>(static_cast< const SwTextFrm* >(pPrec));
+ OSL_ENSURE( pPrec->IsTextFrame(), "NoTextFrame with follow found" );
+ return const_cast<SwTextFrame*>(static_cast< const SwTextFrame* >(pPrec));
}
OSL_FAIL( "Follow ist lost in Space." );
return nullptr;
}
-SwSectionFrm* SwSectionFrm::FindMaster() const
+SwSectionFrame* SwSectionFrame::FindMaster() const
{
- OSL_ENSURE( IsFollow(), "SwSectionFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwSectionFrame::FindMaster(): !IsFollow" );
if (!m_pSection)
return nullptr;
- SwIterator<SwSectionFrm,SwFormat> aIter( *m_pSection->GetFormat() );
- SwSectionFrm* pSect = aIter.First();
+ SwIterator<SwSectionFrame,SwFormat> aIter( *m_pSection->GetFormat() );
+ SwSectionFrame* pSect = aIter.First();
while ( pSect )
{
if (pSect->GetFollow() == this)
@@ -680,12 +680,12 @@ SwSectionFrm* SwSectionFrm::FindMaster() const
return nullptr;
}
-SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
+SwTabFrame* SwTabFrame::FindMaster( bool bFirstMaster ) const
{
- OSL_ENSURE( IsFollow(), "SwTabFrm::FindMaster(): !IsFollow" );
+ OSL_ENSURE( IsFollow(), "SwTabFrame::FindMaster(): !IsFollow" );
- SwIterator<SwTabFrm,SwFormat> aIter( *GetTable()->GetFrameFormat() );
- SwTabFrm* pTab = aIter.First();
+ SwIterator<SwTabFrame,SwFormat> aIter( *GetTable()->GetFrameFormat() );
+ SwTabFrame* pTab = aIter.First();
while ( pTab )
{
if ( bFirstMaster )
@@ -696,7 +696,7 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
if ( !pTab->IsFollow() )
{
- SwTabFrm* pNxt = pTab;
+ SwTabFrame* pNxt = pTab;
while ( pNxt )
{
if ( pNxt->GetFollow() == this )
@@ -722,21 +722,21 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const
* Returns the next/previous Layout leaf that's NOT below this (or even is this itself).
* Also, that leaf must be in the same text flow as the pAnch origin frame (Body, Footnote)
*/
-const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd,
- const SwFrm *pAnch ) const
+const SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, bool bFwd,
+ const SwFrame *pAnch ) const
{
// No flow, no joy...
if ( !(IsInDocBody() || IsInFootnote() || IsInFly()) )
return nullptr;
- const SwFrm *pLeaf = this;
+ const SwFrame *pLeaf = this;
bool bFound = false;
do
- { pLeaf = const_cast<SwFrm*>(pLeaf)->GetLeaf( eMakePage, bFwd );
+ { pLeaf = const_cast<SwFrame*>(pLeaf)->GetLeaf( eMakePage, bFwd );
if ( pLeaf &&
- (!IsLayoutFrm() || !static_cast<const SwLayoutFrm*>(this)->IsAnLower( pLeaf )))
+ (!IsLayoutFrame() || !static_cast<const SwLayoutFrame*>(this)->IsAnLower( pLeaf )))
{
if ( pAnch->IsInDocBody() == pLeaf->IsInDocBody() &&
pAnch->IsInFootnote() == pLeaf->IsInFootnote() )
@@ -746,10 +746,10 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd,
}
} while ( !bFound && pLeaf );
- return static_cast<const SwLayoutFrm*>(pLeaf);
+ return static_cast<const SwLayoutFrame*>(pLeaf);
}
-SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd )
+SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, bool bFwd )
{
if ( IsInFootnote() )
return bFwd ? GetNextFootnoteLeaf( eMakePage ) : GetPrevFootnoteLeaf( eMakePage );
@@ -761,27 +761,27 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd )
bool bInSct( IsInSct() );
if ( bInTab && bInSct )
{
- const SwFrm* pUpperFrm( GetUpper() );
- while ( pUpperFrm )
+ const SwFrame* pUpperFrame( GetUpper() );
+ while ( pUpperFrame )
{
- if ( pUpperFrm->IsTabFrm() )
+ if ( pUpperFrame->IsTabFrame() )
{
// the table is the first.
bInSct = false;
break;
}
- else if ( pUpperFrm->IsSctFrm() )
+ else if ( pUpperFrame->IsSctFrame() )
{
// the section is the first.
bInTab = false;
break;
}
- pUpperFrm = pUpperFrm->GetUpper();
+ pUpperFrame = pUpperFrame->GetUpper();
}
}
- if ( bInTab && ( !IsTabFrm() || GetUpper()->IsCellFrm() ) ) // TABLE IN TABLE
+ if ( bInTab && ( !IsTabFrame() || GetUpper()->IsCellFrame() ) ) // TABLE IN TABLE
return bFwd ? GetNextCellLeaf( eMakePage ) : GetPrevCellLeaf( eMakePage );
if ( bInSct )
@@ -790,7 +790,7 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, bool bFwd )
return bFwd ? GetNextLeaf( eMakePage ) : GetPrevLeaf( eMakePage );
}
-bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
+bool SwFrame::WrongPageDesc( SwPageFrame* pNew )
{
// Now it's getting a bit complicated:
@@ -818,7 +818,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
//My Pagedesc doesn't count if I'm a follow!
SwPageDesc *pDesc = nullptr;
int nTmp = 0;
- SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( this );
+ SwFlowFrame *pFlow = SwFlowFrame::CastFlowFrame( this );
if ( !pFlow || !pFlow->IsFollow() )
{
pDesc = const_cast<SwPageDesc*>(rFormatDesc.GetPageDesc());
@@ -842,14 +842,14 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
bool bFirst = pNew->OnFirstPage();
- const SwFlowFrm *pNewFlow = pNew->FindFirstBodyContent();
+ const SwFlowFrame *pNewFlow = pNew->FindFirstBodyContent();
// Did we find ourselves?
if( pNewFlow == pFlow )
pNewFlow = nullptr;
- if ( pNewFlow && pNewFlow->GetFrm().IsInTab() )
- pNewFlow = pNewFlow->GetFrm().FindTabFrm();
+ if ( pNewFlow && pNewFlow->GetFrame().IsInTab() )
+ pNewFlow = pNewFlow->GetFrame().FindTabFrame();
const SwPageDesc *pNewDesc= ( pNewFlow && !pNewFlow->IsFollow() )
- ? pNewFlow->GetFrm().GetAttrSet()->GetPageDesc().GetPageDesc() : nullptr;
+ ? pNewFlow->GetFrame().GetAttrSet()->GetPageDesc().GetPageDesc() : nullptr;
return (pNew->GetPageDesc() != pDesc) // own desc ?
|| (pNew->GetFormat() !=
@@ -858,7 +858,7 @@ bool SwFrm::WrongPageDesc( SwPageFrm* pNew )
}
/// Returns the next layout leaf in which we can move the frame.
-SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
+SwLayoutFrame *SwFrame::GetNextLeaf( MakePageType eMakePage )
{
OSL_ENSURE( !IsInFootnote(), "GetNextLeaf(), don't call me for Footnote." );
OSL_ENSURE( !IsInSct(), "GetNextLeaf(), don't call me for Sections." );
@@ -873,17 +873,17 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
// For tables, we just take the big leap. A simple GetNext would
// iterate through the first cells and, in turn, all other cells.
- SwLayoutFrm *pLayLeaf = nullptr;
- if ( IsTabFrm() )
+ SwLayoutFrame *pLayLeaf = nullptr;
+ if ( IsTabFrame() )
{
- SwContentFrm* pTmp = static_cast<SwTabFrm*>(this)->FindLastContent();
+ SwContentFrame* pTmp = static_cast<SwTabFrame*>(this)->FindLastContent();
if ( pTmp )
pLayLeaf = pTmp->GetUpper();
}
if ( !pLayLeaf )
pLayLeaf = GetNextLayoutLeaf();
- SwLayoutFrm *pOldLayLeaf = nullptr; // Make sure that we don't have to
+ SwLayoutFrame *pOldLayLeaf = nullptr; // Make sure that we don't have to
// start searching from top when we
// have a freshly created page.
bool bNewPg = false; // Only insert a new page once.
@@ -892,11 +892,11 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
if ( pLayLeaf )
{
- // There's yet another LayoutFrm. Let's see if it's ready to host
+ // There's yet another LayoutFrame. Let's see if it's ready to host
// me as well.
// It only needs to be of the same kind like my starting point
// (DocBody or Footnote respectively)
- if ( pLayLeaf->FindPageFrm()->IsFootnotePage() )
+ if ( pLayLeaf->FindPageFrame()->IsFootnotePage() )
{ // If I ended up at the end note pages, we're done.
pLayLeaf = nullptr;
continue;
@@ -914,14 +914,14 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
// during a page break, the page type isn't the desired one. In that
// case we have to insert a page of the correct type.
- if( !IsFlowFrm() && ( eMakePage == MAKEPAGE_NONE ||
+ if( !IsFlowFrame() && ( eMakePage == MAKEPAGE_NONE ||
eMakePage==MAKEPAGE_APPEND || eMakePage==MAKEPAGE_NOSECTION ) )
return pLayLeaf;
- SwPageFrm *pNew = pLayLeaf->FindPageFrm();
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwPageFrame *pNew = pLayLeaf->FindPageFrame();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
// #111704# The pagedesc check does not make sense for frames in fly frames
- if ( pNew != FindPageFrm() && !bNewPg && !IsInFly() &&
+ if ( pNew != FindPageFrame() && !bNewPg && !IsInFly() &&
// #i46683#
// Do not consider page descriptions in browse mode (since
// MoveBwd ignored them)
@@ -929,13 +929,13 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
if( WrongPageDesc( pNew ) )
{
- SwFootnoteContFrm *pCont = pNew->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pNew->FindFootnoteCont();
if( pCont )
{
// If the reference of the first footnote of this page
// lies before the page, we'd rather not insert a new page.
// (Bug #55620#)
- SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower());
if( pFootnote && pFootnote->GetRef() )
{
const sal_uInt16 nRefNum = pNew->GetPhyPageNum();
@@ -949,14 +949,14 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
{
bNewPg = true;
- SwPageFrm *pPg = pOldLayLeaf ?
- pOldLayLeaf->FindPageFrm() : nullptr;
+ SwPageFrame *pPg = pOldLayLeaf ?
+ pOldLayLeaf->FindPageFrame() : nullptr;
if ( pPg && pPg->IsEmptyPage() )
// Don't insert behind. Insert before the EmptyPage.
- pPg = static_cast<SwPageFrm*>(pPg->GetPrev());
+ pPg = static_cast<SwPageFrame*>(pPg->GetPrev());
if ( !pPg || pPg == pNew )
- pPg = FindPageFrm();
+ pPg = FindPageFrame();
InsertPage( pPg, false );
pLayLeaf = GetNextLayoutLeaf();
@@ -971,12 +971,12 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
}
else
{
- // There's no other matching LayoutFrm, so we have to insert
+ // There's no other matching LayoutFrame, so we have to insert
// a new page.
if ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT )
{
InsertPage(
- pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
+ pOldLayLeaf ? pOldLayLeaf->FindPageFrame() : FindPageFrame(),
false );
// And again from the start.
@@ -990,7 +990,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage )
}
/// Returns the previous layout leaf where we can move the frame.
-SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
+SwLayoutFrame *SwFrame::GetPrevLeaf( MakePageType )
{
OSL_ENSURE( !IsInFootnote(), "GetPrevLeaf(), don't call me for Footnote." );
@@ -998,8 +998,8 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
// I want to end up in the body.
const bool bFly = IsInFly();
- SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
- SwLayoutFrm *pPrevLeaf = nullptr;
+ SwLayoutFrame *pLayLeaf = GetPrevLayoutLeaf();
+ SwLayoutFrame *pPrevLeaf = nullptr;
while ( pLayLeaf )
{
@@ -1013,7 +1013,7 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
}
else if ( bFly )
break; //Contents in Flys should accept any layout leaf.
@@ -1023,37 +1023,37 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType )
return pLayLeaf ? pLayLeaf : pPrevLeaf;
}
-bool SwFlowFrm::IsPrevObjMove() const
+bool SwFlowFrame::IsPrevObjMove() const
{
- // true: The FlowFrm must respect the a border of the predecessor, also needs
+ // true: The FlowFrame must respect the a border of the predecessor, also needs
// to insert a break if required.
//!!!!!!!!!!!Hack!!!!!!!!!!!
- const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
return false;
- SwFrm *pPre = m_rThis.FindPrev();
+ SwFrame *pPre = m_rThis.FindPrev();
if ( pPre && pPre->GetDrawObjs() )
{
- OSL_ENSURE( SwFlowFrm::CastFlowFrm( pPre ), "new flowfrm?" );
- if( SwFlowFrm::CastFlowFrm( pPre )->IsAnFollow( this ) )
+ OSL_ENSURE( SwFlowFrame::CastFlowFrame( pPre ), "new flowfrm?" );
+ if( SwFlowFrame::CastFlowFrame( pPre )->IsAnFollow( this ) )
return false;
- SwLayoutFrm* pPreUp = pPre->GetUpper();
- // If the upper is a SectionFrm, or a column of a SectionFrm, we're
+ SwLayoutFrame* pPreUp = pPre->GetUpper();
+ // If the upper is a SectionFrame, or a column of a SectionFrame, we're
// allowed to protrude out of it. However, we need to respect the
- // Upper of the SectionFrm.
+ // Upper of the SectionFrame.
if( pPreUp->IsInSct() )
{
- if( pPreUp->IsSctFrm() )
+ if( pPreUp->IsSctFrame() )
pPreUp = pPreUp->GetUpper();
- else if( pPreUp->IsColBodyFrm() &&
- pPreUp->GetUpper()->GetUpper()->IsSctFrm() )
+ else if( pPreUp->IsColBodyFrame() &&
+ pPreUp->GetUpper()->GetUpper()->IsSctFrame() )
pPreUp = pPreUp->GetUpper()->GetUpper()->GetUpper();
}
// #i26945# - re-factoring
- // use <GetVertPosOrientFrm()> to determine, if object has followed the
+ // use <GetVertPosOrientFrame()> to determine, if object has followed the
// text flow to the next layout frame
for ( size_t i = 0; i < pPre->GetDrawObjs()->size(); ++i )
{
@@ -1067,10 +1067,10 @@ bool SwFlowFrm::IsPrevObjMove() const
pObj->GetDrawObj()->GetLayer() ) &&
pObj->GetFrameFormat().GetFollowTextFlow().GetValue() )
{
- const SwLayoutFrm* pVertPosOrientFrm = pObj->GetVertPosOrientFrm();
- if ( pVertPosOrientFrm &&
- pPreUp != pVertPosOrientFrm &&
- !pPreUp->IsAnLower( pVertPosOrientFrm ) )
+ const SwLayoutFrame* pVertPosOrientFrame = pObj->GetVertPosOrientFrame();
+ if ( pVertPosOrientFrame &&
+ pPreUp != pVertPosOrientFrame &&
+ !pPreUp->IsAnLower( pVertPosOrientFrame ) )
{
return true;
}
@@ -1081,7 +1081,7 @@ bool SwFlowFrm::IsPrevObjMove() const
}
/**
-|* If there's a hard page break before the Frm AND there's a
+|* If there's a hard page break before the Frame AND there's a
|* predecessor on the same page, true is returned (we need to create a
|* new PageBreak). Otherwise, returns false.
|* If bAct is set to true, this function returns true if
@@ -1092,34 +1092,34 @@ bool SwFlowFrm::IsPrevObjMove() const
|* need to think further.
|* Also, a page break (or the need for one) is also present if
|* the FrameFormat contains a PageDesc.
-|* The implementation works only on ContentFrms! - the definition
-|* of the predecessor is not clear for LayoutFrms.
+|* The implementation works only on ContentFrames! - the definition
+|* of the predecessor is not clear for LayoutFrames.
|*/
-bool SwFlowFrm::IsPageBreak( bool bAct ) const
+bool SwFlowFrame::IsPageBreak( bool bAct ) const
{
if ( !IsFollow() && m_rThis.IsInDocBody() &&
- ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrm() && !m_rThis.GetUpper()->IsInTab() ) ) ) // i66968
+ ( !m_rThis.IsInTab() || ( m_rThis.IsTabFrame() && !m_rThis.GetUpper()->IsInTab() ) ) ) // i66968
{
- const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
return false;
const SwAttrSet *pSet = m_rThis.GetAttrSet();
// Determine predecessor
- const SwFrm *pPrev = m_rThis.FindPrev();
+ const SwFrame *pPrev = m_rThis.FindPrev();
while ( pPrev && ( !pPrev->IsInDocBody() ||
- ( pPrev->IsTextFrm() && static_cast<const SwTextFrm*>(pPrev)->IsHiddenNow() ) ) )
+ ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) )
pPrev = pPrev->FindPrev();
if ( pPrev )
{
OSL_ENSURE( pPrev->IsInDocBody(), "IsPageBreak: Not in DocBody?" );
if ( bAct )
- { if ( m_rThis.FindPageFrm() == pPrev->FindPageFrm() )
+ { if ( m_rThis.FindPageFrame() == pPrev->FindPageFrame() )
return false;
}
else
- { if ( m_rThis.FindPageFrm() != pPrev->FindPageFrm() )
+ { if ( m_rThis.FindPageFrame() != pPrev->FindPageFrame() )
return false;
}
@@ -1140,7 +1140,7 @@ bool SwFlowFrm::IsPageBreak( bool bAct ) const
}
/**
-|* If there's a hard column break before the Frm AND there is
+|* If there's a hard column break before the Frame AND there is
|* a predecessor in the same column, we return true (we need to create
|* a ColBreak). Otherwise, we return false.
|* If bAct is set to true, we return true if there's a ColBreak.
@@ -1149,30 +1149,30 @@ bool SwFlowFrm::IsPageBreak( bool bAct ) const
|* The column break is in it's own FrameFormat (BEFORE) or in the FrameFormat of the
|* predecessor (AFTER). If there's no predecessor in the column, we don't
|* need to think further.
-|* The implementation works only on ContentFrms! - the definition
-|* of the predecessor is not clear for LayoutFrms.
+|* The implementation works only on ContentFrames! - the definition
+|* of the predecessor is not clear for LayoutFrames.
|*/
-bool SwFlowFrm::IsColBreak( bool bAct ) const
+bool SwFlowFrame::IsColBreak( bool bAct ) const
{
if ( !IsFollow() && (m_rThis.IsMoveable() || bAct) )
{
- const SwFrm *pCol = m_rThis.FindColFrm();
+ const SwFrame *pCol = m_rThis.FindColFrame();
if ( pCol )
{
// Determine predecessor
- const SwFrm *pPrev = m_rThis.FindPrev();
+ const SwFrame *pPrev = m_rThis.FindPrev();
while( pPrev && ( ( !pPrev->IsInDocBody() && !m_rThis.IsInFly() ) ||
- ( pPrev->IsTextFrm() && static_cast<const SwTextFrm*>(pPrev)->IsHiddenNow() ) ) )
+ ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) )
pPrev = pPrev->FindPrev();
if ( pPrev )
{
if ( bAct )
- { if ( pCol == pPrev->FindColFrm() )
+ { if ( pCol == pPrev->FindColFrame() )
return false;
}
else
- { if ( pCol != pPrev->FindColFrm() )
+ { if ( pCol != pPrev->FindColFrame() )
return false;
}
@@ -1193,32 +1193,32 @@ bool SwFlowFrm::IsColBreak( bool bAct ) const
return false;
}
-bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const
+bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const
{
if( m_rThis.IsInSct() )
{
- const SwFrm* pTmp = m_rThis.GetUpper();
+ const SwFrame* pTmp = m_rThis.GetUpper();
while( pTmp )
{
- if( pTmp->IsCellFrm() || pTmp->IsFlyFrm() ||
- pTmp->IsFooterFrm() || pTmp->IsHeaderFrm() ||
- ( pTmp->IsFootnoteFrm() && !static_cast<const SwFootnoteFrm*>(pTmp)->GetMaster() ) )
+ if( pTmp->IsCellFrame() || pTmp->IsFlyFrame() ||
+ pTmp->IsFooterFrame() || pTmp->IsHeaderFrame() ||
+ ( pTmp->IsFootnoteFrame() && !static_cast<const SwFootnoteFrame*>(pTmp)->GetMaster() ) )
return true;
- if( pTmp->IsPageFrm() )
+ if( pTmp->IsPageFrame() )
return !( pTmp->GetPrev() && !IsPageBreak(true) );
- if( pTmp->IsColumnFrm() && pTmp->GetPrev() )
+ if( pTmp->IsColumnFrame() && pTmp->GetPrev() )
return IsColBreak( true );
- if( pTmp->IsSctFrm() && ( !bSct || pTmp->GetPrev() ) )
+ if( pTmp->IsSctFrame() && ( !bSct || pTmp->GetPrev() ) )
return false;
pTmp = pTmp->GetUpper();
}
OSL_FAIL( "HasParaSpaceAtPages: Where's my page?" );
return false;
}
- if( !m_rThis.IsInDocBody() || ( m_rThis.IsInTab() && !m_rThis.IsTabFrm()) ||
- IsPageBreak( true ) || ( m_rThis.FindColFrm() && IsColBreak( true ) ) )
+ if( !m_rThis.IsInDocBody() || ( m_rThis.IsInTab() && !m_rThis.IsTabFrame()) ||
+ IsPageBreak( true ) || ( m_rThis.FindColFrame() && IsColBreak( true ) ) )
return true;
- const SwFrm* pTmp = m_rThis.FindColFrm();
+ const SwFrame* pTmp = m_rThis.FindColFrame();
if( pTmp )
{
if( pTmp->GetPrev() )
@@ -1226,7 +1226,7 @@ bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const
}
else
pTmp = &m_rThis;
- pTmp = pTmp->FindPageFrm();
+ pTmp = pTmp->FindPageFrame();
return pTmp && !pTmp->GetPrev();
}
@@ -1235,102 +1235,102 @@ bool SwFlowFrm::HasParaSpaceAtPages( bool bSct ) const
OD 2004-03-10 #i11860#
*/
-const SwFrm* SwFlowFrm::_GetPrevFrmForUpperSpaceCalc( const SwFrm* _pProposedPrevFrm ) const
+const SwFrame* SwFlowFrame::_GetPrevFrameForUpperSpaceCalc( const SwFrame* _pProposedPrevFrame ) const
{
- const SwFrm* pPrevFrm = _pProposedPrevFrm
- ? _pProposedPrevFrm
+ const SwFrame* pPrevFrame = _pProposedPrevFrame
+ ? _pProposedPrevFrame
: m_rThis.GetPrev();
// Skip hidden paragraphs and empty sections
- while ( pPrevFrm &&
- ( ( pPrevFrm->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) ||
- ( pPrevFrm->IsSctFrm() &&
- !static_cast<const SwSectionFrm*>(pPrevFrm)->GetSection() ) ) )
+ while ( pPrevFrame &&
+ ( ( pPrevFrame->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ||
+ ( pPrevFrame->IsSctFrame() &&
+ !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) )
{
- pPrevFrm = pPrevFrm->GetPrev();
+ pPrevFrame = pPrevFrame->GetPrev();
}
// Special case: no direct previous frame is found but frame is in footnote
// Search for a previous frame in previous footnote,
// if frame isn't in a section, which is also in the footnote
- if ( !pPrevFrm && m_rThis.IsInFootnote() &&
- ( m_rThis.IsSctFrm() ||
- !m_rThis.IsInSct() || !m_rThis.FindSctFrm()->IsInFootnote() ) )
+ if ( !pPrevFrame && m_rThis.IsInFootnote() &&
+ ( m_rThis.IsSctFrame() ||
+ !m_rThis.IsInSct() || !m_rThis.FindSctFrame()->IsInFootnote() ) )
{
- const SwFootnoteFrm* pPrevFootnoteFrm =
- static_cast<const SwFootnoteFrm*>(m_rThis.FindFootnoteFrm()->GetPrev());
- if ( pPrevFootnoteFrm )
+ const SwFootnoteFrame* pPrevFootnoteFrame =
+ static_cast<const SwFootnoteFrame*>(m_rThis.FindFootnoteFrame()->GetPrev());
+ if ( pPrevFootnoteFrame )
{
- pPrevFrm = pPrevFootnoteFrm->GetLastLower();
+ pPrevFrame = pPrevFootnoteFrame->GetLastLower();
// Skip hidden paragraphs and empty sections
- while ( pPrevFrm &&
- ( ( pPrevFrm->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) ||
- ( pPrevFrm->IsSctFrm() &&
- !static_cast<const SwSectionFrm*>(pPrevFrm)->GetSection() ) ) )
+ while ( pPrevFrame &&
+ ( ( pPrevFrame->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ||
+ ( pPrevFrame->IsSctFrame() &&
+ !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) )
{
- pPrevFrm = pPrevFrm->GetPrev();
+ pPrevFrame = pPrevFrame->GetPrev();
}
}
}
// Special case: found previous frame is a section
// Search for the last content in the section
- if( pPrevFrm && pPrevFrm->IsSctFrm() )
+ if( pPrevFrame && pPrevFrame->IsSctFrame() )
{
- const SwSectionFrm* pPrevSectFrm =
- static_cast<const SwSectionFrm*>(pPrevFrm);
- pPrevFrm = pPrevSectFrm->FindLastContent();
+ const SwSectionFrame* pPrevSectFrame =
+ static_cast<const SwSectionFrame*>(pPrevFrame);
+ pPrevFrame = pPrevSectFrame->FindLastContent();
// If the last content is in a table _inside_ the section,
// take the table herself.
// OD 2004-02-18 #106629# - correction:
// Check directly, if table is inside table, instead of indirectly
// by checking, if section isn't inside a table
- if ( pPrevFrm && pPrevFrm->IsInTab() )
+ if ( pPrevFrame && pPrevFrame->IsInTab() )
{
- const SwTabFrm* pTableFrm = pPrevFrm->FindTabFrm();
- if ( pPrevSectFrm->IsAnLower( pTableFrm ) )
+ const SwTabFrame* pTableFrame = pPrevFrame->FindTabFrame();
+ if ( pPrevSectFrame->IsAnLower( pTableFrame ) )
{
- pPrevFrm = pTableFrm;
+ pPrevFrame = pTableFrame;
}
}
// OD 2004-02-18 #106629# correction: skip hidden text frames
- while ( pPrevFrm &&
- pPrevFrm->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() )
+ while ( pPrevFrame &&
+ pPrevFrame->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() )
{
- pPrevFrm = pPrevFrm->GetPrev();
+ pPrevFrame = pPrevFrame->GetPrev();
}
}
- return pPrevFrm;
+ return pPrevFrame;
}
/// Compare styles attached to these text frames.
-static bool lcl_IdenticalStyles(const SwFrm* pPrevFrm, const SwFrm* pFrm)
+static bool lcl_IdenticalStyles(const SwFrame* pPrevFrame, const SwFrame* pFrame)
{
SwTextFormatColl *pPrevFormatColl = nullptr;
- if (pPrevFrm && pPrevFrm->IsTextFrm())
+ if (pPrevFrame && pPrevFrame->IsTextFrame())
{
- const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pPrevFrm );
- pPrevFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrm->GetTextNode()->GetFormatColl());
+ const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pPrevFrame );
+ pPrevFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrame->GetTextNode()->GetFormatColl());
}
bool bIdenticalStyles = false;
- if (pFrm && pFrm->IsTextFrm())
+ if (pFrame && pFrame->IsTextFrame())
{
- const SwTextFrm *pTextFrm = static_cast< const SwTextFrm * >( pFrm );
- SwTextFormatColl *pFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrm->GetTextNode()->GetFormatColl());
+ const SwTextFrame *pTextFrame = static_cast< const SwTextFrame * >( pFrame );
+ SwTextFormatColl *pFormatColl = dynamic_cast<SwTextFormatColl*>(pTextFrame->GetTextNode()->GetFormatColl());
bIdenticalStyles = pPrevFormatColl == pFormatColl;
}
return bIdenticalStyles;
}
-static bool lcl_getContextualSpacing(const SwFrm* pPrevFrm)
+static bool lcl_getContextualSpacing(const SwFrame* pPrevFrame)
{
bool bRet;
- auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pPrevFrm);
+ auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pPrevFrame);
const SwBorderAttrs *pAttrs = pAccess->Get();
bRet = pAttrs->GetULSpace().GetContext();
@@ -1339,20 +1339,20 @@ static bool lcl_getContextualSpacing(const SwFrm* pPrevFrm)
}
// OD 2004-03-12 #i11860# - add 3rd parameter <_bConsiderGrid>
-SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
- const SwFrm* pPr,
+SwTwips SwFlowFrame::CalcUpperSpace( const SwBorderAttrs *pAttrs,
+ const SwFrame* pPr,
const bool _bConsiderGrid ) const
{
- // OD 2004-03-10 #i11860# - use new method <GetPrevFrmForUpperSpaceCalc(..)>
- const SwFrm* pPrevFrm = _GetPrevFrmForUpperSpaceCalc( pPr );
+ // OD 2004-03-10 #i11860# - use new method <GetPrevFrameForUpperSpaceCalc(..)>
+ const SwFrame* pPrevFrame = _GetPrevFrameForUpperSpaceCalc( pPr );
std::unique_ptr<SwBorderAttrAccess> pAccess;
- SwFrm* pOwn;
+ SwFrame* pOwn;
if( !pAttrs )
{
- if( m_rThis.IsSctFrm() )
+ if( m_rThis.IsSctFrame() )
{
- SwSectionFrm* pFoll = &static_cast<SwSectionFrm&>(m_rThis);
+ SwSectionFrame* pFoll = &static_cast<SwSectionFrame&>(m_rThis);
do
pOwn = pFoll->ContainsAny();
while( !pOwn && nullptr != ( pFoll = pFoll->GetFollow() ) );
@@ -1361,7 +1361,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
}
else
pOwn = &m_rThis;
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pOwn);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pOwn);
pAttrs = pAccess->Get();
}
else
@@ -1373,7 +1373,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
{
const IDocumentSettingAccess& rIDSA = m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess();
const bool bUseFormerLineSpacing = rIDSA.get(DocumentSettingId::OLD_LINE_SPACING);
- if( pPrevFrm )
+ if( pPrevFrame )
{
// OD 2004-03-10 #i11860# - use new method to determine needed spacing
// values of found previous frame and use these values.
@@ -1381,7 +1381,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
SwTwips nPrevLineSpacing = 0;
// #i102458#
bool bPrevLineSpacingPorportional = false;
- GetSpacingValuesOfFrm( (*pPrevFrm),
+ GetSpacingValuesOfFrame( (*pPrevFrame),
nPrevLowerSpace, nPrevLineSpacing,
bPrevLineSpacingPorportional );
if( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX) )
@@ -1393,9 +1393,9 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
if ( bUseFormerLineSpacing )
{
// former consideration
- if ( pOwn->IsTextFrm() )
+ if ( pOwn->IsTextFrame() )
{
- nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace() );
+ nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace() );
}
nUpper += nAdd;
}
@@ -1406,7 +1406,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// text frame is considered for the upper spacing and
// the line spacing values are add up instead of
// building its maximum.
- if ( pOwn->IsTextFrm() )
+ if ( pOwn->IsTextFrame() )
{
// #i102458#
// Correction:
@@ -1417,11 +1417,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// spacing is built.
if ( bPrevLineSpacingPorportional )
{
- nAdd += static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true );
+ nAdd += static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true );
}
else
{
- nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ) );
}
}
nUpper += nAdd;
@@ -1436,8 +1436,8 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
if ( bUseFormerLineSpacing )
{
// former consideration
- if ( pOwn->IsTextFrm() )
- nUpper = std::max( nUpper, static_cast<SwTextFrm*>(pOwn)->GetLineSpace() );
+ if ( pOwn->IsTextFrame() )
+ nUpper = std::max( nUpper, static_cast<SwTextFrame*>(pOwn)->GetLineSpace() );
if ( nPrevLineSpacing != 0 )
{
nUpper = std::max( nUpper, nPrevLineSpacing );
@@ -1452,7 +1452,7 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// the paragraph spacing instead of building the
// maximum of the line spacings and the paragraph spacing.
SwTwips nAdd = nPrevLineSpacing;
- if ( pOwn->IsTextFrm() )
+ if ( pOwn->IsTextFrame() )
{
// #i102458#
// Correction:
@@ -1463,11 +1463,11 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
// spacing is built.
if ( bPrevLineSpacingPorportional )
{
- nAdd += static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true );
+ nAdd += static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true );
}
else
{
- nAdd = std::max( nAdd, static_cast<SwTextFrm*>(pOwn)->GetLineSpace( true ) );
+ nAdd = std::max( nAdd, static_cast<SwTextFrame*>(pOwn)->GetLineSpace( true ) );
}
}
nUpper += nAdd;
@@ -1475,16 +1475,16 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
}
}
else if ( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES) &&
- CastFlowFrm( pOwn )->HasParaSpaceAtPages( m_rThis.IsSctFrm() ) )
+ CastFlowFrame( pOwn )->HasParaSpaceAtPages( m_rThis.IsSctFrame() ) )
{
nUpper = pAttrs->GetULSpace().GetUpper();
}
}
- // OD 2004-02-26 #i25029# - pass previous frame <pPrevFrm>
+ // OD 2004-02-26 #i25029# - pass previous frame <pPrevFrame>
// to method <GetTopLine(..)>, if parameter <pPr> is set.
- // Note: parameter <pPr> is set, if method is called from <SwTextFrm::WouldFit(..)>
- nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrm : nullptr) );
+ // Note: parameter <pPr> is set, if method is called from <SwTextFrame::WouldFit(..)>
+ nUpper += pAttrs->GetTopLine( m_rThis, (pPr ? pPrevFrame : nullptr) );
// OD 2004-03-12 #i11860# - consider value of new parameter <_bConsiderGrid>
// and use new method <GetUpperSpaceAmountConsideredForPageGrid(..)>
@@ -1497,8 +1497,8 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
const bool bContextualSpacing = pAttrs->GetULSpace().GetContext();
- if (bContextualSpacing && pPrevFrm && lcl_getContextualSpacing(pPrevFrm)
- && lcl_IdenticalStyles(pPrevFrm, &m_rThis))
+ if (bContextualSpacing && pPrevFrame && lcl_getContextualSpacing(pPrevFrame)
+ && lcl_IdenticalStyles(pPrevFrame, &m_rThis))
{
return 0;
}
@@ -1512,27 +1512,27 @@ SwTwips SwFlowFrm::CalcUpperSpace( const SwBorderAttrs *pAttrs,
OD 2004-03-12 #i11860#
Precondition: Position of frame is valid.
*/
-SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid(
+SwTwips SwFlowFrame::_GetUpperSpaceAmountConsideredForPageGrid(
const SwTwips _nUpperSpaceWithoutGrid ) const
{
SwTwips nUpperSpaceAmountConsideredForPageGrid = 0;
if ( m_rThis.IsInDocBody() && m_rThis.GetAttrSet()->GetParaGrid().GetValue() )
{
- const SwPageFrm* pPageFrm = m_rThis.FindPageFrm();
- SwTextGridItem const*const pGrid(GetGridItem(pPageFrm));
+ const SwPageFrame* pPageFrame = m_rThis.FindPageFrame();
+ SwTextGridItem const*const pGrid(GetGridItem(pPageFrame));
if( pGrid )
{
- const SwFrm* pBodyFrm = pPageFrm->FindBodyCont();
- if ( pBodyFrm )
+ const SwFrame* pBodyFrame = pPageFrame->FindBodyCont();
+ if ( pBodyFrame )
{
const long nGridLineHeight =
pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SWRECTFN( (&m_rThis) )
- const SwTwips nBodyPrtTop = (pBodyFrm->*fnRect->fnGetPrtTop)();
+ const SwTwips nBodyPrtTop = (pBodyFrame->*fnRect->fnGetPrtTop)();
const SwTwips nProposedPrtTop =
- (*fnRect->fnYInc)( (m_rThis.Frm().*fnRect->fnGetTop)(),
+ (*fnRect->fnYInc)( (m_rThis.Frame().*fnRect->fnGetTop)(),
_nUpperSpaceWithoutGrid );
const SwTwips nSpaceAbovePrtTop =
@@ -1548,13 +1548,13 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid(
const SwTwips nNewUpperSpace =
(*fnRect->fnYDiff)( nNewPrtTop,
- (m_rThis.Frm().*fnRect->fnGetTop)() );
+ (m_rThis.Frame().*fnRect->fnGetTop)() );
nUpperSpaceAmountConsideredForPageGrid =
nNewUpperSpace - _nUpperSpaceWithoutGrid;
OSL_ENSURE( nUpperSpaceAmountConsideredForPageGrid >= 0,
- "<SwFlowFrm::GetUpperSpaceAmountConsideredForPageGrid(..)> - negative space considered for page grid!" );
+ "<SwFlowFrame::GetUpperSpaceAmountConsideredForPageGrid(..)> - negative space considered for page grid!" );
}
}
}
@@ -1566,34 +1566,34 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPageGrid(
OD 2004-03-11 #i11860#
*/
-SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPrevFrm() const
+SwTwips SwFlowFrame::_GetUpperSpaceAmountConsideredForPrevFrame() const
{
- SwTwips nUpperSpaceAmountOfPrevFrm = 0;
+ SwTwips nUpperSpaceAmountOfPrevFrame = 0;
- const SwFrm* pPrevFrm = _GetPrevFrmForUpperSpaceCalc();
- if ( pPrevFrm )
+ const SwFrame* pPrevFrame = _GetPrevFrameForUpperSpaceCalc();
+ if ( pPrevFrame )
{
SwTwips nPrevLowerSpace = 0;
SwTwips nPrevLineSpacing = 0;
// #i102458#
bool bDummy = false;
- GetSpacingValuesOfFrm( (*pPrevFrm), nPrevLowerSpace, nPrevLineSpacing, bDummy );
+ GetSpacingValuesOfFrame( (*pPrevFrame), nPrevLowerSpace, nPrevLineSpacing, bDummy );
if ( nPrevLowerSpace > 0 || nPrevLineSpacing > 0 )
{
const IDocumentSettingAccess& rIDSA = m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess();
if ( rIDSA.get(DocumentSettingId::PARA_SPACE_MAX) ||
!rIDSA.get(DocumentSettingId::OLD_LINE_SPACING) )
{
- nUpperSpaceAmountOfPrevFrm = nPrevLowerSpace + nPrevLineSpacing;
+ nUpperSpaceAmountOfPrevFrame = nPrevLowerSpace + nPrevLineSpacing;
}
else
{
- nUpperSpaceAmountOfPrevFrm = std::max( nPrevLowerSpace, nPrevLineSpacing );
+ nUpperSpaceAmountOfPrevFrame = std::max( nPrevLowerSpace, nPrevLineSpacing );
}
}
}
- return nUpperSpaceAmountOfPrevFrm;
+ return nUpperSpaceAmountOfPrevFrame;
}
/** method to determine the upper space amount, which is considered for
@@ -1602,42 +1602,42 @@ SwTwips SwFlowFrm::_GetUpperSpaceAmountConsideredForPrevFrm() const
OD 2004-03-18 #i11860#
*/
-SwTwips SwFlowFrm::GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid() const
+SwTwips SwFlowFrame::GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid() const
{
- SwTwips nUpperSpaceAmountConsideredForPrevFrmAndPageGrid = 0;
+ SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid = 0;
if ( !m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::USE_FORMER_OBJECT_POS) )
{
- nUpperSpaceAmountConsideredForPrevFrmAndPageGrid =
- _GetUpperSpaceAmountConsideredForPrevFrm() +
+ nUpperSpaceAmountConsideredForPrevFrameAndPageGrid =
+ _GetUpperSpaceAmountConsideredForPrevFrame() +
( m_rThis.GetUpper()->GetFormat()->GetDoc()->IsSquaredPageMode()
? _GetUpperSpaceAmountConsideredForPageGrid( CalcUpperSpace( nullptr, nullptr, false ) )
: 0 );
}
- return nUpperSpaceAmountConsideredForPrevFrmAndPageGrid;
+ return nUpperSpaceAmountConsideredForPrevFrameAndPageGrid;
}
/** calculation of lower space
OD 2004-03-02 #106629#
*/
-SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const
+SwTwips SwFlowFrame::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const
{
SwTwips nLowerSpace = 0;
std::unique_ptr<SwBorderAttrAccess> pAttrAccess;
if ( !_pAttrs )
{
- pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), &m_rThis);
+ pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), &m_rThis);
_pAttrs = pAttrAccess->Get();
}
bool bCommonBorder = true;
- if ( m_rThis.IsInSct() && m_rThis.GetUpper()->IsColBodyFrm() )
+ if ( m_rThis.IsInSct() && m_rThis.GetUpper()->IsColBodyFrame() )
{
- const SwSectionFrm* pSectFrm = m_rThis.FindSctFrm();
- bCommonBorder = pSectFrm->GetFormat()->GetBalancedColumns().GetValue();
+ const SwSectionFrame* pSectFrame = m_rThis.FindSctFrame();
+ bCommonBorder = pSectFrame->GetFormat()->GetBalancedColumns().GetValue();
}
nLowerSpace = bCommonBorder ?
_pAttrs->GetBottomLine( m_rThis ) :
@@ -1646,7 +1646,7 @@ SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const
// #i26250#
// - correct consideration of table frames
// - use new method <CalcAddLowerSpaceAsLastInTableCell(..)>
- if ( ( ( m_rThis.IsTabFrm() && m_rThis.GetUpper()->IsInTab() ) ||
+ if ( ( ( m_rThis.IsTabFrame() && m_rThis.GetUpper()->IsInTab() ) ||
// #115759# - no lower spacing, if frame has a follow
( m_rThis.IsInTab() && !GetFollow() ) ) &&
!m_rThis.GetIndNext() )
@@ -1662,32 +1662,32 @@ SwTwips SwFlowFrm::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const
OD 2004-07-16 #i26250#
*/
-SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
+SwTwips SwFlowFrame::CalcAddLowerSpaceAsLastInTableCell(
const SwBorderAttrs* _pAttrs ) const
{
SwTwips nAdditionalLowerSpace = 0;
if ( m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::ADD_PARA_SPACING_TO_TABLE_CELLS) )
{
- const SwFrm* pFrm = &m_rThis;
- if ( pFrm->IsSctFrm() )
+ const SwFrame* pFrame = &m_rThis;
+ if ( pFrame->IsSctFrame() )
{
- const SwSectionFrm* pSectFrm = static_cast<const SwSectionFrm*>(pFrm);
- pFrm = pSectFrm->FindLastContent();
- if ( pFrm && pFrm->IsInTab() )
+ const SwSectionFrame* pSectFrame = static_cast<const SwSectionFrame*>(pFrame);
+ pFrame = pSectFrame->FindLastContent();
+ if ( pFrame && pFrame->IsInTab() )
{
- const SwTabFrm* pTableFrm = pFrm->FindTabFrm();
- if ( pSectFrm->IsAnLower( pTableFrm ) )
+ const SwTabFrame* pTableFrame = pFrame->FindTabFrame();
+ if ( pSectFrame->IsAnLower( pTableFrame ) )
{
- pFrm = pTableFrm;
+ pFrame = pTableFrame;
}
}
}
std::unique_ptr<SwBorderAttrAccess> pAttrAccess;
- if (pFrm && (!_pAttrs || pFrm != &m_rThis))
+ if (pFrame && (!_pAttrs || pFrame != &m_rThis))
{
- pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), pFrm);
+ pAttrAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), pFrame);
_pAttrs = pAttrAccess->Get();
}
@@ -1698,21 +1698,21 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell(
return nAdditionalLowerSpace;
}
-/// Moves the Frm forward if it seems necessary regarding the current conditions and attributes.
-bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
+/// Moves the Frame forward if it seems necessary regarding the current conditions and attributes.
+bool SwFlowFrame::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
{
- const SwFrm* pNxt = m_rThis.GetIndNext();
+ const SwFrame* pNxt = m_rThis.GetIndNext();
if ( bKeep && //!bMovedBwd &&
- ( !pNxt || ( pNxt->IsTextFrm() && static_cast<const SwTextFrm*>(pNxt)->IsEmptyMaster() ) ) &&
+ ( !pNxt || ( pNxt->IsTextFrame() && static_cast<const SwTextFrame*>(pNxt)->IsEmptyMaster() ) ) &&
( nullptr != (pNxt = m_rThis.FindNext()) ) && IsKeepFwdMoveAllowed() )
{
- if( pNxt->IsSctFrm() )
- { // Don't get fooled by empty SectionFrms
- const SwFrm* pTmp = nullptr;
- while( pNxt && pNxt->IsSctFrm() &&
- ( !static_cast<const SwSectionFrm*>(pNxt)->GetSection() ||
- nullptr == ( pTmp = static_cast<const SwSectionFrm*>(pNxt)->ContainsAny() ) ) )
+ if( pNxt->IsSctFrame() )
+ { // Don't get fooled by empty SectionFrames
+ const SwFrame* pTmp = nullptr;
+ while( pNxt && pNxt->IsSctFrame() &&
+ ( !static_cast<const SwSectionFrame*>(pNxt)->GetSection() ||
+ nullptr == ( pTmp = static_cast<const SwSectionFrame*>(pNxt)->ContainsAny() ) ) )
{
pNxt = pNxt->FindNext();
pTmp = nullptr;
@@ -1723,10 +1723,10 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
if( pNxt && pNxt->GetValidPosFlag() )
{
bool bMove = false;
- const SwSectionFrm *pSct = m_rThis.FindSctFrm();
+ const SwSectionFrame *pSct = m_rThis.FindSctFrame();
if( pSct && !pSct->GetValidSizeFlag() )
{
- const SwSectionFrm* pNxtSct = pNxt->FindSctFrm();
+ const SwSectionFrame* pNxtSct = pNxt->FindSctFrame();
if( pNxtSct && pSct->IsAnFollow( pNxtSct ) )
bMove = true;
}
@@ -1762,11 +1762,11 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
}
else if ( IsColBreak ( false ) )
{
- const SwPageFrm *pPage = m_rThis.FindPageFrm();
- SwFrm *pCol = m_rThis.FindColFrm();
+ const SwPageFrame *pPage = m_rThis.FindPageFrame();
+ SwFrame *pCol = m_rThis.FindColFrame();
do
{ MoveFwd( rbMakePage, false );
- SwFrm *pTmp = m_rThis.FindColFrm();
+ SwFrame *pTmp = m_rThis.FindColFrame();
if( pTmp != pCol )
{
bMovedFwd = true;
@@ -1775,7 +1775,7 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
else
break;
} while ( IsColBreak( false ) );
- if ( pPage != m_rThis.FindPageFrm() )
+ if ( pPage != m_rThis.FindPageFrame() )
rbMakePage = false;
}
}
@@ -1783,19 +1783,19 @@ bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool )
return bMovedFwd;
}
-/// Return value tells us whether the Frm has changed the page.
-bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
+/// Return value tells us whether the Frame has changed the page.
+bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
{
//!!!!MoveFootnoteCntFwd might need to be updated as well.
- SwFootnoteBossFrm *pOldBoss = m_rThis.FindFootnoteBossFrm();
+ SwFootnoteBossFrame *pOldBoss = m_rThis.FindFootnoteBossFrame();
if (m_rThis.IsInFootnote())
{
- if (!m_rThis.IsContentFrm())
+ if (!m_rThis.IsContentFrame())
{
SAL_WARN("sw.core", "Tables in footnotes are not truly supported");
return false;
}
- return static_cast<SwContentFrm&>(m_rThis).MoveFootnoteCntFwd( bMakePage, pOldBoss );
+ return static_cast<SwContentFrame&>(m_rThis).MoveFootnoteCntFwd( bMakePage, pOldBoss );
}
if( !IsFwdMoveAllowed() && !bMoveAlways )
@@ -1803,71 +1803,71 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
bool bNoFwd = true;
if( m_rThis.IsInSct() )
{
- SwFootnoteBossFrm* pBoss = m_rThis.FindFootnoteBossFrm();
+ SwFootnoteBossFrame* pBoss = m_rThis.FindFootnoteBossFrame();
bNoFwd = !pBoss->IsInSct() || ( !pBoss->Lower()->GetNext() &&
!pBoss->GetPrev() );
}
// Allow the MoveFwd even if we do not have an IndPrev in these cases:
if ( m_rThis.IsInTab() &&
- ( !m_rThis.IsTabFrm() ||
+ ( !m_rThis.IsTabFrame() ||
( m_rThis.GetUpper()->IsInTab() &&
- m_rThis.GetUpper()->FindTabFrm()->IsFwdMoveAllowed() ) ) &&
- nullptr != const_cast<SwFrm&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
+ m_rThis.GetUpper()->FindTabFrame()->IsFwdMoveAllowed() ) ) &&
+ nullptr != const_cast<SwFrame&>(m_rThis).GetNextCellLeaf( MAKEPAGE_NONE ) )
{
bNoFwd = false;
}
if( bNoFwd )
{
- // It's allowed to move PageBreaks if the Frm isn't the first
+ // It's allowed to move PageBreaks if the Frame isn't the first
// one on the page.
if ( !bPageBreak )
return false;
- const SwFrm *pCol = m_rThis.FindColFrm();
+ const SwFrame *pCol = m_rThis.FindColFrame();
if ( !pCol || !pCol->GetPrev() )
return false;
}
}
bool bSamePage = true;
- SwLayoutFrm *pNewUpper =
+ SwLayoutFrame *pNewUpper =
m_rThis.GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true );
if ( pNewUpper )
{
PROTOCOL_ENTER( &m_rThis, PROT_MOVE_FWD, 0, nullptr );
- SwPageFrm *pOldPage = pOldBoss->FindPageFrm();
+ SwPageFrame *pOldPage = pOldBoss->FindPageFrame();
// We move ourself and all the direct successors before the
- // first ContentFrm below the new Upper.
+ // first ContentFrame below the new Upper.
- // If our NewUpper lies in a SectionFrm, we need to make sure
+ // If our NewUpper lies in a SectionFrame, we need to make sure
// that it won't destroy itself in Calc.
- SwSectionFrm* pSect = pNewUpper->FindSctFrm();
+ SwSectionFrame* pSect = pNewUpper->FindSctFrame();
if( pSect )
{
- // If we only switch column within our SectionFrm, we better don't
- // call Calc, as this would format the SectionFrm, which in turn would
+ // If we only switch column within our SectionFrame, we better don't
+ // call Calc, as this would format the SectionFrame, which in turn would
// call us again, etc.
- if( pSect != m_rThis.FindSctFrm() )
+ if( pSect != m_rThis.FindSctFrame() )
{
bool bUnlock = !pSect->IsColLocked();
pSect->ColLock();
- pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
+ pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
if( bUnlock )
pSect->ColUnlock();
}
}
// Do not calculate split cell frames.
- else if ( !pNewUpper->IsCellFrm() || static_cast<SwLayoutFrm*>(pNewUpper)->Lower() )
- pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
+ else if ( !pNewUpper->IsCellFrame() || static_cast<SwLayoutFrame*>(pNewUpper)->Lower() )
+ pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
- SwFootnoteBossFrm *pNewBoss = pNewUpper->FindFootnoteBossFrm();
+ SwFootnoteBossFrame *pNewBoss = pNewUpper->FindFootnoteBossFrame();
bool bBossChg = pNewBoss != pOldBoss;
- pNewBoss = pNewBoss->FindFootnoteBossFrm( true );
- pOldBoss = pOldBoss->FindFootnoteBossFrm( true );
- SwPageFrm* pNewPage = pOldPage;
+ pNewBoss = pNewBoss->FindFootnoteBossFrame( true );
+ pOldBoss = pOldBoss->FindFootnoteBossFrame( true );
+ SwPageFrame* pNewPage = pOldPage;
// First, we move the footnotes.
bool bFootnoteMoved = false;
@@ -1878,40 +1878,40 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
// In this case we prefer to call a SimpleFormat for this new
// section after we inserted the contents. Otherwise the section
// frame will invalidate its lowers, if its printing area changes
- // in SwSectionFrm::Format, which can cause loops.
+ // in SwSectionFrame::Format, which can cause loops.
const bool bForceSimpleFormat = pSect && pSect->HasFollow() &&
!pSect->ContainsAny();
if ( pNewBoss != pOldBoss )
{
- pNewPage = pNewBoss->FindPageFrm();
+ pNewPage = pNewBoss->FindPageFrame();
bSamePage = pNewPage == pOldPage;
// Set deadline, so the footnotes don't think up
// silly things...
SWRECTFN( pOldBoss )
SwSaveFootnoteHeight aHeight( pOldBoss,
- (pOldBoss->Frm().*fnRect->fnGetBottom)() );
- SwContentFrm* pStart = m_rThis.IsContentFrm() ?
- static_cast<SwContentFrm*>(&m_rThis) : static_cast<SwLayoutFrm&>(m_rThis).ContainsContent();
- OSL_ENSURE( pStart || ( m_rThis.IsTabFrm() && !static_cast<SwTabFrm&>(m_rThis).Lower() ),
+ (pOldBoss->Frame().*fnRect->fnGetBottom)() );
+ SwContentFrame* pStart = m_rThis.IsContentFrame() ?
+ static_cast<SwContentFrame*>(&m_rThis) : static_cast<SwLayoutFrame&>(m_rThis).ContainsContent();
+ OSL_ENSURE( pStart || ( m_rThis.IsTabFrame() && !static_cast<SwTabFrame&>(m_rThis).Lower() ),
"MoveFwd: Missing Content" );
- SwLayoutFrm* pBody = pStart ? ( pStart->IsTextFrm() ?
- const_cast<SwBodyFrm *>(static_cast<SwTextFrm*>(pStart)->FindBodyFrm()) : nullptr ) : nullptr;
+ SwLayoutFrame* pBody = pStart ? ( pStart->IsTextFrame() ?
+ const_cast<SwBodyFrame *>(static_cast<SwTextFrame*>(pStart)->FindBodyFrame()) : nullptr ) : nullptr;
if( pBody )
bFootnoteMoved = pBody->MoveLowerFootnotes( pStart, pOldBoss, pNewBoss,
false);
}
- // It's possible when dealing with SectionFrms that we have been moved
+ // It's possible when dealing with SectionFrames that we have been moved
// by pNewUpper->Calc(), for instance into the pNewUpper.
// MoveSubTree or PasteTree respectively is not prepared to handle such a
// situation.
if( pNewUpper != m_rThis.GetUpper() )
{
// #i27145#
- SwSectionFrm* pOldSct = nullptr;
- if ( m_rThis.GetUpper()->IsSctFrm() )
+ SwSectionFrame* pOldSct = nullptr;
+ if ( m_rThis.GetUpper()->IsSctFrame() )
{
- pOldSct = static_cast<SwSectionFrm*>(m_rThis.GetUpper());
+ pOldSct = static_cast<SwSectionFrame*>(m_rThis.GetUpper());
}
MoveSubTree( pNewUpper, pNewUpper->Lower() );
@@ -1948,7 +1948,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
m_rThis.Prepare( PREP_BOSS_CHGD, nullptr, false );
if( !bSamePage )
{
- SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
if ( pSh && !pSh->Imp()->IsUpdateExpFields() )
pSh->GetDoc()->getIDocumentFieldsAccess().SetNewFieldLst(true); // Will be done by CalcLayout() later on!
@@ -1960,7 +1960,7 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
}
}
// OD 30.10.2002 #97265# - no <CheckPageDesc(..)> in online layout
- const SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
if ( !( pSh && pSh->GetViewOptions()->getBrowseMode() ) )
{
@@ -1970,48 +1970,48 @@ bool SwFlowFrm::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
( m_rThis.GetAttrSet()->GetPageDesc().GetPageDesc() ||
pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) )
{
- SwFrm::CheckPageDescs( pNewPage, false );
+ SwFrame::CheckPageDescs( pNewPage, false );
}
}
}
return bSamePage;
}
-/** Return value tells whether the Frm should change the page.
+/** Return value tells whether the Frame should change the page.
*
* @note This should be called by derived classes.
* @note The actual moving must be implemented in the subclasses.
*/
-bool SwFlowFrm::MoveBwd( bool &rbReformat )
+bool SwFlowFrame::MoveBwd( bool &rbReformat )
{
- SwFlowFrm::SetMoveBwdJump( false );
+ SwFlowFrame::SetMoveBwdJump( false );
- SwFootnoteFrm* pFootnote = m_rThis.FindFootnoteFrm();
+ SwFootnoteFrame* pFootnote = m_rThis.FindFootnoteFrame();
if ( pFootnote && pFootnote->IsBackMoveLocked() )
return false;
// #115759# - text frames, which are directly inside
// tables aren't allowed to move backward.
- if ( m_rThis.IsTextFrm() && m_rThis.IsInTab() )
+ if ( m_rThis.IsTextFrame() && m_rThis.IsInTab() )
{
- const SwLayoutFrm* pUpperFrm = m_rThis.GetUpper();
- while ( pUpperFrm )
+ const SwLayoutFrame* pUpperFrame = m_rThis.GetUpper();
+ while ( pUpperFrame )
{
- if ( pUpperFrm->IsTabFrm() )
+ if ( pUpperFrame->IsTabFrame() )
{
return false;
}
- if ( pUpperFrm->IsColumnFrm() && pUpperFrm->IsInSct() )
+ if ( pUpperFrame->IsColumnFrame() && pUpperFrame->IsInSct() )
{
break;
}
- pUpperFrm = pUpperFrm->GetUpper();
+ pUpperFrame = pUpperFrame->GetUpper();
}
}
- SwFootnoteBossFrm * pOldBoss = m_rThis.FindFootnoteBossFrm();
- SwPageFrm * const pOldPage = pOldBoss->FindPageFrm();
- SwLayoutFrm *pNewUpper = nullptr;
+ SwFootnoteBossFrame * pOldBoss = m_rThis.FindFootnoteBossFrame();
+ SwPageFrame * const pOldPage = pOldBoss->FindPageFrame();
+ SwLayoutFrame *pNewUpper = nullptr;
bool bCheckPageDescs = false;
bool bCheckPageDescOfNextPage = false;
@@ -2022,11 +2022,11 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// #i37084# FindLastContent does not necessarily
// have to have a result != 0
- SwFrm* pRef = nullptr;
+ SwFrame* pRef = nullptr;
const bool bEndnote = pFootnote->GetAttr()->GetFootnote().IsEndNote();
if( bEndnote && pFootnote->IsInSct() )
{
- SwSectionFrm* pSect = pFootnote->FindSctFrm();
+ SwSectionFrame* pSect = pFootnote->FindSctFrame();
if( pSect->IsEndnAtEnd() )
pRef = pSect->FindLastContent( FINDMODE_LASTCNT );
}
@@ -2036,10 +2036,10 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
OSL_ENSURE( pRef, "MoveBwd: Endnote for an empty section?" );
if( !bEndnote )
- pOldBoss = pOldBoss->FindFootnoteBossFrm( true );
- SwFootnoteBossFrm *pRefBoss = pRef->FindFootnoteBossFrm( !bEndnote );
+ pOldBoss = pOldBoss->FindFootnoteBossFrame( true );
+ SwFootnoteBossFrame *pRefBoss = pRef->FindFootnoteBossFrame( !bEndnote );
if ( pOldBoss != pRefBoss &&
- // OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)>
+ // OD 08.11.2002 #104840# - use <SwLayoutFrame::IsBefore(..)>
( !bEndnote ||
pRefBoss->IsBefore( pOldBoss ) )
)
@@ -2047,23 +2047,23 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
else if ( IsPageBreak( true ) ) // Do we have to respect a PageBreak?
{
- // If the previous page doesn't have an Frm in the body,
+ // If the previous page doesn't have an Frame in the body,
// flowing back makes sense despite the PageBreak (otherwise,
// we'd get an empty page).
// Of course we need to overlook empty pages!
- const SwFrm *pFlow = &m_rThis;
+ const SwFrame *pFlow = &m_rThis;
do
{
pFlow = pFlow->FindPrev();
} while ( pFlow &&
- ( pFlow->FindPageFrm() == pOldPage ||
+ ( pFlow->FindPageFrame() == pOldPage ||
!pFlow->IsInDocBody() ) );
if ( pFlow )
{
long nDiff = pOldPage->GetPhyPageNum() - pFlow->GetPhyPageNum();
if ( nDiff > 1 )
{
- if ( static_cast<SwPageFrm*>(pOldPage->GetPrev())->IsEmptyPage() )
+ if ( static_cast<SwPageFrame*>(pOldPage->GetPrev())->IsEmptyPage() )
nDiff -= 1;
if ( nDiff > 1 )
{
@@ -2092,7 +2092,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// returns new upper on page 2.
if (pNewUpper && pNewUpper->Lower())
{
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true );
+ SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true );
if ( pNewNextUpper &&
pNewNextUpper != m_rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2100,7 +2100,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() &&
pNewNextUpper->IsInTab() == pNewUpper->IsInTab() &&
pNewNextUpper->IsInSct() == pNewUpper->IsInSct() &&
- !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) )
+ !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) )
{
pNewUpper = pNewNextUpper;
bCheckPageDescOfNextPage = true;
@@ -2114,24 +2114,24 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
else if ( IsColBreak( true ) )
{
- // If the previous column doesn't contain a ContentFrm, flowing back
+ // If the previous column doesn't contain a ContentFrame, flowing back
// makes sense despite the ColumnBreak, as otherwise we'd get
// an empty column.
if( m_rThis.IsInSct() )
{
pNewUpper = m_rThis.GetLeaf( MAKEPAGE_NONE, false );
- if( pNewUpper && !SwFlowFrm::IsMoveBwdJump() &&
+ if( pNewUpper && !SwFlowFrame::IsMoveBwdJump() &&
( pNewUpper->ContainsContent() ||
- ( ( !pNewUpper->IsColBodyFrm() ||
+ ( ( !pNewUpper->IsColBodyFrame() ||
!pNewUpper->GetUpper()->GetPrev() ) &&
- !pNewUpper->FindSctFrm()->GetPrev() ) ) )
+ !pNewUpper->FindSctFrame()->GetPrev() ) ) )
{
pNewUpper = nullptr;
}
// #i53139#
// #i69409# - check <pNewUpper>
- // #i71065# - check <SwFlowFrm::IsMoveBwdJump()>
- else if ( pNewUpper && !SwFlowFrm::IsMoveBwdJump() )
+ // #i71065# - check <SwFlowFrame::IsMoveBwdJump()>
+ else if ( pNewUpper && !SwFlowFrame::IsMoveBwdJump() )
{
// Now <pNewUpper> is a previous layout frame, which
// contains content. But the new upper layout frame
@@ -2143,14 +2143,14 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// #136538# - another correction of fix for i53139
// Beside type check, check also, if proposed new next upper
// frame is inside the same frame types.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, true );
+ SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NOSECTION, true );
if ( pNewNextUpper &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
pNewNextUpper->IsInDocBody() == pNewUpper->IsInDocBody() &&
pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() &&
pNewNextUpper->IsInTab() == pNewUpper->IsInTab() &&
pNewNextUpper->IsInSct() == pNewUpper->IsInSct() &&
- !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) )
+ !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) )
{
pNewUpper = pNewNextUpper;
}
@@ -2158,7 +2158,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
else
{
- const SwFrm *pCol = m_rThis.FindColFrm();
+ const SwFrame *pCol = m_rThis.FindColFrame();
bool bGoOn = true;
bool bJump = false;
do
@@ -2172,15 +2172,15 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
if ( pCol )
{
- // ColumnFrms now with BodyFrm
- SwLayoutFrm* pColBody = pCol->IsColumnFrm() ?
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)->Lower())) :
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol));
+ // ColumnFrames now with BodyFrame
+ SwLayoutFrame* pColBody = pCol->IsColumnFrame() ?
+ const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)->Lower())) :
+ const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol));
if ( pColBody->ContainsContent() )
{
bGoOn = false; // We have content here! we accept this
// only if GetLeaf() has set the MoveBwdJump.
- if( SwFlowFrm::IsMoveBwdJump() )
+ if( SwFlowFrame::IsMoveBwdJump() )
{
pNewUpper = pColBody;
// #i53139#
@@ -2197,7 +2197,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// #i71065#
// Check that the proposed new next upper layout
// frame isn't the current one.
- SwLayoutFrm* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true );
+ SwLayoutFrame* pNewNextUpper = pNewUpper->GetLeaf( MAKEPAGE_NONE, true );
if ( pNewNextUpper &&
pNewNextUpper != m_rThis.GetUpper() &&
pNewNextUpper->GetType() == pNewUpper->GetType() &&
@@ -2205,7 +2205,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
pNewNextUpper->IsInFootnote() == pNewUpper->IsInFootnote() &&
pNewNextUpper->IsInTab() == pNewUpper->IsInTab() &&
pNewNextUpper->IsInSct() == pNewUpper->IsInSct() &&
- !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrm() ) )
+ !m_rThis.WrongPageDesc( pNewNextUpper->FindPageFrame() ) )
{
pNewUpper = pNewNextUpper;
}
@@ -2221,7 +2221,7 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
} while( bGoOn );
if( bJump )
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
}
}
else // No breaks - we can flow back.
@@ -2236,15 +2236,15 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// - allow move backward as long as the anchored object is only temporarily
// positions considering its wrapping style.
if ( pNewUpper &&
- m_rThis.IsTextFrm() && !IsFollow() )
+ m_rThis.IsTextFrame() && !IsFollow() )
{
sal_uInt32 nToPageNum( 0L );
- const bool bMoveFwdByObjPos = SwLayouter::FrmMovedFwdByObjPos(
+ const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos(
*(pOldPage->GetFormat()->GetDoc()),
- static_cast<SwTextFrm&>(m_rThis),
+ static_cast<SwTextFrame&>(m_rThis),
nToPageNum );
if ( bMoveFwdByObjPos &&
- pNewUpper->FindPageFrm()->GetPhyPageNum() < nToPageNum )
+ pNewUpper->FindPageFrame()->GetPhyPageNum() < nToPageNum )
{
pNewUpper = nullptr;
}
@@ -2275,11 +2275,11 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
// neglect empty sections in proposed new upper frame
bool bProposedNewUpperContainsOnlyEmptySections( true );
{
- const SwFrm* pLower( pNewUpper->Lower() );
+ const SwFrame* pLower( pNewUpper->Lower() );
while ( pLower )
{
- if ( pLower->IsSctFrm() &&
- !dynamic_cast<const SwSectionFrm*>(pLower)->GetSection() )
+ if ( pLower->IsSctFrame() &&
+ !dynamic_cast<const SwSectionFrame*>(pLower)->GetSection() )
{
pLower = pLower->GetNext();
continue;
@@ -2293,13 +2293,13 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
if ( !bProposedNewUpperContainsOnlyEmptySections )
{
- if ( SwFlowFrm::IsMoveBwdJump() )
+ if ( SwFlowFrame::IsMoveBwdJump() )
{
// Don't move after the Master, but into the next empty page.
- SwFrm *pFrm = pNewUpper->Lower();
- while ( pFrm->GetNext() )
- pFrm = pFrm->GetNext();
- pNewUpper = pFrm->GetLeaf( MAKEPAGE_INSERT, true );
+ SwFrame *pFrame = pNewUpper->Lower();
+ while ( pFrame->GetNext() )
+ pFrame = pFrame->GetNext();
+ pNewUpper = pFrame->GetLeaf( MAKEPAGE_INSERT, true );
if( pNewUpper == m_rThis.GetUpper() ) // Did we end up in the same place?
pNewUpper = nullptr; // If so, moving is not needed.
}
@@ -2311,21 +2311,21 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
{
if( !pNewUpper->Lower() )
{
- if( pNewUpper->IsFootnoteContFrm() )
+ if( pNewUpper->IsFootnoteContFrame() )
{
pNewUpper->Cut();
- SwFrm::DestroyFrm(pNewUpper);
+ SwFrame::DestroyFrame(pNewUpper);
}
else
{
- SwSectionFrm* pSectFrm = pNewUpper->FindSctFrm();
+ SwSectionFrame* pSectFrame = pNewUpper->FindSctFrame();
// #126020# - adjust check for empty section
// #130797# - correct fix #126020#
- if ( pSectFrm && !pSectFrm->IsColLocked() &&
- !pSectFrm->ContainsContent() && !pSectFrm->ContainsAny( true ) )
+ if ( pSectFrame && !pSectFrame->IsColLocked() &&
+ !pSectFrame->ContainsContent() && !pSectFrame->ContainsAny( true ) )
{
- pSectFrm->DelEmpty( true );
- SwFrm::DestroyFrm(pSectFrm);
+ pSectFrame->DelEmpty( true );
+ SwFrame::DestroyFrame(pSectFrame);
m_rThis.mbValidPos = true;
}
}
@@ -2340,16 +2340,16 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
if ( pNewUpper && !IsFollow() &&
m_rThis.GetAttrSet()->GetKeep().GetValue() && m_rThis.GetIndNext() )
{
- SwFrm* pIndNext = m_rThis.GetIndNext();
+ SwFrame* pIndNext = m_rThis.GetIndNext();
// #i38232#
- if ( !pIndNext->IsTabFrm() )
+ if ( !pIndNext->IsTabFrame() )
{
// get first content of section, while empty sections are skipped
- while ( pIndNext && pIndNext->IsSctFrm() )
+ while ( pIndNext && pIndNext->IsSctFrame() )
{
- if( static_cast<SwSectionFrm*>(pIndNext)->GetSection() )
+ if( static_cast<SwSectionFrame*>(pIndNext)->GetSection() )
{
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pIndNext)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pIndNext)->ContainsAny();
if ( pTmp )
{
pIndNext = pTmp;
@@ -2358,10 +2358,10 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
}
pIndNext = pIndNext->GetIndNext();
}
- OSL_ENSURE( !pIndNext || dynamic_cast<const SwTextFrm*>( pIndNext) != nullptr,
- "<SwFlowFrm::MovedBwd(..)> - incorrect next found." );
- if ( pIndNext && pIndNext->IsFlowFrm() &&
- SwFlowFrm::CastFlowFrm(pIndNext)->IsJoinLocked() )
+ OSL_ENSURE( !pIndNext || dynamic_cast<const SwTextFrame*>( pIndNext) != nullptr,
+ "<SwFlowFrame::MovedBwd(..)> - incorrect next found." );
+ if ( pIndNext && pIndNext->IsFlowFrame() &&
+ SwFlowFrame::CastFlowFrame(pIndNext)->IsJoinLocked() )
{
pNewUpper = nullptr;
}
@@ -2376,32 +2376,32 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
SwLayouter::MoveBwdSuppressed( *(pOldPage->GetFormat()->GetDoc()),
*this, *pNewUpper ) )
{
- SwLayoutFrm* pNextNewUpper = pNewUpper->GetLeaf(
- ( !m_rThis.IsSctFrm() && m_rThis.IsInSct() )
+ SwLayoutFrame* pNextNewUpper = pNewUpper->GetLeaf(
+ ( !m_rThis.IsSctFrame() && m_rThis.IsInSct() )
? MAKEPAGE_NOSECTION
: MAKEPAGE_NONE,
true );
// #i73194# - make code robust
- OSL_ENSURE( pNextNewUpper, "<SwFlowFrm::MoveBwd(..)> - missing next new upper" );
+ OSL_ENSURE( pNextNewUpper, "<SwFlowFrame::MoveBwd(..)> - missing next new upper" );
if ( pNextNewUpper &&
( pNextNewUpper == m_rThis.GetUpper() ||
pNextNewUpper->GetType() != m_rThis.GetUpper()->GetType() ) )
{
pNewUpper = nullptr;
- OSL_FAIL( "<SwFlowFrm::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" );
+ OSL_FAIL( "<SwFlowFrame::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" );
}
}
OSL_ENSURE( pNewUpper != m_rThis.GetUpper(),
- "<SwFlowFrm::MoveBwd(..)> - moving backward to the current upper frame!?" );
+ "<SwFlowFrame::MoveBwd(..)> - moving backward to the current upper frame!?" );
if ( pNewUpper )
{
PROTOCOL_ENTER( &m_rThis, PROT_MOVE_BWD, 0, nullptr );
- if ( pNewUpper->IsFootnoteContFrm() )
+ if ( pNewUpper->IsFootnoteContFrame() )
{
// I may have gotten a Container
- SwFootnoteFrm *pOld = m_rThis.FindFootnoteFrm();
- SwFootnoteFrm *pNew = new SwFootnoteFrm( pOld->GetFormat(), pOld,
+ SwFootnoteFrame *pOld = m_rThis.FindFootnoteFrame();
+ SwFootnoteFrame *pNew = new SwFootnoteFrame( pOld->GetFormat(), pOld,
pOld->GetRef(), pOld->GetAttr() );
if ( pOld->GetMaster() )
{
@@ -2413,27 +2413,27 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
pNew->Paste( pNewUpper );
pNewUpper = pNew;
}
- if( pNewUpper->IsFootnoteFrm() && m_rThis.IsInSct() )
+ if( pNewUpper->IsFootnoteFrame() && m_rThis.IsInSct() )
{
- SwSectionFrm* pSct = m_rThis.FindSctFrm();
+ SwSectionFrame* pSct = m_rThis.FindSctFrame();
// If we're in a section of a footnote, we may need to create
- // a SwSectionFrm in the new upper
+ // a SwSectionFrame in the new upper
if( pSct->IsInFootnote() )
{
- SwFrm* pTmp = pNewUpper->Lower();
+ SwFrame* pTmp = pNewUpper->Lower();
if( pTmp )
{
while( pTmp->GetNext() )
pTmp = pTmp->GetNext();
- if( !pTmp->IsSctFrm() ||
- static_cast<SwSectionFrm*>(pTmp)->GetFollow() != pSct )
+ if( !pTmp->IsSctFrame() ||
+ static_cast<SwSectionFrame*>(pTmp)->GetFollow() != pSct )
pTmp = nullptr;
}
if( pTmp )
- pNewUpper = static_cast<SwSectionFrm*>(pTmp);
+ pNewUpper = static_cast<SwSectionFrame*>(pTmp);
else
{
- pSct = new SwSectionFrm( *pSct, true );
+ pSct = new SwSectionFrame( *pSct, true );
pSct->Paste( pNewUpper );
pSct->Init();
pNewUpper = pSct;
@@ -2445,14 +2445,14 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
bool bFollow = false;
// Lock section. Otherwise, it could get destroyed if the only Content
// moves e.g. from the second into the first column.
- SwSectionFrm* pSect = pNewUpper->FindSctFrm();
+ SwSectionFrame* pSect = pNewUpper->FindSctFrame();
if( pSect )
{
bUnlock = !pSect->IsColLocked();
pSect->ColLock();
bFollow = pSect->HasFollow();
}
- pNewUpper->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
+ pNewUpper->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
m_rThis.Cut();
// optimization: format section, if its size is invalidated and if it's
@@ -2473,13 +2473,13 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
m_rThis.Paste( pNewUpper );
// - optimization
if ( bFormatSect )
- pSect->Calc(m_rThis.getRootFrm()->GetCurrShell()->GetOut());
+ pSect->Calc(m_rThis.getRootFrame()->GetCurrShell()->GetOut());
- SwPageFrm *pNewPage = m_rThis.FindPageFrm();
+ SwPageFrame *pNewPage = m_rThis.FindPageFrame();
if( pNewPage != pOldPage )
{
m_rThis.Prepare( PREP_BOSS_CHGD, static_cast<const void*>(pOldPage), false );
- SwViewShell *pSh = m_rThis.getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = m_rThis.getRootFrame()->GetCurrShell();
if ( pSh && !pSh->Imp()->IsUpdateExpFields() )
pSh->GetDoc()->getIDocumentFieldsAccess().SetNewFieldLst(true); // Will be done by CalcLayout() later on
@@ -2493,16 +2493,16 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
{
if ( bCheckPageDescs && pNewPage->GetNext() )
{
- SwPageFrm* pStartPage = bCheckPageDescOfNextPage ?
+ SwPageFrame* pStartPage = bCheckPageDescOfNextPage ?
pNewPage :
- static_cast<SwPageFrm*>(pNewPage->GetNext());
- SwFrm::CheckPageDescs( pStartPage, false);
+ static_cast<SwPageFrame*>(pNewPage->GetNext());
+ SwFrame::CheckPageDescs( pStartPage, false);
}
else if ( m_rThis.GetAttrSet()->GetPageDesc().GetPageDesc() )
{
// First page could get empty for example by disabling
// a section
- SwFrm::CheckPageDescs( pNewPage, false);
+ SwFrame::CheckPageDescs( pNewPage, false);
}
}
}
@@ -2510,25 +2510,25 @@ bool SwFlowFrm::MoveBwd( bool &rbReformat )
return pNewUpper != nullptr;
}
-SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm )
+SwFlowFrame *SwFlowFrame::CastFlowFrame( SwFrame *pFrame )
{
- if ( pFrm->IsContentFrm() )
- return static_cast<SwContentFrm*>(pFrm);
- if ( pFrm->IsTabFrm() )
- return static_cast<SwTabFrm*>(pFrm);
- if ( pFrm->IsSctFrm() )
- return static_cast<SwSectionFrm*>(pFrm);
+ if ( pFrame->IsContentFrame() )
+ return static_cast<SwContentFrame*>(pFrame);
+ if ( pFrame->IsTabFrame() )
+ return static_cast<SwTabFrame*>(pFrame);
+ if ( pFrame->IsSctFrame() )
+ return static_cast<SwSectionFrame*>(pFrame);
return nullptr;
}
-const SwFlowFrm *SwFlowFrm::CastFlowFrm( const SwFrm *pFrm )
+const SwFlowFrame *SwFlowFrame::CastFlowFrame( const SwFrame *pFrame )
{
- if ( pFrm->IsContentFrm() )
- return static_cast<const SwContentFrm*>(pFrm);
- if ( pFrm->IsTabFrm() )
- return static_cast<const SwTabFrm*>(pFrm);
- if ( pFrm->IsSctFrm() )
- return static_cast<const SwSectionFrm*>(pFrm);
+ if ( pFrame->IsContentFrame() )
+ return static_cast<const SwContentFrame*>(pFrame);
+ if ( pFrame->IsTabFrame() )
+ return static_cast<const SwTabFrame*>(pFrame);
+ if ( pFrame->IsSctFrame() )
+ return static_cast<const SwSectionFrame*>(pFrame);
return nullptr;
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index afc4f926fbb9..57c7d1d036be 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -67,8 +67,8 @@
using namespace ::com::sun::star;
-SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
- SwLayoutFrm( pFormat, pSib ),
+SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
+ SwLayoutFrame( pFormat, pSib ),
SwAnchoredObject(), // #i26791#
m_pPrevLink( nullptr ),
m_pNextLink( nullptr ),
@@ -80,14 +80,14 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
m_bLockDeleteContent( false ),
m_bValidContentPos( false )
{
- mnFrmType = FRM_FLY;
+ mnFrameType = FRM_FLY;
m_bInvalid = m_bNotifyBack = true;
m_bLocked = m_bMinHeight =
m_bHeightClipped = m_bWidthClipped = m_bFormatHeightOnly = false;
// Size setting: Fixed size is always the width
- const SwFormatFrmSize &rFrmSize = pFormat->GetFrmSize();
+ const SwFormatFrameSize &rFrameSize = pFormat->GetFrameSize();
const sal_uInt16 nDir =
static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr( RES_FRAMEDIR )).GetValue();
if( FRMDIR_ENVIRONMENT == nDir )
@@ -107,7 +107,7 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
}
else
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
+ const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
mbVertLR = false;
@@ -131,13 +131,13 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
mbRightToLeft = false;
}
- Frm().Width( rFrmSize.GetWidth() );
- Frm().Height( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrmSize.GetHeight() );
+ Frame().Width( rFrameSize.GetWidth() );
+ Frame().Height( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE ? MINFLY : rFrameSize.GetHeight() );
// Fixed or variable Height?
- if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE )
m_bMinHeight = true;
- else if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ else if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE )
mbFixSize = true;
// insert columns, if necessary
@@ -153,11 +153,11 @@ SwFlyFrm::SwFlyFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
InsertCnt();
// Put it somewhere outside so that out document is not formatted unnecessarily often
- Frm().Pos().setX(FAR_AWAY);
- Frm().Pos().setY(FAR_AWAY);
+ Frame().Pos().setX(FAR_AWAY);
+ Frame().Pos().setY(FAR_AWAY);
}
-void SwFlyFrm::Chain( SwFrm* _pAnch )
+void SwFlyFrame::Chain( SwFrame* _pAnch )
{
// Connect to chain neighboors.
// No problem, if a neighboor doesn't exist - the construction of the
@@ -167,40 +167,40 @@ void SwFlyFrm::Chain( SwFrm* _pAnch )
{
if ( rChain.GetNext() )
{
- SwFlyFrm* pFollow = FindChainNeighbour( *rChain.GetNext(), _pAnch );
+ SwFlyFrame* pFollow = FindChainNeighbour( *rChain.GetNext(), _pAnch );
if ( pFollow )
{
OSL_ENSURE( !pFollow->GetPrevLink(), "wrong chain detected" );
if ( !pFollow->GetPrevLink() )
- SwFlyFrm::ChainFrames( this, pFollow );
+ SwFlyFrame::ChainFrames( this, pFollow );
}
}
if ( rChain.GetPrev() )
{
- SwFlyFrm *pMaster = FindChainNeighbour( *rChain.GetPrev(), _pAnch );
+ SwFlyFrame *pMaster = FindChainNeighbour( *rChain.GetPrev(), _pAnch );
if ( pMaster )
{
OSL_ENSURE( !pMaster->GetNextLink(), "wrong chain detected" );
if ( !pMaster->GetNextLink() )
- SwFlyFrm::ChainFrames( pMaster, this );
+ SwFlyFrame::ChainFrames( pMaster, this );
}
}
}
}
-void SwFlyFrm::InsertCnt()
+void SwFlyFrame::InsertCnt()
{
if ( !GetPrevLink() )
{
const SwFormatContent& rContent = GetFormat()->GetContent();
OSL_ENSURE( rContent.GetContentIdx(), ":-( no content prepared." );
sal_uLong nIndex = rContent.GetContentIdx()->GetIndex();
- // Lower() means SwColumnFrm; the Content then needs to be inserted into the (Column)BodyFrm
- ::_InsertCnt( Lower() ? static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(Lower())->Lower()) : static_cast<SwLayoutFrm*>(this),
+ // Lower() means SwColumnFrame; the Content then needs to be inserted into the (Column)BodyFrame
+ ::_InsertCnt( Lower() ? static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(Lower())->Lower()) : static_cast<SwLayoutFrame*>(this),
GetFormat()->GetDoc(), nIndex );
// NoText always have a fixed height.
- if ( Lower() && Lower()->IsNoTextFrm() )
+ if ( Lower() && Lower()->IsNoTextFrame() )
{
mbFixSize = true;
m_bMinHeight = false;
@@ -208,13 +208,13 @@ void SwFlyFrm::InsertCnt()
}
}
-void SwFlyFrm::InsertColumns()
+void SwFlyFrame::InsertColumns()
{
// #i97379#
// Check, if column are allowed.
// Columns are not allowed for fly frames, which represent graphics or embedded objects.
const SwFormatContent& rContent = GetFormat()->GetContent();
- OSL_ENSURE( rContent.GetContentIdx(), "<SwFlyFrm::InsertColumns()> - no content prepared." );
+ OSL_ENSURE( rContent.GetContentIdx(), "<SwFlyFrame::InsertColumns()> - no content prepared." );
SwNodeIndex aFirstContent( *(rContent.GetContentIdx()), 1 );
if ( aFirstContent.GetNode().IsNoTextNode() )
{
@@ -224,32 +224,32 @@ void SwFlyFrm::InsertColumns()
const SwFormatCol &rCol = GetFormat()->GetCol();
if ( rCol.GetNumCols() > 1 )
{
- // Start off PrtArea to be as large as Frm, so that we can put in the columns
+ // Start off PrtArea to be as large as Frame, so that we can put in the columns
// properly. It'll adjust later on.
- Prt().Width( Frm().Width() );
- Prt().Height( Frm().Height() );
+ Prt().Width( Frame().Width() );
+ Prt().Height( Frame().Height() );
const SwFormatCol aOld; // ChgColumns() also needs an old value passed
ChgColumns( aOld, rCol );
}
}
-void SwFlyFrm::DestroyImpl()
+void SwFlyFrame::DestroyImpl()
{
// Accessible objects for fly frames will be destroyed in this destructor.
// For frames bound as char or frames that don't have an anchor we have
// to do that ourselves. For any other frame the call RemoveFly at the
// anchor will do that.
- if( IsAccessibleFrm() && GetFormat() && (IsFlyInCntFrm() || !GetAnchorFrm()) )
+ if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() )
{
- SwViewShell *pVSh = pRootFrm->GetCurrShell();
+ SwViewShell *pVSh = pRootFrame->GetCurrShell();
if( pVSh && pVSh->Imp() )
{
// Lowers aren't disposed already, so we have to do a recursive
// dispose
- pVSh->Imp()->DisposeAccessibleFrm( this, true );
+ pVSh->Imp()->DisposeAccessibleFrame( this, true );
}
}
}
@@ -262,26 +262,26 @@ void SwFlyFrm::DestroyImpl()
// OD 2004-01-19 #110582#
DeleteCnt();
- if ( GetAnchorFrm() )
- AnchorFrm()->RemoveFly( this );
+ if ( GetAnchorFrame() )
+ AnchorFrame()->RemoveFly( this );
}
FinitDrawObj();
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwFlyFrm::~SwFlyFrm()
+SwFlyFrame::~SwFlyFrame()
{
}
-const IDocumentDrawModelAccess& SwFlyFrm::getIDocumentDrawModelAccess()
+const IDocumentDrawModelAccess& SwFlyFrame::getIDocumentDrawModelAccess()
{
return GetFormat()->getIDocumentDrawModelAccess();
}
// OD 2004-01-19 #110582#
-void SwFlyFrm::Unchain()
+void SwFlyFrame::Unchain()
{
if ( GetPrevLink() )
UnchainFrames( GetPrevLink(), this );
@@ -290,21 +290,21 @@ void SwFlyFrm::Unchain()
}
// OD 2004-01-19 #110582#
-void SwFlyFrm::DeleteCnt()
+void SwFlyFrame::DeleteCnt()
{
// #110582#-2
if ( IsLockDeleteContent() )
return;
- SwFrm* pFrm = m_pLower;
- while ( pFrm )
+ SwFrame* pFrame = m_pLower;
+ while ( pFrame )
{
- while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() )
+ while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() )
{
- SwAnchoredObject *pAnchoredObj = (*pFrm->GetDrawObjs())[0];
- if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr )
+ SwAnchoredObject *pAnchoredObj = (*pFrame->GetDrawObjs())[0];
+ if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr )
{
- SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj));
+ SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
}
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pAnchoredObj) != nullptr )
{
@@ -328,33 +328,33 @@ void SwFlyFrm::DeleteCnt()
}
}
- pFrm->RemoveFromLayout();
- SwFrm::DestroyFrm(pFrm);
- pFrm = m_pLower;
+ pFrame->RemoveFromLayout();
+ SwFrame::DestroyFrame(pFrame);
+ pFrame = m_pLower;
}
InvalidatePage();
}
-sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact )
+sal_uInt32 SwFlyFrame::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact )
{
sal_uInt32 nOrdNum( 0L );
// search for another Writer fly frame registered at same frame format
- SwIterator<SwFlyFrm,SwFormat> aIter( *pContact->GetFormat() );
- const SwFlyFrm* pFlyFrm( nullptr );
- for ( pFlyFrm = aIter.First(); pFlyFrm; pFlyFrm = aIter.Next() )
+ SwIterator<SwFlyFrame,SwFormat> aIter( *pContact->GetFormat() );
+ const SwFlyFrame* pFlyFrame( nullptr );
+ for ( pFlyFrame = aIter.First(); pFlyFrame; pFlyFrame = aIter.Next() )
{
- if ( pFlyFrm != this )
+ if ( pFlyFrame != this )
{
break;
}
}
- if ( pFlyFrm )
+ if ( pFlyFrame )
{
// another Writer fly frame found. Take its order number
- nOrdNum = pFlyFrm->GetVirtDrawObj()->GetOrdNum();
+ nOrdNum = pFlyFrame->GetVirtDrawObj()->GetOrdNum();
}
else
{
@@ -368,7 +368,7 @@ sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact )
return nOrdNum;
}
-SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact )
+SwVirtFlyDrawObj* SwFlyFrame::CreateNewRef( SwFlyDrawContact *pContact )
{
SwVirtFlyDrawObj *pDrawObj = new SwVirtFlyDrawObj( *pContact->GetMaster(), this );
pDrawObj->SetModel( pContact->GetMaster()->GetModel() );
@@ -397,7 +397,7 @@ SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact )
return pDrawObj;
}
-void SwFlyFrm::InitDrawObj( bool bNotify )
+void SwFlyFrame::InitDrawObj( bool bNotify )
{
// Find ContactObject from the Format. If there's already one, we just
// need to create a new Ref, else we create the Contact now.
@@ -426,7 +426,7 @@ void SwFlyFrm::InitDrawObj( bool bNotify )
NotifyDrawObj();
}
-void SwFlyFrm::FinitDrawObj()
+void SwFlyFrame::FinitDrawObj()
{
if ( !GetVirtDrawObj() )
return;
@@ -434,7 +434,7 @@ void SwFlyFrm::FinitDrawObj()
// Deregister from SdrPageViews if the Objects is still selected there.
if ( !GetFormat()->GetDoc()->IsInDtor() )
{
- SwViewShell *p1St = getRootFrm()->GetCurrShell();
+ SwViewShell *p1St = getRootFrame()->GetCurrShell();
if ( p1St )
{
for(SwViewShell& rCurrentShell : p1St->GetRingContainer())
@@ -453,17 +453,17 @@ void SwFlyFrm::FinitDrawObj()
if ( GetFormat() )
{
bool bContinue = true;
- SwIterator<SwFrm,SwFormat> aFrmIter( *GetFormat() );
- for ( SwFrm* pFrm = aFrmIter.First(); pFrm; pFrm = aFrmIter.Next() )
- if ( pFrm != this )
+ SwIterator<SwFrame,SwFormat> aFrameIter( *GetFormat() );
+ for ( SwFrame* pFrame = aFrameIter.First(); pFrame; pFrame = aFrameIter.Next() )
+ if ( pFrame != this )
{
- // don't delete Contact if there is still a Frm
+ // don't delete Contact if there is still a Frame
bContinue = false;
break;
}
if ( bContinue )
- // no Frm left, find Contact object to destroy
+ // no Frame left, find Contact object to destroy
pMyContact = SwIterator<SwFlyDrawContact,SwFormat>( *GetFormat() ).First();
}
@@ -479,7 +479,7 @@ void SwFlyFrm::FinitDrawObj()
delete pMyContact; // Destroys the Master itself
}
-void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
+void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
OSL_ENSURE( pMaster && pFollow, "uncomplete chain" );
OSL_ENSURE( !pMaster->GetNextLink(), "link can not be changed" );
@@ -491,12 +491,12 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
if ( pMaster->ContainsContent() )
{
// To get a text flow we need to invalidate
- SwFrm *pInva = pMaster->FindLastLower();
+ SwFrame *pInva = pMaster->FindLastLower();
SWRECTFN( pMaster )
const long nBottom = (pMaster->*fnRect->fnGetPrtBottom)();
while ( pInva )
{
- if( (pInva->Frm().*fnRect->fnBottomDist)( nBottom ) <= 0 )
+ if( (pInva->Frame().*fnRect->fnBottomDist)( nBottom ) <= 0 )
{
pInva->InvalidateSize();
pInva->Prepare();
@@ -511,23 +511,23 @@ void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
{
// There's only the content from the Masters left; the content from the Follow
// does not have any Frames left (should always be exactly one empty TextNode).
- SwFrm *pFrm = pFollow->ContainsContent();
- OSL_ENSURE( !pFrm->IsTabFrm() && !pFrm->FindNext(), "follow in chain contains content" );
- pFrm->Cut();
- SwFrm::DestroyFrm(pFrm);
+ SwFrame *pFrame = pFollow->ContainsContent();
+ OSL_ENSURE( !pFrame->IsTabFrame() && !pFrame->FindNext(), "follow in chain contains content" );
+ pFrame->Cut();
+ SwFrame::DestroyFrame(pFrame);
}
// invalidate accessible relation set (accessibility wrapper)
- SwViewShell* pSh = pMaster->getRootFrm()->GetCurrShell();
+ SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell();
if( pSh )
{
- SwRootFrm* pLayout = pMaster->getRootFrm();
+ SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
-void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
+void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow )
{
pMaster->m_pNextLink = nullptr;
pFollow->m_pPrevLink = nullptr;
@@ -535,17 +535,17 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
if ( pFollow->ContainsContent() )
{
// The Master sucks up the content of the Follow
- SwLayoutFrm *pUpper = pMaster;
- if ( pUpper->Lower()->IsColumnFrm() )
+ SwLayoutFrame *pUpper = pMaster;
+ if ( pUpper->Lower()->IsColumnFrame() )
{
- pUpper = static_cast<SwLayoutFrm*>(pUpper->GetLastLower());
- pUpper = static_cast<SwLayoutFrm*>(pUpper->Lower()); // The (Column)BodyFrm
- OSL_ENSURE( pUpper && pUpper->IsColBodyFrm(), "Missing ColumnBody" );
+ pUpper = static_cast<SwLayoutFrame*>(pUpper->GetLastLower());
+ pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower()); // The (Column)BodyFrame
+ OSL_ENSURE( pUpper && pUpper->IsColBodyFrame(), "Missing ColumnBody" );
}
- SwFlyFrm *pFoll = pFollow;
+ SwFlyFrame *pFoll = pFollow;
while ( pFoll )
{
- SwFrm *pTmp = ::SaveContent( pFoll );
+ SwFrame *pTmp = ::SaveContent( pFoll );
if ( pTmp )
::RestoreContent( pTmp, pUpper, pMaster->FindLastLower(), true );
pFoll->SetCompletePaint();
@@ -558,32 +558,32 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow )
const SwFormatContent &rContent = pFollow->GetFormat()->GetContent();
OSL_ENSURE( rContent.GetContentIdx(), ":-( No content prepared." );
sal_uLong nIndex = rContent.GetContentIdx()->GetIndex();
- // Lower() means SwColumnFrm: this one contains another SwBodyFrm
- ::_InsertCnt( pFollow->Lower() ? const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFollow->Lower())->Lower()))
- : static_cast<SwLayoutFrm*>(pFollow),
+ // Lower() means SwColumnFrame: this one contains another SwBodyFrame
+ ::_InsertCnt( pFollow->Lower() ? const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFollow->Lower())->Lower()))
+ : static_cast<SwLayoutFrame*>(pFollow),
pFollow->GetFormat()->GetDoc(), ++nIndex );
// invalidate accessible relation set (accessibility wrapper)
- SwViewShell* pSh = pMaster->getRootFrm()->GetCurrShell();
+ SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell();
if( pSh )
{
- SwRootFrm* pLayout = pMaster->getRootFrm();
+ SwRootFrame* pLayout = pMaster->getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow );
}
}
-SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch )
+SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat &rChain, SwFrame *pAnch )
{
// We look for the Fly that's in the same Area.
// Areas can for now only be Head/Footer or Flys.
if ( !pAnch ) // If an Anchor was passed along, that one counts (ctor!)
- pAnch = AnchorFrm();
+ pAnch = AnchorFrame();
- SwLayoutFrm *pLay;
+ SwLayoutFrame *pLay;
if ( pAnch->IsInFly() )
- pLay = pAnch->FindFlyFrm();
+ pLay = pAnch->FindFlyFrame();
else
{
// FindFooterOrHeader is not appropriate here, as we may not have a
@@ -593,17 +593,17 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch )
pLay = pLay->GetUpper();
}
- SwIterator<SwFlyFrm,SwFormat> aIter( rChain );
- SwFlyFrm *pFly = aIter.First();
+ SwIterator<SwFlyFrame,SwFormat> aIter( rChain );
+ SwFlyFrame *pFly = aIter.First();
if ( pLay )
{
while ( pFly )
{
- if ( pFly->GetAnchorFrm() )
+ if ( pFly->GetAnchorFrame() )
{
- if ( pFly->GetAnchorFrm()->IsInFly() )
+ if ( pFly->GetAnchorFrame()->IsInFly() )
{
- if ( pFly->AnchorFrm()->FindFlyFrm() == pLay )
+ if ( pFly->AnchorFrame()->FindFlyFrame() == pLay )
break;
}
else if ( pLay == pFly->FindFooterOrHeader() )
@@ -619,12 +619,12 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrameFormat &rChain, SwFrm *pAnch )
return pFly;
}
-SwFrm *SwFlyFrm::FindLastLower()
+SwFrame *SwFlyFrame::FindLastLower()
{
- SwFrm *pRet = ContainsAny();
+ SwFrame *pRet = ContainsAny();
if ( pRet && pRet->IsInTab() )
- pRet = pRet->FindTabFrm();
- SwFrm *pNxt = pRet;
+ pRet = pRet->FindTabFrame();
+ SwFrame *pNxt = pRet;
while ( pNxt && IsAnLower( pNxt ) )
{ pRet = pNxt;
pNxt = pNxt->FindNext();
@@ -632,47 +632,47 @@ SwFrm *SwFlyFrm::FindLastLower()
return pRet;
}
-bool SwFlyFrm::FrmSizeChg( const SwFormatFrmSize &rFrmSize )
+bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize &rFrameSize )
{
bool bRet = false;
- SwTwips nDiffHeight = Frm().Height();
- if ( rFrmSize.GetHeightSizeType() == ATT_VAR_SIZE )
+ SwTwips nDiffHeight = Frame().Height();
+ if ( rFrameSize.GetHeightSizeType() == ATT_VAR_SIZE )
mbFixSize = m_bMinHeight = false;
else
{
- if ( rFrmSize.GetHeightSizeType() == ATT_FIX_SIZE )
+ if ( rFrameSize.GetHeightSizeType() == ATT_FIX_SIZE )
{
mbFixSize = true;
m_bMinHeight = false;
}
- else if ( rFrmSize.GetHeightSizeType() == ATT_MIN_SIZE )
+ else if ( rFrameSize.GetHeightSizeType() == ATT_MIN_SIZE )
{
mbFixSize = false;
m_bMinHeight = true;
}
- nDiffHeight -= rFrmSize.GetHeight();
+ nDiffHeight -= rFrameSize.GetHeight();
}
// If the Fly contains columns, we already need to set the Fly
// and the Columns to the required value or else we run into problems.
if ( Lower() )
{
- if ( Lower()->IsColumnFrm() )
+ if ( Lower()->IsColumnFrame() )
{
const SwRect aOld( GetObjRectWithSpaces() );
const Size aOldSz( Prt().SSize() );
- const SwTwips nDiffWidth = Frm().Width() - rFrmSize.GetWidth();
- maFrm.Height( maFrm.Height() - nDiffHeight );
- maFrm.Width ( maFrm.Width() - nDiffWidth );
+ const SwTwips nDiffWidth = Frame().Width() - rFrameSize.GetWidth();
+ maFrame.Height( maFrame.Height() - nDiffHeight );
+ maFrame.Width ( maFrame.Width() - nDiffWidth );
// #i68520#
InvalidateObjRectWithSpaces();
maPrt.Height( maPrt.Height() - nDiffHeight );
maPrt.Width ( maPrt.Width() - nDiffWidth );
ChgLowersProp( aOldSz );
- ::Notify( this, FindPageFrm(), aOld );
+ ::Notify( this, FindPageFrame(), aOld );
mbValidPos = false;
bRet = true;
}
- else if ( Lower()->IsNoTextFrm() )
+ else if ( Lower()->IsNoTextFrame() )
{
mbFixSize = true;
m_bMinHeight = false;
@@ -681,7 +681,7 @@ bool SwFlyFrm::FrmSizeChg( const SwFormatFrmSize &rFrmSize )
return bRet;
}
-void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwFlyFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
sal_uInt8 nInvFlags = 0;
@@ -702,7 +702,7 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
aOIter.NextItem();
}
if ( aOldSet.Count() || aNewSet.Count() )
- SwLayoutFrm::Modify( &aOldSet, &aNewSet );
+ SwLayoutFrame::Modify( &aOldSet, &aNewSet );
}
else
_UpdateAttr( pOld, pNew, nInvFlags );
@@ -728,10 +728,10 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
SetNotifyBack();
if ( nInvFlags & 0x10 )
SetCompletePaint();
- if ( ( nInvFlags & 0x40 ) && Lower() && Lower()->IsNoTextFrm() )
+ if ( ( nInvFlags & 0x40 ) && Lower() && Lower()->IsNoTextFrame() )
ClrContourCache( GetVirtDrawObj() );
- SwRootFrm *pRoot;
- if ( nInvFlags & 0x20 && nullptr != (pRoot = getRootFrm()) )
+ SwRootFrame *pRoot;
+ if ( nInvFlags & 0x20 && nullptr != (pRoot = getRootFrame()) )
pRoot->InvalidateBrowseWidth();
// #i28701#
if ( nInvFlags & 0x80 )
@@ -745,13 +745,13 @@ void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
-void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
+void SwFlyFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
bool bClear = true;
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
switch( nWhich )
{
case RES_VERT_ORIENT:
@@ -777,7 +777,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
rInvFlags |= 0x41;
// The background needs to be messaged and invalidated
const SwRect aTmp( GetObjRectWithSpaces() );
- NotifyBackground( FindPageFrm(), aTmp, PREP_FLY_ATTR_CHG );
+ NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_ATTR_CHG );
// By changing the flow of frame-bound Frames, a vertical alignment
// can be activated/deactivated => MakeFlyPos
@@ -785,10 +785,10 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
rInvFlags |= 0x09;
// Delete contour in the Node if necessary
- if ( Lower() && Lower()->IsNoTextFrm() &&
+ if ( Lower() && Lower()->IsNoTextFrame() &&
!GetFormat()->GetSurround().IsContour() )
{
- SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode());
+ SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrame*>(Lower())->GetNode());
if ( pNd->HasContour() )
pNd->SetContour( nullptr );
}
@@ -806,7 +806,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() );
if( pSh )
{
- SwRootFrm* pLayout = getRootFrm();
+ SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
@@ -816,8 +816,8 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if (pOld && pNew)
{
ChgColumns( *static_cast<const SwFormatCol*>(pOld), *static_cast<const SwFormatCol*>(pNew) );
- const SwFormatFrmSize &rNew = GetFormat()->GetFrmSize();
- if ( FrmSizeChg( rNew ) )
+ const SwFormatFrameSize &rNew = GetFormat()->GetFrameSize();
+ if ( FrameSizeChg( rNew ) )
NotifyDrawObj();
rInvFlags |= 0x1A;
break;
@@ -826,14 +826,14 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_FRM_SIZE:
case RES_FMT_CHG:
{
- const SwFormatFrmSize &rNew = GetFormat()->GetFrmSize();
- if ( FrmSizeChg( rNew ) )
+ const SwFormatFrameSize &rNew = GetFormat()->GetFrameSize();
+ if ( FrameSizeChg( rNew ) )
NotifyDrawObj();
rInvFlags |= 0x7F;
if ( RES_FMT_CHG == nWhich )
{
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( maFrm );
+ SwRect aOld( maFrame );
const SvxULSpaceItem &rUL = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetULSpace();
aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
aOld.SSize().Height()+= rUL.GetLower();
@@ -841,17 +841,17 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
aOld.SSize().Width() += rLR.GetRight();
aNew.Union( aOld );
- NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR );
+ NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
// Special case:
// When assigning a template we cannot rely on the old column
// attribute. As there need to be at least enough for ChgColumns,
// we need to create a temporary attribute.
SwFormatCol aCol;
- if ( Lower() && Lower()->IsColumnFrm() )
+ if ( Lower() && Lower()->IsColumnFrame() )
{
sal_uInt16 nCol = 0;
- SwFrm *pTmp = Lower();
+ SwFrame *pTmp = Lower();
do
{ ++nCol;
pTmp = pTmp->GetNext();
@@ -863,18 +863,18 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
SwFormatURL aURL( GetFormat()->GetURL() );
- SwFormatFrmSize *pNewFormatFrmSize = nullptr;
+ SwFormatFrameSize *pNewFormatFrameSize = nullptr;
SwFormatChg *pOldFormatChg = nullptr;
if (nWhich == RES_FRM_SIZE)
- pNewFormatFrmSize = const_cast<SwFormatFrmSize*>(static_cast<const SwFormatFrmSize*>(pNew));
+ pNewFormatFrameSize = const_cast<SwFormatFrameSize*>(static_cast<const SwFormatFrameSize*>(pNew));
else
pOldFormatChg = const_cast<SwFormatChg*>(static_cast<const SwFormatChg*>(pOld));
- if (aURL.GetMap() && (pNewFormatFrmSize || pOldFormatChg))
+ if (aURL.GetMap() && (pNewFormatFrameSize || pOldFormatChg))
{
- const SwFormatFrmSize &rOld = pNewFormatFrmSize ?
- *pNewFormatFrmSize :
- pOldFormatChg->pChangedFormat->GetFrmSize();
+ const SwFormatFrameSize &rOld = pNewFormatFrameSize ?
+ *pNewFormatFrameSize :
+ pOldFormatChg->pChangedFormat->GetFrameSize();
//#35091# Can be "times zero", when loading the template
if ( rOld.GetWidth() && rOld.GetHeight() )
{
@@ -893,7 +893,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
GetVirtDrawObj()->SetResizeProtect( rP.IsSizeProtected() );
if ( pSh )
- pSh->InvalidateWindows( Frm() );
+ pSh->InvalidateWindows( Frame() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const sal_uInt8 nId = GetFormat()->GetOpaque().GetValue() ?
rIDDMA.GetHeavenId() :
@@ -903,18 +903,18 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( Lower() )
{
// Delete contour in the Node if necessary
- if( Lower()->IsNoTextFrm() &&
+ if( Lower()->IsNoTextFrame() &&
!GetFormat()->GetSurround().IsContour() )
{
- SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrm*>(Lower())->GetNode());
+ SwNoTextNode *pNd = static_cast<SwNoTextNode*>(static_cast<SwContentFrame*>(Lower())->GetNode());
if ( pNd->HasContour() )
pNd->SetContour( nullptr );
}
- else if( !Lower()->IsColumnFrm() )
+ else if( !Lower()->IsColumnFrame() )
{
- SwFrm* pFrm = GetLastLower();
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
- pFrm->Prepare( PREP_ADJUST_FRM );
+ SwFrame* pFrame = GetLastLower();
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
+ pFrame->Prepare( PREP_ADJUST_FRM );
}
}
@@ -929,9 +929,9 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
{
rInvFlags |= 0x41;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- getRootFrm()->InvalidateBrowseWidth();
+ getRootFrame()->InvalidateBrowseWidth();
SwRect aNew( GetObjRectWithSpaces() );
- SwRect aOld( maFrm );
+ SwRect aOld( maFrame );
if (pNew)
{
if ( RES_UL_SPACE == nWhich )
@@ -948,7 +948,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
}
}
aNew.Union( aOld );
- NotifyBackground( FindPageFrm(), aNew, PREP_CLEAR );
+ NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
}
break;
@@ -973,7 +973,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_OPAQUE:
{
if ( pSh )
- pSh->InvalidateWindows( Frm() );
+ pSh->InvalidateWindows( Frame() );
const IDocumentDrawModelAccess& rIDDMA = GetFormat()->getIDocumentDrawModelAccess();
const sal_uInt8 nId = static_cast<const SvxOpaqueItem*>(pNew)->GetValue() ?
@@ -982,11 +982,11 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
GetVirtDrawObj()->SetLayer( nId );
if( pSh )
{
- SwRootFrm* pLayout = getRootFrm();
+ SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
{
- pSh->Imp()->DisposeAccessibleFrm( this );
- pSh->Imp()->AddAccessibleFrm( this );
+ pSh->Imp()->DisposeAccessibleFrame( this );
+ pSh->Imp()->AddAccessibleFrame( this );
}
}
// #i28701# - perform reorder of object lists
@@ -997,17 +997,17 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_URL:
// The interface changes the frame size when interacting with text frames,
- // the Map, however, needs to be relative to FrmSize().
- if ( (!Lower() || !Lower()->IsNoTextFrm()) && pNew && pOld &&
+ // the Map, however, needs to be relative to FrameSize().
+ if ( (!Lower() || !Lower()->IsNoTextFrame()) && pNew && pOld &&
static_cast<const SwFormatURL*>(pNew)->GetMap() && static_cast<const SwFormatURL*>(pOld)->GetMap() )
{
- const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize();
- if ( rSz.GetHeight() != Frm().Height() ||
- rSz.GetWidth() != Frm().Width() )
+ const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
+ if ( rSz.GetHeight() != Frame().Height() ||
+ rSz.GetWidth() != Frame().Width() )
{
SwFormatURL aURL( GetFormat()->GetURL() );
- Fraction aScaleX( Frm().Width(), rSz.GetWidth() );
- Fraction aScaleY( Frm().Height(), rSz.GetHeight() );
+ Fraction aScaleX( Frame().Width(), rSz.GetWidth() );
+ Fraction aScaleY( Frame().Height(), rSz.GetHeight() );
aURL.GetMap()->Scale( aScaleX, aScaleY );
SwFrameFormat *pFormat = GetFormat();
pFormat->LockModify();
@@ -1024,38 +1024,38 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
const SwFormatChain *pChain = static_cast<const SwFormatChain*>(pNew);
if ( pChain->GetNext() )
{
- SwFlyFrm *pFollow = FindChainNeighbour( *pChain->GetNext() );
+ SwFlyFrame *pFollow = FindChainNeighbour( *pChain->GetNext() );
if ( GetNextLink() && pFollow != GetNextLink() )
- SwFlyFrm::UnchainFrames( this, GetNextLink());
+ SwFlyFrame::UnchainFrames( this, GetNextLink());
if ( pFollow )
{
if ( pFollow->GetPrevLink() &&
pFollow->GetPrevLink() != this )
- SwFlyFrm::UnchainFrames( pFollow->GetPrevLink(),
+ SwFlyFrame::UnchainFrames( pFollow->GetPrevLink(),
pFollow );
if ( !GetNextLink() )
- SwFlyFrm::ChainFrames( this, pFollow );
+ SwFlyFrame::ChainFrames( this, pFollow );
}
}
else if ( GetNextLink() )
- SwFlyFrm::UnchainFrames( this, GetNextLink() );
+ SwFlyFrame::UnchainFrames( this, GetNextLink() );
if ( pChain->GetPrev() )
{
- SwFlyFrm *pMaster = FindChainNeighbour( *pChain->GetPrev() );
+ SwFlyFrame *pMaster = FindChainNeighbour( *pChain->GetPrev() );
if ( GetPrevLink() && pMaster != GetPrevLink() )
- SwFlyFrm::UnchainFrames( GetPrevLink(), this );
+ SwFlyFrame::UnchainFrames( GetPrevLink(), this );
if ( pMaster )
{
if ( pMaster->GetNextLink() &&
pMaster->GetNextLink() != this )
- SwFlyFrm::UnchainFrames( pMaster,
+ SwFlyFrame::UnchainFrames( pMaster,
pMaster->GetNextLink() );
if ( !GetPrevLink() )
- SwFlyFrm::ChainFrames( pMaster, this );
+ SwFlyFrame::ChainFrames( pMaster, this );
}
}
else if ( GetPrevLink() )
- SwFlyFrm::UnchainFrames( GetPrevLink(), this );
+ SwFlyFrame::UnchainFrames( GetPrevLink(), this );
}
//fall-through
default:
@@ -1071,44 +1071,44 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pNewSet->ClearItem( nWhich );
}
else
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
}
/// Gets information from the Modify
-bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const
+bool SwFlyFrame::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
- return false; // There's a FlyFrm, so use it
+ return false; // There's a FlyFrame, so use it
return true; // Continue searching
}
-void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
+void SwFlyFrame::_Invalidate( SwPageFrame *pPage )
{
InvalidatePage( pPage );
m_bNotifyBack = m_bInvalid = true;
- SwFlyFrm *pFrm;
- if ( GetAnchorFrm() && nullptr != (pFrm = AnchorFrm()->FindFlyFrm()) )
+ SwFlyFrame *pFrame;
+ if ( GetAnchorFrame() && nullptr != (pFrame = AnchorFrame()->FindFlyFrame()) )
{
// Very bad case: If the Fly is bound within another Fly which
// contains columns, the Format should be from that one.
- if ( !pFrm->IsLocked() && !pFrm->IsColLocked() &&
- pFrm->Lower() && pFrm->Lower()->IsColumnFrm() )
- pFrm->InvalidateSize();
+ if ( !pFrame->IsLocked() && !pFrame->IsColLocked() &&
+ pFrame->Lower() && pFrame->Lower()->IsColumnFrame() )
+ pFrame->InvalidateSize();
}
// #i85216#
// if vertical position is oriented at a layout frame inside a ghost section,
// assure that the position is invalidated and that the information about
// the vertical position oriented frame is cleared
- if ( GetVertPosOrientFrm() && GetVertPosOrientFrm()->IsLayoutFrm() )
+ if ( GetVertPosOrientFrame() && GetVertPosOrientFrame()->IsLayoutFrame() )
{
- const SwSectionFrm* pSectFrm( GetVertPosOrientFrm()->FindSctFrm() );
- if ( pSectFrm && pSectFrm->GetSection() == nullptr )
+ const SwSectionFrame* pSectFrame( GetVertPosOrientFrame()->FindSctFrame() );
+ if ( pSectFrame && pSectFrame->GetSection() == nullptr )
{
InvalidatePos();
- ClearVertPosOrientFrm();
+ ClearVertPosOrientFrame();
}
}
}
@@ -1117,12 +1117,12 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage )
*
* The position will be Fix automatically and the attribute is changed accordingly.
*/
-void SwFlyFrm::ChgRelPos( const Point &rNewPos )
+void SwFlyFrame::ChgRelPos( const Point &rNewPos )
{
if ( GetCurrRelPos() != rNewPos )
{
SwFrameFormat *pFormat = GetFormat();
- const bool bVert = GetAnchorFrm()->IsVertical();
+ const bool bVert = GetAnchorFrame()->IsVertical();
const SwTwips nNewY = bVert ? rNewPos.X() : rNewPos.Y();
SwTwips nTmpY = nNewY == LONG_MAX ? 0 : nNewY;
if( bVert )
@@ -1131,7 +1131,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
RES_VERT_ORIENT, RES_HORI_ORIENT);
SwFormatVertOrient aVert( pFormat->GetVertOrient() );
- const SwTextFrm *pAutoFrm = nullptr;
+ const SwTextFrame *pAutoFrame = nullptr;
// #i34948# - handle also at-page and at-fly anchored
// Writer fly frames
const RndStdIds eAnchorType = GetFrameFormat().GetAnchor().GetAnchorId();
@@ -1145,7 +1145,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
aVert.SetVertOrient( text::VertOrientation::NONE );
aVert.SetRelationOrient( text::RelOrientation::FRAME );
}
- else if ( IsFlyAtCntFrm() || text::VertOrientation::NONE != aVert.GetVertOrient() )
+ else if ( IsFlyAtContentFrame() || text::VertOrientation::NONE != aVert.GetVertOrient() )
{
if( text::RelOrientation::CHAR == aVert.GetRelationOrient() && IsAutoPos() )
{
@@ -1154,17 +1154,17 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
aVert.SetVertOrient( text::VertOrientation::NONE );
sal_Int32 nOfs =
pFormat->GetAnchor().GetContentAnchor()->nContent.GetIndex();
- OSL_ENSURE( GetAnchorFrm()->IsTextFrm(), "TextFrm expected" );
- pAutoFrm = static_cast<const SwTextFrm*>(GetAnchorFrm());
- while( pAutoFrm->GetFollow() &&
- pAutoFrm->GetFollow()->GetOfst() <= nOfs )
+ OSL_ENSURE( GetAnchorFrame()->IsTextFrame(), "TextFrame expected" );
+ pAutoFrame = static_cast<const SwTextFrame*>(GetAnchorFrame());
+ while( pAutoFrame->GetFollow() &&
+ pAutoFrame->GetFollow()->GetOfst() <= nOfs )
{
- if( pAutoFrm == GetAnchorFrm() )
- nTmpY += pAutoFrm->GetRelPos().Y();
- nTmpY -= pAutoFrm->GetUpper()->Prt().Height();
- pAutoFrm = pAutoFrm->GetFollow();
+ if( pAutoFrame == GetAnchorFrame() )
+ nTmpY += pAutoFrame->GetRelPos().Y();
+ nTmpY -= pAutoFrame->GetUpper()->Prt().Height();
+ pAutoFrame = pAutoFrame->GetFollow();
}
- nTmpY = static_cast<SwFlyAtCntFrm*>(this)->GetRelCharY(pAutoFrm)-nTmpY;
+ nTmpY = static_cast<SwFlyAtContentFrame*>(this)->GetRelCharY(pAutoFrame)-nTmpY;
}
else
aVert.SetVertOrient( text::VertOrientation::CHAR_BOTTOM );
@@ -1180,7 +1180,7 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
// For Flys in the Cnt, the horizontal orientation is of no interest,
// as it's always 0
- if ( !IsFlyInCntFrm() )
+ if ( !IsFlyInContentFrame() )
{
const SwTwips nNewX = bVert ? rNewPos.Y() : rNewPos.X();
SwTwips nTmpX = nNewX == LONG_MAX ? 0 : nNewX;
@@ -1199,24 +1199,24 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
aHori.SetRelationOrient( text::RelOrientation::FRAME );
aHori.SetPosToggle( false );
}
- else if ( IsFlyAtCntFrm() || text::HoriOrientation::NONE != aHori.GetHoriOrient() )
+ else if ( IsFlyAtContentFrame() || text::HoriOrientation::NONE != aHori.GetHoriOrient() )
{
aHori.SetHoriOrient( text::HoriOrientation::NONE );
if( text::RelOrientation::CHAR == aHori.GetRelationOrient() && IsAutoPos() )
{
if( LONG_MAX != nNewX )
{
- if( !pAutoFrm )
+ if( !pAutoFrame )
{
sal_Int32 nOfs = pFormat->GetAnchor().GetContentAnchor()
->nContent.GetIndex();
- OSL_ENSURE( GetAnchorFrm()->IsTextFrm(), "TextFrm expected");
- pAutoFrm = static_cast<const SwTextFrm*>(GetAnchorFrm());
- while( pAutoFrm->GetFollow() &&
- pAutoFrm->GetFollow()->GetOfst() <= nOfs )
- pAutoFrm = pAutoFrm->GetFollow();
+ OSL_ENSURE( GetAnchorFrame()->IsTextFrame(), "TextFrame expected");
+ pAutoFrame = static_cast<const SwTextFrame*>(GetAnchorFrame());
+ while( pAutoFrame->GetFollow() &&
+ pAutoFrame->GetFollow()->GetOfst() <= nOfs )
+ pAutoFrame = pAutoFrame->GetFollow();
}
- nTmpX -= static_cast<SwFlyAtCntFrm*>(this)->GetRelCharX(pAutoFrm);
+ nTmpX -= static_cast<SwFlyAtContentFrame*>(this)->GetRelCharX(pAutoFrame);
}
}
else
@@ -1231,40 +1231,40 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos )
}
}
-/** "Formats" the Frame; Frm and PrtArea.
+/** "Formats" the Frame; Frame and PrtArea.
*
* The FixSize is not inserted here.
*/
-void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
+void SwFlyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
- OSL_ENSURE( pAttrs, "FlyFrm::Format, pAttrs is 0." );
+ OSL_ENSURE( pAttrs, "FlyFrame::Format, pAttrs is 0." );
ColLock();
if ( !mbValidSize )
{
- if ( Frm().Top() == FAR_AWAY && Frm().Left() == FAR_AWAY )
+ if ( Frame().Top() == FAR_AWAY && Frame().Left() == FAR_AWAY )
{
- // Remove safety switch (see SwFrm::CTor)
- Frm().Pos().setX(0);
- Frm().Pos().setY(0);
+ // Remove safety switch (see SwFrame::CTor)
+ Frame().Pos().setX(0);
+ Frame().Pos().setY(0);
// #i68520#
InvalidateObjRectWithSpaces();
}
// Check column width and set it if needed
- if ( Lower() && Lower()->IsColumnFrm() )
+ if ( Lower() && Lower()->IsColumnFrame() )
AdjustColumns( nullptr, false );
mbValidSize = true;
const SwTwips nUL = pAttrs->CalcTopLine() + pAttrs->CalcBottomLine();
const SwTwips nLR = pAttrs->CalcLeftLine() + pAttrs->CalcRightLine();
- const SwFormatFrmSize &rFrmSz = GetFormat()->GetFrmSize();
- Size aRelSize( CalcRel( rFrmSz ) );
+ const SwFormatFrameSize &rFrameSz = GetFormat()->GetFrameSize();
+ Size aRelSize( CalcRel( rFrameSz ) );
- OSL_ENSURE( pAttrs->GetSize().Height() != 0 || rFrmSz.GetHeightPercent(), "FrameAttr height is 0." );
- OSL_ENSURE( pAttrs->GetSize().Width() != 0 || rFrmSz.GetWidthPercent(), "FrameAttr width is 0." );
+ OSL_ENSURE( pAttrs->GetSize().Height() != 0 || rFrameSz.GetHeightPercent(), "FrameAttr height is 0." );
+ OSL_ENSURE( pAttrs->GetSize().Width() != 0 || rFrameSz.GetWidthPercent(), "FrameAttr width is 0." );
SWRECTFN( this )
if( !HasFixSize() )
@@ -1287,8 +1287,8 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
nRemaining = MINFLY;
(Prt().*fnRect->fnSetHeight)( nRemaining );
- nRemaining -= (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnAddBottom)( nRemaining + nUL );
+ nRemaining -= (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnAddBottom)( nRemaining + nUL );
// #i68520#
if ( nRemaining + nUL != 0 )
{
@@ -1304,7 +1304,7 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
if (SdrObjCustomShape* pCustomShape = dynamic_cast<SdrObjCustomShape*>( pShape) )
{
// The shape is a customshape: then inform it about the calculated fly size.
- Size aSize((Frm().*fnRect->fnGetWidth)(), (Frm().*fnRect->fnGetHeight)());
+ Size aSize((Frame().*fnRect->fnGetWidth)(), (Frame().*fnRect->fnGetHeight)());
pCustomShape->SuggestTextFrameSize(aSize);
// Do the calculations normally done after touching editeng text of the shape.
pCustomShape->NbcSetOutlinerParaObjectForText(nullptr, nullptr);
@@ -1313,15 +1313,15 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
}
else
{
- mbValidSize = true; // Fixed Frms do not Format itself
+ mbValidSize = true; // Fixed Frames do not Format itself
// Flys set their size using the attr
SwTwips nNewSize = bVert ? aRelSize.Width() : aRelSize.Height();
nNewSize -= nUL;
if( nNewSize < MINFLY )
nNewSize = MINFLY;
(Prt().*fnRect->fnSetHeight)( nNewSize );
- nNewSize += nUL - (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnAddBottom)( nNewSize );
+ nNewSize += nUL - (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnAddBottom)( nNewSize );
// #i68520#
if ( nNewSize != 0 )
{
@@ -1331,16 +1331,16 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
if ( !m_bFormatHeightOnly )
{
- OSL_ENSURE( aRelSize == CalcRel( rFrmSz ), "SwFlyFrm::Format CalcRel problem" );
+ OSL_ENSURE( aRelSize == CalcRel( rFrameSz ), "SwFlyFrame::Format CalcRel problem" );
SwTwips nNewSize = bVert ? aRelSize.Height() : aRelSize.Width();
- if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
// #i9046# Autowidth for fly frames
const SwTwips nAutoWidth = CalcAutoWidth();
if ( nAutoWidth )
{
- if( ATT_MIN_SIZE == rFrmSz.GetWidthSizeType() )
+ if( ATT_MIN_SIZE == rFrameSz.GetWidthSizeType() )
nNewSize = std::max( nNewSize - nLR, nAutoWidth );
else
nNewSize = nAutoWidth;
@@ -1352,8 +1352,8 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
if( nNewSize < MINFLY )
nNewSize = MINFLY;
(Prt().*fnRect->fnSetWidth)( nNewSize );
- nNewSize += nLR - (Frm().*fnRect->fnGetWidth)();
- (Frm().*fnRect->fnAddRight)( nNewSize );
+ nNewSize += nLR - (Frame().*fnRect->fnGetWidth)();
+ (Frame().*fnRect->fnAddRight)( nNewSize );
// #i68520#
if ( nNewSize != 0 )
{
@@ -1371,19 +1371,19 @@ void SwFlyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// OD 11.04.2003 #108824# - new parameter <bNoCalcFollow> was used by method
// <FormatWidthCols(..)> to avoid follow formatting
// for text frames. But, unformatted follows causes
-// problems in method <SwContentFrm::_WouldFit(..)>,
+// problems in method <SwContentFrame::_WouldFit(..)>,
// which assumes that the follows are formatted.
// Thus, <bNoCalcFollow> no longer used by <FormatWidthCols(..)>.
-void CalcContent( SwLayoutFrm *pLay,
+void CalcContent( SwLayoutFrame *pLay,
bool bNoColl,
bool bNoCalcFollow )
{
- vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut();
- SwSectionFrm* pSect;
+ vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut();
+ SwSectionFrame* pSect;
bool bCollect = false;
- if( pLay->IsSctFrm() )
+ if( pLay->IsSctFrame() )
{
- pSect = static_cast<SwSectionFrm*>(pLay);
+ pSect = static_cast<SwSectionFrame*>(pLay);
if( pSect->IsEndnAtEnd() && !bNoColl )
{
bCollect = true;
@@ -1393,14 +1393,14 @@ void CalcContent( SwLayoutFrm *pLay,
}
else
pSect = nullptr;
- SwFrm *pFrm = pLay->ContainsAny();
- if ( !pFrm )
+ SwFrame *pFrame = pLay->ContainsAny();
+ if ( !pFrame )
{
if( pSect )
{
if( pSect->HasFollow() )
- pFrm = pSect->GetFollow()->ContainsAny();
- if( !pFrm )
+ pFrame = pSect->GetFollow()->ContainsAny();
+ if( !pFrame )
{
if( pSect->IsEndnAtEnd() )
{
@@ -1415,12 +1415,12 @@ void CalcContent( SwLayoutFrm *pLay,
}
return;
}
- pFrm->_InvalidatePos();
+ pFrame->_InvalidatePos();
}
else
return;
}
- pFrm->InvalidatePage();
+ pFrame->InvalidatePage();
do
{
@@ -1431,46 +1431,46 @@ void CalcContent( SwLayoutFrm *pLay,
// FME 2007-08-30 #i81146# new loop control
int nLoopControlRuns = 0;
const int nLoopControlMax = 20;
- const SwFrm* pLoopControlCond = nullptr;
+ const SwFrame* pLoopControlCond = nullptr;
- SwFrm* pLast;
+ SwFrame* pLast;
do
{
- pLast = pFrm;
- if( pFrm->IsVertical() ?
- ( pFrm->GetUpper()->Prt().Height() != pFrm->Frm().Height() )
- : ( pFrm->GetUpper()->Prt().Width() != pFrm->Frm().Width() ) )
+ pLast = pFrame;
+ if( pFrame->IsVertical() ?
+ ( pFrame->GetUpper()->Prt().Height() != pFrame->Frame().Height() )
+ : ( pFrame->GetUpper()->Prt().Width() != pFrame->Frame().Width() ) )
{
- pFrm->Prepare( PREP_FIXSIZE_CHG );
- pFrm->_InvalidateSize();
+ pFrame->Prepare( PREP_FIXSIZE_CHG );
+ pFrame->_InvalidateSize();
}
- if ( pFrm->IsTabFrm() )
+ if ( pFrame->IsTabFrame() )
{
- static_cast<SwTabFrm*>(pFrm)->m_bCalcLowers = true;
+ static_cast<SwTabFrame*>(pFrame)->m_bCalcLowers = true;
// OD 26.08.2003 #i18103# - lock move backward of follow table,
// if no section content is formatted or follow table belongs
// to the section, which content is formatted.
- if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() &&
- ( !pSect || pSect == pFrm->FindSctFrm() ) )
+ if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() &&
+ ( !pSect || pSect == pFrame->FindSctFrame() ) )
{
- static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = true;
+ static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = true;
}
}
// OD 14.03.2003 #i11760# - forbid format of follow, if requested.
- if ( bNoCalcFollow && pFrm->IsTextFrm() )
- static_cast<SwTextFrm*>(pFrm)->ForbidFollowFormat();
+ if ( bNoCalcFollow && pFrame->IsTextFrame() )
+ static_cast<SwTextFrame*>(pFrame)->ForbidFollowFormat();
{
- SwFrmDeleteGuard aDeleteGuard(pSect);
- pFrm->Calc(pRenderContext);
+ SwFrameDeleteGuard aDeleteGuard(pSect);
+ pFrame->Calc(pRenderContext);
}
// OD 14.03.2003 #i11760# - reset control flag for follow format.
- if ( pFrm->IsTextFrm() )
+ if ( pFrame->IsTextFrame() )
{
- static_cast<SwTextFrm*>(pFrm)->AllowFollowFormat();
+ static_cast<SwTextFrame*>(pFrame)->AllowFollowFormat();
}
// #111937# The keep-attribute can cause the position
@@ -1481,31 +1481,31 @@ void CalcContent( SwLayoutFrm *pLay,
// frame due to its keep-attribute, if it can't move forward.
// #i57765# - do not consider invalid previous
// frame, if current frame has a column/page break before attribute.
- SwFrm* pTmpPrev = pFrm->FindPrev();
- SwFlowFrm* pTmpPrevFlowFrm = pTmpPrev && pTmpPrev->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pTmpPrev) : nullptr;
- SwFlowFrm* pTmpFlowFrm = pFrm->IsFlowFrm() ? SwFlowFrm::CastFlowFrm(pFrm) : nullptr;
+ SwFrame* pTmpPrev = pFrame->FindPrev();
+ SwFlowFrame* pTmpPrevFlowFrame = pTmpPrev && pTmpPrev->IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pTmpPrev) : nullptr;
+ SwFlowFrame* pTmpFlowFrame = pFrame->IsFlowFrame() ? SwFlowFrame::CastFlowFrame(pFrame) : nullptr;
- bool bPrevInvalid = pTmpPrevFlowFrm && pTmpFlowFrm &&
- !pTmpFlowFrm->IsFollow() &&
+ bool bPrevInvalid = pTmpPrevFlowFrame && pTmpFlowFrame &&
+ !pTmpFlowFrame->IsFollow() &&
!StackHack::IsLocked() && // #i76382#
- !pTmpFlowFrm->IsJoinLocked() &&
+ !pTmpFlowFrame->IsJoinLocked() &&
!pTmpPrev->GetValidPosFlag() &&
pLay->IsAnLower( pTmpPrev ) &&
- pTmpPrevFlowFrm->IsKeep( *pTmpPrev->GetAttrSet() ) &&
- pTmpPrevFlowFrm->IsKeepFwdMoveAllowed();
+ pTmpPrevFlowFrame->IsKeep( *pTmpPrev->GetAttrSet() ) &&
+ pTmpPrevFlowFrame->IsKeepFwdMoveAllowed();
// format floating screen objects anchored to the frame.
- if ( !bPrevInvalid && pFrm->GetDrawObjs() && pLay->IsAnLower( pFrm ) )
+ if ( !bPrevInvalid && pFrame->GetDrawObjs() && pLay->IsAnLower( pFrame ) )
{
bool bAgain = false;
bool bRestartLayoutProcess = false;
- SwPageFrm* pPageFrm = pFrm->FindPageFrm();
- size_t nCnt = pFrm->GetDrawObjs()->size();
+ SwPageFrame* pPageFrame = pFrame->FindPageFrame();
+ size_t nCnt = pFrame->GetDrawObjs()->size();
size_t i = 0;
while ( i < nCnt )
{
// #i28701#
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
// determine if anchored object has to be
// formatted and, in case, format it
@@ -1516,7 +1516,7 @@ void CalcContent( SwLayoutFrm *pLay,
// anchored objects.
//pAnchoredObj->InvalidateObjPos();
SwRect aRect( pAnchoredObj->GetObjRect() );
- if ( !SwObjectFormatter::FormatObj( *pAnchoredObj, pFrm, pPageFrm ) )
+ if ( !SwObjectFormatter::FormatObj( *pAnchoredObj, pFrame, pPageFrame ) )
{
bRestartLayoutProcess = true;
break;
@@ -1566,9 +1566,9 @@ void CalcContent( SwLayoutFrm *pLay,
}
}
- if ( !pFrm->GetDrawObjs() )
+ if ( !pFrame->GetDrawObjs() )
break;
- if ( pFrm->GetDrawObjs()->size() < nCnt )
+ if ( pFrame->GetDrawObjs()->size() < nCnt )
{
--nCnt;
// Do not increment index, in this case
@@ -1582,7 +1582,7 @@ void CalcContent( SwLayoutFrm *pLay,
// requested by floating screen object formatting
if ( bRestartLayoutProcess )
{
- pFrm = pLay->ContainsAny();
+ pFrame = pLay->ContainsAny();
pAgainObj1 = nullptr;
pAgainObj2 = nullptr;
continue;
@@ -1592,27 +1592,27 @@ void CalcContent( SwLayoutFrm *pLay,
// are formatted, if the wrapping style influence has to be considered.
if ( pLay->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) )
{
- pFrm->Calc(pRenderContext);
+ pFrame->Calc(pRenderContext);
}
if ( bAgain )
{
- pFrm = pLay->ContainsContent();
- if ( pFrm && pFrm->IsInTab() )
- pFrm = pFrm->FindTabFrm();
- if( pFrm && pFrm->IsInSct() )
+ pFrame = pLay->ContainsContent();
+ if ( pFrame && pFrame->IsInTab() )
+ pFrame = pFrame->FindTabFrame();
+ if( pFrame && pFrame->IsInSct() )
{
- SwSectionFrm* pTmp = pFrm->FindSctFrm();
+ SwSectionFrame* pTmp = pFrame->FindSctFrame();
if( pTmp != pLay && pLay->IsAnLower( pTmp ) )
- pFrm = pTmp;
+ pFrame = pTmp;
}
- if ( pFrm == pLoopControlCond )
+ if ( pFrame == pLoopControlCond )
++nLoopControlRuns;
else
{
nLoopControlRuns = 0;
- pLoopControlCond = pFrm;
+ pLoopControlCond = pFrame;
}
if ( nLoopControlRuns < nLoopControlMax )
@@ -1621,43 +1621,43 @@ void CalcContent( SwLayoutFrm *pLay,
OSL_FAIL( "LoopControl in CalcContent" );
}
}
- if ( pFrm->IsTabFrm() )
+ if ( pFrame->IsTabFrame() )
{
- if ( static_cast<SwTabFrm*>(pFrm)->IsFollow() )
- static_cast<SwTabFrm*>(pFrm)->m_bLockBackMove = false;
+ if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() )
+ static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = false;
}
- pFrm = bPrevInvalid ? pTmpPrev : pFrm->FindNext();
- if( !bPrevInvalid && pFrm && pFrm->IsSctFrm() && pSect )
+ pFrame = bPrevInvalid ? pTmpPrev : pFrame->FindNext();
+ if( !bPrevInvalid && pFrame && pFrame->IsSctFrame() && pSect )
{
- // Empty SectionFrms could be present here
- while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() )
- pFrm = pFrm->FindNext();
+ // Empty SectionFrames could be present here
+ while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() )
+ pFrame = pFrame->FindNext();
// If FindNext returns the Follow of the original Area, we want to
// continue with this content as long as it flows back.
- if( pFrm && pFrm->IsSctFrm() && ( pFrm == pSect->GetFollow() ||
- static_cast<SwSectionFrm*>(pFrm)->IsAnFollow( pSect ) ) )
+ if( pFrame && pFrame->IsSctFrame() && ( pFrame == pSect->GetFollow() ||
+ static_cast<SwSectionFrame*>(pFrame)->IsAnFollow( pSect ) ) )
{
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if( pFrm )
- pFrm->_InvalidatePos();
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if( pFrame )
+ pFrame->_InvalidatePos();
}
}
// Stay in the pLay
- // Except for SectionFrms with Follow: the first ContentFrm of the Follow
+ // Except for SectionFrames with Follow: the first ContentFrame of the Follow
// will be formatted, so that it get's a chance to load in the pLay.
// As long as these Frames are loading in pLay, we continue
- } while ( pFrm &&
- ( pLay->IsAnLower( pFrm ) ||
+ } while ( pFrame &&
+ ( pLay->IsAnLower( pFrame ) ||
( pSect &&
( ( pSect->HasFollow() &&
( pLay->IsAnLower( pLast ) ||
( pLast->IsInSct() &&
- pLast->FindSctFrm()->IsAnFollow(pSect) ) ) &&
- pSect->GetFollow()->IsAnLower( pFrm ) ) ||
- ( pFrm->IsInSct() &&
- pFrm->FindSctFrm()->IsAnFollow( pSect ) ) ) ) ) );
+ pLast->FindSctFrame()->IsAnFollow(pSect) ) ) &&
+ pSect->GetFollow()->IsAnLower( pFrame ) ) ||
+ ( pFrame->IsInSct() &&
+ pFrame->FindSctFrame()->IsAnFollow( pSect ) ) ) ) ) );
if( pSect )
{
if( bCollect )
@@ -1667,7 +1667,7 @@ void CalcContent( SwLayoutFrm *pLay,
}
if( pSect->HasFollow() )
{
- SwSectionFrm* pNxt = pSect->GetFollow();
+ SwSectionFrame* pNxt = pSect->GetFollow();
while( pNxt && !pNxt->ContainsContent() )
pNxt = pNxt->GetFollow();
if( pNxt )
@@ -1675,9 +1675,9 @@ void CalcContent( SwLayoutFrm *pLay,
}
if( bCollect )
{
- pFrm = pLay->ContainsAny();
+ pFrame = pLay->ContainsAny();
bCollect = false;
- if( pFrm )
+ if( pFrame )
continue;
}
}
@@ -1687,15 +1687,15 @@ void CalcContent( SwLayoutFrm *pLay,
}
// OD 2004-03-23 #i26791#
-void SwFlyFrm::MakeObjPos()
+void SwFlyFrame::MakeObjPos()
{
if ( !mbValidPos )
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
mbValidPos = true;
// OD 29.10.2003 #113049# - use new class to position object
- GetAnchorFrm()->Calc(pRenderContext);
+ GetAnchorFrame()->Calc(pRenderContext);
objectpositioning::SwToLayoutAnchoredObjectPosition
aObjPositioning( *GetVirtDrawObj() );
aObjPositioning.CalcPosition();
@@ -1704,15 +1704,15 @@ void SwFlyFrm::MakeObjPos()
// update relative position
SetCurrRelPos( aObjPositioning.GetRelPos() );
- SWRECTFN( GetAnchorFrm() );
- maFrm.Pos( aObjPositioning.GetRelPos() );
- maFrm.Pos() += (GetAnchorFrm()->Frm().*fnRect->fnGetPos)();
+ SWRECTFN( GetAnchorFrame() );
+ maFrame.Pos( aObjPositioning.GetRelPos() );
+ maFrame.Pos() += (GetAnchorFrame()->Frame().*fnRect->fnGetPos)();
// #i69335#
InvalidateObjRectWithSpaces();
}
}
-void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
+void SwFlyFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{
if ( !mbValidPrtArea )
{
@@ -1727,14 +1727,14 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs )
}
}
-void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs )
+void SwFlyFrame::MakeContentPos( const SwBorderAttrs &rAttrs )
{
if ( !m_bValidContentPos )
{
m_bValidContentPos = true;
const SwTwips nUL = rAttrs.CalcTopLine() + rAttrs.CalcBottomLine();
- Size aRelSize( CalcRel( GetFormat()->GetFrmSize() ) );
+ Size aRelSize( CalcRel( GetFormat()->GetFrameSize() ) );
SWRECTFN( this )
long nMinHeight = 0;
@@ -1778,33 +1778,33 @@ void SwFlyFrm::MakeContentPos( const SwBorderAttrs &rAttrs )
if( aNewContentPos != ContentPos() )
{
ContentPos() = aNewContentPos;
- for( SwFrm *pFrm = Lower(); pFrm; pFrm = pFrm->GetNext())
+ for( SwFrame *pFrame = Lower(); pFrame; pFrame = pFrame->GetNext())
{
- pFrm->InvalidatePos();
+ pFrame->InvalidatePos();
}
}
}
}
-void SwFlyFrm::InvalidateContentPos()
+void SwFlyFrame::InvalidateContentPos()
{
m_bValidContentPos = false;
_Invalidate();
}
-SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
+SwTwips SwFlyFrame::_Grow( SwTwips nDist, bool bTst )
{
SWRECTFN( this )
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
- SwTwips nSize = (Frm().*fnRect->fnGetHeight)();
+ SwTwips nSize = (Frame().*fnRect->fnGetHeight)();
if( nSize > 0 && nDist > ( LONG_MAX - nSize ) )
nDist = LONG_MAX - nSize;
if ( nDist <= 0L )
return 0L;
- if ( Lower()->IsColumnFrm() )
+ if ( Lower()->IsColumnFrame() )
{ // If it's a Column Frame, the Format takes control of the
// resizing (due to the adjustment).
if ( !bTst )
@@ -1823,7 +1823,7 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
_InvalidateSize();
const bool bOldLock = m_bLocked;
Unlock();
- if ( IsFlyFreeFrm() )
+ if ( IsFlyFreeFrame() )
{
// #i37068# - no format of position here
// and prevent move in method <CheckClip(..)>.
@@ -1834,32 +1834,32 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
mbValidPos = true;
// #i55416#
// Suppress format of width for autowidth frame, because the
- // format of the width would call <SwTextFrm::CalcFitToContent()>
+ // format of the width would call <SwTextFrame::CalcFitToContent()>
// for the lower frame, which initiated this grow.
const bool bOldFormatHeightOnly = m_bFormatHeightOnly;
- const SwFormatFrmSize& rFrmSz = GetFormat()->GetFrmSize();
- if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize();
+ if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
m_bFormatHeightOnly = true;
}
- static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
- static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
- static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false );
+ static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true );
+ static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
+ static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
// #i55416#
- if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
m_bFormatHeightOnly = bOldFormatHeightOnly;
}
}
else
- MakeAll(getRootFrm()->GetCurrShell()->GetOut());
+ MakeAll(getRootFrame()->GetCurrShell()->GetOut());
_InvalidateSize();
InvalidatePos();
if ( bOldLock )
Lock();
const SwRect aNew( GetObjRectWithSpaces() );
if ( aOld != aNew )
- ::Notify( this, FindPageFrm(), aOld );
+ ::Notify( this, FindPageFrame(), aOld );
return (aNew.*fnRect->fnGetHeight)()-(aOld.*fnRect->fnGetHeight)();
}
return nDist;
@@ -1867,19 +1867,19 @@ SwTwips SwFlyFrm::_Grow( SwTwips nDist, bool bTst )
return 0L;
}
-SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
+SwTwips SwFlyFrame::_Shrink( SwTwips nDist, bool bTst )
{
if( Lower() && !IsColLocked() && !HasFixSize() && !IsNoShrink() )
{
SWRECTFN( this )
- SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
+ SwTwips nHeight = (Frame().*fnRect->fnGetHeight)();
if ( nDist > nHeight )
nDist = nHeight;
SwTwips nVal = nDist;
if ( IsMinHeight() )
{
- const SwFormatFrmSize& rFormatSize = GetFormat()->GetFrmSize();
+ const SwFormatFrameSize& rFormatSize = GetFormat()->GetFrameSize();
SwTwips nFormatHeight = bVert ? rFormatSize.GetWidth() : rFormatSize.GetHeight();
nVal = std::min( nDist, nHeight - nFormatHeight );
@@ -1888,13 +1888,13 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
if ( nVal <= 0L )
return 0L;
- if ( Lower()->IsColumnFrm() )
+ if ( Lower()->IsColumnFrame() )
{ // If it's a Column Frame, the Format takes control of the
// resizing (due to the adjustment).
if ( !bTst )
{
SwRect aOld( GetObjRectWithSpaces() );
- (Frm().*fnRect->fnSetHeight)( nHeight - nVal );
+ (Frame().*fnRect->fnSetHeight)( nHeight - nVal );
// #i68520#
if ( nHeight - nVal != 0 )
{
@@ -1904,10 +1904,10 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
(Prt().*fnRect->fnSetHeight)( nHeight - nVal );
_InvalidatePos();
InvalidateSize();
- ::Notify( this, FindPageFrm(), aOld );
+ ::Notify( this, FindPageFrame(), aOld );
NotifyDrawObj();
- if ( GetAnchorFrm()->IsInFly() )
- AnchorFrm()->FindFlyFrm()->Shrink( nDist, bTst );
+ if ( GetAnchorFrame()->IsInFly() )
+ AnchorFrame()->FindFlyFrame()->Shrink( nDist, bTst );
}
return 0L;
}
@@ -1918,7 +1918,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
_InvalidateSize();
const bool bOldLocked = m_bLocked;
Unlock();
- if ( IsFlyFreeFrm() )
+ if ( IsFlyFreeFrame() )
{
// #i37068# - no format of position here
// and prevent move in method <CheckClip(..)>.
@@ -1929,25 +1929,25 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
mbValidPos = true;
// #i55416#
// Suppress format of width for autowidth frame, because the
- // format of the width would call <SwTextFrm::CalcFitToContent()>
+ // format of the width would call <SwTextFrame::CalcFitToContent()>
// for the lower frame, which initiated this shrink.
const bool bOldFormatHeightOnly = m_bFormatHeightOnly;
- const SwFormatFrmSize& rFrmSz = GetFormat()->GetFrmSize();
- if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ const SwFormatFrameSize& rFrameSz = GetFormat()->GetFrameSize();
+ if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
m_bFormatHeightOnly = true;
}
- static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( true );
- static_cast<SwFlyFreeFrm*>(this)->SwFlyFreeFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
- static_cast<SwFlyFreeFrm*>(this)->SetNoMoveOnCheckClip( false );
+ static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( true );
+ static_cast<SwFlyFreeFrame*>(this)->SwFlyFreeFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
+ static_cast<SwFlyFreeFrame*>(this)->SetNoMoveOnCheckClip( false );
// #i55416#
- if ( rFrmSz.GetWidthSizeType() != ATT_FIX_SIZE )
+ if ( rFrameSz.GetWidthSizeType() != ATT_FIX_SIZE )
{
m_bFormatHeightOnly = bOldFormatHeightOnly;
}
}
else
- MakeAll(getRootFrm()->GetCurrShell()->GetOut());
+ MakeAll(getRootFrame()->GetCurrShell()->GetOut());
_InvalidateSize();
InvalidatePos();
if ( bOldLocked )
@@ -1955,9 +1955,9 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
const SwRect aNew( GetObjRectWithSpaces() );
if ( aOld != aNew )
{
- ::Notify( this, FindPageFrm(), aOld );
- if ( GetAnchorFrm()->IsInFly() )
- AnchorFrm()->FindFlyFrm()->Shrink( nDist, bTst );
+ ::Notify( this, FindPageFrame(), aOld );
+ if ( GetAnchorFrame()->IsInFly() )
+ AnchorFrame()->FindFlyFrame()->Shrink( nDist, bTst );
}
return (aOld.*fnRect->fnGetHeight)() -
(aNew.*fnRect->fnGetHeight)();
@@ -1967,7 +1967,7 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, bool bTst )
return 0L;
}
-Size SwFlyFrm::ChgSize( const Size& aNewSize )
+Size SwFlyFrame::ChgSize( const Size& aNewSize )
{
// #i53298#
// If the fly frame anchored at-paragraph or at-character contains an OLE
@@ -1975,9 +1975,9 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
// of the fly frame
Size aAdjustedNewSize( aNewSize );
{
- if ( dynamic_cast<SwFlyAtCntFrm*>(this) &&
- Lower() && dynamic_cast<SwNoTextFrm*>(Lower()) &&
- static_cast<SwNoTextFrm*>(Lower())->GetNode()->GetOLENode() )
+ if ( dynamic_cast<SwFlyAtContentFrame*>(this) &&
+ Lower() && dynamic_cast<SwNoTextFrame*>(Lower()) &&
+ static_cast<SwNoTextFrame*>(Lower())->GetNode()->GetOLENode() )
{
SwRect aClipRect;
::CalcClipRect( GetVirtDrawObj(), aClipRect, false );
@@ -1991,10 +1991,10 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
}
}
}
- if ( aAdjustedNewSize != Frm().SSize() )
+ if ( aAdjustedNewSize != Frame().SSize() )
{
SwFrameFormat *pFormat = GetFormat();
- SwFormatFrmSize aSz( pFormat->GetFrmSize() );
+ SwFormatFrameSize aSz( pFormat->GetFrameSize() );
aSz.SetWidth( aAdjustedNewSize.Width() );
aSz.SetHeight( aAdjustedNewSize.Height() );
// go via the Doc for UNDO
@@ -2002,49 +2002,49 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize )
return aSz.GetSize();
}
else
- return Frm().SSize();
+ return Frame().SSize();
}
-bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const
+bool SwFlyFrame::IsLowerOf( const SwLayoutFrame* pUpperFrame ) const
{
- OSL_ENSURE( GetAnchorFrm(), "8-( Fly is lost in Space." );
- const SwFrm* pFrm = GetAnchorFrm();
+ OSL_ENSURE( GetAnchorFrame(), "8-( Fly is lost in Space." );
+ const SwFrame* pFrame = GetAnchorFrame();
do
{
- if ( pFrm == pUpperFrm )
+ if ( pFrame == pUpperFrame )
return true;
- pFrm = pFrm->IsFlyFrm()
- ? static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm()
- : pFrm->GetUpper();
- } while ( pFrm );
+ pFrame = pFrame->IsFlyFrame()
+ ? static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame()
+ : pFrame->GetUpper();
+ } while ( pFrame );
return false;
}
-void SwFlyFrm::Cut()
+void SwFlyFrame::Cut()
{
}
-void SwFrm::AppendFly( SwFlyFrm *pNew )
+void SwFrame::AppendFly( SwFlyFrame *pNew )
{
if ( !mpDrawObjs )
mpDrawObjs = new SwSortedObjs();
mpDrawObjs->Insert( *pNew );
- pNew->ChgAnchorFrm( this );
+ pNew->ChgAnchorFrame( this );
// Register at the page
- // If there's none present, register via SwPageFrm::PreparePage
- SwPageFrm* pPage = FindPageFrm();
+ // If there's none present, register via SwPageFrame::PreparePage
+ SwPageFrame* pPage = FindPageFrame();
if ( pPage != nullptr )
{
pPage->AppendFlyToPage( pNew );
}
}
-void SwFrm::RemoveFly( SwFlyFrm *pToRemove )
+void SwFrame::RemoveFly( SwFlyFrame *pToRemove )
{
// Deregister from the page
// Could already have happened, if the page was already destructed
- SwPageFrm *pPage = pToRemove->FindPageFrm();
+ SwPageFrame *pPage = pToRemove->FindPageFrame();
if ( pPage && pPage->GetSortedObjs() )
{
pPage->RemoveFlyFromPage( pToRemove );
@@ -2052,17 +2052,17 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove )
// #i73201#
else
{
- if ( pToRemove->IsAccessibleFrm() &&
+ if ( pToRemove->IsAccessibleFrame() &&
pToRemove->GetFormat() &&
- !pToRemove->IsFlyInCntFrm() )
+ !pToRemove->IsFlyInContentFrame() )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() )
{
- SwViewShell *pVSh = pRootFrm->GetCurrShell();
+ SwViewShell *pVSh = pRootFrame->GetCurrShell();
if( pVSh && pVSh->Imp() )
{
- pVSh->Imp()->DisposeAccessibleFrm( pToRemove );
+ pVSh->Imp()->DisposeAccessibleFrame( pToRemove );
}
}
}
@@ -2072,24 +2072,24 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove )
if ( !mpDrawObjs->size() )
DELETEZ( mpDrawObjs );
- pToRemove->ChgAnchorFrm( nullptr );
+ pToRemove->ChgAnchorFrame( nullptr );
- if ( !pToRemove->IsFlyInCntFrm() && GetUpper() && IsInTab() )//MA_FLY_HEIGHT
+ if ( !pToRemove->IsFlyInContentFrame() && GetUpper() && IsInTab() )//MA_FLY_HEIGHT
GetUpper()->InvalidateSize();
}
-void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
+void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj )
{
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rNewObj) == nullptr )
{
- OSL_FAIL( "SwFrm::AppendDrawObj(..) - anchored object of unexpected type -> object not appended" );
+ OSL_FAIL( "SwFrame::AppendDrawObj(..) - anchored object of unexpected type -> object not appended" );
return;
}
if ( dynamic_cast<const SwDrawVirtObj*>(_rNewObj.GetDrawObj()) == nullptr &&
- _rNewObj.GetAnchorFrm() && _rNewObj.GetAnchorFrm() != this )
+ _rNewObj.GetAnchorFrame() && _rNewObj.GetAnchorFrame() != this )
{
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
// perform disconnect from layout, if 'master' drawing object is appended
@@ -2099,12 +2099,12 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
}
- if ( _rNewObj.GetAnchorFrm() != this )
+ if ( _rNewObj.GetAnchorFrame() != this )
{
if ( !mpDrawObjs )
mpDrawObjs = new SwSortedObjs();
mpDrawObjs->Insert( _rNewObj );
- _rNewObj.ChgAnchorFrm( this );
+ _rNewObj.ChgAnchorFrame( this );
}
// #i113730#
@@ -2137,17 +2137,17 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
_rNewObj.InvalidateObjPos();
// register at page frame
- SwPageFrm* pPage = FindPageFrm();
+ SwPageFrame* pPage = FindPageFrame();
if ( pPage )
{
pPage->AppendDrawObjToPage( _rNewObj );
}
// Notify accessible layout.
- SwViewShell* pSh = getRootFrm()->GetCurrShell();
+ SwViewShell* pSh = getRootFrame()->GetCurrShell();
if( pSh )
{
- SwRootFrm* pLayout = getRootFrm();
+ SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() );
}
@@ -2155,19 +2155,19 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj )
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
}
-void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
+void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
{
// Notify accessible layout.
- SwViewShell* pSh = getRootFrm()->GetCurrShell();
+ SwViewShell* pSh = getRootFrame()->GetCurrShell();
if( pSh )
{
- SwRootFrm* pLayout = getRootFrm();
+ SwRootFrame* pLayout = getRootFrame();
if( pLayout && pLayout->IsAnyShellAccessible() )
pSh->Imp()->DisposeAccessibleObj( _rToRemoveObj.GetDrawObj() );
}
// deregister from page frame
- SwPageFrm* pPage = _rToRemoveObj.GetPageFrm();
+ SwPageFrame* pPage = _rToRemoveObj.GetPageFrame();
if ( pPage && pPage->GetSortedObjs() )
pPage->RemoveDrawObjFromPage( _rToRemoveObj );
@@ -2175,12 +2175,12 @@ void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj )
if ( !mpDrawObjs->size() )
DELETEZ( mpDrawObjs );
- _rToRemoveObj.ChgAnchorFrm( nullptr );
+ _rToRemoveObj.ChgAnchorFrame( nullptr );
assert(!mpDrawObjs || mpDrawObjs->is_sorted());
}
-void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
+void SwFrame::InvalidateObjs( const bool _bInvaPosOnly,
const bool _bNoInvaOfAsCharAnchoredObjs )
{
if ( GetDrawObjs() )
@@ -2188,7 +2188,7 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
// #i26945# - determine page the frame is on,
// in order to check, if anchored object is registered at the same
// page.
- const SwPageFrm* pPageFrm = FindPageFrm();
+ const SwPageFrame* pPageFrame = FindPageFrame();
// #i28701# - re-factoring
for ( size_t i = 0; i < GetDrawObjs()->size(); ++i )
{
@@ -2202,12 +2202,12 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
// #i26945# - no invalidation, if anchored object
// isn't registered at the same page and instead is registered at
// the page, where its anchor character text frame is on.
- if ( pAnchoredObj->GetPageFrm() &&
- pAnchoredObj->GetPageFrm() != pPageFrm )
+ if ( pAnchoredObj->GetPageFrame() &&
+ pAnchoredObj->GetPageFrame() != pPageFrame )
{
- SwTextFrm* pAnchorCharFrm = pAnchoredObj->FindAnchorCharFrm();
- if ( pAnchorCharFrm &&
- pAnchoredObj->GetPageFrm() == pAnchorCharFrm->FindPageFrm() )
+ SwTextFrame* pAnchorCharFrame = pAnchoredObj->FindAnchorCharFrame();
+ if ( pAnchorCharFrame &&
+ pAnchoredObj->GetPageFrame() == pAnchorCharFrame->FindPageFrame() )
{
continue;
}
@@ -2224,16 +2224,16 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
// has cleared environment, and unlock its position, if the anchored
// object is registered at the same page as the anchor frame is on.
if ( pAnchoredObj->ClearedEnvironment() &&
- pAnchoredObj->GetPageFrm() &&
- pAnchoredObj->GetPageFrm() == pPageFrm )
+ pAnchoredObj->GetPageFrame() &&
+ pAnchoredObj->GetPageFrame() == pPageFrame )
{
pAnchoredObj->UnlockPosition();
pAnchoredObj->SetClearedEnvironment( false );
}
// distinguish between writer fly frames and drawing objects
- if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
pFly->_Invalidate();
pFly->_InvalidatePos();
if ( !_bInvaPosOnly )
@@ -2252,13 +2252,13 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly,
// frame.
// #i44016# - add parameter <_bUnlockPosOfObjs> to
// force an unlockposition call for the lower objects.
-void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
+void SwLayoutFrame::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
{
// invalidate lower floating screen objects
- SwPageFrm* pPageFrm = FindPageFrm();
- if ( pPageFrm && pPageFrm->GetSortedObjs() )
+ SwPageFrame* pPageFrame = FindPageFrame();
+ if ( pPageFrame && pPageFrame->GetSortedObjs() )
{
- SwSortedObjs& rObjs = *(pPageFrm->GetSortedObjs());
+ SwSortedObjs& rObjs = *(pPageFrame->GetSortedObjs());
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
@@ -2268,25 +2268,25 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
// determine the anchor frame - usually it's the anchor frame,
// for at-character/as-character anchored objects the anchor character
// text frame is taken.
- const SwFrm* pAnchorFrm = pObj->GetAnchorFrmContainingAnchPos();
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ const SwFrame* pAnchorFrame = pObj->GetAnchorFrameContainingAnchPos();
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj);
- if ( pFly->Frm().Left() == FAR_AWAY )
+ if ( pFly->Frame().Left() == FAR_AWAY )
continue;
if ( pFly->IsAnLower( this ) )
continue;
- // #i26945# - use <pAnchorFrm> to check, if
+ // #i26945# - use <pAnchorFrame> to check, if
// fly frame is lower of layout frame resp. if fly frame is
// at a different page registered as its anchor frame is on.
- const bool bLow = IsAnLower( pAnchorFrm );
- if ( bLow || pAnchorFrm->FindPageFrm() != pPageFrm )
+ const bool bLow = IsAnLower( pAnchorFrame );
+ if ( bLow || pAnchorFrame->FindPageFrame() != pPageFrame )
{
- pFly->_Invalidate( pPageFrm );
- if ( !bLow || pFly->IsFlyAtCntFrm() )
+ pFly->_Invalidate( pPageFrame );
+ if ( !bLow || pFly->IsFlyAtContentFrame() )
{
// #i44016#
if ( _bUnlockPosOfObjs )
@@ -2302,12 +2302,12 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
else
{
OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr,
- "<SwLayoutFrm::NotifyFlys() - anchored object of unexpected type" );
- // #i26945# - use <pAnchorFrm> to check, if
+ "<SwLayoutFrame::NotifyFlys() - anchored object of unexpected type" );
+ // #i26945# - use <pAnchorFrame> to check, if
// fly frame is lower of layout frame resp. if fly frame is
// at a different page registered as its anchor frame is on.
- if ( IsAnLower( pAnchorFrm ) ||
- pAnchorFrm->FindPageFrm() != pPageFrm )
+ if ( IsAnLower( pAnchorFrame ) ||
+ pAnchorFrame->FindPageFrame() != pPageFrame )
{
// #i44016#
if ( _bUnlockPosOfObjs )
@@ -2321,7 +2321,7 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs )
}
}
-void SwFlyFrm::NotifyDrawObj()
+void SwFlyFrame::NotifyDrawObj()
{
SwVirtFlyDrawObj* pObj = GetVirtDrawObj();
pObj->SetRect();
@@ -2332,16 +2332,16 @@ void SwFlyFrm::NotifyDrawObj()
ClrContourCache( pObj );
}
-Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const
+Size SwFlyFrame::CalcRel( const SwFormatFrameSize &rSz ) const
{
Size aRet( rSz.GetSize() );
- const SwFrm *pRel = IsFlyLayFrm() ? GetAnchorFrm() : GetAnchorFrm()->GetUpper();
+ const SwFrame *pRel = IsFlyLayFrame() ? GetAnchorFrame() : GetAnchorFrame()->GetUpper();
if( pRel ) // LAYER_IMPL
{
long nRelWidth = LONG_MAX, nRelHeight = LONG_MAX;
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- if ( ( pRel->IsBodyFrm() || pRel->IsPageFrm() ) &&
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
+ if ( ( pRel->IsBodyFrame() || pRel->IsPageFrame() ) &&
pSh && pSh->GetViewOptions()->getBrowseMode() &&
pSh->VisArea().HasArea() )
{
@@ -2358,40 +2358,40 @@ Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const
}
// At the moment only the "== PAGE_FRAME" and "!= PAGE_FRAME" cases are handled.
- // When size is a relative to page size, ignore size of SwBodyFrm.
+ // When size is a relative to page size, ignore size of SwBodyFrame.
if (rSz.GetWidthPercentRelation() != text::RelOrientation::PAGE_FRAME)
nRelWidth = std::min( nRelWidth, pRel->Prt().Width() );
if (rSz.GetHeightPercentRelation() != text::RelOrientation::PAGE_FRAME)
nRelHeight = std::min( nRelHeight, pRel->Prt().Height() );
- if( !pRel->IsPageFrm() )
+ if( !pRel->IsPageFrame() )
{
- const SwPageFrm* pPage = FindPageFrm();
+ const SwPageFrame* pPage = FindPageFrame();
if( pPage )
{
if (rSz.GetWidthPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelWidth = std::min( nRelWidth, pPage->Frm().Width() );
+ nRelWidth = std::min( nRelWidth, pPage->Frame().Width() );
else
nRelWidth = std::min( nRelWidth, pPage->Prt().Width() );
if (rSz.GetHeightPercentRelation() == text::RelOrientation::PAGE_FRAME)
// Ignore margins of pPage.
- nRelHeight = std::min( nRelHeight, pPage->Frm().Height() );
+ nRelHeight = std::min( nRelHeight, pPage->Frame().Height() );
else
nRelHeight = std::min( nRelHeight, pPage->Prt().Height() );
}
}
- if ( rSz.GetWidthPercent() && rSz.GetWidthPercent() != SwFormatFrmSize::SYNCED )
+ if ( rSz.GetWidthPercent() && rSz.GetWidthPercent() != SwFormatFrameSize::SYNCED )
aRet.Width() = nRelWidth * rSz.GetWidthPercent() / 100;
- if ( rSz.GetHeightPercent() && rSz.GetHeightPercent() != SwFormatFrmSize::SYNCED )
+ if ( rSz.GetHeightPercent() && rSz.GetHeightPercent() != SwFormatFrameSize::SYNCED )
aRet.Height() = nRelHeight * rSz.GetHeightPercent() / 100;
- if ( rSz.GetWidthPercent() == SwFormatFrmSize::SYNCED )
+ if ( rSz.GetWidthPercent() == SwFormatFrameSize::SYNCED )
{
aRet.Width() *= aRet.Height();
aRet.Width() /= rSz.GetHeight();
}
- else if ( rSz.GetHeightPercent() == SwFormatFrmSize::SYNCED )
+ else if ( rSz.GetHeightPercent() == SwFormatFrameSize::SYNCED )
{
aRet.Height() *= aRet.Width();
aRet.Height() /= rSz.GetWidth();
@@ -2400,39 +2400,39 @@ Size SwFlyFrm::CalcRel( const SwFormatFrmSize &rSz ) const
return aRet;
}
-static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm )
+static SwTwips lcl_CalcAutoWidth( const SwLayoutFrame& rFrame )
{
SwTwips nRet = 0;
SwTwips nMin = 0;
- const SwFrm* pFrm = rFrm.Lower();
+ const SwFrame* pFrame = rFrame.Lower();
// No autowidth defined for columned frames
- if ( !pFrm || pFrm->IsColumnFrm() )
+ if ( !pFrame || pFrame->IsColumnFrame() )
return nRet;
- while ( pFrm )
+ while ( pFrame )
{
- if ( pFrm->IsSctFrm() )
+ if ( pFrame->IsSctFrame() )
{
- nMin = lcl_CalcAutoWidth( *static_cast<const SwSectionFrm*>(pFrm) );
+ nMin = lcl_CalcAutoWidth( *static_cast<const SwSectionFrame*>(pFrame) );
}
- if ( pFrm->IsTextFrm() )
+ if ( pFrame->IsTextFrame() )
{
- nMin = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pFrm))->CalcFitToContent();
+ nMin = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pFrame))->CalcFitToContent();
const SvxLRSpaceItem &rSpace =
- static_cast<const SwTextFrm*>(pFrm)->GetTextNode()->GetSwAttrSet().GetLRSpace();
- if (!static_cast<const SwTextFrm*>(pFrm)->IsLocked())
+ static_cast<const SwTextFrame*>(pFrame)->GetTextNode()->GetSwAttrSet().GetLRSpace();
+ if (!static_cast<const SwTextFrame*>(pFrame)->IsLocked())
nMin += rSpace.GetRight() + rSpace.GetTextLeft() + rSpace.GetTextFirstLineOfst();
}
- else if ( pFrm->IsTabFrm() )
+ else if ( pFrame->IsTabFrame() )
{
- const SwFormatFrmSize& rTableFormatSz = static_cast<const SwTabFrm*>(pFrm)->GetTable()->GetFrameFormat()->GetFrmSize();
+ const SwFormatFrameSize& rTableFormatSz = static_cast<const SwTabFrame*>(pFrame)->GetTable()->GetFrameFormat()->GetFrameSize();
if ( USHRT_MAX == rTableFormatSz.GetSize().Width() ||
- text::HoriOrientation::NONE == static_cast<const SwTabFrm*>(pFrm)->GetFormat()->GetHoriOrient().GetHoriOrient() )
+ text::HoriOrientation::NONE == static_cast<const SwTabFrame*>(pFrame)->GetFormat()->GetHoriOrient().GetHoriOrient() )
{
- const SwPageFrm* pPage = rFrm.FindPageFrm();
+ const SwPageFrame* pPage = rFrame.FindPageFrame();
// auto width table
- nMin = pFrm->GetUpper()->IsVertical() ?
+ nMin = pFrame->GetUpper()->IsVertical() ?
pPage->Prt().Height() :
pPage->Prt().Width();
}
@@ -2445,28 +2445,28 @@ static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm )
if ( nMin > nRet )
nRet = nMin;
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
return nRet;
}
-SwTwips SwFlyFrm::CalcAutoWidth() const
+SwTwips SwFlyFrame::CalcAutoWidth() const
{
return lcl_CalcAutoWidth( *this );
}
-/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTextFrm> contains
+/// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTextFrame> contains
/// a graphic, load of intrinsic graphic has to be avoided.
-bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
+bool SwFlyFrame::GetContour( tools::PolyPolygon& rContour,
const bool _bForPaint ) const
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
bool bRet = false;
if( GetFormat()->GetSurround().IsContour() && Lower() &&
- Lower()->IsNoTextFrm() )
+ Lower()->IsNoTextFrame() )
{
- SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwContentFrm*>(Lower())->GetNode()));
+ SwNoTextNode *pNd = const_cast<SwNoTextNode*>(static_cast<const SwNoTextNode*>(static_cast<const SwContentFrame*>(Lower())->GetNode()));
// OD 16.04.2003 #i13147# - determine <GraphicObject> instead of <Graphic>
// in order to avoid load of graphic, if <SwNoTextNode> contains a graphic
// node and method is called for paint.
@@ -2482,7 +2482,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
pGrfObj = new GraphicObject( pNd->GetGraphic() );
bGrfObjCreated = true;
}
- OSL_ENSURE( pGrfObj, "SwFlyFrm::GetContour() - No Graphic/GraphicObject found at <SwNoTextNode>." );
+ OSL_ENSURE( pGrfObj, "SwFlyFrame::GetContour() - No Graphic/GraphicObject found at <SwNoTextNode>." );
if ( pGrfObj && pGrfObj->GetType() != GRAPHIC_NONE )
{
if( !pNd->HasContour() )
@@ -2491,7 +2491,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
// during paint. Thus, return (value of <bRet> should be <false>).
if ( pGrfNd && _bForPaint )
{
- OSL_FAIL( "SwFlyFrm::GetContour() - No Contour found at <SwNoTextNode> during paint." );
+ OSL_FAIL( "SwFlyFrame::GetContour() - No Contour found at <SwNoTextNode> during paint." );
return bRet;
}
pNd->CreateContour();
@@ -2502,7 +2502,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
SwRect aClip;
SwRect aOrig;
Lower()->Calc(pRenderContext);
- static_cast<const SwNoTextFrm*>(Lower())->GetGrfArea( aClip, &aOrig, false );
+ static_cast<const SwNoTextFrame*>(Lower())->GetGrfArea( aClip, &aOrig, false );
// OD 16.04.2003 #i13147# - copy method code <SvxContourDlg::ScaleContour(..)>
// in order to avoid that graphic has to be loaded for contour scale.
//SvxContourDlg::ScaleContour( rContour, aGrf, MAP_TWIP, aOrig.SSize() );
@@ -2560,11 +2560,11 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
}
// OD 2004-03-25 #i26791#
-const SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj() const
+const SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj() const
{
return static_cast<const SwVirtFlyDrawObj*>(GetDrawObj());
}
-SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj()
+SwVirtFlyDrawObj* SwFlyFrame::GetVirtDrawObj()
{
return static_cast<SwVirtFlyDrawObj*>(DrawObj());
}
@@ -2572,52 +2572,52 @@ SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj()
// OD 2004-03-24 #i26791# - implementation of pure virtual method declared in
// base class <SwAnchoredObject>
-void SwFlyFrm::InvalidateObjPos()
+void SwFlyFrame::InvalidateObjPos()
{
InvalidatePos();
// #i68520#
InvalidateObjRectWithSpaces();
}
-SwFrameFormat& SwFlyFrm::GetFrameFormat()
+SwFrameFormat& SwFlyFrame::GetFrameFormat()
{
OSL_ENSURE( GetFormat(),
- "<SwFlyFrm::GetFrameFormat()> - missing frame format -> crash." );
+ "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." );
return *GetFormat();
}
-const SwFrameFormat& SwFlyFrm::GetFrameFormat() const
+const SwFrameFormat& SwFlyFrame::GetFrameFormat() const
{
OSL_ENSURE( GetFormat(),
- "<SwFlyFrm::GetFrameFormat()> - missing frame format -> crash." );
+ "<SwFlyFrame::GetFrameFormat()> - missing frame format -> crash." );
return *GetFormat();
}
-const SwRect SwFlyFrm::GetObjRect() const
+const SwRect SwFlyFrame::GetObjRect() const
{
- return Frm();
+ return Frame();
}
// #i70122#
// for Writer fly frames the bounding rectangle equals the object rectangles
-const SwRect SwFlyFrm::GetObjBoundRect() const
+const SwRect SwFlyFrame::GetObjBoundRect() const
{
return GetObjRect();
}
// #i68520#
-bool SwFlyFrm::_SetObjTop( const SwTwips _nTop )
+bool SwFlyFrame::_SetObjTop( const SwTwips _nTop )
{
- const bool bChanged( Frm().Pos().getY() != _nTop );
+ const bool bChanged( Frame().Pos().getY() != _nTop );
- Frm().Pos().setY(_nTop);
+ Frame().Pos().setY(_nTop);
return bChanged;
}
-bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft )
+bool SwFlyFrame::_SetObjLeft( const SwTwips _nLeft )
{
- const bool bChanged( Frm().Pos().getX() != _nLeft );
+ const bool bChanged( Frame().Pos().getX() != _nLeft );
- Frm().Pos().setX(_nLeft);
+ Frame().Pos().setX(_nLeft);
return bChanged;
}
@@ -2627,7 +2627,7 @@ bool SwFlyFrm::_SetObjLeft( const SwTwips _nLeft )
OD 2004-07-02 #i28701#
*/
-void SwFlyFrm::RegisterAtCorrectPage()
+void SwFlyFrame::RegisterAtCorrectPage()
{
// default behaviour is to do nothing.
}
@@ -2636,82 +2636,82 @@ void SwFlyFrm::RegisterAtCorrectPage()
OD 2004-05-11 #i28701#
*/
-bool SwFlyFrm::IsFormatPossible() const
+bool SwFlyFrame::IsFormatPossible() const
{
return SwAnchoredObject::IsFormatPossible() &&
!IsLocked() && !IsColLocked();
}
-void SwFlyFrm::GetAnchoredObjects( std::list<SwAnchoredObject*>& aList, const SwFormat& rFormat )
+void SwFlyFrame::GetAnchoredObjects( std::list<SwAnchoredObject*>& aList, const SwFormat& rFormat )
{
- SwIterator<SwFlyFrm,SwFormat> aIter( rFormat );
- for( SwFlyFrm* pFlyFrm = aIter.First(); pFlyFrm; pFlyFrm = aIter.Next() )
- aList.push_back( pFlyFrm );
+ SwIterator<SwFlyFrame,SwFormat> aIter( rFormat );
+ for( SwFlyFrame* pFlyFrame = aIter.First(); pFlyFrame; pFlyFrame = aIter.Next() )
+ aList.push_back( pFlyFrame );
}
-const SwFlyFrameFormat * SwFlyFrm::GetFormat() const
+const SwFlyFrameFormat * SwFlyFrame::GetFormat() const
{
return static_cast< const SwFlyFrameFormat * >( GetDep() );
}
-SwFlyFrameFormat * SwFlyFrm::GetFormat()
+SwFlyFrameFormat * SwFlyFrame::GetFormat()
{
return static_cast< SwFlyFrameFormat * >( GetDep() );
}
-void SwFlyFrm::Calc(vcl::RenderContext* pRenderContext) const
+void SwFlyFrame::Calc(vcl::RenderContext* pRenderContext) const
{
if ( !m_bValidContentPos )
- const_cast<SwFlyFrm*>(this)->PrepareMake(pRenderContext);
+ const_cast<SwFlyFrame*>(this)->PrepareMake(pRenderContext);
else
- SwLayoutFrm::Calc(pRenderContext);
+ SwLayoutFrame::Calc(pRenderContext);
}
-SwTwips SwFlyFrm::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips nMinHeight, const SwTwips nUL)
+SwTwips SwFlyFrame::CalcContentHeight(const SwBorderAttrs *pAttrs, const SwTwips nMinHeight, const SwTwips nUL)
{
SWRECTFN( this )
SwTwips nHeight = 0;
if ( Lower() )
{
- if ( Lower()->IsColumnFrm() )
+ if ( Lower()->IsColumnFrame() )
{
FormatWidthCols( *pAttrs, nUL, nMinHeight );
- nHeight = (Lower()->Frm().*fnRect->fnGetHeight)();
+ nHeight = (Lower()->Frame().*fnRect->fnGetHeight)();
}
else
{
- SwFrm *pFrm = Lower();
- while ( pFrm )
+ SwFrame *pFrame = Lower();
+ while ( pFrame )
{
- nHeight += (pFrm->Frm().*fnRect->fnGetHeight)();
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
- // This TextFrm would like to be a bit larger
- nHeight += static_cast<SwTextFrm*>(pFrm)->GetParHeight()
- - (pFrm->Prt().*fnRect->fnGetHeight)();
- else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() )
- nHeight += static_cast<SwSectionFrm*>(pFrm)->Undersize();
- pFrm = pFrm->GetNext();
+ nHeight += (pFrame->Frame().*fnRect->fnGetHeight)();
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
+ // This TextFrame would like to be a bit larger
+ nHeight += static_cast<SwTextFrame*>(pFrame)->GetParHeight()
+ - (pFrame->Prt().*fnRect->fnGetHeight)();
+ else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
+ nHeight += static_cast<SwSectionFrame*>(pFrame)->Undersize();
+ pFrame = pFrame->GetNext();
}
}
if ( GetDrawObjs() )
{
const size_t nCnt = GetDrawObjs()->size();
- SwTwips nTop = (Frm().*fnRect->fnGetTop)();
- SwTwips nBorder = (Frm().*fnRect->fnGetHeight)() -
+ SwTwips nTop = (Frame().*fnRect->fnGetTop)();
+ SwTwips nBorder = (Frame().*fnRect->fnGetHeight)() -
(Prt().*fnRect->fnGetHeight)();
for ( size_t i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[i];
- if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
// OD 06.11.2003 #i22305# - consider
// only Writer fly frames, which follow the text flow.
- if ( pFly->IsFlyLayFrm() &&
- pFly->Frm().Top() != FAR_AWAY &&
+ if ( pFly->IsFlyLayFrame() &&
+ pFly->Frame().Top() != FAR_AWAY &&
pFly->GetFormat()->GetFollowTextFlow().GetValue() )
{
- SwTwips nDist = -(pFly->Frm().*fnRect->
+ SwTwips nDist = -(pFly->Frame().*fnRect->
fnBottomDist)( nTop );
if( nDist > nBorder + nHeight )
nHeight = nDist - nBorder;
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index f2fec6a7d311..475431451304 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -49,25 +49,25 @@ using namespace ::com::sun::star;
namespace
{
-static inline SwTwips lcl_GetTopForObjPos(const SwContentFrm* pCnt, const bool bVert, const bool bVertL2R)
+static inline SwTwips lcl_GetTopForObjPos(const SwContentFrame* pCnt, const bool bVert, const bool bVertL2R)
{
if ( bVert )
{
- SwTwips aResult = pCnt->Frm().Left();
+ SwTwips aResult = pCnt->Frame().Left();
if ( bVertL2R )
- aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ aResult += pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
else
- aResult += pCnt->Frm().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ aResult += pCnt->Frame().Width() - pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
return aResult;
}
else
- return pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ return pCnt->Frame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
}
-SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
- SwFlyFreeFrm( pFormat, pSib, pAnch )
+SwFlyAtContentFrame::SwFlyAtContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
+ SwFlyFreeFrame( pFormat, pSib, pAnch )
{
m_bAtCnt = true;
m_bAutoPosition = (FLY_AT_CHAR == pFormat->GetAnchor().GetAnchorId());
@@ -75,7 +75,7 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAn
// #i28701#
-void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+void SwFlyAtContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
const SwFormatAnchor *pAnch = nullptr;
@@ -100,10 +100,10 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
//Unregister, get hold of a new anchor and attach it
SwRect aOld( GetObjRectWithSpaces() );
- SwPageFrm *pOldPage = FindPageFrm();
- const SwFrm *pOldAnchor = GetAnchorFrm();
- SwContentFrm *pContent = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetAnchorFrm()));
- AnchorFrm()->RemoveFly( this );
+ SwPageFrame *pOldPage = FindPageFrame();
+ const SwFrame *pOldAnchor = GetAnchorFrame();
+ SwContentFrame *pContent = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetAnchorFrame()));
+ AnchorFrame()->RemoveFly( this );
const bool bBodyFootnote = (pContent->IsInDocBody() || pContent->IsInFootnote());
@@ -129,9 +129,9 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
do
{
if ( bNext )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
else
- pContent = pContent->GetPrevContentFrm();
+ pContent = pContent->GetPrevContentFrame();
} while ( pContent &&
!( bBodyFootnote == ( pContent->IsInDocBody() ||
pContent->IsInFootnote() ) ) );
@@ -147,9 +147,9 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
SwSortedObjs &rObjs = *pContent->GetDrawObjs();
for( size_t i = 0; i < rObjs.size(); ++i)
{
- SwFlyFrm* pFlyFrm = dynamic_cast<SwFlyFrm*>(rObjs[i]);
- if ( pFlyFrm &&
- &(pFlyFrm->GetFrameFormat()) == pMyFlyFrameFormat )
+ SwFlyFrame* pFlyFrame = dynamic_cast<SwFlyFrame*>(rObjs[i]);
+ if ( pFlyFrame &&
+ &(pFlyFrame->GetFrameFormat()) == pMyFlyFrameFormat )
{
bFound = false;
break;
@@ -160,19 +160,19 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
if ( !pContent )
{
SwContentNode *pNode = aNewIdx.GetNode().GetContentNode();
- pContent = pNode->getLayoutFrm( getRootFrm(), &pOldAnchor->Frm().Pos(), nullptr, false );
+ pContent = pNode->getLayoutFrame( getRootFrame(), &pOldAnchor->Frame().Pos(), nullptr, false );
OSL_ENSURE( pContent, "Neuen Anker nicht gefunden" );
}
//Flys are never attached to a follow, but always on the master which
//we are going to search now.
- SwContentFrm* pFlow = pContent;
+ SwContentFrame* pFlow = pContent;
while ( pFlow->IsFollow() )
pFlow = pFlow->FindMaster();
pContent = pFlow;
//and *puff* it's attached...
pContent->AppendFly( this );
- if ( pOldPage && pOldPage != FindPageFrm() )
+ if ( pOldPage && pOldPage != FindPageFrame() )
NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
//Fix(3495)
@@ -184,7 +184,7 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
ClearCharRectAndTopOfLine();
}
else
- SwFlyFrm::Modify( pOld, pNew );
+ SwFlyFrame::Modify( pOld, pNew );
}
//We need some helper classes to monitor the oscillation and a few functions
@@ -193,59 +193,59 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
// #i3317# - re-factoring of the position stack
class SwOszControl
{
- static const SwFlyFrm *pStk1;
- static const SwFlyFrm *pStk2;
- static const SwFlyFrm *pStk3;
- static const SwFlyFrm *pStk4;
- static const SwFlyFrm *pStk5;
+ static const SwFlyFrame *pStack1;
+ static const SwFlyFrame *pStack2;
+ static const SwFlyFrame *pStack3;
+ static const SwFlyFrame *pStack4;
+ static const SwFlyFrame *pStack5;
- const SwFlyFrm *pFly;
+ const SwFlyFrame *pFly;
// #i3317#
sal_uInt8 mnPosStackSize;
std::vector<Point*> maObjPositions;
public:
- explicit SwOszControl( const SwFlyFrm *pFrm );
+ explicit SwOszControl( const SwFlyFrame *pFrame );
~SwOszControl();
bool ChkOsz();
- static bool IsInProgress( const SwFlyFrm *pFly );
+ static bool IsInProgress( const SwFlyFrame *pFly );
};
-const SwFlyFrm *SwOszControl::pStk1 = nullptr;
-const SwFlyFrm *SwOszControl::pStk2 = nullptr;
-const SwFlyFrm *SwOszControl::pStk3 = nullptr;
-const SwFlyFrm *SwOszControl::pStk4 = nullptr;
-const SwFlyFrm *SwOszControl::pStk5 = nullptr;
+const SwFlyFrame *SwOszControl::pStack1 = nullptr;
+const SwFlyFrame *SwOszControl::pStack2 = nullptr;
+const SwFlyFrame *SwOszControl::pStack3 = nullptr;
+const SwFlyFrame *SwOszControl::pStack4 = nullptr;
+const SwFlyFrame *SwOszControl::pStack5 = nullptr;
-SwOszControl::SwOszControl( const SwFlyFrm *pFrm )
- : pFly( pFrm ),
+SwOszControl::SwOszControl( const SwFlyFrame *pFrame )
+ : pFly( pFrame ),
// #i3317#
mnPosStackSize( 20 )
{
- if ( !SwOszControl::pStk1 )
- SwOszControl::pStk1 = pFly;
- else if ( !SwOszControl::pStk2 )
- SwOszControl::pStk2 = pFly;
- else if ( !SwOszControl::pStk3 )
- SwOszControl::pStk3 = pFly;
- else if ( !SwOszControl::pStk4 )
- SwOszControl::pStk4 = pFly;
- else if ( !SwOszControl::pStk5 )
- SwOszControl::pStk5 = pFly;
+ if ( !SwOszControl::pStack1 )
+ SwOszControl::pStack1 = pFly;
+ else if ( !SwOszControl::pStack2 )
+ SwOszControl::pStack2 = pFly;
+ else if ( !SwOszControl::pStack3 )
+ SwOszControl::pStack3 = pFly;
+ else if ( !SwOszControl::pStack4 )
+ SwOszControl::pStack4 = pFly;
+ else if ( !SwOszControl::pStack5 )
+ SwOszControl::pStack5 = pFly;
}
SwOszControl::~SwOszControl()
{
- if ( SwOszControl::pStk1 == pFly )
- SwOszControl::pStk1 = nullptr;
- else if ( SwOszControl::pStk2 == pFly )
- SwOszControl::pStk2 = nullptr;
- else if ( SwOszControl::pStk3 == pFly )
- SwOszControl::pStk3 = nullptr;
- else if ( SwOszControl::pStk4 == pFly )
- SwOszControl::pStk4 = nullptr;
- else if ( SwOszControl::pStk5 == pFly )
- SwOszControl::pStk5 = nullptr;
+ if ( SwOszControl::pStack1 == pFly )
+ SwOszControl::pStack1 = nullptr;
+ else if ( SwOszControl::pStack2 == pFly )
+ SwOszControl::pStack2 = nullptr;
+ else if ( SwOszControl::pStack3 == pFly )
+ SwOszControl::pStack3 = nullptr;
+ else if ( SwOszControl::pStack4 == pFly )
+ SwOszControl::pStack4 = nullptr;
+ else if ( SwOszControl::pStack5 == pFly )
+ SwOszControl::pStack5 = nullptr;
// #i3317#
while ( !maObjPositions.empty() )
{
@@ -256,17 +256,17 @@ SwOszControl::~SwOszControl()
}
}
-bool SwOszControl::IsInProgress( const SwFlyFrm *pFly )
+bool SwOszControl::IsInProgress( const SwFlyFrame *pFly )
{
- if ( SwOszControl::pStk1 && !pFly->IsLowerOf( SwOszControl::pStk1 ) )
+ if ( SwOszControl::pStack1 && !pFly->IsLowerOf( SwOszControl::pStack1 ) )
return true;
- if ( SwOszControl::pStk2 && !pFly->IsLowerOf( SwOszControl::pStk2 ) )
+ if ( SwOszControl::pStack2 && !pFly->IsLowerOf( SwOszControl::pStack2 ) )
return true;
- if ( SwOszControl::pStk3 && !pFly->IsLowerOf( SwOszControl::pStk3 ) )
+ if ( SwOszControl::pStack3 && !pFly->IsLowerOf( SwOszControl::pStack3 ) )
return true;
- if ( SwOszControl::pStk4 && !pFly->IsLowerOf( SwOszControl::pStk4 ) )
+ if ( SwOszControl::pStack4 && !pFly->IsLowerOf( SwOszControl::pStack4 ) )
return true;
- if ( SwOszControl::pStk5 && !pFly->IsLowerOf( SwOszControl::pStk5 ) )
+ if ( SwOszControl::pStack5 && !pFly->IsLowerOf( SwOszControl::pStack5 ) )
return true;
return false;
}
@@ -309,7 +309,7 @@ bool SwOszControl::ChkOsz()
|* the anchor reacts to changes of the fly. To this reaction the fly must
|* certainly react too. Sadly this can lead to oscillations; for example the
|* fly wants to go down therefore the content can go up - this leads to a
-|* smaller TextFrm thus the fly needs to go up again whereby the text will
+|* smaller TextFrame thus the fly needs to go up again whereby the text will
|* get pushed down...
|* To avoid such oscillations, a small position stack is built. If the fly
|* reaches a position which it already had once, the action is stopped.
@@ -320,7 +320,7 @@ bool SwOszControl::ChkOsz()
|* alignment to not trigger a 'big oscillation' when calling from outside
|* again.
|*/
-void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
+void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
@@ -329,23 +329,23 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( !SwOszControl::IsInProgress( this ) && !IsLocked() && !IsColLocked() )
{
- // #i28701# - use new method <GetPageFrm()>
- if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
+ // #i28701# - use new method <GetPageFrame()>
+ if( !GetPageFrame() && GetAnchorFrame() && GetAnchorFrame()->IsInFly() )
{
- SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
- SwPageFrm *pTmpPage = pFly ? pFly->FindPageFrm() : nullptr;
+ SwFlyFrame* pFly = AnchorFrame()->FindFlyFrame();
+ SwPageFrame *pTmpPage = pFly ? pFly->FindPageFrame() : nullptr;
if( pTmpPage )
pTmpPage->AppendFlyToPage( this );
}
- // #i28701# - use new method <GetPageFrm()>
- if( GetPageFrm() )
+ // #i28701# - use new method <GetPageFrame()>
+ if( GetPageFrame() )
{
bSetCompletePaintOnInvalidate = true;
{
SwFlyFrameFormat *pFormat = GetFormat();
- const SwFormatFrmSize &rFrmSz = GetFormat()->GetFrmSize();
- if( rFrmSz.GetHeightPercent() != SwFormatFrmSize::SYNCED &&
- rFrmSz.GetHeightPercent() >= 100 )
+ const SwFormatFrameSize &rFrameSz = GetFormat()->GetFrameSize();
+ if( rFrameSz.GetHeightPercent() != SwFormatFrameSize::SYNCED &&
+ rFrameSz.GetHeightPercent() >= 100 )
{
pFormat->LockModify();
SwFormatSurround aMain( pFormat->GetSurround() );
@@ -365,15 +365,15 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
// contains the anchor position. E.g., for at-character anchored
// object this can be the follow frame of the anchor frame.
const bool bFormatAnchor =
- !static_cast<const SwTextFrm*>( GetAnchorFrmContainingAnchPos() )->IsAnyJoinLocked() &&
+ !static_cast<const SwTextFrame*>( GetAnchorFrameContainingAnchPos() )->IsAnyJoinLocked() &&
!ConsiderObjWrapInfluenceOnObjPos() &&
!ConsiderObjWrapInfluenceOfOtherObjs();
- const SwFrm* pFooter = GetAnchorFrm()->FindFooterOrHeader();
- if( pFooter && !pFooter->IsFooterFrm() )
+ const SwFrame* pFooter = GetAnchorFrame()->FindFooterOrHeader();
+ if( pFooter && !pFooter->IsFooterFrame() )
pFooter = nullptr;
bool bOsz = false;
- bool bExtra = Lower() && Lower()->IsColumnFrm();
+ bool bExtra = Lower() && Lower()->IsColumnFrame();
// #i3317# - boolean, to apply temporarly the
// 'straightforward positioning process' for the frame due to its
// overlapping with a previous column.
@@ -389,10 +389,10 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
bool bConsiderWrapInfluenceDueToMovedFwdAnchor( false );
do {
SWRECTFN( this )
- Point aOldPos( (Frm().*fnRect->fnGetPos)() );
- SwFlyFreeFrm::MakeAll(pRenderContext);
+ Point aOldPos( (Frame().*fnRect->fnGetPos)() );
+ SwFlyFreeFrame::MakeAll(pRenderContext);
const bool bPosChgDueToOwnFormat =
- aOldPos != (Frm().*fnRect->fnGetPos)();
+ aOldPos != (Frame().*fnRect->fnGetPos)();
// #i3317#
if ( !ConsiderObjWrapInfluenceOnObjPos() &&
OverlapsPrevColumn() )
@@ -403,54 +403,54 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
// wrapping style influence is considered on object positioning
if ( bFormatAnchor )
{
- SwTextFrm& rAnchPosAnchorFrm =
- dynamic_cast<SwTextFrm&>(*GetAnchorFrmContainingAnchPos());
+ SwTextFrame& rAnchPosAnchorFrame =
+ dynamic_cast<SwTextFrame&>(*GetAnchorFrameContainingAnchPos());
// #i58182# - For the usage of new method
- // <SwObjectFormatterTextFrm::CheckMovedFwdCondition(..)>
+ // <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)>
// to check move forward of anchor frame due to the object
// positioning it's needed to know, if the object is anchored
// at the master frame before the anchor frame is formatted.
- const bool bAnchoredAtMaster(!rAnchPosAnchorFrm.IsFollow());
+ const bool bAnchoredAtMaster(!rAnchPosAnchorFrame.IsFollow());
// #i56300#
// perform complete format of anchor text frame and its
// previous frames, which have become invalid due to the
// fly frame format.
- SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( rAnchPosAnchorFrm );
+ SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( rAnchPosAnchorFrame );
// #i35911#
// #i40444#
// #i58182# - usage of new method
- // <SwObjectFormatterTextFrm::CheckMovedFwdCondition(..)>
+ // <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)>
sal_uInt32 nToPageNum( 0L );
bool bDummy( false );
- if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition(
- *this, GetPageFrm()->GetPhyPageNum(),
+ if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition(
+ *this, GetPageFrame()->GetPhyPageNum(),
bAnchoredAtMaster, nToPageNum, bDummy ) )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
// mark anchor text frame
// directly, that it is moved forward by object positioning.
- SwTextFrm* pAnchorTextFrm( static_cast<SwTextFrm*>(AnchorFrm()) );
+ SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );
bool bInsert( true );
- sal_uInt32 nAnchorFrmToPageNum( 0L );
+ sal_uInt32 nAnchorFrameToPageNum( 0L );
const SwDoc& rDoc = *(GetFrameFormat().GetDoc());
- if ( SwLayouter::FrmMovedFwdByObjPos(
- rDoc, *pAnchorTextFrm, nAnchorFrmToPageNum ) )
+ if ( SwLayouter::FrameMovedFwdByObjPos(
+ rDoc, *pAnchorTextFrame, nAnchorFrameToPageNum ) )
{
- if ( nAnchorFrmToPageNum < nToPageNum )
- SwLayouter::RemoveMovedFwdFrm( rDoc, *pAnchorTextFrm );
+ if ( nAnchorFrameToPageNum < nToPageNum )
+ SwLayouter::RemoveMovedFwdFrame( rDoc, *pAnchorTextFrame );
else
bInsert = false;
}
if ( bInsert )
{
- SwLayouter::InsertMovedFwdFrm( rDoc, *pAnchorTextFrm,
+ SwLayouter::InsertMovedFwdFrame( rDoc, *pAnchorTextFrame,
nToPageNum );
}
}
}
- if ( aOldPos != (Frm().*fnRect->fnGetPos)() ||
+ if ( aOldPos != (Frame().*fnRect->fnGetPos)() ||
( !GetValidPosFlag() &&
( pFooter || bPosChgDueToOwnFormat ) ) )
{
@@ -459,12 +459,12 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
// special loop prevention for dedicated document:
if ( bOsz &&
HasFixSize() && IsClipped() &&
- GetAnchorFrm()->GetUpper()->IsCellFrm() )
+ GetAnchorFrame()->GetUpper()->IsCellFrame() )
{
SwFrameFormat* pFormat = GetFormat();
- const SwFormatFrmSize& rFrmSz = pFormat->GetFrmSize();
- if ( rFrmSz.GetWidthPercent() &&
- rFrmSz.GetHeightPercent() == SwFormatFrmSize::SYNCED )
+ const SwFormatFrameSize& rFrameSz = pFormat->GetFrameSize();
+ if ( rFrameSz.GetWidthPercent() &&
+ rFrameSz.GetHeightPercent() == SwFormatFrameSize::SYNCED )
{
SwFormatSurround aSurround( pFormat->GetSurround() );
if ( aSurround.GetSurround() == SURROUND_NONE )
@@ -474,7 +474,7 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
pFormat->SetFormatAttr( aSurround );
pFormat->UnlockModify();
bOsz = false;
- OSL_FAIL( "<SwFlyAtCntFrm::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" );
+ OSL_FAIL( "<SwFlyAtContentFrame::MakeAll()> - special loop prevention for dedicated document of b6403541 applied" );
}
}
}
@@ -500,19 +500,19 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
// #i80924#
// handle special case during splitting of table rows
if ( bConsiderWrapInfluenceDueToMovedFwdAnchor &&
- GetAnchorFrm()->IsInTab() &&
- GetAnchorFrm()->IsInFollowFlowRow() )
+ GetAnchorFrame()->IsInTab() &&
+ GetAnchorFrame()->IsInFollowFlowRow() )
{
- const SwFrm* pCellFrm = GetAnchorFrm();
- while ( pCellFrm && !pCellFrm->IsCellFrm() )
+ const SwFrame* pCellFrame = GetAnchorFrame();
+ while ( pCellFrame && !pCellFrame->IsCellFrame() )
{
- pCellFrm = pCellFrm->GetUpper();
+ pCellFrame = pCellFrame->GetUpper();
}
- if ( pCellFrm )
+ if ( pCellFrame )
{
- SWRECTFN( pCellFrm )
- if ( (pCellFrm->Frm().*fnRect->fnGetTop)() == 0 &&
- (pCellFrm->Frm().*fnRect->fnGetHeight)() == 0 )
+ SWRECTFN( pCellFrame )
+ if ( (pCellFrame->Frame().*fnRect->fnGetTop)() == 0 &&
+ (pCellFrame->Frame().*fnRect->fnGetHeight)() == 0 )
{
bConsiderWrapInfluenceDueToMovedFwdAnchor = false;
}
@@ -535,9 +535,9 @@ void SwFlyAtCntFrm::MakeAll(vcl::RenderContext* pRenderContext)
#i28701#
*/
-bool SwFlyAtCntFrm::IsFormatPossible() const
+bool SwFlyAtContentFrame::IsFormatPossible() const
{
- return SwFlyFreeFrm::IsFormatPossible() &&
+ return SwFlyFreeFrame::IsFormatPossible() &&
!SwOszControl::IsInProgress( this );
}
@@ -556,23 +556,23 @@ public:
!rTwo.nSub || nSub <= rTwo.nSub ) ); }
};
-static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
+static const SwFrame * lcl_CalcDownDist( SwDistance &rRet,
const Point &rPt,
- const SwContentFrm *pCnt )
+ const SwContentFrame *pCnt )
{
rRet.nSub = 0;
//If the point stays inside the Cnt everything is clear already; the Content
//automatically has a distance of 0.
- if ( pCnt->Frm().IsInside( rPt ) )
+ if ( pCnt->Frame().IsInside( rPt ) )
{
rRet.nMain = 0;
return pCnt;
}
else
{
- const SwLayoutFrm *pUp = pCnt->IsInTab() ? pCnt->FindTabFrm()->GetUpper() : pCnt->GetUpper();
+ const SwLayoutFrame *pUp = pCnt->IsInTab() ? pCnt->FindTabFrame()->GetUpper() : pCnt->GetUpper();
// single column sections need to interconnect to their upper
- while( pUp->IsSctFrm() )
+ while( pUp->IsSctFrame() )
pUp = pUp->GetUpper();
const bool bVert = pUp->IsVertical();
@@ -582,7 +582,7 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
// #i70582#
// --> OD 2009-03-05 - adopted for Support for Classical Mongolian Script
const SwTwips nTopForObjPos = lcl_GetTopForObjPos(pCnt, bVert, bVertL2R);
- if ( pUp->Frm().IsInside( rPt ) )
+ if ( pUp->Frame().IsInside( rPt ) )
{
// <rPt> point is inside environment of given content frame
// #i70582#
@@ -597,21 +597,21 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
rRet.nMain = rPt.Y() - nTopForObjPos;
return pCnt;
}
- else if ( rPt.Y() <= pUp->Frm().Top() )
+ else if ( rPt.Y() <= pUp->Frame().Top() )
{
// <rPt> point is above environment of given content frame
// correct for vertical layout?
rRet.nMain = LONG_MAX;
}
- else if( rPt.X() < pUp->Frm().Left() &&
- rPt.Y() <= ( bVert ? pUp->Frm().Top() : pUp->Frm().Bottom() ) )
+ else if( rPt.X() < pUp->Frame().Left() &&
+ rPt.Y() <= ( bVert ? pUp->Frame().Top() : pUp->Frame().Bottom() ) )
{
// <rPt> point is left of environment of given content frame
// seems not to be correct for vertical layout!?
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, false, pCnt );
+ const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, false, pCnt );
if( !pLay ||
- (bVert && (pLay->Frm().Top() + pLay->Prt().Bottom()) <rPt.Y())||
- (!bVert && (pLay->Frm().Left() + pLay->Prt().Right())<rPt.X()) )
+ (bVert && (pLay->Frame().Top() + pLay->Prt().Bottom()) <rPt.Y())||
+ (!bVert && (pLay->Frame().Left() + pLay->Prt().Right())<rPt.X()) )
{
// <rPt> point is in left border of environment
// #i70582#
@@ -633,16 +633,16 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
rRet.nMain = bVert
? ( bVertL2R
- ? ( (pUp->Frm().Left() + pUp->Prt().Right()) - nTopForObjPos )
- : ( nTopForObjPos - (pUp->Frm().Left() + pUp->Prt().Left() ) ) )
- : ( (pUp->Frm().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
+ ? ( (pUp->Frame().Left() + pUp->Prt().Right()) - nTopForObjPos )
+ : ( nTopForObjPos - (pUp->Frame().Left() + pUp->Prt().Left() ) ) )
+ : ( (pUp->Frame().Top() + pUp->Prt().Bottom()) - nTopForObjPos );
- const SwFrm *pPre = pCnt;
- const SwFrm *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt );
- SwTwips nFrmTop = 0;
+ const SwFrame *pPre = pCnt;
+ const SwFrame *pLay = pUp->GetLeaf( MAKEPAGE_NONE, true, pCnt );
+ SwTwips nFrameTop = 0;
SwTwips nPrtHeight = 0;
bool bSct = false;
- const SwSectionFrm *pSect = pUp->FindSctFrm();
+ const SwSectionFrame *pSect = pUp->FindSctFrame();
if( pSect )
{
rRet.nSub = rRet.nMain;
@@ -651,20 +651,20 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
if( pSect && !pSect->IsAnLower( pLay ) )
{
bSct = false;
- const SwSectionFrm* pNxtSect = pLay ? pLay->FindSctFrm() : nullptr;
+ const SwSectionFrame* pNxtSect = pLay ? pLay->FindSctFrame() : nullptr;
if (pSect->IsAnFollow(pNxtSect) && pLay)
{
if( pLay->IsVertical() )
{
if ( pLay->IsVertLR() )
- nFrmTop = pLay->Frm().Left();
+ nFrameTop = pLay->Frame().Left();
else
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
nPrtHeight = pLay->Prt().Width();
}
else
{
- nFrmTop = pLay->Frm().Top();
+ nFrameTop = pLay->Frame().Top();
nPrtHeight = pLay->Prt().Height();
}
pSect = pNxtSect;
@@ -676,24 +676,24 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrmTop = pSect->Frm().Right();
- nPrtHeight = pLay->Frm().Left() + pLay->Prt().Left()
- + pLay->Prt().Width() - pSect->Frm().Left()
- - pSect->Frm().Width();
+ nFrameTop = pSect->Frame().Right();
+ nPrtHeight = pLay->Frame().Left() + pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frame().Left()
+ - pSect->Frame().Width();
}
else
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() - pLay->Frm().Left()
+ nFrameTop = pSect->Frame().Left();
+ nPrtHeight = pSect->Frame().Left() - pLay->Frame().Left()
- pLay->Prt().Left();
}
}
else
{
- nFrmTop = pSect->Frm().Bottom();
- nPrtHeight = pLay->Frm().Top() + pLay->Prt().Top()
- + pLay->Prt().Height() - pSect->Frm().Top()
- - pSect->Frm().Height();
+ nFrameTop = pSect->Frame().Bottom();
+ nPrtHeight = pLay->Frame().Top() + pLay->Prt().Top()
+ + pLay->Prt().Height() - pSect->Frame().Top()
+ - pSect->Frame().Height();
}
pSect = nullptr;
}
@@ -704,34 +704,34 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrmTop = pLay->Frm().Left();
+ nFrameTop = pLay->Frame().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
- nFrmTop = pLay->Frm().Top();
+ nFrameTop = pLay->Frame().Top();
nPrtHeight = pLay->Prt().Height();
}
bSct = nullptr != pSect;
}
- while ( pLay && !pLay->Frm().IsInside( rPt ) &&
- ( pLay->Frm().Top() <= rPt.Y() || pLay->IsInFly() ||
+ while ( pLay && !pLay->Frame().IsInside( rPt ) &&
+ ( pLay->Frame().Top() <= rPt.Y() || pLay->IsInFly() ||
( pLay->IsInSct() &&
- pLay->FindSctFrm()->GetUpper()->Frm().Top() <= rPt.Y())) )
+ pLay->FindSctFrame()->GetUpper()->Frame().Top() <= rPt.Y())) )
{
- if ( pLay->IsFootnoteContFrm() )
+ if ( pLay->IsFootnoteContFrame() )
{
- if ( !static_cast<const SwLayoutFrm*>(pLay)->Lower() )
+ if ( !static_cast<const SwLayoutFrame*>(pLay)->Lower() )
{
- SwFrm *pDel = const_cast<SwFrm*>(pLay);
+ SwFrame *pDel = const_cast<SwFrame*>(pLay);
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
return pPre;
}
return nullptr;
@@ -745,10 +745,10 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
pPre = pLay;
pLay = pLay->GetLeaf( MAKEPAGE_NONE, true, pCnt );
if( pSect && !pSect->IsAnLower( pLay ) )
- { // If we're leaving a SwSectionFrm, the next Leaf-Frm
- // is the part of the upper below the SectionFrm.
- const SwSectionFrm* pNxtSect = pLay ?
- pLay->FindSctFrm() : nullptr;
+ { // If we're leaving a SwSectionFrame, the next Leaf-Frame
+ // is the part of the upper below the SectionFrame.
+ const SwSectionFrame* pNxtSect = pLay ?
+ pLay->FindSctFrame() : nullptr;
bSct = false;
if (pLay && pSect->IsAnFollow(pNxtSect))
{
@@ -757,18 +757,18 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrmTop = pLay->Frm().Left();
+ nFrameTop = pLay->Frame().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
- nFrmTop = pLay->Frm().Top();
+ nFrameTop = pLay->Frame().Top();
nPrtHeight = pLay->Prt().Height();
}
}
@@ -779,24 +779,24 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrmTop = pSect->Frm().Right();
- nPrtHeight = pLay->Frm().Left()+pLay->Prt().Left()
- + pLay->Prt().Width() - pSect->Frm().Left()
- - pSect->Frm().Width();
+ nFrameTop = pSect->Frame().Right();
+ nPrtHeight = pLay->Frame().Left()+pLay->Prt().Left()
+ + pLay->Prt().Width() - pSect->Frame().Left()
+ - pSect->Frame().Width();
}
else
{
- nFrmTop = pSect->Frm().Left();
- nPrtHeight = pSect->Frm().Left() -
- pLay->Frm().Left() - pLay->Prt().Left();
+ nFrameTop = pSect->Frame().Left();
+ nPrtHeight = pSect->Frame().Left() -
+ pLay->Frame().Left() - pLay->Prt().Left();
}
}
else
{
- nFrmTop = pSect->Frm().Bottom();
- nPrtHeight = pLay->Frm().Top()+pLay->Prt().Top()
- + pLay->Prt().Height() - pSect->Frm().Top()
- - pSect->Frm().Height();
+ nFrameTop = pSect->Frame().Bottom();
+ nPrtHeight = pLay->Frame().Top()+pLay->Prt().Top()
+ + pLay->Prt().Height() - pSect->Frame().Top()
+ - pSect->Frame().Height();
}
pSect = nullptr;
}
@@ -807,18 +807,18 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
{
if ( pLay->IsVertLR() )
{
- nFrmTop = pLay->Frm().Left();
+ nFrameTop = pLay->Frame().Left();
nPrtHeight = pLay->Prt().Width();
}
else
{
- nFrmTop = pLay->Frm().Left() + pLay->Frm().Width();
+ nFrameTop = pLay->Frame().Left() + pLay->Frame().Width();
nPrtHeight = pLay->Prt().Width();
}
}
else
{
- nFrmTop = pLay->Frm().Top();
+ nFrameTop = pLay->Frame().Top();
nPrtHeight = pLay->Prt().Height();
}
bSct = nullptr != pSect;
@@ -827,20 +827,20 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
}
if ( pLay )
{
- if ( pLay->Frm().IsInside( rPt ) )
+ if ( pLay->Frame().IsInside( rPt ) )
{
- SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrmTop ) : ( nFrmTop - rPt.X() ) )
- : ( rPt.Y() - nFrmTop );
+ SwTwips nDiff = pLay->IsVertical() ? ( pLay->IsVertLR() ? ( rPt.X() - nFrameTop ) : ( nFrameTop - rPt.X() ) )
+ : ( rPt.Y() - nFrameTop );
if( bSct || pSect )
rRet.nSub += nDiff;
else
rRet.nMain += nDiff;
}
- if ( pLay->IsFootnoteContFrm() && !static_cast<const SwLayoutFrm*>(pLay)->Lower() )
+ if ( pLay->IsFootnoteContFrame() && !static_cast<const SwLayoutFrame*>(pLay)->Lower() )
{
- SwFrm *pDel = const_cast<SwFrm*>(pLay);
+ SwFrame *pDel = const_cast<SwFrame*>(pLay);
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
return nullptr;
}
return pLay;
@@ -852,8 +852,8 @@ static const SwFrm * lcl_CalcDownDist( SwDistance &rRet,
return nullptr;
}
-static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
- const SwContentFrm *& rpCnt,
+static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrame *pLay,
+ const SwContentFrame *& rpCnt,
const bool bBody, const bool bFootnote )
{
// Searches below pLay the nearest Cnt to the point. The reference point of
@@ -863,28 +863,28 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
rpCnt = nullptr;
sal_uInt64 nDistance = SAL_MAX_UINT64;
sal_uInt64 nNearest = SAL_MAX_UINT64;
- const SwContentFrm *pCnt = pLay ? pLay->ContainsContent() : nullptr;
+ const SwContentFrame *pCnt = pLay ? pLay->ContainsContent() : nullptr;
while ( pCnt && (bBody != pCnt->IsInDocBody() || bFootnote != pCnt->IsInFootnote()))
{
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
if ( !pLay->IsAnLower( pCnt ) )
pCnt = nullptr;
}
- const SwContentFrm *pNearest = pCnt;
+ const SwContentFrame *pNearest = pCnt;
if ( pCnt )
{
do
{
//Calculate the distance between those two points.
//'delta' X^2 + 'delta' Y^2 = 'distance'^2
- sal_uInt64 dX = std::max( pCnt->Frm().Left(), rPt.X() ) -
- std::min( pCnt->Frm().Left(), rPt.X() ),
- dY = std::max( pCnt->Frm().Top(), rPt.Y() ) -
- std::min( pCnt->Frm().Top(), rPt.Y() );
+ sal_uInt64 dX = std::max( pCnt->Frame().Left(), rPt.X() ) -
+ std::min( pCnt->Frame().Left(), rPt.X() ),
+ dY = std::max( pCnt->Frame().Top(), rPt.Y() ) -
+ std::min( pCnt->Frame().Top(), rPt.Y() );
// square of the difference will do fine here
const sal_uInt64 nDiff = (dX * dX) + (dY * dY);
- if ( pCnt->Frm().Top() <= rPt.Y() )
+ if ( pCnt->Frame().Top() <= rPt.Y() )
{
if ( nDiff < nDistance )
{
@@ -898,10 +898,10 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
nNearest = nDiff;
pNearest = pCnt;
}
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
while ( pCnt &&
(bBody != pCnt->IsInDocBody() || bFootnote != pCnt->IsInFootnote()))
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
} while ( pCnt && pLay->IsAnLower( pCnt ) );
}
@@ -912,19 +912,19 @@ static sal_uInt64 lcl_FindCntDiff( const Point &rPt, const SwLayoutFrm *pLay,
return nDistance;
}
-static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *pCnt,
+static const SwContentFrame * lcl_FindCnt( const Point &rPt, const SwContentFrame *pCnt,
const bool bBody, const bool bFootnote )
{
- //Starting from pCnt searches the ContentFrm whose left upper corner is the
+ //Starting from pCnt searches the ContentFrame whose left upper corner is the
//nearest to the point.
- //Always returns a ContentFrm.
+ //Always returns a ContentFrame.
//First the nearest Content inside the page which contains the Content is
//searched. Starting from this page the pages in both directions need to
//be considered. If possible a Content is returned whose Y-position is
//above the point.
- const SwContentFrm *pRet, *pNew;
- const SwLayoutFrm *pLay = pCnt->FindPageFrm();
+ const SwContentFrame *pRet, *pNew;
+ const SwLayoutFrame *pLay = pCnt->FindPageFrame();
sal_uInt64 nDist; // not sure if a sal_Int32 would be enough?
nDist = ::lcl_FindCntDiff( rPt, pLay, pNew, bBody, bFootnote );
@@ -934,20 +934,20 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p
{ pRet = pCnt;
nDist = SAL_MAX_UINT64;
}
- const SwContentFrm *pNearest = pRet;
+ const SwContentFrame *pNearest = pRet;
sal_uInt64 nNearest = nDist;
if ( pLay )
{
- const SwLayoutFrm *pPge = pLay;
+ const SwLayoutFrame *pPge = pLay;
sal_uInt64 nOldNew = SAL_MAX_UINT64;
for ( int i = 0; pPge->GetPrev() && (i < 3); ++i )
{
- pPge = static_cast<const SwLayoutFrm*>(pPge->GetPrev());
+ pPge = static_cast<const SwLayoutFrame*>(pPge->GetPrev());
const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote );
if ( nNew < nDist )
{
- if ( pNew->Frm().Top() <= rPt.Y() )
+ if ( pNew->Frame().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
@@ -968,11 +968,11 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p
nOldNew = SAL_MAX_UINT64;
for ( int j = 0; pPge->GetNext() && (j < 3); ++j )
{
- pPge = static_cast<const SwLayoutFrm*>(pPge->GetNext());
+ pPge = static_cast<const SwLayoutFrame*>(pPge->GetNext());
const sal_uInt64 nNew = ::lcl_FindCntDiff( rPt, pPge, pNew, bBody, bFootnote );
if ( nNew < nDist )
{
- if ( pNew->Frm().Top() <= rPt.Y() )
+ if ( pNew->Frame().Top() <= rPt.Y() )
{
pRet = pNearest = pNew;
nDist = nNearest = nNew;
@@ -989,16 +989,16 @@ static const SwContentFrm * lcl_FindCnt( const Point &rPt, const SwContentFrm *p
nOldNew = nNew;
}
}
- if ( (pRet->Frm().Top() > rPt.Y()) )
+ if ( (pRet->Frame().Top() > rPt.Y()) )
return pNearest;
else
return pRet;
}
-static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
+static void lcl_PointToPrt( Point &rPoint, const SwFrame *pFrame )
{
- SwRect aTmp( pFrm->Prt() );
- aTmp += pFrm->Frm().Pos();
+ SwRect aTmp( pFrame->Prt() );
+ aTmp += pFrame->Frame().Pos();
if ( rPoint.getX() < aTmp.Left() )
rPoint.setX(aTmp.Left());
else if ( rPoint.getX() > aTmp.Right() )
@@ -1015,24 +1015,24 @@ static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm )
* This is used to show anchors as well as changing anchors
* when dragging paragraph bound objects.
*/
-const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
+const SwContentFrame *FindAnchor( const SwFrame *pOldAnch, const Point &rNew,
const bool bBodyOnly )
{
//Search the nearest Cnt around the given document position in the text
- //flow. The given anchor is the starting Frm.
- const SwContentFrm* pCnt;
- if ( pOldAnch->IsContentFrm() )
+ //flow. The given anchor is the starting Frame.
+ const SwContentFrame* pCnt;
+ if ( pOldAnch->IsContentFrame() )
{
- pCnt = static_cast<const SwContentFrm*>(pOldAnch);
+ pCnt = static_cast<const SwContentFrame*>(pOldAnch);
}
else
{
Point aTmp( rNew );
- const SwLayoutFrm *pTmpLay = static_cast<const SwLayoutFrm*>(pOldAnch);
- if( pTmpLay->IsRootFrm() )
+ const SwLayoutFrame *pTmpLay = static_cast<const SwLayoutFrame*>(pOldAnch);
+ if( pTmpLay->IsRootFrame() )
{
SwRect aTmpRect( aTmp, Size(0,0) );
- pTmpLay = static_cast<const SwLayoutFrm*>(::FindPage( aTmpRect, pTmpLay->Lower() ));
+ pTmpLay = static_cast<const SwLayoutFrame*>(::FindPage( aTmpRect, pTmpLay->Lower() ));
}
pCnt = pTmpLay->GetContentPos( aTmp, false, bBodyOnly );
}
@@ -1046,23 +1046,23 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
if ( bBody )
{
//#38848 drag from page margin into the body.
- const SwFrm *pPage = pCnt->FindPageFrm();
+ const SwFrame *pPage = pCnt->FindPageFrame();
::lcl_PointToPrt( aNew, pPage->GetUpper() );
SwRect aTmp( aNew, Size( 0, 0 ) );
pPage = ::FindPage( aTmp, pPage );
::lcl_PointToPrt( aNew, pPage );
}
- if ( pCnt->IsInDocBody() == bBody && pCnt->Frm().IsInside( aNew ) )
+ if ( pCnt->IsInDocBody() == bBody && pCnt->Frame().IsInside( aNew ) )
return pCnt;
- else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrm() )
+ else if ( pOldAnch->IsInDocBody() || pOldAnch->IsPageFrame() )
{
// Maybe the selected anchor is on the same page as the current anchor.
// With this we won't run into problems with the columns.
Point aTmp( aNew );
- const SwContentFrm *pTmp = pCnt->FindPageFrm()->
+ const SwContentFrame *pTmp = pCnt->FindPageFrame()->
GetContentPos( aTmp, false, true );
- if ( pTmp && pTmp->Frm().IsInside( aNew ) )
+ if ( pTmp && pTmp->Frame().IsInside( aNew ) )
return pTmp;
}
@@ -1070,83 +1070,83 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
//the nearest one respectively.
//Not the direct distance is relevant but the distance which needs to be
//traveled through the text flow.
- const SwContentFrm *pUpLst;
- const SwContentFrm *pUpFrm = pCnt;
+ const SwContentFrame *pUpLst;
+ const SwContentFrame *pUpFrame = pCnt;
SwDistance nUp, nUpLst;
- ::lcl_CalcDownDist( nUp, aNew, pUpFrm );
+ ::lcl_CalcDownDist( nUp, aNew, pUpFrame );
SwDistance nDown = nUp;
bool bNegAllowed = true;// Make it possible to leave the negative section once.
do
{
- pUpLst = pUpFrm; nUpLst = nUp;
- pUpFrm = pUpLst->GetPrevContentFrm();
- while ( pUpFrm &&
- (bBody != pUpFrm->IsInDocBody() || bFootnote != pUpFrm->IsInFootnote()))
- pUpFrm = pUpFrm->GetPrevContentFrm();
- if ( pUpFrm )
+ pUpLst = pUpFrame; nUpLst = nUp;
+ pUpFrame = pUpLst->GetPrevContentFrame();
+ while ( pUpFrame &&
+ (bBody != pUpFrame->IsInDocBody() || bFootnote != pUpFrame->IsInFootnote()))
+ pUpFrame = pUpFrame->GetPrevContentFrame();
+ if ( pUpFrame )
{
- ::lcl_CalcDownDist( nUp, aNew, pUpFrm );
+ ::lcl_CalcDownDist( nUp, aNew, pUpFrame );
//It makes sense to search further, if the distance grows inside
//a table.
- if ( pUpLst->IsInTab() && pUpFrm->IsInTab() )
+ if ( pUpLst->IsInTab() && pUpFrame->IsInTab() )
{
- while ( pUpFrm && ((nUpLst < nUp && pUpFrm->IsInTab()) ||
- bBody != pUpFrm->IsInDocBody()) )
+ while ( pUpFrame && ((nUpLst < nUp && pUpFrame->IsInTab()) ||
+ bBody != pUpFrame->IsInDocBody()) )
{
- pUpFrm = pUpFrm->GetPrevContentFrm();
- if ( pUpFrm )
- ::lcl_CalcDownDist( nUp, aNew, pUpFrm );
+ pUpFrame = pUpFrame->GetPrevContentFrame();
+ if ( pUpFrame )
+ ::lcl_CalcDownDist( nUp, aNew, pUpFrame );
}
}
}
- if ( !pUpFrm )
+ if ( !pUpFrame )
nUp.nMain = LONG_MAX;
if ( nUp.nMain >= 0 && LONG_MAX != nUp.nMain )
{
bNegAllowed = false;
if ( nUpLst.nMain < 0 ) //don't take the wrong one, if the value
//just changed from negative to positive.
- { pUpLst = pUpFrm;
+ { pUpLst = pUpFrame;
nUpLst = nUp;
}
}
- } while ( pUpFrm && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) );
+ } while ( pUpFrame && ( ( bNegAllowed && nUp.nMain < 0 ) || ( nUp <= nUpLst ) ) );
- const SwContentFrm *pDownLst;
- const SwContentFrm *pDownFrm = pCnt;
+ const SwContentFrame *pDownLst;
+ const SwContentFrame *pDownFrame = pCnt;
SwDistance nDownLst;
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
do
{
- pDownLst = pDownFrm; nDownLst = nDown;
- pDownFrm = pDownLst->GetNextContentFrm();
- while ( pDownFrm &&
- (bBody != pDownFrm->IsInDocBody() || bFootnote != pDownFrm->IsInFootnote()))
- pDownFrm = pDownFrm->GetNextContentFrm();
- if ( pDownFrm )
+ pDownLst = pDownFrame; nDownLst = nDown;
+ pDownFrame = pDownLst->GetNextContentFrame();
+ while ( pDownFrame &&
+ (bBody != pDownFrame->IsInDocBody() || bFootnote != pDownFrame->IsInFootnote()))
+ pDownFrame = pDownFrame->GetNextContentFrame();
+ if ( pDownFrame )
{
- ::lcl_CalcDownDist( nDown, aNew, pDownFrm );
+ ::lcl_CalcDownDist( nDown, aNew, pDownFrame );
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
//It makes sense to search further, if the distance grows inside
//a table.
- if ( pDownLst->IsInTab() && pDownFrm->IsInTab() )
+ if ( pDownLst->IsInTab() && pDownFrame->IsInTab() )
{
- while ( pDownFrm && ( ( nDown.nMain != LONG_MAX && pDownFrm->IsInTab()) || bBody != pDownFrm->IsInDocBody() ) )
+ while ( pDownFrame && ( ( nDown.nMain != LONG_MAX && pDownFrame->IsInTab()) || bBody != pDownFrame->IsInDocBody() ) )
{
- pDownFrm = pDownFrm->GetNextContentFrm();
- if ( pDownFrm )
- ::lcl_CalcDownDist( nDown, aNew, pDownFrm );
+ pDownFrame = pDownFrame->GetNextContentFrame();
+ if ( pDownFrame )
+ ::lcl_CalcDownDist( nDown, aNew, pDownFrame );
if ( nDown.nMain < 0 )
nDown.nMain = LONG_MAX;
}
}
}
- if ( !pDownFrm )
+ if ( !pDownFrame )
nDown.nMain = LONG_MAX;
- } while ( pDownFrm && nDown <= nDownLst &&
+ } while ( pDownFrame && nDown <= nDownLst &&
nDown.nMain != LONG_MAX && nDownLst.nMain != LONG_MAX );
//If we couldn't find one in both directions, we'll search the Content whose
@@ -1166,40 +1166,40 @@ const SwContentFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew,
return nDownLst < nUpLst ? pDownLst : pUpLst;
}
-void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
+void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
{
- SwPageFrm *pOldPage = FindPageFrm();
+ SwPageFrame *pOldPage = FindPageFrame();
const SwRect aOld( GetObjRectWithSpaces() );
Point aNew( rNew );
- if( ( GetAnchorFrm()->IsVertical() && !GetAnchorFrm()->IsVertLR() ) || GetAnchorFrm()->IsRightToLeft() )
- aNew.setX(aNew.getX() + Frm().Width());
- SwContentFrm *pCnt = const_cast<SwContentFrm*>(::FindAnchor( GetAnchorFrm(), aNew ));
+ if( ( GetAnchorFrame()->IsVertical() && !GetAnchorFrame()->IsVertLR() ) || GetAnchorFrame()->IsRightToLeft() )
+ aNew.setX(aNew.getX() + Frame().Width());
+ SwContentFrame *pCnt = const_cast<SwContentFrame*>(::FindAnchor( GetAnchorFrame(), aNew ));
if( pCnt->IsProtected() )
- pCnt = const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(GetAnchorFrm()));
+ pCnt = const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(GetAnchorFrame()));
- SwPageFrm *pTmpPage = nullptr;
+ SwPageFrame *pTmpPage = nullptr;
const bool bVert = pCnt->IsVertical();
const bool bVertL2R = pCnt->IsVertLR();
const bool bRTL = pCnt->IsRightToLeft();
- if( ( !bVert != !GetAnchorFrm()->IsVertical() ) ||
- ( !bRTL != !GetAnchorFrm()->IsRightToLeft() ) )
+ if( ( !bVert != !GetAnchorFrame()->IsVertical() ) ||
+ ( !bRTL != !GetAnchorFrame()->IsRightToLeft() ) )
{
if( bVert || bRTL )
- aNew.setX(aNew.getX() + Frm().Width());
+ aNew.setX(aNew.getX() + Frame().Width());
else
- aNew.setX(aNew.getX() - Frm().Width());
+ aNew.setX(aNew.getX() - Frame().Width());
}
if ( pCnt->IsInDocBody() )
{
//#38848 drag from page margin into the body.
- pTmpPage = pCnt->FindPageFrm();
+ pTmpPage = pCnt->FindPageFrame();
::lcl_PointToPrt( aNew, pTmpPage->GetUpper() );
SwRect aTmp( aNew, Size( 0, 0 ) );
- pTmpPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(::FindPage( aTmp, pTmpPage )));
+ pTmpPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(::FindPage( aTmp, pTmpPage )));
::lcl_PointToPrt( aNew, pTmpPage );
}
@@ -1207,25 +1207,25 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
//rNew is an absolute position. We need to calculate the distance from rNew
//to the anchor inside the text flow to correctly set RelPos.
//!!!!!We can optimize here: FindAnchor could also return RelPos!
- const SwFrm *pFrm = nullptr;
+ const SwFrame *pFrame = nullptr;
SwTwips nY;
- if ( pCnt->Frm().IsInside( aNew ) )
+ if ( pCnt->Frame().IsInside( aNew ) )
{
// #i70582#
if ( bVert )
{
- nY = pCnt->Frm().Left() - rNew.X();
+ nY = pCnt->Frame().Left() - rNew.X();
if ( bVertL2R )
nY = -nY;
- nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ nY -= pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
- nY = rNew.Y() - pCnt->Frm().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ nY = rNew.Y() - pCnt->Frame().Top() + pCnt->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
}
else
{
SwDistance aDist;
- pFrm = ::lcl_CalcDownDist( aDist, aNew, pCnt );
+ pFrame = ::lcl_CalcDownDist( aDist, aNew, pCnt );
nY = aDist.nMain + aDist.nSub;
}
@@ -1235,16 +1235,16 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
{
// Flys are never attached to the follow but always to the master,
// which we're going to search now.
- const SwContentFrm *pOriginal = pCnt;
- const SwContentFrm *pFollow = pCnt;
+ const SwContentFrame *pOriginal = pCnt;
+ const SwContentFrame *pFollow = pCnt;
while ( pCnt->IsFollow() )
{
do
{
- SwContentFrm* pPrev = pCnt->GetPrevContentFrm();
+ SwContentFrame* pPrev = pCnt->GetPrevContentFrame();
if (!pPrev)
{
- SAL_WARN("sw.core", "very unexpected missing PrevContentFrm");
+ SAL_WARN("sw.core", "very unexpected missing PrevContentFrame");
break;
}
pCnt = pPrev;
@@ -1254,14 +1254,14 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
}
SwTwips nDiff = 0;
do
- { const SwFrm *pUp = pFollow->GetUpper();
+ { const SwFrame *pUp = pFollow->GetUpper();
if( pUp->IsVertical() )
{
if ( pUp->IsVertLR() )
nDiff += pUp->Prt().Width() - pFollow->GetRelPos().getX();
else
- nDiff += pFollow->Frm().Left() + pFollow->Frm().Width()
- - pUp->Frm().Left() - pUp->Prt().Left();
+ nDiff += pFollow->Frame().Left() + pFollow->Frame().Width()
+ - pUp->Frame().Left() - pUp->Prt().Left();
}
else
nDiff += pUp->Prt().Height() - pFollow->GetRelPos().Y();
@@ -1269,9 +1269,9 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
} while ( pFollow != pOriginal );
nY += nDiff;
if( bVert )
- nX = pCnt->Frm().Top() - pOriginal->Frm().Top();
+ nX = pCnt->Frame().Top() - pOriginal->Frame().Top();
else
- nX = pCnt->Frm().Left() - pOriginal->Frm().Left();
+ nX = pCnt->Frame().Left() - pOriginal->Frame().Left();
}
if ( nY == LONG_MAX )
@@ -1295,41 +1295,41 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
if( bVert )
{
- if( !pFrm )
- nX += rNew.Y() - pCnt->Frm().Top();
+ if( !pFrame )
+ nX += rNew.Y() - pCnt->Frame().Top();
else
- nX = rNew.Y() - pFrm->Frm().Top();
+ nX = rNew.Y() - pFrame->Frame().Top();
}
else
{
- if( !pFrm )
+ if( !pFrame )
{
if ( pCnt->IsRightToLeft() )
- nX += pCnt->Frm().Right() - rNew.X() - Frm().Width();
+ nX += pCnt->Frame().Right() - rNew.X() - Frame().Width();
else
- nX += rNew.X() - pCnt->Frm().Left();
+ nX += rNew.X() - pCnt->Frame().Left();
}
else
{
- if ( pFrm->IsRightToLeft() )
- nX += pFrm->Frm().Right() - rNew.X() - Frm().Width();
+ if ( pFrame->IsRightToLeft() )
+ nX += pFrame->Frame().Right() - rNew.X() - Frame().Width();
else
- nX = rNew.X() - pFrm->Frm().Left();
+ nX = rNew.X() - pFrame->Frame().Left();
}
}
GetFormat()->GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, nullptr );
- if( pCnt != GetAnchorFrm() || ( IsAutoPos() && pCnt->IsTextFrm() &&
+ if( pCnt != GetAnchorFrame() || ( IsAutoPos() && pCnt->IsTextFrame() &&
GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE)) )
{
//Set the anchor attribute according to the new Cnt.
SwFormatAnchor aAnch( pFormat->GetAnchor() );
SwPosition pos = *aAnch.GetContentAnchor();
- if( IsAutoPos() && pCnt->IsTextFrm() )
+ if( IsAutoPos() && pCnt->IsTextFrame() )
{
- SwCrsrMoveState eTmpState( MV_SETONLYTEXT );
+ SwCursorMoveState eTmpState( MV_SETONLYTEXT );
Point aPt( rNew );
- if( pCnt->GetCrsrOfst( &pos, aPt, &eTmpState )
+ if( pCnt->GetCursorOfst( &pos, aPt, &eTmpState )
&& pos.nNode == *pCnt->GetNode() )
{
if ( pCnt->GetNode()->GetTextNode() != nullptr )
@@ -1369,8 +1369,8 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
pFormat->GetDoc()->SetAttr( aAnch, *pFormat );
}
}
- else if ( pTmpPage && pTmpPage != GetPageFrm() )
- GetPageFrm()->MoveFly( this, pTmpPage );
+ else if ( pTmpPage && pTmpPage != GetPageFrame() )
+ GetPageFrame()->MoveFly( this, pTmpPage );
const Point aRelPos = bVert ? Point( -nY, nX ) : Point( nX, nY );
@@ -1378,7 +1378,7 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
GetFormat()->GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, nullptr );
- if ( pOldPage != FindPageFrm() )
+ if ( pOldPage != FindPageFrame() )
::Notify_Background( GetVirtDrawObj(), pOldPage, aOld, PREP_FLY_LEAVE, false );
}
@@ -1386,26 +1386,26 @@ void SwFlyAtCntFrm::SetAbsPos( const Point &rNew )
page frame
#i28701#
- takes over functionality of deleted method <SwFlyAtCntFrm::AssertPage()>
+ takes over functionality of deleted method <SwFlyAtContentFrame::AssertPage()>
*/
-void SwFlyAtCntFrm::RegisterAtCorrectPage()
+void SwFlyAtContentFrame::RegisterAtCorrectPage()
{
- SwPageFrm* pPageFrm( nullptr );
- if ( GetVertPosOrientFrm() )
+ SwPageFrame* pPageFrame( nullptr );
+ if ( GetVertPosOrientFrame() )
{
- pPageFrm = const_cast<SwPageFrm*>(GetVertPosOrientFrm()->FindPageFrm());
+ pPageFrame = const_cast<SwPageFrame*>(GetVertPosOrientFrame()->FindPageFrame());
}
- if ( pPageFrm && GetPageFrm() != pPageFrm )
+ if ( pPageFrame && GetPageFrame() != pPageFrame )
{
- if ( GetPageFrm() )
- GetPageFrm()->MoveFly( this, pPageFrm );
+ if ( GetPageFrame() )
+ GetPageFrame()->MoveFly( this, pPageFrame );
else
- pPageFrm->AppendFlyToPage( this );
+ pPageFrame->AppendFlyToPage( this );
}
}
// #i26791#
-void SwFlyAtCntFrm::MakeObjPos()
+void SwFlyAtContentFrame::MakeObjPos()
{
// if fly frame position is valid, nothing is to do. Thus, return
if ( mbValidPos )
@@ -1420,8 +1420,8 @@ void SwFlyAtCntFrm::MakeObjPos()
// anchored object is marked that it clears its environment and its
// environment is already cleared.
// before checking for cleared environment
- // check, if member <mpVertPosOrientFrm> is set.
- if ( GetVertPosOrientFrm() &&
+ // check, if member <mpVertPosOrientFrame> is set.
+ if ( GetVertPosOrientFrame() &&
ClearedEnvironment() && HasClearedEnvironment() )
{
return;
@@ -1432,13 +1432,13 @@ void SwFlyAtCntFrm::MakeObjPos()
aObjPositioning( *GetVirtDrawObj() );
aObjPositioning.CalcPosition();
- SetVertPosOrientFrm ( aObjPositioning.GetVertPosOrientFrm() );
+ SetVertPosOrientFrame ( aObjPositioning.GetVertPosOrientFrame() );
}
// #i28701#
-bool SwFlyAtCntFrm::_InvalidationAllowed( const InvalidationType _nInvalid ) const
+bool SwFlyAtContentFrame::_InvalidationAllowed( const InvalidationType _nInvalid ) const
{
- bool bAllowed( SwFlyFreeFrm::_InvalidationAllowed( _nInvalid ) );
+ bool bAllowed( SwFlyFreeFrame::_InvalidationAllowed( _nInvalid ) );
// forbiddance of base instance can't be over ruled.
if ( bAllowed )
diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx
index c0a41ec2fa8f..b900bd08c9f6 100644
--- a/sw/source/core/layout/flyincnt.cxx
+++ b/sw/source/core/layout/flyincnt.cxx
@@ -28,8 +28,8 @@
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
-SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
- SwFlyFrm( pFormat, pSib, pAnch )
+SwFlyInContentFrame::SwFlyInContentFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
+ SwFlyFrame( pFormat, pSib, pAnch )
{
m_bInCnt = bInvalidLayout = bInvalidContent = true;
SwTwips nRel = pFormat->GetVertOrient().GetPos();
@@ -42,24 +42,24 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAn
SetCurrRelPos( aRelPos );
}
-void SwFlyInCntFrm::DestroyImpl()
+void SwFlyInContentFrame::DestroyImpl()
{
- if ( !GetFormat()->GetDoc()->IsInDtor() && GetAnchorFrm() )
+ if ( !GetFormat()->GetDoc()->IsInDtor() && GetAnchorFrame() )
{
SwRect aTmp( GetObjRectWithSpaces() );
- SwFlyInCntFrm::NotifyBackground( FindPageFrm(), aTmp, PREP_FLY_LEAVE );
+ SwFlyInContentFrame::NotifyBackground( FindPageFrame(), aTmp, PREP_FLY_LEAVE );
}
- SwFlyFrm::DestroyImpl();
+ SwFlyFrame::DestroyImpl();
}
-SwFlyInCntFrm::~SwFlyInCntFrm()
+SwFlyInContentFrame::~SwFlyInContentFrame()
{
}
// #i28701#
-void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
+void SwFlyInContentFrame::SetRefPoint( const Point& rPoint,
const Point& rRelAttr,
const Point& rRelPos )
{
@@ -72,8 +72,8 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
pNotify = new SwFlyNotify( this );
aRef = rPoint;
SetCurrRelPos( rRelAttr );
- SWRECTFN( GetAnchorFrm() )
- (Frm().*fnRect->fnSetPos)( rPoint + rRelPos );
+ SWRECTFN( GetAnchorFrame() )
+ (Frame().*fnRect->fnSetPos)( rPoint + rRelPos );
// #i68520#
InvalidateObjRectWithSpaces();
if( pNotify )
@@ -81,12 +81,12 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint,
InvalidatePage();
mbValidPos = false;
m_bInvalid = true;
- Calc(getRootFrm()->GetCurrShell()->GetOut());
+ Calc(getRootFrame()->GetCurrShell()->GetOut());
delete pNotify;
}
}
-void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+void SwFlyInContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
bool bCallPrepare = false;
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
@@ -107,40 +107,40 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
aNew.ClearItem( RES_FRMMACRO );
if( aNew.Count() )
{
- SwFlyFrm::Modify( &aOld, &aNew );
+ SwFlyFrame::Modify( &aOld, &aNew );
bCallPrepare = true;
}
}
else if( static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->Count())
{
- SwFlyFrm::Modify( pOld, pNew );
+ SwFlyFrame::Modify( pOld, pNew );
bCallPrepare = true;
}
}
else if( nWhich != RES_SURROUND && RES_FRMMACRO != nWhich )
{
- SwFlyFrm::Modify( pOld, pNew );
+ SwFlyFrame::Modify( pOld, pNew );
bCallPrepare = true;
}
- if ( bCallPrepare && GetAnchorFrm() )
- AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, GetFormat() );
+ if ( bCallPrepare && GetAnchorFrame() )
+ AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, GetFormat() );
}
/// Here the content gets formatted initially.
-void SwFlyInCntFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs )
+void SwFlyInContentFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttrs )
{
- if ( !Frm().Height() )
+ if ( !Frame().Height() )
{
Lock(); //don't format the anchor on the crook.
- SwContentFrm *pContent = ContainsContent();
+ SwContentFrame *pContent = ContainsContent();
while ( pContent )
{ pContent->Calc(pRenderContext);
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
Unlock();
}
- SwFlyFrm::Format( pRenderContext, pAttrs );
+ SwFlyFrame::Format( pRenderContext, pAttrs );
}
/** Calculate object position
@@ -148,7 +148,7 @@ void SwFlyInCntFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAt
* @note: In contrast to other Frames, we only calculate the relative position
* here. The absolute position is only calculated using SetAbsPos.
**/
-void SwFlyInCntFrm::MakeObjPos()
+void SwFlyInContentFrame::MakeObjPos()
{
if ( !mbValidPos )
{
@@ -157,8 +157,8 @@ void SwFlyInCntFrm::MakeObjPos()
const SwFormatVertOrient &rVert = pFormat->GetVertOrient();
//Update the current values in the format if needed, during this we of
//course must not send any Modify.
- const bool bVert = GetAnchorFrm()->IsVertical();
- const bool bRev = GetAnchorFrm()->IsReverse();
+ const bool bVert = GetAnchorFrame()->IsVertical();
+ const bool bRev = GetAnchorFrame()->IsReverse();
SwTwips nOld = rVert.GetPos();
SwTwips nAct = bVert ? -GetCurrRelPos().X() : GetCurrRelPos().Y();
if( bRev )
@@ -174,36 +174,36 @@ void SwFlyInCntFrm::MakeObjPos()
}
}
-void SwFlyInCntFrm::_ActionOnInvalidation( const InvalidationType _nInvalid )
+void SwFlyInContentFrame::_ActionOnInvalidation( const InvalidationType _nInvalid )
{
if ( INVALID_POS == _nInvalid || INVALID_ALL == _nInvalid )
- AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
+ AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG, &GetFrameFormat() );
}
-void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect,
+void SwFlyInContentFrame::NotifyBackground( SwPageFrame *, const SwRect& rRect,
PrepareHint eHint)
{
if ( eHint == PREP_FLY_ATTR_CHG )
- AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG );
+ AnchorFrame()->Prepare( PREP_FLY_ATTR_CHG );
else
- AnchorFrm()->Prepare( eHint, static_cast<void const *>(&rRect) );
+ AnchorFrame()->Prepare( eHint, static_cast<void const *>(&rRect) );
}
-const Point SwFlyInCntFrm::GetRelPos() const
+const Point SwFlyInContentFrame::GetRelPos() const
{
- Calc(getRootFrm()->GetCurrShell()->GetOut());
+ Calc(getRootFrame()->GetCurrShell()->GetOut());
return GetCurrRelPos();
}
-/// @see SwRowFrm::RegistFlys()
-void SwFlyInCntFrm::RegistFlys()
+/// @see SwRowFrame::RegistFlys()
+void SwFlyInContentFrame::RegistFlys()
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
OSL_ENSURE( pPage, "Register Flys without pages?" );
::RegistFlys( pPage, this );
}
-void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwFlyInContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
// OD 2004-01-19 #110582#
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
@@ -211,14 +211,14 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
return;
}
- if ( !GetAnchorFrm() || IsLocked() || IsColLocked() || !FindPageFrm() )
+ if ( !GetAnchorFrame() || IsLocked() || IsColLocked() || !FindPageFrame() )
return;
Lock(); // The curtain falls
//does the notification in the DTor
const SwFlyNotify aNotify( this );
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( IsClipped() )
@@ -239,7 +239,7 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
}
if ( !mbValidSize )
- Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
+ Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
if ( !mbValidPos )
{
@@ -254,11 +254,11 @@ void SwFlyInCntFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( mbValidPos && mbValidSize &&
GetFormat()->getIDocumentSettingAccess().get( DocumentSettingId::CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAME ) )
{
- SwFrm* pFrm = AnchorFrm();
- if ( Frm().Left() == (pFrm->Frm().Left()+pFrm->Prt().Left()) &&
- Frm().Width() > pFrm->Prt().Width() )
+ SwFrame* pFrame = AnchorFrame();
+ if ( Frame().Left() == (pFrame->Frame().Left()+pFrame->Prt().Left()) &&
+ Frame().Width() > pFrame->Prt().Width() )
{
- Frm().Width( pFrm->Prt().Width() );
+ Frame().Width( pFrame->Prt().Width() );
mbValidPrtArea = false;
m_bWidthClipped = true;
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 951f5c8b29e3..9088d5601b08 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -43,79 +43,79 @@
using namespace ::com::sun::star;
-SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
- SwFlyFrm( pFormat, pSib, pAnch ),
+SwFlyFreeFrame::SwFlyFreeFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
+ SwFlyFrame( pFormat, pSib, pAnch ),
// #i34753#
mbNoMakePos( false ),
// #i37068#
mbNoMoveOnCheckClip( false ),
- maUnclippedFrm( )
+ maUnclippedFrame( )
{
}
-void SwFlyFreeFrm::DestroyImpl()
+void SwFlyFreeFrame::DestroyImpl()
{
- // #i28701# - use new method <GetPageFrm()>
- if( GetPageFrm() )
+ // #i28701# - use new method <GetPageFrame()>
+ if( GetPageFrame() )
{
if( GetFormat()->GetDoc()->IsInDtor() )
{
// #i29879# - remove also to-frame anchored Writer
// fly frame from page.
const bool bRemoveFromPage =
- GetPageFrm()->GetSortedObjs() &&
- ( IsFlyAtCntFrm() ||
- ( GetAnchorFrm() && GetAnchorFrm()->IsFlyFrm() ) );
+ GetPageFrame()->GetSortedObjs() &&
+ ( IsFlyAtContentFrame() ||
+ ( GetAnchorFrame() && GetAnchorFrame()->IsFlyFrame() ) );
if ( bRemoveFromPage )
{
- GetPageFrm()->GetSortedObjs()->Remove( *this );
+ GetPageFrame()->GetSortedObjs()->Remove( *this );
}
}
else
{
SwRect aTmp( GetObjRectWithSpaces() );
- SwFlyFreeFrm::NotifyBackground( GetPageFrm(), aTmp, PREP_FLY_LEAVE );
+ SwFlyFreeFrame::NotifyBackground( GetPageFrame(), aTmp, PREP_FLY_LEAVE );
}
}
- SwFlyFrm::DestroyImpl();
+ SwFlyFrame::DestroyImpl();
}
-SwFlyFreeFrm::~SwFlyFreeFrm()
+SwFlyFreeFrame::~SwFlyFreeFrame()
{
}
// #i28701#
-/** Notifies the background (all ContentFrms that currently are overlapping).
+/** Notifies the background (all ContentFrames that currently are overlapping).
*
* Additionally, the window is also directly invalidated (especially where
- * there are no overlapping ContentFrms).
- * This also takes ContentFrms within other Flys into account.
+ * there are no overlapping ContentFrames).
+ * This also takes ContentFrames within other Flys into account.
*/
-void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
+void SwFlyFreeFrame::NotifyBackground( SwPageFrame *pPageFrame,
const SwRect& rRect, PrepareHint eHint )
{
- ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, true );
+ ::Notify_Background( GetVirtDrawObj(), pPageFrame, rRect, eHint, true );
}
-void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwFlyFreeFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
{
return;
}
- if ( !GetAnchorFrm() || IsLocked() || IsColLocked() )
+ if ( !GetAnchorFrame() || IsLocked() || IsColLocked() )
return;
- // #i28701# - use new method <GetPageFrm()>
- if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
+ // #i28701# - use new method <GetPageFrame()>
+ if( !GetPageFrame() && GetAnchorFrame() && GetAnchorFrame()->IsInFly() )
{
- SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
- SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : nullptr;
- if( pPageFrm )
- pPageFrm->AppendFlyToPage( this );
+ SwFlyFrame* pFly = AnchorFrame()->FindFlyFrame();
+ SwPageFrame *pPageFrame = pFly ? pFly->FindPageFrame() : nullptr;
+ if( pPageFrame )
+ pPageFrame->AppendFlyToPage( this );
}
- if( !GetPageFrm() )
+ if( !GetPageFrame() )
return;
Lock(); // The curtain drops
@@ -133,7 +133,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// no invalidation of position, if no direct move is requested in <CheckClip(..)>
if ( !IsNoMoveOnCheckClip() &&
!( PositionLocked() &&
- GetAnchorFrm()->IsInFly() &&
+ GetAnchorFrame()->IsInFly() &&
GetFrameFormat().GetFollowTextFlow().GetValue() ) )
{
mbValidPos = false;
@@ -147,12 +147,12 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
while ( !mbValidPos || !mbValidSize || !mbValidPrtArea || m_bFormatHeightOnly || !m_bValidContentPos )
{
SWRECTFN( this )
- const SwFormatFrmSize *pSz;
+ const SwFormatFrameSize *pSz;
{ // Additional scope, so aAccess will be destroyed before the check!
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- pSz = &rAttrs.GetAttrSet().GetFrmSize();
+ pSz = &rAttrs.GetAttrSet().GetFrameSize();
// Only set when the flag is set!
if ( !mbValidSize )
@@ -169,14 +169,14 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( !mbValidSize || m_bFormatHeightOnly )
{
mbValidSize = false;
- Format( getRootFrm()->GetCurrShell()->GetOut(), &rAttrs );
+ Format( getRootFrame()->GetCurrShell()->GetOut(), &rAttrs );
m_bFormatHeightOnly = false;
}
}
if ( !mbValidPos )
{
- const Point aOldPos( (Frm().*fnRect->fnGetPos)() );
+ const Point aOldPos( (Frame().*fnRect->fnGetPos)() );
// #i26791# - use new method <MakeObjPos()>
// #i34753# - no positioning, if requested.
if ( IsNoMakePos() )
@@ -184,10 +184,10 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
else
// #i26791# - use new method <MakeObjPos()>
MakeObjPos();
- if( aOldPos == (Frm().*fnRect->fnGetPos)() )
+ if( aOldPos == (Frame().*fnRect->fnGetPos)() )
{
- if( !mbValidPos && GetAnchorFrm()->IsInSct() &&
- !GetAnchorFrm()->FindSctFrm()->IsValid() )
+ if( !mbValidPos && GetAnchorFrame()->IsInSct() &&
+ !GetAnchorFrame()->FindSctFrame()->IsValid() )
mbValidPos = true;
}
else
@@ -196,7 +196,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
if ( !m_bValidContentPos )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
MakeContentPos( rAttrs );
}
@@ -205,7 +205,7 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
++nLoopControlRuns;
- OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" );
+ OSL_ENSURE( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrame::MakeAll" );
if ( nLoopControlRuns < nLoopControlMax )
CheckClip( *pSz );
@@ -217,9 +217,9 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
#if OSL_DEBUG_LEVEL > 0
SWRECTFN( this )
- OSL_ENSURE( m_bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
+ OSL_ENSURE( m_bHeightClipped || ( (Frame().*fnRect->fnGetHeight)() > 0 &&
(Prt().*fnRect->fnGetHeight)() > 0),
- "SwFlyFreeFrm::Format(), flipping Fly." );
+ "SwFlyFreeFrame::Format(), flipping Fly." );
#endif
}
@@ -234,33 +234,33 @@ void SwFlyFreeFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
@return boolean indicating, that direct environment has 'auto' size
*/
-bool SwFlyFreeFrm::HasEnvironmentAutoSize() const
+bool SwFlyFreeFrame::HasEnvironmentAutoSize() const
{
bool bRetVal = false;
- const SwFrm* pToBeCheckedFrm = GetAnchorFrm();
- while ( pToBeCheckedFrm &&
- !pToBeCheckedFrm->IsPageFrm() )
+ const SwFrame* pToBeCheckedFrame = GetAnchorFrame();
+ while ( pToBeCheckedFrame &&
+ !pToBeCheckedFrame->IsPageFrame() )
{
- if ( pToBeCheckedFrm->IsHeaderFrm() ||
- pToBeCheckedFrm->IsFooterFrm() ||
- pToBeCheckedFrm->IsRowFrm() ||
- pToBeCheckedFrm->IsFlyFrm() )
+ if ( pToBeCheckedFrame->IsHeaderFrame() ||
+ pToBeCheckedFrame->IsFooterFrame() ||
+ pToBeCheckedFrame->IsRowFrame() ||
+ pToBeCheckedFrame->IsFlyFrame() )
{
bRetVal = ATT_FIX_SIZE !=
- pToBeCheckedFrm->GetAttrSet()->GetFrmSize().GetHeightSizeType();
+ pToBeCheckedFrame->GetAttrSet()->GetFrameSize().GetHeightSizeType();
break;
}
else
{
- pToBeCheckedFrm = pToBeCheckedFrm->GetUpper();
+ pToBeCheckedFrame = pToBeCheckedFrame->GetUpper();
}
}
return bRetVal;
}
-void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
+void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
{
// It's probably time now to take appropriate measures, if the Fly
// doesn't fit into its surrounding.
@@ -275,8 +275,8 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
::CalcClipRect( pObj, aTmpStretch, false );
aClip._Intersection( aTmpStretch );
- const long nBot = Frm().Top() + Frm().Height();
- const long nRig = Frm().Left() + Frm().Width();
+ const long nBot = Frame().Top() + Frame().Height();
+ const long nRig = Frame().Left() + Frame().Width();
const long nClipBot = aClip.Top() + aClip.Height();
const long nClipRig = aClip.Left() + aClip.Width();
@@ -287,33 +287,33 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
bool bAgain = false;
// #i37068# - no move, if it's requested
if ( bBot && !IsNoMoveOnCheckClip() &&
- !GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
+ !GetDrawObjs() && !GetAnchorFrame()->IsInTab() )
{
- SwFrm* pHeader = FindFooterOrHeader();
+ SwFrame* pHeader = FindFooterOrHeader();
// In a header, correction of the position is no good idea.
// If the fly moves, some paragraphs have to be formatted, this
// could cause a change of the height of the headerframe,
// now the flyframe can change its position and so on ...
- if ( !pHeader || !pHeader->IsHeaderFrm() )
+ if ( !pHeader || !pHeader->IsHeaderFrame() )
{
- const long nOld = Frm().Top();
- Frm().Pos().Y() = std::max( aClip.Top(), nClipBot - Frm().Height() );
- if ( Frm().Top() != nOld )
+ const long nOld = Frame().Top();
+ Frame().Pos().Y() = std::max( aClip.Top(), nClipBot - Frame().Height() );
+ if ( Frame().Top() != nOld )
bAgain = true;
m_bHeightClipped = true;
}
}
if ( bRig )
{
- const long nOld = Frm().Left();
- Frm().Pos().X() = std::max( aClip.Left(), nClipRig - Frm().Width() );
- if ( Frm().Left() != nOld )
+ const long nOld = Frame().Left();
+ Frame().Pos().X() = std::max( aClip.Left(), nClipRig - Frame().Width() );
+ if ( Frame().Left() != nOld )
{
const SwFormatHoriOrient &rH = GetFormat()->GetHoriOrient();
// Left-aligned ones may not be moved to the left when they
// are avoiding another one.
if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
- Frm().Pos().X() = nOld;
+ Frame().Pos().X() = nOld;
else
bAgain = true;
}
@@ -323,31 +323,31 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
mbValidSize = false;
else
{
- // If we reach this branch, the Frm protrudes into forbidden
+ // If we reach this branch, the Frame protrudes into forbidden
// areas, and correcting the position is not allowed or not
// possible or not required.
// For Flys with OLE objects as lower, we make sure that
// we always resize proportionally
- Size aOldSize( Frm().SSize() );
+ Size aOldSize( Frame().SSize() );
- // First, setup the FrmRect, then transfer it to the Frm.
- SwRect aFrmRect( Frm() );
+ // First, setup the FrameRect, then transfer it to the Frame.
+ SwRect aFrameRect( Frame() );
if ( bBot )
{
long nDiff = nClipBot;
- nDiff -= aFrmRect.Top(); // nDiff represents the available distance
- nDiff = aFrmRect.Height() - nDiff;
- aFrmRect.Height( aFrmRect.Height() - nDiff );
+ nDiff -= aFrameRect.Top(); // nDiff represents the available distance
+ nDiff = aFrameRect.Height() - nDiff;
+ aFrameRect.Height( aFrameRect.Height() - nDiff );
m_bHeightClipped = true;
}
if ( bRig )
{
long nDiff = nClipRig;
- nDiff -= aFrmRect.Left();// nDiff represents the available distance
- nDiff = aFrmRect.Width() - nDiff;
- aFrmRect.Width( aFrmRect.Width() - nDiff );
+ nDiff -= aFrameRect.Left();// nDiff represents the available distance
+ nDiff = aFrameRect.Width() - nDiff;
+ aFrameRect.Width( aFrameRect.Width() - nDiff );
m_bWidthClipped = true;
}
@@ -361,33 +361,33 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
// (3) fly frames with 'auto' size
// Note: section frames seems to be not critical - didn't found
// any critical layout situation so far.
- if ( Lower() && Lower()->IsNoTextFrm() &&
- ( static_cast<SwContentFrm*>(Lower())->GetNode()->GetOLENode() ||
+ if ( Lower() && Lower()->IsNoTextFrame() &&
+ ( static_cast<SwContentFrame*>(Lower())->GetNode()->GetOLENode() ||
!HasEnvironmentAutoSize() ) )
{
// If width and height got adjusted, then the bigger
// change is relevant.
- if ( aFrmRect.Width() != aOldSize.Width() &&
- aFrmRect.Height()!= aOldSize.Height() )
+ if ( aFrameRect.Width() != aOldSize.Width() &&
+ aFrameRect.Height()!= aOldSize.Height() )
{
- if ( (aOldSize.Width() - aFrmRect.Width()) >
- (aOldSize.Height()- aFrmRect.Height()) )
- aFrmRect.Height( aOldSize.Height() );
+ if ( (aOldSize.Width() - aFrameRect.Width()) >
+ (aOldSize.Height()- aFrameRect.Height()) )
+ aFrameRect.Height( aOldSize.Height() );
else
- aFrmRect.Width( aOldSize.Width() );
+ aFrameRect.Width( aOldSize.Width() );
}
// Adjusted the width? change height proportionally
- if( aFrmRect.Width() != aOldSize.Width() )
+ if( aFrameRect.Width() != aOldSize.Width() )
{
- aFrmRect.Height( aFrmRect.Width() * aOldSize.Height() /
+ aFrameRect.Height( aFrameRect.Width() * aOldSize.Height() /
aOldSize.Width() );
m_bHeightClipped = true;
}
// Adjusted the height? change width proportionally
- else if( aFrmRect.Height() != aOldSize.Height() )
+ else if( aFrameRect.Height() != aOldSize.Height() )
{
- aFrmRect.Width( aFrmRect.Height() * aOldSize.Width() /
+ aFrameRect.Width( aFrameRect.Height() * aOldSize.Width() /
aOldSize.Height() );
m_bWidthClipped = true;
}
@@ -395,46 +395,46 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
// #i17297# - reactivate change
// of size attribute for fly frames containing an ole object.
- // Added the aFrmRect.HasArea() hack, because
+ // Added the aFrameRect.HasArea() hack, because
// the environment of the ole object does not have to be valid
// at this moment, or even worse, it does not have to have a
// reasonable size. In this case we do not want to change to
// attributes permanentely. Maybe one day somebody dares to remove
// this code.
- if ( aFrmRect.HasArea() &&
- static_cast<SwContentFrm*>(Lower())->GetNode()->GetOLENode() &&
+ if ( aFrameRect.HasArea() &&
+ static_cast<SwContentFrame*>(Lower())->GetNode()->GetOLENode() &&
( m_bWidthClipped || m_bHeightClipped ) )
{
SwFlyFrameFormat *pFormat = GetFormat();
pFormat->LockModify();
- SwFormatFrmSize aFrmSize( rSz );
- aFrmSize.SetWidth( aFrmRect.Width() );
- aFrmSize.SetHeight( aFrmRect.Height() );
- pFormat->SetFormatAttr( aFrmSize );
+ SwFormatFrameSize aFrameSize( rSz );
+ aFrameSize.SetWidth( aFrameRect.Width() );
+ aFrameSize.SetHeight( aFrameRect.Height() );
+ pFormat->SetFormatAttr( aFrameSize );
pFormat->UnlockModify();
}
}
- // Now change the Frm; for columns, we put the new values into the attributes,
+ // Now change the Frame; for columns, we put the new values into the attributes,
// otherwise we'll end up with unwanted side-effects/oscillations
- const long nPrtHeightDiff = Frm().Height() - Prt().Height();
- const long nPrtWidthDiff = Frm().Width() - Prt().Width();
- maUnclippedFrm = SwRect( Frm() );
- Frm().Height( aFrmRect.Height() );
- Frm().Width ( std::max( long(MINLAY), aFrmRect.Width() ) );
- if ( Lower() && Lower()->IsColumnFrm() )
+ const long nPrtHeightDiff = Frame().Height() - Prt().Height();
+ const long nPrtWidthDiff = Frame().Width() - Prt().Width();
+ maUnclippedFrame = SwRect( Frame() );
+ Frame().Height( aFrameRect.Height() );
+ Frame().Width ( std::max( long(MINLAY), aFrameRect.Width() ) );
+ if ( Lower() && Lower()->IsColumnFrame() )
{
ColLock(); //lock grow/shrink
const Size aTmpOldSize( Prt().SSize() );
- Prt().Height( Frm().Height() - nPrtHeightDiff );
- Prt().Width ( Frm().Width() - nPrtWidthDiff );
+ Prt().Height( Frame().Height() - nPrtHeightDiff );
+ Prt().Width ( Frame().Width() - nPrtWidthDiff );
ChgLowersProp( aTmpOldSize );
- SwFrm *pLow = Lower();
+ SwFrame *pLow = Lower();
do
{
- pLow->Calc(getRootFrm()->GetCurrShell()->GetOut());
- // also calculate the (Column)BodyFrm
- static_cast<SwLayoutFrm*>(pLow)->Lower()->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pLow->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ // also calculate the (Column)BodyFrame
+ static_cast<SwLayoutFrame*>(pLow)->Lower()->Calc(getRootFrame()->GetCurrShell()->GetOut());
pLow = pLow->GetNext();
} while ( pLow );
::CalcContent( this );
@@ -444,36 +444,36 @@ void SwFlyFreeFrm::CheckClip( const SwFormatFrmSize &rSz )
}
else
{
- Prt().Height( Frm().Height() - nPrtHeightDiff );
- Prt().Width ( Frm().Width() - nPrtWidthDiff );
+ Prt().Height( Frame().Height() - nPrtHeightDiff );
+ Prt().Width ( Frame().Width() - nPrtWidthDiff );
}
}
}
// #i26945#
- OSL_ENSURE( Frm().Height() >= 0,
- "<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." );
+ OSL_ENSURE( Frame().Height() >= 0,
+ "<SwFlyFreeFrame::CheckClip(..)> - fly frame has negative height now." );
}
/** method to determine, if a <MakeAll()> on the Writer fly frame is possible
#i43771#
*/
-bool SwFlyFreeFrm::IsFormatPossible() const
+bool SwFlyFreeFrame::IsFormatPossible() const
{
- return SwFlyFrm::IsFormatPossible() &&
- ( GetPageFrm() ||
- ( GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) );
+ return SwFlyFrame::IsFormatPossible() &&
+ ( GetPageFrame() ||
+ ( GetAnchorFrame() && GetAnchorFrame()->IsInFly() ) );
}
-SwFlyLayFrm::SwFlyLayFrm( SwFlyFrameFormat *pFormat, SwFrm* pSib, SwFrm *pAnch ) :
- SwFlyFreeFrm( pFormat, pSib, pAnch )
+SwFlyLayFrame::SwFlyLayFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch ) :
+ SwFlyFreeFrame( pFormat, pSib, pAnch )
{
m_bLayout = true;
}
// #i28701#
-void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
+void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
{
const sal_uInt16 nWhich = pNew ? pNew->Which() : 0;
@@ -497,19 +497,19 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
GetFormat()->GetAnchor().GetAnchorId(),
"8-) Invalid change of anchor type." );
- // Unregister, get hold of the page, attach to the corresponding LayoutFrm.
+ // Unregister, get hold of the page, attach to the corresponding LayoutFrame.
SwRect aOld( GetObjRectWithSpaces() );
- // #i28701# - use new method <GetPageFrm()>
- SwPageFrm *pOldPage = GetPageFrm();
- AnchorFrm()->RemoveFly( this );
+ // #i28701# - use new method <GetPageFrame()>
+ SwPageFrame *pOldPage = GetPageFrame();
+ AnchorFrame()->RemoveFly( this );
if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
{
sal_uInt16 nPgNum = pAnch->GetPageNum();
- SwRootFrm *pRoot = getRootFrm();
- SwPageFrm *pTmpPage = static_cast<SwPageFrm*>(pRoot->Lower());
+ SwRootFrame *pRoot = getRootFrame();
+ SwPageFrame *pTmpPage = static_cast<SwPageFrame*>(pRoot->Lower());
for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i,
- pTmpPage = static_cast<SwPageFrm*>(pTmpPage->GetNext()) )
+ pTmpPage = static_cast<SwPageFrame*>(pTmpPage->GetNext()) )
{
if ( i == nPgNum )
{
@@ -526,30 +526,30 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
else
{
SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode );
- SwContentFrm *pContent = GetFormat()->GetDoc()->GetNodes().GoNext( &aIdx )->
- GetContentNode()->getLayoutFrm( getRootFrm(), nullptr, nullptr, false );
+ SwContentFrame *pContent = GetFormat()->GetDoc()->GetNodes().GoNext( &aIdx )->
+ GetContentNode()->getLayoutFrame( getRootFrame(), nullptr, nullptr, false );
if( pContent )
{
- SwFlyFrm *pTmp = pContent->FindFlyFrm();
+ SwFlyFrame *pTmp = pContent->FindFlyFrame();
if( pTmp )
pTmp->AppendFly( this );
}
}
- // #i28701# - use new method <GetPageFrm()>
- if ( pOldPage && pOldPage != GetPageFrm() )
+ // #i28701# - use new method <GetPageFrame()>
+ if ( pOldPage && pOldPage != GetPageFrame() )
NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
SetCompletePaint();
InvalidateAll();
SetNotifyBack();
}
else
- SwFlyFrm::Modify( pOld, pNew );
+ SwFlyFrame::Modify( pOld, pNew );
}
-void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
+void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew )
{
if ( !pNew->GetVirtDrawObj()->IsInserted() )
- getRootFrm()->GetDrawPage()->InsertObject(
+ getRootFrame()->GetDrawPage()->InsertObject(
static_cast<SdrObject*>(pNew->GetVirtDrawObj()),
pNew->GetVirtDrawObj()->GetReferencedObj().GetOrdNumDirect() );
@@ -560,13 +560,13 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
if ( GetUpper() )
{
- static_cast<SwRootFrm*>(GetUpper())->SetIdleFlags();
- static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(GetUpper())->SetIdleFlags();
+ static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth();
}
SdrObject* pObj = pNew->GetVirtDrawObj();
- OSL_ENSURE( pNew->GetAnchorFrm(), "Fly without Anchor" );
- SwFlyFrm* pFly = const_cast<SwFlyFrm*>(pNew->GetAnchorFrm()->FindFlyFrm());
+ OSL_ENSURE( pNew->GetAnchorFrame(), "Fly without Anchor" );
+ SwFlyFrame* pFly = const_cast<SwFlyFrame*>(pNew->GetAnchorFrame()->FindFlyFrame());
if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
{
//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
@@ -578,7 +578,7 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
}
// Don't look further at Flys that sit inside the Content.
- if ( pNew->IsFlyInCntFrm() )
+ if ( pNew->IsFlyInContentFrame() )
InvalidateFlyInCnt();
else
{
@@ -592,23 +592,23 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
(void) bSucessInserted;
// #i87493#
- OSL_ENSURE( pNew->GetPageFrm() == nullptr || pNew->GetPageFrm() == this,
- "<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect." );
- // #i28701# - use new method <SetPageFrm(..)>
- pNew->SetPageFrm( this );
+ OSL_ENSURE( pNew->GetPageFrame() == nullptr || pNew->GetPageFrame() == this,
+ "<SwPageFrame::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect." );
+ // #i28701# - use new method <SetPageFrame(..)>
+ pNew->SetPageFrame( this );
pNew->InvalidatePage( this );
// #i28701#
pNew->UnlockPosition();
// Notify accessible layout. That's required at this place for
// frames only where the anchor is moved. Creation of new frames
- // is additionally handled by the SwFrmNotify class.
+ // is additionally handled by the SwFrameNotify class.
if( GetUpper() &&
- static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() &&
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() )
+ static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
{
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp()
- ->AddAccessibleFrm( pNew );
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
+ ->AddAccessibleFrame( pNew );
}
}
@@ -619,21 +619,21 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pTmpObj = rObjs[i];
- if ( dynamic_cast<const SwFlyFrm*>( pTmpObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pTmpObj) != nullptr )
{
- SwFlyFrm* pTmpFly = static_cast<SwFlyFrm*>(pTmpObj);
- // #i28701# - use new method <GetPageFrm()>
- if ( pTmpFly->IsFlyFreeFrm() && !pTmpFly->GetPageFrm() )
+ SwFlyFrame* pTmpFly = static_cast<SwFlyFrame*>(pTmpObj);
+ // #i28701# - use new method <GetPageFrame()>
+ if ( pTmpFly->IsFlyFreeFrame() && !pTmpFly->GetPageFrame() )
AppendFlyToPage( pTmpFly );
}
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pTmpObj) != nullptr )
{
// #i87493#
- if ( pTmpObj->GetPageFrm() != this )
+ if ( pTmpObj->GetPageFrame() != this )
{
- if ( pTmpObj->GetPageFrm() != nullptr )
+ if ( pTmpObj->GetPageFrame() != nullptr )
{
- pTmpObj->GetPageFrm()->RemoveDrawObjFromPage( *pTmpObj );
+ pTmpObj->GetPageFrame()->RemoveDrawObjFromPage( *pTmpObj );
}
AppendDrawObjToPage( *pTmpObj );
}
@@ -642,21 +642,21 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
}
}
-void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
+void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove )
{
const sal_uInt32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum();
- getRootFrm()->GetDrawPage()->RemoveObject( nOrdNum );
+ getRootFrame()->GetDrawPage()->RemoveObject( nOrdNum );
pToRemove->GetVirtDrawObj()->ReferencedObj().SetOrdNum( nOrdNum );
if ( GetUpper() )
{
- if ( !pToRemove->IsFlyInCntFrm() )
- static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous();
- static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth();
+ if ( !pToRemove->IsFlyInContentFrame() )
+ static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
+ static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth();
}
// Don't look further at Flys that sit inside the Content.
- if ( pToRemove->IsFlyInCntFrm() )
+ if ( pToRemove->IsFlyInContentFrame() )
return;
// Don't delete collections just yet. This will happen at the end of the
@@ -665,7 +665,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
// The FlyColl might be gone already, because the page's dtor is being
// executed.
// Remove it _before_ disposing accessible frames to avoid accesses to
- // the Frm from event handlers.
+ // the Frame from event handlers.
if (m_pSortedObjs)
{
m_pSortedObjs->Remove(*pToRemove);
@@ -678,27 +678,27 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
// Notify accessible layout. That's required at this place for
// frames only where the anchor is moved. Creation of new frames
- // is additionally handled by the SwFrmNotify class.
+ // is additionally handled by the SwFrameNotify class.
if( GetUpper() &&
- static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() &&
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() )
+ static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
{
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp()
- ->DisposeAccessibleFrm( pToRemove, true );
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
+ ->DisposeAccessibleFrame( pToRemove, true );
}
- // #i28701# - use new method <SetPageFrm(..)>
- pToRemove->SetPageFrm( nullptr );
+ // #i28701# - use new method <SetPageFrame(..)>
+ pToRemove->SetPageFrame( nullptr );
}
-void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
+void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest )
{
// Invalidations
if ( GetUpper() )
{
- static_cast<SwRootFrm*>(GetUpper())->SetIdleFlags();
- if ( !pToMove->IsFlyInCntFrm() && pDest->GetPhyPageNum() < GetPhyPageNum() )
- static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous();
+ static_cast<SwRootFrame*>(GetUpper())->SetIdleFlags();
+ if ( !pToMove->IsFlyInContentFrame() && pDest->GetPhyPageNum() < GetPhyPageNum() )
+ static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
}
pDest->InvalidateSpelling();
@@ -706,7 +706,7 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
pDest->InvalidateAutoCompleteWords();
pDest->InvalidateWordCount();
- if ( pToMove->IsFlyInCntFrm() )
+ if ( pToMove->IsFlyInContentFrame() )
{
pDest->InvalidateFlyInCnt();
return;
@@ -714,13 +714,13 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
// Notify accessible layout. That's required at this place for
// frames only where the anchor is moved. Creation of new frames
- // is additionally handled by the SwFrmNotify class.
+ // is additionally handled by the SwFrameNotify class.
if( GetUpper() &&
- static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() &&
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() )
+ static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
{
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp()
- ->DisposeAccessibleFrm( pToMove, true );
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
+ ->DisposeAccessibleFrame( pToMove, true );
}
// The FlyColl might be gone already, because the page's dtor is being executed.
@@ -741,8 +741,8 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
OSL_ENSURE( bSucessInserted, "Fly not inserted in Sorted." );
(void) bSucessInserted;
- // #i28701# - use new method <SetPageFrm(..)>
- pToMove->SetPageFrm( pDest );
+ // #i28701# - use new method <SetPageFrame(..)>
+ pToMove->SetPageFrame( pDest );
pToMove->InvalidatePage( pDest );
pToMove->SetNotifyBack();
pDest->InvalidateFlyContent();
@@ -751,13 +751,13 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
// Notify accessible layout. That's required at this place for
// frames only where the anchor is moved. Creation of new frames
- // is additionally handled by the SwFrmNotify class.
+ // is additionally handled by the SwFrameNotify class.
if( GetUpper() &&
- static_cast< SwRootFrm * >( GetUpper() )->IsAnyShellAccessible() &&
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell() )
+ static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() &&
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() )
{
- static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp()
- ->AddAccessibleFrm( pToMove );
+ static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp()
+ ->AddAccessibleFrame( pToMove );
}
// #i28701# - correction: move lowers of Writer fly frame
@@ -767,15 +767,15 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
- if ( pFly->IsFlyFreeFrm() )
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj);
+ if ( pFly->IsFlyFreeFrame() )
{
- // #i28701# - use new method <GetPageFrm()>
- SwPageFrm* pPageFrm = pFly->GetPageFrm();
- if ( pPageFrm )
- pPageFrm->MoveFly( pFly, pDest );
+ // #i28701# - use new method <GetPageFrame()>
+ SwPageFrame* pPageFrame = pFly->GetPageFrame();
+ if ( pPageFrame )
+ pPageFrame->MoveFly( pFly, pDest );
else
pDest->AppendFlyToPage( pFly );
}
@@ -789,30 +789,30 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
}
}
-void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
+void SwPageFrame::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
{
if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rNewObj) == nullptr )
{
- OSL_FAIL( "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexpected type -> object not appended" );
+ OSL_FAIL( "SwPageFrame::AppendDrawObjToPage(..) - anchored object of unexpected type -> object not appended" );
return;
}
if ( GetUpper() )
{
- static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth();
}
- OSL_ENSURE( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
- SwFlyFrm* pFlyFrm = const_cast<SwFlyFrm*>(_rNewObj.GetAnchorFrm()->FindFlyFrm());
- if ( pFlyFrm &&
- _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
+ OSL_ENSURE( _rNewObj.GetAnchorFrame(), "anchored draw object without anchor" );
+ SwFlyFrame* pFlyFrame = const_cast<SwFlyFrame*>(_rNewObj.GetAnchorFrame()->FindFlyFrame());
+ if ( pFlyFrame &&
+ _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrame->GetVirtDrawObj()->GetOrdNum() )
{
//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
sal_uInt32 nNewNum = _rNewObj.GetDrawObj()->GetOrdNumDirect();
if ( _rNewObj.GetDrawObj()->GetPage() )
- _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
+ _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrame->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
else
- pFlyFrm->GetVirtDrawObj()->SetOrdNum( nNewNum );
+ pFlyFrame->GetVirtDrawObj()->SetOrdNum( nNewNum );
}
if ( FLY_AS_CHAR == _rNewObj.GetFrameFormat().GetAnchor().GetAnchorId() )
@@ -830,19 +830,19 @@ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
"Drawing object not appended into list <pSortedObjs>." );
}
// #i87493#
- OSL_ENSURE( _rNewObj.GetPageFrm() == nullptr || _rNewObj.GetPageFrm() == this,
- "<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect." );
- _rNewObj.SetPageFrm( this );
+ OSL_ENSURE( _rNewObj.GetPageFrame() == nullptr || _rNewObj.GetPageFrame() == this,
+ "<SwPageFrame::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect." );
+ _rNewObj.SetPageFrame( this );
// invalidate page in order to force a reformat of object layout of the page.
InvalidateFlyLayout();
}
-void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
+void SwPageFrame::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
{
if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rToRemoveObj) == nullptr )
{
- OSL_FAIL( "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexpected type -> object not removed" );
+ OSL_FAIL( "SwPageFrame::RemoveDrawObjFromPage(..) - anchored object of unexpected type -> object not removed" );
return;
}
@@ -858,25 +858,25 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
if (FLY_AS_CHAR !=
_rToRemoveObj.GetFrameFormat().GetAnchor().GetAnchorId())
{
- static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous();
+ static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
InvalidatePage();
}
- static_cast<SwRootFrm*>(GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(GetUpper())->InvalidateBrowseWidth();
}
}
- _rToRemoveObj.SetPageFrm( nullptr );
+ _rToRemoveObj.SetPageFrame( nullptr );
}
// #i50432# - adjust method description and synopsis.
-void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat )
+void SwPageFrame::PlaceFly( SwFlyFrame* pFly, SwFlyFrameFormat* pFormat )
{
// #i50432# - consider the case that page is an empty page:
// In this case append the fly frame at the next page
OSL_ENSURE( !IsEmptyPage() || GetNext(),
- "<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" );
+ "<SwPageFrame::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" );
if ( IsEmptyPage() && GetNext() )
{
- static_cast<SwPageFrm*>(GetNext())->PlaceFly( pFly, pFormat );
+ static_cast<SwPageFrame*>(GetNext())->PlaceFly( pFly, pFormat );
}
else
{
@@ -887,7 +887,7 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrameFormat* pFormat )
else
{
OSL_ENSURE( pFormat, ":-( No Format given for Fly." );
- pFly = new SwFlyLayFrm( pFormat, this, this );
+ pFly = new SwFlyLayFrame( pFormat, this, this );
AppendFly( pFly );
::RegistFlys( this, pFly );
}
@@ -909,27 +909,27 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
bool bRet = true;
if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) != nullptr )
{
- const SwFlyFrm* pFly = static_cast<const SwVirtFlyDrawObj*>(pSdrObj)->GetFlyFrm();
+ const SwFlyFrame* pFly = static_cast<const SwVirtFlyDrawObj*>(pSdrObj)->GetFlyFrame();
const bool bFollowTextFlow = pFly->GetFormat()->GetFollowTextFlow().GetValue();
// #i28701#
const bool bConsiderWrapOnObjPos =
pFly->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
const SwFormatVertOrient &rV = pFly->GetFormat()->GetVertOrient();
- if( pFly->IsFlyLayFrm() )
+ if( pFly->IsFlyLayFrame() )
{
- const SwFrm* pClip;
+ const SwFrame* pClip;
// #i22305#
// #i28701#
if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
{
- pClip = pFly->GetAnchorFrm()->FindPageFrm();
+ pClip = pFly->GetAnchorFrame()->FindPageFrame();
}
else
{
- pClip = pFly->GetAnchorFrm();
+ pClip = pFly->GetAnchorFrame();
}
- rRect = pClip->Frm();
+ rRect = pClip->Frame();
SWRECTFN( pClip )
// vertical clipping: Top and Bottom, also to PrtArea if necessary
@@ -948,49 +948,49 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
(rRect.*fnRect->fnSetRight)((pClip->*fnRect->fnGetPrtRight)());
}
}
- else if( pFly->IsFlyAtCntFrm() )
+ else if( pFly->IsFlyAtContentFrame() )
{
// #i18732# - consider following text flow or not
// AND alignment at 'page areas'
- const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm();
- if ( !pVertPosOrientFrm )
+ const SwFrame* pVertPosOrientFrame = pFly->GetVertPosOrientFrame();
+ if ( !pVertPosOrientFrame )
{
OSL_FAIL( "::CalcClipRect(..) - frame, vertical position is oriented at, is missing .");
- pVertPosOrientFrm = pFly->GetAnchorFrm();
+ pVertPosOrientFrame = pFly->GetAnchorFrame();
}
if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
{
- const SwLayoutFrm* pClipFrm = pVertPosOrientFrm->FindPageFrm();
- if (!pClipFrm)
+ const SwLayoutFrame* pClipFrame = pVertPosOrientFrame->FindPageFrame();
+ if (!pClipFrame)
{
- OSL_FAIL("!pClipFrm: "
+ OSL_FAIL("!pClipFrame: "
"if you can reproduce this please file a bug");
return false;
}
- rRect = bMove ? pClipFrm->GetUpper()->Frm()
- : pClipFrm->Frm();
+ rRect = bMove ? pClipFrame->GetUpper()->Frame()
+ : pClipFrame->Frame();
// #i26945# - consider that a table, during
// its format, can exceed its upper printing area bottom.
// Thus, enlarge the clip rectangle, if such a case occurred
- if ( pFly->GetAnchorFrm()->IsInTab() )
+ if ( pFly->GetAnchorFrame()->IsInTab() )
{
- const SwTabFrm* pTabFrm = const_cast<SwFlyFrm*>(pFly)
- ->GetAnchorFrmContainingAnchPos()->FindTabFrm();
- SwRect aTmp( pTabFrm->Prt() );
- aTmp += pTabFrm->Frm().Pos();
+ const SwTabFrame* pTabFrame = const_cast<SwFlyFrame*>(pFly)
+ ->GetAnchorFrameContainingAnchPos()->FindTabFrame();
+ SwRect aTmp( pTabFrame->Prt() );
+ aTmp += pTabFrame->Frame().Pos();
rRect.Union( aTmp );
// #i43913# - consider also the cell frame
- const SwFrm* pCellFrm = const_cast<SwFlyFrm*>(pFly)
- ->GetAnchorFrmContainingAnchPos()->GetUpper();
- while ( pCellFrm && !pCellFrm->IsCellFrm() )
+ const SwFrame* pCellFrame = const_cast<SwFlyFrame*>(pFly)
+ ->GetAnchorFrameContainingAnchPos()->GetUpper();
+ while ( pCellFrame && !pCellFrame->IsCellFrame() )
{
- pCellFrm = pCellFrm->GetUpper();
+ pCellFrame = pCellFrame->GetUpper();
}
- if ( pCellFrm )
+ if ( pCellFrame )
{
- aTmp = pCellFrm->Prt();
- aTmp += pCellFrm->Frm().Pos();
+ aTmp = pCellFrame->Prt();
+ aTmp += pCellFrame->Frame().Pos();
rRect.Union( aTmp );
}
}
@@ -1001,54 +1001,54 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
// new class <SwEnvironmentOfAnchoredObject>
objectpositioning::SwEnvironmentOfAnchoredObject
aEnvOfObj( bFollowTextFlow );
- const SwLayoutFrm& rVertClipFrm =
- aEnvOfObj.GetVertEnvironmentLayoutFrm( *pVertPosOrientFrm );
+ const SwLayoutFrame& rVertClipFrame =
+ aEnvOfObj.GetVertEnvironmentLayoutFrame( *pVertPosOrientFrame );
if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
{
- rRect = rVertClipFrm.Frm();
+ rRect = rVertClipFrame.Frame();
}
else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
{
- if ( rVertClipFrm.IsPageFrm() )
+ if ( rVertClipFrame.IsPageFrame() )
{
- rRect = static_cast<const SwPageFrm&>(rVertClipFrm).PrtWithoutHeaderAndFooter();
+ rRect = static_cast<const SwPageFrame&>(rVertClipFrame).PrtWithoutHeaderAndFooter();
}
else
{
- rRect = rVertClipFrm.Frm();
+ rRect = rVertClipFrame.Frame();
}
}
- const SwLayoutFrm* pHoriClipFrm =
- pFly->GetAnchorFrm()->FindPageFrm()->GetUpper();
- SWRECTFN( pFly->GetAnchorFrm() )
- (rRect.*fnRect->fnSetLeft)( (pHoriClipFrm->Frm().*fnRect->fnGetLeft)() );
- (rRect.*fnRect->fnSetRight)((pHoriClipFrm->Frm().*fnRect->fnGetRight)());
+ const SwLayoutFrame* pHoriClipFrame =
+ pFly->GetAnchorFrame()->FindPageFrame()->GetUpper();
+ SWRECTFN( pFly->GetAnchorFrame() )
+ (rRect.*fnRect->fnSetLeft)( (pHoriClipFrame->Frame().*fnRect->fnGetLeft)() );
+ (rRect.*fnRect->fnSetRight)((pHoriClipFrame->Frame().*fnRect->fnGetRight)());
}
else
{
// #i26945#
- const SwFrm *pClip =
- const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos();
+ const SwFrame *pClip =
+ const_cast<SwFlyFrame*>(pFly)->GetAnchorFrameContainingAnchPos();
SWRECTFN( pClip )
- const SwLayoutFrm *pUp = pClip->GetUpper();
- const SwFrm *pCell = pUp->IsCellFrm() ? pUp : nullptr;
+ const SwLayoutFrame *pUp = pClip->GetUpper();
+ const SwFrame *pCell = pUp->IsCellFrame() ? pUp : nullptr;
const sal_uInt16 nType = bMove ? FRM_ROOT | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_FTN
: FRM_BODY | FRM_FLY | FRM_HEADER |
FRM_FOOTER | FRM_CELL| FRM_FTN;
- while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrm() )
+ while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrame() )
{
pUp = pUp->GetUpper();
- if ( !pCell && pUp->IsCellFrm() )
+ if ( !pCell && pUp->IsCellFrame() )
pCell = pUp;
}
if ( bMove )
{
- if ( pUp->IsRootFrm() )
+ if ( pUp->IsRootFrame() )
{
rRect = pUp->Prt();
- rRect += pUp->Frm().Pos();
+ rRect += pUp->Frame().Pos();
pUp = nullptr;
}
}
@@ -1056,12 +1056,12 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
{
if ( pUp->GetType() & FRM_BODY )
{
- const SwPageFrm *pPg;
- if ( pUp->GetUpper() != (pPg = pFly->FindPageFrm()) )
+ const SwPageFrame *pPg;
+ if ( pUp->GetUpper() != (pPg = pFly->FindPageFrame()) )
pUp = pPg->FindBodyCont();
if (pUp)
{
- rRect = pUp->GetUpper()->Frm();
+ rRect = pUp->GetUpper()->Frame();
(rRect.*fnRect->fnSetTop)( (pUp->*fnRect->fnGetPrtTop)() );
(rRect.*fnRect->fnSetBottom)((pUp->*fnRect->fnGetPrtBottom)());
}
@@ -1069,82 +1069,82 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
else
{
if( ( pUp->GetType() & (FRM_FLY | FRM_FTN ) ) &&
- !pUp->Frm().IsInside( pFly->Frm().Pos() ) )
+ !pUp->Frame().IsInside( pFly->Frame().Pos() ) )
{
- if( pUp->IsFlyFrm() )
+ if( pUp->IsFlyFrame() )
{
- const SwFlyFrm *pTmpFly = static_cast<const SwFlyFrm*>(pUp);
+ const SwFlyFrame *pTmpFly = static_cast<const SwFlyFrame*>(pUp);
while( pTmpFly->GetNextLink() )
{
pTmpFly = pTmpFly->GetNextLink();
- if( pTmpFly->Frm().IsInside( pFly->Frm().Pos() ) )
+ if( pTmpFly->Frame().IsInside( pFly->Frame().Pos() ) )
break;
}
pUp = pTmpFly;
}
else if( pUp->IsInFootnote() )
{
- const SwFootnoteFrm *pTmp = pUp->FindFootnoteFrm();
+ const SwFootnoteFrame *pTmp = pUp->FindFootnoteFrame();
while( pTmp->GetFollow() )
{
pTmp = pTmp->GetFollow();
- if( pTmp->Frm().IsInside( pFly->Frm().Pos() ) )
+ if( pTmp->Frame().IsInside( pFly->Frame().Pos() ) )
break;
}
pUp = pTmp;
}
}
rRect = pUp->Prt();
- rRect.Pos() += pUp->Frm().Pos();
+ rRect.Pos() += pUp->Frame().Pos();
if ( pUp->GetType() & (FRM_HEADER | FRM_FOOTER) )
{
- rRect.Left ( pUp->GetUpper()->Frm().Left() );
- rRect.Width( pUp->GetUpper()->Frm().Width());
+ rRect.Left ( pUp->GetUpper()->Frame().Left() );
+ rRect.Width( pUp->GetUpper()->Frame().Width());
}
- else if ( pUp->IsCellFrm() ) //MA_FLY_HEIGHT
+ else if ( pUp->IsCellFrame() ) //MA_FLY_HEIGHT
{
- const SwFrm *pTab = pUp->FindTabFrm();
+ const SwFrame *pTab = pUp->FindTabFrame();
(rRect.*fnRect->fnSetBottom)(
(pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
// expand to left and right cell border
- rRect.Left ( pUp->Frm().Left() );
- rRect.Width( pUp->Frm().Width() );
+ rRect.Left ( pUp->Frame().Left() );
+ rRect.Width( pUp->Frame().Width() );
}
}
}
if ( pCell )
{
- // CellFrms might also sit in unallowed areas. In this case,
+ // CellFrames might also sit in unallowed areas. In this case,
// the Fly is allowed to do so as well
SwRect aTmp( pCell->Prt() );
- aTmp += pCell->Frm().Pos();
+ aTmp += pCell->Frame().Pos();
rRect.Union( aTmp );
}
}
}
else
{
- const SwFrm *pUp = pFly->GetAnchorFrm()->GetUpper();
- SWRECTFN( pFly->GetAnchorFrm() )
- while( pUp->IsColumnFrm() || pUp->IsSctFrm() || pUp->IsColBodyFrm())
+ const SwFrame *pUp = pFly->GetAnchorFrame()->GetUpper();
+ SWRECTFN( pFly->GetAnchorFrame() )
+ while( pUp->IsColumnFrame() || pUp->IsSctFrame() || pUp->IsColBodyFrame())
pUp = pUp->GetUpper();
- rRect = pUp->Frm();
- if( !pUp->IsBodyFrm() )
+ rRect = pUp->Frame();
+ if( !pUp->IsBodyFrame() )
{
rRect += pUp->Prt().Pos();
rRect.SSize( pUp->Prt().SSize() );
- if ( pUp->IsCellFrm() )
+ if ( pUp->IsCellFrame() )
{
- const SwFrm *pTab = pUp->FindTabFrm();
+ const SwFrame *pTab = pUp->FindTabFrame();
(rRect.*fnRect->fnSetBottom)(
(pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
}
}
- else if ( pUp->GetUpper()->IsPageFrm() )
+ else if ( pUp->GetUpper()->IsPageFrame() )
{
// Objects anchored as character may exceed right margin
// of body frame:
- (rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frm().*fnRect->fnGetRight)() );
+ (rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frame().*fnRect->fnGetRight)() );
}
long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
long nTop;
@@ -1152,20 +1152,20 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
const SvxULSpaceItem &rUL = pFormat->GetULSpace();
if( bMove )
{
- nTop = bVert ? static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().X() :
- static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().Y();
+ nTop = bVert ? static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X() :
+ static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y();
nTop = (*fnRect->fnYInc)( nTop, -nHeight );
- long nWidth = (pFly->Frm().*fnRect->fnGetWidth)();
+ long nWidth = (pFly->Frame().*fnRect->fnGetWidth)();
(rRect.*fnRect->fnSetLeftAndWidth)( bVert ?
- static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().Y() :
- static_cast<const SwFlyInCntFrm*>(pFly)->GetRefPoint().X(), nWidth );
+ static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().Y() :
+ static_cast<const SwFlyInContentFrame*>(pFly)->GetRefPoint().X(), nWidth );
nHeight = 2*nHeight - rUL.GetLower() - rUL.GetUpper();
}
else
{
- nTop = (*fnRect->fnYInc)( (pFly->Frm().*fnRect->fnGetBottom)(),
+ nTop = (*fnRect->fnYInc)( (pFly->Frame().*fnRect->fnGetBottom)(),
rUL.GetLower() - nHeight );
- nHeight = 2*nHeight - (pFly->Frm().*fnRect->fnGetHeight)()
+ nHeight = 2*nHeight - (pFly->Frame().*fnRect->fnGetHeight)()
- rUL.GetLower() - rUL.GetUpper();
}
(rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight );
@@ -1178,17 +1178,17 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
const SwFormatAnchor &rAnch = pFormat->GetAnchor();
if ( FLY_AS_CHAR == rAnch.GetAnchorId() )
{
- const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
- if( !pAnchorFrm )
+ const SwFrame* pAnchorFrame = pC->GetAnchorFrame( pSdrObj );
+ if( !pAnchorFrame )
{
OSL_FAIL( "<::CalcClipRect(..)> - missing anchor frame." );
const_cast<SwDrawContact*>(pC)->ConnectToLayout();
- pAnchorFrm = pC->GetAnchorFrm();
+ pAnchorFrame = pC->GetAnchorFrame();
}
- const SwFrm* pUp = pAnchorFrm->GetUpper();
+ const SwFrame* pUp = pAnchorFrame->GetUpper();
rRect = pUp->Prt();
- rRect += pUp->Frm().Pos();
- SWRECTFN( pAnchorFrm )
+ rRect += pUp->Frame().Pos();
+ SWRECTFN( pAnchorFrame )
long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
long nTop;
const SvxULSpaceItem &rUL = pFormat->GetULSpace();
@@ -1220,12 +1220,12 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, bool bMove )
// restrict clip rectangle for drawing
// objects in header/footer to the page frame.
// #i26791#
- const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
- if ( pAnchorFrm && pAnchorFrm->FindFooterOrHeader() )
+ const SwFrame* pAnchorFrame = pC->GetAnchorFrame( pSdrObj );
+ if ( pAnchorFrame && pAnchorFrame->FindFooterOrHeader() )
{
// clip frame is the page frame the header/footer is on.
- const SwFrm* pClipFrm = pAnchorFrm->FindPageFrm();
- rRect = pClipFrm->Frm();
+ const SwFrame* pClipFrame = pAnchorFrame->FindPageFrame();
+ rRect = pClipFrame->Frame();
}
else
{
diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx
index 0582eaaceeb3..38ab540e451a 100644
--- a/sw/source/core/layout/flypos.cxx
+++ b/sw/source/core/layout/flypos.cxx
@@ -25,7 +25,7 @@
#include "dflyobj.hxx"
#include <calbck.hxx>
-bool SwPosFlyFrmCmp::operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr& rB) const
+bool SwPosFlyFrameCmp::operator()(const SwPosFlyFramePtr& rA, const SwPosFlyFramePtr& rB) const
{
if(rA->GetNdIndex() == rB->GetNdIndex())
{
@@ -36,7 +36,7 @@ bool SwPosFlyFrmCmp::operator()(const SwPosFlyFrmPtr& rA, const SwPosFlyFrmPtr&
return rA->GetNdIndex() < rB->GetNdIndex();
}
-SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat,
+SwPosFlyFrame::SwPosFlyFrame( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat,
sal_uInt16 nArrPos )
: m_pFrameFormat( pFormat ), m_pNodeIndex( const_cast<SwNodeIndex*>(&rIdx) )
{
@@ -51,7 +51,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat,
if( RES_FLYFRMFMT == pFormat->Which() )
{
// Let's see if we have an SdrObject for this
- SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFormat>(*pFormat).First();
+ SwFlyFrame* pFly = SwIterator<SwFlyFrame,SwFormat>(*pFormat).First();
if( pFly )
{
m_nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
@@ -77,7 +77,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrameFormat* pFormat,
}
}
-SwPosFlyFrm::~SwPosFlyFrm()
+SwPosFlyFrame::~SwPosFlyFrame()
{
const SwFormatAnchor& rAnchor = m_pFrameFormat->GetAnchor();
if (FLY_AT_PAGE == rAnchor.GetAnchorId())
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 5a679157a9c7..34b6af63b457 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -79,18 +79,18 @@ bool bSetCompletePaintOnInvalidate = false;
sal_uInt8 StackHack::nCnt = 0;
bool StackHack::bLocked = false;
-SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
- mpFrm( pF ),
- maFrm( pF->Frm() ),
+SwFrameNotify::SwFrameNotify( SwFrame *pF ) :
+ mpFrame( pF ),
+ maFrame( pF->Frame() ),
maPrt( pF->Prt() ),
mbInvaKeep( false ),
mbValidSize( pF->GetValidSizeFlag() ),
- mbFrmDeleted( false ) // #i49383#
+ mbFrameDeleted( false ) // #i49383#
{
- if ( pF->IsTextFrm() )
+ if ( pF->IsTextFrame() )
{
- mnFlyAnchorOfst = static_cast<SwTextFrm*>(pF)->GetBaseOfstForFly( true );
- mnFlyAnchorOfstNoWrap = static_cast<SwTextFrm*>(pF)->GetBaseOfstForFly( false );
+ mnFlyAnchorOfst = static_cast<SwTextFrame*>(pF)->GetBaseOfstForFly( true );
+ mnFlyAnchorOfstNoWrap = static_cast<SwTextFrame*>(pF)->GetBaseOfstForFly( false );
}
else
{
@@ -98,50 +98,50 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) :
mnFlyAnchorOfstNoWrap = 0;
}
- mbHadFollow = pF->IsContentFrm() && static_cast<SwContentFrm*>(pF)->GetFollow();
+ mbHadFollow = pF->IsContentFrame() && static_cast<SwContentFrame*>(pF)->GetFollow();
}
-SwFrmNotify::~SwFrmNotify()
+SwFrameNotify::~SwFrameNotify()
{
// #i49383#
- if ( mbFrmDeleted )
+ if ( mbFrameDeleted )
{
return;
}
- SWRECTFN( mpFrm )
- const bool bAbsP = POS_DIFF( maFrm, mpFrm->Frm() );
+ SWRECTFN( mpFrame )
+ const bool bAbsP = POS_DIFF( maFrame, mpFrame->Frame() );
const bool bChgWidth =
- (maFrm.*fnRect->fnGetWidth)() != (mpFrm->Frm().*fnRect->fnGetWidth)();
+ (maFrame.*fnRect->fnGetWidth)() != (mpFrame->Frame().*fnRect->fnGetWidth)();
const bool bChgHeight =
- (maFrm.*fnRect->fnGetHeight)()!=(mpFrm->Frm().*fnRect->fnGetHeight)();
- const bool bChgFlyBasePos = mpFrm->IsTextFrm() &&
- ( ( mnFlyAnchorOfst != static_cast<SwTextFrm*>(mpFrm)->GetBaseOfstForFly( true ) ) ||
- ( mnFlyAnchorOfstNoWrap != static_cast<SwTextFrm*>(mpFrm)->GetBaseOfstForFly( false ) ) );
+ (maFrame.*fnRect->fnGetHeight)()!=(mpFrame->Frame().*fnRect->fnGetHeight)();
+ const bool bChgFlyBasePos = mpFrame->IsTextFrame() &&
+ ( ( mnFlyAnchorOfst != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( true ) ) ||
+ ( mnFlyAnchorOfstNoWrap != static_cast<SwTextFrame*>(mpFrame)->GetBaseOfstForFly( false ) ) );
- if ( mpFrm->IsFlowFrm() && !mpFrm->IsInFootnote() )
+ if ( mpFrame->IsFlowFrame() && !mpFrame->IsInFootnote() )
{
- SwFlowFrm *pFlow = SwFlowFrm::CastFlowFrm( mpFrm );
+ SwFlowFrame *pFlow = SwFlowFrame::CastFlowFrame( mpFrame );
if ( !pFlow->IsFollow() )
{
- if ( !mpFrm->GetIndPrev() )
+ if ( !mpFrame->GetIndPrev() )
{
if ( mbInvaKeep )
{
- SwFrm *pPre = mpFrm->FindPrev();
- if ( pPre && pPre->IsFlowFrm() )
+ SwFrame *pPre = mpFrame->FindPrev();
+ if ( pPre && pPre->IsFlowFrame() )
{
// 1. pPre wants to keep with me:
- bool bInvalidPrePos = SwFlowFrm::CastFlowFrm( pPre )->IsKeep( *pPre->GetAttrSet() ) && pPre->GetIndPrev();
+ bool bInvalidPrePos = SwFlowFrame::CastFlowFrame( pPre )->IsKeep( *pPre->GetAttrSet() ) && pPre->GetIndPrev();
// 2. pPre is a table and the last row wants to keep with me:
- if ( !bInvalidPrePos && pPre->IsTabFrm() )
+ if ( !bInvalidPrePos && pPre->IsTabFrame() )
{
- SwTabFrm* pPreTab = static_cast<SwTabFrm*>(pPre);
+ SwTabFrame* pPreTab = static_cast<SwTabFrame*>(pPre);
if ( pPreTab->GetFormat()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::TABLE_ROW_KEEP) )
{
- SwRowFrm* pLastRow = static_cast<SwRowFrm*>(pPreTab->GetLastLower());
+ SwRowFrame* pLastRow = static_cast<SwRowFrame*>(pPreTab->GetLastLower());
if ( pLastRow && pLastRow->ShouldRowKeepWithNext() )
bInvalidPrePos = true;
}
@@ -154,8 +154,8 @@ SwFrmNotify::~SwFrmNotify()
}
else if ( !pFlow->HasFollow() )
{
- long nOldHeight = (maFrm.*fnRect->fnGetHeight)();
- long nNewHeight = (mpFrm->Frm().*fnRect->fnGetHeight)();
+ long nOldHeight = (maFrame.*fnRect->fnGetHeight)();
+ long nNewHeight = (mpFrame->Frame().*fnRect->fnGetHeight)();
if( (nOldHeight > nNewHeight) || (!nOldHeight && nNewHeight) )
pFlow->CheckKeep();
}
@@ -164,12 +164,12 @@ SwFrmNotify::~SwFrmNotify()
if ( bAbsP )
{
- mpFrm->SetCompletePaint();
+ mpFrame->SetCompletePaint();
- SwFrm* pNxt = mpFrm->GetIndNext();
+ SwFrame* pNxt = mpFrame->GetIndNext();
// #121888# - skip empty section frames
while ( pNxt &&
- pNxt->IsSctFrm() && !static_cast<SwSectionFrm*>(pNxt)->GetSection() )
+ pNxt->IsSctFrame() && !static_cast<SwSectionFrame*>(pNxt)->GetSection() )
{
pNxt = pNxt->GetIndNext();
}
@@ -180,49 +180,49 @@ SwFrmNotify::~SwFrmNotify()
{
// #104100# - correct condition for setting retouche
// flag for vertical layout.
- if( mpFrm->IsRetoucheFrm() &&
- (maFrm.*fnRect->fnTopDist)( (mpFrm->Frm().*fnRect->fnGetTop)() ) > 0 )
+ if( mpFrame->IsRetoucheFrame() &&
+ (maFrame.*fnRect->fnTopDist)( (mpFrame->Frame().*fnRect->fnGetTop)() ) > 0 )
{
- mpFrm->SetRetouche();
+ mpFrame->SetRetouche();
}
// A fresh follow frame does not have to be invalidated, because
// it is already formatted:
- if ( mbHadFollow || !mpFrm->IsContentFrm() || !static_cast<SwContentFrm*>(mpFrm)->GetFollow() )
+ if ( mbHadFollow || !mpFrame->IsContentFrame() || !static_cast<SwContentFrame*>(mpFrame)->GetFollow() )
{
- if ( !mpFrm->IsTabFrm() || !static_cast<SwTabFrm*>(mpFrm)->GetFollow() )
- mpFrm->InvalidateNextPos();
+ if ( !mpFrame->IsTabFrame() || !static_cast<SwTabFrame*>(mpFrame)->GetFollow() )
+ mpFrame->InvalidateNextPos();
}
}
}
//For each resize of the background graphics is a repaint necessary.
const bool bPrtWidth =
- (maPrt.*fnRect->fnGetWidth)() != (mpFrm->Prt().*fnRect->fnGetWidth)();
+ (maPrt.*fnRect->fnGetWidth)() != (mpFrame->Prt().*fnRect->fnGetWidth)();
const bool bPrtHeight =
- (maPrt.*fnRect->fnGetHeight)()!=(mpFrm->Prt().*fnRect->fnGetHeight)();
+ (maPrt.*fnRect->fnGetHeight)()!=(mpFrame->Prt().*fnRect->fnGetHeight)();
if ( bPrtWidth || bPrtHeight )
{
//UUUU
bool bUseNewFillProperties(false);
- if (mpFrm->supportsFullDrawingLayerFillAttributeSet())
+ if (mpFrame->supportsFullDrawingLayerFillAttributeSet())
{
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes(mpFrm->getSdrAllFillAttributesHelper());
+ drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes(mpFrame->getSdrAllFillAttributesHelper());
if(aFillAttributes.get() && aFillAttributes->isUsed())
{
bUseNewFillProperties = true;
//UUUU use SetCompletePaint if needed
if(aFillAttributes->needCompleteRepaint())
{
- mpFrm->SetCompletePaint();
+ mpFrame->SetCompletePaint();
}
}
}
if (!bUseNewFillProperties)
{
- const SvxGraphicPosition ePos = mpFrm->GetAttrSet()->GetBackground().GetGraphicPos();
+ const SvxGraphicPosition ePos = mpFrame->GetAttrSet()->GetBackground().GetGraphicPos();
if(GPOS_NONE != ePos && GPOS_TILED != ePos)
- mpFrm->SetCompletePaint();
+ mpFrame->SetCompletePaint();
}
}
else
@@ -232,29 +232,29 @@ SwFrmNotify::~SwFrmNotify()
// in order to force paint of the margin areas.
if ( !bAbsP && (bChgWidth || bChgHeight) )
{
- mpFrm->SetCompletePaint();
+ mpFrame->SetCompletePaint();
}
}
- const bool bPrtP = POS_DIFF( maPrt, mpFrm->Prt() );
+ const bool bPrtP = POS_DIFF( maPrt, mpFrame->Prt() );
if ( bAbsP || bPrtP || bChgWidth || bChgHeight ||
bPrtWidth || bPrtHeight || bChgFlyBasePos )
{
- if( mpFrm->IsAccessibleFrm() )
+ if( mpFrame->IsAccessibleFrame() )
{
- SwRootFrm *pRootFrm = mpFrm->getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = mpFrame->getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( mpFrm, maFrm );
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame );
}
}
// Notification of anchored objects
- if ( mpFrm->GetDrawObjs() )
+ if ( mpFrame->GetDrawObjs() )
{
- const SwSortedObjs &rObjs = *mpFrm->GetDrawObjs();
- SwPageFrm* pPageFrm = nullptr;
+ const SwSortedObjs &rObjs = *mpFrame->GetDrawObjs();
+ SwPageFrame* pPageFrame = nullptr;
for ( size_t i = 0; i < rObjs.size(); ++i )
{
// OD 2004-03-31 #i26791# - no general distinction between
@@ -280,25 +280,25 @@ SwFrmNotify::~SwFrmNotify()
// registered at the correct page frame, if frame
// position has changed.
if ( bAbsP && pContact->ObjAnchoredAtFly() &&
- dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
// determine to-fly anchored Writer fly frame
- SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
+ SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj);
// determine page frame of to-fly anchored
// Writer fly frame
- SwPageFrm* pFlyPageFrm = pFlyFrm->FindPageFrm();
+ SwPageFrame* pFlyPageFrame = pFlyFrame->FindPageFrame();
// determine page frame, if needed.
- if ( !pPageFrm )
+ if ( !pPageFrame )
{
- pPageFrm = mpFrm->FindPageFrm();
+ pPageFrame = mpFrame->FindPageFrame();
}
- if ( pPageFrm != pFlyPageFrm )
+ if ( pPageFrame != pFlyPageFrame )
{
- OSL_ENSURE( pFlyPageFrm, "~SwFrmNotify: Fly from Nowhere" );
- if( pFlyPageFrm )
- pFlyPageFrm->MoveFly( pFlyFrm, pPageFrm );
+ OSL_ENSURE( pFlyPageFrame, "~SwFrameNotify: Fly from Nowhere" );
+ if( pFlyPageFrame )
+ pFlyPageFrame->MoveFly( pFlyFrame, pPageFrame );
else
- pPageFrm->AppendFlyToPage( pFlyFrm );
+ pPageFrame->AppendFlyToPage( pFlyFrame );
}
}
}
@@ -340,18 +340,18 @@ SwFrmNotify::~SwFrmNotify()
// perform notification via the corresponding invalidations
if ( bNotify )
{
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
+ SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj);
if ( bNotifySize )
- pFlyFrm->_InvalidateSize();
+ pFlyFrame->_InvalidateSize();
// #115759# - no invalidation of
// position for as-character anchored objects.
if ( !bAnchoredAsChar )
{
- pFlyFrm->_InvalidatePos();
+ pFlyFrame->_InvalidatePos();
}
- pFlyFrm->_Invalidate();
+ pFlyFrame->_Invalidate();
}
else if ( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr )
{
@@ -370,42 +370,42 @@ SwFrmNotify::~SwFrmNotify()
}
}
}
- else if( mpFrm->IsTextFrm() && mbValidSize != mpFrm->GetValidSizeFlag() )
+ else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->GetValidSizeFlag() )
{
- SwRootFrm *pRootFrm = mpFrm->getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = mpFrame->getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->InvalidateAccessibleFrmContent( mpFrm );
+ pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame );
}
}
// #i9046# Automatic frame width
- SwFlyFrm* pFly = nullptr;
- // #i35879# Do not trust the inf flags. pFrm does not
+ SwFlyFrame* pFly = nullptr;
+ // #i35879# Do not trust the inf flags. pFrame does not
// necessarily have to have an upper!
- if ( !mpFrm->IsFlyFrm() && nullptr != ( pFly = mpFrm->ImplFindFlyFrm() ) )
+ if ( !mpFrame->IsFlyFrame() && nullptr != ( pFly = mpFrame->ImplFindFlyFrame() ) )
{
// #i61999#
// no invalidation of columned Writer fly frames, because automatic
// width doesn't make sense for such Writer fly frames.
- if ( pFly->Lower() && !pFly->Lower()->IsColumnFrm() )
+ if ( pFly->Lower() && !pFly->Lower()->IsColumnFrame() )
{
- const SwFormatFrmSize &rFrmSz = pFly->GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rFrameSz = pFly->GetFormat()->GetFrameSize();
// This could be optimized. Basically the fly frame only has to
- // be invalidated, if the first line of pFrm (if pFrm is a content
+ // be invalidated, if the first line of pFrame (if pFrame is a content
// frame, for other frame types its the print area) has changed its
- // size and pFrm was responsible for the current width of pFly. On
+ // size and pFrame was responsible for the current width of pFly. On
// the other hand, this is only rarely used and re-calculation of
// the fly frame does not cause too much trouble. So we keep it this
// way:
- if ( ATT_FIX_SIZE != rFrmSz.GetWidthSizeType() )
+ if ( ATT_FIX_SIZE != rFrameSz.GetWidthSizeType() )
{
// #i50668#, #i50998# - invalidation of position
// of as-character anchored fly frames not needed and can cause
// layout loops
- if ( dynamic_cast<const SwFlyInCntFrm*>( pFly) == nullptr )
+ if ( dynamic_cast<const SwFlyInContentFrame*>( pFly) == nullptr )
{
pFly->InvalidatePos();
}
@@ -415,8 +415,8 @@ SwFrmNotify::~SwFrmNotify()
}
}
-SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
- SwFrmNotify( pLayFrm ),
+SwLayNotify::SwLayNotify( SwLayoutFrame *pLayFrame ) :
+ SwFrameNotify( pLayFrame ),
bLowersComplete( false )
{
}
@@ -424,41 +424,41 @@ SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) :
// OD 2004-05-11 #i28701# - local method to invalidate the position of all
// frames inclusive its floating screen objects, which are lowers of the given
// layout frame
-static void lcl_InvalidatePosOfLowers( SwLayoutFrm& _rLayoutFrm )
+static void lcl_InvalidatePosOfLowers( SwLayoutFrame& _rLayoutFrame )
{
- if( _rLayoutFrm.IsFlyFrm() && _rLayoutFrm.GetDrawObjs() )
+ if( _rLayoutFrame.IsFlyFrame() && _rLayoutFrame.GetDrawObjs() )
{
- _rLayoutFrm.InvalidateObjs( true, false );
+ _rLayoutFrame.InvalidateObjs( true, false );
}
- SwFrm* pLowerFrm = _rLayoutFrm.Lower();
- while ( pLowerFrm )
+ SwFrame* pLowerFrame = _rLayoutFrame.Lower();
+ while ( pLowerFrame )
{
- pLowerFrm->InvalidatePos();
- if ( pLowerFrm->IsTextFrm() )
+ pLowerFrame->InvalidatePos();
+ if ( pLowerFrame->IsTextFrame() )
{
- static_cast<SwTextFrm*>(pLowerFrm)->Prepare( PREP_POS_CHGD );
+ static_cast<SwTextFrame*>(pLowerFrame)->Prepare( PREP_POS_CHGD );
}
- else if ( pLowerFrm->IsTabFrm() )
+ else if ( pLowerFrame->IsTabFrame() )
{
- pLowerFrm->InvalidatePrt();
+ pLowerFrame->InvalidatePrt();
}
- pLowerFrm->InvalidateObjs( true, false );
+ pLowerFrame->InvalidateObjs( true, false );
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
}
SwLayNotify::~SwLayNotify()
{
// #i49383#
- if ( mbFrmDeleted )
+ if ( mbFrameDeleted )
{
return;
}
- SwLayoutFrm *pLay = GetLay();
+ SwLayoutFrame *pLay = GetLay();
SWRECTFN( pLay )
bool bNotify = false;
if ( pLay->Prt().SSize() != maPrt.SSize() )
@@ -467,15 +467,15 @@ SwLayNotify::~SwLayNotify()
{
bool bInvaPercent;
- if ( pLay->IsRowFrm() )
+ if ( pLay->IsRowFrame() )
{
bInvaPercent = true;
long nNew = (pLay->Prt().*fnRect->fnGetHeight)();
if( nNew != (maPrt.*fnRect->fnGetHeight)() )
- static_cast<SwRowFrm*>(pLay)->AdjustCells( nNew, true);
+ static_cast<SwRowFrame*>(pLay)->AdjustCells( nNew, true);
if( (pLay->Prt().*fnRect->fnGetWidth)()
!= (maPrt.*fnRect->fnGetWidth)() )
- static_cast<SwRowFrm*>(pLay)->AdjustCells( 0, false );
+ static_cast<SwRowFrame*>(pLay)->AdjustCells( 0, false );
}
else
{
@@ -485,32 +485,32 @@ SwLayNotify::~SwLayNotify()
//3. If the Fly has a fixed hight and the columns
// are next to be.
// Hoehe danebenliegen.
- //4. Never at SectionFrms.
+ //4. Never at SectionFrames.
bool bLow;
- if( pLay->IsFlyFrm() )
+ if( pLay->IsFlyFrame() )
{
if ( pLay->Lower() )
{
- bLow = !pLay->Lower()->IsColumnFrm() ||
- (pLay->Lower()->Frm().*fnRect->fnGetHeight)()
+ bLow = !pLay->Lower()->IsColumnFrame() ||
+ (pLay->Lower()->Frame().*fnRect->fnGetHeight)()
!= (pLay->Prt().*fnRect->fnGetHeight)();
}
else
bLow = false;
}
- else if( pLay->IsSctFrm() )
+ else if( pLay->IsSctFrame() )
{
if ( pLay->Lower() )
{
- if( pLay->Lower()->IsColumnFrm() && pLay->Lower()->GetNext() )
- bLow = pLay->Lower()->Frm().Height() != pLay->Prt().Height();
+ if( pLay->Lower()->IsColumnFrame() && pLay->Lower()->GetNext() )
+ bLow = pLay->Lower()->Frame().Height() != pLay->Prt().Height();
else
bLow = pLay->Prt().Width() != maPrt.Width();
}
else
bLow = false;
}
- else if( pLay->IsFooterFrm() && !pLay->HasFixSize() )
+ else if( pLay->IsFooterFrame() && !pLay->HasFixSize() )
bLow = pLay->Prt().Width() != maPrt.Width();
else
bLow = true;
@@ -525,14 +525,14 @@ SwLayNotify::~SwLayNotify()
// A PrtArea has been extended if width or height are larger than before.
if ( (pLay->Prt().Height() > maPrt.Height() ||
pLay->Prt().Width() > maPrt.Width()) &&
- (pLay->IsMoveable() || pLay->IsFlyFrm()) )
+ (pLay->IsMoveable() || pLay->IsFlyFrame()) )
{
- SwFrm *pTmpFrm = pLay->Lower();
- if ( pTmpFrm && pTmpFrm->IsFlowFrm() )
+ SwFrame *pTmpFrame = pLay->Lower();
+ if ( pTmpFrame && pTmpFrame->IsFlowFrame() )
{
- while ( pTmpFrm->GetNext() )
- pTmpFrm = pTmpFrm->GetNext();
- pTmpFrm->InvalidateNextPos();
+ while ( pTmpFrame->GetNext() )
+ pTmpFrame = pTmpFrame->GetNext();
+ pTmpFrame->InvalidateNextPos();
}
}
}
@@ -541,12 +541,12 @@ SwLayNotify::~SwLayNotify()
if( bInvaPercent )
pLay->InvaPercentLowers( pLay->Prt().Height() - maPrt.Height() );
}
- if ( pLay->IsTabFrm() )
+ if ( pLay->IsTabFrame() )
//So that _only_ the shadow is drawn while resizing.
- static_cast<SwTabFrm*>(pLay)->SetComplete();
+ static_cast<SwTabFrame*>(pLay)->SetComplete();
else
{
- const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell();
if( !( pSh && pSh->GetViewOptions()->getBrowseMode() ) ||
!(pLay->GetType() & (FRM_BODY | FRM_PAGE)) )
//Thereby the subordinates are retouched clean.
@@ -557,8 +557,8 @@ SwLayNotify::~SwLayNotify()
}
//Notify Lower if the position has changed.
const bool bPrtPos = POS_DIFF( maPrt, pLay->Prt() );
- const bool bPos = bPrtPos || POS_DIFF( maFrm, pLay->Frm() );
- const bool bSize = pLay->Frm().SSize() != maFrm.SSize();
+ const bool bPos = bPrtPos || POS_DIFF( maFrame, pLay->Frame() );
+ const bool bSize = pLay->Frame().SSize() != maFrame.SSize();
if ( bPos && pLay->Lower() && !IsLowersComplete() )
pLay->Lower()->InvalidatePos();
@@ -571,17 +571,17 @@ SwLayNotify::~SwLayNotify()
{
if( pLay->GetNext() )
{
- if ( pLay->GetNext()->IsLayoutFrm() )
+ if ( pLay->GetNext()->IsLayoutFrame() )
pLay->GetNext()->_InvalidatePos();
else
pLay->GetNext()->InvalidatePos();
}
- else if( pLay->IsSctFrm() )
+ else if( pLay->IsSctFrame() )
pLay->InvalidateNextPos();
}
if ( !IsLowersComplete() &&
!(pLay->GetType()&(FRM_FLY|FRM_SECTION) &&
- pLay->Lower() && pLay->Lower()->IsColumnFrm()) &&
+ pLay->Lower() && pLay->Lower()->IsColumnFrame()) &&
(bPos || bNotify) &&
!(pLay->GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
{
@@ -592,73 +592,73 @@ SwLayNotify::~SwLayNotify()
// #i47458# - force unlock of position of lower objects,
// only if position of layout frame has changed.
bool bUnlockPosOfObjs( bPos );
- if ( bUnlockPosOfObjs && pLay->IsCellFrm() )
+ if ( bUnlockPosOfObjs && pLay->IsCellFrame() )
{
- SwTabFrm* pTabFrm( pLay->FindTabFrm() );
- if ( pTabFrm &&
- ( pTabFrm->IsJoinLocked() ||
- ( pTabFrm->IsFollow() &&
- pTabFrm->FindMaster()->IsJoinLocked() ) ) )
+ SwTabFrame* pTabFrame( pLay->FindTabFrame() );
+ if ( pTabFrame &&
+ ( pTabFrame->IsJoinLocked() ||
+ ( pTabFrame->IsFollow() &&
+ pTabFrame->FindMaster()->IsJoinLocked() ) ) )
{
bUnlockPosOfObjs = false;
}
}
// #i49383# - check for footnote frame, if unlock
// of position of lower objects is allowed.
- else if ( bUnlockPosOfObjs && pLay->IsFootnoteFrm() )
+ else if ( bUnlockPosOfObjs && pLay->IsFootnoteFrame() )
{
- bUnlockPosOfObjs = static_cast<SwFootnoteFrm*>(pLay)->IsUnlockPosOfLowerObjs();
+ bUnlockPosOfObjs = static_cast<SwFootnoteFrame*>(pLay)->IsUnlockPosOfLowerObjs();
}
// #i51303# - no unlock of object positions for sections
- else if ( bUnlockPosOfObjs && pLay->IsSctFrm() )
+ else if ( bUnlockPosOfObjs && pLay->IsSctFrame() )
{
bUnlockPosOfObjs = false;
}
pLay->NotifyLowerObjs( bUnlockPosOfObjs );
}
- if ( bPos && pLay->IsFootnoteFrm() && pLay->Lower() )
+ if ( bPos && pLay->IsFootnoteFrame() && pLay->Lower() )
{
// OD 2004-05-11 #i28701#
::lcl_InvalidatePosOfLowers( *pLay );
}
- if( ( bPos || bSize ) && pLay->IsFlyFrm() && static_cast<SwFlyFrm*>(pLay)->GetAnchorFrm()
- && static_cast<SwFlyFrm*>(pLay)->GetAnchorFrm()->IsFlyFrm() )
- static_cast<SwFlyFrm*>(pLay)->AnchorFrm()->InvalidateSize();
+ if( ( bPos || bSize ) && pLay->IsFlyFrame() && static_cast<SwFlyFrame*>(pLay)->GetAnchorFrame()
+ && static_cast<SwFlyFrame*>(pLay)->GetAnchorFrame()->IsFlyFrame() )
+ static_cast<SwFlyFrame*>(pLay)->AnchorFrame()->InvalidateSize();
}
-SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) :
- SwLayNotify( pFlyFrm ),
+SwFlyNotify::SwFlyNotify( SwFlyFrame *pFlyFrame ) :
+ SwLayNotify( pFlyFrame ),
// #115759# - keep correct page frame - the page frame
// the Writer fly frame is currently registered at.
- pOldPage( pFlyFrm->GetPageFrm() ),
- aFrmAndSpace( pFlyFrm->GetObjRectWithSpaces() )
+ pOldPage( pFlyFrame->GetPageFrame() ),
+ aFrameAndSpace( pFlyFrame->GetObjRectWithSpaces() )
{
}
SwFlyNotify::~SwFlyNotify()
{
// #i49383#
- if ( mbFrmDeleted )
+ if ( mbFrameDeleted )
{
return;
}
- SwFlyFrm *pFly = GetFly();
+ SwFlyFrame *pFly = GetFly();
if ( pFly->IsNotifyBack() )
{
- SwViewShell *pSh = pFly->getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell();
SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( !pImp || !pImp->IsAction() || !pImp->GetLayAction().IsAgain() )
{
//If in the LayAction the IsAgain is set it can be
//that the old page is destroyed in the meantime!
- ::Notify( pFly, pOldPage, aFrmAndSpace, &maPrt );
+ ::Notify( pFly, pOldPage, aFrameAndSpace, &maPrt );
// #i35640# - additional notify anchor text frame,
// if Writer fly frame has changed its page
- if ( pFly->GetAnchorFrm()->IsTextFrm() &&
- pFly->GetPageFrm() != pOldPage )
+ if ( pFly->GetAnchorFrame()->IsTextFrame() &&
+ pFly->GetPageFrame() != pOldPage )
{
- pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE );
+ pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
}
}
pFly->ResetNotifyBack();
@@ -667,24 +667,24 @@ SwFlyNotify::~SwFlyNotify()
//Have the size or the position changed,
//so should the view know this.
SWRECTFN( pFly )
- const bool bPosChgd = POS_DIFF( maFrm, pFly->Frm() );
- const bool bFrmChgd = pFly->Frm().SSize() != maFrm.SSize();
+ const bool bPosChgd = POS_DIFF( maFrame, pFly->Frame() );
+ const bool bFrameChgd = pFly->Frame().SSize() != maFrame.SSize();
const bool bPrtChgd = maPrt != pFly->Prt();
- if ( bPosChgd || bFrmChgd || bPrtChgd )
+ if ( bPosChgd || bFrameChgd || bPrtChgd )
{
pFly->NotifyDrawObj();
}
- if ( bPosChgd && maFrm.Pos().X() != FAR_AWAY )
+ if ( bPosChgd && maFrame.Pos().X() != FAR_AWAY )
{
// OD 2004-05-10 #i28701# - no direct move of lower Writer fly frames.
// reason: New positioning and alignment (e.g. to-paragraph anchored,
// but aligned at page) are introduced.
// <SwLayNotify::~SwLayNotify()> takes care of invalidation of lower
- // floating screen objects by calling method <SwLayoutFrm::NotifyLowerObjs()>.
+ // floating screen objects by calling method <SwLayoutFrame::NotifyLowerObjs()>.
- if ( pFly->IsFlyAtCntFrm() )
+ if ( pFly->IsFlyAtContentFrame() )
{
- SwFrm *pNxt = pFly->AnchorFrm()->FindNext();
+ SwFrame *pNxt = pFly->AnchorFrame()->FindNext();
if ( pNxt )
{
pNxt->InvalidatePos();
@@ -693,9 +693,9 @@ SwFlyNotify::~SwFlyNotify()
// #i26945# - notify anchor.
// Needed for negative positioned Writer fly frames
- if ( pFly->GetAnchorFrm()->IsTextFrm() )
+ if ( pFly->GetAnchorFrame()->IsTextFrame() )
{
- pFly->AnchorFrm()->Prepare( PREP_FLY_LEAVE );
+ pFly->AnchorFrame()->Prepare( PREP_FLY_LEAVE );
}
}
@@ -703,8 +703,8 @@ SwFlyNotify::~SwFlyNotify()
// #i45180# - no adjustment of layout process flags and
// further notifications/invalidations, if format is called by grow/shrink
if ( pFly->ConsiderObjWrapInfluenceOnObjPos() &&
- ( dynamic_cast<const SwFlyFreeFrm*>( pFly) == nullptr ||
- !static_cast<SwFlyFreeFrm*>(pFly)->IsNoMoveOnCheckClip() ) )
+ ( dynamic_cast<const SwFlyFreeFrame*>( pFly) == nullptr ||
+ !static_cast<SwFlyFreeFrame*>(pFly)->IsNoMoveOnCheckClip() ) )
{
// #i54138# - suppress restart of the layout process
// on changed frame height.
@@ -725,25 +725,25 @@ SwFlyNotify::~SwFlyNotify()
pFly->SetConsiderForTextWrap( true );
// invalidate 'background' in order to allow its 'background'
// to wrap around it.
- pFly->NotifyBackground( pFly->GetPageFrm(),
+ pFly->NotifyBackground( pFly->GetPageFrame(),
pFly->GetObjRectWithSpaces(),
PREP_FLY_ARRIVE );
// invalidate position of anchor frame in order to force
// a re-format of the anchor frame, which also causes a
// re-format of the invalid previous frames of the anchor frame.
- pFly->AnchorFrm()->InvalidatePos();
+ pFly->AnchorFrame()->InvalidatePos();
}
}
}
}
-SwContentFrm *SwContentNotify::GetCnt()
+SwContentFrame *SwContentNotify::GetCnt()
{
- return static_cast<SwContentFrm*>(mpFrm);
+ return static_cast<SwContentFrame*>(mpFrame);
}
-SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) :
- SwFrmNotify( pContentFrm ),
+SwContentNotify::SwContentNotify( SwContentFrame *pContentFrame ) :
+ SwFrameNotify( pContentFrame ),
// OD 08.01.2004 #i11859#
mbChkHeightOfLastLine( false ),
mnHeightOfLastLine( 0L ),
@@ -752,17 +752,17 @@ SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) :
mbBordersJoinedWithPrev( false )
{
// OD 08.01.2004 #i11859#
- if ( pContentFrm->IsTextFrm() )
+ if ( pContentFrame->IsTextFrame() )
{
- SwTextFrm* pTextFrm = static_cast<SwTextFrm*>(pContentFrm);
- if ( !pTextFrm->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::OLD_LINE_SPACING) )
+ SwTextFrame* pTextFrame = static_cast<SwTextFrame*>(pContentFrame);
+ if ( !pTextFrame->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::OLD_LINE_SPACING) )
{
- const SwAttrSet* pSet = pTextFrm->GetAttrSet();
+ const SwAttrSet* pSet = pTextFrame->GetAttrSet();
const SvxLineSpacingItem &rSpace = pSet->GetLineSpacing();
if ( rSpace.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
mbChkHeightOfLastLine = true;
- mnHeightOfLastLine = pTextFrm->GetHeightOfLastLine();
+ mnHeightOfLastLine = pTextFrame->GetHeightOfLastLine();
}
}
}
@@ -771,50 +771,50 @@ SwContentNotify::SwContentNotify( SwContentFrm *pContentFrm ) :
SwContentNotify::~SwContentNotify()
{
// #i49383#
- if ( mbFrmDeleted )
+ if ( mbFrameDeleted )
{
return;
}
- SwContentFrm *pCnt = GetCnt();
+ SwContentFrame *pCnt = GetCnt();
if ( bSetCompletePaintOnInvalidate )
pCnt->SetCompletePaint();
SWRECTFN( pCnt )
- if ( pCnt->IsInTab() && ( POS_DIFF( pCnt->Frm(), maFrm ) ||
- pCnt->Frm().SSize() != maFrm.SSize()))
+ if ( pCnt->IsInTab() && ( POS_DIFF( pCnt->Frame(), maFrame ) ||
+ pCnt->Frame().SSize() != maFrame.SSize()))
{
- SwLayoutFrm* pCell = pCnt->GetUpper();
- while( !pCell->IsCellFrm() && pCell->GetUpper() )
+ SwLayoutFrame* pCell = pCnt->GetUpper();
+ while( !pCell->IsCellFrame() && pCell->GetUpper() )
pCell = pCell->GetUpper();
- OSL_ENSURE( pCell->IsCellFrm(), "Where's my cell?" );
+ OSL_ENSURE( pCell->IsCellFrame(), "Where's my cell?" );
if ( text::VertOrientation::NONE != pCell->GetFormat()->GetVertOrient().GetVertOrient() )
pCell->InvalidatePrt(); //for the vertical align.
}
// OD 2004-02-26 #i25029#
if ( mbInvalidatePrevPrtArea && mbBordersJoinedWithPrev &&
- pCnt->IsTextFrm() &&
+ pCnt->IsTextFrame() &&
!pCnt->IsFollow() && !pCnt->GetIndPrev() )
{
// determine previous frame
- SwFrm* pPrevFrm = pCnt->FindPrev();
+ SwFrame* pPrevFrame = pCnt->FindPrev();
// skip empty section frames and hidden text frames
{
- while ( pPrevFrm &&
- ( ( pPrevFrm->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pPrevFrm)->GetSection() ) ||
- ( pPrevFrm->IsTextFrm() &&
- static_cast<SwTextFrm*>(pPrevFrm)->IsHiddenNow() ) ) )
+ while ( pPrevFrame &&
+ ( ( pPrevFrame->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pPrevFrame)->GetSection() ) ||
+ ( pPrevFrame->IsTextFrame() &&
+ static_cast<SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ) )
{
- pPrevFrm = pPrevFrm->FindPrev();
+ pPrevFrame = pPrevFrame->FindPrev();
}
}
// Invalidate printing area of found previous frame
- if ( pPrevFrm )
+ if ( pPrevFrame )
{
- if ( pPrevFrm->IsSctFrm() )
+ if ( pPrevFrame->IsSctFrame() )
{
if ( pCnt->IsInSct() )
{
@@ -824,28 +824,28 @@ SwContentNotify::~SwContentNotify()
// <pCnt> had joined its borders/shadow with the
// last content of the found section.
// Invalidate printing area of last content in found section.
- SwFrm* pLstContentOfSctFrm =
- static_cast<SwSectionFrm*>(pPrevFrm)->FindLastContent();
- if ( pLstContentOfSctFrm )
+ SwFrame* pLstContentOfSctFrame =
+ static_cast<SwSectionFrame*>(pPrevFrame)->FindLastContent();
+ if ( pLstContentOfSctFrame )
{
- pLstContentOfSctFrm->InvalidatePrt();
+ pLstContentOfSctFrame->InvalidatePrt();
}
}
}
else
{
- pPrevFrm->InvalidatePrt();
+ pPrevFrame->InvalidatePrt();
}
}
}
- const bool bFirst = (maFrm.*fnRect->fnGetWidth)() == 0;
+ const bool bFirst = (maFrame.*fnRect->fnGetWidth)() == 0;
- if ( pCnt->IsNoTextFrm() )
+ if ( pCnt->IsNoTextFrame() )
{
//Active PlugIn's or OLE-Objects should know something of the change
//thereby they move their window appropriate.
- SwViewShell *pSh = pCnt->getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = pCnt->getRootFrame()->GetCurrShell();
if ( pSh )
{
SwOLENode *pNd;
@@ -853,23 +853,23 @@ SwContentNotify::~SwContentNotify()
(pNd->GetOLEObj().IsOleRef() ||
pNd->IsOLESizeInvalid()) )
{
- const bool bNoTextFrmPrtAreaChanged =
+ const bool bNoTextFramePrtAreaChanged =
( maPrt.SSize().Width() != 0 &&
maPrt.SSize().Height() != 0 ) &&
maPrt.SSize() != pCnt->Prt().SSize();
- OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrm" );
- SwFlyFrm *pFly = pCnt->FindFlyFrm();
+ OSL_ENSURE( pCnt->IsInFly(), "OLE not in FlyFrame" );
+ SwFlyFrame *pFly = pCnt->FindFlyFrame();
svt::EmbeddedObjectRef& xObj = pNd->GetOLEObj().GetObject();
SwFEShell *pFESh = nullptr;
for(SwViewShell& rCurrentShell : pSh->GetRingContainer())
- { if ( dynamic_cast<const SwCrsrShell*>( &rCurrentShell) != nullptr )
+ { if ( dynamic_cast<const SwCursorShell*>( &rCurrentShell) != nullptr )
{
pFESh = static_cast<SwFEShell*>(&rCurrentShell);
// #108369#: Here used to be the condition if (!bFirst).
// I think this should mean "do not call CalcAndSetScale"
// if the frame is formatted for the first time.
// Unfortunately this is not valid anymore since the
- // SwNoTextFrm already gets a width during CalcLowerPreps.
+ // SwNoTextFrame already gets a width during CalcLowerPreps.
// Nevertheless, the indention of !bFirst seemed to be
// to assure that the OLE objects have already been notified
// if necessary before calling CalcAndSetScale.
@@ -883,8 +883,8 @@ SwContentNotify::~SwContentNotify()
if ( !pNd->IsOLESizeInvalid() &&
!pSh->GetDoc()->getIDocumentState().IsUpdateExpField() )
pFESh->CalcAndSetScale( xObj,
- &pFly->Prt(), &pFly->Frm(),
- bNoTextFrmPrtAreaChanged );
+ &pFly->Prt(), &pFly->Frame(),
+ bNoTextFramePrtAreaChanged );
}
}
@@ -895,10 +895,10 @@ SwContentNotify::~SwContentNotify()
}
}
//dito animated graphics
- if ( Frm().HasArea() && static_cast<SwNoTextFrm*>(pCnt)->HasAnimation() )
+ if ( Frame().HasArea() && static_cast<SwNoTextFrame*>(pCnt)->HasAnimation() )
{
- static_cast<SwNoTextFrm*>(pCnt)->StopAnimation();
- pSh->InvalidateWindows( Frm() );
+ static_cast<SwNoTextFrame*>(pCnt)->StopAnimation();
+ pSh->InvalidateWindows( Frame() );
}
}
}
@@ -919,7 +919,7 @@ SwContentNotify::~SwContentNotify()
// When this content is formatted it is the time at which
// the page is known. Thus, this data can be corrected now.
- const SwPageFrm *pPage = nullptr;
+ const SwPageFrame *pPage = nullptr;
SwNodeIndex *pIdx = nullptr;
SwFrameFormats *pTable = pDoc->GetSpzFrameFormats();
@@ -942,7 +942,7 @@ SwContentNotify::~SwContentNotify()
OSL_FAIL( "<SwContentNotify::~SwContentNotify()> - to page anchored object with content position." );
if ( !pPage )
{
- pPage = pCnt->FindPageFrm();
+ pPage = pCnt->FindPageFrame();
}
SwFormatAnchor aAnch( rAnch );
aAnch.SetAnchor( nullptr );
@@ -950,7 +950,7 @@ SwContentNotify::~SwContentNotify()
pFormat->SetFormatAttr( aAnch );
if ( RES_DRAWFRMFMT != pFormat->Which() )
{
- pFormat->MakeFrms();
+ pFormat->MakeFrames();
}
}
}
@@ -960,39 +960,39 @@ SwContentNotify::~SwContentNotify()
// OD 12.01.2004 #i11859# - invalidate printing area of following frame,
// if height of last line has changed.
- if ( pCnt->IsTextFrm() && mbChkHeightOfLastLine )
+ if ( pCnt->IsTextFrame() && mbChkHeightOfLastLine )
{
- if ( mnHeightOfLastLine != static_cast<SwTextFrm*>(pCnt)->GetHeightOfLastLine() )
+ if ( mnHeightOfLastLine != static_cast<SwTextFrame*>(pCnt)->GetHeightOfLastLine() )
{
pCnt->InvalidateNextPrtArea();
}
}
// #i44049#
- if ( pCnt->IsTextFrm() && POS_DIFF( maFrm, pCnt->Frm() ) )
+ if ( pCnt->IsTextFrame() && POS_DIFF( maFrame, pCnt->Frame() ) )
{
pCnt->InvalidateObjs( true );
}
// #i43255# - move code to invalidate at-character
// anchored objects due to a change of its anchor character from
- // method <SwTextFrm::Format(..)>.
- if ( pCnt->IsTextFrm() )
+ // method <SwTextFrame::Format(..)>.
+ if ( pCnt->IsTextFrame() )
{
- SwTextFrm* pMasterFrm = pCnt->IsFollow()
- ? static_cast<SwTextFrm*>(pCnt)->FindMaster()
- : static_cast<SwTextFrm*>(pCnt);
- if ( pMasterFrm && !pMasterFrm->IsFlyLock() &&
- pMasterFrm->GetDrawObjs() )
+ SwTextFrame* pMasterFrame = pCnt->IsFollow()
+ ? static_cast<SwTextFrame*>(pCnt)->FindMaster()
+ : static_cast<SwTextFrame*>(pCnt);
+ if ( pMasterFrame && !pMasterFrame->IsFlyLock() &&
+ pMasterFrame->GetDrawObjs() )
{
- SwSortedObjs* pObjs = pMasterFrm->GetDrawObjs();
+ SwSortedObjs* pObjs = pMasterFrame->GetDrawObjs();
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
== FLY_AT_CHAR )
{
- pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrm->IsEmpty() );
+ pAnchoredObj->CheckCharRectAndTopOfLine( !pMasterFrame->IsEmpty() );
}
}
}
@@ -1000,7 +1000,7 @@ SwContentNotify::~SwContentNotify()
}
void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
- SwFrm *pFrm, SwPageFrm *pPage, SwDoc* doc )
+ SwFrame *pFrame, SwPageFrame *pPage, SwDoc* doc )
{
(void) pTable;
#if OSL_DEBUG_LEVEL > 0
@@ -1063,18 +1063,18 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
SwDrawContact* pNew =
static_cast<SwDrawContact*>(GetUserCall( pSdrObj ));
- if ( !pNew->GetAnchorFrm() )
+ if ( !pNew->GetAnchorFrame() )
{
- pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( nullptr )) );
+ pFrame->AppendDrawObj( *(pNew->GetAnchoredObj( nullptr )) );
}
// OD 19.06.2003 #108784# - add 'virtual' drawing object,
// if necessary. But control objects have to be excluded.
else if ( !::CheckControlLayer( pSdrObj ) &&
- pNew->GetAnchorFrm() != pFrm &&
- !pNew->GetDrawObjectByAnchorFrm( *pFrm ) )
+ pNew->GetAnchorFrame() != pFrame &&
+ !pNew->GetDrawObjectByAnchorFrame( *pFrame ) )
{
SwDrawVirtObj* pDrawVirtObj = pNew->AddVirtObj();
- pFrm->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) );
+ pFrame->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) );
pDrawVirtObj->ActionChanged();
}
@@ -1082,13 +1082,13 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
}
else
{
- SwFlyFrm *pFly;
+ SwFlyFrame *pFly;
if( bFlyAtFly )
- pFly = new SwFlyLayFrm( static_cast<SwFlyFrameFormat*>(pFormat), pFrm, pFrm );
+ pFly = new SwFlyLayFrame( static_cast<SwFlyFrameFormat*>(pFormat), pFrame, pFrame );
else
- pFly = new SwFlyAtCntFrm( static_cast<SwFlyFrameFormat*>(pFormat), pFrm, pFrm );
+ pFly = new SwFlyAtContentFrame( static_cast<SwFlyFrameFormat*>(pFormat), pFrame, pFrame );
pFly->Lock();
- pFrm->AppendFly( pFly );
+ pFrame->AppendFly( pFly );
pFly->Unlock();
if ( pPage )
::RegistFlys( pPage, pFly );
@@ -1102,16 +1102,16 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
#endif
}
-static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib )
+static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrame* pSib )
{
if ( RES_FLYFRMFMT == pFormat->Which() )
{
- SwIterator<SwFlyFrm,SwFormat> aIter( *pFormat );
- const SwRootFrm* pRoot = pSib ? pSib->getRootFrm() : nullptr;
- const SwFlyFrm* pTmpFrm;
- for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
+ SwIterator<SwFlyFrame,SwFormat> aIter( *pFormat );
+ const SwRootFrame* pRoot = pSib ? pSib->getRootFrame() : nullptr;
+ const SwFlyFrame* pTmpFrame;
+ for( pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() )
{
- if(! pRoot || pRoot == pTmpFrm->getRootFrm() )
+ if(! pRoot || pRoot == pTmpFrame->getRootFrame() )
return true;
}
}
@@ -1119,7 +1119,7 @@ static bool lcl_ObjConnected( const SwFrameFormat *pFormat, const SwFrm* pSib )
{
SwDrawContact *pContact = SwIterator<SwDrawContact,SwFormat>(*pFormat).First();
if ( pContact )
- return pContact->GetAnchorFrm() != nullptr;
+ return pContact->GetAnchorFrame() != nullptr;
}
return false;
}
@@ -1143,7 +1143,7 @@ static bool lcl_InHeaderOrFooter( const SwFrameFormat& _rFormat )
return bRetVal;
}
-void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib )
+void AppendAllObjs( const SwFrameFormats *pTable, const SwFrame* pSib )
{
//Connecting of all Objects, which are described in the SpzTable with the
//layout.
@@ -1183,10 +1183,10 @@ void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib )
// OD 23.06.2003 #108784# - correction: for objects in header
// or footer create frames, in spite of the fact that an connected
// objects already exists.
- //Call for Flys and DrawObjs only a MakeFrms if nor
+ //Call for Flys and DrawObjs only a MakeFrames if nor
//no dependent exists, otherwise, or if the MakeDrms creates no
//dependents, remove.
- pFormat->MakeFrms();
+ pFormat->MakeFrames();
bRemove = ::lcl_ObjConnected( pFormat, pSib );
}
}
@@ -1206,25 +1206,25 @@ void AppendAllObjs( const SwFrameFormats *pTable, const SwFrm* pSib )
OD 12.08.2003 #i17969#
*/
-static void lcl_SetPos( SwFrm& _rNewFrm,
- const SwLayoutFrm& _rLayFrm )
+static void lcl_SetPos( SwFrame& _rNewFrame,
+ const SwLayoutFrame& _rLayFrame )
{
- SWRECTFN( (&_rLayFrm) )
- (_rNewFrm.Frm().*fnRect->fnSetPos)( (_rLayFrm.Frm().*fnRect->fnGetPos)() );
+ SWRECTFN( (&_rLayFrame) )
+ (_rNewFrame.Frame().*fnRect->fnSetPos)( (_rLayFrame.Frame().*fnRect->fnGetPos)() );
// move position by one SwTwip in text flow direction in order to get
// notifications for a new calculated position after its formatting.
if ( bVert )
- _rNewFrm.Frm().Pos().X() -= 1;
+ _rNewFrame.Frame().Pos().X() -= 1;
else
- _rNewFrm.Frm().Pos().Y() += 1;
+ _rNewFrame.Frame().Pos().Y() += 1;
}
-void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
+void _InsertCnt( SwLayoutFrame *pLay, SwDoc *pDoc,
sal_uLong nIndex, bool bPages, sal_uLong nEndIndex,
- SwFrm *pPrv )
+ SwFrame *pPrv )
{
pDoc->getIDocumentTimerAccess().BlockIdling();
- SwRootFrm* pLayout = pLay->getRootFrm();
+ SwRootFrame* pLayout = pLay->getRootFrame();
const bool bOldCallbackActionEnabled = pLayout && pLayout->IsCallbackActionEnabled();
if( bOldCallbackActionEnabled )
pLayout->SetCallbackActionEnabled( false );
@@ -1245,9 +1245,9 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//number of pages.
const bool bStartPercent = bPages && !nEndIndex;
- SwPageFrm *pPage = pLay->FindPageFrm();
+ SwPageFrame *pPage = pLay->FindPageFrame();
const SwFrameFormats *pTable = pDoc->GetSpzFrameFormats();
- SwFrm *pFrm = nullptr;
+ SwFrame *pFrame = nullptr;
SwActualSection *pActualSection = nullptr;
SwLayHelper *pPageMaker;
@@ -1259,7 +1259,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
// Attention: the SwLayHelper class uses references to the content-,
// page-, layout-frame etc. and may change them!
bool bBreakAfter = false;
- pPageMaker = new SwLayHelper( pDoc, pFrm, pPrv, pPage, pLay,
+ pPageMaker = new SwLayHelper( pDoc, pFrame, pPrv, pPage, pLay,
pActualSection, bBreakAfter, nIndex, 0 == nEndIndex );
if( bStartPercent )
{
@@ -1272,11 +1272,11 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pPageMaker = nullptr;
if( pLay->IsInSct() &&
- ( pLay->IsSctFrm() || pLay->GetUpper() ) ) // Hereby will newbies
+ ( pLay->IsSctFrame() || pLay->GetUpper() ) ) // Hereby will newbies
// be intercepted, of which flags could not determined yet,
// for e.g. while inserting a table
{
- SwSectionFrm* pSct = pLay->FindSctFrm();
+ SwSectionFrame* pSct = pLay->FindSctFrame();
// If content will be inserted in a footnote, which in an column area,
// the column area it is not allowed to be broken up.
// Only if in the inner of the footnote lies an area, is this a candidate
@@ -1288,7 +1288,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
( !pLay->IsInTab() || pSct->IsInTab() ) )
{
pActualSection = new SwActualSection( nullptr, pSct, nullptr );
- OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrm(),
+ OSL_ENSURE( !pLay->Lower() || !pLay->Lower()->IsColumnFrame(),
"_InsertCnt: Wrong Call" );
}
}
@@ -1305,43 +1305,43 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if ( pNd->IsContentNode() )
{
SwContentNode* pNode = static_cast<SwContentNode*>(pNd);
- pFrm = pNode->MakeFrm(pLay);
+ pFrame = pNode->MakeFrame(pLay);
if( pPageMaker )
pPageMaker->CheckInsert( nIndex );
- pFrm->InsertBehind( pLay, pPrv );
+ pFrame->InsertBehind( pLay, pPrv );
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
- if ( pFrm->IsTextFrm() )
+ if ( pFrame->IsTextFrame() )
{
- SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
+ SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
// no notification, if <SwViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )),
- dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) );
+ dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )),
+ dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) );
// #i68958#
// The information flags of the text frame are validated
// in methods <FindNextCnt(..)> and <FindPrevCnt(..)>.
// The information flags have to be invalidated, because
// it is possible, that the one of its upper frames
// isn't inserted into the layout.
- pFrm->InvalidateInfFlags();
+ pFrame->InvalidateInfFlags();
}
}
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
- lcl_SetPos( *pFrm, *pLay );
- pPrv = pFrm;
+ lcl_SetPos( *pFrame, *pLay );
+ pPrv = pFrame;
if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects )
- AppendObjs( pTable, nIndex, pFrm, pPage, pDoc );
+ AppendObjs( pTable, nIndex, pFrame, pPage, pDoc );
}
else if ( pNd->IsTableNode() )
{ //Should we have encountered a table?
@@ -1355,44 +1355,44 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pDoc->getIDocumentFieldsAccess().UpdateTableFields( &aMsgHint );
pTableNode->GetTable().GCLines();
- pFrm = pTableNode->MakeFrm( pLay );
+ pFrame = pTableNode->MakeFrame( pLay );
if( pPageMaker )
pPageMaker->CheckInsert( nIndex );
- pFrm->InsertBehind( pLay, pPrv );
+ pFrame->InsertBehind( pLay, pPrv );
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
{
- SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
+ SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
// no notification, if <SwViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )),
- dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) );
+ dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )),
+ dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) );
}
}
if ( bObjsDirect && !pTable->empty() )
- static_cast<SwTabFrm*>(pFrm)->RegistFlys();
+ static_cast<SwTabFrame*>(pFrame)->RegistFlys();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
- lcl_SetPos( *pFrm, *pLay );
+ lcl_SetPos( *pFrame, *pLay );
- pPrv = pFrm;
+ pPrv = pFrame;
//Set the index to the endnode of the table section.
nIndex = pTableNode->EndOfSectionIndex();
- SwTabFrm* pTmpFrm = static_cast<SwTabFrm*>(pFrm);
- while ( pTmpFrm )
+ SwTabFrame* pTmpFrame = static_cast<SwTabFrame*>(pFrame);
+ while ( pTmpFrame )
{
- pTmpFrm->CheckDirChange();
- pTmpFrm = pTmpFrm->IsFollow() ? pTmpFrm->FindMaster() : nullptr;
+ pTmpFrame->CheckDirChange();
+ pTmpFrame = pTmpFrame->IsFollow() ? pTmpFrame->FindMaster() : nullptr;
}
}
@@ -1404,36 +1404,36 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
nIndex = pNode->EndOfSectionIndex();
else
{
- pFrm = pNode->MakeFrm( pLay );
+ pFrame = pNode->MakeFrame( pLay );
pActualSection = new SwActualSection( pActualSection,
- static_cast<SwSectionFrm*>(pFrm), pNode );
+ static_cast<SwSectionFrame*>(pFrame), pNode );
if ( pActualSection->GetUpper() )
{
//Insert behind the Upper, the "Follow" of the Upper will be
//generated at the EndNode.
- SwSectionFrm *pTmp = pActualSection->GetUpper()->GetSectionFrm();
- pFrm->InsertBehind( pTmp->GetUpper(), pTmp );
+ SwSectionFrame *pTmp = pActualSection->GetUpper()->GetSectionFrame();
+ pFrame->InsertBehind( pTmp->GetUpper(), pTmp );
// OD 25.03.2003 #108339# - direct initialization of section
// after insertion in the layout
- static_cast<SwSectionFrm*>(pFrm)->Init();
+ static_cast<SwSectionFrame*>(pFrame)->Init();
}
else
{
- pFrm->InsertBehind( pLay, pPrv );
+ pFrame->InsertBehind( pLay, pPrv );
// OD 25.03.2003 #108339# - direct initialization of section
// after insertion in the layout
- static_cast<SwSectionFrm*>(pFrm)->Init();
+ static_cast<SwSectionFrame*>(pFrame)->Init();
// #i33963#
// Do not trust the IsInFootnote flag. If we are currently
// building up a table, the upper of pPrv may be a cell
// frame, but the cell frame does not have an upper yet.
- if( pPrv && nullptr != pPrv->ImplFindFootnoteFrm() )
+ if( pPrv && nullptr != pPrv->ImplFindFootnoteFrame() )
{
- if( pPrv->IsSctFrm() )
- pPrv = static_cast<SwSectionFrm*>(pPrv)->ContainsContent();
- if( pPrv && pPrv->IsTextFrm() )
- static_cast<SwTextFrm*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false );
+ if( pPrv->IsSctFrame() )
+ pPrv = static_cast<SwSectionFrame*>(pPrv)->ContainsContent();
+ if( pPrv && pPrv->IsTextFrame() )
+ static_cast<SwTextFrame*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false );
}
}
// #i27138#
@@ -1442,22 +1442,22 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
// Relation CONTENT_FLOWS_FROM for next paragraph will change
// and relation CONTENT_FLOWS_TO for previous paragraph will change.
{
- SwViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
+ SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
// no notification, if <SwViewShell> is in construction
if ( pViewShell && !pViewShell->IsInConstructor() &&
pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTextFrm*>(pFrm->FindNextCnt( true )),
- dynamic_cast<SwTextFrm*>(pFrm->FindPrevCnt( true )) );
+ dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt( true )),
+ dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt( true )) );
}
}
- pFrm->CheckDirChange();
+ pFrame->CheckDirChange();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
- lcl_SetPos( *pFrm, *pLay );
+ lcl_SetPos( *pFrame, *pLay );
// OD 20.11.2002 #105405# - no page, no invalidate.
if ( pPage )
@@ -1465,11 +1465,11 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
// OD 18.09.2002 #100522#
// invalidate page in order to force format and paint of
// inserted section frame
- pFrm->InvalidatePage( pPage );
+ pFrame->InvalidatePage( pPage );
// FME 10.11.2003 #112243#
// Invalidate fly content flag:
- if ( pFrm->IsInFly() )
+ if ( pFrame->IsInFly() )
pPage->InvalidateFlyContent();
// OD 14.11.2002 #104684# - invalidate page content in order to
@@ -1477,8 +1477,8 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pPage->InvalidateContent();
}
- pLay = static_cast<SwLayoutFrm*>(pFrm);
- if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
+ pLay = static_cast<SwLayoutFrame*>(pFrame);
+ if ( pLay->Lower() && pLay->Lower()->IsLayoutFrame() )
pLay = pLay->GetNextLayoutLeaf();
pPrv = nullptr;
}
@@ -1493,18 +1493,18 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
//section again.
SwActualSection *pTmp = pActualSection ? pActualSection->GetUpper() : nullptr;
delete pActualSection;
- pLay = pLay->FindSctFrm();
+ pLay = pLay->FindSctFrame();
if ( nullptr != (pActualSection = pTmp) )
{
- //Could be, that the last SectionFrm remains empty.
+ //Could be, that the last SectionFrame remains empty.
//Then now is the time to remove them.
if ( !pLay->ContainsContent() )
{
- SwFrm *pTmpFrm = pLay;
- pLay = pTmpFrm->GetUpper();
- pPrv = pTmpFrm->GetPrev();
- pTmpFrm->RemoveFromLayout();
- SwFrm::DestroyFrm(pTmpFrm);
+ SwFrame *pTmpFrame = pLay;
+ pLay = pTmpFrame->GetUpper();
+ pPrv = pTmpFrame->GetPrev();
+ pTmpFrame->RemoveFromLayout();
+ SwFrame::DestroyFrame(pTmpFrame);
}
else
{
@@ -1513,36 +1513,36 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
}
// new section frame
- pFrm = pActualSection->GetSectionNode()->MakeFrm( pLay );
- pFrm->InsertBehind( pLay, pPrv );
- static_cast<SwSectionFrm*>(pFrm)->Init();
+ pFrame = pActualSection->GetSectionNode()->MakeFrame( pLay );
+ pFrame->InsertBehind( pLay, pPrv );
+ static_cast<SwSectionFrame*>(pFrame)->Init();
// OD 12.08.2003 #i17969# - consider horizontal/vertical layout
// for setting position at newly inserted frame
- lcl_SetPos( *pFrm, *pLay );
+ lcl_SetPos( *pFrame, *pLay );
- SwSectionFrm* pOuterSectionFrm = pActualSection->GetSectionFrm();
+ SwSectionFrame* pOuterSectionFrame = pActualSection->GetSectionFrame();
// a follow has to be appended to the new section frame
- SwSectionFrm* pFollow = pOuterSectionFrm->GetFollow();
+ SwSectionFrame* pFollow = pOuterSectionFrame->GetFollow();
if ( pFollow )
{
- pOuterSectionFrm->SetFollow( nullptr );
- pOuterSectionFrm->InvalidateSize();
- static_cast<SwSectionFrm*>(pFrm)->SetFollow( pFollow );
+ pOuterSectionFrame->SetFollow( nullptr );
+ pOuterSectionFrame->InvalidateSize();
+ static_cast<SwSectionFrame*>(pFrame)->SetFollow( pFollow );
}
// We don't want to leave empty parts back.
- if( ! pOuterSectionFrm->IsColLocked() &&
- ! pOuterSectionFrm->ContainsContent() )
+ if( ! pOuterSectionFrame->IsColLocked() &&
+ ! pOuterSectionFrame->ContainsContent() )
{
- pOuterSectionFrm->DelEmpty( true );
- SwFrm::DestroyFrm(pOuterSectionFrm);
+ pOuterSectionFrame->DelEmpty( true );
+ SwFrame::DestroyFrame(pOuterSectionFrame);
}
- pActualSection->SetSectionFrm( static_cast<SwSectionFrm*>(pFrm) );
+ pActualSection->SetSectionFrame( static_cast<SwSectionFrame*>(pFrame) );
- pLay = static_cast<SwLayoutFrm*>(pFrm);
- if ( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
+ pLay = static_cast<SwLayoutFrame*>(pFrame);
+ if ( pLay->Lower() && pLay->Lower()->IsLayoutFrame() )
pLay = pLay->GetNextLayoutLeaf();
pPrv = nullptr;
}
@@ -1559,7 +1559,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
{
if ( !pTable->empty() && bObjsDirect && !bDontCreateObjects )
{
- SwFlyFrm* pFly = pLay->FindFlyFrm();
+ SwFlyFrame* pFly = pLay->FindFlyFrame();
if( pFly )
AppendObjs( pTable, nIndex, pFly, pPage, pDoc );
}
@@ -1570,7 +1570,7 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
break;
++nIndex;
- // Do not consider the end node. The caller (section/MakeFrms()) has to ensure that the end
+ // Do not consider the end node. The caller (section/MakeFrames()) has to ensure that the end
// of this area is positioned before EndIndex!
if ( nEndIndex && nIndex >= nEndIndex )
break;
@@ -1579,10 +1579,10 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
if ( pActualSection )
{
// Might happen that an empty (Follow-)Section is left over.
- if ( !(pLay = pActualSection->GetSectionFrm())->ContainsContent() )
+ if ( !(pLay = pActualSection->GetSectionFrame())->ContainsContent() )
{
pLay->RemoveFromLayout();
- SwFrm::DestroyFrm(pLay);
+ SwFrame::DestroyFrame(pLay);
}
delete pActualSection;
}
@@ -1612,105 +1612,105 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc,
pLayout->SetCallbackActionEnabled( bOldCallbackActionEnabled );
}
-void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
+void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
const SwNodeIndex &rEndIdx )
{
bObjsDirect = false;
SwNodeIndex aTmp( rSttIdx );
sal_uLong nEndIdx = rEndIdx.GetIndex();
- SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrmNode( aTmp,
+ SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrameNode( aTmp,
pDoc->GetNodes()[ nEndIdx-1 ]);
if ( pNd )
{
bool bApres = aTmp < rSttIdx;
SwNode2Layout aNode2Layout( *pNd, rSttIdx.GetIndex() );
- SwFrm* pFrm;
- while( nullptr != (pFrm = aNode2Layout.NextFrm()) )
+ SwFrame* pFrame;
+ while( nullptr != (pFrame = aNode2Layout.NextFrame()) )
{
- SwLayoutFrm *pUpper = pFrm->GetUpper();
- SwFootnoteFrm* pFootnoteFrm = pUpper->FindFootnoteFrm();
+ SwLayoutFrame *pUpper = pFrame->GetUpper();
+ SwFootnoteFrame* pFootnoteFrame = pUpper->FindFootnoteFrame();
bool bOldLock, bOldFootnote;
- if( pFootnoteFrm )
+ if( pFootnoteFrame )
{
- bOldFootnote = pFootnoteFrm->IsColLocked();
- pFootnoteFrm->ColLock();
+ bOldFootnote = pFootnoteFrame->IsColLocked();
+ pFootnoteFrame->ColLock();
}
else
bOldFootnote = true;
- SwSectionFrm* pSct = pUpper->FindSctFrm();
+ SwSectionFrame* pSct = pUpper->FindSctFrame();
// Inside of footnotes only those areas are interesting that are inside of them. But
// not the ones (e.g. column areas) in which are the footnote containers positioned.
// #109767# Table frame is in section, insert section in cell frame.
- if( pSct && ((pFootnoteFrm && !pSct->IsInFootnote()) || pUpper->IsCellFrm()) )
+ if( pSct && ((pFootnoteFrame && !pSct->IsInFootnote()) || pUpper->IsCellFrame()) )
pSct = nullptr;
if( pSct )
- { // to prevent pTmp->MoveFwd from destroying the SectionFrm
+ { // to prevent pTmp->MoveFwd from destroying the SectionFrame
bOldLock = pSct->IsColLocked();
pSct->ColLock();
}
else
bOldLock = true;
- // If pFrm cannot be moved, it is not possible to move it to the next page. This applies
- // also for frames (in the first column of a frame pFrm is moveable) and column
- // sections of tables (also here pFrm is moveable).
+ // If pFrame cannot be moved, it is not possible to move it to the next page. This applies
+ // also for frames (in the first column of a frame pFrame is moveable) and column
+ // sections of tables (also here pFrame is moveable).
bool bMoveNext = nEndIdx - rSttIdx.GetIndex() > 120;
- bool bAllowMove = !pFrm->IsInFly() && pFrm->IsMoveable() &&
- (!pFrm->IsInTab() || pFrm->IsTabFrm() );
+ bool bAllowMove = !pFrame->IsInFly() && pFrame->IsMoveable() &&
+ (!pFrame->IsInTab() || pFrame->IsTabFrame() );
if ( bMoveNext && bAllowMove )
{
- SwFrm *pMove = pFrm;
- SwFrm *pPrev = pFrm->GetPrev();
- SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pMove );
- OSL_ENSURE( pTmp, "Missing FlowFrm" );
+ SwFrame *pMove = pFrame;
+ SwFrame *pPrev = pFrame->GetPrev();
+ SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pMove );
+ OSL_ENSURE( pTmp, "Missing FlowFrame" );
if ( bApres )
{
// The rest of this page should be empty. Thus, the following one has to move to
// the next page (it might also be located in the following column).
OSL_ENSURE( !pTmp->HasFollow(), "Follows forbidden" );
- pPrev = pFrm;
- // If the surrounding SectionFrm has a "next" one,
+ pPrev = pFrame;
+ // If the surrounding SectionFrame has a "next" one,
// so this one needs to be moved as well.
- pMove = pFrm->GetIndNext();
- SwColumnFrm* pCol = static_cast<SwColumnFrm*>(pFrm->FindColFrm());
+ pMove = pFrame->GetIndNext();
+ SwColumnFrame* pCol = static_cast<SwColumnFrame*>(pFrame->FindColFrame());
if( pCol )
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
do
{
if( pCol && !pMove )
{ // No successor so far, look into the next column
pMove = pCol->ContainsAny();
if( pCol->GetNext() )
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
else if( pCol->IsInSct() )
{ // If there is no following column but we are in a column frame,
// there might be (page) columns outside of it.
- pCol = static_cast<SwColumnFrm*>(pCol->FindSctFrm()->FindColFrm());
+ pCol = static_cast<SwColumnFrame*>(pCol->FindSctFrame()->FindColFrame());
if( pCol )
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
}
else
pCol = nullptr;
}
- // skip invalid SectionFrms
- while( pMove && pMove->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pMove)->GetSection() )
+ // skip invalid SectionFrames
+ while( pMove && pMove->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pMove)->GetSection() )
pMove = pMove->GetNext();
} while( !pMove && pCol );
if( pMove )
{
- if ( pMove->IsContentFrm() )
- pTmp = static_cast<SwContentFrm*>(pMove);
- else if ( pMove->IsTabFrm() )
- pTmp = static_cast<SwTabFrm*>(pMove);
- else if ( pMove->IsSctFrm() )
+ if ( pMove->IsContentFrame() )
+ pTmp = static_cast<SwContentFrame*>(pMove);
+ else if ( pMove->IsTabFrame() )
+ pTmp = static_cast<SwTabFrame*>(pMove);
+ else if ( pMove->IsSctFrame() )
{
- pMove = static_cast<SwSectionFrm*>(pMove)->ContainsAny();
+ pMove = static_cast<SwSectionFrame*>(pMove)->ContainsAny();
if( pMove )
- pTmp = SwFlowFrm::CastFlowFrm( pMove );
+ pTmp = SwFlowFrame::CastFlowFrame( pMove );
else
pTmp = nullptr;
}
@@ -1722,15 +1722,15 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
{
OSL_ENSURE( !pTmp->IsFollow(), "Follows really forbidden" );
// move the _content_ of a section frame
- if( pMove->IsSctFrm() )
+ if( pMove->IsSctFrame() )
{
- while( pMove && pMove->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pMove)->GetSection() )
+ while( pMove && pMove->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pMove)->GetSection() )
pMove = pMove->GetNext();
- if( pMove && pMove->IsSctFrm() )
- pMove = static_cast<SwSectionFrm*>(pMove)->ContainsAny();
+ if( pMove && pMove->IsSctFrame() )
+ pMove = static_cast<SwSectionFrame*>(pMove)->ContainsAny();
if( pMove )
- pTmp = SwFlowFrm::CastFlowFrm( pMove );
+ pTmp = SwFlowFrame::CastFlowFrame( pMove );
else
pTmp = nullptr;
}
@@ -1738,31 +1738,31 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( pTmp )
{
- SwFrm* pOldUp = pTmp->GetFrm().GetUpper();
+ SwFrame* pOldUp = pTmp->GetFrame().GetUpper();
// MoveFwd==true means that we are still on the same page.
// But since we want to move if possible!
bool bTmpOldLock = pTmp->IsJoinLocked();
pTmp->LockJoin();
while( pTmp->MoveFwd( true, false, true ) )
{
- if( pOldUp == pTmp->GetFrm().GetUpper() )
+ if( pOldUp == pTmp->GetFrame().GetUpper() )
break;
- pOldUp = pTmp->GetFrm().GetUpper();
+ pOldUp = pTmp->GetFrame().GetUpper();
}
if( !bTmpOldLock )
pTmp->UnlockJoin();
}
::_InsertCnt( pUpper, pDoc, rSttIdx.GetIndex(),
- pFrm->IsInDocBody(), nEndIdx, pPrev );
+ pFrame->IsInDocBody(), nEndIdx, pPrev );
}
else
{
bool bSplit;
- SwFrm* pPrv = bApres ? pFrm : pFrm->GetPrev();
+ SwFrame* pPrv = bApres ? pFrame : pFrame->GetPrev();
// If the section frame is inserted into another one, it must be split.
if( pSct && rSttIdx.GetNode().IsSectionNode() )
{
- bSplit = pSct->SplitSect( pFrm, bApres );
+ bSplit = pSct->SplitSect( pFrame, bApres );
if( !bSplit && !bApres )
{
pUpper = pSct->GetUpper();
@@ -1785,18 +1785,18 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
// If nothing was added (e.g. a hidden section), the split must be reversed.
if( bSplit && pSct && pSct->GetNext()
- && pSct->GetNext()->IsSctFrm() )
- pSct->MergeNext( static_cast<SwSectionFrm*>(pSct->GetNext()) );
- if( pFrm->IsInFly() )
- pFrm->FindFlyFrm()->_Invalidate();
- if( pFrm->IsInTab() )
- pFrm->InvalidateSize();
+ && pSct->GetNext()->IsSctFrame() )
+ pSct->MergeNext( static_cast<SwSectionFrame*>(pSct->GetNext()) );
+ if( pFrame->IsInFly() )
+ pFrame->FindFlyFrame()->_Invalidate();
+ if( pFrame->IsInTab() )
+ pFrame->InvalidateSize();
}
- SwPageFrm *pPage = pUpper->FindPageFrm();
- SwFrm::CheckPageDescs( pPage, false );
+ SwPageFrame *pPage = pUpper->FindPageFrame();
+ SwFrame::CheckPageDescs( pPage, false );
if( !bOldFootnote )
- pFootnoteFrm->ColUnlock();
+ pFootnoteFrame->ColUnlock();
if( !bOldLock )
{
pSct->ColUnlock();
@@ -1805,8 +1805,8 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
if( !pSct->ContainsContent() )
{
pSct->DelEmpty( true );
- pUpper->getRootFrm()->RemoveFromList( pSct );
- SwFrm::DestroyFrm(pSct);
+ pUpper->getRootFrame()->RemoveFromList( pSct );
+ SwFrame::DestroyFrame(pSct);
}
}
}
@@ -1815,18 +1815,18 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
bObjsDirect = true;
}
-SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor)
+SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor)
: SwCacheObj(pMod)
- , m_rAttrSet(pConstructor->IsContentFrm()
- ? static_cast<const SwContentFrm*>(pConstructor)->GetNode()->GetSwAttrSet()
- : static_cast<const SwLayoutFrm*>(pConstructor)->GetFormat()->GetAttrSet())
+ , m_rAttrSet(pConstructor->IsContentFrame()
+ ? static_cast<const SwContentFrame*>(pConstructor)->GetNode()->GetSwAttrSet()
+ : static_cast<const SwLayoutFrame*>(pConstructor)->GetFormat()->GetAttrSet())
, m_rUL(m_rAttrSet.GetULSpace())
// #i96772#
// LRSpaceItem is copied due to the possibility that it is adjusted - see below
, m_rLR(m_rAttrSet.GetLRSpace())
, m_rBox(m_rAttrSet.GetBox())
, m_rShadow(m_rAttrSet.GetShadow())
- , m_aFrameSize(m_rAttrSet.GetFrmSize().GetSize())
+ , m_aFrameSize(m_rAttrSet.GetFrameSize().GetSize())
, m_bIsLine(false)
, m_bJoinedWithPrev(false)
, m_bJoinedWithNext(false)
@@ -1840,12 +1840,12 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrm *pConstructor)
, m_nGetBottomLine(0)
{
// #i96772#
- const SwTextFrm* pTextFrm = dynamic_cast<const SwTextFrm*>(pConstructor);
- if ( pTextFrm )
+ const SwTextFrame* pTextFrame = dynamic_cast<const SwTextFrame*>(pConstructor);
+ if ( pTextFrame )
{
- pTextFrm->GetTextNode()->ClearLRSpaceItemDueToListLevelIndents( m_rLR );
+ pTextFrame->GetTextNode()->ClearLRSpaceItemDueToListLevelIndents( m_rLR );
}
- else if ( pConstructor->IsNoTextFrm() )
+ else if ( pConstructor->IsNoTextFrame() )
{
m_rLR = SvxLRSpaceItem ( RES_LR_SPACE );
}
@@ -1887,47 +1887,47 @@ void SwBorderAttrs::_CalcBottom()
m_bBottom = false;
}
-long SwBorderAttrs::CalcRight( const SwFrm* pCaller ) const
+long SwBorderAttrs::CalcRight( const SwFrame* pCaller ) const
{
long nRight=0;
- if (!pCaller->IsTextFrm() || !static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) {
+ if (!pCaller->IsTextFrame() || !static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
- if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
+ if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() )
nRight = CalcLeftLine();
else
nRight = CalcRightLine();
}
// for paragraphs, "left" is "before text" and "right" is "after text"
- if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() )
+ if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() )
nRight += m_rLR.GetLeft();
else
nRight += m_rLR.GetRight();
// correction: retrieve left margin for numbering in R2L-layout
- if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() )
+ if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() )
{
- nRight += static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetLeftMarginWithNum();
+ nRight += static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetLeftMarginWithNum();
}
return nRight;
}
/// Tries to detect if this paragraph has a floating table attached.
-static bool lcl_hasTabFrm(const SwTextFrm* pTextFrm)
+static bool lcl_hasTabFrame(const SwTextFrame* pTextFrame)
{
- if (pTextFrm->GetDrawObjs())
+ if (pTextFrame->GetDrawObjs())
{
- const SwSortedObjs* pSortedObjs = pTextFrm->GetDrawObjs();
+ const SwSortedObjs* pSortedObjs = pTextFrame->GetDrawObjs();
if (pSortedObjs->size() > 0)
{
SwAnchoredObject* pObject = (*pSortedObjs)[0];
- if (dynamic_cast<const SwFlyFrm*>(pObject) != nullptr)
+ if (dynamic_cast<const SwFlyFrame*>(pObject) != nullptr)
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObject);
- if (pFly->Lower() && pFly->Lower()->IsTabFrm())
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObject);
+ if (pFly->Lower() && pFly->Lower()->IsTabFrame())
return true;
}
}
@@ -1935,35 +1935,35 @@ static bool lcl_hasTabFrm(const SwTextFrm* pTextFrm)
return false;
}
-long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
+long SwBorderAttrs::CalcLeft( const SwFrame *pCaller ) const
{
long nLeft=0;
- if (!pCaller->IsTextFrm() || !static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) {
+ if (!pCaller->IsTextFrame() || !static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::INVERT_BORDER_SPACING)) {
// OD 23.01.2003 #106895# - for cell frame in R2L text direction the left
// and right border are painted on the right respectively left.
- if ( pCaller->IsCellFrm() && pCaller->IsRightToLeft() )
+ if ( pCaller->IsCellFrame() && pCaller->IsRightToLeft() )
nLeft = CalcRightLine();
else
nLeft = CalcLeftLine();
}
// for paragraphs, "left" is "before text" and "right" is "after text"
- if ( pCaller->IsTextFrm() && pCaller->IsRightToLeft() )
+ if ( pCaller->IsTextFrame() && pCaller->IsRightToLeft() )
nLeft += m_rLR.GetRight();
else
{
bool bIgnoreMargin = false;
- if (pCaller->IsTextFrm())
+ if (pCaller->IsTextFrame())
{
- const SwTextFrm* pTextFrm = static_cast<const SwTextFrm*>(pCaller);
- if (pTextFrm->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::FLOATTABLE_NOMARGINS))
+ const SwTextFrame* pTextFrame = static_cast<const SwTextFrame*>(pCaller);
+ if (pTextFrame->GetTextNode()->GetDoc()->GetDocumentSettingManager().get(DocumentSettingId::FLOATTABLE_NOMARGINS))
{
// If this is explicitly requested, ignore the margins next to the floating table.
- if (lcl_hasTabFrm(pTextFrm))
+ if (lcl_hasTabFrame(pTextFrame))
bIgnoreMargin = true;
// TODO here we only handle the first two paragraphs, would be nice to generalize this.
- else if (pTextFrm->FindPrev() && pTextFrm->FindPrev()->IsTextFrm() && lcl_hasTabFrm(static_cast<const SwTextFrm*>(pTextFrm->FindPrev())))
+ else if (pTextFrame->FindPrev() && pTextFrame->FindPrev()->IsTextFrame() && lcl_hasTabFrame(static_cast<const SwTextFrame*>(pTextFrame->FindPrev())))
bIgnoreMargin = true;
}
}
@@ -1972,9 +1972,9 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const
}
// correction: do not retrieve left margin for numbering in R2L-layout
- if ( pCaller->IsTextFrm() && !pCaller->IsRightToLeft() )
+ if ( pCaller->IsTextFrame() && !pCaller->IsRightToLeft() )
{
- nLeft += static_cast<const SwTextFrm*>(pCaller)->GetTextNode()->GetLeftMarginWithNum();
+ nLeft += static_cast<const SwTextFrame*>(pCaller)->GetTextNode()->GetLeftMarginWithNum();
}
return nLeft;
@@ -2048,8 +2048,8 @@ inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorde
// instead of only the right LR-spacing, because R2L-layout has to be
// considered.
bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
- const SwFrm *pCaller,
- const SwFrm *pCmp ) const
+ const SwFrame *pCaller,
+ const SwFrame *pCmp ) const
{
return ( CmpLines( rCmpAttrs.GetBox().GetLeft(), GetBox().GetLeft() ) &&
CmpLines( rCmpAttrs.GetBox().GetRight(),GetBox().GetRight() ) &&
@@ -2058,17 +2058,17 @@ bool SwBorderAttrs::CmpLeftRight( const SwBorderAttrs &rCmpAttrs,
CalcRight( pCaller ) == rCmpAttrs.CalcRight( pCmp ) );
}
-bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
- const SwFrm& _rCmpFrm ) const
+bool SwBorderAttrs::_JoinWithCmp( const SwFrame& _rCallerFrame,
+ const SwFrame& _rCmpFrame ) const
{
bool bReturnVal = false;
- SwBorderAttrAccess aCmpAccess( SwFrm::GetCache(), &_rCmpFrm );
+ SwBorderAttrAccess aCmpAccess( SwFrame::GetCache(), &_rCmpFrame );
const SwBorderAttrs &rCmpAttrs = *aCmpAccess.Get();
if ( m_rShadow == rCmpAttrs.GetShadow() &&
CmpLines( m_rBox.GetTop(), rCmpAttrs.GetBox().GetTop() ) &&
CmpLines( m_rBox.GetBottom(), rCmpAttrs.GetBox().GetBottom() ) &&
- CmpLeftRight( rCmpAttrs, &_rCallerFrm, &_rCmpFrm )
+ CmpLeftRight( rCmpAttrs, &_rCallerFrame, &_rCmpFrame )
)
{
bReturnVal = true;
@@ -2079,63 +2079,63 @@ bool SwBorderAttrs::_JoinWithCmp( const SwFrm& _rCallerFrm,
// OD 21.05.2003 #108789# - method to determine, if borders are joined with
// previous frame. Calculated value saved in cached value <m_bJoinedWithPrev>
-// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>
-void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm )
+// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrame>
+void SwBorderAttrs::_CalcJoinedWithPrev( const SwFrame& _rFrame,
+ const SwFrame* _pPrevFrame )
{
// set default
m_bJoinedWithPrev = false;
- if ( _rFrm.IsTextFrm() )
+ if ( _rFrame.IsTextFrame() )
{
// text frame can potentially join with previous text frame, if
// corresponding attribute set is set at previous text frame.
- // OD 2004-02-26 #i25029# - If parameter <_pPrevFrm> is set, take this
+ // OD 2004-02-26 #i25029# - If parameter <_pPrevFrame> is set, take this
// one as previous frame.
- const SwFrm* pPrevFrm = _pPrevFrm ? _pPrevFrm : _rFrm.GetPrev();
+ const SwFrame* pPrevFrame = _pPrevFrame ? _pPrevFrame : _rFrame.GetPrev();
// OD 2004-02-13 #i25029# - skip hidden text frames.
- while ( pPrevFrm && pPrevFrm->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pPrevFrm)->IsHiddenNow() )
+ while ( pPrevFrame && pPrevFrame->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() )
{
- pPrevFrm = pPrevFrm->GetPrev();
+ pPrevFrame = pPrevFrame->GetPrev();
}
- if ( pPrevFrm && pPrevFrm->IsTextFrm() &&
- pPrevFrm->GetAttrSet()->GetParaConnectBorder().GetValue()
+ if ( pPrevFrame && pPrevFrame->IsTextFrame() &&
+ pPrevFrame->GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
- m_bJoinedWithPrev = _JoinWithCmp( _rFrm, *(pPrevFrm) );
+ m_bJoinedWithPrev = _JoinWithCmp( _rFrame, *(pPrevFrame) );
}
}
// valid cache status, if demanded
- // OD 2004-02-26 #i25029# - Do not validate cache, if parameter <_pPrevFrm>
+ // OD 2004-02-26 #i25029# - Do not validate cache, if parameter <_pPrevFrame>
// is set.
- m_bCachedJoinedWithPrev = m_bCacheGetLine && !_pPrevFrm;
+ m_bCachedJoinedWithPrev = m_bCacheGetLine && !_pPrevFrame;
}
// OD 21.05.2003 #108789# - method to determine, if borders are joined with
// next frame. Calculated value saved in cached value <m_bJoinedWithNext>
-void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
+void SwBorderAttrs::_CalcJoinedWithNext( const SwFrame& _rFrame )
{
// set default
m_bJoinedWithNext = false;
- if ( _rFrm.IsTextFrm() )
+ if ( _rFrame.IsTextFrame() )
{
// text frame can potentially join with next text frame, if
// corresponding attribute set is set at current text frame.
// OD 2004-02-13 #i25029# - get next frame, but skip hidden text frames.
- const SwFrm* pNextFrm = _rFrm.GetNext();
- while ( pNextFrm && pNextFrm->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pNextFrm)->IsHiddenNow() )
+ const SwFrame* pNextFrame = _rFrame.GetNext();
+ while ( pNextFrame && pNextFrame->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pNextFrame)->IsHiddenNow() )
{
- pNextFrm = pNextFrm->GetNext();
+ pNextFrame = pNextFrame->GetNext();
}
- if ( pNextFrm && pNextFrm->IsTextFrm() &&
- _rFrm.GetAttrSet()->GetParaConnectBorder().GetValue()
+ if ( pNextFrame && pNextFrame->IsTextFrame() &&
+ _rFrame.GetAttrSet()->GetParaConnectBorder().GetValue()
)
{
- m_bJoinedWithNext = _JoinWithCmp( _rFrm, *(pNextFrm) );
+ m_bJoinedWithNext = _JoinWithCmp( _rFrame, *(pNextFrame) );
}
}
@@ -2144,40 +2144,40 @@ void SwBorderAttrs::_CalcJoinedWithNext( const SwFrm& _rFrm )
}
// OD 21.05.2003 #108789# - accessor for cached values <m_bJoinedWithPrev>
-// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrm>, which is passed to
+// OD 2004-02-26 #i25029# - add 2nd parameter <_pPrevFrame>, which is passed to
// method <_CalcJoindWithPrev(..)>.
-bool SwBorderAttrs::JoinedWithPrev( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm ) const
+bool SwBorderAttrs::JoinedWithPrev( const SwFrame& _rFrame,
+ const SwFrame* _pPrevFrame ) const
{
- if ( !m_bCachedJoinedWithPrev || _pPrevFrm )
+ if ( !m_bCachedJoinedWithPrev || _pPrevFrame )
{
- // OD 2004-02-26 #i25029# - pass <_pPrevFrm> as 2nd parameter
- const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithPrev( _rFrm, _pPrevFrm );
+ // OD 2004-02-26 #i25029# - pass <_pPrevFrame> as 2nd parameter
+ const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithPrev( _rFrame, _pPrevFrame );
}
return m_bJoinedWithPrev;
}
-bool SwBorderAttrs::JoinedWithNext( const SwFrm& _rFrm ) const
+bool SwBorderAttrs::JoinedWithNext( const SwFrame& _rFrame ) const
{
if ( !m_bCachedJoinedWithNext )
{
- const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithNext( _rFrm );
+ const_cast<SwBorderAttrs*>(this)->_CalcJoinedWithNext( _rFrame );
}
return m_bJoinedWithNext;
}
-// OD 2004-02-26 #i25029# - added 2nd parameter <_pPrevFrm>, which is passed to
+// OD 2004-02-26 #i25029# - added 2nd parameter <_pPrevFrame>, which is passed to
// method <JoinedWithPrev>
-void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
- const SwFrm* _pPrevFrm )
+void SwBorderAttrs::_GetTopLine( const SwFrame& _rFrame,
+ const SwFrame* _pPrevFrame )
{
sal_uInt16 nRet = CalcTopLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
// OD 2004-02-26 #i25029# - add 2nd parameter
- if ( JoinedWithPrev( _rFrm, _pPrevFrm ) )
+ if ( JoinedWithPrev( _rFrame, _pPrevFrame ) )
{
nRet = 0;
}
@@ -2187,12 +2187,12 @@ void SwBorderAttrs::_GetTopLine( const SwFrm& _rFrm,
m_nGetTopLine = nRet;
}
-void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
+void SwBorderAttrs::_GetBottomLine( const SwFrame& _rFrame )
{
sal_uInt16 nRet = CalcBottomLine();
// OD 21.05.2003 #108789# - use new method <JoinWithPrev()>
- if ( JoinedWithNext( _rFrm ) )
+ if ( JoinedWithNext( _rFrame ) )
{
nRet = 0;
}
@@ -2202,15 +2202,15 @@ void SwBorderAttrs::_GetBottomLine( const SwFrm& _rFrm )
m_nGetBottomLine = nRet;
}
-SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) :
+SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrame *pFrame ) :
SwCacheAccess( rCach,
- (pFrm->IsContentFrm() ?
- const_cast<void*>(static_cast<void const *>(static_cast<const SwContentFrm*>(pFrm)->GetNode())) :
- const_cast<void*>(static_cast<void const *>(static_cast<const SwLayoutFrm*>(pFrm)->GetFormat()))),
- (pFrm->IsContentFrm() ?
- static_cast<SwModify const *>(static_cast<const SwContentFrm*>(pFrm)->GetNode())->IsInCache() :
- static_cast<SwModify const *>(static_cast<const SwLayoutFrm*>(pFrm)->GetFormat())->IsInCache()) ),
- pConstructor( pFrm )
+ (pFrame->IsContentFrame() ?
+ const_cast<void*>(static_cast<void const *>(static_cast<const SwContentFrame*>(pFrame)->GetNode())) :
+ const_cast<void*>(static_cast<void const *>(static_cast<const SwLayoutFrame*>(pFrame)->GetFormat()))),
+ (pFrame->IsContentFrame() ?
+ static_cast<SwModify const *>(static_cast<const SwContentFrame*>(pFrame)->GetNode())->IsInCache() :
+ static_cast<SwModify const *>(static_cast<const SwLayoutFrame*>(pFrame)->GetFormat())->IsInCache()) ),
+ pConstructor( pFrame )
{
}
@@ -2225,7 +2225,7 @@ SwBorderAttrs *SwBorderAttrAccess::Get()
return static_cast<SwBorderAttrs*>(SwCacheAccess::Get());
}
-SwOrderIter::SwOrderIter( const SwPageFrm *pPg, bool bFlys ) :
+SwOrderIter::SwOrderIter( const SwPageFrame *pPg, bool bFlys ) :
m_pPage( pPg ),
m_pCurrent( nullptr ),
m_bFlysOnly( bFlys )
@@ -2352,42 +2352,42 @@ const SdrObject *SwOrderIter::Prev()
// #115759# - 'remove' also drawing object from page and
// at-fly anchored objects from page
-static void lcl_RemoveObjsFromPage( SwFrm* _pFrm )
+static void lcl_RemoveObjsFromPage( SwFrame* _pFrame )
{
- OSL_ENSURE( _pFrm->GetDrawObjs(), "no DrawObjs in lcl_RemoveObjsFromPage." );
- SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
+ OSL_ENSURE( _pFrame->GetDrawObjs(), "no DrawObjs in lcl_RemoveObjsFromPage." );
+ SwSortedObjs &rObjs = *_pFrame->GetDrawObjs();
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
// #115759# - reset member, at which the anchored
// object orients its vertical position
- pObj->ClearVertPosOrientFrm();
+ pObj->ClearVertPosOrientFrame();
// #i43913#
pObj->ResetLayoutProcessBools();
// #115759# - remove also lower objects of as-character
// anchored Writer fly frames from page
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
+ SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj);
// #115759# - remove also direct lowers of Writer
// fly frame from page
- if ( pFlyFrm->GetDrawObjs() )
+ if ( pFlyFrame->GetDrawObjs() )
{
- ::lcl_RemoveObjsFromPage( pFlyFrm );
+ ::lcl_RemoveObjsFromPage( pFlyFrame );
}
- SwContentFrm* pCnt = pFlyFrm->ContainsContent();
+ SwContentFrame* pCnt = pFlyFrame->ContainsContent();
while ( pCnt )
{
if ( pCnt->GetDrawObjs() )
::lcl_RemoveObjsFromPage( pCnt );
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
- if ( pFlyFrm->IsFlyFreeFrm() )
+ if ( pFlyFrame->IsFlyFreeFrame() )
{
- // #i28701# - use new method <GetPageFrm()>
- pFlyFrm->GetPageFrm()->RemoveFlyFromPage( pFlyFrm );
+ // #i28701# - use new method <GetPageFrame()>
+ pFlyFrame->GetPageFrame()->RemoveFlyFromPage( pFlyFrame );
}
}
// #115759# - remove also drawing objects from page
@@ -2395,19 +2395,19 @@ static void lcl_RemoveObjsFromPage( SwFrm* _pFrm )
{
if (pObj->GetFrameFormat().GetAnchor().GetAnchorId() != FLY_AS_CHAR)
{
- pObj->GetPageFrm()->RemoveDrawObjFromPage(
+ pObj->GetPageFrame()->RemoveDrawObjFromPage(
*(static_cast<SwAnchoredDrawObject*>(pObj)) );
}
}
}
}
-SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
+SwFrame *SaveContent( SwLayoutFrame *pLay, SwFrame *pStart )
{
- if( pLay->IsSctFrm() && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
- sw_RemoveFootnotes( static_cast<SwColumnFrm*>(pLay->Lower()), true, true );
+ if( pLay->IsSctFrame() && pLay->Lower() && pLay->Lower()->IsColumnFrame() )
+ sw_RemoveFootnotes( static_cast<SwColumnFrame*>(pLay->Lower()), true, true );
- SwFrm *pSav;
+ SwFrame *pSav;
if ( nullptr == (pSav = pLay->ContainsAny()) )
return nullptr;
@@ -2422,22 +2422,22 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
// Tables should be saved as a whole, expection:
// The contents of a section or a cell inside a table should be saved
- if ( pSav->IsInTab() && !( ( pLay->IsSctFrm() || pLay->IsCellFrm() ) && pLay->IsInTab() ) )
- while ( !pSav->IsTabFrm() )
+ if ( pSav->IsInTab() && !( ( pLay->IsSctFrame() || pLay->IsCellFrame() ) && pLay->IsInTab() ) )
+ while ( !pSav->IsTabFrame() )
pSav = pSav->GetUpper();
if( pSav->IsInSct() )
{ // search the upmost section inside of pLay
- SwFrm* pSect = pLay->FindSctFrm();
- SwFrm *pTmp = pSav;
+ SwFrame* pSect = pLay->FindSctFrame();
+ SwFrame *pTmp = pSav;
do
{
pSav = pTmp;
- pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrm() : nullptr;
+ pTmp = (pSav && pSav->GetUpper()) ? pSav->GetUpper()->FindSctFrame() : nullptr;
} while ( pTmp != pSect );
}
- SwFrm *pFloat = pSav;
+ SwFrame *pFloat = pSav;
if( !pStart )
pStart = pSav;
bool bGo = pStart == pSav;
@@ -2451,21 +2451,21 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
{
if( bGo )
{
- if ( pFloat->IsContentFrm() )
+ if ( pFloat->IsContentFrame() )
{
if ( pFloat->GetDrawObjs() )
- ::lcl_RemoveObjsFromPage( static_cast<SwContentFrm*>(pFloat) );
+ ::lcl_RemoveObjsFromPage( static_cast<SwContentFrame*>(pFloat) );
}
- else if ( pFloat->IsTabFrm() || pFloat->IsSctFrm() )
+ else if ( pFloat->IsTabFrame() || pFloat->IsSctFrame() )
{
- SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(pFloat)->ContainsContent();
+ SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(pFloat)->ContainsContent();
if( pCnt )
{
do
{ if ( pCnt->GetDrawObjs() )
::lcl_RemoveObjsFromPage( pCnt );
- pCnt = pCnt->GetNextContentFrm();
- } while ( pCnt && static_cast<SwLayoutFrm*>(pFloat)->IsAnLower( pCnt ) );
+ pCnt = pCnt->GetNextContentFrame();
+ } while ( pCnt && static_cast<SwLayoutFrame*>(pFloat)->IsAnLower( pCnt ) );
}
}
else {
@@ -2490,7 +2490,7 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
} while ( pFloat );
// search next chain part and connect both chains
- SwFrm *pTmp = pFloat->FindNext();
+ SwFrame *pTmp = pFloat->FindNext();
if( bGo )
pFloat->mpUpper = nullptr;
@@ -2515,10 +2515,10 @@ SwFrm *SaveContent( SwLayoutFrm *pLay, SwFrm *pStart )
// #115759# - add also drawing objects to page and at-fly
// anchored objects to page
-static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
+static void lcl_AddObjsToPage( SwFrame* _pFrame, SwPageFrame* _pPage )
{
- OSL_ENSURE( _pFrm->GetDrawObjs(), "no DrawObjs in lcl_AddObjsToPage." );
- SwSortedObjs &rObjs = *_pFrm->GetDrawObjs();
+ OSL_ENSURE( _pFrame->GetDrawObjs(), "no DrawObjs in lcl_AddObjsToPage." );
+ SwSortedObjs &rObjs = *_pFrame->GetDrawObjs();
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
@@ -2528,30 +2528,30 @@ static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
pObj->UnlockPosition();
// #115759# - add also lower objects of as-character
// anchored Writer fly frames from page
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
- if ( dynamic_cast<const SwFlyFreeFrm*>( pObj) != nullptr )
+ SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj);
+ if ( dynamic_cast<const SwFlyFreeFrame*>( pObj) != nullptr )
{
- _pPage->AppendFlyToPage( pFlyFrm );
+ _pPage->AppendFlyToPage( pFlyFrame );
}
- pFlyFrm->_InvalidatePos();
- pFlyFrm->_InvalidateSize();
- pFlyFrm->InvalidatePage( _pPage );
+ pFlyFrame->_InvalidatePos();
+ pFlyFrame->_InvalidateSize();
+ pFlyFrame->InvalidatePage( _pPage );
// #115759# - add also at-fly anchored objects
// to page
- if ( pFlyFrm->GetDrawObjs() )
+ if ( pFlyFrame->GetDrawObjs() )
{
- ::lcl_AddObjsToPage( pFlyFrm, _pPage );
+ ::lcl_AddObjsToPage( pFlyFrame, _pPage );
}
- SwContentFrm *pCnt = pFlyFrm->ContainsContent();
+ SwContentFrame *pCnt = pFlyFrame->ContainsContent();
while ( pCnt )
{
if ( pCnt->GetDrawObjs() )
::lcl_AddObjsToPage( pCnt, _pPage );
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
// #115759# - remove also drawing objects from page
@@ -2567,31 +2567,31 @@ static void lcl_AddObjsToPage( SwFrm* _pFrm, SwPageFrm* _pPage )
}
}
-void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGrow )
+void RestoreContent( SwFrame *pSav, SwLayoutFrame *pParent, SwFrame *pSibling, bool bGrow )
{
OSL_ENSURE( pSav && pParent, "no Save or Parent provided for RestoreContent." );
SWRECTFN( pParent )
- // If there are already FlowFrms below the new parent, so add the chain (starting with pSav)
+ // If there are already FlowFrames below the new parent, so add the chain (starting with pSav)
// after the last one. The parts are inserted and invalidated if needed.
- // On the way, the Flys of the ContentFrms are registered at the page.
+ // On the way, the Flys of the ContentFrames are registered at the page.
- SwPageFrm *pPage = pParent->FindPageFrm();
+ SwPageFrame *pPage = pParent->FindPageFrame();
if ( pPage )
pPage->InvalidatePage( pPage );
// determine predecessor and establish connection or initialize
pSav->mpPrev = pSibling;
- SwFrm* pNxt;
+ SwFrame* pNxt;
if ( pSibling )
{
pNxt = pSibling->mpNext;
pSibling->mpNext = pSav;
pSibling->_InvalidatePrt();
pSibling->InvalidatePage( pPage );
- SwFlowFrm *pFlowFrm = dynamic_cast<SwFlowFrm*>(pSibling);
- if (pFlowFrm && pFlowFrm->GetFollow())
+ SwFlowFrame *pFlowFrame = dynamic_cast<SwFlowFrame*>(pSibling);
+ if (pFlowFrame && pFlowFrame->GetFollow())
pSibling->Prepare( PREP_CLEAR, nullptr, false );
}
else
@@ -2599,11 +2599,11 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG
pParent->m_pLower = pSav;
pSav->mpUpper = pParent; // set here already, so that it is explicit when invalidating
- if ( pSav->IsContentFrm() )
- static_cast<SwContentFrm*>(pSav)->InvalidatePage( pPage );
+ if ( pSav->IsContentFrame() )
+ static_cast<SwContentFrame*>(pSav)->InvalidatePage( pPage );
else
- { // pSav might be an empty SectFrm
- SwContentFrm* pCnt = pParent->ContainsContent();
+ { // pSav might be an empty SectFrame
+ SwContentFrame* pCnt = pParent->ContainsContent();
if( pCnt )
pCnt->InvalidatePage( pPage );
}
@@ -2611,34 +2611,34 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG
// the parent needs to grow appropriately
SwTwips nGrowVal = 0;
- SwFrm* pLast;
+ SwFrame* pLast;
do
{ pSav->mpUpper = pParent;
- nGrowVal += (pSav->Frm().*fnRect->fnGetHeight)();
+ nGrowVal += (pSav->Frame().*fnRect->fnGetHeight)();
pSav->_InvalidateAll();
- // register Flys, if TextFrms than also invalidate appropriately
- if ( pSav->IsContentFrm() )
+ // register Flys, if TextFrames than also invalidate appropriately
+ if ( pSav->IsContentFrame() )
{
- if ( pSav->IsTextFrm() &&
- static_cast<SwTextFrm*>(pSav)->GetCacheIdx() != USHRT_MAX )
- static_cast<SwTextFrm*>(pSav)->Init(); // I am its friend
+ if ( pSav->IsTextFrame() &&
+ static_cast<SwTextFrame*>(pSav)->GetCacheIdx() != USHRT_MAX )
+ static_cast<SwTextFrame*>(pSav)->Init(); // I am its friend
if ( pPage && pSav->GetDrawObjs() )
- ::lcl_AddObjsToPage( static_cast<SwContentFrm*>(pSav), pPage );
+ ::lcl_AddObjsToPage( static_cast<SwContentFrame*>(pSav), pPage );
}
else
- { SwContentFrm *pBlub = static_cast<SwLayoutFrm*>(pSav)->ContainsContent();
+ { SwContentFrame *pBlub = static_cast<SwLayoutFrame*>(pSav)->ContainsContent();
if( pBlub )
{
do
{ if ( pPage && pBlub->GetDrawObjs() )
::lcl_AddObjsToPage( pBlub, pPage );
- if( pBlub->IsTextFrm() && static_cast<SwTextFrm*>(pBlub)->HasFootnote() &&
- static_cast<SwTextFrm*>(pBlub)->GetCacheIdx() != USHRT_MAX )
- static_cast<SwTextFrm*>(pBlub)->Init(); // I am its friend
- pBlub = pBlub->GetNextContentFrm();
- } while ( pBlub && static_cast<SwLayoutFrm*>(pSav)->IsAnLower( pBlub ));
+ if( pBlub->IsTextFrame() && static_cast<SwTextFrame*>(pBlub)->HasFootnote() &&
+ static_cast<SwTextFrame*>(pBlub)->GetCacheIdx() != USHRT_MAX )
+ static_cast<SwTextFrame*>(pBlub)->Init(); // I am its friend
+ pBlub = pBlub->GetNextContentFrame();
+ } while ( pBlub && static_cast<SwLayoutFrame*>(pSav)->IsAnLower( pBlub ));
}
}
pLast = pSav;
@@ -2656,12 +2656,12 @@ void RestoreContent( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bG
pParent->Grow( nGrowVal );
}
-SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
+SwPageFrame * InsertNewPage( SwPageDesc &rDesc, SwFrame *pUpper,
bool bOdd, bool bFirst, bool bInsertEmpty, bool bFootnote,
- SwFrm *pSibling )
+ SwFrame *pSibling )
{
- SwPageFrm *pRet;
- SwDoc *pDoc = static_cast<SwLayoutFrm*>(pUpper)->GetFormat()->GetDoc();
+ SwPageFrame *pRet;
+ SwDoc *pDoc = static_cast<SwLayoutFrame*>(pUpper)->GetFormat()->GetDoc();
if (bFirst)
{
if (rDesc.IsFirstShared())
@@ -2694,36 +2694,36 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper,
if( bInsertEmpty )
{
SwPageDesc *pTmpDesc = pSibling && pSibling->GetPrev() ?
- static_cast<SwPageFrm*>(pSibling->GetPrev())->GetPageDesc() : &rDesc;
- pRet = new SwPageFrm( pDoc->GetEmptyPageFormat(), pUpper, pTmpDesc );
+ static_cast<SwPageFrame*>(pSibling->GetPrev())->GetPageDesc() : &rDesc;
+ pRet = new SwPageFrame( pDoc->GetEmptyPageFormat(), pUpper, pTmpDesc );
pRet->Paste( pUpper, pSibling );
pRet->PreparePage( bFootnote );
}
- pRet = new SwPageFrm( pFormat, pUpper, &rDesc );
+ pRet = new SwPageFrame( pFormat, pUpper, &rDesc );
pRet->Paste( pUpper, pSibling );
pRet->PreparePage( bFootnote );
if ( pRet->GetNext() )
- SwRootFrm::AssertPageFlys( pRet );
+ SwRootFrame::AssertPageFlys( pRet );
return pRet;
}
/* The following two methods search the layout structure recursively and
- * register all Flys at the page that have a Frm in this structure as an anchor.
+ * register all Flys at the page that have a Frame in this structure as an anchor.
*/
-static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
+static void lcl_Regist( SwPageFrame *pPage, const SwFrame *pAnch )
{
SwSortedObjs *pObjs = const_cast<SwSortedObjs*>(pAnch->GetDrawObjs());
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pObj = (*pObjs)[i];
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj);
// register (not if already known)
- // #i28701# - use new method <GetPageFrm()>
- SwPageFrm *pPg = pFly->IsFlyFreeFrm()
- ? pFly->GetPageFrm() : pFly->FindPageFrm();
+ // #i28701# - use new method <GetPageFrame()>
+ SwPageFrame *pPg = pFly->IsFlyFreeFrame()
+ ? pFly->GetPageFrame() : pFly->FindPageFrame();
if ( pPg != pPage )
{
if ( pPg )
@@ -2735,16 +2735,16 @@ static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
else
{
// #i87493#
- if ( pPage != pObj->GetPageFrm() )
+ if ( pPage != pObj->GetPageFrame() )
{
// #i28701#
- if ( pObj->GetPageFrm() )
- pObj->GetPageFrm()->RemoveDrawObjFromPage( *pObj );
+ if ( pObj->GetPageFrame() )
+ pObj->GetPageFrame()->RemoveDrawObjFromPage( *pObj );
pPage->AppendDrawObjToPage( *pObj );
}
}
- const SwFlyFrm* pFly = pAnch->FindFlyFrm();
+ const SwFlyFrame* pFly = pAnch->FindFlyFrame();
if ( pFly &&
pObj->GetDrawObj()->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() &&
pObj->GetDrawObj()->GetPage() )
@@ -2756,83 +2756,83 @@ static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch )
}
}
-void RegistFlys( SwPageFrm *pPage, const SwLayoutFrm *pLay )
+void RegistFlys( SwPageFrame *pPage, const SwLayoutFrame *pLay )
{
if ( pLay->GetDrawObjs() )
::lcl_Regist( pPage, pLay );
- const SwFrm *pFrm = pLay->Lower();
- while ( pFrm )
+ const SwFrame *pFrame = pLay->Lower();
+ while ( pFrame )
{
- if ( pFrm->IsLayoutFrm() )
- ::RegistFlys( pPage, static_cast<const SwLayoutFrm*>(pFrm) );
- else if ( pFrm->GetDrawObjs() )
- ::lcl_Regist( pPage, pFrm );
- pFrm = pFrm->GetNext();
+ if ( pFrame->IsLayoutFrame() )
+ ::RegistFlys( pPage, static_cast<const SwLayoutFrame*>(pFrame) );
+ else if ( pFrame->GetDrawObjs() )
+ ::lcl_Regist( pPage, pFrame );
+ pFrame = pFrame->GetNext();
}
}
/// Notify the background based on the difference between old and new rectangle
-void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
+void Notify( SwFlyFrame *pFly, SwPageFrame *pOld, const SwRect &rOld,
const SwRect* pOldPrt )
{
- const SwRect aFrm( pFly->GetObjRectWithSpaces() );
- if ( rOld.Pos() != aFrm.Pos() )
+ const SwRect aFrame( pFly->GetObjRectWithSpaces() );
+ if ( rOld.Pos() != aFrame.Pos() )
{ // changed position, invalidate old and new area
if ( rOld.HasArea() &&
rOld.Left()+pFly->GetFormat()->GetLRSpace().GetLeft() < FAR_AWAY )
{
pFly->NotifyBackground( pOld, rOld, PREP_FLY_LEAVE );
}
- pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE );
+ pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE );
}
- else if ( rOld.SSize() != aFrm.SSize() )
+ else if ( rOld.SSize() != aFrame.SSize() )
{ // changed size, invalidate the area that was left or is now overlapped
// For simplicity, we purposely invalidate a Twip even if not needed.
- SwViewShell *pSh = pFly->getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = pFly->getRootFrame()->GetCurrShell();
if( pSh && rOld.HasArea() )
pSh->InvalidateWindows( rOld );
// #i51941# - consider case that fly frame isn't
// registered at the old page <pOld>
- SwPageFrm* pPageFrm = pFly->FindPageFrm();
- if ( pOld != pPageFrm )
+ SwPageFrame* pPageFrame = pFly->FindPageFrame();
+ if ( pOld != pPageFrame )
{
- pFly->NotifyBackground( pPageFrm, aFrm, PREP_FLY_ARRIVE );
+ pFly->NotifyBackground( pPageFrame, aFrame, PREP_FLY_ARRIVE );
}
- if ( rOld.Left() != aFrm.Left() )
+ if ( rOld.Left() != aFrame.Left() )
{
SwRect aTmp( rOld );
- aTmp.Union( aFrm );
- aTmp.Left( std::min(aFrm.Left(), rOld.Left()) );
- aTmp.Right( std::max(aFrm.Left(), rOld.Left()) );
+ aTmp.Union( aFrame );
+ aTmp.Left( std::min(aFrame.Left(), rOld.Left()) );
+ aTmp.Right( std::max(aFrame.Left(), rOld.Left()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
SwTwips nOld = rOld.Right();
- SwTwips nNew = aFrm.Right();
+ SwTwips nNew = aFrame.Right();
if ( nOld != nNew )
{
SwRect aTmp( rOld );
- aTmp.Union( aFrm );
+ aTmp.Union( aFrame );
aTmp.Left( std::min(nNew, nOld) );
aTmp.Right( std::max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
- if ( rOld.Top() != aFrm.Top() )
+ if ( rOld.Top() != aFrame.Top() )
{
SwRect aTmp( rOld );
- aTmp.Union( aFrm );
- aTmp.Top( std::min(aFrm.Top(), rOld.Top()) );
- aTmp.Bottom( std::max(aFrm.Top(), rOld.Top()) );
+ aTmp.Union( aFrame );
+ aTmp.Top( std::min(aFrame.Top(), rOld.Top()) );
+ aTmp.Bottom( std::max(aFrame.Top(), rOld.Top()) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
}
nOld = rOld.Bottom();
- nNew = aFrm.Bottom();
+ nNew = aFrame.Bottom();
if ( nOld != nNew )
{
SwRect aTmp( rOld );
- aTmp.Union( aFrm );
+ aTmp.Union( aFrame );
aTmp.Top( std::min(nNew, nOld) );
aTmp.Bottom( std::max(nNew, nOld) );
pFly->NotifyBackground( pOld, aTmp, PREP_FLY_CHGD );
@@ -2842,38 +2842,38 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld,
pFly->GetFormat()->GetSurround().IsContour() )
{
// #i24097#
- pFly->NotifyBackground( pFly->FindPageFrm(), aFrm, PREP_FLY_ARRIVE );
+ pFly->NotifyBackground( pFly->FindPageFrame(), aFrame, PREP_FLY_ARRIVE );
}
}
-static void lcl_CheckFlowBack( SwFrm* pFrm, const SwRect &rRect )
+static void lcl_CheckFlowBack( SwFrame* pFrame, const SwRect &rRect )
{
SwTwips nBottom = rRect.Bottom();
- while( pFrm )
+ while( pFrame )
{
- if( pFrm->IsLayoutFrm() )
+ if( pFrame->IsLayoutFrame() )
{
- if( rRect.IsOver( pFrm->Frm() ) )
- lcl_CheckFlowBack( static_cast<SwLayoutFrm*>(pFrm)->Lower(), rRect );
+ if( rRect.IsOver( pFrame->Frame() ) )
+ lcl_CheckFlowBack( static_cast<SwLayoutFrame*>(pFrame)->Lower(), rRect );
}
- else if( !pFrm->GetNext() && nBottom > pFrm->Frm().Bottom() )
+ else if( !pFrame->GetNext() && nBottom > pFrame->Frame().Bottom() )
{
- if( pFrm->IsContentFrm() && static_cast<SwContentFrm*>(pFrm)->HasFollow() )
- pFrm->InvalidateSize();
+ if( pFrame->IsContentFrame() && static_cast<SwContentFrame*>(pFrame)->HasFollow() )
+ pFrame->InvalidateSize();
else
- pFrm->InvalidateNextPos();
+ pFrame->InvalidateNextPos();
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
}
-static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt,
+static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrame *pCnt,
const SwRect &rRect, const PrepareHint eHint )
{
- if ( pCnt->IsTextFrm() )
+ if ( pCnt->IsTextFrame() )
{
SwRect aCntPrt( pCnt->Prt() );
- aCntPrt.Pos() += pCnt->Frm().Pos();
+ aCntPrt.Pos() += pCnt->Frame().Pos();
if ( eHint == PREP_FLY_ATTR_CHG )
{
// #i35640# - use given rectangle <rRect> instead
@@ -2891,16 +2891,16 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt,
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
- if ( dynamic_cast<const SwFlyFrm*>( pObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pObj) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pObj);
- if ( pFly->IsFlyInCntFrm() )
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pObj);
+ if ( pFly->IsFlyInContentFrame() )
{
- SwContentFrm *pContent = pFly->ContainsContent();
+ SwContentFrame *pContent = pFly->ContainsContent();
while ( pContent )
{
::lcl_NotifyContent( pThis, pContent, rRect, eHint );
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
}
}
@@ -2910,7 +2910,7 @@ static void lcl_NotifyContent( const SdrObject *pThis, SwContentFrm *pCnt,
}
void Notify_Background( const SdrObject* pObj,
- SwPageFrm* pPage,
+ SwPageFrame* pPage,
const SwRect& rRect,
const PrepareHint eHint,
const bool bInva )
@@ -2919,25 +2919,25 @@ void Notify_Background( const SdrObject* pObj,
if ( eHint == PREP_FLY_LEAVE && rRect.Top() == FAR_AWAY )
return;
- SwLayoutFrm* pArea;
- SwFlyFrm *pFlyFrm = nullptr;
- SwFrm* pAnchor;
+ SwLayoutFrame* pArea;
+ SwFlyFrame *pFlyFrame = nullptr;
+ SwFrame* pAnchor;
if( dynamic_cast<const SwVirtFlyDrawObj*>( pObj) != nullptr )
{
- pFlyFrm = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(pObj))->GetFlyFrm();
- pAnchor = pFlyFrm->AnchorFrm();
+ pFlyFrame = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(pObj))->GetFlyFrame();
+ pAnchor = pFlyFrame->AnchorFrame();
}
else
{
- pFlyFrm = nullptr;
- pAnchor = const_cast<SwFrm*>(
- GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrm() );
+ pFlyFrame = nullptr;
+ pAnchor = const_cast<SwFrame*>(
+ GetUserCall(pObj)->GetAnchoredObj( pObj )->GetAnchorFrame() );
}
if( PREP_FLY_LEAVE != eHint && pAnchor->IsInFly() )
- pArea = pAnchor->FindFlyFrm();
+ pArea = pAnchor->FindFlyFrame();
else
pArea = pPage;
- SwContentFrm *pCnt = nullptr;
+ SwContentFrame *pCnt = nullptr;
if ( pArea )
{
if( PREP_FLY_ARRIVE != eHint )
@@ -2958,41 +2958,41 @@ void Notify_Background( const SdrObject* pObj,
pCnt = pArea->ContainsContent();
}
}
- SwFrm *pLastTab = nullptr;
+ SwFrame *pLastTab = nullptr;
while ( pCnt && pArea && pArea->IsAnLower( pCnt ) )
{
::lcl_NotifyContent( pObj, pCnt, rRect, eHint );
if ( pCnt->IsInTab() )
{
- SwLayoutFrm* pCell = pCnt->GetUpper();
+ SwLayoutFrame* pCell = pCnt->GetUpper();
// #i40606# - use <GetLastBoundRect()>
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
- if ( pCell->IsCellFrm() &&
- ( pCell->Frm().IsOver( pObj->GetLastBoundRect() ) ||
- pCell->Frm().IsOver( rRect ) ) )
+ if ( pCell->IsCellFrame() &&
+ ( pCell->Frame().IsOver( pObj->GetLastBoundRect() ) ||
+ pCell->Frame().IsOver( rRect ) ) )
{
const SwFormatVertOrient &rOri = pCell->GetFormat()->GetVertOrient();
if ( text::VertOrientation::NONE != rOri.GetVertOrient() )
pCell->InvalidatePrt();
}
- SwTabFrm *pTab = pCnt->FindTabFrm();
+ SwTabFrame *pTab = pCnt->FindTabFrame();
if ( pTab != pLastTab )
{
pLastTab = pTab;
// #i40606# - use <GetLastBoundRect()>
// instead of <GetCurrentBoundRect()>, because a recalculation
// of the bounding rectangle isn't intended here.
- if ( pTab->Frm().IsOver( pObj->GetLastBoundRect() ) ||
- pTab->Frm().IsOver( rRect ) )
+ if ( pTab->Frame().IsOver( pObj->GetLastBoundRect() ) ||
+ pTab->Frame().IsOver( rRect ) )
{
- if ( !pFlyFrm || !pFlyFrm->IsLowerOf( pTab ) )
+ if ( !pFlyFrame || !pFlyFrame->IsLowerOf( pTab ) )
pTab->InvalidatePrt();
}
}
}
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
// #128702# - make code robust
if ( pPage && pPage->GetSortedObjs() )
@@ -3002,32 +3002,32 @@ void Notify_Background( const SdrObject* pObj,
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if ( dynamic_cast<const SwFlyFrm*>( pAnchoredObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( pAnchoredObj) != nullptr )
{
if( pAnchoredObj->GetDrawObj() == pObj )
continue;
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- if ( pFly->Frm().Top() == FAR_AWAY )
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ if ( pFly->Frame().Top() == FAR_AWAY )
continue;
- if ( !pFlyFrm ||
- (!pFly->IsLowerOf( pFlyFrm ) &&
+ if ( !pFlyFrame ||
+ (!pFly->IsLowerOf( pFlyFrame ) &&
pFly->GetVirtDrawObj()->GetOrdNumDirect() < pObj->GetOrdNumDirect()))
{
pCnt = pFly->ContainsContent();
while ( pCnt )
{
::lcl_NotifyContent( pObj, pCnt, rRect, eHint );
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
- if( pFly->IsFlyLayFrm() )
+ if( pFly->IsFlyLayFrame() )
{
- if( pFly->Lower() && pFly->Lower()->IsColumnFrm() &&
- pFly->Frm().Bottom() >= rRect.Top() &&
- pFly->Frm().Top() <= rRect.Bottom() &&
- pFly->Frm().Right() >= rRect.Left() &&
- pFly->Frm().Left() <= rRect.Right() )
+ if( pFly->Lower() && pFly->Lower()->IsColumnFrame() &&
+ pFly->Frame().Bottom() >= rRect.Top() &&
+ pFly->Frame().Top() <= rRect.Bottom() &&
+ pFly->Frame().Right() >= rRect.Left() &&
+ pFly->Frame().Left() <= rRect.Right() )
{
pFly->InvalidateSize();
}
@@ -3035,29 +3035,29 @@ void Notify_Background( const SdrObject* pObj,
// Flys above myself might sidestep if they have an automatic
// alignment. This happens independently of my attributes since
// this might have been changed as well.
- else if ( pFly->IsFlyAtCntFrm() &&
+ else if ( pFly->IsFlyAtContentFrame() &&
pObj->GetOrdNumDirect() <
pFly->GetVirtDrawObj()->GetOrdNumDirect() &&
- pFlyFrm && !pFly->IsLowerOf( pFlyFrm ) )
+ pFlyFrame && !pFly->IsLowerOf( pFlyFrame ) )
{
const SwFormatHoriOrient &rH = pFly->GetFormat()->GetHoriOrient();
if ( text::HoriOrientation::NONE != rH.GetHoriOrient() &&
text::HoriOrientation::CENTER != rH.GetHoriOrient() &&
( !pFly->IsAutoPos() || text::RelOrientation::CHAR != rH.GetRelationOrient() ) &&
- (pFly->Frm().Bottom() >= rRect.Top() &&
- pFly->Frm().Top() <= rRect.Bottom()) )
+ (pFly->Frame().Bottom() >= rRect.Top() &&
+ pFly->Frame().Top() <= rRect.Bottom()) )
pFly->InvalidatePos();
}
}
}
}
- if ( pFlyFrm && pAnchor->GetUpper() && pAnchor->IsInTab() )//MA_FLY_HEIGHT
+ if ( pFlyFrame && pAnchor->GetUpper() && pAnchor->IsInTab() )//MA_FLY_HEIGHT
pAnchor->GetUpper()->InvalidateSize();
// #i82258# - make code robust
SwViewShell* pSh = nullptr;
if ( bInva && pPage &&
- nullptr != (pSh = pPage->getRootFrm()->GetCurrShell()) )
+ nullptr != (pSh = pPage->getRootFrame()->GetCurrShell()) )
{
pSh->InvalidateWindows( rRect );
}
@@ -3065,124 +3065,124 @@ void Notify_Background( const SdrObject* pObj,
/// Provides the Upper of an anchor in paragraph-bound objects. If the latter
/// is a chained border or a footnote, the "virtual" Upper might be returne.
-const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos )
+const SwFrame* GetVirtualUpper( const SwFrame* pFrame, const Point& rPos )
{
- if( pFrm->IsTextFrm() )
+ if( pFrame->IsTextFrame() )
{
- pFrm = pFrm->GetUpper();
- if( !pFrm->Frm().IsInside( rPos ) )
+ pFrame = pFrame->GetUpper();
+ if( !pFrame->Frame().IsInside( rPos ) )
{
- if( pFrm->IsFootnoteFrm() )
+ if( pFrame->IsFootnoteFrame() )
{
- const SwFootnoteFrm* pTmp = static_cast<const SwFootnoteFrm*>(pFrm)->GetFollow();
+ const SwFootnoteFrame* pTmp = static_cast<const SwFootnoteFrame*>(pFrame)->GetFollow();
while( pTmp )
{
- if( pTmp->Frm().IsInside( rPos ) )
+ if( pTmp->Frame().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetFollow();
}
}
else
{
- SwFlyFrm* pTmp = const_cast<SwFlyFrm*>(pFrm->FindFlyFrm());
+ SwFlyFrame* pTmp = const_cast<SwFlyFrame*>(pFrame->FindFlyFrame());
while( pTmp )
{
- if( pTmp->Frm().IsInside( rPos ) )
+ if( pTmp->Frame().IsInside( rPos ) )
return pTmp;
pTmp = pTmp->GetNextLink();
}
}
}
}
- return pFrm;
+ return pFrame;
}
-bool Is_Lower_Of(const SwFrm *pCurrFrm, const SdrObject* pObj)
+bool Is_Lower_Of(const SwFrame *pCurrFrame, const SdrObject* pObj)
{
Point aPos;
- const SwFrm* pFrm;
+ const SwFrame* pFrame;
if (const SwVirtFlyDrawObj *pFlyDrawObj = dynamic_cast<const SwVirtFlyDrawObj*>(pObj))
{
- const SwFlyFrm* pFly = pFlyDrawObj->GetFlyFrm();
- pFrm = pFly->GetAnchorFrm();
- aPos = pFly->Frm().Pos();
+ const SwFlyFrame* pFly = pFlyDrawObj->GetFlyFrame();
+ pFrame = pFly->GetAnchorFrame();
+ aPos = pFly->Frame().Pos();
}
else
{
- pFrm = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrm(pObj);
+ pFrame = static_cast<SwDrawContact*>(GetUserCall(pObj))->GetAnchorFrame(pObj);
aPos = pObj->GetCurrentBoundRect().TopLeft();
}
- OSL_ENSURE( pFrm, "8-( Fly is lost in Space." );
- pFrm = GetVirtualUpper( pFrm, aPos );
+ OSL_ENSURE( pFrame, "8-( Fly is lost in Space." );
+ pFrame = GetVirtualUpper( pFrame, aPos );
do
- { if ( pFrm == pCurrFrm )
+ { if ( pFrame == pCurrFrame )
return true;
- if( pFrm->IsFlyFrm() )
+ if( pFrame->IsFlyFrame() )
{
- aPos = pFrm->Frm().Pos();
- pFrm = GetVirtualUpper( static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(), aPos );
+ aPos = pFrame->Frame().Pos();
+ pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
- pFrm = pFrm->GetUpper();
- } while ( pFrm );
+ pFrame = pFrame->GetUpper();
+ } while ( pFrame );
return false;
}
/// provides the area of a frame in that no Fly from another area can overlap
-const SwFrm *FindKontext( const SwFrm *pFrm, sal_uInt16 nAdditionalContextType )
+const SwFrame *FindKontext( const SwFrame *pFrame, sal_uInt16 nAdditionalContextType )
{
const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL |
nAdditionalContextType;
do
- { if ( pFrm->GetType() & nTyp )
+ { if ( pFrame->GetType() & nTyp )
break;
- pFrm = pFrm->GetUpper();
- } while( pFrm );
- return pFrm;
+ pFrame = pFrame->GetUpper();
+ } while( pFrame );
+ return pFrame;
}
-bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm )
+bool IsFrameInSameKontext( const SwFrame *pInnerFrame, const SwFrame *pFrame )
{
- const SwFrm *pKontext = FindKontext( pInnerFrm, 0 );
+ const SwFrame *pKontext = FindKontext( pInnerFrame, 0 );
const sal_uInt16 nTyp = FRM_ROOT | FRM_HEADER | FRM_FOOTER | FRM_FTNCONT |
FRM_FTN | FRM_FLY |
FRM_TAB | FRM_ROW | FRM_CELL;
do
- { if ( pFrm->GetType() & nTyp )
+ { if ( pFrame->GetType() & nTyp )
{
- if( pFrm == pKontext )
+ if( pFrame == pKontext )
return true;
- if( pFrm->IsCellFrm() )
+ if( pFrame->IsCellFrame() )
return false;
}
- if( pFrm->IsFlyFrm() )
+ if( pFrame->IsFlyFrame() )
{
- Point aPos( pFrm->Frm().Pos() );
- pFrm = GetVirtualUpper( static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm(), aPos );
+ Point aPos( pFrame->Frame().Pos() );
+ pFrame = GetVirtualUpper( static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame(), aPos );
}
else
- pFrm = pFrm->GetUpper();
- } while( pFrm );
+ pFrame = pFrame->GetUpper();
+ } while( pFrame );
return false;
}
-static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell )
+static SwTwips lcl_CalcCellRstHeight( SwLayoutFrame *pCell )
{
- if ( pCell->Lower()->IsContentFrm() || pCell->Lower()->IsSctFrm() )
+ if ( pCell->Lower()->IsContentFrame() || pCell->Lower()->IsSctFrame() )
{
- SwFrm *pLow = pCell->Lower();
+ SwFrame *pLow = pCell->Lower();
long nHeight = 0, nFlyAdd = 0;
do
{
- long nLow = pLow->Frm().Height();
- if( pLow->IsTextFrm() && static_cast<SwTextFrm*>(pLow)->IsUndersized() )
- nLow += static_cast<SwTextFrm*>(pLow)->GetParHeight()-pLow->Prt().Height();
- else if( pLow->IsSctFrm() && static_cast<SwSectionFrm*>(pLow)->IsUndersized() )
- nLow += static_cast<SwSectionFrm*>(pLow)->Undersize();
+ long nLow = pLow->Frame().Height();
+ if( pLow->IsTextFrame() && static_cast<SwTextFrame*>(pLow)->IsUndersized() )
+ nLow += static_cast<SwTextFrame*>(pLow)->GetParHeight()-pLow->Prt().Height();
+ else if( pLow->IsSctFrame() && static_cast<SwSectionFrame*>(pLow)->IsUndersized() )
+ nLow += static_cast<SwSectionFrame*>(pLow)->Undersize();
nFlyAdd = std::max( 0L, nFlyAdd - nLow );
nFlyAdd = std::max( nFlyAdd, ::CalcHeightWithFlys( pLow ) );
nHeight += nLow;
@@ -3191,44 +3191,44 @@ static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell )
if ( nFlyAdd )
nHeight += nFlyAdd;
- // The border cannot be calculated based on PrtArea and Frm, since both can be invalid.
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell );
+ // The border cannot be calculated based on PrtArea and Frame, since both can be invalid.
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
nHeight += rAttrs.CalcTop() + rAttrs.CalcBottom();
- return pCell->Frm().Height() - nHeight;
+ return pCell->Frame().Height() - nHeight;
}
else
{
long nRstHeight = 0;
- SwFrm *pLow = pCell->Lower();
- while (pLow && pLow->IsLayoutFrm())
+ SwFrame *pLow = pCell->Lower();
+ while (pLow && pLow->IsLayoutFrame())
{
- nRstHeight += ::CalcRowRstHeight(static_cast<SwLayoutFrm*>(pLow));
+ nRstHeight += ::CalcRowRstHeight(static_cast<SwLayoutFrame*>(pLow));
pLow = pLow->GetNext();
}
return nRstHeight;
}
}
-SwTwips CalcRowRstHeight( SwLayoutFrm *pRow )
+SwTwips CalcRowRstHeight( SwLayoutFrame *pRow )
{
SwTwips nRstHeight = LONG_MAX;
- SwFrm *pLow = pRow->Lower();
- while (pLow && pLow->IsLayoutFrm())
+ SwFrame *pLow = pRow->Lower();
+ while (pLow && pLow->IsLayoutFrame())
{
- nRstHeight = std::min(nRstHeight, ::lcl_CalcCellRstHeight(static_cast<SwLayoutFrm*>(pLow)));
+ nRstHeight = std::min(nRstHeight, ::lcl_CalcCellRstHeight(static_cast<SwLayoutFrame*>(pLow)));
pLow = pLow->GetNext();
}
return nRstHeight;
}
-const SwFrm* FindPage( const SwRect &rRect, const SwFrm *pPage )
+const SwFrame* FindPage( const SwRect &rRect, const SwFrame *pPage )
{
- if ( !rRect.IsOver( pPage->Frm() ) )
+ if ( !rRect.IsOver( pPage->Frame() ) )
{
- const SwRootFrm* pRootFrm = static_cast<const SwRootFrm*>(pPage->GetUpper());
- const SwFrm* pTmpPage = pRootFrm ? pRootFrm->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr;
+ const SwRootFrame* pRootFrame = static_cast<const SwRootFrame*>(pPage->GetUpper());
+ const SwFrame* pTmpPage = pRootFrame ? pRootFrame->GetPageAtPos( rRect.TopLeft(), &rRect.SSize(), true ) : nullptr;
if ( pTmpPage )
pPage = pTmpPage;
}
@@ -3236,92 +3236,92 @@ const SwFrm* FindPage( const SwRect &rRect, const SwFrm *pPage )
return pPage;
}
-class SwFrmHolder : private SfxListener
+class SwFrameHolder : private SfxListener
{
- SwFrm* pFrm;
+ SwFrame* pFrame;
bool bSet;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
public:
- SwFrmHolder() : pFrm(nullptr), bSet(false) {}
- void SetFrm( SwFrm* pHold );
- SwFrm* GetFrm() { return pFrm; }
+ SwFrameHolder() : pFrame(nullptr), bSet(false) {}
+ void SetFrame( SwFrame* pHold );
+ SwFrame* GetFrame() { return pFrame; }
void Reset();
bool IsSet() { return bSet; }
};
-void SwFrmHolder::SetFrm( SwFrm* pHold )
+void SwFrameHolder::SetFrame( SwFrame* pHold )
{
bSet = true;
- pFrm = pHold;
+ pFrame = pHold;
StartListening(*pHold);
}
-void SwFrmHolder::Reset()
+void SwFrameHolder::Reset()
{
- if (pFrm)
- EndListening(*pFrm);
+ if (pFrame)
+ EndListening(*pFrame);
bSet = false;
- pFrm = nullptr;
+ pFrame = nullptr;
}
-void SwFrmHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+void SwFrameHolder::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rBC == pFrm )
+ if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rBC == pFrame )
{
- pFrm = nullptr;
+ pFrame = nullptr;
}
}
-SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt16 const nFrmType,
- const Point* pPoint, const SwPosition *pPos, const bool bCalcFrm )
+SwFrame* GetFrameOfModify( const SwRootFrame* pLayout, SwModify const& rMod, sal_uInt16 const nFrameType,
+ const Point* pPoint, const SwPosition *pPos, const bool bCalcFrame )
{
- SwFrm *pMinFrm = nullptr, *pTmpFrm;
- SwFrmHolder aHolder;
+ SwFrame *pMinFrame = nullptr, *pTmpFrame;
+ SwFrameHolder aHolder;
SwRect aCalcRect;
bool bClientIterChanged = false;
- SwIterator<SwFrm,SwModify> aIter( rMod );
+ SwIterator<SwFrame,SwModify> aIter( rMod );
do {
- pMinFrm = nullptr;
+ pMinFrame = nullptr;
aHolder.Reset();
sal_uInt64 nMinDist = 0;
bClientIterChanged = false;
- for( pTmpFrm = aIter.First(); pTmpFrm; pTmpFrm = aIter.Next() )
+ for( pTmpFrame = aIter.First(); pTmpFrame; pTmpFrame = aIter.Next() )
{
- if( pTmpFrm->GetType() & nFrmType &&
- ( !pLayout || pLayout == pTmpFrm->getRootFrm() ) &&
- (!pTmpFrm->IsFlowFrm() ||
- !SwFlowFrm::CastFlowFrm( pTmpFrm )->IsFollow() ))
+ if( pTmpFrame->GetType() & nFrameType &&
+ ( !pLayout || pLayout == pTmpFrame->getRootFrame() ) &&
+ (!pTmpFrame->IsFlowFrame() ||
+ !SwFlowFrame::CastFlowFrame( pTmpFrame )->IsFollow() ))
{
if( pPoint )
{
- // watch for Frm being deleted
- if ( pMinFrm )
- aHolder.SetFrm( pMinFrm );
+ // watch for Frame being deleted
+ if ( pMinFrame )
+ aHolder.SetFrame( pMinFrame );
else
aHolder.Reset();
- if( bCalcFrm )
+ if( bCalcFrame )
{
// - format parent Writer
// fly frame, if it isn't been formatted yet.
// Note: The Writer fly frame could be the frame itself.
- SwFlyFrm* pFlyFrm( pTmpFrm->FindFlyFrm() );
- if ( pFlyFrm &&
- pFlyFrm->Frm().Pos().X() == FAR_AWAY &&
- pFlyFrm->Frm().Pos().Y() == FAR_AWAY )
+ SwFlyFrame* pFlyFrame( pTmpFrame->FindFlyFrame() );
+ if ( pFlyFrame &&
+ pFlyFrame->Frame().Pos().X() == FAR_AWAY &&
+ pFlyFrame->Frame().Pos().Y() == FAR_AWAY )
{
- SwObjectFormatter::FormatObj( *pFlyFrm );
+ SwObjectFormatter::FormatObj( *pFlyFrame );
}
- pTmpFrm->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : nullptr);
+ pTmpFrame->Calc(pLayout ? pLayout->GetCurrShell()->GetOut() : nullptr);
}
- // aIter.IsChanged checks if the current pTmpFrm has been deleted while
+ // aIter.IsChanged checks if the current pTmpFrame has been deleted while
// it is the current iterator
- // FrmHolder watches for deletion of the current pMinFrm
- if( aIter.IsChanged() || ( aHolder.IsSet() && !aHolder.GetFrm() ) )
+ // FrameHolder watches for deletion of the current pMinFrame
+ if( aIter.IsChanged() || ( aHolder.IsSet() && !aHolder.GetFrame() ) )
{
// restart iteration
bClientIterChanged = true;
@@ -3329,17 +3329,17 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
}
// for Flys go via the parent if the Fly is not yet "formatted"
- if( !bCalcFrm && pTmpFrm->GetType() & FRM_FLY &&
- static_cast<SwFlyFrm*>(pTmpFrm)->GetAnchorFrm() &&
- FAR_AWAY == pTmpFrm->Frm().Pos().getX() &&
- FAR_AWAY == pTmpFrm->Frm().Pos().getY() )
- aCalcRect = static_cast<SwFlyFrm*>(pTmpFrm)->GetAnchorFrm()->Frm();
+ if( !bCalcFrame && pTmpFrame->GetType() & FRM_FLY &&
+ static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame() &&
+ FAR_AWAY == pTmpFrame->Frame().Pos().getX() &&
+ FAR_AWAY == pTmpFrame->Frame().Pos().getY() )
+ aCalcRect = static_cast<SwFlyFrame*>(pTmpFrame)->GetAnchorFrame()->Frame();
else
- aCalcRect = pTmpFrm->Frm();
+ aCalcRect = pTmpFrame->Frame();
if ( aCalcRect.IsInside( *pPoint ) )
{
- pMinFrm = pTmpFrm;
+ pMinFrame = pTmpFrame;
break;
}
@@ -3347,26 +3347,26 @@ SwFrm* GetFrmOfModify( const SwRootFrm* pLayout, SwModify const& rMod, sal_uInt1
const Point aCalcRectCenter = aCalcRect.Center();
const Point aDiff = aCalcRectCenter - *pPoint;
const sal_uInt64 nCurrentDist = sal_Int64(aDiff.getX()) * sal_Int64(aDiff.getX()) + sal_Int64(aDiff.getY()) * sal_Int64(aDiff.getY()); // opt: no sqrt
- if ( !pMinFrm || nCurrentDist < nMinDist )
+ if ( !pMinFrame || nCurrentDist < nMinDist )
{
- pMinFrm = pTmpFrm;
+ pMinFrame = pTmpFrame;
nMinDist = nCurrentDist;
}
}
else
{
// if no pPoint is provided, take the first one
- pMinFrm = pTmpFrm;
+ pMinFrame = pTmpFrame;
break;
}
}
}
} while( bClientIterChanged );
- if( pPos && pMinFrm && pMinFrm->IsTextFrm() )
- return static_cast<SwTextFrm*>(pMinFrm)->GetFrmAtPos( *pPos );
+ if( pPos && pMinFrame && pMinFrame->IsTextFrame() )
+ return static_cast<SwTextFrame*>(pMinFrame)->GetFrameAtPos( *pPos );
- return pMinFrm;
+ return pMinFrame;
}
bool IsExtraData( const SwDoc *pDoc )
@@ -3379,28 +3379,28 @@ bool IsExtraData( const SwDoc *pDoc )
}
// OD 22.09.2003 #110978#
-const SwRect SwPageFrm::PrtWithoutHeaderAndFooter() const
+const SwRect SwPageFrame::PrtWithoutHeaderAndFooter() const
{
SwRect aPrtWithoutHeaderFooter( Prt() );
- aPrtWithoutHeaderFooter.Pos() += Frm().Pos();
+ aPrtWithoutHeaderFooter.Pos() += Frame().Pos();
- const SwFrm* pLowerFrm = Lower();
- while ( pLowerFrm )
+ const SwFrame* pLowerFrame = Lower();
+ while ( pLowerFrame )
{
// Note: independent on text direction page header and page footer are
// always at top respectively at bottom of the page frame.
- if ( pLowerFrm->IsHeaderFrm() )
+ if ( pLowerFrame->IsHeaderFrame() )
{
aPrtWithoutHeaderFooter.Top( aPrtWithoutHeaderFooter.Top() +
- pLowerFrm->Frm().Height() );
+ pLowerFrame->Frame().Height() );
}
- if ( pLowerFrm->IsFooterFrm() )
+ if ( pLowerFrame->IsFooterFrame() )
{
aPrtWithoutHeaderFooter.Bottom( aPrtWithoutHeaderFooter.Bottom() -
- pLowerFrm->Frm().Height() );
+ pLowerFrame->Frame().Height() );
}
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
return aPrtWithoutHeaderFooter;
@@ -3412,45 +3412,45 @@ const SwRect SwPageFrm::PrtWithoutHeaderAndFooter() const
OD 2009-08-28 #i102458#
Add output parameter <obIsLineSpacingProportional>
*/
-void GetSpacingValuesOfFrm( const SwFrm& rFrm,
+void GetSpacingValuesOfFrame( const SwFrame& rFrame,
SwTwips& onLowerSpacing,
SwTwips& onLineSpacing,
bool& obIsLineSpacingProportional )
{
- if ( !rFrm.IsFlowFrm() )
+ if ( !rFrame.IsFlowFrame() )
{
onLowerSpacing = 0;
onLineSpacing = 0;
}
else
{
- const SvxULSpaceItem& rULSpace = rFrm.GetAttrSet()->GetULSpace();
+ const SvxULSpaceItem& rULSpace = rFrame.GetAttrSet()->GetULSpace();
onLowerSpacing = rULSpace.GetLower();
onLineSpacing = 0;
obIsLineSpacingProportional = false;
- if ( rFrm.IsTextFrm() )
+ if ( rFrame.IsTextFrame() )
{
- onLineSpacing = static_cast<const SwTextFrm&>(rFrm).GetLineSpace();
+ onLineSpacing = static_cast<const SwTextFrame&>(rFrame).GetLineSpace();
obIsLineSpacingProportional =
onLineSpacing != 0 &&
- static_cast<const SwTextFrm&>(rFrm).GetLineSpace( true ) == 0;
+ static_cast<const SwTextFrame&>(rFrame).GetLineSpace( true ) == 0;
}
OSL_ENSURE( onLowerSpacing >= 0 && onLineSpacing >= 0,
- "<GetSpacingValuesOfFrm(..)> - spacing values aren't positive!" );
+ "<GetSpacingValuesOfFrame(..)> - spacing values aren't positive!" );
}
}
/// get the content of the table cell, skipping content from nested tables
-const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell )
+const SwContentFrame* GetCellContent( const SwLayoutFrame& rCell )
{
- const SwContentFrm* pContent = rCell.ContainsContent();
- const SwTabFrm* pTab = rCell.FindTabFrm();
+ const SwContentFrame* pContent = rCell.ContainsContent();
+ const SwTabFrame* pTab = rCell.FindTabFrame();
while ( pContent && rCell.IsAnLower( pContent ) )
{
- const SwTabFrm* pTmpTab = pContent->FindTabFrm();
+ const SwTabFrame* pTmpTab = pContent->FindTabFrame();
if ( pTmpTab != pTab )
{
pContent = pTmpTab->FindLastContent();
@@ -3468,14 +3468,14 @@ const SwContentFrm* GetCellContent( const SwLayoutFrm& rCell )
/// Can be used to check if a frame has been deleted
bool SwDeletionChecker::HasBeenDeleted()
{
- if ( !mpFrm || !mpRegIn )
+ if ( !mpFrame || !mpRegIn )
return false;
- SwIterator<SwFrm,SwModify> aIter(*mpRegIn);
- SwFrm* pLast = aIter.First();
+ SwIterator<SwFrame,SwModify> aIter(*mpRegIn);
+ SwFrame* pLast = aIter.First();
while ( pLast )
{
- if ( pLast == mpFrm )
+ if ( pLast == mpFrame )
return false;
pLast = aIter.Next();
}
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 9e9b019ba632..734367a39b02 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -55,43 +55,43 @@ static sal_uLong lcl_FindFootnotePos( const SwDoc *pDoc, const SwTextFootnote *p
return 0;
}
-bool SwFootnoteFrm::operator<( const SwTextFootnote* pTextFootnote ) const
+bool SwFootnoteFrame::operator<( const SwTextFootnote* pTextFootnote ) const
{
const SwDoc* pDoc = GetFormat()->GetDoc();
- OSL_ENSURE( pDoc, "SwFootnoteFrm: Missing doc!" );
+ OSL_ENSURE( pDoc, "SwFootnoteFrame: Missing doc!" );
return lcl_FindFootnotePos( pDoc, GetAttr() ) <
lcl_FindFootnotePos( pDoc, pTextFootnote );
}
/*
|*
-|* bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* pBoss, SwPageFrm* pPage)
-|* sets pBoss on the next SwFootnoteBossFrm, which can either be a column
+|* bool lcl_NextFootnoteBoss( SwFootnoteBossFrame* pBoss, SwPageFrame* pPage)
+|* sets pBoss on the next SwFootnoteBossFrame, which can either be a column
|* or a page (without columns). If the page changes meanwhile,
|* pPage contains the new page and this function returns true.
|*
|*/
-static bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* &rpBoss, SwPageFrm* &rpPage,
+static bool lcl_NextFootnoteBoss( SwFootnoteBossFrame* &rpBoss, SwPageFrame* &rpPage,
bool bDontLeave )
{
- if( rpBoss->IsColumnFrm() )
+ if( rpBoss->IsColumnFrame() )
{
if( rpBoss->GetNext() )
{
- rpBoss = static_cast<SwFootnoteBossFrm*>(rpBoss->GetNext()); //next column
+ rpBoss = static_cast<SwFootnoteBossFrame*>(rpBoss->GetNext()); //next column
return false;
}
if( rpBoss->IsInSct() )
{
- SwSectionFrm* pSct = rpBoss->FindSctFrm()->GetFollow();
+ SwSectionFrame* pSct = rpBoss->FindSctFrame()->GetFollow();
if( pSct )
{
- OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pSct->Lower() && pSct->Lower()->IsColumnFrame(),
"Where's the column?" );
- rpBoss = static_cast<SwColumnFrm*>(pSct->Lower());
- SwPageFrm* pOld = rpPage;
- rpPage = pSct->FindPageFrm();
+ rpBoss = static_cast<SwColumnFrame*>(pSct->Lower());
+ SwPageFrame* pOld = rpPage;
+ rpPage = pSct->FindPageFrame();
return pOld != rpPage;
}
else if( bDontLeave )
@@ -102,27 +102,27 @@ static bool lcl_NextFootnoteBoss( SwFootnoteBossFrm* &rpBoss, SwPageFrm* &rpPage
}
}
}
- rpPage = static_cast<SwPageFrm*>(rpPage->GetNext()); // next page
+ rpPage = static_cast<SwPageFrame*>(rpPage->GetNext()); // next page
rpBoss = rpPage;
if( rpPage )
{
- SwLayoutFrm* pBody = rpPage->FindBodyCont();
- if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
- rpBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower()); // first column
+ SwLayoutFrame* pBody = rpPage->FindBodyCont();
+ if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
+ rpBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower()); // first column
}
return true;
}
/// @returns column number if pBoss is a column, otherwise 0.
-static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
+static sal_uInt16 lcl_ColumnNum( const SwFrame* pBoss )
{
sal_uInt16 nRet = 0;
- if( !pBoss->IsColumnFrm() )
+ if( !pBoss->IsColumnFrame() )
return 0;
- const SwFrm* pCol;
+ const SwFrame* pCol;
if( pBoss->IsInSct() )
{
- pCol = pBoss->GetUpper()->FindColFrm();
+ pCol = pBoss->GetUpper()->FindColFrame();
if( pBoss->GetNext() || pBoss->GetPrev() )
{
while( pBoss )
@@ -142,34 +142,34 @@ static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss )
return nRet;
}
-SwFootnoteContFrm::SwFootnoteContFrm( SwFrameFormat *pFormat, SwFrm* pSib ):
- SwLayoutFrm( pFormat, pSib )
+SwFootnoteContFrame::SwFootnoteContFrame( SwFrameFormat *pFormat, SwFrame* pSib ):
+ SwLayoutFrame( pFormat, pSib )
{
- mnFrmType = FRM_FTNCONT;
+ mnFrameType = FRM_FTNCONT;
}
-// lcl_Undersize(..) walks over a SwFrm and its contents
-// and returns the sum of all requested TextFrm magnifications.
+// lcl_Undersize(..) walks over a SwFrame and its contents
+// and returns the sum of all requested TextFrame magnifications.
-static long lcl_Undersize( const SwFrm* pFrm )
+static long lcl_Undersize( const SwFrame* pFrame )
{
long nRet = 0;
- SWRECTFN( pFrm )
- if( pFrm->IsTextFrm() )
+ SWRECTFN( pFrame )
+ if( pFrame->IsTextFrame() )
{
- if( static_cast<const SwTextFrm*>(pFrm)->IsUndersized() )
+ if( static_cast<const SwTextFrame*>(pFrame)->IsUndersized() )
{
- // Does this TextFrm would like to be a little bit bigger?
- nRet = static_cast<const SwTextFrm*>(pFrm)->GetParHeight() -
- (pFrm->Prt().*fnRect->fnGetHeight)();
+ // Does this TextFrame would like to be a little bit bigger?
+ nRet = static_cast<const SwTextFrame*>(pFrame)->GetParHeight() -
+ (pFrame->Prt().*fnRect->fnGetHeight)();
if( nRet < 0 )
nRet = 0;
}
}
- else if( pFrm->IsLayoutFrm() )
+ else if( pFrame->IsLayoutFrame() )
{
- const SwFrm* pNxt = static_cast<const SwLayoutFrm*>(pFrm)->Lower();
+ const SwFrame* pNxt = static_cast<const SwLayoutFrame*>(pFrame)->Lower();
while( pNxt )
{
nRet += lcl_Undersize( pNxt );
@@ -180,10 +180,10 @@ static long lcl_Undersize( const SwFrm* pFrm )
}
/// "format" the frame (Fixsize is not set here).
-void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
+void SwFootnoteContFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
// calculate total border, only one distance to the top
- const SwPageFrm* pPage = FindPageFrm();
+ const SwPageFrame* pPage = FindPageFrame();
const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo();
const SwTwips nBorder = rInf.GetTopDist() + rInf.GetBottomDist() +
rInf.GetLineWidth();
@@ -192,8 +192,8 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
{
mbValidPrtArea = true;
(Prt().*fnRect->fnSetTop)( nBorder );
- (Prt().*fnRect->fnSetWidth)( (Frm().*fnRect->fnGetWidth)() );
- (Prt().*fnRect->fnSetHeight)((Frm().*fnRect->fnGetHeight)() - nBorder );
+ (Prt().*fnRect->fnSetWidth)( (Frame().*fnRect->fnGetWidth)() );
+ (Prt().*fnRect->fnSetHeight)((Frame().*fnRect->fnGetHeight)() - nBorder );
if( (Prt().*fnRect->fnGetHeight)() < 0 && !pPage->IsFootnotePage() )
mbValidSize = false;
}
@@ -203,7 +203,7 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
bool bGrow = pPage->IsFootnotePage();
if( bGrow )
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
+ const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
bGrow = false;
}
@@ -213,14 +213,14 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
{
// VarSize is determined based on the content plus the borders
SwTwips nRemaining = 0;
- SwFrm *pFrm = m_pLower;
- while ( pFrm )
- { // lcl_Undersize(..) respects (recursively) TextFrms, which
+ SwFrame *pFrame = m_pLower;
+ while ( pFrame )
+ { // lcl_Undersize(..) respects (recursively) TextFrames, which
// would like to be bigger. They are created especially in
// columnized borders, if these do not have their maximum
// size yet.
- nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)() + lcl_Undersize( pFrm );
- pFrm = pFrm->GetNext();
+ nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)() + lcl_Undersize( pFrame );
+ pFrame = pFrame->GetNext();
}
// add the own border
nRemaining += nBorder;
@@ -228,17 +228,17 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
SwTwips nDiff;
if( IsInSct() )
{
- nDiff = -(Frm().*fnRect->fnBottomDist)(
+ nDiff = -(Frame().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
if( nDiff > 0 )
{
- if( nDiff > (Frm().*fnRect->fnGetHeight)() )
- nDiff = (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnAddBottom)( -nDiff );
+ if( nDiff > (Frame().*fnRect->fnGetHeight)() )
+ nDiff = (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnAddBottom)( -nDiff );
(Prt().*fnRect->fnAddHeight)( -nDiff );
}
}
- nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining;
+ nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -260,23 +260,23 @@ void SwFootnoteContFrm::Format( vcl::RenderContext* /*pRenderContext*/, const Sw
}
}
-SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
+SwTwips SwFootnoteContFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
{
// No check if FixSize since FootnoteContainer are variable up to their max. height.
// If the max. height is LONG_MAX, take as much space as needed.
// If the page is a special footnote page, take also as much as possible.
- assert(GetUpper() && GetUpper()->IsFootnoteBossFrm());
+ assert(GetUpper() && GetUpper()->IsFootnoteBossFrame());
SWRECTFN( this )
- if( (Frm().*fnRect->fnGetHeight)() > 0 &&
- nDist > ( LONG_MAX - (Frm().*fnRect->fnGetHeight)() ) )
- nDist = LONG_MAX - (Frm().*fnRect->fnGetHeight)();
+ if( (Frame().*fnRect->fnGetHeight)() > 0 &&
+ nDist > ( LONG_MAX - (Frame().*fnRect->fnGetHeight)() ) )
+ nDist = LONG_MAX - (Frame().*fnRect->fnGetHeight)();
- SwFootnoteBossFrm *pBoss = static_cast<SwFootnoteBossFrm*>(GetUpper());
+ SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper());
if( IsInSct() )
{
- SwSectionFrm* pSect = FindSctFrm();
- OSL_ENSURE( pSect, "GrowFrm: Missing SectFrm" );
+ SwSectionFrame* pSect = FindSctFrame();
+ OSL_ENSURE( pSect, "GrowFrame: Missing SectFrame" );
// In a section, which has to maximize, a footnotecontainer is allowed
// to grow, when the section can't grow anymore.
if( !bTst && !pSect->IsColLocked() &&
@@ -286,15 +286,15 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
return 0;
}
}
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
+ const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
- SwPageFrm *pPage = pBoss->FindPageFrm();
+ SwPageFrame *pPage = pBoss->FindPageFrame();
if ( bBrowseMode || !pPage->IsFootnotePage() )
{
if ( pBoss->GetMaxFootnoteHeight() != LONG_MAX )
{
nDist = std::min( nDist, pBoss->GetMaxFootnoteHeight()
- - (Frm().*fnRect->fnGetHeight)() );
+ - (Frame().*fnRect->fnGetHeight)() );
if ( nDist <= 0 )
return 0L;
}
@@ -308,17 +308,17 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
return 0L;
}
}
- else if( nDist > (GetPrev()->Frm().*fnRect->fnGetHeight)() )
+ else if( nDist > (GetPrev()->Frame().*fnRect->fnGetHeight)() )
// do not use more space than the body has
- nDist = (GetPrev()->Frm().*fnRect->fnGetHeight)();
+ nDist = (GetPrev()->Frame().*fnRect->fnGetHeight)();
long nAvail = 0;
if ( bBrowseMode )
{
nAvail = GetUpper()->Prt().Height();
- const SwFrm *pAvail = GetUpper()->Lower();
+ const SwFrame *pAvail = GetUpper()->Lower();
do
- { nAvail -= pAvail->Frm().Height();
+ { nAvail -= pAvail->Frame().Height();
pAvail = pAvail->GetNext();
} while ( pAvail );
if ( nAvail > nDist )
@@ -327,10 +327,10 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
if ( !bTst )
{
- (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() + nDist );
+ (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() + nDist );
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frm().Pos().X() -= nDist;
+ Frame().Pos().X() -= nDist;
}
long nGrow = nDist - nAvail,
nReal = 0;
@@ -343,12 +343,12 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
{
if( NA_GROW_ADJUST == nAdjust )
{
- SwFrm* pFootnote = Lower();
+ SwFrame* pFootnote = Lower();
if( pFootnote )
{
while( pFootnote->GetNext() )
pFootnote = pFootnote->GetNext();
- if( static_cast<SwFootnoteFrm*>(pFootnote)->GetAttr()->GetFootnote().IsEndNote() )
+ if( static_cast<SwFootnoteFrame*>(pFootnote)->GetAttr()->GetFootnote().IsEndNote() )
{
nReal = AdjustNeighbourhood( nGrow, bTst );
nAdjust = NA_GROW_SHRINK; // no more AdjustNeighbourhood
@@ -370,10 +370,10 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
{
nDist -= nReal;
// We can only respect the boundless wish so much
- Frm().SSize().Height() -= nDist;
+ Frame().SSize().Height() -= nDist;
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frm().Pos().X() += nDist;
+ Frame().Pos().X() += nDist;
}
// growing happens upwards, so successors to not need to be invalidated
@@ -387,9 +387,9 @@ SwTwips SwFootnoteContFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
return nReal;
}
-SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo )
+SwTwips SwFootnoteContFrame::ShrinkFrame( SwTwips nDiff, bool bTst, bool bInfo )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
bool bShrink = false;
if ( pPage )
{
@@ -397,16 +397,16 @@ SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo )
bShrink = true;
else
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
bShrink = true;
}
}
if( bShrink )
{
- SwTwips nRet = SwLayoutFrm::ShrinkFrm( nDiff, bTst, bInfo );
+ SwTwips nRet = SwLayoutFrame::ShrinkFrame( nDiff, bTst, bInfo );
if( IsInSct() && !bTst )
- FindSctFrm()->InvalidateNextPos();
+ FindSctFrame()->InvalidateNextPos();
if ( !bTst && nRet )
{
_InvalidatePos();
@@ -417,8 +417,8 @@ SwTwips SwFootnoteContFrm::ShrinkFrm( SwTwips nDiff, bool bTst, bool bInfo )
return 0;
}
-SwFootnoteFrm::SwFootnoteFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwContentFrm *pCnt, SwTextFootnote *pAt ):
- SwLayoutFrm( pFormat, pSib ),
+SwFootnoteFrame::SwFootnoteFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwContentFrame *pCnt, SwTextFootnote *pAt ):
+ SwLayoutFrame( pFormat, pSib ),
pFollow( nullptr ),
pMaster( nullptr ),
pRef( pCnt ),
@@ -427,23 +427,23 @@ SwFootnoteFrm::SwFootnoteFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwContentFrm
// #i49383#
mbUnlockPosOfLowerObjs( true )
{
- mnFrmType = FRM_FTN;
+ mnFrameType = FRM_FTN;
}
-void SwFootnoteFrm::InvalidateNxtFootnoteCnts( SwPageFrm *pPage )
+void SwFootnoteFrame::InvalidateNxtFootnoteCnts( SwPageFrame *pPage )
{
if ( GetNext() )
{
- SwFrm *pCnt = static_cast<SwLayoutFrm*>(GetNext())->ContainsAny();
+ SwFrame *pCnt = static_cast<SwLayoutFrame*>(GetNext())->ContainsAny();
if( pCnt )
{
pCnt->InvalidatePage( pPage );
pCnt->_InvalidatePrt();
do
{ pCnt->_InvalidatePos();
- if( pCnt->IsSctFrm() )
+ if( pCnt->IsSctFrame() )
{
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny();
if( pTmp )
pTmp->_InvalidatePos();
}
@@ -455,7 +455,7 @@ void SwFootnoteFrm::InvalidateNxtFootnoteCnts( SwPageFrm *pPage )
}
#ifdef DBG_UTIL
-SwTwips SwFootnoteFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwFootnoteFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
static sal_uInt16 nNum = USHRT_MAX;
SwTextFootnote* pTextFootnote = GetAttr();
@@ -465,10 +465,10 @@ SwTwips SwFootnoteFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
(void)bla;
}
- return SwLayoutFrm::GrowFrm( nDist, bTst, bInfo );
+ return SwLayoutFrame::GrowFrame( nDist, bTst, bInfo );
}
-SwTwips SwFootnoteFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwFootnoteFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
static sal_uInt16 nNum = USHRT_MAX;
if( nNum != USHRT_MAX )
@@ -480,11 +480,11 @@ SwTwips SwFootnoteFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
(void)bla;
}
}
- return SwLayoutFrm::ShrinkFrm( nDist, bTst, bInfo );
+ return SwLayoutFrame::ShrinkFrame( nDist, bTst, bInfo );
}
#endif
-void SwFootnoteFrm::Cut()
+void SwFootnoteFrame::Cut()
{
if ( GetNext() )
GetNext()->InvalidatePos();
@@ -492,10 +492,10 @@ void SwFootnoteFrm::Cut()
GetPrev()->SetRetouche();
// first move then shrink Upper
- SwLayoutFrm *pUp = GetUpper();
+ SwLayoutFrame *pUp = GetUpper();
// correct chaining
- SwFootnoteFrm *pFootnote = this;
+ SwFootnoteFrame *pFootnote = this;
if ( pFootnote->GetFollow() )
pFootnote->GetFollow()->SetMaster( pFootnote->GetMaster() );
if ( pFootnote->GetMaster() )
@@ -511,83 +511,83 @@ void SwFootnoteFrm::Cut()
// The last footnote takes its container along
if ( !pUp->Lower() )
{
- SwPageFrm *pPage = pUp->FindPageFrm();
+ SwPageFrame *pPage = pUp->FindPageFrame();
if ( pPage )
{
- SwLayoutFrm *pBody = pPage->FindBodyCont();
+ SwLayoutFrame *pBody = pPage->FindBodyCont();
if( pBody && !pBody->ContainsContent() )
- pPage->getRootFrm()->SetSuperfluous();
+ pPage->getRootFrame()->SetSuperfluous();
}
- SwSectionFrm* pSect = pUp->FindSctFrm();
+ SwSectionFrame* pSect = pUp->FindSctFrame();
pUp->Cut();
- SwFrm::DestroyFrm(pUp);
+ SwFrame::DestroyFrame(pUp);
// If the last footnote container was removed from a column
// section without a Follow, then this section can be shrunk.
if( pSect && !pSect->ToMaximize( false ) && !pSect->IsColLocked() )
pSect->_InvalidateSize();
}
else
- { if ( Frm().Height() )
- pUp->Shrink( Frm().Height() );
+ { if ( Frame().Height() )
+ pUp->Shrink( Frame().Height() );
pUp->SetCompletePaint();
pUp->InvalidatePage();
}
}
}
-void SwFootnoteFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
+void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
{
OSL_ENSURE( pParent, "no parent in Paste." );
- OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." );
+ OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." );
OSL_ENSURE( pParent != this, "I am my own parent." );
OSL_ENSURE( pSibling != this, "I am my own sibling." );
OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"I am still somewhere registered." );
// insert into tree structure
- InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling );
+ InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
SWRECTFN( this )
- if( (Frm().*fnRect->fnGetWidth)()!=(pParent->Prt().*fnRect->fnGetWidth)() )
+ if( (Frame().*fnRect->fnGetWidth)()!=(pParent->Prt().*fnRect->fnGetWidth)() )
_InvalidateSize();
_InvalidatePos();
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( GetNext() )
GetNext()->_InvalidatePos();
- if( (Frm().*fnRect->fnGetHeight)() )
- pParent->Grow( (Frm().*fnRect->fnGetHeight)() );
+ if( (Frame().*fnRect->fnGetHeight)() )
+ pParent->Grow( (Frame().*fnRect->fnGetHeight)() );
// If the predecessor is the master and/or the successor is the Follow,
// then take their content and destroy them.
if ( GetPrev() && GetPrev() == GetMaster() )
- { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetPrev()->GetLower() ),
+ { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetPrev()->GetLower() ),
"Footnote without content?" );
- (SwFlowFrm::CastFlowFrm( GetPrev()->GetLower()))->
+ (SwFlowFrame::CastFlowFrame( GetPrev()->GetLower()))->
MoveSubTree( this, GetLower() );
- SwFrm *pDel = GetPrev();
+ SwFrame *pDel = GetPrev();
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
if ( GetNext() && GetNext() == GetFollow() )
- { OSL_ENSURE( SwFlowFrm::CastFlowFrm( GetNext()->GetLower() ),
+ { OSL_ENSURE( SwFlowFrame::CastFlowFrame( GetNext()->GetLower() ),
"Footnote without content?" );
- (SwFlowFrm::CastFlowFrm( GetNext()->GetLower()))->MoveSubTree( this );
- SwFrm *pDel = GetNext();
+ (SwFlowFrame::CastFlowFrame( GetNext()->GetLower()))->MoveSubTree( this );
+ SwFrame *pDel = GetNext();
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
#if OSL_DEBUG_LEVEL > 0
SwDoc *pDoc = GetFormat()->GetDoc();
if ( GetPrev() )
{
- OSL_ENSURE( lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrm*>(GetPrev())->GetAttr() ) <=
+ OSL_ENSURE( lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrame*>(GetPrev())->GetAttr() ) <=
lcl_FindFootnotePos( pDoc, GetAttr() ), "Prev is not FootnotePrev" );
}
if ( GetNext() )
{
OSL_ENSURE( lcl_FindFootnotePos( pDoc, GetAttr() ) <=
- lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrm*>(GetNext())->GetAttr() ),
+ lcl_FindFootnotePos( pDoc, static_cast<SwFootnoteFrame*>(GetNext())->GetAttr() ),
"Next is not FootnoteNext" );
}
#endif
@@ -596,25 +596,25 @@ void SwFootnoteFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
/// Return the next layout leaf in that the frame can be moved.
/// New pages will only be created if specified by the parameter.
-SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
+SwLayoutFrame *SwFrame::GetNextFootnoteLeaf( MakePageType eMakePage )
{
- SwFootnoteBossFrm *pOldBoss = FindFootnoteBossFrm();
- SwPageFrm* pOldPage = pOldBoss->FindPageFrm();
- SwPageFrm* pPage;
- SwFootnoteBossFrm *pBoss = pOldBoss->IsColumnFrm() ?
- static_cast<SwFootnoteBossFrm*>(pOldBoss->GetNext()) : nullptr; // next column, if existing
+ SwFootnoteBossFrame *pOldBoss = FindFootnoteBossFrame();
+ SwPageFrame* pOldPage = pOldBoss->FindPageFrame();
+ SwPageFrame* pPage;
+ SwFootnoteBossFrame *pBoss = pOldBoss->IsColumnFrame() ?
+ static_cast<SwFootnoteBossFrame*>(pOldBoss->GetNext()) : nullptr; // next column, if existing
if( pBoss )
pPage = nullptr;
else
{
- if( pOldBoss->GetUpper()->IsSctFrm() )
+ if( pOldBoss->GetUpper()->IsSctFrame() )
{ // this can only be in a column area
- SwLayoutFrm* pNxt = pOldBoss->GetNextSctLeaf( eMakePage );
+ SwLayoutFrame* pNxt = pOldBoss->GetNextSctLeaf( eMakePage );
if( pNxt )
{
- OSL_ENSURE( pNxt->IsColBodyFrm(), "GetNextFootnoteLeaf: Funny Leaf" );
- pBoss = static_cast<SwFootnoteBossFrm*>(pNxt->GetUpper());
- pPage = pBoss->FindPageFrm();
+ OSL_ENSURE( pNxt->IsColBodyFrame(), "GetNextFootnoteLeaf: Funny Leaf" );
+ pBoss = static_cast<SwFootnoteBossFrame*>(pNxt->GetUpper());
+ pPage = pBoss->FindPageFrame();
}
else
return nullptr;
@@ -622,10 +622,10 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
else
{
// next page
- pPage = static_cast<SwPageFrm*>(pOldPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pOldPage->GetNext());
// skip empty pages
if( pPage && pPage->IsEmptyPage() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
pBoss = pPage;
}
}
@@ -637,16 +637,16 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
// If the footnote has already a Follow we do not need to search.
// However, if there are unwanted empty columns/pages between Footnote and Follow,
// create another Follow on the next best column/page and the rest will sort itself out.
- SwFootnoteFrm *pFootnote = FindFootnoteFrm();
+ SwFootnoteFrame *pFootnote = FindFootnoteFrame();
if ( pFootnote && pFootnote->GetFollow() )
{
- SwFootnoteBossFrm* pTmpBoss = pFootnote->GetFollow()->FindFootnoteBossFrm();
+ SwFootnoteBossFrame* pTmpBoss = pFootnote->GetFollow()->FindFootnoteBossFrame();
// Following cases will be handled:
// 1. both "FootnoteBoss"es are neighboring columns/pages
// 2. the new one is the first column of a neighboring page
// 3. the new one is the first column in a section of the next page
while( pTmpBoss != pBoss && pTmpBoss && !pTmpBoss->GetPrev() )
- pTmpBoss = pTmpBoss->GetUpper()->FindFootnoteBossFrm();
+ pTmpBoss = pTmpBoss->GetUpper()->FindFootnoteBossFrame();
if( pTmpBoss == pBoss )
return pFootnote->GetFollow();
}
@@ -657,20 +657,20 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
if ( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT )
{
pBoss = InsertPage( pOldPage, pOldPage->IsFootnotePage() );
- static_cast<SwPageFrm*>(pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() );
+ static_cast<SwPageFrame*>(pBoss)->SetEndNotePage( pOldPage->IsEndNotePage() );
}
else
return nullptr;
}
- if( pBoss->IsPageFrm() )
+ if( pBoss->IsPageFrame() )
{
// If this page has columns, then go to the first one
- SwLayoutFrm* pLay = pBoss->FindBodyCont();
- if( pLay && pLay->Lower() && pLay->Lower()->IsColumnFrm() )
- pBoss = static_cast<SwFootnoteBossFrm*>(pLay->Lower());
+ SwLayoutFrame* pLay = pBoss->FindBodyCont();
+ if( pLay && pLay->Lower() && pLay->Lower()->IsColumnFrame() )
+ pBoss = static_cast<SwFootnoteBossFrame*>(pLay->Lower());
}
// found column/page - add myself
- SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont();
if ( !pCont && pBoss->GetMaxFootnoteHeight() &&
( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) )
pCont = pBoss->MakeFootnoteCont();
@@ -678,15 +678,15 @@ SwLayoutFrm *SwFrm::GetNextFootnoteLeaf( MakePageType eMakePage )
}
/// Get the preceding layout leaf in that the frame can be moved.
-SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
+SwLayoutFrame *SwFrame::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
{
// The predecessor of a footnote is (if possible)
// the master of the chain of the footnote.
- SwFootnoteFrm *pFootnote = FindFootnoteFrm();
- SwLayoutFrm *pRet = pFootnote->GetMaster();
+ SwFootnoteFrame *pFootnote = FindFootnoteFrame();
+ SwLayoutFrame *pRet = pFootnote->GetMaster();
- SwFootnoteBossFrm* pOldBoss = FindFootnoteBossFrm();
- SwPageFrm *pOldPage = pOldBoss->FindPageFrm();
+ SwFootnoteBossFrame* pOldBoss = FindFootnoteBossFrame();
+ SwPageFrame *pOldPage = pOldBoss->FindPageFrame();
if ( !pOldBoss->GetPrev() && !pOldPage->GetPrev() )
return pRet; // there is neither a predecessor column nor page
@@ -694,16 +694,16 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
if ( !pRet )
{
bool bEndn = pFootnote->GetAttr()->GetFootnote().IsEndNote();
- SwFrm* pTmpRef = nullptr;
+ SwFrame* pTmpRef = nullptr;
if( bEndn && pFootnote->IsInSct() )
{
- SwSectionFrm* pSect = pFootnote->FindSctFrm();
+ SwSectionFrame* pSect = pFootnote->FindSctFrame();
if( pSect->IsEndnAtEnd() )
pTmpRef = pSect->FindLastContent( FINDMODE_LASTCNT );
}
if( !pTmpRef )
pTmpRef = pFootnote->GetRef();
- SwFootnoteBossFrm* pStop = pTmpRef->FindFootnoteBossFrm( !bEndn );
+ SwFootnoteBossFrame* pStop = pTmpRef->FindFootnoteBossFrame( !bEndn );
const sal_uInt16 nNum = pStop->GetPhyPageNum();
@@ -711,17 +711,17 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
// be shown at the document ending or the footnote is an endnote.
const bool bEndNote = pOldPage->IsEndNotePage();
const bool bFootnoteEndDoc = pOldPage->IsFootnotePage();
- SwFootnoteBossFrm* pNxtBoss = pOldBoss;
- SwSectionFrm *pSect = pNxtBoss->GetUpper()->IsSctFrm() ?
- static_cast<SwSectionFrm*>(pNxtBoss->GetUpper()) : nullptr;
+ SwFootnoteBossFrame* pNxtBoss = pOldBoss;
+ SwSectionFrame *pSect = pNxtBoss->GetUpper()->IsSctFrame() ?
+ static_cast<SwSectionFrame*>(pNxtBoss->GetUpper()) : nullptr;
do
{
- if( pNxtBoss->IsColumnFrm() && pNxtBoss->GetPrev() )
- pNxtBoss = static_cast<SwFootnoteBossFrm*>(pNxtBoss->GetPrev()); // one column backwards
+ if( pNxtBoss->IsColumnFrame() && pNxtBoss->GetPrev() )
+ pNxtBoss = static_cast<SwFootnoteBossFrame*>(pNxtBoss->GetPrev()); // one column backwards
else // one page backwards
{
- SwLayoutFrm* pBody = nullptr;
+ SwLayoutFrame* pBody = nullptr;
if( pSect )
{
if( pSect->IsFootnoteLock() )
@@ -735,15 +735,15 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
pSect = pSect->FindMaster();
if( !pSect || !pSect->Lower() )
return nullptr;
- OSL_ENSURE( pSect->Lower()->IsColumnFrm(),
+ OSL_ENSURE( pSect->Lower()->IsColumnFrame(),
"GetPrevFootnoteLeaf: Where's the column?" );
- pNxtBoss = static_cast<SwFootnoteBossFrm*>(pSect->Lower());
+ pNxtBoss = static_cast<SwFootnoteBossFrame*>(pSect->Lower());
pBody = pSect;
}
}
else
{
- SwPageFrm* pPage = static_cast<SwPageFrm*>(pNxtBoss->FindPageFrm()->GetPrev());
+ SwPageFrame* pPage = static_cast<SwPageFrame*>(pNxtBoss->FindPageFrame()->GetPrev());
if( !pPage || pPage->GetPhyPageNum() < nNum ||
bEndNote != pPage->IsEndNotePage() || bFootnoteEndDoc != pPage->IsFootnotePage() )
return nullptr; // no further pages found
@@ -753,13 +753,13 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
// We have the previous page, we might need to find the last column of it
if( pBody )
{
- if ( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
+ if ( pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
- pNxtBoss = static_cast<SwFootnoteBossFrm*>(pBody->GetLastLower());
+ pNxtBoss = static_cast<SwFootnoteBossFrame*>(pBody->GetLastLower());
}
}
}
- SwFootnoteContFrm *pCont = pNxtBoss->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pNxtBoss->FindFootnoteCont();
if ( pCont )
{
pRet = pCont;
@@ -777,28 +777,28 @@ SwLayoutFrm *SwFrm::GetPrevFootnoteLeaf( MakePageType eMakeFootnote )
}
if ( pRet )
{
- const SwFootnoteBossFrm* pNewBoss = pRet->FindFootnoteBossFrm();
+ const SwFootnoteBossFrame* pNewBoss = pRet->FindFootnoteBossFrame();
bool bJump = false;
- if( pOldBoss->IsColumnFrm() && pOldBoss->GetPrev() ) // a previous column exists
- bJump = pOldBoss->GetPrev() != static_cast<SwFrm const *>(pNewBoss); // did we chose it?
- else if( pNewBoss->IsColumnFrm() && pNewBoss->GetNext() )
+ if( pOldBoss->IsColumnFrame() && pOldBoss->GetPrev() ) // a previous column exists
+ bJump = pOldBoss->GetPrev() != static_cast<SwFrame const *>(pNewBoss); // did we chose it?
+ else if( pNewBoss->IsColumnFrame() && pNewBoss->GetNext() )
bJump = true; // there is another column after the boss (not the old boss)
else
{
// Will be reached only if old and new boss are both either pages or the last (new)
// or first (old) column of a page. In this case, check if pages were skipped.
- const sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nDiff = pOldPage->GetPhyPageNum() - pRet->FindPageFrame()->GetPhyPageNum();
if ( nDiff > 2 ||
- (nDiff > 1 && !static_cast<SwPageFrm*>(pOldPage->GetPrev())->IsEmptyPage()) )
+ (nDiff > 1 && !static_cast<SwPageFrame*>(pOldPage->GetPrev())->IsEmptyPage()) )
bJump = true;
}
if( bJump )
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
}
return pRet;
}
-bool SwFrm::IsFootnoteAllowed() const
+bool SwFrame::IsFootnoteAllowed() const
{
if ( !IsInDocBody() )
return false;
@@ -806,43 +806,43 @@ bool SwFrm::IsFootnoteAllowed() const
if ( IsInTab() )
{
// no footnotes in repeated headlines
- const SwTabFrm *pTab = const_cast<SwFrm*>(this)->ImplFindTabFrm();
+ const SwTabFrame *pTab = const_cast<SwFrame*>(this)->ImplFindTabFrame();
if ( pTab->IsFollow() )
return !pTab->IsInHeadline( *this );
}
return true;
}
-void SwRootFrm::UpdateFootnoteNums()
+void SwRootFrame::UpdateFootnoteNums()
{
// page numbering only if set at the document
if ( GetFormat()->GetDoc()->GetFootnoteInfo().eNum == FTNNUM_PAGE )
{
- SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower());
while ( pPage && !pPage->IsFootnotePage() )
{
pPage->UpdateFootnoteNum();
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
}
/// remove all footnotes (not the references) and all footnote pages
-void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNotes )
+void sw_RemoveFootnotes( SwFootnoteBossFrame* pBoss, bool bPageOnly, bool bEndNotes )
{
do
{
- SwFootnoteContFrm *pCont = pBoss->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pBoss->FindFootnoteCont();
if ( pCont )
{
- SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower());
OSL_ENSURE( pFootnote, "Footnote content without footnote." );
if ( bPageOnly )
while ( pFootnote->GetMaster() )
pFootnote = pFootnote->GetMaster();
do
{
- SwFootnoteFrm *pNxt = static_cast<SwFootnoteFrm*>(pFootnote->GetNext());
+ SwFootnoteFrame *pNxt = static_cast<SwFootnoteFrame*>(pFootnote->GetNext());
if ( !pFootnote->GetAttr()->GetFootnote().IsEndNote() ||
bEndNotes )
{
@@ -850,7 +850,7 @@ void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNote
if ( bPageOnly && !pNxt )
pNxt = pFootnote->GetFollow();
pFootnote->Cut();
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
}
pFootnote = pNxt;
@@ -861,38 +861,38 @@ void sw_RemoveFootnotes( SwFootnoteBossFrm* pBoss, bool bPageOnly, bool bEndNote
// A sectionframe with the Footnote/EndnAtEnd-flags may contain
// foot/endnotes. If the last lower frame of the bodyframe is
// a multicolumned sectionframe, it may contain footnotes, too.
- SwLayoutFrm* pBody = pBoss->FindBodyCont();
+ SwLayoutFrame* pBody = pBoss->FindBodyCont();
if( pBody && pBody->Lower() )
{
- SwFrm* pLow = pBody->Lower();
+ SwFrame* pLow = pBody->Lower();
while (pLow)
{
- if( pLow->IsSctFrm() && ( !pLow->GetNext() ||
- static_cast<SwSectionFrm*>(pLow)->IsAnyNoteAtEnd() ) &&
- static_cast<SwSectionFrm*>(pLow)->Lower() &&
- static_cast<SwSectionFrm*>(pLow)->Lower()->IsColumnFrm() )
- sw_RemoveFootnotes( static_cast<SwColumnFrm*>(static_cast<SwSectionFrm*>(pLow)->Lower()),
+ if( pLow->IsSctFrame() && ( !pLow->GetNext() ||
+ static_cast<SwSectionFrame*>(pLow)->IsAnyNoteAtEnd() ) &&
+ static_cast<SwSectionFrame*>(pLow)->Lower() &&
+ static_cast<SwSectionFrame*>(pLow)->Lower()->IsColumnFrame() )
+ sw_RemoveFootnotes( static_cast<SwColumnFrame*>(static_cast<SwSectionFrame*>(pLow)->Lower()),
bPageOnly, bEndNotes );
pLow = pLow->GetNext();
}
}
}
// is there another column?
- pBoss = pBoss->IsColumnFrm() ? static_cast<SwColumnFrm*>(pBoss->GetNext()) : nullptr;
+ pBoss = pBoss->IsColumnFrame() ? static_cast<SwColumnFrame*>(pBoss->GetNext()) : nullptr;
} while( pBoss );
}
-void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNotes )
+void SwRootFrame::RemoveFootnotes( SwPageFrame *pPage, bool bPageOnly, bool bEndNotes )
{
if ( !pPage )
- pPage = static_cast<SwPageFrm*>(Lower());
+ pPage = static_cast<SwPageFrame*>(Lower());
do
{ // On columned pages we have to clean up in all columns
- SwFootnoteBossFrm* pBoss;
- SwLayoutFrm* pBody = pPage->FindBodyCont();
- if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
- pBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower()); // the first column
+ SwFootnoteBossFrame* pBoss;
+ SwLayoutFrame* pBody = pPage->FindBodyCont();
+ if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
+ pBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower()); // the first column
else
pBoss = pPage; // no columns
sw_RemoveFootnotes( pBoss, bPageOnly, bEndNotes );
@@ -901,13 +901,13 @@ void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNote
if ( pPage->IsFootnotePage() &&
(!pPage->IsEndNotePage() || bEndNotes) )
{
- SwFrm *pDel = pPage;
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwFrame *pDel = pPage;
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
else
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
else
break;
@@ -916,16 +916,16 @@ void SwRootFrm::RemoveFootnotes( SwPageFrm *pPage, bool bPageOnly, bool bEndNote
}
/// Change the page template of the footnote pages
-void SwRootFrm::CheckFootnotePageDescs( bool bEndNote )
+void SwRootFrame::CheckFootnotePageDescs( bool bEndNote )
{
- SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower());
while ( pPage && !pPage->IsFootnotePage() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
while ( pPage && pPage->IsEndNotePage() != bEndNote )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
if ( pPage )
- SwFrm::CheckPageDescs( pPage, false );
+ SwFrame::CheckPageDescs( pPage, false );
}
/** Insert a footnote container
@@ -936,49 +936,49 @@ void SwRootFrm::CheckFootnotePageDescs( bool bEndNote )
*
* @return footnote container frame
*/
-SwFootnoteContFrm *SwFootnoteBossFrm::MakeFootnoteCont()
+SwFootnoteContFrame *SwFootnoteBossFrame::MakeFootnoteCont()
{
SAL_WARN_IF(FindFootnoteCont(), "sw.core", "footnote container exists already");
- SwFootnoteContFrm *pNew = new SwFootnoteContFrm( GetFormat()->GetDoc()->GetDfltFrameFormat(), this );
- SwLayoutFrm *pLay = FindBodyCont();
+ SwFootnoteContFrame *pNew = new SwFootnoteContFrame( GetFormat()->GetDoc()->GetDfltFrameFormat(), this );
+ SwLayoutFrame *pLay = FindBodyCont();
pNew->Paste( this, pLay->GetNext() );
return pNew;
}
-SwFootnoteContFrm *SwFootnoteBossFrm::FindFootnoteCont()
+SwFootnoteContFrame *SwFootnoteBossFrame::FindFootnoteCont()
{
- SwFrm *pFrm = Lower();
- while( pFrm && !pFrm->IsFootnoteContFrm() )
- pFrm = pFrm->GetNext();
+ SwFrame *pFrame = Lower();
+ while( pFrame && !pFrame->IsFootnoteContFrame() )
+ pFrame = pFrame->GetNext();
#if OSL_DEBUG_LEVEL > 0
- if ( pFrm )
+ if ( pFrame )
{
- SwFrm *pFootnote = pFrm->GetLower();
+ SwFrame *pFootnote = pFrame->GetLower();
OSL_ENSURE( pFootnote, "Content without footnote." );
while ( pFootnote )
{
- OSL_ENSURE( pFootnote->IsFootnoteFrm(), "Neighbor of footnote is not a footnote." );
+ OSL_ENSURE( pFootnote->IsFootnoteFrame(), "Neighbor of footnote is not a footnote." );
pFootnote = pFootnote->GetNext();
}
}
#endif
- return static_cast<SwFootnoteContFrm*>(pFrm);
+ return static_cast<SwFootnoteContFrame*>(pFrame);
}
/// Search the next available footnote container.
-SwFootnoteContFrm *SwFootnoteBossFrm::FindNearestFootnoteCont( bool bDontLeave )
+SwFootnoteContFrame *SwFootnoteBossFrame::FindNearestFootnoteCont( bool bDontLeave )
{
- SwFootnoteContFrm *pCont = nullptr;
+ SwFootnoteContFrame *pCont = nullptr;
if ( !GetFormat()->GetDoc()->GetFootnoteIdxs().empty() )
{
pCont = FindFootnoteCont();
if ( !pCont )
{
- SwPageFrm *pPage = FindPageFrm();
- SwFootnoteBossFrm* pBoss = this;
+ SwPageFrame *pPage = FindPageFrame();
+ SwFootnoteBossFrame* pBoss = this;
bool bEndNote = pPage->IsEndNotePage();
do
{
@@ -992,29 +992,29 @@ SwFootnoteContFrm *SwFootnoteBossFrm::FindNearestFootnoteCont( bool bDontLeave )
return pCont;
}
-SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
+SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote()
{
// search for the nearest footnote container
- SwFootnoteContFrm *pCont = FindNearestFootnoteCont();
+ SwFootnoteContFrame *pCont = FindNearestFootnoteCont();
if ( !pCont )
return nullptr;
// Starting from the first footnote, search the first
// footnote that is referenced by the current column/page
- SwFootnoteFrm *pRet = static_cast<SwFootnoteFrm*>(pCont->Lower());
- const sal_uInt16 nRefNum = FindPageFrm()->GetPhyPageNum();
+ SwFootnoteFrame *pRet = static_cast<SwFootnoteFrame*>(pCont->Lower());
+ const sal_uInt16 nRefNum = FindPageFrame()->GetPhyPageNum();
const sal_uInt16 nRefCol = lcl_ColumnNum( this );
sal_uInt16 nPgNum, nColNum; // page number, column number
- SwFootnoteBossFrm* pBoss;
- SwPageFrm* pPage;
+ SwFootnoteBossFrame* pBoss;
+ SwPageFrame* pPage;
if( pRet )
{
- pBoss = pRet->GetRef()->FindFootnoteBossFrm();
+ pBoss = pRet->GetRef()->FindFootnoteBossFrame();
OSL_ENSURE( pBoss, "FindFirstFootnote: No boss found" );
if( !pBoss )
return nullptr; // ?There must be a bug, but no GPF
- pPage = pBoss->FindPageFrm();
+ pPage = pBoss->FindPageFrame();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
{
@@ -1036,21 +1036,21 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
while ( pRet->GetFollow() )
pRet = pRet->GetFollow();
- SwFootnoteFrm *pNxt = static_cast<SwFootnoteFrm*>(pRet->GetNext());
+ SwFootnoteFrame *pNxt = static_cast<SwFootnoteFrame*>(pRet->GetNext());
if ( !pNxt )
{
- pBoss = pRet->FindFootnoteBossFrm();
- pPage = pBoss->FindPageFrm();
+ pBoss = pRet->FindFootnoteBossFrame();
+ pPage = pBoss->FindPageFrame();
lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss
pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr;
if ( pCont )
- pNxt = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ pNxt = static_cast<SwFootnoteFrame*>(pCont->Lower());
}
if ( pNxt )
{
pRet = pNxt;
- pBoss = pRet->GetRef()->FindFootnoteBossFrm();
- pPage = pBoss->FindPageFrm();
+ pBoss = pRet->GetRef()->FindFootnoteBossFrame();
+ pPage = pBoss->FindPageFrame();
nPgNum = pPage->GetPhyPageNum();
if ( nPgNum == nRefNum )
{
@@ -1070,9 +1070,9 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote()
}
/// Get the first footnote of a given content
-const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt ) const
+const SwFootnoteFrame *SwFootnoteBossFrame::FindFirstFootnote( SwContentFrame *pCnt ) const
{
- const SwFootnoteFrm *pRet = const_cast<SwFootnoteBossFrm*>(this)->FindFirstFootnote();
+ const SwFootnoteFrame *pRet = const_cast<SwFootnoteBossFrame*>(this)->FindFirstFootnote();
if ( pRet )
{
const sal_uInt16 nColNum = lcl_ColumnNum( this );
@@ -1083,17 +1083,17 @@ const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt )
pRet = pRet->GetFollow();
if ( pRet->GetNext() )
- pRet = static_cast<const SwFootnoteFrm*>(pRet->GetNext());
+ pRet = static_cast<const SwFootnoteFrame*>(pRet->GetNext());
else
- { SwFootnoteBossFrm *pBoss = const_cast<SwFootnoteBossFrm*>(pRet->FindFootnoteBossFrm());
- SwPageFrm *pPage = pBoss->FindPageFrm();
+ { SwFootnoteBossFrame *pBoss = const_cast<SwFootnoteBossFrame*>(pRet->FindFootnoteBossFrame());
+ SwPageFrame *pPage = pBoss->FindPageFrame();
lcl_NextFootnoteBoss( pBoss, pPage, false ); // next FootnoteBoss
- SwFootnoteContFrm *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr;
- pRet = pCont ? static_cast<SwFootnoteFrm*>(pCont->Lower()) : nullptr;
+ SwFootnoteContFrame *pCont = pBoss ? pBoss->FindNearestFootnoteCont() : nullptr;
+ pRet = pCont ? static_cast<SwFootnoteFrame*>(pCont->Lower()) : nullptr;
}
if ( pRet )
{
- const SwFootnoteBossFrm* pBoss = pRet->GetRef()->FindFootnoteBossFrm();
+ const SwFootnoteBossFrame* pBoss = pRet->GetRef()->FindFootnoteBossFrame();
if( pBoss->GetPhyPageNum() != nPageNum ||
nColNum != lcl_ColumnNum( pBoss ) )
pRet = nullptr;
@@ -1103,7 +1103,7 @@ const SwFootnoteFrm *SwFootnoteBossFrm::FindFirstFootnote( SwContentFrm *pCnt )
return pRet;
}
-void SwFootnoteBossFrm::ResetFootnote( const SwFootnoteFrm *pCheck )
+void SwFootnoteBossFrame::ResetFootnote( const SwFootnoteFrame *pCheck )
{
// Destroy the incarnations of footnotes to an attribute, if they don't
// belong to pAssumed
@@ -1114,36 +1114,36 @@ void SwFootnoteBossFrm::ResetFootnote( const SwFootnoteFrm *pCheck )
if ( !pNd )
pNd = pCheck->GetFormat()->GetDoc()->
GetNodes().GoNextSection( &aIdx, true, false );
- SwIterator<SwFrm,SwContentNode> aIter( *pNd );
- SwFrm* pFrm = aIter.First();
- while( pFrm )
+ SwIterator<SwFrame,SwContentNode> aIter( *pNd );
+ SwFrame* pFrame = aIter.First();
+ while( pFrame )
{
- if( pFrm->getRootFrm() == pCheck->getRootFrm() )
+ if( pFrame->getRootFrame() == pCheck->getRootFrame() )
{
- SwFrm *pTmp = pFrm->GetUpper();
- while ( pTmp && !pTmp->IsFootnoteFrm() )
+ SwFrame *pTmp = pFrame->GetUpper();
+ while ( pTmp && !pTmp->IsFootnoteFrame() )
pTmp = pTmp->GetUpper();
- SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pTmp);
+ SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pTmp);
while ( pFootnote && pFootnote->GetMaster() )
pFootnote = pFootnote->GetMaster();
if ( pFootnote != pCheck )
{
while ( pFootnote )
{
- SwFootnoteFrm *pNxt = pFootnote->GetFollow();
+ SwFootnoteFrame *pNxt = pFootnote->GetFollow();
pFootnote->Cut();
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
pFootnote = pNxt;
}
}
}
- pFrm = aIter.Next();
+ pFrame = aIter.Next();
}
}
-void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
+void SwFootnoteBossFrame::InsertFootnote( SwFootnoteFrame* pNew )
{
// Place the footnote in front of the footnote whose attribute
// is in front of the new one (get position via the Doc).
@@ -1152,14 +1152,14 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
// the footnote behind the last footnote of the closest previous column/page.
ResetFootnote( pNew );
- SwFootnoteFrm *pSibling = FindFirstFootnote();
+ SwFootnoteFrame *pSibling = FindFirstFootnote();
bool bDontLeave = false;
// Ok, a sibling has been found, but is the sibling in an acceptable
// environment?
if( IsInSct() )
{
- SwSectionFrm* pMySect = ImplFindSctFrm();
+ SwSectionFrame* pMySect = ImplFindSctFrame();
bool bEndnt = pNew->GetAttr()->GetFootnote().IsEndNote();
if( bEndnt )
{
@@ -1170,7 +1170,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
if( pEndFormat )
{
if( !pSibling->IsInSct() ||
- !pSibling->ImplFindSctFrm()->IsDescendantFrom( pEndFormat ) )
+ !pSibling->ImplFindSctFrame()->IsDescendantFrom( pEndFormat ) )
pSibling = nullptr;
}
else if( pSibling->IsInSct() )
@@ -1185,7 +1185,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
if( pMySect->IsFootnoteAtEnd() )
{
if( !pSibling->IsInSct() ||
- !pMySect->IsAnFollow( pSibling->ImplFindSctFrm() ) )
+ !pMySect->IsAnFollow( pSibling->ImplFindSctFrame() ) )
pSibling = nullptr;
}
else if( pSibling->IsInSct() )
@@ -1194,8 +1194,8 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
}
}
- if( pSibling && pSibling->FindPageFrm()->IsEndNotePage() !=
- FindPageFrm()->IsEndNotePage() )
+ if( pSibling && pSibling->FindPageFrame()->IsEndNotePage() !=
+ FindPageFrame()->IsEndNotePage() )
pSibling = nullptr;
// use the Doc to find out the position
@@ -1204,7 +1204,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
sal_uLong nCmpPos = 0;
sal_uLong nLastPos = 0;
- SwFootnoteContFrm *pParent = nullptr;
+ SwFootnoteContFrame *pParent = nullptr;
if( pSibling )
{
nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() );
@@ -1222,7 +1222,7 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
pParent = FindNearestFootnoteCont( bDontLeave );
if ( pParent )
{
- SwFootnoteFrm *pFootnote = static_cast<SwFootnoteFrm*>(pParent->Lower());
+ SwFootnoteFrame *pFootnote = static_cast<SwFootnoteFrame*>(pParent->Lower());
if ( pFootnote )
{
@@ -1241,15 +1241,15 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
{
// Based on the first footnote below the Parent, search for the first footnote whose
// index is after the index of the newly inserted, to place the new one correctly
- pSibling = static_cast<SwFootnoteFrm*>(pParent->Lower());
+ pSibling = static_cast<SwFootnoteFrame*>(pParent->Lower());
if ( !pSibling )
{ OSL_ENSURE( false, "Could not find space for footnote.");
return;
}
nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() );
- SwFootnoteBossFrm *pNxtB; // remember the last one to not
- SwFootnoteFrm *pLastSib = nullptr; // go too far.
+ SwFootnoteBossFrame *pNxtB; // remember the last one to not
+ SwFootnoteFrame *pLastSib = nullptr; // go too far.
while ( pSibling && nCmpPos <= nStPos )
{
@@ -1261,30 +1261,30 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
if ( pSibling->GetNext() )
{
- pSibling = static_cast<SwFootnoteFrm*>(pSibling->GetNext());
+ pSibling = static_cast<SwFootnoteFrame*>(pSibling->GetNext());
OSL_ENSURE( !pSibling->GetMaster() || ( ENDNOTE > nStPos &&
pSibling->GetAttr()->GetFootnote().IsEndNote() ),
"InsertFootnote: Master expected I" );
}
else
{
- pNxtB = pSibling->FindFootnoteBossFrm();
- SwPageFrm *pSibPage = pNxtB->FindPageFrm();
+ pNxtB = pSibling->FindFootnoteBossFrame();
+ SwPageFrame *pSibPage = pNxtB->FindPageFrame();
bool bEndNote = pSibPage->IsEndNotePage();
bool bChgPage = lcl_NextFootnoteBoss( pNxtB, pSibPage, bDontLeave );
// When changing pages, also the endnote flag must match.
- SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage ||
+ SwFootnoteContFrame *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr;
if( pCont )
- pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ pSibling = static_cast<SwFootnoteFrame*>(pCont->Lower());
else // no further FootnoteContainer, insert after pSibling
break;
}
if ( pSibling )
{
nCmpPos = ::lcl_FindFootnotePos( pDoc, pSibling->GetAttr() );
- OSL_ENSURE( nCmpPos > nLastPos, "InsertFootnote: Order of FootnoteFrm's buggy" );
+ OSL_ENSURE( nCmpPos > nLastPos, "InsertFootnote: Order of FootnoteFrame's buggy" );
}
}
// pLastSib is the last footnote before the new one and
@@ -1311,12 +1311,12 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
{
// First footnote of the column/page found. Now search from there for the first one on the
// same column/page whose index is after the given one. The last one found is the predecessor.
- SwFootnoteBossFrm* pBoss = pNew->GetRef()->FindFootnoteBossFrm(
+ SwFootnoteBossFrame* pBoss = pNew->GetRef()->FindFootnoteBossFrame(
!pNew->GetAttr()->GetFootnote().IsEndNote() );
sal_uInt16 nRefNum = pBoss->GetPhyPageNum(); // page number of the new footnote
sal_uInt16 nRefCol = lcl_ColumnNum( pBoss ); // column number of the new footnote
bool bEnd = false;
- SwFootnoteFrm *pLastSib = nullptr;
+ SwFootnoteFrame *pLastSib = nullptr;
while ( pSibling && !bEnd && (nCmpPos <= nStPos) )
{
pLastSib = pSibling;
@@ -1325,10 +1325,10 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
while ( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
- SwFootnoteFrm *pFoll = static_cast<SwFootnoteFrm*>(pSibling->GetNext());
+ SwFootnoteFrame *pFoll = static_cast<SwFootnoteFrame*>(pSibling->GetNext());
if ( pFoll )
{
- pBoss = pSibling->GetRef()->FindFootnoteBossFrm( !pSibling->
+ pBoss = pSibling->GetRef()->FindFootnoteBossFrame( !pSibling->
GetAttr()->GetFootnote().IsEndNote() );
sal_uInt16 nTmpRef;
if( nStPos >= ENDNOTE ||
@@ -1340,16 +1340,16 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
}
else
{
- SwFootnoteBossFrm* pNxtB = pSibling->FindFootnoteBossFrm();
- SwPageFrm *pSibPage = pNxtB->FindPageFrm();
+ SwFootnoteBossFrame* pNxtB = pSibling->FindFootnoteBossFrame();
+ SwPageFrame *pSibPage = pNxtB->FindPageFrame();
bool bEndNote = pSibPage->IsEndNotePage();
bool bChgPage = lcl_NextFootnoteBoss( pNxtB, pSibPage, bDontLeave );
// When changing pages, also the endnote flag must match.
- SwFootnoteContFrm *pCont = pNxtB && ( !bChgPage ||
+ SwFootnoteContFrame *pCont = pNxtB && ( !bChgPage ||
pSibPage->IsEndNotePage() == bEndNote )
? pNxtB->FindNearestFootnoteCont( bDontLeave ) : nullptr;
if ( pCont )
- pSibling = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ pSibling = static_cast<SwFootnoteFrame*>(pCont->Lower());
else
bEnd = true;
}
@@ -1373,8 +1373,8 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
{
while ( pSibling->GetFollow() )
pSibling = pSibling->GetFollow();
- pParent = static_cast<SwFootnoteContFrm*>(pSibling->GetUpper());
- pSibling = static_cast<SwFootnoteFrm*>(pSibling->GetNext());
+ pParent = static_cast<SwFootnoteContFrame*>(pSibling->GetUpper());
+ pSibling = static_cast<SwFootnoteFrame*>(pSibling->GetNext());
}
else
{
@@ -1388,14 +1388,14 @@ void SwFootnoteBossFrm::InsertFootnote( SwFootnoteFrm* pNew )
while ( pSibling->GetMaster() );
}
}
- pParent = static_cast<SwFootnoteContFrm*>(pSibling->GetUpper());
+ pParent = static_cast<SwFootnoteContFrame*>(pSibling->GetUpper());
}
}
OSL_ENSURE( pParent, "paste in space?" );
pNew->Paste( pParent, pSibling );
}
-void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAttr )
+void SwFootnoteBossFrame::AppendFootnote( SwContentFrame *pRef, SwTextFootnote *pAttr )
{
// If the footnote already exists, do nothing.
if ( FindFootnote( pRef, pAttr ) )
@@ -1407,30 +1407,30 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
// If it is an Endnote, we need to search for or create an
// Endnote page.
SwDoc *pDoc = GetFormat()->GetDoc();
- SwFootnoteBossFrm *pBoss = this;
- SwPageFrm *pPage = FindPageFrm();
- SwPageFrm *pMyPage = pPage;
+ SwFootnoteBossFrame *pBoss = this;
+ SwPageFrame *pPage = FindPageFrame();
+ SwPageFrame *pMyPage = pPage;
bool bChgPage = false;
bool bEnd = false;
if ( pAttr->GetFootnote().IsEndNote() )
{
bEnd = true;
- if( GetUpper()->IsSctFrm() &&
- static_cast<SwSectionFrm*>(GetUpper())->IsEndnAtEnd() )
+ if( GetUpper()->IsSctFrame() &&
+ static_cast<SwSectionFrame*>(GetUpper())->IsEndnAtEnd() )
{
- SwFrm* pLast =
- static_cast<SwSectionFrm*>(GetUpper())->FindLastContent( FINDMODE_ENDNOTE );
+ SwFrame* pLast =
+ static_cast<SwSectionFrame*>(GetUpper())->FindLastContent( FINDMODE_ENDNOTE );
if( pLast )
{
- pBoss = pLast->FindFootnoteBossFrm();
- pPage = pBoss->FindPageFrm();
+ pBoss = pLast->FindFootnoteBossFrame();
+ pPage = pBoss->FindPageFrame();
}
}
else
{
while ( pPage->GetNext() && !pPage->IsEndNotePage() )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
bChgPage = true;
}
if ( !pPage->IsEndNotePage() )
@@ -1446,19 +1446,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
// At least we can search the approximately correct page.
// To ensure to be finished in finite time even if hundreds
// of footnotes exist
- SwPageFrm *pNxt = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pNxt = static_cast<SwPageFrame*>(pPage->GetNext());
const sal_uLong nStPos = ::lcl_FindFootnotePos( pDoc, pAttr );
while ( pNxt && pNxt->IsEndNotePage() )
{
- SwFootnoteContFrm *pCont = pNxt->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pNxt->FindFootnoteCont();
if ( pCont && pCont->Lower() )
{
- OSL_ENSURE( pCont->Lower()->IsFootnoteFrm(), "no footnote in the container" );
+ OSL_ENSURE( pCont->Lower()->IsFootnoteFrame(), "no footnote in the container" );
if ( nStPos > ::lcl_FindFootnotePos( pDoc,
- static_cast<SwFootnoteFrm*>(pCont->Lower())->GetAttr()))
+ static_cast<SwFootnoteFrame*>(pCont->Lower())->GetAttr()))
{
pPage = pNxt;
- pNxt = static_cast<SwPageFrm*>(pPage->GetNext());
+ pNxt = static_cast<SwPageFrame*>(pPage->GetNext());
continue;
}
}
@@ -1468,12 +1468,12 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
}
}
else if( FTNPOS_CHAPTER == pDoc->GetFootnoteInfo().ePos && ( !GetUpper()->
- IsSctFrm() || !static_cast<SwSectionFrm*>(GetUpper())->IsFootnoteAtEnd() ) )
+ IsSctFrame() || !static_cast<SwSectionFrame*>(GetUpper())->IsFootnoteAtEnd() ) )
{
while ( pPage->GetNext() && !pPage->IsFootnotePage() &&
- !static_cast<SwPageFrm*>(pPage->GetNext())->IsEndNotePage() )
+ !static_cast<SwPageFrame*>(pPage->GetNext())->IsEndNotePage() )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
bChgPage = true;
}
@@ -1489,19 +1489,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
// We can at least search the approximately correct page
// to ensure that we will finish in finite time even if
// hundreds of footnotes exist.
- SwPageFrm *pNxt = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pNxt = static_cast<SwPageFrame*>(pPage->GetNext());
const sal_uLong nStPos = ::lcl_FindFootnotePos( pDoc, pAttr );
while ( pNxt && pNxt->IsFootnotePage() && !pNxt->IsEndNotePage() )
{
- SwFootnoteContFrm *pCont = pNxt->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pNxt->FindFootnoteCont();
if ( pCont && pCont->Lower() )
{
- OSL_ENSURE( pCont->Lower()->IsFootnoteFrm(), "no footnote in the container" );
+ OSL_ENSURE( pCont->Lower()->IsFootnoteFrame(), "no footnote in the container" );
if ( nStPos > ::lcl_FindFootnotePos( pDoc,
- static_cast<SwFootnoteFrm*>(pCont->Lower())->GetAttr()))
+ static_cast<SwFootnoteFrame*>(pCont->Lower())->GetAttr()))
{
pPage = pNxt;
- pNxt = static_cast<SwPageFrm*>(pPage->GetNext());
+ pNxt = static_cast<SwPageFrame*>(pPage->GetNext());
continue;
}
}
@@ -1519,25 +1519,25 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
// If there is already a footnote content on the column/page,
// another one cannot be created in a column area.
- if( pBoss->IsInSct() && pBoss->IsColumnFrm() && !pPage->IsFootnotePage() )
+ if( pBoss->IsInSct() && pBoss->IsColumnFrame() && !pPage->IsFootnotePage() )
{
- SwSectionFrm* pSct = pBoss->FindSctFrm();
+ SwSectionFrame* pSct = pBoss->FindSctFrame();
if( bEnd ? !pSct->IsEndnAtEnd() : !pSct->IsFootnoteAtEnd() )
{
- SwFootnoteContFrm* pFootnoteCont = pSct->FindFootnoteBossFrm(!bEnd)->FindFootnoteCont();
+ SwFootnoteContFrame* pFootnoteCont = pSct->FindFootnoteBossFrame(!bEnd)->FindFootnoteCont();
if( pFootnoteCont )
{
- SwFootnoteFrm* pTmp = static_cast<SwFootnoteFrm*>(pFootnoteCont->Lower());
+ SwFootnoteFrame* pTmp = static_cast<SwFootnoteFrame*>(pFootnoteCont->Lower());
if( bEnd )
while( pTmp && !pTmp->GetAttr()->GetFootnote().IsEndNote() )
- pTmp = static_cast<SwFootnoteFrm*>(pTmp->GetNext());
+ pTmp = static_cast<SwFootnoteFrame*>(pTmp->GetNext());
if( pTmp && *pTmp < pAttr )
return;
}
}
}
- SwFootnoteFrm *pNew = new SwFootnoteFrm( pDoc->GetDfltFrameFormat(), this, pRef, pAttr );
+ SwFootnoteFrame *pNew = new SwFootnoteFrame( pDoc->GetDfltFrameFormat(), this, pRef, pAttr );
{
SwNodeIndex aIdx( *pAttr->GetStartNode(), 1 );
::_InsertCnt( pNew, pDoc, aIdx.GetIndex() );
@@ -1546,18 +1546,18 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
// we need to place ourselves in the first column
if( bChgPage )
{
- SwLayoutFrm* pBody = pPage->FindBodyCont();
+ SwLayoutFrame* pBody = pPage->FindBodyCont();
OSL_ENSURE( pBody, "AppendFootnote: NoPageBody?" );
- if( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
- pBoss = static_cast<SwFootnoteBossFrm*>(pBody->Lower());
+ if( pBody->Lower() && pBody->Lower()->IsColumnFrame() )
+ pBoss = static_cast<SwFootnoteBossFrame*>(pBody->Lower());
else
pBoss = pPage; // page if no columns exist
}
pBoss->InsertFootnote( pNew );
if ( pNew->GetUpper() ) // inserted or not?
{
- ::RegistFlys( pNew->FindPageFrm(), pNew );
- SwSectionFrm* pSect = FindSctFrm();
+ ::RegistFlys( pNew->FindPageFrame(), pNew );
+ SwSectionFrame* pSect = FindSctFrame();
// The content of a FootnoteContainer in a (column) section only need to be calculated
// if the section stretches already to the bottom edge of the Upper.
if( pSect && !pSect->IsJoinLocked() && ( bEnd ? !pSect->IsEndnAtEnd() :
@@ -1567,19 +1567,19 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
{
// #i49383# - disable unlock of position of
// lower objects during format of footnote content.
- const bool bOldFootnoteFrmLocked( pNew->IsColLocked() );
+ const bool bOldFootnoteFrameLocked( pNew->IsColLocked() );
pNew->ColLock();
pNew->KeepLockPosOfLowerObjs();
// #i57914# - adjust fix #i49383#
- SwContentFrm *pCnt = pNew->ContainsContent();
- while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr )
+ SwContentFrame *pCnt = pNew->ContainsContent();
+ while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr )
{
- pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
// restart format with first content
pCnt = pNew->ContainsContent();
@@ -1589,29 +1589,29 @@ void SwFootnoteBossFrm::AppendFootnote( SwContentFrm *pRef, SwTextFootnote *pAtt
pCnt = pCnt->FindNextCnt();
}
// #i49383#
- if ( !bOldFootnoteFrmLocked )
+ if ( !bOldFootnoteFrameLocked )
{
pNew->ColUnlock();
}
// #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pNew->UnlockPosOfLowerObjs();
- pNew->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pNew->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i57914# - adjust fix #i49383#
- if ( !bOldFootnoteFrmLocked && !pNew->GetLower() &&
+ if ( !bOldFootnoteFrameLocked && !pNew->GetLower() &&
!pNew->IsColLocked() && !pNew->IsBackMoveLocked() )
{
pNew->Cut();
- SwFrm::DestroyFrm(pNew);
+ SwFrame::DestroyFrame(pNew);
}
}
pMyPage->UpdateFootnoteNum();
}
else
- SwFrm::DestroyFrm(pNew);
+ SwFrame::DestroyFrame(pNew);
}
-SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const SwTextFootnote *pAttr )
+SwFootnoteFrame *SwFootnoteBossFrame::FindFootnote( const SwContentFrame *pRef, const SwTextFootnote *pAttr )
{
// the easiest and savest way goes via the attribute
OSL_ENSURE( pAttr->GetStartNode(), "FootnoteAtr without StartNode." );
@@ -1622,17 +1622,17 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const
GetNodes().GoNextSection( &aIdx, true, false );
if ( !pNd )
return nullptr;
- SwIterator<SwFrm,SwContentNode> aIter( *pNd );
- SwFrm* pFrm = aIter.First();
- if( pFrm )
+ SwIterator<SwFrame,SwContentNode> aIter( *pNd );
+ SwFrame* pFrame = aIter.First();
+ if( pFrame )
do
{
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
// #i28500#, #i27243# Due to the endnode collector, there are
- // SwFootnoteFrms, which are not in the layout. Therefore the
- // bInfFootnote flags are not set correctly, and a cell of FindFootnoteFrm
- // would return 0. Therefore we better call ImplFindFootnoteFrm().
- SwFootnoteFrm *pFootnote = pFrm->ImplFindFootnoteFrm();
+ // SwFootnoteFrames, which are not in the layout. Therefore the
+ // bInfFootnote flags are not set correctly, and a cell of FindFootnoteFrame
+ // would return 0. Therefore we better call ImplFindFootnoteFrame().
+ SwFootnoteFrame *pFootnote = pFrame->ImplFindFootnoteFrame();
if ( pFootnote && pFootnote->GetRef() == pRef )
{
// The following condition becomes true, if the whole
@@ -1646,39 +1646,39 @@ SwFootnoteFrm *SwFootnoteBossFrm::FindFootnote( const SwContentFrm *pRef, const
return pFootnote;
}
- } while ( nullptr != (pFrm = aIter.Next()) );
+ } while ( nullptr != (pFrame = aIter.Next()) );
return nullptr;
}
-void SwFootnoteBossFrm::RemoveFootnote( const SwContentFrm *pRef, const SwTextFootnote *pAttr,
+void SwFootnoteBossFrame::RemoveFootnote( const SwContentFrame *pRef, const SwTextFootnote *pAttr,
bool bPrep )
{
- SwFootnoteFrm *pFootnote = FindFootnote( pRef, pAttr );
+ SwFootnoteFrame *pFootnote = FindFootnote( pRef, pAttr );
if( pFootnote )
{
do
{
- SwFootnoteFrm *pFoll = pFootnote->GetFollow();
+ SwFootnoteFrame *pFoll = pFootnote->GetFollow();
pFootnote->Cut();
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
pFootnote = pFoll;
} while ( pFootnote );
if( bPrep && pRef->IsFollow() )
{
- OSL_ENSURE( pRef->IsTextFrm(), "NoTextFrm has Footnote?" );
- SwTextFrm* pMaster = pRef->FindMaster();
+ OSL_ENSURE( pRef->IsTextFrame(), "NoTextFrame has Footnote?" );
+ SwTextFrame* pMaster = pRef->FindMaster();
if( !pMaster->IsLocked() )
pMaster->Prepare( PREP_FTN_GONE );
}
}
- FindPageFrm()->UpdateFootnoteNum();
+ FindPageFrame()->UpdateFootnoteNum();
}
-void SwFootnoteBossFrm::ChangeFootnoteRef( const SwContentFrm *pOld, const SwTextFootnote *pAttr,
- SwContentFrm *pNew )
+void SwFootnoteBossFrame::ChangeFootnoteRef( const SwContentFrame *pOld, const SwTextFootnote *pAttr,
+ SwContentFrame *pNew )
{
- SwFootnoteFrm *pFootnote = FindFootnote( pOld, pAttr );
+ SwFootnoteFrame *pFootnote = FindFootnote( pOld, pAttr );
while ( pFootnote )
{
pFootnote->SetRef( pNew );
@@ -1689,31 +1689,31 @@ void SwFootnoteBossFrm::ChangeFootnoteRef( const SwContentFrm *pOld, const SwTex
/// OD 03.04.2003 #108446# - add parameter <_bCollectOnlyPreviousFootnotes> in
/// order to control, if only footnotes, which are positioned before the
/// footnote boss frame <this> have to be collected.
-void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef,
- SwFootnoteBossFrm* _pOld,
- SwFootnoteFrms& _rFootnoteArr,
+void SwFootnoteBossFrame::CollectFootnotes( const SwContentFrame* _pRef,
+ SwFootnoteBossFrame* _pOld,
+ SwFootnoteFrames& _rFootnoteArr,
const bool _bCollectOnlyPreviousFootnotes )
{
- SwFootnoteFrm *pFootnote = _pOld->FindFirstFootnote();
+ SwFootnoteFrame *pFootnote = _pOld->FindFirstFootnote();
while( !pFootnote )
{
- if( _pOld->IsColumnFrm() )
+ if( _pOld->IsColumnFrame() )
{
// visit columns
while ( !pFootnote && _pOld->GetPrev() )
{
// Still no problem if no footnote was found yet. The loop is needed to pick up
// following rows in tables. In all other cases it might correct bad contexts.
- _pOld = static_cast<SwFootnoteBossFrm*>(_pOld->GetPrev());
+ _pOld = static_cast<SwFootnoteBossFrame*>(_pOld->GetPrev());
pFootnote = _pOld->FindFirstFootnote();
}
}
if( !pFootnote )
{
// previous page
- SwPageFrm* pPg;
- for ( SwFrm* pTmp = _pOld;
- nullptr != ( pPg = static_cast<SwPageFrm*>(pTmp->FindPageFrm()->GetPrev()))
+ SwPageFrame* pPg;
+ for ( SwFrame* pTmp = _pOld;
+ nullptr != ( pPg = static_cast<SwPageFrame*>(pTmp->FindPageFrame()->GetPrev()))
&& pPg->IsEmptyPage() ;
)
{
@@ -1722,11 +1722,11 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef,
if( !pPg )
return;
- SwLayoutFrm* pBody = pPg->FindBodyCont();
- if( pBody->Lower() && pBody->Lower()->IsColumnFrm() )
+ SwLayoutFrame* pBody = pPg->FindBodyCont();
+ if( pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
// multiple columns on one page => search last column
- _pOld = static_cast<SwFootnoteBossFrm*>(pBody->GetLastLower());
+ _pOld = static_cast<SwFootnoteBossFrame*>(pBody->GetLastLower());
}
else
_pOld = pPg; // single column page
@@ -1734,37 +1734,37 @@ void SwFootnoteBossFrm::CollectFootnotes( const SwContentFrm* _pRef,
}
}
// OD 03.04.2003 #108446# - consider new parameter <_bCollectOnlyPreviousFootnotes>
- SwFootnoteBossFrm* pRefBossFrm = nullptr;
+ SwFootnoteBossFrame* pRefBossFrame = nullptr;
if ( _bCollectOnlyPreviousFootnotes )
{
- pRefBossFrm = this;
+ pRefBossFrame = this;
}
- _CollectFootnotes( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrm );
+ _CollectFootnotes( _pRef, pFootnote, _rFootnoteArr, _bCollectOnlyPreviousFootnotes, pRefBossFrame );
}
-inline void FootnoteInArr( SwFootnoteFrms& rFootnoteArr, SwFootnoteFrm* pFootnote )
+inline void FootnoteInArr( SwFootnoteFrames& rFootnoteArr, SwFootnoteFrame* pFootnote )
{
if ( rFootnoteArr.end() == std::find( rFootnoteArr.begin(), rFootnoteArr.end(), pFootnote ) )
rFootnoteArr.push_back( pFootnote );
}
/// OD 03.04.2003 #108446# - add parameters <_bCollectOnlyPreviousFootnotes> and
-/// <_pRefFootnoteBossFrm> in order to control, if only footnotes, which are positioned
+/// <_pRefFootnoteBossFrame> in order to control, if only footnotes, which are positioned
/// before the given reference footnote boss frame have to be collected.
/// Note: if parameter <_bCollectOnlyPreviousFootnotes> is true, then parameter
-/// <_pRefFootnoteBossFrm> have to be referenced to an object.
+/// <_pRefFootnoteBossFrame> have to be referenced to an object.
/// Adjust parameter names.
-void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
- SwFootnoteFrm* _pFootnote,
- SwFootnoteFrms& _rFootnoteArr,
+void SwFootnoteBossFrame::_CollectFootnotes( const SwContentFrame* _pRef,
+ SwFootnoteFrame* _pFootnote,
+ SwFootnoteFrames& _rFootnoteArr,
bool _bCollectOnlyPreviousFootnotes,
- const SwFootnoteBossFrm* _pRefFootnoteBossFrm)
+ const SwFootnoteBossFrame* _pRefFootnoteBossFrame)
{
// OD 03.04.2003 #108446# - assert, that no reference footnote boss frame
// is set, in spite of the order, that only previous footnotes has to be
// collected.
- OSL_ENSURE( !_bCollectOnlyPreviousFootnotes || _pRefFootnoteBossFrm,
- "<SwFootnoteBossFrm::_CollectFootnotes(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" );
+ OSL_ENSURE( !_bCollectOnlyPreviousFootnotes || _pRefFootnoteBossFrame,
+ "<SwFootnoteBossFrame::_CollectFootnotes(..)> - No reference footnote boss frame for collecting only previous footnotes set.\nCrash will be caused!" );
// Collect all footnotes referenced by pRef (attribute by attribute), combine them
// (the content might be divided over multiple pages) and cut them.
@@ -1772,7 +1772,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
// For robustness, we do not log the corresponding footnotes here. If a footnote
// is touched twice, there might be a crash. This allows this function here to
// also handle corrupt layouts in some degrees (without loops or even crashes).
- SwFootnoteFrms aNotFootnoteArr;
+ SwFootnoteFrames aNotFootnoteArr;
// here we have a footnote placed in front of the first one of the reference
OSL_ENSURE( !_pFootnote->GetMaster() || _pFootnote->GetRef() != _pRef, "move FollowFootnote?" );
@@ -1785,24 +1785,24 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
{
// Search for the next footnote in this column/page so that
// we do not start from zero again after cutting one footnote.
- SwFootnoteFrm *pNxtFootnote = _pFootnote;
+ SwFootnoteFrame *pNxtFootnote = _pFootnote;
while ( pNxtFootnote->GetFollow() )
pNxtFootnote = pNxtFootnote->GetFollow();
- pNxtFootnote = static_cast<SwFootnoteFrm*>(pNxtFootnote->GetNext());
+ pNxtFootnote = static_cast<SwFootnoteFrame*>(pNxtFootnote->GetNext());
if ( !pNxtFootnote )
{
- SwFootnoteBossFrm* pBoss = _pFootnote->FindFootnoteBossFrm();
- SwPageFrm* pPage = pBoss->FindPageFrm();
+ SwFootnoteBossFrame* pBoss = _pFootnote->FindFootnoteBossFrame();
+ SwPageFrame* pPage = pBoss->FindPageFrame();
do
{
lcl_NextFootnoteBoss( pBoss, pPage, false );
if( pBoss )
{
- SwLayoutFrm* pCont = pBoss->FindFootnoteCont();
+ SwLayoutFrame* pCont = pBoss->FindFootnoteCont();
if( pCont )
{
- pNxtFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ pNxtFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower());
if( pNxtFootnote )
{
while( pNxtFootnote->GetMaster() )
@@ -1831,11 +1831,11 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
{
if ( _bCollectOnlyPreviousFootnotes )
{
- SwFootnoteBossFrm* pBossOfFoundFootnote = _pFootnote->FindFootnoteBossFrm( true );
+ SwFootnoteBossFrame* pBossOfFoundFootnote = _pFootnote->FindFootnoteBossFrame( true );
OSL_ENSURE( pBossOfFoundFootnote,
- "<SwFootnoteBossFrm::_CollectFootnotes(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" );
+ "<SwFootnoteBossFrame::_CollectFootnotes(..)> - footnote boss frame of found footnote frame missing.\nWrong layout!" );
if ( !pBossOfFoundFootnote || // don't crash, if no footnote boss is found.
- pBossOfFoundFootnote->IsBefore( _pRefFootnoteBossFrm )
+ pBossOfFoundFootnote->IsBefore( _pRefFootnoteBossFrame )
)
{
bCollectFoundFootnote = true;
@@ -1850,15 +1850,15 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
if ( bCollectFoundFootnote )
{
OSL_ENSURE( !_pFootnote->GetMaster(), "move FollowFootnote?" );
- SwFootnoteFrm *pNxt = _pFootnote->GetFollow();
+ SwFootnoteFrame *pNxt = _pFootnote->GetFollow();
while ( pNxt )
{
- SwFrm *pCnt = pNxt->ContainsAny();
+ SwFrame *pCnt = pNxt->ContainsAny();
if ( pCnt )
{
// destroy the follow on the way as it is empty
do
- { SwFrm *pNxtCnt = pCnt->GetNext();
+ { SwFrame *pNxtCnt = pCnt->GetNext();
pCnt->Cut();
pCnt->Paste( _pFootnote );
pCnt = pNxtCnt;
@@ -1868,7 +1868,7 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
{
OSL_ENSURE( !pNxt, "footnote without content?" );
pNxt->Cut();
- SwFrm::DestroyFrm(pNxt);
+ SwFrame::DestroyFrame(pNxt);
}
pNxt = _pFootnote->GetFollow();
}
@@ -1892,25 +1892,25 @@ void SwFootnoteBossFrm::_CollectFootnotes( const SwContentFrm* _pRef,
while ( _pFootnote );
}
-void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc )
+void SwFootnoteBossFrame::_MoveFootnotes( SwFootnoteFrames &rFootnoteArr, bool bCalc )
{
// All footnotes referenced by pRef need to be moved
// to a new position (based on the new column/page)
- const sal_uInt16 nMyNum = FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nMyNum = FindPageFrame()->GetPhyPageNum();
const sal_uInt16 nMyCol = lcl_ColumnNum( this );
SWRECTFN( this )
// #i21478# - keep last inserted footnote in order to
// format the content of the following one.
- SwFootnoteFrm* pLastInsertedFootnote = nullptr;
+ SwFootnoteFrame* pLastInsertedFootnote = nullptr;
for ( size_t i = 0; i < rFootnoteArr.size(); ++i )
{
- SwFootnoteFrm *pFootnote = rFootnoteArr[i];
+ SwFootnoteFrame *pFootnote = rFootnoteArr[i];
- SwFootnoteBossFrm* pRefBoss = pFootnote->GetRef()->FindFootnoteBossFrm( true );
+ SwFootnoteBossFrame* pRefBoss = pFootnote->GetRef()->FindFootnoteBossFrame( true );
if( pRefBoss != this )
{
- const sal_uInt16 nRefNum = pRefBoss->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nRefNum = pRefBoss->FindPageFrame()->GetPhyPageNum();
const sal_uInt16 nRefCol = lcl_ColumnNum( this );
if( nRefNum < nMyNum || ( nRefNum == nMyNum && nRefCol <= nMyCol ) )
pRefBoss = this;
@@ -1922,30 +1922,30 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
// First condense the content so that footnote frames that do not fit on the page
// do not do too much harm (Loop 66312). So, the footnote content first grows as
// soon as the content gets formatted and it is sure that it fits on the page.
- SwFrm *pCnt = pFootnote->ContainsAny();
+ SwFrame *pCnt = pFootnote->ContainsAny();
while( pCnt )
{
- if( pCnt->IsLayoutFrm() )
+ if( pCnt->IsLayoutFrame() )
{
- SwFrm* pTmp = static_cast<SwLayoutFrm*>(pCnt)->ContainsAny();
- while( pTmp && static_cast<SwLayoutFrm*>(pCnt)->IsAnLower( pTmp ) )
+ SwFrame* pTmp = static_cast<SwLayoutFrame*>(pCnt)->ContainsAny();
+ while( pTmp && static_cast<SwLayoutFrame*>(pCnt)->IsAnLower( pTmp ) )
{
pTmp->Prepare( PREP_MOVEFTN );
- (pTmp->Frm().*fnRect->fnSetHeight)(0);
+ (pTmp->Frame().*fnRect->fnSetHeight)(0);
(pTmp->Prt().*fnRect->fnSetHeight)(0);
pTmp = pTmp->FindNext();
}
}
else
pCnt->Prepare( PREP_MOVEFTN );
- (pCnt->Frm().*fnRect->fnSetHeight)(0);
+ (pCnt->Frame().*fnRect->fnSetHeight)(0);
(pCnt->Prt().*fnRect->fnSetHeight)(0);
pCnt = pCnt->GetNext();
}
- (pFootnote->Frm().*fnRect->fnSetHeight)(0);
+ (pFootnote->Frame().*fnRect->fnSetHeight)(0);
(pFootnote->Prt().*fnRect->fnSetHeight)(0);
- pFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut());
- pFootnote->GetUpper()->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ pFootnote->GetUpper()->Calc(getRootFrame()->GetCurrShell()->GetOut());
if( bCalc )
{
@@ -1959,25 +1959,25 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
pFootnote->KeepLockPosOfLowerObjs();
// #i57914# - adjust fix #i49383#
- while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr )
+ while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr )
{
pCnt->_InvalidatePos();
- pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
// restart format with first content
pCnt = pFootnote->ContainsAny();
continue;
}
}
- if( pCnt->IsSctFrm() )
+ if( pCnt->IsSctFrame() )
{
// If the area is not empty, iterate also over the content
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny();
if( pTmp )
pCnt = pTmp;
else
@@ -1992,7 +1992,7 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
if( !pFootnote->ContainsAny() && !pFootnote->IsColLocked() )
{
pFootnote->Cut();
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
// #i21478#
pFootnote = nullptr;
}
@@ -2003,14 +2003,14 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
// #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pFootnote->UnlockPosOfLowerObjs();
- pFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut());
}
}
}
else
{ OSL_ENSURE( !pFootnote->GetMaster() && !pFootnote->GetFollow(),
"DelFootnote and Master/Follow?" );
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
// #i21478#
pFootnote = nullptr;
}
@@ -2028,9 +2028,9 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
{
if ( pLastInsertedFootnote->GetNext() )
{
- SwFootnoteFrm* pNextFootnote = static_cast<SwFootnoteFrm*>(pLastInsertedFootnote->GetNext());
+ SwFootnoteFrame* pNextFootnote = static_cast<SwFootnoteFrame*>(pLastInsertedFootnote->GetNext());
SwTextFootnote* pAttr = pNextFootnote->GetAttr();
- SwFrm* pCnt = pNextFootnote->ContainsAny();
+ SwFrame* pCnt = pNextFootnote->ContainsAny();
bool bUnlock = !pNextFootnote->IsBackMoveLocked();
pNextFootnote->LockBackMove();
@@ -2039,25 +2039,25 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
pNextFootnote->KeepLockPosOfLowerObjs();
// #i57914# - adjust fix #i49383#
- while ( pCnt && pCnt->FindFootnoteFrm()->GetAttr() == pAttr )
+ while ( pCnt && pCnt->FindFootnoteFrame()->GetAttr() == pAttr )
{
pCnt->_InvalidatePos();
- pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
// restart format with first content
pCnt = pNextFootnote->ContainsAny();
continue;
}
}
- if( pCnt->IsSctFrm() )
+ if( pCnt->IsSctFrame() )
{
// If the area is not empty, iterate also over the content
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny();
if( pTmp )
pCnt = pTmp;
else
@@ -2074,37 +2074,37 @@ void SwFootnoteBossFrm::_MoveFootnotes( SwFootnoteFrms &rFootnoteArr, bool bCalc
// #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
pNextFootnote->UnlockPosOfLowerObjs();
- pNextFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pNextFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut());
}
}
}
-void SwFootnoteBossFrm::MoveFootnotes( const SwContentFrm *pSrc, SwContentFrm *pDest,
+void SwFootnoteBossFrame::MoveFootnotes( const SwContentFrame *pSrc, SwContentFrame *pDest,
SwTextFootnote *pAttr )
{
if( ( GetFormat()->GetDoc()->GetFootnoteInfo().ePos == FTNPOS_CHAPTER &&
- (!GetUpper()->IsSctFrm() || !static_cast<SwSectionFrm*>(GetUpper())->IsFootnoteAtEnd()))
+ (!GetUpper()->IsSctFrame() || !static_cast<SwSectionFrame*>(GetUpper())->IsFootnoteAtEnd()))
|| pAttr->GetFootnote().IsEndNote() )
return;
- OSL_ENSURE( this == pSrc->FindFootnoteBossFrm( true ),
- "SwPageFrm::MoveFootnotes: source frame isn't on that FootnoteBoss" );
+ OSL_ENSURE( this == pSrc->FindFootnoteBossFrame( true ),
+ "SwPageFrame::MoveFootnotes: source frame isn't on that FootnoteBoss" );
- SwFootnoteFrm *pFootnote = FindFirstFootnote();
+ SwFootnoteFrame *pFootnote = FindFirstFootnote();
if( pFootnote )
{
ChangeFootnoteRef( pSrc, pAttr, pDest );
- SwFootnoteBossFrm *pDestBoss = pDest->FindFootnoteBossFrm( true );
- OSL_ENSURE( pDestBoss, "+SwPageFrm::MoveFootnotes: no destination boss" );
+ SwFootnoteBossFrame *pDestBoss = pDest->FindFootnoteBossFrame( true );
+ OSL_ENSURE( pDestBoss, "+SwPageFrame::MoveFootnotes: no destination boss" );
if( pDestBoss ) // robust
{
- SwFootnoteFrms aFootnoteArr;
- SwFootnoteBossFrm::_CollectFootnotes( pDest, pFootnote, aFootnoteArr );
+ SwFootnoteFrames aFootnoteArr;
+ SwFootnoteBossFrame::_CollectFootnotes( pDest, pFootnote, aFootnoteArr );
if ( !aFootnoteArr.empty() )
{
pDestBoss->_MoveFootnotes( aFootnoteArr, true );
- SwPageFrm* pSrcPage = FindPageFrm();
- SwPageFrm* pDestPage = pDestBoss->FindPageFrm();
+ SwPageFrame* pSrcPage = FindPageFrame();
+ SwPageFrame* pDestPage = pDestBoss->FindPageFrame();
// update FootnoteNum only at page change
if( pSrcPage != pDestPage )
{
@@ -2117,28 +2117,28 @@ void SwFootnoteBossFrm::MoveFootnotes( const SwContentFrm *pSrc, SwContentFrm *p
}
}
-void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock,
+void SwFootnoteBossFrame::RearrangeFootnotes( const SwTwips nDeadLine, const bool bLock,
const SwTextFootnote *pAttr )
{
// Format all footnotes of a column/page so that they might change the column/page.
SwSaveFootnoteHeight aSave( this, nDeadLine );
- SwFootnoteFrm *pFootnote = FindFirstFootnote();
+ SwFootnoteFrame *pFootnote = FindFirstFootnote();
if( pFootnote && pFootnote->GetPrev() && bLock )
{
- SwFootnoteFrm* pFirst = static_cast<SwFootnoteFrm*>(pFootnote->GetUpper()->Lower());
- SwFrm* pContent = pFirst->ContainsAny();
+ SwFootnoteFrame* pFirst = static_cast<SwFootnoteFrame*>(pFootnote->GetUpper()->Lower());
+ SwFrame* pContent = pFirst->ContainsAny();
if( pContent )
{
bool bUnlock = !pFirst->IsBackMoveLocked();
pFirst->LockBackMove();
- pFirst->Calc(getRootFrm()->GetCurrShell()->GetOut());
- pContent->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pFirst->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ pContent->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pContent->IsTextFrm() && pContent->IsValid() )
+ if ( pContent->IsTextFrame() && pContent->IsValid() )
{
- SwObjectFormatter::FormatObjsAtFrm( *pContent,
- *(pContent->FindPageFrm()) );
+ SwObjectFormatter::FormatObjsAtFrame( *pContent,
+ *(pContent->FindPageFrame()) );
}
if( bUnlock )
pFirst->UnlockBackMove();
@@ -2147,57 +2147,57 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
SwDoc *pDoc = GetFormat()->GetDoc();
const sal_uLong nFootnotePos = pAttr ? ::lcl_FindFootnotePos( pDoc, pAttr ) : 0;
- SwFrm *pCnt = pFootnote ? pFootnote->ContainsAny() : nullptr;
+ SwFrame *pCnt = pFootnote ? pFootnote->ContainsAny() : nullptr;
if ( pCnt )
{
bool bMore = true;
bool bStart = pAttr == nullptr; // If no attribute is given, process all
// #i49383# - disable unlock of position of
// lower objects during format of footnote and footnote content.
- SwFootnoteFrm* pLastFootnoteFrm( nullptr );
+ SwFootnoteFrame* pLastFootnoteFrame( nullptr );
// footnote frame needs to be locked, if <bLock> isn't set.
- bool bUnlockLastFootnoteFrm( false );
+ bool bUnlockLastFootnoteFrame( false );
do
{
if( !bStart )
- bStart = ::lcl_FindFootnotePos( pDoc, pCnt->FindFootnoteFrm()->GetAttr() )
+ bStart = ::lcl_FindFootnotePos( pDoc, pCnt->FindFootnoteFrame()->GetAttr() )
== nFootnotePos;
if( bStart )
{
pCnt->_InvalidatePos();
pCnt->_InvalidateSize();
pCnt->Prepare( PREP_ADJUST_FRM );
- SwFootnoteFrm* pFootnoteFrm = pCnt->FindFootnoteFrm();
+ SwFootnoteFrame* pFootnoteFrame = pCnt->FindFootnoteFrame();
// #i49383#
- if ( pFootnoteFrm != pLastFootnoteFrm )
+ if ( pFootnoteFrame != pLastFootnoteFrame )
{
- if ( pLastFootnoteFrm )
+ if ( pLastFootnoteFrame )
{
- if ( !bLock && bUnlockLastFootnoteFrm )
+ if ( !bLock && bUnlockLastFootnoteFrame )
{
- pLastFootnoteFrm->ColUnlock();
+ pLastFootnoteFrame->ColUnlock();
}
// #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
- pLastFootnoteFrm->UnlockPosOfLowerObjs();
- pLastFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut());
- if ( !bLock && bUnlockLastFootnoteFrm &&
- !pLastFootnoteFrm->GetLower() &&
- !pLastFootnoteFrm->IsColLocked() &&
- !pLastFootnoteFrm->IsBackMoveLocked() )
+ pLastFootnoteFrame->UnlockPosOfLowerObjs();
+ pLastFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ if ( !bLock && bUnlockLastFootnoteFrame &&
+ !pLastFootnoteFrame->GetLower() &&
+ !pLastFootnoteFrame->IsColLocked() &&
+ !pLastFootnoteFrame->IsBackMoveLocked() )
{
- pLastFootnoteFrm->Cut();
- SwFrm::DestroyFrm(pLastFootnoteFrm);
- pLastFootnoteFrm = nullptr;
+ pLastFootnoteFrame->Cut();
+ SwFrame::DestroyFrame(pLastFootnoteFrame);
+ pLastFootnoteFrame = nullptr;
}
}
if ( !bLock )
{
- bUnlockLastFootnoteFrm = !pFootnoteFrm->IsColLocked();
- pFootnoteFrm->ColLock();
+ bUnlockLastFootnoteFrame = !pFootnoteFrame->IsColLocked();
+ pFootnoteFrame->ColLock();
}
- pFootnoteFrm->KeepLockPosOfLowerObjs();
- pLastFootnoteFrm = pFootnoteFrm;
+ pFootnoteFrame->KeepLockPosOfLowerObjs();
+ pLastFootnoteFrame = pFootnoteFrame;
}
// OD 30.10.2002 #97265# - invalidate position of footnote
// frame, if it's below its footnote container, in order to
@@ -2205,23 +2205,23 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
// footnote frames.
{
SWRECTFN( this );
- SwFrm* aFootnoteContFrm = pFootnoteFrm->GetUpper();
- if ( (pFootnoteFrm->Frm().*fnRect->fnTopDist)((aFootnoteContFrm->*fnRect->fnGetPrtBottom)()) > 0 )
+ SwFrame* aFootnoteContFrame = pFootnoteFrame->GetUpper();
+ if ( (pFootnoteFrame->Frame().*fnRect->fnTopDist)((aFootnoteContFrame->*fnRect->fnGetPrtBottom)()) > 0 )
{
- pFootnoteFrm->_InvalidatePos();
+ pFootnoteFrame->_InvalidatePos();
}
}
if ( bLock )
{
- bool bUnlock = !pFootnoteFrm->IsBackMoveLocked();
- pFootnoteFrm->LockBackMove();
- pFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut());
- pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ bool bUnlock = !pFootnoteFrame->IsBackMoveLocked();
+ pFootnoteFrame->LockBackMove();
+ pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
// restart format with first content
pCnt = pFootnote->ContainsAny();
@@ -2230,28 +2230,28 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
if( bUnlock )
{
- pFootnoteFrm->UnlockBackMove();
- if( !pFootnoteFrm->Lower() &&
- !pFootnoteFrm->IsColLocked() )
+ pFootnoteFrame->UnlockBackMove();
+ if( !pFootnoteFrame->Lower() &&
+ !pFootnoteFrame->IsColLocked() )
{
// #i49383#
- OSL_ENSURE( pLastFootnoteFrm == pFootnoteFrm,
- "<SwFootnoteBossFrm::RearrangeFootnotes(..)> - <pLastFootnoteFrm> != <pFootnoteFrm>" );
- pLastFootnoteFrm = nullptr;
- pFootnoteFrm->Cut();
- SwFrm::DestroyFrm(pFootnoteFrm);
+ OSL_ENSURE( pLastFootnoteFrame == pFootnoteFrame,
+ "<SwFootnoteBossFrame::RearrangeFootnotes(..)> - <pLastFootnoteFrame> != <pFootnoteFrame>" );
+ pLastFootnoteFrame = nullptr;
+ pFootnoteFrame->Cut();
+ SwFrame::DestroyFrame(pFootnoteFrame);
}
}
}
else
{
- pFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut());
- pCnt->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ pCnt->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i49383# - format anchored objects
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
// restart format with first content
pCnt = pFootnote->ContainsAny();
@@ -2260,16 +2260,16 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
}
}
- SwSectionFrm *pDel = nullptr;
- if( pCnt->IsSctFrm() )
+ SwSectionFrame *pDel = nullptr;
+ if( pCnt->IsSctFrame() )
{
- SwFrm* pTmp = static_cast<SwSectionFrm*>(pCnt)->ContainsAny();
+ SwFrame* pTmp = static_cast<SwSectionFrame*>(pCnt)->ContainsAny();
if( pTmp )
{
pCnt = pTmp;
continue;
}
- pDel = static_cast<SwSectionFrm*>(pCnt);
+ pDel = static_cast<SwSectionFrame*>(pCnt);
}
if ( pCnt->GetNext() )
pCnt = pCnt->GetNext();
@@ -2278,9 +2278,9 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
pCnt = pCnt->FindNext();
if ( pCnt )
{
- SwFootnoteFrm* pFootnoteFrm = pCnt->FindFootnoteFrm();
- if( pFootnoteFrm->GetRef()->FindFootnoteBossFrm(
- pFootnoteFrm->GetAttr()->GetFootnote().IsEndNote() ) != this )
+ SwFootnoteFrame* pFootnoteFrame = pCnt->FindFootnoteFrame();
+ if( pFootnoteFrame->GetRef()->FindFootnoteBossFrame(
+ pFootnoteFrame->GetAttr()->GetFootnote().IsEndNote() ) != this )
bMore = false;
}
else
@@ -2288,70 +2288,70 @@ void SwFootnoteBossFrm::RearrangeFootnotes( const SwTwips nDeadLine, const bool
}
if( pDel )
{
- bool bUnlockLastFootnoteFrmGuard = pLastFootnoteFrm && !pLastFootnoteFrm->IsColLocked();
- if (bUnlockLastFootnoteFrmGuard)
- pLastFootnoteFrm->ColLock();
+ bool bUnlockLastFootnoteFrameGuard = pLastFootnoteFrame && !pLastFootnoteFrame->IsColLocked();
+ if (bUnlockLastFootnoteFrameGuard)
+ pLastFootnoteFrame->ColLock();
pDel->Cut();
- if (bUnlockLastFootnoteFrmGuard)
- pLastFootnoteFrm->ColUnlock();
- SwFrm::DestroyFrm(pDel);
+ if (bUnlockLastFootnoteFrameGuard)
+ pLastFootnoteFrame->ColUnlock();
+ SwFrame::DestroyFrame(pDel);
}
if ( bMore )
{
// Go not further than to the provided footnote (if given)
if ( pAttr &&
(::lcl_FindFootnotePos( pDoc,
- pCnt->FindFootnoteFrm()->GetAttr()) > nFootnotePos ) )
+ pCnt->FindFootnoteFrame()->GetAttr()) > nFootnotePos ) )
bMore = false;
}
} while ( bMore );
// #i49383#
- if ( pLastFootnoteFrm )
+ if ( pLastFootnoteFrame )
{
- if ( !bLock && bUnlockLastFootnoteFrm )
+ if ( !bLock && bUnlockLastFootnoteFrame )
{
- pLastFootnoteFrm->ColUnlock();
+ pLastFootnoteFrame->ColUnlock();
}
// #i57914# - adjust fix #i49383#
// enable lock of lower object position before format of footnote frame.
- pLastFootnoteFrm->UnlockPosOfLowerObjs();
- pLastFootnoteFrm->Calc(getRootFrm()->GetCurrShell()->GetOut());
- if ( !bLock && bUnlockLastFootnoteFrm &&
- !pLastFootnoteFrm->GetLower() &&
- !pLastFootnoteFrm->IsColLocked() &&
- !pLastFootnoteFrm->IsBackMoveLocked() )
- {
- pLastFootnoteFrm->Cut();
- SwFrm::DestroyFrm(pLastFootnoteFrm);
+ pLastFootnoteFrame->UnlockPosOfLowerObjs();
+ pLastFootnoteFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ if ( !bLock && bUnlockLastFootnoteFrame &&
+ !pLastFootnoteFrame->GetLower() &&
+ !pLastFootnoteFrame->IsColLocked() &&
+ !pLastFootnoteFrame->IsBackMoveLocked() )
+ {
+ pLastFootnoteFrame->Cut();
+ SwFrame::DestroyFrame(pLastFootnoteFrame);
}
}
}
}
-void SwPageFrm::UpdateFootnoteNum()
+void SwPageFrame::UpdateFootnoteNum()
{
// page numbering only if set at the document
if ( GetFormat()->GetDoc()->GetFootnoteInfo().eNum != FTNNUM_PAGE )
return;
- SwLayoutFrm* pBody = FindBodyCont();
+ SwLayoutFrame* pBody = FindBodyCont();
if( !pBody || !pBody->Lower() )
return;
- SwContentFrm* pContent = pBody->ContainsContent();
+ SwContentFrame* pContent = pBody->ContainsContent();
sal_uInt16 nNum = 0;
- while( pContent && pContent->FindPageFrm() == this )
+ while( pContent && pContent->FindPageFrame() == this )
{
- if( static_cast<SwTextFrm*>(pContent)->HasFootnote() )
+ if( static_cast<SwTextFrame*>(pContent)->HasFootnote() )
{
- SwFootnoteBossFrm* pBoss = pContent->FindFootnoteBossFrm( true );
- if( pBoss->GetUpper()->IsSctFrm() &&
- static_cast<SwSectionFrm*>(pBoss->GetUpper())->IsOwnFootnoteNum() )
- pContent = static_cast<SwSectionFrm*>(pBoss->GetUpper())->FindLastContent();
+ SwFootnoteBossFrame* pBoss = pContent->FindFootnoteBossFrame( true );
+ if( pBoss->GetUpper()->IsSctFrame() &&
+ static_cast<SwSectionFrame*>(pBoss->GetUpper())->IsOwnFootnoteNum() )
+ pContent = static_cast<SwSectionFrame*>(pBoss->GetUpper())->FindLastContent();
else
{
- SwFootnoteFrm* pFootnote = const_cast<SwFootnoteFrm*>(pBoss->FindFirstFootnote( pContent ));
+ SwFootnoteFrame* pFootnote = const_cast<SwFootnoteFrame*>(pBoss->FindFirstFootnote( pContent ));
while( pFootnote )
{
SwTextFootnote* pTextFootnote = pFootnote->GetAttr();
@@ -2363,18 +2363,18 @@ void SwPageFrm::UpdateFootnoteNum()
pTextFootnote->SetNumber( nNum, OUString() );
}
if ( pFootnote->GetNext() )
- pFootnote = static_cast<SwFootnoteFrm*>(pFootnote->GetNext());
+ pFootnote = static_cast<SwFootnoteFrame*>(pFootnote->GetNext());
else
{
- SwFootnoteBossFrm* pTmpBoss = pFootnote->FindFootnoteBossFrm( true );
+ SwFootnoteBossFrame* pTmpBoss = pFootnote->FindFootnoteBossFrame( true );
if( pTmpBoss )
{
- SwPageFrm* pPage = pTmpBoss->FindPageFrm();
+ SwPageFrame* pPage = pTmpBoss->FindPageFrame();
pFootnote = nullptr;
lcl_NextFootnoteBoss( pTmpBoss, pPage, false );
- SwFootnoteContFrm *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : nullptr;
+ SwFootnoteContFrame *pCont = pTmpBoss ? pTmpBoss->FindNearestFootnoteCont() : nullptr;
if ( pCont )
- pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower());
}
}
if( pFootnote && pFootnote->GetRef() != pContent )
@@ -2386,27 +2386,27 @@ void SwPageFrm::UpdateFootnoteNum()
}
}
-void SwFootnoteBossFrm::SetFootnoteDeadLine( const SwTwips nDeadLine )
+void SwFootnoteBossFrame::SetFootnoteDeadLine( const SwTwips nDeadLine )
{
- SwFrm *pBody = FindBodyCont();
- pBody->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ SwFrame *pBody = FindBodyCont();
+ pBody->Calc(getRootFrame()->GetCurrShell()->GetOut());
- SwFrm *pCont = FindFootnoteCont();
+ SwFrame *pCont = FindFootnoteCont();
const SwTwips nMax = nMaxFootnoteHeight;// current should exceed MaxHeight
SWRECTFN( this )
if ( pCont )
{
- pCont->Calc(getRootFrm()->GetCurrShell()->GetOut());
- nMaxFootnoteHeight = -(pCont->Frm().*fnRect->fnBottomDist)( nDeadLine );
+ pCont->Calc(getRootFrame()->GetCurrShell()->GetOut());
+ nMaxFootnoteHeight = -(pCont->Frame().*fnRect->fnBottomDist)( nDeadLine );
}
else
- nMaxFootnoteHeight = -(pBody->Frm().*fnRect->fnBottomDist)( nDeadLine );
+ nMaxFootnoteHeight = -(pBody->Frame().*fnRect->fnBottomDist)( nDeadLine );
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
+ const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
nMaxFootnoteHeight += pBody->Grow( LONG_MAX, true );
if ( IsInSct() )
- nMaxFootnoteHeight += FindSctFrm()->Grow( LONG_MAX, true );
+ nMaxFootnoteHeight += FindSctFrame()->Grow( LONG_MAX, true );
if ( nMaxFootnoteHeight < 0 )
nMaxFootnoteHeight = 0;
@@ -2414,15 +2414,15 @@ void SwFootnoteBossFrm::SetFootnoteDeadLine( const SwTwips nDeadLine )
nMaxFootnoteHeight = nMax;
}
-SwTwips SwFootnoteBossFrm::GetVarSpace() const
+SwTwips SwFootnoteBossFrame::GetVarSpace() const
{
// To not fall below 20% of the page height
// (in contrast to MSOffice where footnotes can fill a whole column/page)
- const SwPageFrm* pPg = FindPageFrm();
+ const SwPageFrame* pPg = FindPageFrame();
OSL_ENSURE( pPg || IsInSct(), "Footnote lost page" );
- const SwFrm *pBody = FindBodyCont();
+ const SwFrame *pBody = FindBodyCont();
SwTwips nRet;
if( pBody )
{
@@ -2431,35 +2431,35 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const
{
nRet = 0;
SwTwips nTmp = (*fnRect->fnYDiff)( (pBody->*fnRect->fnGetPrtTop)(),
- (Frm().*fnRect->fnGetTop)() );
- const SwSectionFrm* pSect = FindSctFrm();
+ (Frame().*fnRect->fnGetTop)() );
+ const SwSectionFrame* pSect = FindSctFrame();
// Endnotes in a ftncontainer causes a deadline:
// the bottom of the last contentfrm
if( pSect->IsEndnAtEnd() ) // endnotes allowed?
{
OSL_ENSURE( !Lower() || !Lower()->GetNext() || Lower()->GetNext()->
- IsFootnoteContFrm(), "FootnoteContainer expected" );
- const SwFootnoteContFrm* pCont = Lower() ?
- static_cast<const SwFootnoteContFrm*>(Lower()->GetNext()) : nullptr;
+ IsFootnoteContFrame(), "FootnoteContainer expected" );
+ const SwFootnoteContFrame* pCont = Lower() ?
+ static_cast<const SwFootnoteContFrame*>(Lower()->GetNext()) : nullptr;
if( pCont )
{
- const SwFootnoteFrm* pFootnote = static_cast<const SwFootnoteFrm*>(pCont->Lower());
+ const SwFootnoteFrame* pFootnote = static_cast<const SwFootnoteFrame*>(pCont->Lower());
while( pFootnote)
{
if( pFootnote->GetAttr()->GetFootnote().IsEndNote() )
{ // endnote found
- const SwFrm* pFrm = static_cast<const SwLayoutFrm*>(Lower())->Lower();
- if( pFrm )
+ const SwFrame* pFrame = static_cast<const SwLayoutFrame*>(Lower())->Lower();
+ if( pFrame )
{
- while( pFrm->GetNext() )
- pFrm = pFrm->GetNext(); // last cntntfrm
+ while( pFrame->GetNext() )
+ pFrame = pFrame->GetNext(); // last cntntfrm
nTmp += (*fnRect->fnYDiff)(
- (Frm().*fnRect->fnGetTop)(),
- (pFrm->Frm().*fnRect->fnGetBottom)() );
+ (Frame().*fnRect->fnGetTop)(),
+ (pFrame->Frame().*fnRect->fnGetBottom)() );
}
break;
}
- pFootnote = static_cast<const SwFootnoteFrm*>(pFootnote->GetNext());
+ pFootnote = static_cast<const SwFootnoteFrame*>(pFootnote->GetNext());
}
}
}
@@ -2468,22 +2468,22 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const
}
else
nRet = - (pPg->Prt().*fnRect->fnGetHeight)()/5;
- nRet += (pBody->Frm().*fnRect->fnGetHeight)();
+ nRet += (pBody->Frame().*fnRect->fnGetHeight)();
if( nRet < 0 )
nRet = 0;
}
else
nRet = 0;
- if ( IsPageFrm() )
+ if ( IsPageFrame() )
{
- const SwViewShell *pSh = getRootFrm() ? getRootFrm()->GetCurrShell() : nullptr;
+ const SwViewShell *pSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr;
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
- nRet += BROWSE_HEIGHT - Frm().Height();
+ nRet += BROWSE_HEIGHT - Frame().Height();
}
return nRet;
}
-/** Obtain if pFrm's size adjustment should be processed
+/** Obtain if pFrame's size adjustment should be processed
*
* For a page frame of columns directly below the page AdjustNeighbourhood() needs
* to be called, or Grow()/ Shrink() for frame columns respectively.
@@ -2495,28 +2495,28 @@ SwTwips SwFootnoteBossFrm::GetVarSpace() const
* @see Grow()
* @see Shrink()
*/
-sal_uInt8 SwFootnoteBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
+sal_uInt8 SwFootnoteBossFrame::_NeighbourhoodAdjustment( const SwFrame* ) const
{
sal_uInt8 nRet = NA_ONLY_ADJUST;
- if( GetUpper() && !GetUpper()->IsPageBodyFrm() )
+ if( GetUpper() && !GetUpper()->IsPageBodyFrame() )
{
// column sections need grow/shrink
- if( GetUpper()->IsFlyFrm() )
+ if( GetUpper()->IsFlyFrame() )
nRet = NA_GROW_SHRINK;
else
{
- OSL_ENSURE( GetUpper()->IsSctFrm(), "NeighbourhoodAdjustment: Unexpected Upper" );
+ OSL_ENSURE( GetUpper()->IsSctFrame(), "NeighbourhoodAdjustment: Unexpected Upper" );
if( !GetNext() && !GetPrev() )
nRet = NA_GROW_ADJUST; // section with a single column (FootnoteAtEnd)
else
{
- const SwFrm* pTmp = Lower();
+ const SwFrame* pTmp = Lower();
OSL_ENSURE( pTmp, "NeighbourhoodAdjustment: Missing Lower()" );
if( !pTmp->GetNext() )
nRet = NA_GROW_SHRINK;
else if( !GetUpper()->IsColLocked() )
nRet = NA_ADJUST_GROW;
- OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFootnoteContFrm(),
+ OSL_ENSURE( !pTmp->GetNext() || pTmp->GetNext()->IsFootnoteContFrame(),
"NeighbourhoodAdjustment: Who's that guy?" );
}
}
@@ -2524,32 +2524,32 @@ sal_uInt8 SwFootnoteBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const
return nRet;
}
-void SwPageFrm::SetColMaxFootnoteHeight()
+void SwPageFrame::SetColMaxFootnoteHeight()
{
- SwLayoutFrm *pBody = FindBodyCont();
- if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm() )
+ SwLayoutFrame *pBody = FindBodyCont();
+ if( pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame() )
{
- SwColumnFrm* pCol = static_cast<SwColumnFrm*>(pBody->Lower());
+ SwColumnFrame* pCol = static_cast<SwColumnFrame*>(pBody->Lower());
do
{
pCol->SetMaxFootnoteHeight( GetMaxFootnoteHeight() );
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
} while ( pCol );
}
}
-bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *pOldBoss,
- SwFootnoteBossFrm *pNewBoss, const bool bFootnoteNums )
+bool SwLayoutFrame::MoveLowerFootnotes( SwContentFrame *pStart, SwFootnoteBossFrame *pOldBoss,
+ SwFootnoteBossFrame *pNewBoss, const bool bFootnoteNums )
{
SwDoc *pDoc = GetFormat()->GetDoc();
if ( pDoc->GetFootnoteIdxs().empty() )
return false;
if( pDoc->GetFootnoteInfo().ePos == FTNPOS_CHAPTER &&
- ( !IsInSct() || !FindSctFrm()->IsFootnoteAtEnd() ) )
+ ( !IsInSct() || !FindSctFrame()->IsFootnoteAtEnd() ) )
return true;
if ( !pNewBoss )
- pNewBoss = FindFootnoteBossFrm( true );
+ pNewBoss = FindFootnoteBossFrame( true );
if ( pNewBoss == pOldBoss )
return false;
@@ -2557,47 +2557,47 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
if( !pStart )
pStart = ContainsContent();
- SwFootnoteFrms aFootnoteArr;
+ SwFootnoteFrames aFootnoteArr;
while ( IsAnLower( pStart ) )
{
- if ( static_cast<SwTextFrm*>(pStart)->HasFootnote() )
+ if ( static_cast<SwTextFrame*>(pStart)->HasFootnote() )
{
// OD 03.04.2003 #108446# - To avoid unnecessary moves of footnotes
// use new parameter <_bCollectOnlyPreviousFootnote> (4th parameter of
- // method <SwFootnoteBossFrm::CollectFootnote(..)>) to control, that only
+ // method <SwFootnoteBossFrame::CollectFootnote(..)>) to control, that only
// footnotes have to be collected, that are positioned before the
// new dedicated footnote boss frame.
pNewBoss->CollectFootnotes( pStart, pOldBoss, aFootnoteArr, true );
}
- pStart = pStart->GetNextContentFrm();
+ pStart = pStart->GetNextContentFrame();
}
OSL_ENSURE( pOldBoss->IsInSct() == pNewBoss->IsInSct(),
"MoveLowerFootnotes: Section confusion" );
- SwFootnoteFrms *pFootnoteArr;
- SwLayoutFrm* pNewChief = nullptr;
- SwLayoutFrm* pOldChief = nullptr;
+ SwFootnoteFrames *pFootnoteArr;
+ SwLayoutFrame* pNewChief = nullptr;
+ SwLayoutFrame* pOldChief = nullptr;
bool bFoundCandidate = false;
if (pStart && pOldBoss->IsInSct())
{
- pOldChief = pOldBoss->FindSctFrm();
- pNewChief = pNewBoss->FindSctFrm();
+ pOldChief = pOldBoss->FindSctFrame();
+ pNewChief = pNewBoss->FindSctFrame();
bFoundCandidate = pOldChief != pNewChief;
}
if (bFoundCandidate)
{
- pFootnoteArr = new SwFootnoteFrms;
- pOldChief = pOldBoss->FindFootnoteBossFrm( true );
- pNewChief = pNewBoss->FindFootnoteBossFrm( true );
+ pFootnoteArr = new SwFootnoteFrames;
+ pOldChief = pOldBoss->FindFootnoteBossFrame( true );
+ pNewChief = pNewBoss->FindFootnoteBossFrame( true );
while( pOldChief->IsAnLower( pStart ) )
{
- if ( static_cast<SwTextFrm*>(pStart)->HasFootnote() )
- static_cast<SwFootnoteBossFrm*>(pNewChief)->CollectFootnotes( pStart,
+ if ( static_cast<SwTextFrame*>(pStart)->HasFootnote() )
+ static_cast<SwFootnoteBossFrame*>(pNewChief)->CollectFootnotes( pStart,
pOldBoss, *pFootnoteArr );
- pStart = pStart->GetNextContentFrm();
+ pStart = pStart->GetNextContentFrame();
}
if( pFootnoteArr->empty() )
{
@@ -2614,7 +2614,7 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
pNewBoss->_MoveFootnotes( aFootnoteArr, true );
if( pFootnoteArr )
{
- static_cast<SwFootnoteBossFrm*>(pNewChief)->_MoveFootnotes( *pFootnoteArr, true );
+ static_cast<SwFootnoteBossFrame*>(pNewChief)->_MoveFootnotes( *pFootnoteArr, true );
delete pFootnoteArr;
}
bMoved = true;
@@ -2622,8 +2622,8 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
// update FootnoteNum only at page change
if ( bFootnoteNums )
{
- SwPageFrm* pOldPage = pOldBoss->FindPageFrm();
- SwPageFrm* pNewPage =pNewBoss->FindPageFrm();
+ SwPageFrame* pOldPage = pOldBoss->FindPageFrame();
+ SwPageFrame* pNewPage =pNewBoss->FindPageFrame();
if( pOldPage != pNewPage )
{
pOldPage->UpdateFootnoteNum();
@@ -2634,10 +2634,10 @@ bool SwLayoutFrm::MoveLowerFootnotes( SwContentFrm *pStart, SwFootnoteBossFrm *p
return bMoved;
}
-bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBoss )
+bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pOldBoss )
{
OSL_ENSURE( IsInFootnote(), "no footnote." );
- SwLayoutFrm *pFootnote = FindFootnoteFrm();
+ SwLayoutFrame *pFootnote = FindFootnoteFrame();
// The first paragraph in the first footnote in the first column in the
// sectionfrm at the top of the page has not to move forward, if the
@@ -2645,42 +2645,42 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
if( pOldBoss->IsInSct() && !pOldBoss->GetIndPrev() && !GetIndPrev() &&
!pFootnote->GetPrev() )
{
- SwLayoutFrm* pBody = pOldBoss->FindBodyCont();
+ SwLayoutFrame* pBody = pOldBoss->FindBodyCont();
if( !pBody || !pBody->Lower() )
return true;
}
//fix(9538): if the footnote has neighbors behind itself, remove them temporarily
- SwLayoutFrm *pNxt = static_cast<SwLayoutFrm*>(pFootnote->GetNext());
- SwLayoutFrm *pLst = nullptr;
+ SwLayoutFrame *pNxt = static_cast<SwLayoutFrame*>(pFootnote->GetNext());
+ SwLayoutFrame *pLst = nullptr;
while ( pNxt )
{
while ( pNxt->GetNext() )
- pNxt = static_cast<SwLayoutFrm*>(pNxt->GetNext());
+ pNxt = static_cast<SwLayoutFrame*>(pNxt->GetNext());
if ( pNxt == pLst )
pNxt = nullptr;
else
{ pLst = pNxt;
- SwContentFrm *pCnt = pNxt->ContainsContent();
+ SwContentFrame *pCnt = pNxt->ContainsContent();
if( pCnt )
pCnt->MoveFootnoteCntFwd( true, pOldBoss );
- pNxt = static_cast<SwLayoutFrm*>(pFootnote->GetNext());
+ pNxt = static_cast<SwLayoutFrame*>(pFootnote->GetNext());
}
}
bool bSamePage = true;
- SwLayoutFrm *pNewUpper =
+ SwLayoutFrame *pNewUpper =
GetLeaf( bMakePage ? MAKEPAGE_INSERT : MAKEPAGE_NONE, true );
if ( pNewUpper )
{
bool bSameBoss = true;
- SwFootnoteBossFrm * const pNewBoss = pNewUpper->FindFootnoteBossFrm();
+ SwFootnoteBossFrame * const pNewBoss = pNewUpper->FindFootnoteBossFrame();
// Are we changing the column/page?
if ( !( bSameBoss = (pNewBoss == pOldBoss) ) )
{
- bSamePage = pOldBoss->FindPageFrm() == pNewBoss->FindPageFrm(); // page change?
- pNewUpper->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ bSamePage = pOldBoss->FindPageFrame() == pNewBoss->FindPageFrame(); // page change?
+ pNewUpper->Calc(getRootFrame()->GetCurrShell()->GetOut());
}
// The layout leaf of the footnote is either a footnote container or a footnote.
@@ -2689,15 +2689,15 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
// If it is a container or the reference differs, create a new footnote and add
// it into the container.
// Create also a SectionFrame if currently in a area inside a footnote.
- SwFootnoteFrm* pTmpFootnote = pNewUpper->IsFootnoteFrm() ? static_cast<SwFootnoteFrm*>(pNewUpper) : nullptr;
+ SwFootnoteFrame* pTmpFootnote = pNewUpper->IsFootnoteFrame() ? static_cast<SwFootnoteFrame*>(pNewUpper) : nullptr;
if( !pTmpFootnote )
{
- OSL_ENSURE( pNewUpper->IsFootnoteContFrm(), "New Upper not a FootnoteCont.");
- SwFootnoteContFrm *pCont = static_cast<SwFootnoteContFrm*>(pNewUpper);
+ OSL_ENSURE( pNewUpper->IsFootnoteContFrame(), "New Upper not a FootnoteCont.");
+ SwFootnoteContFrame *pCont = static_cast<SwFootnoteContFrame*>(pNewUpper);
// create footnote
- SwFootnoteFrm *pOld = FindFootnoteFrm();
- pTmpFootnote = new SwFootnoteFrm( pOld->GetFormat()->GetDoc()->GetDfltFrameFormat(),
+ SwFootnoteFrame *pOld = FindFootnoteFrame();
+ pTmpFootnote = new SwFootnoteFrame( pOld->GetFormat()->GetDoc()->GetDfltFrameFormat(),
pOld, pOld->GetRef(), pOld->GetAttr() );
// chaining of footnotes
if ( pOld->GetFollow() )
@@ -2707,47 +2707,47 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
}
pOld->SetFollow( pTmpFootnote );
pTmpFootnote->SetMaster( pOld );
- SwFrm* pNx = pCont->Lower();
+ SwFrame* pNx = pCont->Lower();
if( pNx && pTmpFootnote->GetAttr()->GetFootnote().IsEndNote() )
- while(pNx && !static_cast<SwFootnoteFrm*>(pNx)->GetAttr()->GetFootnote().IsEndNote())
+ while(pNx && !static_cast<SwFootnoteFrame*>(pNx)->GetAttr()->GetFootnote().IsEndNote())
pNx = pNx->GetNext();
pTmpFootnote->Paste( pCont, pNx );
- pTmpFootnote->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pTmpFootnote->Calc(getRootFrame()->GetCurrShell()->GetOut());
}
- OSL_ENSURE( pTmpFootnote->GetAttr() == FindFootnoteFrm()->GetAttr(), "Wrong Footnote!" );
+ OSL_ENSURE( pTmpFootnote->GetAttr() == FindFootnoteFrame()->GetAttr(), "Wrong Footnote!" );
// areas inside of footnotes get a special treatment
- SwLayoutFrm *pNewUp = pTmpFootnote;
+ SwLayoutFrame *pNewUp = pTmpFootnote;
if( IsInSct() )
{
- SwSectionFrm* pSect = FindSctFrm();
+ SwSectionFrame* pSect = FindSctFrame();
// area inside of a footnote (or only footnote in an area)?
if( pSect->IsInFootnote() )
{
- if( pTmpFootnote->Lower() && pTmpFootnote->Lower()->IsSctFrm() &&
- pSect->GetFollow() == static_cast<SwSectionFrm*>(pTmpFootnote->Lower()) )
- pNewUp = static_cast<SwSectionFrm*>(pTmpFootnote->Lower());
+ if( pTmpFootnote->Lower() && pTmpFootnote->Lower()->IsSctFrame() &&
+ pSect->GetFollow() == static_cast<SwSectionFrame*>(pTmpFootnote->Lower()) )
+ pNewUp = static_cast<SwSectionFrame*>(pTmpFootnote->Lower());
else
{
- pNewUp = new SwSectionFrm( *pSect, false );
+ pNewUp = new SwSectionFrame( *pSect, false );
pNewUp->InsertBefore( pTmpFootnote, pTmpFootnote->Lower() );
- static_cast<SwSectionFrm*>(pNewUp)->Init();
- pNewUp->Frm().Pos() = pTmpFootnote->Frm().Pos();
- pNewUp->Frm().Pos().Y() += 1; // for notifications
+ static_cast<SwSectionFrame*>(pNewUp)->Init();
+ pNewUp->Frame().Pos() = pTmpFootnote->Frame().Pos();
+ pNewUp->Frame().Pos().Y() += 1; // for notifications
// If the section frame has a successor then the latter needs
// to be moved behind the new Follow of the section frame.
- SwFrm* pTmp = pSect->GetNext();
+ SwFrame* pTmp = pSect->GetNext();
if( pTmp )
{
- SwFlowFrm* pTmpNxt;
- if( pTmp->IsContentFrm() )
- pTmpNxt = static_cast<SwContentFrm*>(pTmp);
- else if( pTmp->IsSctFrm() )
- pTmpNxt = static_cast<SwSectionFrm*>(pTmp);
+ SwFlowFrame* pTmpNxt;
+ if( pTmp->IsContentFrame() )
+ pTmpNxt = static_cast<SwContentFrame*>(pTmp);
+ else if( pTmp->IsSctFrame() )
+ pTmpNxt = static_cast<SwSectionFrame*>(pTmp);
else
{
- OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
- pTmpNxt = static_cast<SwTabFrm*>(pTmp);
+ OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" );
+ pTmpNxt = static_cast<SwTabFrame*>(pTmp);
}
pTmpNxt->MoveSubTree( pTmpFootnote, pNewUp->GetNext() );
}
@@ -2763,7 +2763,7 @@ bool SwContentFrm::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrm *pOldBo
return bSamePage;
}
-SwSaveFootnoteHeight::SwSaveFootnoteHeight( SwFootnoteBossFrm *pBs, const SwTwips nDeadLine ) :
+SwSaveFootnoteHeight::SwSaveFootnoteHeight( SwFootnoteBossFrame *pBs, const SwTwips nDeadLine ) :
pBoss( pBs ),
nOldHeight( pBs->GetMaxFootnoteHeight() )
{
@@ -2787,18 +2787,18 @@ SwSaveFootnoteHeight::~SwSaveFootnoteHeight()
// but the GetRef() is called first, so we have to ignore a master/follow
// mismatch.
-const SwContentFrm* SwFootnoteFrm::GetRef() const
+const SwContentFrame* SwFootnoteFrame::GetRef() const
{
- const SwContentFrm* pRefAttr = GetRefFromAttr();
+ const SwContentFrame* pRefAttr = GetRefFromAttr();
SAL_WARN_IF( pRef != pRefAttr && !pRef->IsAnFollow( pRefAttr )
&& !pRefAttr->IsAnFollow( pRef ),
"sw", "access to deleted Frame? pRef != pAttr->GetRef()" );
return pRef;
}
-SwContentFrm* SwFootnoteFrm::GetRef()
+SwContentFrame* SwFootnoteFrame::GetRef()
{
- const SwContentFrm* pRefAttr = GetRefFromAttr();
+ const SwContentFrame* pRefAttr = GetRefFromAttr();
SAL_WARN_IF( pRef != pRefAttr && !pRef->IsAnFollow( pRefAttr )
&& !pRefAttr->IsAnFollow( pRef ),
"sw", "access to deleted Frame? pRef != pAttr->GetRef()" );
@@ -2806,63 +2806,63 @@ SwContentFrm* SwFootnoteFrm::GetRef()
}
#endif
-const SwContentFrm* SwFootnoteFrm::GetRefFromAttr() const
+const SwContentFrame* SwFootnoteFrame::GetRefFromAttr() const
{
- SwFootnoteFrm* pThis = const_cast<SwFootnoteFrm*>(this);
+ SwFootnoteFrame* pThis = const_cast<SwFootnoteFrame*>(this);
return pThis->GetRefFromAttr();
}
-SwContentFrm* SwFootnoteFrm::GetRefFromAttr()
+SwContentFrame* SwFootnoteFrame::GetRefFromAttr()
{
assert(pAttr && "invalid Attribute");
SwTextNode& rTNd = (SwTextNode&)pAttr->GetTextNode();
SwPosition aPos( rTNd, SwIndex( &rTNd, pAttr->GetStart() ));
- SwContentFrm* pCFrm = rTNd.getLayoutFrm( getRootFrm(), nullptr, &aPos, false );
- return pCFrm;
+ SwContentFrame* pCFrame = rTNd.getLayoutFrame( getRootFrame(), nullptr, &aPos, false );
+ return pCFrame;
}
/** search for last content in the current footnote frame
OD 2005-12-02 #i27138#
*/
-SwContentFrm* SwFootnoteFrm::FindLastContent()
+SwContentFrame* SwFootnoteFrame::FindLastContent()
{
- SwContentFrm* pLastContentFrm( nullptr );
+ SwContentFrame* pLastContentFrame( nullptr );
// find last lower, which is a content frame or contains content.
// hidden text frames, empty sections and empty tables have to be skipped.
- SwFrm* pLastLowerOfFootnote( GetLower() );
- SwFrm* pTmpLastLower( pLastLowerOfFootnote );
+ SwFrame* pLastLowerOfFootnote( GetLower() );
+ SwFrame* pTmpLastLower( pLastLowerOfFootnote );
while ( pTmpLastLower && pTmpLastLower->GetNext() )
{
pTmpLastLower = pTmpLastLower->GetNext();
- if ( ( pTmpLastLower->IsTextFrm() &&
- !static_cast<SwTextFrm*>(pTmpLastLower)->IsHiddenNow() ) ||
- ( pTmpLastLower->IsSctFrm() &&
- static_cast<SwSectionFrm*>(pTmpLastLower)->GetSection() &&
- static_cast<SwSectionFrm*>(pTmpLastLower)->ContainsContent() ) ||
- ( pTmpLastLower->IsTabFrm() &&
- static_cast<SwTabFrm*>(pTmpLastLower)->ContainsContent() ) )
+ if ( ( pTmpLastLower->IsTextFrame() &&
+ !static_cast<SwTextFrame*>(pTmpLastLower)->IsHiddenNow() ) ||
+ ( pTmpLastLower->IsSctFrame() &&
+ static_cast<SwSectionFrame*>(pTmpLastLower)->GetSection() &&
+ static_cast<SwSectionFrame*>(pTmpLastLower)->ContainsContent() ) ||
+ ( pTmpLastLower->IsTabFrame() &&
+ static_cast<SwTabFrame*>(pTmpLastLower)->ContainsContent() ) )
{
pLastLowerOfFootnote = pTmpLastLower;
}
}
// determine last content frame depending on type of found last lower.
- if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsTabFrm() )
+ if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsTabFrame() )
{
- pLastContentFrm = static_cast<SwTabFrm*>(pLastLowerOfFootnote)->FindLastContent();
+ pLastContentFrame = static_cast<SwTabFrame*>(pLastLowerOfFootnote)->FindLastContent();
}
- else if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsSctFrm() )
+ else if ( pLastLowerOfFootnote && pLastLowerOfFootnote->IsSctFrame() )
{
- pLastContentFrm = static_cast<SwSectionFrm*>(pLastLowerOfFootnote)->FindLastContent();
+ pLastContentFrame = static_cast<SwSectionFrame*>(pLastLowerOfFootnote)->FindLastContent();
}
else
{
- pLastContentFrm = dynamic_cast<SwContentFrm*>(pLastLowerOfFootnote);
+ pLastContentFrame = dynamic_cast<SwContentFrame*>(pLastLowerOfFootnote);
}
- return pLastContentFrm;
+ return pLastContentFrame;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index fc2fd26b2419..55ab3914de47 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -35,9 +35,9 @@
extern bool bObjsDirect; //frmtool.cxx
-static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm)
+static SwTwips lcl_GetFrameMinHeight(const SwLayoutFrame & rFrame)
{
- const SwFormatFrmSize &rSz = rFrm.GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = rFrame.GetFormat()->GetFrameSize();
SwTwips nMinHeight;
switch (rSz.GetHeightSizeType())
@@ -54,50 +54,50 @@ static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm)
return nMinHeight;
}
-static SwTwips lcl_CalcContentHeight(SwLayoutFrm & frm)
+static SwTwips lcl_CalcContentHeight(SwLayoutFrame & frm)
{
SwTwips nRemaining = 0;
- SwFrm* pFrm = frm.Lower();
+ SwFrame* pFrame = frm.Lower();
- while ( pFrm )
+ while ( pFrame )
{
SwTwips nTmp;
- nTmp = pFrm->Frm().Height();
+ nTmp = pFrame->Frame().Height();
nRemaining += nTmp;
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
{
- nTmp = static_cast<SwTextFrm*>(pFrm)->GetParHeight()
- - pFrm->Prt().Height();
- // This TextFrm would like to be a bit bigger
+ nTmp = static_cast<SwTextFrame*>(pFrame)->GetParHeight()
+ - pFrame->Prt().Height();
+ // This TextFrame would like to be a bit bigger
nRemaining += nTmp;
}
- else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() )
+ else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
{
- nTmp = static_cast<SwSectionFrm*>(pFrm)->Undersize();
+ nTmp = static_cast<SwSectionFrame*>(pFrame)->Undersize();
nRemaining += nTmp;
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
return nRemaining;
}
-static void lcl_LayoutFrmEnsureMinHeight(SwLayoutFrm & rFrm,
+static void lcl_LayoutFrameEnsureMinHeight(SwLayoutFrame & rFrame,
const SwBorderAttrs * )
{
- SwTwips nMinHeight = lcl_GetFrmMinHeight(rFrm);
+ SwTwips nMinHeight = lcl_GetFrameMinHeight(rFrame);
- if (rFrm.Frm().Height() < nMinHeight)
+ if (rFrame.Frame().Height() < nMinHeight)
{
- rFrm.Grow(nMinHeight - rFrm.Frm().Height());
+ rFrame.Grow(nMinHeight - rFrame.Frame().Height());
}
}
-SwHeadFootFrm::SwHeadFootFrm( SwFrameFormat * pFormat, SwFrm* pSib, sal_uInt16 nTypeIn)
- : SwLayoutFrm( pFormat, pSib )
+SwHeadFootFrame::SwHeadFootFrame( SwFrameFormat * pFormat, SwFrame* pSib, sal_uInt16 nTypeIn)
+ : SwLayoutFrame( pFormat, pSib )
{
- mnFrmType = nTypeIn;
+ mnFrameType = nTypeIn;
SetDerivedVert( false );
const SwFormatContent &rCnt = pFormat->GetContent();
@@ -112,13 +112,13 @@ SwHeadFootFrm::SwHeadFootFrm( SwFrameFormat * pFormat, SwFrm* pSib, sal_uInt16 n
bObjsDirect = bOld;
}
-void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
+void SwHeadFootFrame::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
{
if (GetEatSpacing())
{
/* The minimal height of the print area is the minimal height of the
frame without the height needed for borders and shadow. */
- SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
+ SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
nMinHeight -= pAttrs->CalcTop();
nMinHeight -= pAttrs->CalcBottom();
@@ -147,7 +147,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
/* calculate initial spacing/line space */
SwTwips nSpace, nLine;
- if (IsHeaderFrm())
+ if (IsHeaderFrame())
{
nSpace = pAttrs->CalcBottom();
nLine = pAttrs->CalcBottomLine();
@@ -166,7 +166,7 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
nSpace = nLine;
/* calculate real vertical space between frame and print area */
- if (IsHeaderFrm())
+ if (IsHeaderFrame())
nUL = pAttrs->CalcTop() + nSpace;
else
nUL = pAttrs->CalcBottom() + nSpace;
@@ -177,17 +177,17 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
maPrt.Left(pAttrs->CalcLeft(this));
- if (IsHeaderFrm())
+ if (IsHeaderFrame())
maPrt.Top(pAttrs->CalcTop());
else
maPrt.Top(nSpace);
- maPrt.Width(maFrm.Width() - nLR);
+ maPrt.Width(maFrame.Width() - nLR);
SwTwips nNewHeight;
- if (nUL < maFrm.Height())
- nNewHeight = maFrm.Height() - nUL;
+ if (nUL < maFrame.Height())
+ nNewHeight = maFrame.Height() - nUL;
else
nNewHeight = 0;
@@ -199,19 +199,19 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs)
maPrt.Left( pAttrs->CalcLeft( this ) );
maPrt.Top ( pAttrs->CalcTop() );
- // Set sizes - the sizes are given by the surrounding Frm, just
+ // Set sizes - the sizes are given by the surrounding Frame, just
// subtract the borders.
// OD 23.01.2003 #106895# - add first parameter to <SwBorderAttrs::CalcRight(..)>
SwTwips nLR = pAttrs->CalcLeft( this ) + pAttrs->CalcRight( this );
- maPrt.Width ( maFrm.Width() - nLR );
- maPrt.Height( maFrm.Height()- nUL );
+ maPrt.Width ( maFrame.Width() - nLR );
+ maPrt.Height( maFrame.Height()- nUL );
}
mbValidPrtArea = true;
}
-void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
+void SwHeadFootFrame::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if ( !HasFixSize() )
{
@@ -220,7 +220,7 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
mbValidSize = mbValidPrtArea = true;
const SwTwips nBorder = nUL;
- SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
+ SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
nMinHeight -= pAttrs->CalcTop();
nMinHeight -= pAttrs->CalcBottom();
@@ -239,60 +239,60 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
do
{
nOldHeight = Prt().Height();
- SwFrm* pFrm = Lower();
+ SwFrame* pFrame = Lower();
// #i64301#
- if ( pFrm &&
- aOldFooterPrtPos != ( Frm().Pos() + Prt().Pos() ) )
+ if ( pFrame &&
+ aOldFooterPrtPos != ( Frame().Pos() + Prt().Pos() ) )
{
- pFrm->_InvalidatePos();
- aOldFooterPrtPos = Frm().Pos() + Prt().Pos();
+ pFrame->_InvalidatePos();
+ aOldFooterPrtPos = Frame().Pos() + Prt().Pos();
}
int nLoopControl = 0;
- while( pFrm )
+ while( pFrame )
{
- pFrm->Calc(getRootFrm()->GetCurrShell()->GetOut());
+ pFrame->Calc(getRootFrame()->GetCurrShell()->GetOut());
// #i43771# - format also object anchored
// at the frame
// #i46941# - frame has to be valid.
// Note: frame could be invalid after calling its format,
// if it's locked
- OSL_ENSURE( StackHack::IsLocked() || !pFrm->IsTextFrm() ||
- pFrm->IsValid() ||
- static_cast<SwTextFrm*>(pFrm)->IsJoinLocked(),
- "<SwHeadFootFrm::FormatSize(..)> - text frame invalid and not locked." );
- if ( pFrm->IsTextFrm() && pFrm->IsValid() )
+ OSL_ENSURE( StackHack::IsLocked() || !pFrame->IsTextFrame() ||
+ pFrame->IsValid() ||
+ static_cast<SwTextFrame*>(pFrame)->IsJoinLocked(),
+ "<SwHeadFootFrame::FormatSize(..)> - text frame invalid and not locked." );
+ if ( pFrame->IsTextFrame() && pFrame->IsValid() )
{
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pFrm,
- *(pFrm->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pFrame,
+ *(pFrame->FindPageFrame()) ) )
{
if (nLoopControl++ < 20)
{
// restart format with first content
- pFrm = Lower();
+ pFrame = Lower();
continue;
}
else
- SAL_WARN("sw", "SwHeadFootFrm::FormatSize: loop detection triggered");
+ SAL_WARN("sw", "SwHeadFootFrame::FormatSize: loop detection triggered");
}
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
nRemaining = 0;
- pFrm = Lower();
+ pFrame = Lower();
- while ( pFrm )
+ while ( pFrame )
{
- nRemaining += pFrm->Frm().Height();
-
- if( pFrm->IsTextFrm() &&
- static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
- // This TextFrm would like to be a bit bigger
- nRemaining += static_cast<SwTextFrm*>(pFrm)->GetParHeight()
- - pFrm->Prt().Height();
- else if( pFrm->IsSctFrm() &&
- static_cast<SwSectionFrm*>(pFrm)->IsUndersized() )
- nRemaining += static_cast<SwSectionFrm*>(pFrm)->Undersize();
- pFrm = pFrm->GetNext();
+ nRemaining += pFrame->Frame().Height();
+
+ if( pFrame->IsTextFrame() &&
+ static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
+ // This TextFrame would like to be a bit bigger
+ nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight()
+ - pFrame->Prt().Height();
+ else if( pFrame->IsSctFrame() &&
+ static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
+ nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize();
+ pFrame = pFrame->GetNext();
}
if ( nRemaining < nMinHeight )
nRemaining = nMinHeight;
@@ -326,32 +326,32 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
if ( Grow( nDiff ) )
{
- pFrm = Lower();
+ pFrame = Lower();
- while ( pFrm )
+ while ( pFrame )
{
- if( pFrm->IsTextFrm())
+ if( pFrame->IsTextFrame())
{
- SwTextFrm * pTmpFrm = static_cast<SwTextFrm*>(pFrm);
- if (pTmpFrm->IsUndersized() )
+ SwTextFrame * pTmpFrame = static_cast<SwTextFrame*>(pFrame);
+ if (pTmpFrame->IsUndersized() )
{
- pTmpFrm->InvalidateSize();
- pTmpFrm->Prepare(PREP_ADJUST_FRM);
+ pTmpFrame->InvalidateSize();
+ pTmpFrame->Prepare(PREP_ADJUST_FRM);
}
}
/* #i3568# Undersized sections need to be
invalidated too. */
- else if (pFrm->IsSctFrm())
+ else if (pFrame->IsSctFrame())
{
- SwSectionFrm * pTmpFrm =
- static_cast<SwSectionFrm*>(pFrm);
- if (pTmpFrm->IsUndersized() )
+ SwSectionFrame * pTmpFrame =
+ static_cast<SwSectionFrame*>(pFrame);
+ if (pTmpFrame->IsUndersized() )
{
- pTmpFrm->InvalidateSize();
- pTmpFrm->Prepare(PREP_ADJUST_FRM);
+ pTmpFrame->InvalidateSize();
+ pTmpFrame->Prepare(PREP_ADJUST_FRM);
}
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
}
}
@@ -365,15 +365,15 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
else
break;
// Don't overwrite the lower edge of the upper
- if ( GetUpper() && Frm().Height() )
+ if ( GetUpper() && Frame().Height() )
{
- const SwTwips nDeadLine = GetUpper()->Frm().Top() +
+ const SwTwips nDeadLine = GetUpper()->Frame().Top() +
GetUpper()->Prt().Bottom();
- const SwTwips nBot = Frm().Bottom();
+ const SwTwips nBot = Frame().Bottom();
if ( nBot > nDeadLine )
{
- Frm().Bottom( nDeadLine );
- Prt().SSize().Height() = Frm().Height() - nBorder;
+ Frame().Bottom( nDeadLine );
+ Prt().SSize().Height() = Frame().Height() - nBorder;
}
}
mbValidSize = mbValidPrtArea = true;
@@ -386,28 +386,28 @@ void SwHeadFootFrm::FormatSize(SwTwips nUL, const SwBorderAttrs * pAttrs)
{
do
{
- if ( Frm().Height() != pAttrs->GetSize().Height() )
- ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
+ if ( Frame().Height() != pAttrs->GetSize().Height() )
+ ChgSize( Size( Frame().Width(), pAttrs->GetSize().Height()));
mbValidSize = true;
MakePos();
} while ( !mbValidSize );
}
}
-void SwHeadFootFrm::Format(vcl::RenderContext* pRenderContext, const SwBorderAttrs * pAttrs)
+void SwHeadFootFrame::Format(vcl::RenderContext* pRenderContext, const SwBorderAttrs * pAttrs)
{
- OSL_ENSURE( pAttrs, "SwFooterFrm::Format, pAttrs is 0." );
+ OSL_ENSURE( pAttrs, "SwFooterFrame::Format, pAttrs is 0." );
if ( mbValidPrtArea && mbValidSize )
return;
- if ( ! GetEatSpacing() && IsHeaderFrm())
+ if ( ! GetEatSpacing() && IsHeaderFrame())
{
- SwLayoutFrm::Format(pRenderContext, pAttrs);
+ SwLayoutFrame::Format(pRenderContext, pAttrs);
}
else
{
- lcl_LayoutFrmEnsureMinHeight(*this, pAttrs);
+ lcl_LayoutFrameEnsureMinHeight(*this, pAttrs);
long nUL = pAttrs->CalcTop() + pAttrs->CalcBottom();
@@ -419,7 +419,7 @@ void SwHeadFootFrm::Format(vcl::RenderContext* pRenderContext, const SwBorderAtt
}
}
-SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwHeadFootFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwTwips nResult;
@@ -429,13 +429,13 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
}
else if (!GetEatSpacing())
{
- nResult = SwLayoutFrm::GrowFrm(nDist, bTst, bInfo);
+ nResult = SwLayoutFrame::GrowFrame(nDist, bTst, bInfo);
}
else
{
nResult = 0;
- auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
OSL_ENSURE(pAccess, "no border attributes");
SwBorderAttrs * pAttrs = pAccess->Get();
@@ -446,8 +446,8 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nMaxEat;
/* calculate maximum eatable spacing */
- if (IsHeaderFrm())
- nMaxEat = maFrm.Height() - maPrt.Top() - maPrt.Height() - pAttrs->CalcBottomLine();
+ if (IsHeaderFrame())
+ nMaxEat = maFrame.Height() - maPrt.Top() - maPrt.Height() - pAttrs->CalcBottomLine();
else
nMaxEat = maPrt.Top() - pAttrs->CalcTopLine();
@@ -456,8 +456,8 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
/* If the frame is too small, eat less spacing thus letting the frame
grow more. */
- SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
- SwTwips nFrameTooSmall = nMinHeight - Frm().Height();
+ SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
+ SwTwips nFrameTooSmall = nMinHeight - Frame().Height();
if (nFrameTooSmall > 0)
nEat -= nFrameTooSmall;
@@ -476,7 +476,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
{
if ( ! bTst)
{
- if (! IsHeaderFrm())
+ if (! IsHeaderFrame())
{
maPrt.Top(maPrt.Top() - nEat);
maPrt.Height(maPrt.Height() - nEat);
@@ -487,7 +487,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
nResult += nEat;
// OD 14.04.2003 #108719# - trigger fly frame notify.
- if ( IsHeaderFrm() )
+ if ( IsHeaderFrame() )
{
bNotifyFlys = true;
}
@@ -495,11 +495,11 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if (nDist - nEat > 0)
{
- const SwTwips nFrmGrow =
- SwLayoutFrm::GrowFrm( nDist - nEat, bTst, bInfo );
+ const SwTwips nFrameGrow =
+ SwLayoutFrame::GrowFrame( nDist - nEat, bTst, bInfo );
- nResult += nFrmGrow;
- if ( nFrmGrow > 0 )
+ nResult += nFrameGrow;
+ if ( nFrameGrow > 0 )
{
bNotifyFlys = false;
}
@@ -518,7 +518,7 @@ SwTwips SwHeadFootFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
return nResult;
}
-SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwHeadFootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwTwips nResult;
@@ -528,14 +528,14 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
}
else if (! GetEatSpacing())
{
- nResult = SwLayoutFrm::ShrinkFrm(nDist, bTst, bInfo);
+ nResult = SwLayoutFrame::ShrinkFrame(nDist, bTst, bInfo);
}
else
{
nResult = 0;
- SwTwips nMinHeight = lcl_GetFrmMinHeight(*this);
- SwTwips nOldHeight = Frm().Height();
+ SwTwips nMinHeight = lcl_GetFrameMinHeight(*this);
+ SwTwips nOldHeight = Frame().Height();
SwTwips nRest = 0; // Amount to shrink by spitting out spacing
if ( nOldHeight >= nMinHeight )
@@ -564,7 +564,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
bool bNotifyFlys = false;
if (nRest > 0)
{
- auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
OSL_ENSURE(pAccess, "no border attributes");
SwBorderAttrs * pAttrs = pAccess->Get();
@@ -592,7 +592,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if (!bTst)
{
- if (! IsHeaderFrm() )
+ if (! IsHeaderFrame() )
{
maPrt.Top(maPrt.Top() + nShrink);
maPrt.Height(maPrt.Height() - nShrink);
@@ -602,7 +602,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
}
nResult += nShrink;
// OD 14.04.2003 #108719# - trigger fly frame notify.
- if ( IsHeaderFrm() )
+ if ( IsHeaderFrame() )
{
bNotifyFlys = true;
}
@@ -612,7 +612,7 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
by the frame. */
if (nDist - nRest > 0)
{
- SwTwips nShrinkAmount = SwLayoutFrm::ShrinkFrm( nDist - nRest, bTst, bInfo );
+ SwTwips nShrinkAmount = SwLayoutFrame::ShrinkFrame( nDist - nRest, bTst, bInfo );
nResult += nShrinkAmount;
if ( nShrinkAmount > 0 )
{
@@ -630,10 +630,10 @@ SwTwips SwHeadFootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
return nResult;
}
-bool SwHeadFootFrm::GetEatSpacing() const
+bool SwHeadFootFrame::GetEatSpacing() const
{
const SwFrameFormat * pFormat = GetFormat();
- OSL_ENSURE(pFormat, "SwHeadFootFrm: no format?");
+ OSL_ENSURE(pFormat, "SwHeadFootFrame: no format?");
if (pFormat->GetHeaderAndFooterEatSpacing().GetValue())
return true;
@@ -641,7 +641,7 @@ bool SwHeadFootFrm::GetEatSpacing() const
return false;
}
-void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage )
+void DelFlys( SwLayoutFrame *pFrame, SwPageFrame *pPage )
{
size_t i = 0;
while ( pPage->GetSortedObjs() &&
@@ -649,12 +649,12 @@ void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage )
i < pPage->GetSortedObjs()->size() )
{
SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
- SwFlyFrm* pFlyFrm = static_cast<SwFlyFrm*>(pObj);
- if ( pFrm->IsAnLower( pFlyFrm ) )
+ SwFlyFrame* pFlyFrame = static_cast<SwFlyFrame*>(pObj);
+ if ( pFrame->IsAnLower( pFlyFrame ) )
{
- SwFrm::DestroyFrm(pFlyFrm);
+ SwFrame::DestroyFrame(pFlyFrame);
// Do not increment index, in this case
continue;
}
@@ -664,15 +664,15 @@ void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage )
}
/// Creates or removes headers
-void SwPageFrm::PrepareHeader()
+void SwPageFrame::PrepareHeader()
{
- SwLayoutFrm *pLay = static_cast<SwLayoutFrm*>(Lower());
+ SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(Lower());
if ( !pLay )
return;
const SwFormatHeader &rH = static_cast<SwFrameFormat*>(GetRegisteredIn())->GetHeader();
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsWhitespaceHidden()));
@@ -683,39 +683,39 @@ void SwPageFrm::PrepareHeader()
if ( pLay->GetFormat() == rH.GetHeaderFormat() )
return; // Header is already the correct one.
- if ( pLay->IsHeaderFrm() )
- { SwLayoutFrm *pDel = pLay;
- pLay = static_cast<SwLayoutFrm*>(pLay->GetNext());
+ if ( pLay->IsHeaderFrame() )
+ { SwLayoutFrame *pDel = pLay;
+ pLay = static_cast<SwLayoutFrame*>(pLay->GetNext());
::DelFlys( pDel, this );
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
OSL_ENSURE( pLay, "Where to with the Header?" );
- SwHeaderFrm *pH = new SwHeaderFrm( const_cast<SwFrameFormat*>(rH.GetHeaderFormat()), this );
+ SwHeaderFrame *pH = new SwHeaderFrame( const_cast<SwFrameFormat*>(rH.GetHeaderFormat()), this );
pH->Paste( this, pLay );
if ( GetUpper() )
::RegistFlys( this, pH );
}
- else if ( pLay && pLay->IsHeaderFrm() )
+ else if ( pLay && pLay->IsHeaderFrame() )
{ // Remove header if present.
::DelFlys( pLay, this );
pLay->Cut();
- SwFrm::DestroyFrm(pLay);
+ SwFrame::DestroyFrame(pLay);
}
}
/// Creates or removes footer
-void SwPageFrm::PrepareFooter()
+void SwPageFrame::PrepareFooter()
{
- SwLayoutFrm *pLay = static_cast<SwLayoutFrm*>(Lower());
+ SwLayoutFrame *pLay = static_cast<SwLayoutFrame*>(Lower());
if ( !pLay )
return;
const SwFormatFooter &rF = static_cast<SwFrameFormat*>(GetRegisteredIn())->GetFooter();
while ( pLay->GetNext() )
- pLay = static_cast<SwLayoutFrm*>(pLay->GetNext());
+ pLay = static_cast<SwLayoutFrame*>(pLay->GetNext());
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() ||
pSh->GetViewOptions()->IsWhitespaceHidden()));
@@ -726,26 +726,26 @@ void SwPageFrm::PrepareFooter()
if ( pLay->GetFormat() == rF.GetFooterFormat() )
return; // Footer is already the correct one.
- if ( pLay->IsFooterFrm() )
+ if ( pLay->IsFooterFrame() )
{
::DelFlys( pLay, this );
pLay->Cut();
- SwFrm::DestroyFrm(pLay);
+ SwFrame::DestroyFrame(pLay);
}
- SwFooterFrm *pF = new SwFooterFrm( const_cast<SwFrameFormat*>(rF.GetFooterFormat()), this );
+ SwFooterFrame *pF = new SwFooterFrame( const_cast<SwFrameFormat*>(rF.GetFooterFormat()), this );
pF->Paste( this );
if ( GetUpper() )
::RegistFlys( this, pF );
}
- else if ( pLay->IsFooterFrm() )
+ else if ( pLay->IsFooterFrame() )
{ // Remove footer if already present
::DelFlys( pLay, this );
SwViewShell *pShell;
- if ( pLay->GetPrev() && nullptr != (pShell = getRootFrm()->GetCurrShell()) &&
+ if ( pLay->GetPrev() && nullptr != (pShell = getRootFrame()->GetCurrShell()) &&
pShell->VisArea().HasArea() )
pShell->InvalidateWindows( pShell->VisArea() );
pLay->Cut();
- SwFrm::DestroyFrm(pLay);
+ SwFrame::DestroyFrame(pLay);
}
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 1e5677e98ac9..38f0f71384a6 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -82,7 +82,7 @@
} \
}
-void SwLayAction::CheckWaitCrsr()
+void SwLayAction::CheckWaitCursor()
{
RESCHEDULE
if ( !IsWait() && IsWaitAllowed() && IsPaint() &&
@@ -110,12 +110,12 @@ void SwLayAction::SetStatBar( bool bNew )
m_nEndPage = USHRT_MAX;
}
-bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCnt,
- const SwPageFrm *pPage )
+bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrame *pCnt,
+ const SwPageFrame *pPage )
{
SwRegionRects aTmp( rRect );
const SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- const SwFlyFrm *pSelfFly = pCnt->FindFlyFrm();
+ const SwFlyFrame *pSelfFly = pCnt->FindFlyFrame();
for ( size_t i = 0; i < rObjs.size() && !aTmp.empty(); ++i )
{
@@ -130,9 +130,9 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn
continue;
}
- SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrm();
+ SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pO)->GetFlyFrame();
- if ( pFly == pSelfFly || !rRect.IsOver( pFly->Frm() ) )
+ if ( pFly == pSelfFly || !rRect.IsOver( pFly->Frame() ) )
continue;
if ( pSelfFly && pSelfFly->IsLowerOf( pFly ) )
@@ -165,8 +165,8 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn
// For checking, if fly frame contains transparent graphic or
// has surrounded contour, assure that fly frame has a lower
if ( pFly->Lower() &&
- pFly->Lower()->IsNoTextFrm() &&
- ( static_cast<SwNoTextFrm*>(pFly->Lower())->IsTransparent() ||
+ pFly->Lower()->IsNoTextFrame() &&
+ ( static_cast<SwNoTextFrame*>(pFly->Lower())->IsTransparent() ||
pFly->GetFormat()->GetSurround().IsContour() )
)
{
@@ -181,7 +181,7 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn
continue;
}
- aTmp -= pFly->Frm();
+ aTmp -= pFly->Frame();
}
bool bRetPaint = false;
@@ -190,8 +190,8 @@ bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwContentFrm *pCn
return bRetPaint;
}
-inline bool SwLayAction::_PaintContent( const SwContentFrm *pContent,
- const SwPageFrm *pPage,
+inline bool SwLayAction::_PaintContent( const SwContentFrame *pContent,
+ const SwPageFrame *pPage,
const SwRect &rRect )
{
if ( rRect.HasArea() )
@@ -208,14 +208,14 @@ inline bool SwLayAction::_PaintContent( const SwContentFrm *pContent,
* Depending of the type, the Content is output according to it's changes, or the area
* to be outputted is registered with the region, respectively.
*/
-void SwLayAction::PaintContent( const SwContentFrm *pCnt,
- const SwPageFrm *pPage,
+void SwLayAction::PaintContent( const SwContentFrame *pCnt,
+ const SwPageFrame *pPage,
const SwRect &rOldRect,
long nOldBottom )
{
SWRECTFN( pCnt )
- if ( pCnt->IsCompletePaint() || !pCnt->IsTextFrm() )
+ if ( pCnt->IsCompletePaint() || !pCnt->IsTextFrame() )
{
SwRect aPaint( pCnt->PaintArea() );
if ( !_PaintContent( pCnt, pPage, aPaint ) )
@@ -226,7 +226,7 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt,
// paint the area between printing bottom and frame bottom and
// the area left and right beside the frame, if its height changed.
long nOldHeight = (rOldRect.*fnRect->fnGetHeight)();
- long nNewHeight = (pCnt->Frm().*fnRect->fnGetHeight)();
+ long nNewHeight = (pCnt->Frame().*fnRect->fnGetHeight)();
const bool bHeightDiff = nOldHeight != nNewHeight;
if( bHeightDiff )
{
@@ -238,16 +238,16 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt,
_PaintContent( pCnt, pPage, aDrawRect );
}
// paint content area
- SwRect aPaintRect = static_cast<SwTextFrm*>(const_cast<SwContentFrm*>(pCnt))->Paint();
+ SwRect aPaintRect = static_cast<SwTextFrame*>(const_cast<SwContentFrame*>(pCnt))->Paint();
_PaintContent( pCnt, pPage, aPaintRect );
}
if ( pCnt->IsRetouche() && !pCnt->GetNext() )
{
- const SwFrm *pTmp = pCnt;
+ const SwFrame *pTmp = pCnt;
if( pCnt->IsInSct() )
{
- const SwSectionFrm* pSct = pCnt->FindSctFrm();
+ const SwSectionFrame* pSct = pCnt->FindSctFrame();
if( pSct->IsRetouche() && !pSct->GetNext() )
pTmp = pSct;
}
@@ -258,7 +258,7 @@ void SwLayAction::PaintContent( const SwContentFrm *pCnt,
}
}
-SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewShellImp *pI ) :
+SwLayAction::SwLayAction( SwRootFrame *pRt, SwViewShellImp *pI ) :
m_pRoot( pRt ),
m_pImp( pI ),
m_pOptTab( nullptr ),
@@ -305,19 +305,19 @@ bool SwLayAction::RemoveEmptyBrowserPages()
const SwViewShell *pSh = m_pRoot->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
- SwPageFrm *pPage = static_cast<SwPageFrm*>(m_pRoot->Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(m_pRoot->Lower());
do
{
if ( (pPage->GetSortedObjs() && pPage->GetSortedObjs()->size()) ||
pPage->ContainsContent() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
else
{
bRet = true;
- SwPageFrm *pDel = pPage;
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pDel = pPage;
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
} while ( pPage );
}
@@ -340,9 +340,9 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
else if ( m_pRoot->GetTurbo() )
{
m_pRoot->DisallowTurbo();
- const SwFrm *pFrm = m_pRoot->GetTurbo();
+ const SwFrame *pFrame = m_pRoot->GetTurbo();
m_pRoot->ResetTurbo();
- pFrm->InvalidatePage();
+ pFrame->InvalidatePage();
}
m_pRoot->DisallowTurbo();
@@ -370,38 +370,38 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
m_bActionInProgress = false;
}
-SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage )
+SwPageFrame* SwLayAction::CheckFirstVisPage( SwPageFrame *pPage )
{
- SwContentFrm *pCnt = pPage->FindFirstBodyContent();
- SwContentFrm *pChk = pCnt;
+ SwContentFrame *pCnt = pPage->FindFirstBodyContent();
+ SwContentFrame *pChk = pCnt;
bool bPageChgd = false;
while ( pCnt && pCnt->IsFollow() )
- pCnt = static_cast<SwContentFrm*>(pCnt)->FindMaster();
+ pCnt = static_cast<SwContentFrame*>(pCnt)->FindMaster();
if ( pCnt && pChk != pCnt )
{ bPageChgd = true;
- pPage = pCnt->FindPageFrm();
+ pPage = pCnt->FindPageFrame();
}
if ( !pPage->GetFormat()->GetDoc()->GetFootnoteIdxs().empty() )
{
- SwFootnoteContFrm *pCont = pPage->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pPage->FindFootnoteCont();
if ( pCont )
{
pCnt = pCont->ContainsContent();
pChk = pCnt;
while ( pCnt && pCnt->IsFollow() )
- pCnt = static_cast<SwContentFrm*>(pCnt->FindPrev());
+ pCnt = static_cast<SwContentFrame*>(pCnt->FindPrev());
if ( pCnt && pCnt != pChk )
{
if ( bPageChgd )
{
// Use the 'topmost' page
- SwPageFrm *pTmp = pCnt->FindPageFrm();
+ SwPageFrame *pTmp = pCnt->FindPageFrame();
if ( pPage->GetPhyPageNum() > pTmp->GetPhyPageNum() )
pPage = pTmp;
}
else
- pPage = pCnt->FindPageFrm();
+ pPage = pCnt->FindPageFrame();
}
}
}
@@ -410,11 +410,11 @@ SwPageFrm* SwLayAction::CheckFirstVisPage( SwPageFrm *pPage )
// #114798# - unlock position on start and end of page
// layout process.
-static void unlockPositionOfObjects( SwPageFrm *pPageFrm )
+static void unlockPositionOfObjects( SwPageFrame *pPageFrame )
{
- assert( pPageFrm );
+ assert( pPageFrame );
- SwSortedObjs* pObjs = pPageFrm->GetSortedObjs();
+ SwSortedObjs* pObjs = pPageFrame->GetSortedObjs();
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -427,7 +427,7 @@ static void unlockPositionOfObjects( SwPageFrm *pPageFrm )
void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
- OSL_ENSURE( m_pRoot->Lower()->IsPageFrm(), ":-( No page below the root.");
+ OSL_ENSURE( m_pRoot->Lower()->IsPageFrame(), ":-( No page below the root.");
m_pRoot->Calc(pRenderContext);
@@ -436,10 +436,10 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// However, the first page to be formatted might be the one having the
// number 1. If we're doing a fake formatting, the number of the first
// page is the number of the first visible page.
- SwPageFrm *pPage = IsComplete() ? static_cast<SwPageFrm*>(m_pRoot->Lower()) :
+ SwPageFrame *pPage = IsComplete() ? static_cast<SwPageFrame*>(m_pRoot->Lower()) :
m_pImp->GetFirstVisPage(pRenderContext);
if ( !pPage )
- pPage = static_cast<SwPageFrm*>(m_pRoot->Lower());
+ pPage = static_cast<SwPageFrame*>(m_pRoot->Lower());
// If there's a first-flow-Content in the first visible page that's also a Follow,
// we switch the page back to the original master of that Content.
@@ -448,7 +448,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
sal_uInt16 nFirstPageNum = pPage->GetPhyPageNum();
while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
IDocumentLayoutAccess& rLayoutAccess = m_pRoot->GetFormat()->getIDocumentLayoutAccess();
bool bNoLoop = pPage && SwLayouter::StartLoopControl( m_pRoot->GetFormat()->GetDoc(), pPage );
@@ -459,18 +459,18 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
if ( !pPage || pPage->GetPhyPageNum() > m_nCheckPageNum )
{
- SwPageFrm *pPg = static_cast<SwPageFrm*>(m_pRoot->Lower());
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower());
while ( pPg && pPg->GetPhyPageNum() < m_nCheckPageNum )
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
if ( pPg )
pPage = pPg;
if ( !pPage )
break;
}
- SwPageFrm *pTmp = pPage->GetPrev() ?
- static_cast<SwPageFrm*>(pPage->GetPrev()) : pPage;
+ SwPageFrame *pTmp = pPage->GetPrev() ?
+ static_cast<SwPageFrame*>(pPage->GetPrev()) : pPage;
SetCheckPages( true );
- SwFrm::CheckPageDescs( pPage, true, &pTmp );
+ SwFrame::CheckPageDescs( pPage, true, &pTmp );
SetCheckPages( false );
m_nCheckPageNum = USHRT_MAX;
pPage = pTmp;
@@ -506,12 +506,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
rLayoutAccess.GetLayouter()->EndLoopControl();
return;
}
- pPage = static_cast<SwPageFrm*>(m_pRoot->Lower());
+ pPage = static_cast<SwPageFrame*>(m_pRoot->Lower());
while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
while ( pPage && pPage->GetNext() &&
pPage->GetPhyPageNum() < nFirstPageNum )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
continue;
}
break;
@@ -527,7 +527,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
unlockPositionOfObjects( pPage );
// #i28701#
- SwObjectFormatter::FormatObjsAtFrm( *pPage, *pPage, this );
+ SwObjectFormatter::FormatObjsAtFrame( *pPage, *pPage, this );
if ( !IS_FLYS )
{
// If there are no (more) Flys, the flags are superfluous.
@@ -605,7 +605,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
if( !IsComplete() && m_nPreInvaPage + 2 < nFirstPageNum )
{
m_pImp->SetFirstVisPageInvalid();
- SwPageFrm *pTmpPage = m_pImp->GetFirstVisPage(pRenderContext);
+ SwPageFrame *pTmpPage = m_pImp->GetFirstVisPage(pRenderContext);
nFirstPageNum = pTmpPage->GetPhyPageNum();
if( m_nPreInvaPage < nFirstPageNum )
{
@@ -614,25 +614,25 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
}
}
while ( pPage->GetPrev() && pPage->GetPhyPageNum() > m_nPreInvaPage )
- pPage = static_cast<SwPageFrm*>(pPage->GetPrev());
+ pPage = static_cast<SwPageFrame*>(pPage->GetPrev());
m_nPreInvaPage = USHRT_MAX;
}
while ( pPage->GetPrev() &&
- ( static_cast<SwPageFrm*>(pPage->GetPrev())->IsInvalid() ||
- ( static_cast<SwPageFrm*>(pPage->GetPrev())->GetSortedObjs() &&
- static_cast<SwPageFrm*>(pPage->GetPrev())->IsInvalidFly())) &&
- (static_cast<SwPageFrm*>(pPage->GetPrev())->GetPhyPageNum() >=
+ ( static_cast<SwPageFrame*>(pPage->GetPrev())->IsInvalid() ||
+ ( static_cast<SwPageFrame*>(pPage->GetPrev())->GetSortedObjs() &&
+ static_cast<SwPageFrame*>(pPage->GetPrev())->IsInvalidFly())) &&
+ (static_cast<SwPageFrame*>(pPage->GetPrev())->GetPhyPageNum() >=
nFirstPageNum) )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetPrev());
+ pPage = static_cast<SwPageFrame*>(pPage->GetPrev());
}
// Continue to the next invalid page
while ( pPage && !pPage->IsInvalid() &&
(!IS_FLYS || !IS_INVAFLY) )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
if( bNoLoop )
rLayoutAccess.GetLayouter()->LoopControl( pPage, LOOP_PAGE );
@@ -656,12 +656,12 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
rLayoutAccess.GetLayouter()->EndLoopControl();
return;
}
- pPage = static_cast<SwPageFrm*>(m_pRoot->Lower());
+ pPage = static_cast<SwPageFrame*>(m_pRoot->Lower());
while ( pPage && !pPage->IsInvalid() && !pPage->IsInvalidFly() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
while ( pPage && pPage->GetNext() &&
pPage->GetPhyPageNum() < nFirstPageNum )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
if ( IsInterrupt() && pPage )
@@ -680,16 +680,16 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// already added itself, but the borders of the page haven't been painted
// yet.
// Oh well, with the inevitable following LayAction, the page doesn't
- // register itself, because it's (LayoutFrm) flags have been reset
+ // register itself, because it's (LayoutFrame) flags have been reset
// already - the border of the page will never be painted.
- SwPageFrm *pPg = pPage;
+ SwPageFrame *pPg = pPage;
XCHECKPAGE;
const SwRect &rVis = m_pImp->GetShell()->VisArea();
- while( pPg && pPg->Frm().Bottom() < rVis.Top() )
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ while( pPg && pPg->Frame().Bottom() < rVis.Top() )
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
if( pPg != pPage )
- pPg = pPg ? static_cast<SwPageFrm*>(pPg->GetPrev()) : pPage;
+ pPg = pPg ? static_cast<SwPageFrame*>(pPg->GetPrev()) : pPage;
// set flag for interrupt content formatting
mbFormatContentOnInterrupt = IsInput();
@@ -697,7 +697,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
// #i42586# - format current page, if idle action is active
// This is an optimization for the case that the interrupt is created by
// the move of a form control object, which is represented by a window.
- while ( pPg && ( pPg->Frm().Top() < nBottom ||
+ while ( pPg && ( pPg->Frame().Top() < nBottom ||
( IsIdle() && pPg == pPage ) ) )
{
unlockPositionOfObjects( pPg );
@@ -719,7 +719,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
XCHECKPAGE;
// #i50432# - format also at-page anchored objects
- SwObjectFormatter::FormatObjsAtFrm( *pPg, *pPg, this );
+ SwObjectFormatter::FormatObjsAtFrame( *pPg, *pPg, this );
if ( !pPg->GetSortedObjs() )
{
pPg->ValidateFlyLayout();
@@ -778,7 +778,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
}
unlockPositionOfObjects( pPg );
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
// reset flag for special interrupt content formatting.
mbFormatContentOnInterrupt = false;
@@ -788,37 +788,37 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
rLayoutAccess.GetLayouter()->EndLoopControl();
}
-bool SwLayAction::_TurboAction( const SwContentFrm *pCnt )
+bool SwLayAction::_TurboAction( const SwContentFrame *pCnt )
{
- const SwPageFrm *pPage = nullptr;
+ const SwPageFrame *pPage = nullptr;
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() || pCnt->IsRetouche() )
{
- const SwRect aOldRect( pCnt->UnionFrm( true ) );
- const long nOldBottom = pCnt->Frm().Top() + pCnt->Prt().Bottom();
+ const SwRect aOldRect( pCnt->UnionFrame( true ) );
+ const long nOldBottom = pCnt->Frame().Top() + pCnt->Prt().Bottom();
pCnt->Calc(m_pImp->GetShell()->GetOut());
- if ( pCnt->Frm().Bottom() < aOldRect.Bottom() )
+ if ( pCnt->Frame().Bottom() < aOldRect.Bottom() )
pCnt->SetRetouche();
- pPage = pCnt->FindPageFrm();
+ pPage = pCnt->FindPageFrame();
PaintContent( pCnt, pPage, aOldRect, nOldBottom );
- if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTextFrm() )
+ if ( !pCnt->GetValidLineNumFlag() && pCnt->IsTextFrame() )
{
- const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pCnt)->GetAllLines();
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->RecalcAllLines();
- if ( nAllLines != static_cast<const SwTextFrm*>(pCnt)->GetAllLines() )
+ const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pCnt)->GetAllLines();
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->RecalcAllLines();
+ if ( nAllLines != static_cast<const SwTextFrame*>(pCnt)->GetAllLines() )
{
if ( IsPaintExtraData() )
- m_pImp->GetShell()->AddPaintRect( pCnt->Frm() );
+ m_pImp->GetShell()->AddPaintRect( pCnt->Frame() );
// This is to calculate the remaining LineNums on the page,
// and we don't stop processing here. To perform this inside RecalcAllLines
// would be expensive, because we would have to notify the page even
// in unnecessary cases (normal actions).
- const SwContentFrm *pNxt = pCnt->GetNextContentFrm();
+ const SwContentFrame *pNxt = pCnt->GetNextContentFrame();
while ( pNxt &&
(pNxt->IsInTab() || pNxt->IsInDocBody() != pCnt->IsInDocBody()) )
- pNxt = pNxt->GetNextContentFrm();
+ pNxt = pNxt->GetNextContentFrame();
if ( pNxt )
pNxt->InvalidatePage();
}
@@ -829,11 +829,11 @@ bool SwLayAction::_TurboAction( const SwContentFrm *pCnt )
return false;
}
if ( !pPage )
- pPage = pCnt->FindPageFrm();
+ pPage = pCnt->FindPageFrame();
// OD 2004-05-10 #i28701# - format floating screen objects at content frame.
- if ( pCnt->IsTextFrm() &&
- !SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwContentFrm*>(pCnt)),
+ if ( pCnt->IsTextFrame() &&
+ !SwObjectFormatter::FormatObjsAtFrame( *(const_cast<SwContentFrame*>(pCnt)),
*pPage, this ) )
{
return false;
@@ -862,11 +862,11 @@ bool SwLayAction::TurboAction()
return bRet;
}
-static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
+static bool lcl_IsInvaLay( const SwFrame *pFrame, long nBottom )
{
if (
- !pFrm->IsValid() ||
- (pFrm->IsCompletePaint() && ( pFrm->Frm().Top() < nBottom ) )
+ !pFrame->IsValid() ||
+ (pFrame->IsCompletePaint() && ( pFrame->Frame().Top() < nBottom ) )
)
{
return true;
@@ -874,38 +874,38 @@ static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom )
return false;
}
-static const SwFrm *lcl_FindFirstInvaLay( const SwFrm *pFrm, long nBottom )
+static const SwFrame *lcl_FindFirstInvaLay( const SwFrame *pFrame, long nBottom )
{
- OSL_ENSURE( pFrm->IsLayoutFrm(), "FindFirstInvaLay, no LayFrm" );
+ OSL_ENSURE( pFrame->IsLayoutFrame(), "FindFirstInvaLay, no LayFrame" );
- if (lcl_IsInvaLay(pFrm, nBottom))
- return pFrm;
- pFrm = static_cast<const SwLayoutFrm*>(pFrm)->Lower();
- while ( pFrm )
+ if (lcl_IsInvaLay(pFrame, nBottom))
+ return pFrame;
+ pFrame = static_cast<const SwLayoutFrame*>(pFrame)->Lower();
+ while ( pFrame )
{
- if ( pFrm->IsLayoutFrm() )
+ if ( pFrame->IsLayoutFrame() )
{
- if (lcl_IsInvaLay(pFrm, nBottom))
- return pFrm;
- const SwFrm *pTmp;
- if ( nullptr != (pTmp = lcl_FindFirstInvaLay( pFrm, nBottom )) )
+ if (lcl_IsInvaLay(pFrame, nBottom))
+ return pFrame;
+ const SwFrame *pTmp;
+ if ( nullptr != (pTmp = lcl_FindFirstInvaLay( pFrame, nBottom )) )
return pTmp;
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
return nullptr;
}
-static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBottom,
- const SwContentFrm *pFirst )
+static const SwFrame *lcl_FindFirstInvaContent( const SwLayoutFrame *pLay, long nBottom,
+ const SwContentFrame *pFirst )
{
- const SwContentFrm *pCnt = pFirst ? pFirst->GetNextContentFrm() :
+ const SwContentFrame *pCnt = pFirst ? pFirst->GetNextContentFrame() :
pLay->ContainsContent();
while ( pCnt )
{
if ( !pCnt->IsValid() || pCnt->IsCompletePaint() )
{
- if ( pCnt->Frm().Top() <= nBottom )
+ if ( pCnt->Frame().Top() <= nBottom )
return pCnt;
}
@@ -915,27 +915,27 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot
for ( size_t i = 0; i < rObjs.size(); ++i )
{
const SwAnchoredObject* pObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
- const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pObj);
- if ( pFly->IsFlyInCntFrm() )
+ const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pObj);
+ if ( pFly->IsFlyInContentFrame() )
{
- if ( static_cast<const SwFlyInCntFrm*>(pFly)->IsInvalid() ||
+ if ( static_cast<const SwFlyInContentFrame*>(pFly)->IsInvalid() ||
pFly->IsCompletePaint() )
{
- if ( pFly->Frm().Top() <= nBottom )
+ if ( pFly->Frame().Top() <= nBottom )
return pFly;
}
- const SwFrm *pFrm = lcl_FindFirstInvaContent( pFly, nBottom, nullptr );
- if ( pFrm && pFrm->Frm().Bottom() <= nBottom )
- return pFrm;
+ const SwFrame *pFrame = lcl_FindFirstInvaContent( pFly, nBottom, nullptr );
+ if ( pFrame && pFrame->Frame().Bottom() <= nBottom )
+ return pFrame;
}
}
}
}
- if ( pCnt->Frm().Top() > nBottom && !pCnt->IsInTab() )
+ if ( pCnt->Frame().Top() > nBottom && !pCnt->IsInTab() )
return nullptr;
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
if ( !pLay->IsAnLower( pCnt ) )
break;
}
@@ -943,7 +943,7 @@ static const SwFrm *lcl_FindFirstInvaContent( const SwLayoutFrm *pLay, long nBot
}
// #i37877# - consider drawing objects
-static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
+static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrame* _pPage,
long _nBottom )
{
OSL_ENSURE( _pPage->GetSortedObjs(), "FindFirstInvaObj, no Objs" );
@@ -951,17 +951,17 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
for ( size_t i = 0; i < _pPage->GetSortedObjs()->size(); ++i )
{
const SwAnchoredObject* pObj = (*_pPage->GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
- const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pObj);
- if ( pFly->Frm().Top() <= _nBottom )
+ const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pObj);
+ if ( pFly->Frame().Top() <= _nBottom )
{
if ( pFly->IsInvalid() || pFly->IsCompletePaint() )
return pFly;
- const SwFrm* pTmp;
+ const SwFrame* pTmp;
if ( nullptr != (pTmp = lcl_FindFirstInvaContent( pFly, _nBottom, nullptr )) &&
- pTmp->Frm().Top() <= _nBottom )
+ pTmp->Frame().Top() <= _nBottom )
return pFly;
}
}
@@ -984,7 +984,7 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage,
* For BrowseMode, you may even activate the ShortCut if the invalid content
* of the page lies below the visible area.
*/
-bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
+bool SwLayAction::IsShortCut( SwPageFrame *&prPage )
{
vcl::RenderContext* pRenderContext = m_pImp->GetShell()->GetOut();
bool bRet = false;
@@ -1003,11 +1003,11 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
// NOTE: In online layout (bBrowse == true) a page can contain
// a header frame and/or a footer frame beside the body frame.
prPage->Calc(pRenderContext);
- SwFrm* pPageLowerFrm = prPage->Lower();
- while ( pPageLowerFrm )
+ SwFrame* pPageLowerFrame = prPage->Lower();
+ while ( pPageLowerFrame )
{
- pPageLowerFrm->Calc(pRenderContext);
- pPageLowerFrm = pPageLowerFrm->GetNext();
+ pPageLowerFrame->Calc(pRenderContext);
+ pPageLowerFrame = pPageLowerFrame->GetNext();
}
}
else
@@ -1017,36 +1017,36 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
}
const SwRect &rVis = m_pImp->GetShell()->VisArea();
- if ( (prPage->Frm().Top() >= rVis.Bottom()) ||
- (prPage->Frm().Left()>= rVis.Right()) )
+ if ( (prPage->Frame().Top() >= rVis.Bottom()) ||
+ (prPage->Frame().Left()>= rVis.Right()) )
{
bRet = true;
- // This is going to be a bit nasty: The first ContentFrm of this
+ // This is going to be a bit nasty: The first ContentFrame of this
// page in the Body text needs formatting; if it changes the page during
// that process, I need to start over a page further back, because we
// have been processing a PageBreak.
- // Even more uncomfortable: The next ContentFrm must be formatted,
+ // Even more uncomfortable: The next ContentFrame must be formatted,
// because it's possible for empty pages to exist temporarily (for example
// a paragraph across multiple pages gets deleted or reduced in size).
// This is irrelevant for the browser, if the last Cnt above it
// isn't visible anymore.
- const SwPageFrm *p2ndPage = prPage;
- const SwContentFrm *pContent;
- const SwLayoutFrm* pBody = p2ndPage->FindBodyCont();
+ const SwPageFrame *p2ndPage = prPage;
+ const SwContentFrame *pContent;
+ const SwLayoutFrame* pBody = p2ndPage->FindBodyCont();
if( p2ndPage->IsFootnotePage() && pBody )
- pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext());
+ pBody = static_cast<const SwLayoutFrame*>(pBody->GetNext());
pContent = pBody ? pBody->ContainsContent() : nullptr;
while ( p2ndPage && !pContent )
{
- p2ndPage = static_cast<const SwPageFrm*>(p2ndPage->GetNext());
+ p2ndPage = static_cast<const SwPageFrame*>(p2ndPage->GetNext());
if( p2ndPage )
{
pBody = p2ndPage->FindBodyCont();
if( p2ndPage->IsFootnotePage() && pBody )
- pBody = static_cast<const SwLayoutFrm*>(pBody->GetNext());
+ pBody = static_cast<const SwLayoutFrame*>(pBody->GetNext());
pContent = pBody ? pBody->ContainsContent() : nullptr;
}
}
@@ -1056,15 +1056,15 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( bBrowse )
{
// Is the Cnt before already invisible?
- const SwFrm *pLst = pContent;
+ const SwFrame *pLst = pContent;
if ( pLst->IsInTab() )
- pLst = pContent->FindTabFrm();
+ pLst = pContent->FindTabFrame();
if ( pLst->IsInSct() )
- pLst = pContent->FindSctFrm();
+ pLst = pContent->FindSctFrame();
pLst = pLst->FindPrev();
if ( pLst &&
- (pLst->Frm().Top() >= rVis.Bottom() ||
- pLst->Frm().Left()>= rVis.Right()) )
+ (pLst->Frame().Top() >= rVis.Bottom() ||
+ pLst->Frame().Left()>= rVis.Right()) )
{
bTstCnt = false;
}
@@ -1079,7 +1079,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( pContent->IsInSct() )
{
- const SwSectionFrm *pSct = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindSctFrm();
+ const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame();
if ( !pSct->IsValid() )
{
pSct->Calc(pRenderContext);
@@ -1087,7 +1087,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( IsAgain() )
return false;
// #i27756#
- bPageChg = pContent->FindPageFrm() != p2ndPage &&
+ bPageChg = pContent->FindPageFrame() != p2ndPage &&
prPage->GetPrev();
}
}
@@ -1099,13 +1099,13 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( IsAgain() )
return false;
// #i27756#
- bPageChg = pContent->FindPageFrm() != p2ndPage &&
+ bPageChg = pContent->FindPageFrame() != p2ndPage &&
prPage->GetPrev();
}
if ( !bPageChg && pContent->IsInTab() )
{
- const SwTabFrm *pTab = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindTabFrm();
+ const SwTabFrame *pTab = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindTabFrame();
if ( !pTab->IsValid() )
{
pTab->Calc(pRenderContext);
@@ -1113,14 +1113,14 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( IsAgain() )
return false;
// #i27756#
- bPageChg = pContent->FindPageFrm() != p2ndPage &&
+ bPageChg = pContent->FindPageFrame() != p2ndPage &&
prPage->GetPrev();
}
}
if ( !bPageChg && pContent->IsInSct() )
{
- const SwSectionFrm *pSct = const_cast<SwFrm*>(static_cast<SwFrm const *>(pContent))->ImplFindSctFrm();
+ const SwSectionFrame *pSct = const_cast<SwFrame*>(static_cast<SwFrame const *>(pContent))->ImplFindSctFrame();
if ( !pSct->IsValid() )
{
pSct->Calc(pRenderContext);
@@ -1128,7 +1128,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( IsAgain() )
return false;
// #i27756#
- bPageChg = pContent->FindPageFrm() != p2ndPage &&
+ bPageChg = pContent->FindPageFrame() != p2ndPage &&
prPage->GetPrev();
}
}
@@ -1137,15 +1137,15 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
if ( bPageChg )
{
bRet = false;
- const SwPageFrm* pTmp = pContent->FindPageFrm();
+ const SwPageFrame* pTmp = pContent->FindPageFrame();
if ( pTmp->GetPhyPageNum() < prPage->GetPhyPageNum() &&
pTmp->IsInvalid() )
{
- prPage = const_cast<SwPageFrm*>(pTmp);
+ prPage = const_cast<SwPageFrame*>(pTmp);
}
else
{
- prPage = static_cast<SwPageFrm*>(prPage->GetPrev());
+ prPage = static_cast<SwPageFrame*>(prPage->GetPrev());
}
}
// #121980# - no shortcut, if at previous page
@@ -1153,13 +1153,13 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
else if ( prPage->GetPrev() )
{
SwSortedObjs* pObjs =
- static_cast<SwPageFrm*>(prPage->GetPrev())->GetSortedObjs();
+ static_cast<SwPageFrame*>(prPage->GetPrev())->GetSortedObjs();
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pObj = (*pObjs)[i];
- if ( pObj->GetAnchorFrmContainingAnchPos() == pContent )
+ if ( pObj->GetAnchorFrameContainingAnchPos() == pContent )
{
bRet = false;
break;
@@ -1182,16 +1182,16 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
{
return false;
}
- const SwFrm* pFrm( nullptr );
+ const SwFrame* pFrame( nullptr );
if ( prPage->IsInvalidLayout() &&
- nullptr != (pFrm = lcl_FindFirstInvaLay( prPage, nBottom )) &&
- pFrm->Frm().Top() <= nBottom )
+ nullptr != (pFrame = lcl_FindFirstInvaLay( prPage, nBottom )) &&
+ pFrame->Frame().Top() <= nBottom )
{
return false;
}
if ( (prPage->IsInvalidContent() || prPage->IsInvalidFlyInCnt()) &&
- nullptr != (pFrm = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) &&
- pFrm->Frm().Top() <= nBottom )
+ nullptr != (pFrame = lcl_FindFirstInvaContent( prPage, nBottom, nullptr )) &&
+ pFrame->Frame().Top() <= nBottom )
{
return false;
}
@@ -1201,7 +1201,7 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
}
// OD 15.11.2002 #105155# - introduce support for vertical layout
-bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay, bool bAddRect )
+bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLay, bool bAddRect )
{
OSL_ENSURE( !IsAgain(), "Attention to the invalid page." );
if ( IsAgain() )
@@ -1210,55 +1210,55 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
bool bChanged = false;
bool bAlreadyPainted = false;
// OD 11.11.2002 #104414# - remember frame at complete paint
- SwRect aFrmAtCompletePaint;
+ SwRect aFrameAtCompletePaint;
if ( !pLay->IsValid() || pLay->IsCompletePaint() )
{
if ( pLay->GetPrev() && !pLay->GetPrev()->IsValid() )
pLay->GetPrev()->SetCompletePaint();
- SwRect aOldFrame( pLay->Frm() );
+ SwRect aOldFrame( pLay->Frame() );
SwRect aOldRect( aOldFrame );
- if( pLay->IsPageFrm() )
+ if( pLay->IsPageFrame() )
{
- aOldRect = static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext);
+ aOldRect = static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext);
}
{
- SwFrmDeleteGuard aDeleteGuard(pLay);
+ SwFrameDeleteGuard aDeleteGuard(pLay);
pLay->Calc(pRenderContext);
}
- if ( aOldFrame != pLay->Frm() )
+ if ( aOldFrame != pLay->Frame() )
bChanged = true;
bool bNoPaint = false;
- if ( pLay->IsPageBodyFrm() &&
- pLay->Frm().Pos() == aOldRect.Pos() &&
+ if ( pLay->IsPageBodyFrame() &&
+ pLay->Frame().Pos() == aOldRect.Pos() &&
pLay->Lower() )
{
- const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell();
// Limitations because of headers / footers
if( pSh && pSh->GetViewOptions()->getBrowseMode() &&
- !( pLay->IsCompletePaint() && pLay->FindPageFrm()->FindFootnoteCont() ) )
+ !( pLay->IsCompletePaint() && pLay->FindPageFrame()->FindFootnoteCont() ) )
bNoPaint = true;
}
if ( !bNoPaint && IsPaint() && bAddRect && (pLay->IsCompletePaint() || bChanged) )
{
- SwRect aPaint( pLay->Frm() );
+ SwRect aPaint( pLay->Frame() );
// #i9719# - consider border and shadow for
// page frames -> enlarge paint rectangle correspondingly.
- if ( pLay->IsPageFrm() )
+ if ( pLay->IsPageFrame() )
{
- SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(pLay);
- aPaint = pPageFrm->GetBoundRect(pRenderContext);
+ SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay);
+ aPaint = pPageFrame->GetBoundRect(pRenderContext);
}
- bool bPageInBrowseMode = pLay->IsPageFrm();
+ bool bPageInBrowseMode = pLay->IsPageFrame();
if( bPageInBrowseMode )
{
- const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell();
if( !pSh || !pSh->GetViewOptions()->getBrowseMode() )
bPageInBrowseMode = false;
}
@@ -1290,28 +1290,28 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
m_pImp->GetShell()->AddPaintRect( aPaint );
bAlreadyPainted = true;
// OD 11.11.2002 #104414# - remember frame at complete paint
- aFrmAtCompletePaint = pLay->Frm();
+ aFrameAtCompletePaint = pLay->Frame();
}
// #i9719# - provide paint of spacing
// between pages (not only for in online mode).
- if ( pLay->IsPageFrm() )
+ if ( pLay->IsPageFrame() )
{
- const SwViewShell *pSh = pLay->getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = pLay->getRootFrame()->GetCurrShell();
const SwTwips nHalfDocBorder = pSh ? pSh->GetViewOptions()->GetGapBetweenPages()
: SwViewOption::GetDefGapBetweenPages();
const bool bLeftToRightViewLayout = m_pRoot->IsLeftToRightViewLayout();
const bool bPrev = bLeftToRightViewLayout ? pLay->GetPrev() : pLay->GetNext();
const bool bNext = bLeftToRightViewLayout ? pLay->GetNext() : pLay->GetPrev();
- SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(pLay);
- SwRect aPageRect( pLay->Frm() );
+ SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay);
+ SwRect aPageRect( pLay->Frame() );
if(pSh)
{
- SwPageFrm::GetBorderAndShadowBoundRect(aPageRect, pSh,
+ SwPageFrame::GetBorderAndShadowBoundRect(aPageRect, pSh,
pRenderContext,
- aPageRect, pPageFrm->IsLeftShadowNeeded(), pPageFrm->IsRightShadowNeeded(),
- pPageFrm->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
+ aPageRect, pPageFrame->IsLeftShadowNeeded(), pPageFrame->IsRightShadowNeeded(),
+ pPageFrame->SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
}
if ( bPrev )
@@ -1319,14 +1319,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
// top
SwRect aSpaceToPrevPage( aPageRect );
aSpaceToPrevPage.Top( aSpaceToPrevPage.Top() - nHalfDocBorder );
- aSpaceToPrevPage.Bottom( pLay->Frm().Top() );
+ aSpaceToPrevPage.Bottom( pLay->Frame().Top() );
if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage );
// left
aSpaceToPrevPage = aPageRect;
aSpaceToPrevPage.Left( aSpaceToPrevPage.Left() - nHalfDocBorder );
- aSpaceToPrevPage.Right( pLay->Frm().Left() );
+ aSpaceToPrevPage.Right( pLay->Frame().Left() );
if(aSpaceToPrevPage.Height() > 0 && aSpaceToPrevPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToPrevPage );
}
@@ -1335,14 +1335,14 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
// bottom
SwRect aSpaceToNextPage( aPageRect );
aSpaceToNextPage.Bottom( aSpaceToNextPage.Bottom() + nHalfDocBorder );
- aSpaceToNextPage.Top( pLay->Frm().Bottom() );
+ aSpaceToNextPage.Top( pLay->Frame().Bottom() );
if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage );
// right
aSpaceToNextPage = aPageRect;
aSpaceToNextPage.Right( aSpaceToNextPage.Right() + nHalfDocBorder );
- aSpaceToNextPage.Left( pLay->Frm().Right() );
+ aSpaceToNextPage.Left( pLay->Frame().Right() );
if(aSpaceToNextPage.Height() > 0 && aSpaceToNextPage.Width() > 0)
m_pImp->GetShell()->AddPaintRect( aSpaceToNextPage );
}
@@ -1352,7 +1352,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
}
if ( IsPaint() && bAddRect &&
- !pLay->GetNext() && pLay->IsRetoucheFrm() && pLay->IsRetouche() )
+ !pLay->GetNext() && pLay->IsRetoucheFrame() && pLay->IsRetouche() )
{
// OD 15.11.2002 #105155# - vertical layout support
SWRECTFN( pLay );
@@ -1365,27 +1365,27 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
if( bAlreadyPainted )
bAddRect = false;
- CheckWaitCrsr();
+ CheckWaitCursor();
if ( IsAgain() )
return false;
- // Now, deal with the lowers that are LayoutFrms
+ // Now, deal with the lowers that are LayoutFrames
- if ( pLay->IsFootnoteFrm() ) // no LayFrms as Lower
+ if ( pLay->IsFootnoteFrame() ) // no LayFrames as Lower
return bChanged;
- SwFrm *pLow = pLay->Lower();
+ SwFrame *pLow = pLay->Lower();
bool bTabChanged = false;
while ( pLow && pLow->GetUpper() == pLay )
{
- if ( pLow->IsLayoutFrm() )
+ if ( pLow->IsLayoutFrame() )
{
- if ( pLow->IsTabFrm() )
- bTabChanged |= FormatLayoutTab( static_cast<SwTabFrm*>(pLow), bAddRect );
+ if ( pLow->IsTabFrame() )
+ bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect );
// Skip the ones already registered for deletion
- else if( !pLow->IsSctFrm() || static_cast<SwSectionFrm*>(pLow)->GetSection() )
- bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrm*>(pLow), bAddRect );
+ else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() )
+ bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrame*>(pLow), bAddRect );
}
else if ( m_pImp->GetShell()->IsPaintLocked() )
// Shortcut to minimize the cycles. With Lock, the
@@ -1399,11 +1399,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
// OD 11.11.2002 #104414# - add complete frame area as paint area, if frame
// area has been already added and after formatting its lowers the frame area
// is enlarged.
- SwRect aBoundRect(pLay->IsPageFrm() ? static_cast<SwPageFrm*>(pLay)->GetBoundRect(pRenderContext) : pLay->Frm() );
+ SwRect aBoundRect(pLay->IsPageFrame() ? static_cast<SwPageFrame*>(pLay)->GetBoundRect(pRenderContext) : pLay->Frame() );
if ( bAlreadyPainted &&
- ( aBoundRect.Width() > aFrmAtCompletePaint.Width() ||
- aBoundRect.Height() > aFrmAtCompletePaint.Height() )
+ ( aBoundRect.Width() > aFrameAtCompletePaint.Width() ||
+ aBoundRect.Height() > aFrameAtCompletePaint.Height() )
)
{
m_pImp->GetShell()->AddPaintRect( aBoundRect );
@@ -1411,7 +1411,7 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrm *pLay,
return bChanged || bTabChanged;
}
-bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
+bool SwLayAction::FormatLayoutFly( SwFlyFrame* pFly )
{
vcl::RenderContext* pRenderContext = m_pImp->GetShell()->GetOut();
OSL_ENSURE( !IsAgain(), "Attention to the invalid page." );
@@ -1424,13 +1424,13 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
if ( !pFly->IsValid() || pFly->IsCompletePaint() || pFly->IsInvalid() )
{
// The Frame has changed, now it's getting formatted.
- const SwRect aOldRect( pFly->Frm() );
+ const SwRect aOldRect( pFly->Frame() );
pFly->Calc(pRenderContext);
- bChanged = aOldRect != pFly->Frm();
+ bChanged = aOldRect != pFly->Frame();
if ( IsPaint() && (pFly->IsCompletePaint() || bChanged) &&
- pFly->Frm().Top() > 0 && pFly->Frm().Left() > 0 )
- m_pImp->GetShell()->AddPaintRect( pFly->Frm() );
+ pFly->Frame().Top() > 0 && pFly->Frame().Left() > 0 )
+ m_pImp->GetShell()->AddPaintRect( pFly->Frame() );
if ( bChanged )
pFly->Invalidate();
@@ -1444,17 +1444,17 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
if ( IsAgain() )
return false;
- // Now, deal with the lowers that are LayoutFrms
+ // Now, deal with the lowers that are LayoutFrames
bool bTabChanged = false;
- SwFrm *pLow = pFly->Lower();
+ SwFrame *pLow = pFly->Lower();
while ( pLow )
{
- if ( pLow->IsLayoutFrm() )
+ if ( pLow->IsLayoutFrame() )
{
- if ( pLow->IsTabFrm() )
- bTabChanged |= FormatLayoutTab( static_cast<SwTabFrm*>(pLow), bAddRect );
+ if ( pLow->IsTabFrame() )
+ bTabChanged |= FormatLayoutTab( static_cast<SwTabFrame*>(pLow), bAddRect );
else
- bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), static_cast<SwLayoutFrm*>(pLow), bAddRect );
+ bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), static_cast<SwLayoutFrame*>(pLow), bAddRect );
}
pLow = pLow->GetNext();
}
@@ -1463,7 +1463,7 @@ bool SwLayAction::FormatLayoutFly( SwFlyFrm* pFly )
// OD 31.10.2002 #104100#
// Implement vertical layout support
-bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
+bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
{
OSL_ENSURE( !IsAgain(), "8-) Attention to the invalid page." );
if ( IsAgain() || !pTab->Lower() )
@@ -1476,7 +1476,7 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
bool bChanged = false;
bool bPainted = false;
- const SwPageFrm *pOldPage = pTab->FindPageFrm();
+ const SwPageFrame *pOldPage = pTab->FindPageFrame();
// OD 31.10.2002 #104100# - vertical layout support
// use macro to declare and init <bool bVert>, <bool bRev> and
@@ -1490,24 +1490,24 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
pTab->GetPrev()->SetCompletePaint();
}
- const SwRect aOldRect( pTab->Frm() );
+ const SwRect aOldRect( pTab->Frame() );
pTab->SetLowersFormatted( false );
pTab->Calc(pRenderContext);
- if ( aOldRect != pTab->Frm() )
+ if ( aOldRect != pTab->Frame() )
{
bChanged = true;
}
- const SwRect aPaintFrm = pTab->PaintArea();
+ const SwRect aPaintFrame = pTab->PaintArea();
if ( IsPaint() && bAddRect )
{
- // OD 01.11.2002 #104100# - add condition <pTab->Frm().HasArea()>
+ // OD 01.11.2002 #104100# - add condition <pTab->Frame().HasArea()>
if ( !pTab->IsCompletePaint() &&
pTab->IsComplete() &&
- ( pTab->Frm().SSize() != pTab->Prt().SSize() ||
+ ( pTab->Frame().SSize() != pTab->Prt().SSize() ||
// OD 31.10.2002 #104100# - vertical layout support
(pTab->*fnRect->fnGetLeftMargin)() ) &&
- pTab->Frm().HasArea()
+ pTab->Frame().HasArea()
)
{
// OD 01.11.2002 #104100# - re-implement calculation of margin rectangles.
@@ -1516,14 +1516,14 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
SwTwips nLeftMargin = (pTab->*fnRect->fnGetLeftMargin)();
if ( nLeftMargin > 0)
{
- aMarginRect = pTab->Frm();
+ aMarginRect = pTab->Frame();
(aMarginRect.*fnRect->fnSetWidth)( nLeftMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( (pTab->*fnRect->fnGetRightMargin)() > 0)
{
- aMarginRect = pTab->Frm();
+ aMarginRect = pTab->Frame();
(aMarginRect.*fnRect->fnSetLeft)( (pTab->*fnRect->fnGetPrtRight)() );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
@@ -1531,21 +1531,21 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
SwTwips nTopMargin = (pTab->*fnRect->fnGetTopMargin)();
if ( nTopMargin > 0)
{
- aMarginRect = pTab->Frm();
+ aMarginRect = pTab->Frame();
(aMarginRect.*fnRect->fnSetHeight)( nTopMargin );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
if ( (pTab->*fnRect->fnGetBottomMargin)() > 0)
{
- aMarginRect = pTab->Frm();
+ aMarginRect = pTab->Frame();
(aMarginRect.*fnRect->fnSetTop)( (pTab->*fnRect->fnGetPrtBottom)() );
m_pImp->GetShell()->AddPaintRect( aMarginRect );
}
}
else if ( pTab->IsCompletePaint() )
{
- m_pImp->GetShell()->AddPaintRect( aPaintFrm );
+ m_pImp->GetShell()->AddPaintRect( aPaintFrame );
bAddRect = false;
bPainted = true;
}
@@ -1578,13 +1578,13 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
pTab->ResetRetouche();
}
- CheckWaitCrsr();
+ CheckWaitCursor();
rTimerAccess.UnblockIdling();
// Ugly shortcut!
if ( pTab->IsLowersFormatted() &&
- (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->Frm())) )
+ (bPainted || !m_pImp->GetShell()->VisArea().IsOver( pTab->Frame())) )
return false;
// Now, deal with the lowers
@@ -1593,28 +1593,28 @@ bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, bool bAddRect )
// OD 20.10.2003 #112464# - for savety reasons:
// check page number before formatting lowers.
- if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrm()->GetPhyPageNum() + 1) )
+ if ( pOldPage->GetPhyPageNum() > (pTab->FindPageFrame()->GetPhyPageNum() + 1) )
SetNextCycle( true );
// OD 20.10.2003 #112464# - format lowers, only if table frame is valid
if ( pTab->IsValid() )
{
- SwLayoutFrm *pLow = static_cast<SwLayoutFrm*>(pTab->Lower());
+ SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(pTab->Lower());
while ( pLow )
{
bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), pLow, bAddRect );
if ( IsAgain() )
return false;
- pLow = static_cast<SwLayoutFrm*>(pLow->GetNext());
+ pLow = static_cast<SwLayoutFrame*>(pLow->GetNext());
}
}
return bChanged;
}
-bool SwLayAction::FormatContent( const SwPageFrm *pPage )
+bool SwLayAction::FormatContent( const SwPageFrame *pPage )
{
- const SwContentFrm *pContent = pPage->ContainsContent();
+ const SwContentFrame *pContent = pPage->ContainsContent();
const SwViewShell *pSh = m_pRoot->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
@@ -1627,11 +1627,11 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
{
// We do this so we don't have to search later on.
const bool bNxtCnt = IsCalcLayout() && !pContent->GetFollow();
- const SwContentFrm *pContentNext = bNxtCnt ? pContent->GetNextContentFrm() : nullptr;
- const SwContentFrm *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrm() : nullptr;
+ const SwContentFrame *pContentNext = bNxtCnt ? pContent->GetNextContentFrame() : nullptr;
+ const SwContentFrame *pContentPrev = pContent->GetPrev() ? pContent->GetPrevContentFrame() : nullptr;
- const SwLayoutFrm*pOldUpper = pContent->GetUpper();
- const SwTabFrm *pTab = pContent->FindTabFrm();
+ const SwLayoutFrame*pOldUpper = pContent->GetUpper();
+ const SwTabFrame *pTab = pContent->FindTabFrame();
const bool bInValid = !pContent->IsValid() || pContent->IsCompletePaint();
const bool bOldPaint = IsPaint();
m_bPaint = bOldPaint && !(pTab && pTab == m_pOptTab);
@@ -1647,20 +1647,20 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
// to the object formatter.
if ( !IsAgain() &&
( !IsInterrupt() || mbFormatContentOnInterrupt ) &&
- pContent->IsTextFrm() &&
- !SwObjectFormatter::FormatObjsAtFrm( *(const_cast<SwContentFrm*>(pContent)),
- *(pContent->FindPageFrm()), this ) )
+ pContent->IsTextFrame() &&
+ !SwObjectFormatter::FormatObjsAtFrame( *(const_cast<SwContentFrame*>(pContent)),
+ *(pContent->FindPageFrame()), this ) )
{
return false;
}
- if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() )
+ if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() )
{
- const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines();
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines();
+ const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines();
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
- nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frm() );
+ nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
+ m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
}
if ( IsAgain() )
@@ -1684,11 +1684,11 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
}
if ( pOldUpper != pContent->GetUpper() )
{
- const sal_uInt16 nCurNum = pContent->FindPageFrm()->GetPhyPageNum();
+ const sal_uInt16 nCurNum = pContent->FindPageFrame()->GetPhyPageNum();
if ( nCurNum < pPage->GetPhyPageNum() )
m_nPreInvaPage = nCurNum;
- // If the Frm flowed backwards more than one page, we need to
+ // If the Frame flowed backwards more than one page, we need to
// start over again from the beginning, so nothing gets left out.
if ( !IsCalcLayout() && pPage->GetPhyPageNum() > nCurNum+1 )
{
@@ -1710,7 +1710,7 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
if ( !pContentPrev->IsValid() && pPage->IsAnLower( pContentPrev ) )
pPage->InvalidateContent();
if ( pOldUpper != pContent->GetUpper() &&
- pPage->GetPhyPageNum() < pContent->FindPageFrm()->GetPhyPageNum() )
+ pPage->GetPhyPageNum() < pContent->FindPageFrame()->GetPhyPageNum() )
{
pContent = pContentPrev;
bSetContent = false;
@@ -1719,10 +1719,10 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
if ( bSetContent )
{
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->Frm().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
- const SwFrm *pTmp = lcl_FindFirstInvaContent( pPage,
+ const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
nBottom, pContent );
if ( !pTmp )
{
@@ -1738,26 +1738,26 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
}
}
}
- pContent = bNxtCnt ? pContentNext : pContent->GetNextContentFrm();
+ pContent = bNxtCnt ? pContentNext : pContent->GetNextContentFrame();
}
RESCHEDULE;
}
else
{
- if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() )
+ if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() )
{
- const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines();
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines();
+ const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines();
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
- nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frm() );
+ nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
+ m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
}
- // Do this if the Frm has been formatted before.
- if ( pContent->IsTextFrm() && static_cast<const SwTextFrm*>(pContent)->HasRepaint() &&
+ // Do this if the Frame has been formatted before.
+ if ( pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() &&
IsPaint() )
- PaintContent( pContent, pPage, pContent->Frm(), pContent->Frm().Bottom());
+ PaintContent( pContent, pPage, pContent->Frame(), pContent->Frame().Bottom());
if ( IsIdle() )
{
CheckIdleEnd();
@@ -1766,10 +1766,10 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
return false;
}
if ( bBrowse && !IsIdle() && !IsCalcLayout() && !IsComplete() &&
- pContent->Frm().Top() > m_pImp->GetShell()->VisArea().Bottom())
+ pContent->Frame().Top() > m_pImp->GetShell()->VisArea().Bottom())
{
const long nBottom = m_pImp->GetShell()->VisArea().Bottom();
- const SwFrm *pTmp = lcl_FindFirstInvaContent( pPage,
+ const SwFrame *pTmp = lcl_FindFirstInvaContent( pPage,
nBottom, pContent );
if ( !pTmp )
{
@@ -1785,16 +1785,16 @@ bool SwLayAction::FormatContent( const SwPageFrm *pPage )
}
}
}
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
}
- CheckWaitCrsr();
+ CheckWaitCursor();
// OD 14.04.2003 #106346# - consider interrupt formatting.
return !IsInterrupt() || mbFormatContentOnInterrupt;
}
-void SwLayAction::_FormatContent( const SwContentFrm *pContent,
- const SwPageFrm *pPage )
+void SwLayAction::_FormatContent( const SwContentFrame *pContent,
+ const SwPageFrame *pPage )
{
// We probably only ended up here because the Content holds DrawObjects.
const bool bDrawObjsOnly = pContent->IsValid() && !pContent->IsCompletePaint() &&
@@ -1802,84 +1802,84 @@ void SwLayAction::_FormatContent( const SwContentFrm *pContent,
SWRECTFN( pContent )
if ( !bDrawObjsOnly && IsPaint() )
{
- const SwRect aOldRect( pContent->UnionFrm() );
+ const SwRect aOldRect( pContent->UnionFrame() );
const long nOldBottom = (pContent->*fnRect->fnGetPrtBottom)();
pContent->OptCalc();
if( IsAgain() )
return;
- if( (*fnRect->fnYDiff)( (pContent->Frm().*fnRect->fnGetBottom)(),
+ if( (*fnRect->fnYDiff)( (pContent->Frame().*fnRect->fnGetBottom)(),
(aOldRect.*fnRect->fnGetBottom)() ) < 0 )
{
pContent->SetRetouche();
}
- PaintContent( pContent, pContent->FindPageFrm(), aOldRect, nOldBottom);
+ PaintContent( pContent, pContent->FindPageFrame(), aOldRect, nOldBottom);
}
else
{
- if ( IsPaint() && pContent->IsTextFrm() && static_cast<const SwTextFrm*>(pContent)->HasRepaint() )
- PaintContent( pContent, pPage, pContent->Frm(),
- (pContent->Frm().*fnRect->fnGetBottom)() );
+ if ( IsPaint() && pContent->IsTextFrame() && static_cast<const SwTextFrame*>(pContent)->HasRepaint() )
+ PaintContent( pContent, pPage, pContent->Frame(),
+ (pContent->Frame().*fnRect->fnGetBottom)() );
pContent->OptCalc();
}
}
/// Returns true if all Contents of the Fly have been processed completely.
/// Returns false if processing has been interrupted prematurely.
-bool SwLayAction::_FormatFlyContent( const SwFlyFrm *pFly )
+bool SwLayAction::_FormatFlyContent( const SwFlyFrame *pFly )
{
- const SwContentFrm *pContent = pFly->ContainsContent();
+ const SwContentFrame *pContent = pFly->ContainsContent();
while ( pContent )
{
// OD 2004-05-10 #i28701#
- _FormatContent( pContent, pContent->FindPageFrm() );
+ _FormatContent( pContent, pContent->FindPageFrame() );
// #i28701# - format floating screen objects
// at content text frame
// #i23129#, #i36347# - pass correct page frame
// to the object formatter.
- if ( pContent->IsTextFrm() &&
- !SwObjectFormatter::FormatObjsAtFrm(
- *(const_cast<SwContentFrm*>(pContent)),
- *(pContent->FindPageFrm()), this ) )
+ if ( pContent->IsTextFrame() &&
+ !SwObjectFormatter::FormatObjsAtFrame(
+ *(const_cast<SwContentFrame*>(pContent)),
+ *(pContent->FindPageFrame()), this ) )
{
// restart format with first content
pContent = pFly->ContainsContent();
continue;
}
- if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrm() )
+ if ( !pContent->GetValidLineNumFlag() && pContent->IsTextFrame() )
{
- const sal_uLong nAllLines = static_cast<const SwTextFrm*>(pContent)->GetAllLines();
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pContent))->RecalcAllLines();
+ const sal_uLong nAllLines = static_cast<const SwTextFrame*>(pContent)->GetAllLines();
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pContent))->RecalcAllLines();
if ( IsPaintExtraData() && IsPaint() &&
- nAllLines != static_cast<const SwTextFrm*>(pContent)->GetAllLines() )
- m_pImp->GetShell()->AddPaintRect( pContent->Frm() );
+ nAllLines != static_cast<const SwTextFrame*>(pContent)->GetAllLines() )
+ m_pImp->GetShell()->AddPaintRect( pContent->Frame() );
}
if ( IsAgain() )
return false;
// If there's input, we interrupt processing.
- if ( !pFly->IsFlyInCntFrm() )
+ if ( !pFly->IsFlyInContentFrame() )
{
CheckIdleEnd();
// OD 14.04.2003 #106346# - consider interrupt formatting.
if ( IsInterrupt() && !mbFormatContentOnInterrupt )
return false;
}
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
- CheckWaitCrsr();
+ CheckWaitCursor();
// OD 14.04.2003 #106346# - consider interrupt formatting.
return !(IsInterrupt() && !mbFormatContentOnInterrupt);
}
-bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
+bool SwLayIdle::_DoIdleJob( const SwContentFrame *pCnt, IdleJobType eJob )
{
- OSL_ENSURE( pCnt->IsTextFrm(), "NoText neighbour of Text" );
+ OSL_ENSURE( pCnt->IsTextFrame(), "NoText neighbour of Text" );
// robust against misuse by e.g. #i52542#
- if( !pCnt->IsTextFrm() )
+ if( !pCnt->IsTextFrame() )
return false;
const SwTextNode* pTextNode = pCnt->GetNode()->GetTextNode();
@@ -1903,13 +1903,13 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
if( COMPLETE_STRING == nTextPos )
{
--nTextPos;
- if( dynamic_cast< const SwCrsrShell *>( pSh ) != nullptr && !static_cast<SwCrsrShell*>(pSh)->IsTableMode() )
+ if( dynamic_cast< const SwCursorShell *>( pSh ) != nullptr && !static_cast<SwCursorShell*>(pSh)->IsTableMode() )
{
- SwPaM *pCrsr = static_cast<SwCrsrShell*>(pSh)->GetCrsr();
- if( !pCrsr->HasMark() && !pCrsr->IsMultiSelection() )
+ SwPaM *pCursor = static_cast<SwCursorShell*>(pSh)->GetCursor();
+ if( !pCursor->HasMark() && !pCursor->IsMultiSelection() )
{
- pContentNode = pCrsr->GetContentNode();
- nTextPos = pCrsr->GetPoint()->nContent.GetIndex();
+ pContentNode = pCursor->GetContentNode();
+ nTextPos = pCursor->GetPoint()->nContent.GetIndex();
}
}
}
@@ -1918,7 +1918,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
{
case ONLINE_SPELLING :
{
- SwRect aRepaint( const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->_AutoSpell( pContentNode, nTextPos ) );
+ SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->_AutoSpell( pContentNode, nTextPos ) );
// tdf#92036 PENDING should stop idle spell checking
bPageValid = bPageValid && (SwTextNode::WrongState::TODO != pTextNode->GetWrongDirty());
if( !bPageValid )
@@ -1930,7 +1930,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
break;
}
case AUTOCOMPLETE_WORDS :
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->CollectAutoCmplWrds( pContentNode, nTextPos );
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->CollectAutoCmplWrds( pContentNode, nTextPos );
// note: bPageValid remains true here even if the cursor
// position is skipped, so no PENDING state needed currently
if (Application::AnyInput(VCL_INPUT_ANY & VclInputFlags(~VclInputFlags::TIMER)))
@@ -1948,7 +1948,7 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
case SMART_TAGS :
{
try {
- const SwRect aRepaint( const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pCnt))->SmartTagScan( pContentNode, nTextPos ) );
+ const SwRect aRepaint( const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pCnt))->SmartTagScan( pContentNode, nTextPos ) );
bPageValid = bPageValid && !pTextNode->IsSmartTagDirty();
if( !bPageValid )
bAllValid = false;
@@ -1972,20 +1972,20 @@ bool SwLayIdle::_DoIdleJob( const SwContentFrm *pCnt, IdleJobType eJob )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
- if ( pFly->IsFlyInCntFrm() )
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pObj);
+ if ( pFly->IsFlyInContentFrame() )
{
- const SwContentFrm *pC = pFly->ContainsContent();
+ const SwContentFrame *pC = pFly->ContainsContent();
while( pC )
{
- if ( pC->IsTextFrm() )
+ if ( pC->IsTextFrame() )
{
if ( _DoIdleJob( pC, eJob ) )
return true;
}
- pC = pC->GetNextContentFrm();
+ pC = pC->GetNextContentFrame();
}
}
}
@@ -2026,11 +2026,11 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
default: OSL_FAIL( "Unknown idle job type" );
}
- SwPageFrm *pPage;
+ SwPageFrame *pPage;
if ( bVisAreaOnly )
pPage = pImp->GetFirstVisPage(pViewShell->GetOut());
else
- pPage = static_cast<SwPageFrm*>(pRoot->Lower());
+ pPage = static_cast<SwPageFrame*>(pRoot->Lower());
pContentNode = nullptr;
nTextPos = COMPLETE_STRING;
@@ -2038,12 +2038,12 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
while ( pPage )
{
bPageValid = true;
- const SwContentFrm *pCnt = pPage->ContainsContent();
+ const SwContentFrame *pCnt = pPage->ContainsContent();
while( pCnt && pPage->IsAnLower( pCnt ) )
{
if ( _DoIdleJob( pCnt, eJob ) )
return true;
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
if ( pPage->GetSortedObjs() )
{
@@ -2051,18 +2051,18 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
i < pPage->GetSortedObjs()->size(); ++i )
{
const SwAnchoredObject* pObj = (*pPage->GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pObj ) != nullptr )
{
- const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pObj);
- const SwContentFrm *pC = pFly->ContainsContent();
+ const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pObj);
+ const SwContentFrame *pC = pFly->ContainsContent();
while( pC )
{
- if ( pC->IsTextFrm() )
+ if ( pC->IsTextFrame() )
{
if ( _DoIdleJob( pC, eJob ) )
return true;
}
- pC = pC->GetNextContentFrm();
+ pC = pC->GetNextContentFrame();
}
}
}
@@ -2079,9 +2079,9 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly )
}
}
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
if ( pPage && bVisAreaOnly &&
- !pPage->Frm().IsOver( pImp->GetShell()->VisArea()))
+ !pPage->Frame().IsOver( pImp->GetShell()->VisArea()))
break;
}
return false;
@@ -2112,7 +2112,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
#define SHOW_IDLE( ColorData )
#endif // DBG_UTIL
-SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
+SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) :
pRoot( pRt ),
pImp( pI )
#ifdef DBG_UTIL
@@ -2143,9 +2143,9 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
{
++rSh.mnStartAction;
bool bVis = false;
- if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr )
+ if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr )
{
- bVis = static_cast<SwCrsrShell*>(&rSh)->GetCharRect().IsOver(rSh.VisArea());
+ bVis = static_cast<SwCursorShell*>(&rSh)->GetCharRect().IsOver(rSh.VisArea());
}
aBools.push_back( bVis );
}
@@ -2177,15 +2177,15 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
// Are we supposed to crash if rSh isn't a cursor shell?!
// bActions |= aTmp != rSh.VisArea() ||
- // aBools[nBoolIdx] != ((SwCrsrShell*)&rSh)->GetCharRect().IsOver( rSh.VisArea() );
+ // aBools[nBoolIdx] != ((SwCursorShell*)&rSh)->GetCharRect().IsOver( rSh.VisArea() );
// aBools[ i ] is true, if the i-th shell is a cursor shell (!!!)
// and the cursor is visible.
bActions |= aTmp != rSh.VisArea();
- if ( aTmp == rSh.VisArea() && dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr )
+ if ( aTmp == rSh.VisArea() && dynamic_cast<const SwCursorShell*>( &rSh) != nullptr )
{
bActions |= aBools[nBoolIdx] !=
- static_cast<SwCrsrShell*>(&rSh)->GetCharRect().IsOver( rSh.VisArea() );
+ static_cast<SwCursorShell*>(&rSh)->GetCharRect().IsOver( rSh.VisArea() );
}
}
@@ -2194,17 +2194,17 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
if ( bActions )
{
- // Prepare start/end actions via CrsrShell, so the cursor, selection
+ // Prepare start/end actions via CursorShell, so the cursor, selection
// and VisArea can be set correctly.
nBoolIdx = 0;
for(SwViewShell& rSh : pImp->GetShell()->GetRingContainer())
{
- SwCrsrShell* pCrsrShell = nullptr;
- if(dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr)
- pCrsrShell = static_cast<SwCrsrShell*>(&rSh);
+ SwCursorShell* pCursorShell = nullptr;
+ if(dynamic_cast<const SwCursorShell*>( &rSh) != nullptr)
+ pCursorShell = static_cast<SwCursorShell*>(&rSh);
- if ( pCrsrShell )
- pCrsrShell->SttCrsrMove();
+ if ( pCursorShell )
+ pCursorShell->SttCursorMove();
// If there are accrued paints, it's best to simply invalidate
// the whole window. Otherwise there would arise paint problems whose
@@ -2221,22 +2221,22 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
bUnlock = true;
}
- if ( pCrsrShell )
- // If the Crsr was visible, we need to make it visible again.
- // Otherwise, EndCrsrMove with true for IdleEnd
- pCrsrShell->EndCrsrMove( !aBools[nBoolIdx] );
+ if ( pCursorShell )
+ // If the Cursor was visible, we need to make it visible again.
+ // Otherwise, EndCursorMove with true for IdleEnd
+ pCursorShell->EndCursorMove( !aBools[nBoolIdx] );
if( bUnlock )
{
- if( pCrsrShell )
+ if( pCursorShell )
{
// UnlockPaint overwrite the selection from the
- // CrsrShell and calls the virtual method paint
+ // CursorShell and calls the virtual method paint
// to fill the virtual device. This fill don't have
// paint the selection! -> Set the focus flag at
- // CrsrShell and it doesn't paint the selection.
- pCrsrShell->ShLooseFcs();
- pCrsrShell->UnlockPaint( true );
- pCrsrShell->ShGetFcs( false );
+ // CursorShell and it doesn't paint the selection.
+ pCursorShell->ShLooseFcs();
+ pCursorShell->UnlockPaint( true );
+ pCursorShell->ShGetFcs( false );
}
else
rSh.UnlockPaint( true );
@@ -2265,7 +2265,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
!pViewShell->GetDoc()->isXForms() &&
SwSmartTagMgr::Get().IsSmartTagsEnabled();
- SwPageFrm *pPg = static_cast<SwPageFrm*>(pRoot->Lower());
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(pRoot->Lower());
do
{
bInValid = pPg->IsInvalidContent() || pPg->IsInvalidLayout() ||
@@ -2276,7 +2276,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) :
(bWordCount && pPg->IsInvalidWordCount()) ||
(bSmartTags && pPg->IsInvalidSmartTags());
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
} while ( pPg && !bInValid );
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index b25f451f52e7..b5fa19ef6668 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -163,7 +163,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
// The first page..
- SwPageFrm* pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()));
+ SwPageFrame* pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->Lower()));
aIo.OpenRec( SW_LAYCACHE_IO_REC_PAGES );
aIo.OpenFlagRec( 0, 0 );
@@ -172,37 +172,37 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
{
if( pPage->GetPrev() )
{
- SwLayoutFrm* pLay = pPage->FindBodyCont();
- SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr;
+ SwLayoutFrame* pLay = pPage->FindBodyCont();
+ SwFrame* pTmp = pLay ? pLay->ContainsAny() : nullptr;
// We are only interested in paragraph or table frames,
// a section frames contains paragraphs/tables.
- if( pTmp && pTmp->IsSctFrm() )
- pTmp = static_cast<SwSectionFrm*>(pTmp)->ContainsAny();
+ if( pTmp && pTmp->IsSctFrame() )
+ pTmp = static_cast<SwSectionFrame*>(pTmp)->ContainsAny();
if( pTmp ) // any content
{
- if( pTmp->IsTextFrm() )
+ if( pTmp->IsTextFrame() )
{
- sal_uLong nNdIdx = static_cast<SwTextFrm*>(pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = static_cast<SwTextFrame*>(pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
/* Open Paragraph Record */
aIo.OpenRec( SW_LAYCACHE_IO_REC_PARA );
- bool bFollow = static_cast<SwTextFrm*>(pTmp)->IsFollow();
+ bool bFollow = static_cast<SwTextFrame*>(pTmp)->IsFollow();
aIo.OpenFlagRec( bFollow ? 0x01 : 0x00,
bFollow ? 8 : 4 );
nNdIdx -= nStartOfContent;
aIo.GetStream().WriteUInt32( nNdIdx );
if( bFollow )
- aIo.GetStream().WriteUInt32( static_cast<SwTextFrm*>(pTmp)->GetOfst() );
+ aIo.GetStream().WriteUInt32( static_cast<SwTextFrame*>(pTmp)->GetOfst() );
aIo.CloseFlagRec();
/* Close Paragraph Record */
aIo.CloseRec( SW_LAYCACHE_IO_REC_PARA );
}
}
- else if( pTmp->IsTabFrm() )
+ else if( pTmp->IsTabFrame() )
{
- SwTabFrm* pTab = static_cast<SwTabFrm*>(pTmp);
+ SwTabFrame* pTab = static_cast<SwTabFrame*>(pTmp);
sal_uLong nOfst = COMPLETE_STRING;
if( pTab->IsFollow() )
{
@@ -213,7 +213,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
pTab = pTab->FindMaster( true );
while( pTab != pTmp )
{
- SwFrm* pSub = pTab->Lower();
+ SwFrame* pSub = pTab->Lower();
while( pSub )
{
++nOfst;
@@ -248,14 +248,14 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
nOfst = 0;
do
{
- SwFrm* pSub = pTab->Lower();
+ SwFrame* pSub = pTab->Lower();
while( pSub )
{
++nOfst;
pSub = pSub->GetNext();
}
pTab = pTab->GetFollow();
- SwPageFrm *pTabPage = pTab->FindPageFrm();
+ SwPageFrame *pTabPage = pTab->FindPageFrame();
if( pTabPage != pPage )
{
OSL_ENSURE( pPage->GetPhyPageNum() <
@@ -278,10 +278,10 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if (SwFlyFrm *pFly = dynamic_cast<SwFlyFrm*>(pAnchoredObj))
+ if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
{
- if( pFly->Frm().Left() != FAR_AWAY &&
- !pFly->GetAnchorFrm()->FindFooterOrHeader() )
+ if( pFly->Frame().Left() != FAR_AWAY &&
+ !pFly->GetAnchorFrame()->FindFooterOrHeader() )
{
const SwContact *pC =
::GetUserCall(pAnchoredObj->GetDrawObj());
@@ -293,9 +293,9 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
aIo.OpenRec( SW_LAYCACHE_IO_REC_FLY );
aIo.OpenFlagRec( 0, 0 );
aIo.CloseFlagRec();
- SwRect &rRct = pFly->Frm();
- sal_Int32 nX = rRct.Left() - pPage->Frm().Left();
- sal_Int32 nY = rRct.Top() - pPage->Frm().Top();
+ SwRect &rRct = pFly->Frame();
+ sal_Int32 nX = rRct.Left() - pPage->Frame().Left();
+ sal_Int32 nY = rRct.Top() - pPage->Frame().Top();
aIo.GetStream().WriteUInt16( nPageNum ).WriteUInt32( nOrdNum )
.WriteInt32( nX ).WriteInt32( nY )
.WriteInt32( rRct.Width() )
@@ -307,7 +307,7 @@ void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc )
}
}
}
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
aIo.CloseRec( SW_LAYCACHE_IO_REC_PAGES );
}
@@ -318,37 +318,37 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
{
if( !pImpl )
return true;
- const SwRootFrm *pRootFrm = rDoc.getIDocumentLayoutAccess().GetCurrentLayout();
- if( pRootFrm )
+ const SwRootFrame *pRootFrame = rDoc.getIDocumentLayoutAccess().GetCurrentLayout();
+ if( pRootFrame )
{
sal_uInt16 nIndex = 0;
sal_uLong nStartOfContent = rDoc.GetNodes().GetEndOfContent().
StartOfSectionNode()->GetIndex();
- const SwPageFrm* pPage = static_cast<const SwPageFrm*>(pRootFrm->Lower());
+ const SwPageFrame* pPage = static_cast<const SwPageFrame*>(pRootFrame->Lower());
if( pPage )
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
while( pPage )
{
if( nIndex >= pImpl->size() )
return false;
- const SwLayoutFrm* pLay = pPage->FindBodyCont();
- const SwFrm* pTmp = pLay ? pLay->ContainsAny() : nullptr;
- if( pTmp && pTmp->IsSctFrm() )
- pTmp = static_cast<const SwSectionFrm*>(pTmp)->ContainsAny();
+ const SwLayoutFrame* pLay = pPage->FindBodyCont();
+ const SwFrame* pTmp = pLay ? pLay->ContainsAny() : nullptr;
+ if( pTmp && pTmp->IsSctFrame() )
+ pTmp = static_cast<const SwSectionFrame*>(pTmp)->ContainsAny();
if( pTmp )
{
- if( pTmp->IsTextFrm() )
+ if( pTmp->IsTextFrame() )
{
- sal_uLong nNdIdx = static_cast<const SwTextFrm*>(pTmp)->GetNode()->GetIndex();
+ sal_uLong nNdIdx = static_cast<const SwTextFrame*>(pTmp)->GetNode()->GetIndex();
if( nNdIdx > nStartOfContent )
{
- bool bFollow = static_cast<const SwTextFrm*>(pTmp)->IsFollow();
+ bool bFollow = static_cast<const SwTextFrame*>(pTmp)->IsFollow();
nNdIdx -= nStartOfContent;
if( pImpl->GetBreakIndex( nIndex ) != nNdIdx ||
SW_LAYCACHE_IO_REC_PARA !=
pImpl->GetBreakType( nIndex ) ||
- ( bFollow ? static_cast<const SwTextFrm*>(pTmp)->GetOfst()
+ ( bFollow ? static_cast<const SwTextFrame*>(pTmp)->GetOfst()
: COMPLETE_STRING ) != pImpl->GetBreakOfst( nIndex ) )
{
return false;
@@ -356,9 +356,9 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
++nIndex;
}
}
- else if( pTmp->IsTabFrm() )
+ else if( pTmp->IsTabFrame() )
{
- const SwTabFrm* pTab = static_cast<const SwTabFrm*>(pTmp);
+ const SwTabFrame* pTab = static_cast<const SwTabFrame*>(pTmp);
sal_Int32 nOfst = COMPLETE_STRING;
if( pTab->IsFollow() )
{
@@ -367,7 +367,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
pTab = pTab->FindMaster( true );
while( pTab != pTmp )
{
- const SwFrm* pSub = pTab->Lower();
+ const SwFrame* pSub = pTab->Lower();
while( pSub )
{
++nOfst;
@@ -398,14 +398,14 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
nOfst = 0;
do
{
- const SwFrm* pSub = pTab->Lower();
+ const SwFrame* pSub = pTab->Lower();
while( pSub )
{
++nOfst;
pSub = pSub->GetNext();
}
pTab = pTab->GetFollow();
- const SwPageFrm *pTabPage = pTab->FindPageFrm();
+ const SwPageFrame *pTabPage = pTab->FindPageFrame();
if( pTabPage != pPage )
{
pPage = pTabPage;
@@ -418,7 +418,7 @@ bool SwLayoutCache::CompareLayout( const SwDoc& rDoc ) const
} while( pTab );
}
}
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
}
return true;
@@ -442,10 +442,10 @@ SwLayoutCache::~SwLayoutCache()
/// helper class to create not nested section frames for nested sections.
SwActualSection::SwActualSection( SwActualSection *pUp,
- SwSectionFrm *pSect,
+ SwSectionFrame *pSect,
SwSectionNode *pNd ) :
pUpper( pUp ),
- pSectFrm( pSect ),
+ pSectFrame( pSect ),
pSectNode( pNd )
{
if ( !pSectNode )
@@ -461,10 +461,10 @@ SwActualSection::SwActualSection( SwActualSection *pUp,
* If there's no layout cache, the distibution to the pages is more
* a guess, but a guess with statistical background.
*/
-SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, bool &rB,
+SwLayHelper::SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg,
+ SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rB,
sal_uLong nNodeIndex, bool bCache )
- : rpFrm( rpF )
+ : rpFrame( rpF )
, rpPrv( rpP )
, rpPage( rpPg )
, rpLay( rpL )
@@ -558,8 +558,8 @@ sal_uLong SwLayHelper::CalcPageCount()
if ( nNdCount < 1000 )
nPgCount = 0;// no progress bar for small documents
SwViewShell *pSh = nullptr;
- if( rpLay && rpLay->getRootFrm() )
- pSh = rpLay->getRootFrm()->GetCurrShell();
+ if( rpLay && rpLay->getRootFrame() )
+ pSh = rpLay->getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
nMaxParaPerPage *= 6;
}
@@ -579,13 +579,13 @@ sal_uLong SwLayHelper::CalcPageCount()
bool SwLayHelper::CheckInsertPage()
{
bool bEnd = nullptr == rpPage->GetNext();
- const SwAttrSet* pAttr = rpFrm->GetAttrSet();
+ const SwAttrSet* pAttr = rpFrame->GetAttrSet();
const SvxFormatBreakItem& rBrk = pAttr->GetBreak();
const SwFormatPageDesc& rDesc = pAttr->GetPageDesc();
// #118195# Do not evaluate page description if frame
// is a follow frame!
- const SwPageDesc* pDesc = rpFrm->IsFlowFrm() &&
- SwFlowFrm::CastFlowFrm( rpFrm )->IsFollow() ?
+ const SwPageDesc* pDesc = rpFrame->IsFlowFrame() &&
+ SwFlowFrame::CastFlowFrame( rpFrame )->IsFollow() ?
nullptr :
rDesc.GetPageDesc();
@@ -606,13 +606,13 @@ bool SwLayHelper::CheckInsertPage()
SwFormatPageDesc aFollowDesc( pDesc );
oPgNum = aFollowDesc.GetNumOffset();
if ( oPgNum )
- static_cast<SwRootFrm*>(rpPage->GetUpper())->SetVirtPageNum(true);
+ static_cast<SwRootFrame*>(rpPage->GetUpper())->SetVirtPageNum(true);
}
else
{
oPgNum = rDesc.GetNumOffset();
if ( oPgNum )
- static_cast<SwRootFrm*>(rpPage->GetUpper())->SetVirtPageNum(true);
+ static_cast<SwRootFrame*>(rpPage->GetUpper())->SetVirtPageNum(true);
}
bool bNextPageOdd = !rpPage->OnRightPage();
bool bInsertEmpty = false;
@@ -629,22 +629,22 @@ bool SwLayHelper::CheckInsertPage()
{
OSL_ENSURE( rpPage->GetNext(), "No new page?" );
do
- { rpPage = static_cast<SwPageFrm*>(rpPage->GetNext());
+ { rpPage = static_cast<SwPageFrame*>(rpPage->GetNext());
} while ( rpPage->GetNext() );
}
else
{
OSL_ENSURE( rpPage->GetNext(), "No new page?" );
- rpPage = static_cast<SwPageFrm*>(rpPage->GetNext());
+ rpPage = static_cast<SwPageFrame*>(rpPage->GetNext());
if ( rpPage->IsEmptyPage() )
{
OSL_ENSURE( rpPage->GetNext(), "No new page?" );
- rpPage = static_cast<SwPageFrm*>(rpPage->GetNext());
+ rpPage = static_cast<SwPageFrame*>(rpPage->GetNext());
}
}
rpLay = rpPage->FindBodyCont();
while( rpLay->Lower() )
- rpLay = static_cast<SwLayoutFrm*>(rpLay->Lower());
+ rpLay = static_cast<SwLayoutFrame*>(rpLay->Lower());
return true;
}
return false;
@@ -664,10 +664,10 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
sal_uLong nMaxRowPerPage( 0 );
nNodeIndex -= nStartOfContent;
sal_uInt16 nRows( 0 );
- if( rpFrm->IsTabFrm() )
+ if( rpFrame->IsTabFrame() )
{
//Inside a table counts every row as a paragraph
- SwFrm *pLow = static_cast<SwTabFrm*>(rpFrm)->Lower();
+ SwFrame *pLow = static_cast<SwTabFrame*>(rpFrame)->Lower();
nRows = 0;
do
{
@@ -688,10 +688,10 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
}
else
{
- SwFrm *pTmp = static_cast<SwTabFrm*>(rpFrm)->Lower();
+ SwFrame *pTmp = static_cast<SwTabFrame*>(rpFrame)->Lower();
if( pTmp->GetNext() )
pTmp = pTmp->GetNext();
- pTmp = static_cast<SwRowFrm*>(pTmp)->Lower();
+ pTmp = static_cast<SwRowFrame*>(pTmp)->Lower();
sal_uInt16 nCnt = 0;
do
{
@@ -718,7 +718,7 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
#endif
// OD 09.04.2003 #108698# - always split a big tables.
if ( !bFirst ||
- ( rpFrm->IsTabFrm() && bLongTab )
+ ( rpFrame->IsTabFrame() && bLongTab )
)
{
sal_Int32 nRowCount = 0;
@@ -756,45 +756,45 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
{
bool bSplit = false;
sal_uInt16 nRepeat( 0 );
- if( !bLongTab && rpFrm->IsTextFrm() &&
+ if( !bLongTab && rpFrame->IsTextFrame() &&
SW_LAYCACHE_IO_REC_PARA == nType &&
- nOfst < static_cast<SwTextFrm*>(rpFrm)->GetTextNode()->GetText().getLength())
+ nOfst < static_cast<SwTextFrame*>(rpFrame)->GetTextNode()->GetText().getLength())
bSplit = true;
- else if( rpFrm->IsTabFrm() && nRowCount < nOfst &&
+ else if( rpFrame->IsTabFrame() && nRowCount < nOfst &&
( bLongTab || SW_LAYCACHE_IO_REC_TABLE == nType ) )
{
- nRepeat = static_cast<SwTabFrm*>(rpFrm)->
+ nRepeat = static_cast<SwTabFrame*>(rpFrame)->
GetTable()->GetRowsToRepeat();
bSplit = nOfst < nRows && nRowCount + nRepeat < nOfst;
bLongTab = bLongTab && bSplit;
}
if( bSplit )
{
- rpFrm->InsertBehind( rpLay, rpPrv );
- rpFrm->Frm().Pos() = rpLay->Frm().Pos();
- rpFrm->Frm().Pos().Y() += 1;
- rpPrv = rpFrm;
- if( rpFrm->IsTabFrm() )
+ rpFrame->InsertBehind( rpLay, rpPrv );
+ rpFrame->Frame().Pos() = rpLay->Frame().Pos();
+ rpFrame->Frame().Pos().Y() += 1;
+ rpPrv = rpFrame;
+ if( rpFrame->IsTabFrame() )
{
- SwTabFrm* pTab = static_cast<SwTabFrm*>(rpFrm);
+ SwTabFrame* pTab = static_cast<SwTabFrame*>(rpFrame);
// #i33629#, #i29955#
- ::RegistFlys( pTab->FindPageFrm(), pTab );
- SwFrm *pRow = pTab->Lower();
- SwTabFrm *pFoll = new SwTabFrm( *pTab );
+ ::RegistFlys( pTab->FindPageFrame(), pTab );
+ SwFrame *pRow = pTab->Lower();
+ SwTabFrame *pFoll = new SwTabFrame( *pTab );
- SwFrm *pPrv;
+ SwFrame *pPrv;
if( nRepeat > 0 )
{
bDontCreateObjects = true; //frmtool
// Insert new headlines:
sal_uInt16 nRowIdx = 0;
- SwRowFrm* pHeadline = nullptr;
+ SwRowFrame* pHeadline = nullptr;
while( nRowIdx < nRepeat )
{
OSL_ENSURE( pTab->GetTable()->GetTabLines()[ nRowIdx ], "Table ohne Zeilen?" );
pHeadline =
- new SwRowFrm( *pTab->GetTable()->GetTabLines()[ nRowIdx ], pTab );
+ new SwRowFrame( *pTab->GetTable()->GetTabLines()[ nRowIdx ], pTab );
pHeadline->SetRepeatedHeadline( true );
pHeadline->InsertBefore( pFoll, nullptr );
pHeadline->RegistFlys();
@@ -815,34 +815,34 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
}
while ( pRow )
{
- SwFrm* pNxt = pRow->GetNext();
+ SwFrame* pNxt = pRow->GetNext();
pRow->RemoveFromLayout();
pRow->InsertBehind( pFoll, pPrv );
pPrv = pRow;
pRow = pNxt;
}
- rpFrm = pFoll;
+ rpFrame = pFoll;
}
else
{
- SwTextFrm *const pNew = static_cast<SwTextFrm*>(
- static_cast<SwTextFrm*>(rpFrm)
- ->GetTextNode()->MakeFrm(rpFrm));
+ SwTextFrame *const pNew = static_cast<SwTextFrame*>(
+ static_cast<SwTextFrame*>(rpFrame)
+ ->GetTextNode()->MakeFrame(rpFrame));
pNew->ManipOfst( nOfst );
- pNew->SetFollow( static_cast<SwTextFrm*>(rpFrm)->GetFollow() );
- static_cast<SwTextFrm*>(rpFrm)->SetFollow( pNew );
- rpFrm = pNew;
+ pNew->SetFollow( static_cast<SwTextFrame*>(rpFrame)->GetFollow() );
+ static_cast<SwTextFrame*>(rpFrame)->SetFollow( pNew );
+ rpFrame = pNew;
}
}
}
}
- SwPageFrm* pLastPage = rpPage;
+ SwPageFrame* pLastPage = rpPage;
if( CheckInsertPage() )
{
_CheckFlyCache( pLastPage );
- if( rpPrv && rpPrv->IsTextFrm() && !rpPrv->GetValidSizeFlag() )
- rpPrv->Frm().Height( rpPrv->GetUpper()->Prt().Height() );
+ if( rpPrv && rpPrv->IsTextFrame() && !rpPrv->GetValidSizeFlag() )
+ rpPrv->Frame().Height( rpPrv->GetUpper()->Prt().Height() );
bRet = true;
rpPrv = nullptr;
@@ -850,31 +850,31 @@ bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex )
if ( rpActualSection )
{
- //Did the SectionFrm even have a content? If not, we can
+ //Did the SectionFrame even have a content? If not, we can
//directly put it somewhere else
- SwSectionFrm *pSct;
+ SwSectionFrame *pSct;
bool bInit = false;
- if ( !rpActualSection->GetSectionFrm()->ContainsContent())
+ if ( !rpActualSection->GetSectionFrame()->ContainsContent())
{
- pSct = rpActualSection->GetSectionFrm();
+ pSct = rpActualSection->GetSectionFrame();
pSct->RemoveFromLayout();
}
else
{
- pSct = new SwSectionFrm(
- *rpActualSection->GetSectionFrm(), false );
- rpActualSection->GetSectionFrm()->SimpleFormat();
+ pSct = new SwSectionFrame(
+ *rpActualSection->GetSectionFrame(), false );
+ rpActualSection->GetSectionFrame()->SimpleFormat();
bInit = true;
}
- rpActualSection->SetSectionFrm( pSct );
+ rpActualSection->SetSectionFrame( pSct );
pSct->InsertBehind( rpLay, nullptr );
if( bInit )
pSct->Init();
- pSct->Frm().Pos() = rpLay->Frm().Pos();
- pSct->Frm().Pos().Y() += 1; //because of the notifications
+ pSct->Frame().Pos() = rpLay->Frame().Pos();
+ pSct->Frame().Pos().Y() += 1; //because of the notifications
rpLay = pSct;
- if ( rpLay->Lower() && rpLay->Lower()->IsLayoutFrm() )
+ if ( rpLay->Lower() && rpLay->Lower()->IsLayoutFrame() )
rpLay = rpLay->GetNextLayoutLeaf();
}
}
@@ -906,7 +906,7 @@ struct FlyCacheCompare
* If there are text frames with default position, the fly cache
* is checked, if these frames are stored in the cache.
*/
-void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
+void SwLayHelper::_CheckFlyCache( SwPageFrame* pPage )
{
if( !pImpl || !pPage )
return;
@@ -942,10 +942,10 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if (SwFlyFrm *pFly = dynamic_cast<SwFlyFrm*>(pAnchoredObj)) // a text frame?
+ if (SwFlyFrame *pFly = dynamic_cast<SwFlyFrame*>(pAnchoredObj)) // a text frame?
{
- if( pFly->GetAnchorFrm() &&
- !pFly->GetAnchorFrm()->FindFooterOrHeader() )
+ if( pFly->GetAnchorFrame() &&
+ !pFly->GetAnchorFrame()->FindFooterOrHeader() )
{
const SwContact *pC = ::GetUserCall( pAnchoredObj->GetDrawObj() );
if( pC )
@@ -966,19 +966,19 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage )
while ( aFlyCacheSetIt != aFlyCacheSet.end() )
{
const SwFlyCache* pFlyCache = *aFlyCacheSetIt;
- SwFlyFrm* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrm();
+ SwFlyFrame* pFly = const_cast<SwVirtFlyDrawObj*>(static_cast<const SwVirtFlyDrawObj*>(*aFlySetIt))->GetFlyFrame();
- if ( pFly->Frm().Left() == FAR_AWAY )
+ if ( pFly->Frame().Left() == FAR_AWAY )
{
// we get the stored information
- pFly->Frm().Pos().X() = pFlyCache->Left() +
- pPage->Frm().Left();
- pFly->Frm().Pos().Y() = pFlyCache->Top() +
- pPage->Frm().Top();
+ pFly->Frame().Pos().X() = pFlyCache->Left() +
+ pPage->Frame().Left();
+ pFly->Frame().Pos().Y() = pFlyCache->Top() +
+ pPage->Frame().Top();
if ( pImpl->IsUseFlyCache() )
{
- pFly->Frm().Width( pFlyCache->Width() );
- pFly->Frm().Height( pFlyCache->Height() );
+ pFly->Frame().Width( pFlyCache->Width() );
+ pFly->Frame().Height( pFlyCache->Height() );
}
}
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 00d2762cf737..f3a56cef2ae1 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -26,11 +26,11 @@
#include <deque>
class SwDoc;
-class SwFrm;
-class SwLayoutFrm;
-class SwPageFrm;
-class SwFlyFrm;
-class SwSectionFrm;
+class SwFrame;
+class SwLayoutFrame;
+class SwPageFrame;
+class SwFlyFrame;
+class SwSectionFrame;
class SwSectionNode;
class SvStream;
@@ -81,15 +81,15 @@ public:
class SwActualSection
{
SwActualSection *pUpper;
- SwSectionFrm *pSectFrm;
+ SwSectionFrame *pSectFrame;
SwSectionNode *pSectNode;
public:
SwActualSection( SwActualSection *pUpper,
- SwSectionFrm *pSect,
+ SwSectionFrame *pSect,
SwSectionNode *pNd );
- SwSectionFrm *GetSectionFrm() { return pSectFrm; }
- void SetSectionFrm( SwSectionFrm *p ) { pSectFrm = p; }
+ SwSectionFrame *GetSectionFrame() { return pSectFrame; }
+ void SetSectionFrame( SwSectionFrame *p ) { pSectFrame = p; }
SwSectionNode *GetSectionNode() { return pSectNode;}
SwActualSection *GetUpper() { return pUpper; }
};
@@ -98,10 +98,10 @@ public:
// If there's a layoutcache available, this information is used.
class SwLayHelper
{
- SwFrm* &rpFrm;
- SwFrm* &rpPrv;
- SwPageFrm* &rpPage;
- SwLayoutFrm* &rpLay;
+ SwFrame* &rpFrame;
+ SwFrame* &rpPrv;
+ SwPageFrame* &rpPage;
+ SwLayoutFrame* &rpLay;
SwActualSection* &rpActualSection;
bool &rbBreakAfter;
SwDoc* pDoc;
@@ -112,10 +112,10 @@ class SwLayHelper
sal_uInt16 nIndex; // the index in the page break array
size_t nFlyIdx; // the index in the fly cache array
bool bFirst : 1;
- void _CheckFlyCache( SwPageFrm* pPage );
+ void _CheckFlyCache( SwPageFrame* pPage );
public:
- SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg,
- SwLayoutFrm* &rpL, SwActualSection* &rpA, bool &rBrk,
+ SwLayHelper( SwDoc *pD, SwFrame* &rpF, SwFrame* &rpP, SwPageFrame* &rpPg,
+ SwLayoutFrame* &rpL, SwActualSection* &rpA, bool &rBrk,
sal_uLong nNodeIndex, bool bCache );
~SwLayHelper();
sal_uLong CalcPageCount();
@@ -125,7 +125,7 @@ public:
/// Look for fresh text frames at this (new) page and set them to the right
/// position, if they are in the fly cache.
- void CheckFlyCache( SwPageFrm* pPage )
+ void CheckFlyCache( SwPageFrame* pPage )
{ if( pImpl && nFlyIdx < pImpl->GetFlyCount() ) _CheckFlyCache( pPage ); }
};
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 70e2fc8c0920..98c436dc008e 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -37,29 +37,29 @@ class SwLooping
sal_uInt16 nCount;
sal_uInt16 mnLoopControlStage;
public:
- explicit SwLooping( SwPageFrm* pPage );
- void Control( SwPageFrm* pPage );
- void Drastic( SwFrm* pFrm );
+ explicit SwLooping( SwPageFrame* pPage );
+ void Control( SwPageFrame* pPage );
+ void Drastic( SwFrame* pFrame );
bool IsLoopingLouieLight() const { return nCount > LOOP_DETECT - 30; };
};
class SwEndnoter
{
SwLayouter* pMaster;
- SwSectionFrm* pSect;
- SwFootnoteFrms* pEndArr;
+ SwSectionFrame* pSect;
+ SwFootnoteFrames* pEndArr;
public:
explicit SwEndnoter( SwLayouter* pLay )
: pMaster( pLay ), pSect( nullptr ), pEndArr( nullptr ) {}
~SwEndnoter() { delete pEndArr; }
- void CollectEndnotes( SwSectionFrm* pSct );
- void CollectEndnote( SwFootnoteFrm* pFootnote );
- const SwSectionFrm* GetSect() const { return pSect; }
+ void CollectEndnotes( SwSectionFrame* pSct );
+ void CollectEndnote( SwFootnoteFrame* pFootnote );
+ const SwSectionFrame* GetSect() const { return pSect; }
void InsertEndnotes();
bool HasEndnotes() const { return pEndArr && !pEndArr->empty(); }
};
-void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
+void SwEndnoter::CollectEndnotes( SwSectionFrame* pSct )
{
OSL_ENSURE( pSct, "CollectEndnotes: Which section?" );
if( !pSect )
@@ -69,7 +69,7 @@ void SwEndnoter::CollectEndnotes( SwSectionFrm* pSct )
pSect->CollectEndnotes( pMaster );
}
-void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote )
+void SwEndnoter::CollectEndnote( SwFootnoteFrame* pFootnote )
{
if( pEndArr && pEndArr->end() != std::find( pEndArr->begin(), pEndArr->end(), pFootnote ) )
return;
@@ -77,24 +77,24 @@ void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote )
if( pFootnote->GetUpper() )
{
// pFootnote is the master, he incorporates its follows
- SwFootnoteFrm *pNxt = pFootnote->GetFollow();
+ SwFootnoteFrame *pNxt = pFootnote->GetFollow();
while ( pNxt )
{
- SwFrm *pCnt = pNxt->ContainsAny();
+ SwFrame *pCnt = pNxt->ContainsAny();
if ( pCnt )
{
do
- { SwFrm *pNxtCnt = pCnt->GetNext();
+ { SwFrame *pNxtCnt = pCnt->GetNext();
pCnt->Cut();
pCnt->Paste( pFootnote );
pCnt = pNxtCnt;
} while ( pCnt );
}
else
- { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrm(),
+ { OSL_ENSURE( pNxt->Lower() && pNxt->Lower()->IsSctFrame(),
"Endnote without content?" );
pNxt->Cut();
- SwFrm::DestroyFrm(pNxt);
+ SwFrame::DestroyFrame(pNxt);
}
pNxt = pFootnote->GetFollow();
}
@@ -106,16 +106,16 @@ void SwEndnoter::CollectEndnote( SwFootnoteFrm* pFootnote )
{
for ( size_t i = 0; i < pEndArr->size(); ++i )
{
- SwFootnoteFrm *pEndFootnote = (*pEndArr)[i];
+ SwFootnoteFrame *pEndFootnote = (*pEndArr)[i];
if( pEndFootnote->GetAttr() == pFootnote->GetAttr() )
{
- SwFrm::DestroyFrm(pFootnote);
+ SwFrame::DestroyFrame(pFootnote);
return;
}
}
}
if( !pEndArr )
- pEndArr = new SwFootnoteFrms; // deleted from the SwLayouter
+ pEndArr = new SwFootnoteFrames; // deleted from the SwLayouter
pEndArr->push_back( pFootnote );
}
@@ -128,18 +128,18 @@ void SwEndnoter::InsertEndnotes()
pSect = nullptr;
return;
}
- OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFootnoteBossFrm(),
+ OSL_ENSURE( pSect->Lower() && pSect->Lower()->IsFootnoteBossFrame(),
"InsertEndnotes: Where's my column?" );
- SwFrm* pRef = pSect->FindLastContent( FINDMODE_MYLAST );
- SwFootnoteBossFrm *pBoss = pRef ? pRef->FindFootnoteBossFrm()
- : static_cast<SwFootnoteBossFrm*>(pSect->Lower());
+ SwFrame* pRef = pSect->FindLastContent( FINDMODE_MYLAST );
+ SwFootnoteBossFrame *pBoss = pRef ? pRef->FindFootnoteBossFrame()
+ : static_cast<SwFootnoteBossFrame*>(pSect->Lower());
pBoss->_MoveFootnotes( *pEndArr );
delete pEndArr;
pEndArr = nullptr;
pSect = nullptr;
}
-SwLooping::SwLooping( SwPageFrm* pPage )
+SwLooping::SwLooping( SwPageFrame* pPage )
{
OSL_ENSURE( pPage, "Where's my page?" );
nMinPage = pPage->GetPhyPageNum();
@@ -148,16 +148,16 @@ SwLooping::SwLooping( SwPageFrm* pPage )
mnLoopControlStage = 0;
}
-void SwLooping::Drastic( SwFrm* pFrm )
+void SwLooping::Drastic( SwFrame* pFrame )
{
- while( pFrm )
+ while( pFrame )
{
- pFrm->ValidateThisAndAllLowers( mnLoopControlStage );
- pFrm = pFrm->GetNext();
+ pFrame->ValidateThisAndAllLowers( mnLoopControlStage );
+ pFrame = pFrame->GetNext();
}
}
-void SwLooping::Control( SwPageFrm* pPage )
+void SwLooping::Control( SwPageFrame* pPage )
{
if( !pPage )
return;
@@ -193,9 +193,9 @@ void SwLooping::Control( SwPageFrm* pPage )
Drastic( pPage->Lower() );
if( nNew > nMinPage && pPage->GetPrev() )
- Drastic( static_cast<SwPageFrm*>(pPage->GetPrev())->Lower() );
+ Drastic( static_cast<SwPageFrame*>(pPage->GetPrev())->Lower() );
if( nNew < nMaxPage && pPage->GetNext() )
- Drastic( static_cast<SwPageFrm*>(pPage->GetNext())->Lower() );
+ Drastic( static_cast<SwPageFrame*>(pPage->GetNext())->Lower() );
++mnLoopControlStage;
nCount = 0;
@@ -206,7 +206,7 @@ SwLayouter::SwLayouter()
: mpEndnoter( nullptr ),
mpLooping( nullptr ),
// #i28701#
- mpMovedFwdFrms( nullptr ),
+ mpMovedFwdFrames( nullptr ),
// #i35911#
mpObjsTmpConsiderWrapInfl( nullptr )
{
@@ -217,14 +217,14 @@ SwLayouter::~SwLayouter()
delete mpEndnoter;
delete mpLooping;
// #i28701#
- delete mpMovedFwdFrms;
- mpMovedFwdFrms = nullptr;
+ delete mpMovedFwdFrames;
+ mpMovedFwdFrames = nullptr;
// #i35911#
delete mpObjsTmpConsiderWrapInfl;
mpObjsTmpConsiderWrapInfl = nullptr;
}
-void SwLayouter::_CollectEndnotes( SwSectionFrm* pSect )
+void SwLayouter::_CollectEndnotes( SwSectionFrame* pSect )
{
if( !mpEndnoter )
mpEndnoter = new SwEndnoter( this );
@@ -236,36 +236,36 @@ bool SwLayouter::HasEndnotes() const
return mpEndnoter->HasEndnotes();
}
-void SwLayouter::CollectEndnote( SwFootnoteFrm* pFootnote )
+void SwLayouter::CollectEndnote( SwFootnoteFrame* pFootnote )
{
mpEndnoter->CollectEndnote( pFootnote );
}
-void SwLayouter::InsertEndnotes( SwSectionFrm* pSect )
+void SwLayouter::InsertEndnotes( SwSectionFrame* pSect )
{
if( !mpEndnoter || mpEndnoter->GetSect() != pSect )
return;
mpEndnoter->InsertEndnotes();
}
-void SwLayouter::LoopControl( SwPageFrm* pPage, sal_uInt8 )
+void SwLayouter::LoopControl( SwPageFrame* pPage, sal_uInt8 )
{
OSL_ENSURE( mpLooping, "Looping: Lost control" );
mpLooping->Control( pPage );
}
-void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTextFrm& rFrm )
+void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTextFrame& rFrame )
{
if ( mpLooping && mpLooping->IsLoopingLouieLight() )
{
#if OSL_DEBUG_LEVEL > 1
OSL_FAIL( "Looping Louie (Light): Fixating fractious frame" );
#endif
- SwLayouter::InsertMovedFwdFrm( rDoc, rFrm, rFrm.FindPageFrm()->GetPhyPageNum() );
+ SwLayouter::InsertMovedFwdFrame( rDoc, rFrame, rFrame.FindPageFrame()->GetPhyPageNum() );
}
}
-bool SwLayouter::StartLooping( SwPageFrm* pPage )
+bool SwLayouter::StartLooping( SwPageFrame* pPage )
{
if( mpLooping )
return false;
@@ -279,7 +279,7 @@ void SwLayouter::EndLoopControl()
mpLooping = nullptr;
}
-void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
+void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrame* pSect )
{
assert(pDoc && "No doc, no fun");
if( !pDoc->getIDocumentLayoutAccess().GetLayouter() )
@@ -287,7 +287,7 @@ void SwLayouter::CollectEndnotes( SwDoc* pDoc, SwSectionFrm* pSect )
pDoc->getIDocumentLayoutAccess().GetLayouter()->_CollectEndnotes( pSect );
}
-bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFootnoteFrm* pFootnote )
+bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrame* pSect, SwFootnoteFrame* pFootnote )
{
if( !pDoc->getIDocumentLayoutAccess().GetLayouter() )
return false;
@@ -303,7 +303,7 @@ bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrm* pSect, SwFootnoteFrm* pF
return false;
}
-bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
+bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrame *pPage )
{
OSL_ENSURE( pDoc, "No doc, no fun" );
if( !pDoc->getIDocumentLayoutAccess().GetLayouter() )
@@ -315,17 +315,17 @@ bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage )
// #i28701#
// methods to manage text frames, which are moved forward by the positioning
// of its anchored objects
-void SwLayouter::ClearMovedFwdFrms( const SwDoc& _rDoc )
+void SwLayouter::ClearMovedFwdFrames( const SwDoc& _rDoc )
{
if ( _rDoc.getIDocumentLayoutAccess().GetLayouter() &&
- _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms )
+ _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames )
{
- _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Clear();
+ _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Clear();
}
}
-void SwLayouter::InsertMovedFwdFrm( const SwDoc& _rDoc,
- const SwTextFrm& _rMovedFwdFrmByObjPos,
+void SwLayouter::InsertMovedFwdFrame( const SwDoc& _rDoc,
+ const SwTextFrame& _rMovedFwdFrameByObjPos,
const sal_uInt32 _nToPageNum )
{
if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() )
@@ -333,29 +333,29 @@ void SwLayouter::InsertMovedFwdFrm( const SwDoc& _rDoc,
const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().SetLayouter( new SwLayouter() );
}
- if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms )
+ if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames )
{
- const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms =
- new SwMovedFwdFrmsByObjPos();
+ const_cast<SwDoc&>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames =
+ new SwMovedFwdFramesByObjPos();
}
- _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Insert( _rMovedFwdFrmByObjPos,
+ _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Insert( _rMovedFwdFrameByObjPos,
_nToPageNum );
}
// #i40155#
-void SwLayouter::RemoveMovedFwdFrm( const SwDoc& _rDoc,
- const SwTextFrm& _rTextFrm )
+void SwLayouter::RemoveMovedFwdFrame( const SwDoc& _rDoc,
+ const SwTextFrame& _rTextFrame )
{
sal_uInt32 nDummy;
- if ( SwLayouter::FrmMovedFwdByObjPos( _rDoc, _rTextFrm, nDummy ) )
+ if ( SwLayouter::FrameMovedFwdByObjPos( _rDoc, _rTextFrame, nDummy ) )
{
- _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->Remove( _rTextFrm );
+ _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->Remove( _rTextFrame );
}
}
-bool SwLayouter::FrmMovedFwdByObjPos( const SwDoc& _rDoc,
- const SwTextFrm& _rTextFrm,
+bool SwLayouter::FrameMovedFwdByObjPos( const SwDoc& _rDoc,
+ const SwTextFrame& _rTextFrame,
sal_uInt32& _ornToPageNum )
{
if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() )
@@ -363,34 +363,34 @@ bool SwLayouter::FrmMovedFwdByObjPos( const SwDoc& _rDoc,
_ornToPageNum = 0;
return false;
}
- else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms )
+ else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames )
{
_ornToPageNum = 0;
return false;
}
else
{
- return _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms->
- FrmMovedFwdByObjPos( _rTextFrm, _ornToPageNum );
+ return _rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames->
+ FrameMovedFwdByObjPos( _rTextFrame, _ornToPageNum );
}
}
// #i26945#
-bool SwLayouter::DoesRowContainMovedFwdFrm( const SwDoc& _rDoc,
- const SwRowFrm& _rRowFrm )
+bool SwLayouter::DoesRowContainMovedFwdFrame( const SwDoc& _rDoc,
+ const SwRowFrame& _rRowFrame )
{
if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter() )
{
return false;
}
- else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrms )
+ else if ( !_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames )
{
return false;
}
else
{
return _rDoc.getIDocumentLayoutAccess().GetLayouter()->
- mpMovedFwdFrms->DoesRowContainMovedFwdFrm( _rRowFrm );
+ mpMovedFwdFrames->DoesRowContainMovedFwdFrame( _rRowFrame );
}
}
@@ -421,22 +421,22 @@ void SwLayouter::InsertObjForTmpConsiderWrapInfluence(
_rDoc.getIDocumentLayoutAccess().GetLayouter()->mpObjsTmpConsiderWrapInfl->Insert( _rAnchoredObj );
}
-void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrm& rTextFrm )
+void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTextFrame& rTextFrame )
{
if ( bCondition )
{
- const SwDoc& rDoc = *rTextFrm.GetAttrSet()->GetDoc();
+ const SwDoc& rDoc = *rTextFrame.GetAttrSet()->GetDoc();
if ( rDoc.getIDocumentLayoutAccess().GetLayouter() )
{
- const_cast<SwDoc&>(rDoc).getIDocumentLayoutAccess().GetLayouter()->LoopingLouieLight( rDoc, rTextFrm );
+ const_cast<SwDoc&>(rDoc).getIDocumentLayoutAccess().GetLayouter()->LoopingLouieLight( rDoc, rTextFrame );
}
}
}
// #i65250#
bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
- const SwFlowFrm& p_rFlowFrm,
- const SwLayoutFrm& p_rNewUpperFrm )
+ const SwFlowFrame& p_rFlowFrame,
+ const SwLayoutFrame& p_rNewUpperFrame )
{
bool bMoveBwdSuppressed( false );
@@ -447,21 +447,21 @@ bool SwLayouter::MoveBwdSuppressed( const SwDoc& p_rDoc,
// create hash map key
tMoveBwdLayoutInfoKey aMoveBwdLayoutInfo;
- aMoveBwdLayoutInfo.mnFrmId = p_rFlowFrm.GetFrm().GetFrmId();
- aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrm.Frm().Pos().X();
- aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrm.Frm().Pos().Y();
- aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrm.Frm().Width();
- aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrm.Frm().Height();
- SWRECTFN( (&p_rNewUpperFrm) )
- const SwFrm* pLastLower( p_rNewUpperFrm.Lower() );
+ aMoveBwdLayoutInfo.mnFrameId = p_rFlowFrame.GetFrame().GetFrameId();
+ aMoveBwdLayoutInfo.mnNewUpperPosX = p_rNewUpperFrame.Frame().Pos().X();
+ aMoveBwdLayoutInfo.mnNewUpperPosY = p_rNewUpperFrame.Frame().Pos().Y();
+ aMoveBwdLayoutInfo.mnNewUpperWidth = p_rNewUpperFrame.Frame().Width();
+ aMoveBwdLayoutInfo.mnNewUpperHeight = p_rNewUpperFrame.Frame().Height();
+ SWRECTFN( (&p_rNewUpperFrame) )
+ const SwFrame* pLastLower( p_rNewUpperFrame.Lower() );
while ( pLastLower && pLastLower->GetNext() )
{
pLastLower = pLastLower->GetNext();
}
aMoveBwdLayoutInfo.mnFreeSpaceInNewUpper =
pLastLower
- ? (pLastLower->Frm().*fnRect->fnBottomDist)( (p_rNewUpperFrm.*fnRect->fnGetPrtBottom)() )
- : (p_rNewUpperFrm.Frm().*fnRect->fnGetHeight)();
+ ? (pLastLower->Frame().*fnRect->fnBottomDist)( (p_rNewUpperFrame.*fnRect->fnGetPrtBottom)() )
+ : (p_rNewUpperFrame.Frame().*fnRect->fnGetHeight)();
// check for moving backward suppress threshold
const sal_uInt16 cMoveBwdCountSuppressThreshold = 20;
diff --git a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
index a7c2bf8042c3..f238de1d8fb7 100644
--- a/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
+++ b/sw/source/core/layout/movedfwdfrmsbyobjpos.cxx
@@ -23,36 +23,36 @@
#include <pagefrm.hxx>
#include <calbck.hxx>
-SwMovedFwdFrmsByObjPos::SwMovedFwdFrmsByObjPos()
+SwMovedFwdFramesByObjPos::SwMovedFwdFramesByObjPos()
{
}
-SwMovedFwdFrmsByObjPos::~SwMovedFwdFrmsByObjPos()
+SwMovedFwdFramesByObjPos::~SwMovedFwdFramesByObjPos()
{
Clear();
}
-void SwMovedFwdFrmsByObjPos::Insert( const SwTextFrm& _rMovedFwdFrmByObjPos,
+void SwMovedFwdFramesByObjPos::Insert( const SwTextFrame& _rMovedFwdFrameByObjPos,
const sal_uInt32 _nToPageNum )
{
- if ( maMovedFwdFrms.end() ==
- maMovedFwdFrms.find( _rMovedFwdFrmByObjPos.GetTextNode() ) )
+ if ( maMovedFwdFrames.end() ==
+ maMovedFwdFrames.find( _rMovedFwdFrameByObjPos.GetTextNode() ) )
{
- const NodeMapEntry aEntry( _rMovedFwdFrmByObjPos.GetTextNode(), _nToPageNum );
- maMovedFwdFrms.insert( aEntry );
+ const NodeMapEntry aEntry( _rMovedFwdFrameByObjPos.GetTextNode(), _nToPageNum );
+ maMovedFwdFrames.insert( aEntry );
}
}
-void SwMovedFwdFrmsByObjPos::Remove( const SwTextFrm& _rTextFrm )
+void SwMovedFwdFramesByObjPos::Remove( const SwTextFrame& _rTextFrame )
{
- maMovedFwdFrms.erase( _rTextFrm.GetTextNode() );
+ maMovedFwdFrames.erase( _rTextFrame.GetTextNode() );
}
-bool SwMovedFwdFrmsByObjPos::FrmMovedFwdByObjPos( const SwTextFrm& _rTextFrm,
+bool SwMovedFwdFramesByObjPos::FrameMovedFwdByObjPos( const SwTextFrame& _rTextFrame,
sal_uInt32& _ornToPageNum ) const
{
- NodeMapIter aIter = maMovedFwdFrms.find( _rTextFrm.GetTextNode() );
- if ( maMovedFwdFrms.end() != aIter )
+ NodeMapIter aIter = maMovedFwdFrames.find( _rTextFrame.GetTextNode() );
+ if ( maMovedFwdFrames.end() != aIter )
{
_ornToPageNum = (*aIter).second;
return true;
@@ -62,33 +62,33 @@ bool SwMovedFwdFrmsByObjPos::FrmMovedFwdByObjPos( const SwTextFrm& _rTextFrm,
}
// #i26945#
-bool SwMovedFwdFrmsByObjPos::DoesRowContainMovedFwdFrm( const SwRowFrm& _rRowFrm ) const
+bool SwMovedFwdFramesByObjPos::DoesRowContainMovedFwdFrame( const SwRowFrame& _rRowFrame ) const
{
- bool bDoesRowContainMovedFwdFrm( false );
+ bool bDoesRowContainMovedFwdFrame( false );
- const sal_uInt32 nPageNumOfRow = _rRowFrm.FindPageFrm()->GetPhyPageNum();
+ const sal_uInt32 nPageNumOfRow = _rRowFrame.FindPageFrame()->GetPhyPageNum();
- NodeMapIter aIter = maMovedFwdFrms.begin();
- for ( ; aIter != maMovedFwdFrms.end(); ++aIter )
+ NodeMapIter aIter = maMovedFwdFrames.begin();
+ for ( ; aIter != maMovedFwdFrames.end(); ++aIter )
{
const NodeMapEntry& rEntry = *(aIter);
if ( rEntry.second >= nPageNumOfRow )
{
- SwIterator<SwTextFrm,SwTextNode> aFrmIter( *rEntry.first );
- for( SwTextFrm* pTextFrm = aFrmIter.First(); pTextFrm; pTextFrm = aFrmIter.Next() )
+ SwIterator<SwTextFrame,SwTextNode> aFrameIter( *rEntry.first );
+ for( SwTextFrame* pTextFrame = aFrameIter.First(); pTextFrame; pTextFrame = aFrameIter.Next() )
{
// #115759# - assure that found text frame
// is the first one.
- if ( _rRowFrm.IsAnLower( pTextFrm ) && !pTextFrm->GetIndPrev() )
+ if ( _rRowFrame.IsAnLower( pTextFrame ) && !pTextFrame->GetIndPrev() )
{
- bDoesRowContainMovedFwdFrm = true;
+ bDoesRowContainMovedFwdFrame = true;
break;
}
}
}
}
- return bDoesRowContainMovedFwdFrm;
+ return bDoesRowContainMovedFwdFrame;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index aaa21b335598..9f377bb4456b 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -39,11 +39,11 @@
#include <IDocumentFieldsAccess.hxx>
#include <DocumentLayoutManager.hxx>
-SwLayVout *SwRootFrm::s_pVout = nullptr;
-bool SwRootFrm::s_isInPaint = false;
-bool SwRootFrm::s_isNoVirDev = false;
+SwLayVout *SwRootFrame::s_pVout = nullptr;
+bool SwRootFrame::s_isInPaint = false;
+bool SwRootFrame::s_isNoVirDev = false;
-SwCache *SwFrm::mpCache = nullptr;
+SwCache *SwFrame::mpCache = nullptr;
long FirstMinusSecond( long nFirst, long nSecond )
{ return nFirst - nSecond; }
@@ -82,25 +82,25 @@ static SwRectFnCollection aHorizontal = {
&SwRect::SetPosX,
&SwRect::SetPosY,
- &SwFrm::GetTopMargin,
- &SwFrm::GetBottomMargin,
- &SwFrm::GetLeftMargin,
- &SwFrm::GetRightMargin,
- &SwFrm::SetLeftRightMargins,
- &SwFrm::SetTopBottomMargins,
- &SwFrm::GetPrtTop,
- &SwFrm::GetPrtBottom,
- &SwFrm::GetPrtLeft,
- &SwFrm::GetPrtRight,
+ &SwFrame::GetTopMargin,
+ &SwFrame::GetBottomMargin,
+ &SwFrame::GetLeftMargin,
+ &SwFrame::GetRightMargin,
+ &SwFrame::SetLeftRightMargins,
+ &SwFrame::SetTopBottomMargins,
+ &SwFrame::GetPrtTop,
+ &SwFrame::GetPrtBottom,
+ &SwFrame::GetPrtLeft,
+ &SwFrame::GetPrtRight,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
- &SwFrm::SetMaxBottom,
+ &SwFrame::SetMaxBottom,
&SwRect::OverStepBottom,
&SwRect::SetUpperLeftCorner,
- &SwFrm::MakeBelowPos,
+ &SwFrame::MakeBelowPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwIncrement,
@@ -137,25 +137,25 @@ static SwRectFnCollection aVertical = {
&SwRect::SetPosY,
&SwRect::SetPosX,
- &SwFrm::GetRightMargin,
- &SwFrm::GetLeftMargin,
- &SwFrm::GetTopMargin,
- &SwFrm::GetBottomMargin,
- &SwFrm::SetTopBottomMargins,
- &SwFrm::SetRightLeftMargins,
- &SwFrm::GetPrtRight,
- &SwFrm::GetPrtLeft,
- &SwFrm::GetPrtTop,
- &SwFrm::GetPrtBottom,
+ &SwFrame::GetRightMargin,
+ &SwFrame::GetLeftMargin,
+ &SwFrame::GetTopMargin,
+ &SwFrame::GetBottomMargin,
+ &SwFrame::SetTopBottomMargins,
+ &SwFrame::SetRightLeftMargins,
+ &SwFrame::GetPrtRight,
+ &SwFrame::GetPrtLeft,
+ &SwFrame::GetPrtTop,
+ &SwFrame::GetPrtBottom,
&SwRect::GetRightDistance,
&SwRect::GetLeftDistance,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
- &SwFrm::SetMinLeft,
+ &SwFrame::SetMinLeft,
&SwRect::OverStepLeft,
&SwRect::SetUpperRightCorner,
- &SwFrm::MakeLeftPos,
+ &SwFrame::MakeLeftPos,
&FirstMinusSecond,
&SecondMinusFirst,
&SwIncrement,
@@ -192,25 +192,25 @@ static SwRectFnCollection aBottomToTop = {
&SwRect::SetPosX,
&SwRect::SetPosY,
- &SwFrm::GetBottomMargin,
- &SwFrm::GetTopMargin,
- &SwFrm::GetLeftMargin,
- &SwFrm::GetRightMargin,
- &SwFrm::SetLeftRightMargins,
- &SwFrm::SetBottomTopMargins,
- &SwFrm::GetPrtBottom,
- &SwFrm::GetPrtTop,
- &SwFrm::GetPrtLeft,
- &SwFrm::GetPrtRight,
+ &SwFrame::GetBottomMargin,
+ &SwFrame::GetTopMargin,
+ &SwFrame::GetLeftMargin,
+ &SwFrame::GetRightMargin,
+ &SwFrame::SetLeftRightMargins,
+ &SwFrame::SetBottomTopMargins,
+ &SwFrame::GetPrtBottom,
+ &SwFrame::GetPrtTop,
+ &SwFrame::GetPrtLeft,
+ &SwFrame::GetPrtRight,
&SwRect::GetBottomDistance,
&SwRect::GetTopDistance,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
- &SwFrm::SetMinTop,
+ &SwFrame::SetMinTop,
&SwRect::OverStepTop,
&SwRect::SetLowerLeftCorner,
- &SwFrm::MakeUpperPos,
+ &SwFrame::MakeUpperPos,
&FirstMinusSecond,
&SecondMinusFirst,
&SwIncrement,
@@ -247,25 +247,25 @@ static SwRectFnCollection aVerticalRightToLeft = {
&SwRect::SetPosY,
&SwRect::SetPosX,
- &SwFrm::GetLeftMargin,
- &SwFrm::GetRightMargin,
- &SwFrm::GetTopMargin,
- &SwFrm::GetBottomMargin,
- &SwFrm::SetTopBottomMargins,
- &SwFrm::SetLeftRightMargins,
- &SwFrm::GetPrtLeft,
- &SwFrm::GetPrtRight,
- &SwFrm::GetPrtBottom,
- &SwFrm::GetPrtTop,
+ &SwFrame::GetLeftMargin,
+ &SwFrame::GetRightMargin,
+ &SwFrame::GetTopMargin,
+ &SwFrame::GetBottomMargin,
+ &SwFrame::SetTopBottomMargins,
+ &SwFrame::SetLeftRightMargins,
+ &SwFrame::GetPrtLeft,
+ &SwFrame::GetPrtRight,
+ &SwFrame::GetPrtBottom,
+ &SwFrame::GetPrtTop,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwRect::GetBottomDistance,
&SwRect::GetTopDistance,
- &SwFrm::SetMaxRight,
+ &SwFrame::SetMaxRight,
&SwRect::OverStepRight,
&SwRect::SetLowerLeftCorner,
- &SwFrm::MakeRightPos,
+ &SwFrame::MakeRightPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwDecrement,
@@ -302,25 +302,25 @@ static SwRectFnCollection aVerticalLeftToRight = {
&SwRect::SetPosY,
&SwRect::SetPosX,
- &SwFrm::GetLeftMargin,
- &SwFrm::GetRightMargin,
- &SwFrm::GetTopMargin,
- &SwFrm::GetBottomMargin,
- &SwFrm::SetTopBottomMargins,
- &SwFrm::SetLeftRightMargins,
- &SwFrm::GetPrtLeft,
- &SwFrm::GetPrtRight,
- &SwFrm::GetPrtTop,
- &SwFrm::GetPrtBottom,
+ &SwFrame::GetLeftMargin,
+ &SwFrame::GetRightMargin,
+ &SwFrame::GetTopMargin,
+ &SwFrame::GetBottomMargin,
+ &SwFrame::SetTopBottomMargins,
+ &SwFrame::SetLeftRightMargins,
+ &SwFrame::GetPrtLeft,
+ &SwFrame::GetPrtRight,
+ &SwFrame::GetPrtTop,
+ &SwFrame::GetPrtBottom,
&SwRect::GetLeftDistance,
&SwRect::GetRightDistance,
&SwRect::GetTopDistance,
&SwRect::GetBottomDistance,
- &SwFrm::SetMaxRight,
+ &SwFrame::SetMaxRight,
&SwRect::OverStepRight,
&SwRect::SetUpperLeftCorner,
- &SwFrm::MakeRightPos,
+ &SwFrame::MakeRightPos,
&FirstMinusSecond,
&FirstMinusSecond,
&SwIncrement,
@@ -338,36 +338,36 @@ SwRectFn fnRectB2T = &aBottomToTop;
SwRectFn fnRectVL2R = &aVerticalRightToLeft;
// #i65250#
-sal_uInt32 SwFrm::mnLastFrmId=0;
+sal_uInt32 SwFrame::mnLastFrameId=0;
-void _FrmInit()
+void _FrameInit()
{
- SwRootFrm::s_pVout = new SwLayVout();
+ SwRootFrame::s_pVout = new SwLayVout();
SwCache *pNew = new SwCache( 100
#ifdef DBG_UTIL
, "static SwBorderAttrs::pCache"
#endif
);
- SwFrm::SetCache( pNew );
+ SwFrame::SetCache( pNew );
}
-void _FrmFinit()
+void _FrameFinit()
{
#if OSL_DEBUG_LEVEL > 0
// The cache may only contain null pointers at this time.
- for( size_t n = SwFrm::GetCachePtr()->size(); n; )
- if( (*SwFrm::GetCachePtr())[ --n ] )
+ for( size_t n = SwFrame::GetCachePtr()->size(); n; )
+ if( (*SwFrame::GetCachePtr())[ --n ] )
{
- SwCacheObj* pObj = (*SwFrm::GetCachePtr())[ n ];
+ SwCacheObj* pObj = (*SwFrame::GetCachePtr())[ n ];
OSL_ENSURE( !pObj, "Who didn't deregister?");
}
#endif
- delete SwRootFrm::s_pVout;
- delete SwFrm::GetCachePtr();
+ delete SwRootFrame::s_pVout;
+ delete SwFrame::GetCachePtr();
}
-// RootFrm::Everything that belongs to CurrShell
+// RootFrame::Everything that belongs to CurrShell
class SwCurrShells : public std::set<CurrShell*> {};
@@ -402,14 +402,14 @@ CurrShell::~CurrShell()
void SetShell( SwViewShell *pSh )
{
- SwRootFrm *pRoot = pSh->GetLayout();
+ SwRootFrame *pRoot = pSh->GetLayout();
if ( pRoot->mpCurrShells->empty() )
pRoot->mpCurrShell = pSh;
else
pRoot->mpWaitingCurrShell = pSh;
}
-void SwRootFrm::DeRegisterShell( SwViewShell *pSh )
+void SwRootFrame::DeRegisterShell( SwViewShell *pSh )
{
// Activate some shell if possible
if ( mpCurrShell == pSh )
@@ -438,18 +438,18 @@ void SwRootFrm::DeRegisterShell( SwViewShell *pSh )
}
}
-void InitCurrShells( SwRootFrm *pRoot )
+void InitCurrShells( SwRootFrame *pRoot )
{
pRoot->mpCurrShells = new SwCurrShells;
}
/*
-|* The RootFrm requests an own FrameFormat from the document, which it is
+|* The RootFrame requests an own FrameFormat from the document, which it is
|* going to delete again in the dtor. The own FrameFormat is derived from
|* the passed FrameFormat.
|*/
-SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) :
- SwLayoutFrm( pFormat->GetDoc()->MakeFrameFormat(
+SwRootFrame::SwRootFrame( SwFrameFormat *pFormat, SwViewShell * pSh ) :
+ SwLayoutFrame( pFormat->GetDoc()->MakeFrameFormat(
"Root", pFormat ), nullptr ),
maPagesArea(),
mnViewWidth( -1 ),
@@ -477,11 +477,11 @@ SwRootFrm::SwRootFrm( SwFrameFormat *pFormat, SwViewShell * pSh ) :
mnPhyPageNums( 0 ),
mnAccessibleShells( 0 )
{
- mnFrmType = FRM_ROOT;
- setRootFrm( this );
+ mnFrameType = FRM_ROOT;
+ setRootFrame( this );
}
-void SwRootFrm::Init( SwFrameFormat* pFormat )
+void SwRootFrame::Init( SwFrameFormat* pFormat )
{
InitCurrShells( this );
@@ -490,7 +490,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
IDocumentFieldsAccess& rFieldsAccess = pFormat->getIDocumentFieldsAccess();
const IDocumentSettingAccess& rSettingAccess = pFormat->getIDocumentSettingAccess();
rTimerAccess.StopIdling();
- // For creating the Flys by MakeFrms()
+ // For creating the Flys by MakeFrames()
rLayoutAccess.SetCurrentViewShell( this->GetCurrShell() );
mbCallbackActionEnabled = false; // needs to be set to true before leaving!
@@ -500,7 +500,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
// Disable "multiple layout"
mpDrawPage = pMd->GetPage(0);
- mpDrawPage->SetSize( Frm().SSize() );
+ mpDrawPage->SetSize( Frame().SSize() );
}
// Initialize the layout: create pages, link content with Content etc.
@@ -543,12 +543,12 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
bool bFirst = !oPgNum || 1 == oPgNum.get();
// Create a page and put it in the layout
- SwPageFrm *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, nullptr );
+ SwPageFrame *pPage = ::InsertNewPage( *pDesc, this, bOdd, bFirst, false, false, nullptr );
// Find the first page in the Bodytext section.
- SwLayoutFrm *pLay = pPage->FindBodyCont();
+ SwLayoutFrame *pLay = pPage->FindBodyCont();
while( pLay->Lower() )
- pLay = static_cast<SwLayoutFrm*>(pLay->Lower());
+ pLay = static_cast<SwLayoutFrame*>(pLay->Lower());
SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 );
::_InsertCnt( pLay, pDoc, aTmp.GetIndex(), true );
@@ -559,7 +559,7 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
//b6433357: Update page fields after loading
if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() )
{
- SwDocPosUpdate aMsgHint( pPage->Frm().Top() );
+ SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
rFieldsAccess.UpdatePageFields( &aMsgHint );
}
@@ -571,23 +571,23 @@ void SwRootFrm::Init( SwFrameFormat* pFormat )
mbNeedGrammarCheck = pViewSh->GetViewOptions()->IsOnlineSpell();
}
-void SwRootFrm::DestroyImpl()
+void SwRootFrame::DestroyImpl()
{
mbTurboAllowed = false;
mpTurbo = nullptr;
// fdo#39510 crash on document close with footnotes
// Object ownership in writer and esp. in layout are a mess: Before the
- // document/layout split SwDoc and SwRootFrm were essentially one object
+ // document/layout split SwDoc and SwRootFrame were essentially one object
// and magically/uncleanly worked around their common destruction by call
// to SwDoc::IsInDtor() -- even from the layout. As of now destuction of
- // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrms
+ // the layout proceeds forward through the frames. Since SwTextFootnote::DelFrames
// also searches backwards to find the master of footnotes, they must be
- // considered to be owned by the SwRootFrm and also be destroyed here,
+ // considered to be owned by the SwRootFrame and also be destroyed here,
// before tearing down the (now footnote free) rest of the layout.
RemoveFootnotes(nullptr, false, true);
if(pBlink)
- pBlink->FrmDelete( this );
+ pBlink->FrameDelete( this );
SwFrameFormat *pRegisteredInNonConst = static_cast<SwFrameFormat*>(GetRegisteredInNonConst());
if ( pRegisteredInNonConst )
{
@@ -605,17 +605,17 @@ void SwRootFrm::DestroyImpl()
delete mpCurrShells;
mpCurrShells = nullptr;
- // Some accessible shells are left => problems on second SwFrm::Destroy call
+ // Some accessible shells are left => problems on second SwFrame::Destroy call
assert(0 == mnAccessibleShells);
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwRootFrm::~SwRootFrm()
+SwRootFrame::~SwRootFrame()
{
}
-void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
+void SwRootFrame::RemoveMasterObjs( SdrPage *pPg )
{
// Remove all master objects from the Page. But don't delete!
for( size_t i = pPg ? pPg->GetObjCount() : 0; i; )
@@ -626,42 +626,42 @@ void SwRootFrm::RemoveMasterObjs( SdrPage *pPg )
}
}
-void SwRootFrm::AllCheckPageDescs() const
+void SwRootFrame::AllCheckPageDescs() const
{
if ( !IsLayoutFreezed() )
- CheckPageDescs( const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower())) );
+ CheckPageDescs( const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower())) );
}
-void SwRootFrm::AllInvalidateAutoCompleteWords() const
+void SwRootFrame::AllInvalidateAutoCompleteWords() const
{
- SwPageFrm *pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower()));
+ SwPageFrame *pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower()));
while ( pPage )
{
pPage->InvalidateAutoCompleteWords();
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
-void SwRootFrm::AllAddPaintRect() const
+void SwRootFrame::AllAddPaintRect() const
{
- GetCurrShell()->AddPaintRect( this->Frm() );
+ GetCurrShell()->AddPaintRect( this->Frame() );
}
-void SwRootFrm::AllRemoveFootnotes()
+void SwRootFrame::AllRemoveFootnotes()
{
RemoveFootnotes();
}
-void SwRootFrm::AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const
+void SwRootFrame::AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const
{
- SwPageFrm *pPage = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(this->Lower()));
+ SwPageFrame *pPage = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(this->Lower()));
while ( pPage )
{
if ( bSmartTags )
pPage->InvalidateSmartTags();
pPage->InvalidateSpelling();
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx
index 1f292a551487..8a202d600625 100644
--- a/sw/source/core/layout/objectformatter.cxx
+++ b/sw/source/core/layout/objectformatter.cxx
@@ -64,23 +64,23 @@ class SwPageNumAndTypeOfAnchors
{
tEntry* pNewEntry = new tEntry();
pNewEntry->mpAnchoredObj = &_rAnchoredObj;
- // #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
- // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // #i33751#, #i34060# - method <GetPageFrameOfAnchor()>
+ // is replaced by method <FindPageFrameOfAnchor()>. It's return value
// have to be checked.
- SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor();
- if ( pPageFrmOfAnchor )
+ SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor();
+ if ( pPageFrameOfAnchor )
{
- pNewEntry->mnPageNumOfAnchor = pPageFrmOfAnchor->GetPhyPageNum();
+ pNewEntry->mnPageNumOfAnchor = pPageFrameOfAnchor->GetPhyPageNum();
}
else
{
pNewEntry->mnPageNumOfAnchor = 0;
}
// --> #i26945# - collect type of anchor
- SwTextFrm* pAnchorCharFrm = _rAnchoredObj.FindAnchorCharFrm();
- if ( pAnchorCharFrm )
+ SwTextFrame* pAnchorCharFrame = _rAnchoredObj.FindAnchorCharFrame();
+ if ( pAnchorCharFrame )
{
- pNewEntry->mbAnchoredAtMaster = !pAnchorCharFrm->IsFollow();
+ pNewEntry->mbAnchoredAtMaster = !pAnchorCharFrame->IsFollow();
}
else
{
@@ -132,12 +132,12 @@ class SwPageNumAndTypeOfAnchors
}
};
-SwObjectFormatter::SwObjectFormatter( const SwPageFrm& _rPageFrm,
+SwObjectFormatter::SwObjectFormatter( const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction,
const bool _bCollectPgNumOfAnchors )
- : mrPageFrm( _rPageFrm ),
+ : mrPageFrame( _rPageFrame ),
mbFormatOnlyAsCharAnchored( false ),
- mbConsiderWrapOnObjPos( _rPageFrm.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ),
+ mbConsiderWrapOnObjPos( _rPageFrame.GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) ),
mpLayAction( _pLayAction ),
// --> #i26945#
mpPgNumAndTypeOfAnchors( _bCollectPgNumOfAnchors ? new SwPageNumAndTypeOfAnchors() : nullptr )
@@ -150,22 +150,22 @@ SwObjectFormatter::~SwObjectFormatter()
}
SwObjectFormatter* SwObjectFormatter::CreateObjFormatter(
- SwFrm& _rAnchorFrm,
- const SwPageFrm& _rPageFrm,
+ SwFrame& _rAnchorFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction )
{
SwObjectFormatter* pObjFormatter = nullptr;
- if ( _rAnchorFrm.IsTextFrm() )
+ if ( _rAnchorFrame.IsTextFrame() )
{
- pObjFormatter = SwObjectFormatterTextFrm::CreateObjFormatter(
- static_cast<SwTextFrm&>(_rAnchorFrm),
- _rPageFrm, _pLayAction );
+ pObjFormatter = SwObjectFormatterTextFrame::CreateObjFormatter(
+ static_cast<SwTextFrame&>(_rAnchorFrame),
+ _rPageFrame, _pLayAction );
}
- else if ( _rAnchorFrm.IsLayoutFrm() )
+ else if ( _rAnchorFrame.IsLayoutFrame() )
{
- pObjFormatter = SwObjectFormatterLayFrm::CreateObjFormatter(
- static_cast<SwLayoutFrm&>(_rAnchorFrm),
- _rPageFrm, _pLayAction );
+ pObjFormatter = SwObjectFormatterLayFrame::CreateObjFormatter(
+ static_cast<SwLayoutFrame&>(_rAnchorFrame),
+ _rPageFrame, _pLayAction );
}
else
{
@@ -177,15 +177,15 @@ SwObjectFormatter* SwObjectFormatter::CreateObjFormatter(
/** method to format all floating screen objects at the given anchor frame
*/
-bool SwObjectFormatter::FormatObjsAtFrm( SwFrm& _rAnchorFrm,
- const SwPageFrm& _rPageFrm,
+bool SwObjectFormatter::FormatObjsAtFrame( SwFrame& _rAnchorFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction )
{
bool bSuccess( true );
// create corresponding object formatter
SwObjectFormatter* pObjFormatter =
- SwObjectFormatter::CreateObjFormatter( _rAnchorFrm, _rPageFrm, _pLayAction );
+ SwObjectFormatter::CreateObjFormatter( _rAnchorFrame, _rPageFrame, _pLayAction );
if ( pObjFormatter )
{
@@ -200,23 +200,23 @@ bool SwObjectFormatter::FormatObjsAtFrm( SwFrm& _rAnchorFrm,
/** method to format a given floating screen object
*/
bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
- SwFrm* _pAnchorFrm,
- const SwPageFrm* _pPageFrm,
+ SwFrame* _pAnchorFrame,
+ const SwPageFrame* _pPageFrame,
SwLayAction* _pLayAction )
{
bool bSuccess( true );
- OSL_ENSURE( _pAnchorFrm || _rAnchoredObj.GetAnchorFrm(),
+ OSL_ENSURE( _pAnchorFrame || _rAnchoredObj.GetAnchorFrame(),
"<SwObjectFormatter::FormatObj(..)> - missing anchor frame" );
- SwFrm& rAnchorFrm = _pAnchorFrm ? *(_pAnchorFrm) : *(_rAnchoredObj.AnchorFrm());
+ SwFrame& rAnchorFrame = _pAnchorFrame ? *(_pAnchorFrame) : *(_rAnchoredObj.AnchorFrame());
- OSL_ENSURE( _pPageFrm || rAnchorFrm.FindPageFrm(),
+ OSL_ENSURE( _pPageFrame || rAnchorFrame.FindPageFrame(),
"<SwObjectFormatter::FormatObj(..)> - missing page frame" );
- const SwPageFrm& rPageFrm = _pPageFrm ? *(_pPageFrm) : *(rAnchorFrm.FindPageFrm());
+ const SwPageFrame& rPageFrame = _pPageFrame ? *(_pPageFrame) : *(rAnchorFrame.FindPageFrame());
// create corresponding object formatter
SwObjectFormatter* pObjFormatter =
- SwObjectFormatter::CreateObjFormatter( rAnchorFrm, rPageFrm, _pLayAction );
+ SwObjectFormatter::CreateObjFormatter( rAnchorFrame, rPageFrame, _pLayAction );
if ( pObjFormatter )
{
@@ -238,18 +238,18 @@ bool SwObjectFormatter::FormatObj( SwAnchoredObject& _rAnchoredObj,
<SwLayAction::FormatLayout(..)>. Thus, its code for the formatting have
to be synchronised.
*/
-void SwObjectFormatter::_FormatLayout( SwLayoutFrm& _rLayoutFrm )
+void SwObjectFormatter::_FormatLayout( SwLayoutFrame& _rLayoutFrame )
{
- _rLayoutFrm.Calc(_rLayoutFrm.getRootFrm()->GetCurrShell()->GetOut());
+ _rLayoutFrame.Calc(_rLayoutFrame.getRootFrame()->GetCurrShell()->GetOut());
- SwFrm* pLowerFrm = _rLayoutFrm.Lower();
- while ( pLowerFrm )
+ SwFrame* pLowerFrame = _rLayoutFrame.Lower();
+ while ( pLowerFrame )
{
- if ( pLowerFrm->IsLayoutFrm() )
+ if ( pLowerFrame->IsLayoutFrame() )
{
- _FormatLayout( *(static_cast<SwLayoutFrm*>(pLowerFrm)) );
+ _FormatLayout( *(static_cast<SwLayoutFrame*>(pLowerFrame)) );
}
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
}
@@ -260,14 +260,14 @@ void SwObjectFormatter::_FormatLayout( SwLayoutFrm& _rLayoutFrm )
*/
void SwObjectFormatter::_FormatObjContent( SwAnchoredObject& _rAnchoredObj )
{
- if ( dynamic_cast<const SwFlyFrm*>( &_rAnchoredObj) == nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( &_rAnchoredObj) == nullptr )
{
// only Writer fly frames have content
return;
}
- SwFlyFrm& rFlyFrm = static_cast<SwFlyFrm&>(_rAnchoredObj);
- SwContentFrm* pContent = rFlyFrm.ContainsContent();
+ SwFlyFrame& rFlyFrame = static_cast<SwFlyFrame&>(_rAnchoredObj);
+ SwContentFrame* pContent = rFlyFrame.ContainsContent();
while ( pContent )
{
@@ -277,18 +277,18 @@ void SwObjectFormatter::_FormatObjContent( SwAnchoredObject& _rAnchoredObj )
// format floating screen objects at content text frame
// #i23129#, #i36347# - pass correct page frame to
// the object formatter
- if ( pContent->IsTextFrm() &&
- !SwObjectFormatter::FormatObjsAtFrm( *pContent,
- *(pContent->FindPageFrm()),
+ if ( pContent->IsTextFrame() &&
+ !SwObjectFormatter::FormatObjsAtFrame( *pContent,
+ *(pContent->FindPageFrame()),
GetLayAction() ) )
{
// restart format with first content
- pContent = rFlyFrm.ContainsContent();
+ pContent = rFlyFrame.ContainsContent();
continue;
}
// continue with next content
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
}
@@ -312,13 +312,13 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
mpPgNumAndTypeOfAnchors->Collect( _rAnchoredObj );
}
- if ( dynamic_cast<const SwFlyFrm*>( &_rAnchoredObj) != nullptr )
+ if ( dynamic_cast<const SwFlyFrame*>( &_rAnchoredObj) != nullptr )
{
- SwFlyFrm& rFlyFrm = static_cast<SwFlyFrm&>(_rAnchoredObj);
+ SwFlyFrame& rFlyFrame = static_cast<SwFlyFrame&>(_rAnchoredObj);
// --> #i34753# - reset flag, which prevents a positioning
- if ( rFlyFrm.IsFlyLayFrm() )
+ if ( rFlyFrame.IsFlyLayFrame() )
{
- static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( false );
+ static_cast<SwFlyLayFrame&>(rFlyFrame).SetNoMakePos( false );
}
// #i81146# new loop control
@@ -328,7 +328,7 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
do {
if ( mpLayAction )
{
- mpLayAction->FormatLayoutFly( &rFlyFrm );
+ mpLayAction->FormatLayoutFly( &rFlyFrame );
// --> consider, if the layout action
// has to be restarted due to a delete of a page frame.
if ( mpLayAction->IsAgain() )
@@ -338,22 +338,22 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
}
else
{
- _FormatLayout( rFlyFrm );
+ _FormatLayout( rFlyFrame );
}
// --> #i34753# - prevent further positioning, if
// to-page|to-fly anchored Writer fly frame is already clipped.
- if ( rFlyFrm.IsFlyLayFrm() && rFlyFrm.IsClipped() )
+ if ( rFlyFrame.IsFlyLayFrame() && rFlyFrame.IsClipped() )
{
- static_cast<SwFlyLayFrm&>(rFlyFrm).SetNoMakePos( true );
+ static_cast<SwFlyLayFrame&>(rFlyFrame).SetNoMakePos( true );
}
// #i23129#, #i36347# - pass correct page frame
// to the object formatter
- SwObjectFormatter::FormatObjsAtFrm( rFlyFrm,
- *(rFlyFrm.FindPageFrm()),
+ SwObjectFormatter::FormatObjsAtFrame( rFlyFrame,
+ *(rFlyFrame.FindPageFrame()),
mpLayAction );
if ( mpLayAction )
{
- mpLayAction->_FormatFlyContent( &rFlyFrm );
+ mpLayAction->_FormatFlyContent( &rFlyFrame );
// --> consider, if the layout action
// has to be restarted due to a delete of a page frame.
if ( mpLayAction->IsAgain() )
@@ -363,21 +363,21 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
}
else
{
- _FormatObjContent( rFlyFrm );
+ _FormatObjContent( rFlyFrame );
}
if ( ++nLoopControlRuns >= nLoopControlMax )
{
OSL_FAIL( "LoopControl in SwObjectFormatter::_FormatObj: Stage 3!!!" );
- rFlyFrm.ValidateThisAndAllLowers( 2 );
+ rFlyFrame.ValidateThisAndAllLowers( 2 );
nLoopControlRuns = 0;
}
// --> #i57917#
// stop formatting of anchored object, if restart of layout process is requested.
- } while ( !rFlyFrm.IsValid() &&
+ } while ( !rFlyFrame.IsValid() &&
!_rAnchoredObj.RestartLayoutProcess() &&
- rFlyFrm.GetAnchorFrm() == &GetAnchorFrm() );
+ rFlyFrame.GetAnchorFrame() == &GetAnchorFrame() );
}
else if ( dynamic_cast<const SwAnchoredDrawObject*>( &_rAnchoredObj) != nullptr )
{
@@ -394,21 +394,21 @@ void SwObjectFormatter::_FormatObj( SwAnchoredObject& _rAnchoredObj )
Thus, the objects, whose anchor character is inside the follow text
frame can be formatted.
*/
-bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
+bool SwObjectFormatter::_FormatObjsAtFrame( SwTextFrame* _pMasterTextFrame )
{
// --> #i26945#
- SwFrm* pAnchorFrm( nullptr );
- if ( GetAnchorFrm().IsTextFrm() &&
- static_cast<SwTextFrm&>(GetAnchorFrm()).IsFollow() &&
- _pMasterTextFrm )
+ SwFrame* pAnchorFrame( nullptr );
+ if ( GetAnchorFrame().IsTextFrame() &&
+ static_cast<SwTextFrame&>(GetAnchorFrame()).IsFollow() &&
+ _pMasterTextFrame )
{
- pAnchorFrm = _pMasterTextFrm;
+ pAnchorFrame = _pMasterTextFrame;
}
else
{
- pAnchorFrm = &GetAnchorFrm();
+ pAnchorFrame = &GetAnchorFrame();
}
- if ( !pAnchorFrm->GetDrawObjs() )
+ if ( !pAnchorFrame->GetDrawObjs() )
{
// nothing to do, if no floating screen object is registered at the anchor frame.
return true;
@@ -416,9 +416,9 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
bool bSuccess( true );
- for ( size_t i = 0; i < pAnchorFrm->GetDrawObjs()->size(); ++i )
+ for ( size_t i = 0; i < pAnchorFrame->GetDrawObjs()->size(); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pAnchorFrm->GetDrawObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*pAnchorFrame->GetDrawObjs())[i];
// check, if object's anchor is on the given page frame or
// object is registered at the given page frame.
@@ -429,24 +429,24 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
// If the anchor follow text frame is in the same body as its 'master'
// text frame, do not format the anchored object.
// E.g., this situation can occur during the table row splitting algorithm.
- SwTextFrm* pAnchorCharFrm = pAnchoredObj->FindAnchorCharFrm();
+ SwTextFrame* pAnchorCharFrame = pAnchoredObj->FindAnchorCharFrame();
const bool bAnchoredAtFollowInSameBodyAsMaster =
- pAnchorCharFrm && pAnchorCharFrm->IsFollow() &&
- pAnchorCharFrm != pAnchoredObj->GetAnchorFrm() &&
- pAnchorCharFrm->FindBodyFrm() ==
- static_cast<SwTextFrm*>(pAnchoredObj->AnchorFrm())->FindBodyFrm();
+ pAnchorCharFrame && pAnchorCharFrame->IsFollow() &&
+ pAnchorCharFrame != pAnchoredObj->GetAnchorFrame() &&
+ pAnchorCharFrame->FindBodyFrame() ==
+ static_cast<SwTextFrame*>(pAnchoredObj->AnchorFrame())->FindBodyFrame();
if ( bAnchoredAtFollowInSameBodyAsMaster )
{
continue;
}
- // #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
- // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // #i33751#, #i34060# - method <GetPageFrameOfAnchor()>
+ // is replaced by method <FindPageFrameOfAnchor()>. It's return value
// have to be checked.
- SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor();
- OSL_ENSURE( pPageFrmOfAnchor,
- "<SwObjectFormatter::_FormatObjsAtFrm()> - missing page frame." );
+ SwPageFrame* pPageFrameOfAnchor = pAnchoredObj->FindPageFrameOfAnchor();
+ OSL_ENSURE( pPageFrameOfAnchor,
+ "<SwObjectFormatter::_FormatObjsAtFrame()> - missing page frame." );
// --> #i26945#
- if ( pPageFrmOfAnchor && pPageFrmOfAnchor == &mrPageFrm )
+ if ( pPageFrameOfAnchor && pPageFrameOfAnchor == &mrPageFrame )
{
// if format of object fails, stop formatting and pass fail to
// calling method via the return value.
@@ -456,18 +456,18 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
break;
}
- // considering changes at <pAnchorFrm->GetDrawObjs()> during
+ // considering changes at <pAnchorFrame->GetDrawObjs()> during
// format of the object.
- if ( !pAnchorFrm->GetDrawObjs() ||
- i > pAnchorFrm->GetDrawObjs()->size() )
+ if ( !pAnchorFrame->GetDrawObjs() ||
+ i > pAnchorFrame->GetDrawObjs()->size() )
{
break;
}
else
{
const size_t nActPosOfObj =
- pAnchorFrm->GetDrawObjs()->ListPosOf( *pAnchoredObj );
- if ( nActPosOfObj == pAnchorFrm->GetDrawObjs()->size() ||
+ pAnchorFrame->GetDrawObjs()->ListPosOf( *pAnchoredObj );
+ if ( nActPosOfObj == pAnchorFrame->GetDrawObjs()->size() ||
nActPosOfObj > i )
{
--i;
@@ -478,7 +478,7 @@ bool SwObjectFormatter::_FormatObjsAtFrm( SwTextFrm* _pMasterTextFrm )
}
}
}
- } // end of loop on <pAnchorFrm->.GetDrawObjs()>
+ } // end of loop on <pAnchorFrame->.GetDrawObjs()>
return bSuccess;
}
diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx
index 10aca0df807f..76e6d1d9c64b 100644
--- a/sw/source/core/layout/objectformatterlayfrm.cxx
+++ b/sw/source/core/layout/objectformatterlayfrm.cxx
@@ -24,53 +24,53 @@
#include <layact.hxx>
-SwObjectFormatterLayFrm::SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm,
- const SwPageFrm& _rPageFrm,
+SwObjectFormatterLayFrame::SwObjectFormatterLayFrame( SwLayoutFrame& _rAnchorLayFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction )
- : SwObjectFormatter( _rPageFrm, _pLayAction ),
- mrAnchorLayFrm( _rAnchorLayFrm )
+ : SwObjectFormatter( _rPageFrame, _pLayAction ),
+ mrAnchorLayFrame( _rAnchorLayFrame )
{
}
-SwObjectFormatterLayFrm::~SwObjectFormatterLayFrm()
+SwObjectFormatterLayFrame::~SwObjectFormatterLayFrame()
{
}
-SwObjectFormatterLayFrm* SwObjectFormatterLayFrm::CreateObjFormatter(
- SwLayoutFrm& _rAnchorLayFrm,
- const SwPageFrm& _rPageFrm,
+SwObjectFormatterLayFrame* SwObjectFormatterLayFrame::CreateObjFormatter(
+ SwLayoutFrame& _rAnchorLayFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction )
{
- if ( !_rAnchorLayFrm.IsPageFrm() &&
- !_rAnchorLayFrm.IsFlyFrm() )
+ if ( !_rAnchorLayFrame.IsPageFrame() &&
+ !_rAnchorLayFrame.IsFlyFrame() )
{
- OSL_FAIL( "<SwObjectFormatterLayFrm::CreateObjFormatter(..)> - unexpected type of anchor frame " );
+ OSL_FAIL( "<SwObjectFormatterLayFrame::CreateObjFormatter(..)> - unexpected type of anchor frame " );
return nullptr;
}
- SwObjectFormatterLayFrm* pObjFormatter = nullptr;
+ SwObjectFormatterLayFrame* pObjFormatter = nullptr;
// create object formatter, if floating screen objects are registered at
// given anchor layout frame.
- if ( _rAnchorLayFrm.GetDrawObjs() ||
- ( _rAnchorLayFrm.IsPageFrm() &&
- static_cast<SwPageFrm&>(_rAnchorLayFrm).GetSortedObjs() ) )
+ if ( _rAnchorLayFrame.GetDrawObjs() ||
+ ( _rAnchorLayFrame.IsPageFrame() &&
+ static_cast<SwPageFrame&>(_rAnchorLayFrame).GetSortedObjs() ) )
{
pObjFormatter =
- new SwObjectFormatterLayFrm( _rAnchorLayFrm, _rPageFrm, _pLayAction );
+ new SwObjectFormatterLayFrame( _rAnchorLayFrame, _rPageFrame, _pLayAction );
}
return pObjFormatter;
}
-SwFrm& SwObjectFormatterLayFrm::GetAnchorFrm()
+SwFrame& SwObjectFormatterLayFrame::GetAnchorFrame()
{
- return mrAnchorLayFrm;
+ return mrAnchorLayFrame;
}
// #i40147# - add parameter <_bCheckForMovedFwd>.
// Not relevant for objects anchored at layout frame.
-bool SwObjectFormatterLayFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
+bool SwObjectFormatterLayFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool )
{
_FormatObj( _rAnchoredObj );
@@ -80,13 +80,13 @@ bool SwObjectFormatterLayFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
return GetLayAction() == nullptr || !GetLayAction()->IsAgain();
}
-bool SwObjectFormatterLayFrm::DoFormatObjs()
+bool SwObjectFormatterLayFrame::DoFormatObjs()
{
bool bSuccess( true );
- bSuccess = _FormatObjsAtFrm();
+ bSuccess = _FormatObjsAtFrame();
- if ( bSuccess && GetAnchorFrm().IsPageFrm() )
+ if ( bSuccess && GetAnchorFrame().IsPageFrame() )
{
// anchor layout frame is a page frame.
// Thus, format also all anchored objects, which are registered at
@@ -104,11 +104,11 @@ bool SwObjectFormatterLayFrm::DoFormatObjs()
OD 2004-07-02 #i28701#
*/
-bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
+bool SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage()
{
- if ( !GetAnchorFrm().IsPageFrm() )
+ if ( !GetAnchorFrame().IsPageFrame() )
{
- OSL_FAIL( "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" );
+ OSL_FAIL( "<SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage()> - mis-usage of method, call only for anchor frames of type page frame" );
return true;
}
@@ -119,9 +119,9 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
return false;
}
- SwPageFrm& rPageFrm = static_cast<SwPageFrm&>(GetAnchorFrm());
+ SwPageFrame& rPageFrame = static_cast<SwPageFrame&>(GetAnchorFrame());
- if ( !rPageFrm.GetSortedObjs() )
+ if ( !rPageFrame.GetSortedObjs() )
{
// nothing to do, if no floating screen object is registered at the anchor frame.
return true;
@@ -129,27 +129,27 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
bool bSuccess( true );
- for ( size_t i = 0; i < rPageFrm.GetSortedObjs()->size(); ++i )
+ for ( size_t i = 0; i < rPageFrame.GetSortedObjs()->size(); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*rPageFrm.GetSortedObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*rPageFrame.GetSortedObjs())[i];
// #i51941# - do not format object, which are anchored
// inside or at fly frame.
- if ( pAnchoredObj->GetAnchorFrm()->FindFlyFrm() )
+ if ( pAnchoredObj->GetAnchorFrame()->FindFlyFrame() )
{
continue;
}
- // #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
- // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // #i33751#, #i34060# - method <GetPageFrameOfAnchor()>
+ // is replaced by method <FindPageFrameOfAnchor()>. It's return value
// have to be checked.
- SwPageFrm* pPageFrmOfAnchor = pAnchoredObj->FindPageFrmOfAnchor();
+ SwPageFrame* pPageFrameOfAnchor = pAnchoredObj->FindPageFrameOfAnchor();
// #i26945# - check, if the page frame of the
// object's anchor frame isn't the given page frame
- OSL_ENSURE( pPageFrmOfAnchor,
- "<SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()> - missing page frame" );
- if ( pPageFrmOfAnchor &&
+ OSL_ENSURE( pPageFrameOfAnchor,
+ "<SwObjectFormatterLayFrame::_AdditionalFormatObjsOnPage()> - missing page frame" );
+ if ( pPageFrameOfAnchor &&
// #i35911#
- pPageFrmOfAnchor->GetPhyPageNum() < rPageFrm.GetPhyPageNum() )
+ pPageFrameOfAnchor->GetPhyPageNum() < rPageFrame.GetPhyPageNum() )
{
// if format of object fails, stop formatting and pass fail to
// calling method via the return value.
@@ -159,18 +159,18 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
break;
}
- // considering changes at <GetAnchorFrm().GetDrawObjs()> during
+ // considering changes at <GetAnchorFrame().GetDrawObjs()> during
// format of the object.
- if ( !rPageFrm.GetSortedObjs() ||
- i > rPageFrm.GetSortedObjs()->size() )
+ if ( !rPageFrame.GetSortedObjs() ||
+ i > rPageFrame.GetSortedObjs()->size() )
{
break;
}
else
{
const size_t nActPosOfObj =
- rPageFrm.GetSortedObjs()->ListPosOf( *pAnchoredObj );
- if ( nActPosOfObj == rPageFrm.GetSortedObjs()->size() ||
+ rPageFrame.GetSortedObjs()->ListPosOf( *pAnchoredObj );
+ if ( nActPosOfObj == rPageFrame.GetSortedObjs()->size() ||
nActPosOfObj > i )
{
--i;
@@ -181,7 +181,7 @@ bool SwObjectFormatterLayFrm::_AdditionalFormatObjsOnPage()
}
}
}
- } // end of loop on <rPageFrm.GetSortedObjs()>
+ } // end of loop on <rPageFrame.GetSortedObjs()>
return bSuccess;
}
diff --git a/sw/source/core/layout/objectformatterlayfrm.hxx b/sw/source/core/layout/objectformatterlayfrm.hxx
index ae86b9cbb5f4..4f0b54cb5a83 100644
--- a/sw/source/core/layout/objectformatterlayfrm.hxx
+++ b/sw/source/core/layout/objectformatterlayfrm.hxx
@@ -21,18 +21,18 @@
#include <objectformatter.hxx>
-class SwLayoutFrm;
+class SwLayoutFrame;
// Format floating screen objects, which are anchored at a given anchor text frame
// and registered at the given page frame.
-class SwObjectFormatterLayFrm : public SwObjectFormatter
+class SwObjectFormatterLayFrame : public SwObjectFormatter
{
private:
// anchor layout frame
- SwLayoutFrm& mrAnchorLayFrm;
+ SwLayoutFrame& mrAnchorLayFrame;
- SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm,
- const SwPageFrm& _rPageFrm,
+ SwObjectFormatterLayFrame( SwLayoutFrame& _rAnchorLayFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction );
/** method to format all anchored objects, which are registered at
@@ -48,10 +48,10 @@ class SwObjectFormatterLayFrm : public SwObjectFormatter
protected:
- virtual SwFrm& GetAnchorFrm() override;
+ virtual SwFrame& GetAnchorFrame() override;
public:
- virtual ~SwObjectFormatterLayFrm();
+ virtual ~SwObjectFormatterLayFrame();
// #i40147# - add parameter <_bCheckForMovedFwd>.
// Not relevant for objects anchored at layout frame.
@@ -59,9 +59,9 @@ class SwObjectFormatterLayFrm : public SwObjectFormatter
const bool _bCheckForMovedFwd = false ) override;
virtual bool DoFormatObjs() override;
- static SwObjectFormatterLayFrm* CreateObjFormatter(
- SwLayoutFrm& _rAnchorLayFrm,
- const SwPageFrm& _rPageFrm,
+ static SwObjectFormatterLayFrame* CreateObjFormatter(
+ SwLayoutFrame& _rAnchorLayFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction );
};
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 436cfcbc7bc8..0c5aa4aa6e10 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -36,78 +36,78 @@ using namespace ::com::sun::star;
class SwForbidFollowFormat
{
private:
- SwTextFrm& mrTextFrm;
+ SwTextFrame& mrTextFrame;
const bool bOldFollowFormatAllowed;
public:
- explicit SwForbidFollowFormat( SwTextFrm& _rTextFrm )
- : mrTextFrm( _rTextFrm ),
- bOldFollowFormatAllowed( _rTextFrm.FollowFormatAllowed() )
+ explicit SwForbidFollowFormat( SwTextFrame& _rTextFrame )
+ : mrTextFrame( _rTextFrame ),
+ bOldFollowFormatAllowed( _rTextFrame.FollowFormatAllowed() )
{
- mrTextFrm.ForbidFollowFormat();
+ mrTextFrame.ForbidFollowFormat();
}
~SwForbidFollowFormat()
{
if ( bOldFollowFormatAllowed )
{
- mrTextFrm.AllowFollowFormat();
+ mrTextFrame.AllowFollowFormat();
}
}
};
-SwObjectFormatterTextFrm::SwObjectFormatterTextFrm( SwTextFrm& _rAnchorTextFrm,
- const SwPageFrm& _rPageFrm,
- SwTextFrm* _pMasterAnchorTextFrm,
+SwObjectFormatterTextFrame::SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame,
+ const SwPageFrame& _rPageFrame,
+ SwTextFrame* _pMasterAnchorTextFrame,
SwLayAction* _pLayAction )
- : SwObjectFormatter( _rPageFrm, _pLayAction, true ),
- mrAnchorTextFrm( _rAnchorTextFrm ),
- mpMasterAnchorTextFrm( _pMasterAnchorTextFrm )
+ : SwObjectFormatter( _rPageFrame, _pLayAction, true ),
+ mrAnchorTextFrame( _rAnchorTextFrame ),
+ mpMasterAnchorTextFrame( _pMasterAnchorTextFrame )
{
}
-SwObjectFormatterTextFrm::~SwObjectFormatterTextFrm()
+SwObjectFormatterTextFrame::~SwObjectFormatterTextFrame()
{
}
-SwObjectFormatterTextFrm* SwObjectFormatterTextFrm::CreateObjFormatter(
- SwTextFrm& _rAnchorTextFrm,
- const SwPageFrm& _rPageFrm,
+SwObjectFormatterTextFrame* SwObjectFormatterTextFrame::CreateObjFormatter(
+ SwTextFrame& _rAnchorTextFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction )
{
- SwObjectFormatterTextFrm* pObjFormatter = nullptr;
+ SwObjectFormatterTextFrame* pObjFormatter = nullptr;
- // determine 'master' of <_rAnchorTextFrm>, if anchor frame is a follow text frame.
- SwTextFrm* pMasterOfAnchorFrm = nullptr;
- if ( _rAnchorTextFrm.IsFollow() )
+ // determine 'master' of <_rAnchorTextFrame>, if anchor frame is a follow text frame.
+ SwTextFrame* pMasterOfAnchorFrame = nullptr;
+ if ( _rAnchorTextFrame.IsFollow() )
{
- pMasterOfAnchorFrm = _rAnchorTextFrm.FindMaster();
- while ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->IsFollow() )
+ pMasterOfAnchorFrame = _rAnchorTextFrame.FindMaster();
+ while ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->IsFollow() )
{
- pMasterOfAnchorFrm = pMasterOfAnchorFrm->FindMaster();
+ pMasterOfAnchorFrame = pMasterOfAnchorFrame->FindMaster();
}
}
// create object formatter, if floating screen objects are registered
// at anchor frame (or at 'master' anchor frame)
- if ( _rAnchorTextFrm.GetDrawObjs() ||
- ( pMasterOfAnchorFrm && pMasterOfAnchorFrm->GetDrawObjs() ) )
+ if ( _rAnchorTextFrame.GetDrawObjs() ||
+ ( pMasterOfAnchorFrame && pMasterOfAnchorFrame->GetDrawObjs() ) )
{
pObjFormatter =
- new SwObjectFormatterTextFrm( _rAnchorTextFrm, _rPageFrm,
- pMasterOfAnchorFrm, _pLayAction );
+ new SwObjectFormatterTextFrame( _rAnchorTextFrame, _rPageFrame,
+ pMasterOfAnchorFrame, _pLayAction );
}
return pObjFormatter;
}
-SwFrm& SwObjectFormatterTextFrm::GetAnchorFrm()
+SwFrame& SwObjectFormatterTextFrame::GetAnchorFrame()
{
- return mrAnchorTextFrm;
+ return mrAnchorTextFrame;
}
// #i40147# - add parameter <_bCheckForMovedFwd>.
-bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
+bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool _bCheckForMovedFwd )
{
// check, if only as-character anchored object have to be formatted, and
@@ -148,7 +148,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool bRestart =
_rAnchoredObj.RestartLayoutProcess() &&
!( _rAnchoredObj.PositionLocked() &&
- _rAnchoredObj.GetAnchorFrm()->IsInFly() &&
+ _rAnchoredObj.GetAnchorFrame()->IsInFly() &&
_rAnchoredObj.GetFrameFormat().GetFollowTextFlow().GetValue() );
if ( bRestart )
{
@@ -165,7 +165,7 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// whose the check of a moved forward anchor frame is requested.
// revise decision made for i3317:
// anchored objects, whose wrapping style influence is temporarly considered,
- // have to be considered in method <SwObjectFormatterTextFrm::DoFormatObjs()>
+ // have to be considered in method <SwObjectFormatterTextFrame::DoFormatObjs()>
if ( bSuccess &&
_rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() &&
( _bCheckForMovedFwd ||
@@ -178,11 +178,11 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// #i26945# - check conditions for move forward of
// anchor text frame
// determine, if anchor text frame has previous frame
- const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr );
+ const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr );
// #i40141# - use new method - it also formats the
// section the anchor frame is in.
- _FormatAnchorFrmForCheckMoveFwd();
+ _FormatAnchorFrameForCheckMoveFwd();
// #i35911#
if ( _rAnchoredObj.HasClearedEnvironment() )
@@ -190,49 +190,49 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
_rAnchoredObj.SetClearedEnvironment( true );
// #i44049# - consider, that anchor frame
// could already been marked to move forward.
- SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() );
- if ( pAnchorPageFrm != _rAnchoredObj.GetPageFrm() )
+ SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() );
+ if ( pAnchorPageFrame != _rAnchoredObj.GetPageFrame() )
{
bool bInsert( true );
sal_uInt32 nToPageNum( 0L );
- const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc());
- if ( SwLayouter::FrmMovedFwdByObjPos(
- rDoc, mrAnchorTextFrm, nToPageNum ) )
+ const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc());
+ if ( SwLayouter::FrameMovedFwdByObjPos(
+ rDoc, mrAnchorTextFrame, nToPageNum ) )
{
- if ( nToPageNum < pAnchorPageFrm->GetPhyPageNum() )
- SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm );
+ if ( nToPageNum < pAnchorPageFrame->GetPhyPageNum() )
+ SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
else
bInsert = false;
}
if ( bInsert )
{
- SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm,
- pAnchorPageFrm->GetPhyPageNum() );
- mrAnchorTextFrm.InvalidatePos();
+ SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame,
+ pAnchorPageFrame->GetPhyPageNum() );
+ mrAnchorTextFrame.InvalidatePos();
bSuccess = false;
_InvalidatePrevObjs( _rAnchoredObj );
_InvalidateFollowObjs( _rAnchoredObj, true );
}
else
{
- OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" );
+ OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" );
}
}
}
- else if ( !mrAnchorTextFrm.IsFollow() && bDoesAnchorHadPrev )
+ else if ( !mrAnchorTextFrame.IsFollow() && bDoesAnchorHadPrev )
{
// index of anchored object in collection of page numbers and
// anchor types
sal_uInt32 nIdx( CountOfCollected() );
OSL_ENSURE( nIdx > 0,
- "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchored object not collected!?" );
+ "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchored object not collected!?" );
--nIdx;
sal_uInt32 nToPageNum( 0L );
// #i43913#
bool bDummy( false );
// #i58182# - consider new method signature
- if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( nIdx ),
+ if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( nIdx ),
GetPgNumOfCollected( nIdx ),
IsCollectedAnchoredAtMaster( nIdx ),
nToPageNum, bDummy ) )
@@ -241,12 +241,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// could already been marked to move forward.
bool bInsert( true );
sal_uInt32 nMovedFwdToPageNum( 0L );
- const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc());
- if ( SwLayouter::FrmMovedFwdByObjPos(
- rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) )
+ const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc());
+ if ( SwLayouter::FrameMovedFwdByObjPos(
+ rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) )
{
if ( nMovedFwdToPageNum < nToPageNum )
- SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm );
+ SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
else
bInsert = false;
}
@@ -254,9 +254,9 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
{
// Indicate that anchor text frame has to move forward and
// invalidate its position to force a re-format.
- SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm,
+ SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame,
nToPageNum );
- mrAnchorTextFrm.InvalidatePos();
+ mrAnchorTextFrame.InvalidatePos();
// Indicate restart of the layout process
bSuccess = false;
@@ -271,19 +271,19 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
}
else
{
- OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObj(..)> - anchor frame not marked to move forward" );
+ OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObj(..)> - anchor frame not marked to move forward" );
}
}
}
// i40155# - mark anchor frame not to wrap around
// objects under the condition, that its follow contains all its text.
- else if ( !mrAnchorTextFrm.IsFollow() &&
- mrAnchorTextFrm.GetFollow() &&
- mrAnchorTextFrm.GetFollow()->GetOfst() == 0 )
+ else if ( !mrAnchorTextFrame.IsFollow() &&
+ mrAnchorTextFrame.GetFollow() &&
+ mrAnchorTextFrame.GetFollow()->GetOfst() == 0 )
{
- SwLayouter::RemoveMovedFwdFrm(
- *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()),
- mrAnchorTextFrm );
+ SwLayouter::RemoveMovedFwdFrame(
+ *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()),
+ mrAnchorTextFrame );
}
}
}
@@ -291,12 +291,12 @@ bool SwObjectFormatterTextFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
return bSuccess;
}
-bool SwObjectFormatterTextFrm::DoFormatObjs()
+bool SwObjectFormatterTextFrame::DoFormatObjs()
{
- if ( !mrAnchorTextFrm.IsValid() )
+ if ( !mrAnchorTextFrame.IsValid() )
{
if ( GetLayAction() &&
- mrAnchorTextFrm.FindPageFrm() != &GetPageFrm() )
+ mrAnchorTextFrame.FindPageFrame() != &GetPageFrame() )
{
// notify layout action, thus is can restart the layout process on
// a previous page.
@@ -305,7 +305,7 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
else
{
// the anchor text frame has to be valid, thus assert.
- OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs()> called for invalidate anchor text frame." );
+ OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs()> called for invalidate anchor text frame." );
}
return false;
@@ -313,37 +313,37 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
bool bSuccess( true );
- if ( mrAnchorTextFrm.IsFollow() )
+ if ( mrAnchorTextFrame.IsFollow() )
{
// Only floating screen objects anchored as-character are directly
// registered at a follow text frame. The other floating screen objects
// are registered at the 'master' anchor text frame.
// Thus, format the other floating screen objects through the 'master'
// anchor text frame
- OSL_ENSURE( mpMasterAnchorTextFrm,
- "SwObjectFormatterTextFrm::DoFormatObjs() - missing 'master' anchor text frame" );
- bSuccess = _FormatObjsAtFrm( mpMasterAnchorTextFrm );
+ OSL_ENSURE( mpMasterAnchorTextFrame,
+ "SwObjectFormatterTextFrame::DoFormatObjs() - missing 'master' anchor text frame" );
+ bSuccess = _FormatObjsAtFrame( mpMasterAnchorTextFrame );
if ( bSuccess )
{
// format of as-character anchored floating screen objects - no failure
// excepted on the format of these objects.
- bSuccess = _FormatObjsAtFrm();
+ bSuccess = _FormatObjsAtFrame();
}
}
else
{
- bSuccess = _FormatObjsAtFrm();
+ bSuccess = _FormatObjsAtFrame();
}
// consider anchored objects, whose wrapping style influence are temporarly
// considered.
if ( bSuccess &&
( ConsiderWrapOnObjPos() ||
- ( !mrAnchorTextFrm.IsFollow() &&
+ ( !mrAnchorTextFrame.IsFollow() &&
_AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) )
{
- const bool bDoesAnchorHadPrev = ( mrAnchorTextFrm.GetIndPrev() != nullptr );
+ const bool bDoesAnchorHadPrev = ( mrAnchorTextFrame.GetIndPrev() != nullptr );
// Format anchor text frame after its objects are formatted.
// Note: The format of the anchor frame also formats the invalid
@@ -352,13 +352,13 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
// anchor frame for the following check for moved forward anchors
// #i40141# - use new method - it also formats the
// section the anchor frame is in.
- _FormatAnchorFrmForCheckMoveFwd();
+ _FormatAnchorFrameForCheckMoveFwd();
sal_uInt32 nToPageNum( 0L );
// #i43913#
bool bInFollow( false );
SwAnchoredObject* pObj = nullptr;
- if ( !mrAnchorTextFrm.IsFollow() )
+ if ( !mrAnchorTextFrame.IsFollow() )
{
pObj = _GetFirstObjWithMovedFwdAnchor(
// #i35017# - constant name has changed
@@ -371,35 +371,35 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
pObj->SetClearedEnvironment( true );
// #i44049# - consider, that anchor frame
// could already been marked to move forward.
- SwPageFrm* pAnchorPageFrm( mrAnchorTextFrm.FindPageFrm() );
+ SwPageFrame* pAnchorPageFrame( mrAnchorTextFrame.FindPageFrame() );
// #i43913# - consider, that anchor frame
// is a follow or is in a follow row, which will move forward.
- if ( pAnchorPageFrm != pObj->GetPageFrm() ||
+ if ( pAnchorPageFrame != pObj->GetPageFrame() ||
bInFollow )
{
bool bInsert( true );
sal_uInt32 nTmpToPageNum( 0L );
- const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc());
- if ( SwLayouter::FrmMovedFwdByObjPos(
- rDoc, mrAnchorTextFrm, nTmpToPageNum ) )
+ const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc());
+ if ( SwLayouter::FrameMovedFwdByObjPos(
+ rDoc, mrAnchorTextFrame, nTmpToPageNum ) )
{
- if ( nTmpToPageNum < pAnchorPageFrm->GetPhyPageNum() )
- SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm );
+ if ( nTmpToPageNum < pAnchorPageFrame->GetPhyPageNum() )
+ SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
else
bInsert = false;
}
if ( bInsert )
{
- SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm,
- pAnchorPageFrm->GetPhyPageNum() );
- mrAnchorTextFrm.InvalidatePos();
+ SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame,
+ pAnchorPageFrame->GetPhyPageNum() );
+ mrAnchorTextFrame.InvalidatePos();
bSuccess = false;
_InvalidatePrevObjs( *pObj );
_InvalidateFollowObjs( *pObj, true );
}
else
{
- OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" );
+ OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" );
}
}
}
@@ -411,12 +411,12 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
// could already been marked to move forward.
bool bInsert( true );
sal_uInt32 nMovedFwdToPageNum( 0L );
- const SwDoc& rDoc = *(GetPageFrm().GetFormat()->GetDoc());
- if ( SwLayouter::FrmMovedFwdByObjPos(
- rDoc, mrAnchorTextFrm, nMovedFwdToPageNum ) )
+ const SwDoc& rDoc = *(GetPageFrame().GetFormat()->GetDoc());
+ if ( SwLayouter::FrameMovedFwdByObjPos(
+ rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) )
{
if ( nMovedFwdToPageNum < nToPageNum )
- SwLayouter::RemoveMovedFwdFrm( rDoc, mrAnchorTextFrm );
+ SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
else
bInsert = false;
}
@@ -424,8 +424,8 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
{
// Indicate that anchor text frame has to move forward and
// invalidate its position to force a re-format.
- SwLayouter::InsertMovedFwdFrm( rDoc, mrAnchorTextFrm, nToPageNum );
- mrAnchorTextFrm.InvalidatePos();
+ SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame, nToPageNum );
+ mrAnchorTextFrame.InvalidatePos();
// Indicate restart of the layout process
bSuccess = false;
@@ -440,25 +440,25 @@ bool SwObjectFormatterTextFrm::DoFormatObjs()
}
else
{
- OSL_FAIL( "<SwObjectFormatterTextFrm::DoFormatObjs(..)> - anchor frame not marked to move forward" );
+ OSL_FAIL( "<SwObjectFormatterTextFrame::DoFormatObjs(..)> - anchor frame not marked to move forward" );
}
}
// #i40155# - mark anchor frame not to wrap around
// objects under the condition, that its follow contains all its text.
- else if ( !mrAnchorTextFrm.IsFollow() &&
- mrAnchorTextFrm.GetFollow() &&
- mrAnchorTextFrm.GetFollow()->GetOfst() == 0 )
+ else if ( !mrAnchorTextFrame.IsFollow() &&
+ mrAnchorTextFrame.GetFollow() &&
+ mrAnchorTextFrame.GetFollow()->GetOfst() == 0 )
{
- SwLayouter::RemoveMovedFwdFrm(
- *(mrAnchorTextFrm.FindPageFrm()->GetFormat()->GetDoc()),
- mrAnchorTextFrm );
+ SwLayouter::RemoveMovedFwdFrame(
+ *(mrAnchorTextFrame.FindPageFrame()->GetFormat()->GetDoc()),
+ mrAnchorTextFrame );
}
}
return bSuccess;
}
-void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj )
+void SwObjectFormatterTextFrame::_InvalidatePrevObjs( SwAnchoredObject& _rAnchoredObj )
{
// invalidate all previous objects, whose wrapping influence on the object
// positioning is <NONE_CONCURRENT_POSITIONED>.
@@ -469,7 +469,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored
// #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_CONCURRENT )
{
- const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs();
+ const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs();
if ( pObjs )
{
// determine start index
@@ -491,7 +491,7 @@ void SwObjectFormatterTextFrm::_InvalidatePrevObjs( SwAnchoredObject& _rAnchored
}
}
-void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj,
+void SwObjectFormatterTextFrame::_InvalidateFollowObjs( SwAnchoredObject& _rAnchoredObj,
const bool _bInclObj )
{
if ( _bInclObj )
@@ -499,7 +499,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor
_rAnchoredObj.InvalidateObjPosForConsiderWrapInfluence( true );
}
- const SwSortedObjs* pObjs = GetPageFrm().GetSortedObjs();
+ const SwSortedObjs* pObjs = GetPageFrame().GetSortedObjs();
if ( pObjs )
{
// determine start index
@@ -511,7 +511,7 @@ void SwObjectFormatterTextFrm::_InvalidateFollowObjs( SwAnchoredObject& _rAnchor
}
}
-SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(
+SwAnchoredObject* SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor(
const sal_Int16 _nWrapInfluenceOnPosition,
sal_uInt32& _noToPageNum,
bool& _boInFollow )
@@ -519,7 +519,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(
// #i35017# - constant names have changed
OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
_nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_CONCURRENT,
- "<SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" );
+ "<SwObjectFormatterTextFrame::_GetFirstObjWithMovedFwdAnchor(..)> - invalid value for parameter <_nWrapInfluenceOnPosition>" );
SwAnchoredObject* pRetAnchoredObj = nullptr;
@@ -535,7 +535,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(
// #i26945# - use new method <_CheckMovedFwdCondition(..)>
// #i43913#
// #i58182# - consider new method signature
- if ( SwObjectFormatterTextFrm::CheckMovedFwdCondition( *GetCollectedObj( i ),
+ if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( i ),
GetPgNumOfCollected( i ),
IsCollectedAnchoredAtMaster( i ),
_noToPageNum, _boInFollow ) )
@@ -551,7 +551,7 @@ SwAnchoredObject* SwObjectFormatterTextFrm::_GetFirstObjWithMovedFwdAnchor(
// #i58182#
// - replace private method by corresponding static public method
-bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
+bool SwObjectFormatterTextFrame::CheckMovedFwdCondition(
SwAnchoredObject& _rAnchoredObj,
const sal_uInt32 _nFromPageNum,
const bool _bAnchoredAtMasterBeforeFormatAnchor,
@@ -560,10 +560,10 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
{
bool bAnchorIsMovedForward( false );
- SwPageFrm* pPageFrmOfAnchor = _rAnchoredObj.FindPageFrmOfAnchor();
- if ( pPageFrmOfAnchor )
+ SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor();
+ if ( pPageFrameOfAnchor )
{
- const sal_uInt32 nPageNum = pPageFrmOfAnchor->GetPhyPageNum();
+ const sal_uInt32 nPageNum = pPageFrameOfAnchor->GetPhyPageNum();
if ( nPageNum > _nFromPageNum )
{
_noToPageNum = nPageNum;
@@ -575,9 +575,9 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
// than 1.
if ( _noToPageNum > (_nFromPageNum + 1) )
{
- SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos();
- if ( pAnchorFrm->IsInTab() &&
- pAnchorFrm->IsInFollowFlowRow() )
+ SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos();
+ if ( pAnchorFrame->IsInTab() &&
+ pAnchorFrame->IsInFollowFlowRow() )
{
_noToPageNum = _nFromPageNum + 1;
}
@@ -595,20 +595,20 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
((_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_CHAR) ||
(_rAnchoredObj.GetFrameFormat().GetAnchor().GetAnchorId() == FLY_AT_PARA)))
{
- SwFrm* pAnchorFrm = _rAnchoredObj.GetAnchorFrmContainingAnchPos();
- OSL_ENSURE( pAnchorFrm->IsTextFrm(),
- "<SwObjectFormatterTextFrm::CheckMovedFwdCondition(..) - wrong type of anchor frame>" );
- SwTextFrm* pAnchorTextFrm = static_cast<SwTextFrm*>(pAnchorFrm);
+ SwFrame* pAnchorFrame = _rAnchoredObj.GetAnchorFrameContainingAnchPos();
+ OSL_ENSURE( pAnchorFrame->IsTextFrame(),
+ "<SwObjectFormatterTextFrame::CheckMovedFwdCondition(..) - wrong type of anchor frame>" );
+ SwTextFrame* pAnchorTextFrame = static_cast<SwTextFrame*>(pAnchorFrame);
bool bCheck( false );
- if ( pAnchorTextFrm->IsFollow() )
+ if ( pAnchorTextFrame->IsFollow() )
{
bCheck = true;
}
- else if( pAnchorTextFrm->IsInTab() )
+ else if( pAnchorTextFrame->IsInTab() )
{
- const SwRowFrm* pMasterRow = pAnchorTextFrm->IsInFollowFlowRow();
+ const SwRowFrame* pMasterRow = pAnchorTextFrame->IsInFollowFlowRow();
if ( pMasterRow &&
- pMasterRow->FindPageFrm() == pPageFrmOfAnchor )
+ pMasterRow->FindPageFrame() == pPageFrameOfAnchor )
{
bCheck = true;
}
@@ -617,12 +617,12 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
{
// check, if found text frame will be on the next page
// by checking, if it's in a column, which has no next.
- SwFrm* pColFrm = pAnchorTextFrm->FindColFrm();
- while ( pColFrm && !pColFrm->GetNext() )
+ SwFrame* pColFrame = pAnchorTextFrame->FindColFrame();
+ while ( pColFrame && !pColFrame->GetNext() )
{
- pColFrm = pColFrm->FindColFrm();
+ pColFrame = pColFrame->FindColFrame();
}
- if ( !pColFrm || !pColFrm->GetNext() )
+ if ( !pColFrame || !pColFrame->GetNext() )
{
_noToPageNum = _nFromPageNum + 1;
bAnchorIsMovedForward = true;
@@ -636,26 +636,26 @@ bool SwObjectFormatterTextFrm::CheckMovedFwdCondition(
}
// #i40140# - helper method to format layout frames used by
-// method <SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd()>
+// method <SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd()>
// #i44049# - format till a certain lower frame, if provided.
-static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm,
- SwFrm* pLastLowerFrm = nullptr )
+static void lcl_FormatContentOfLayoutFrame( SwLayoutFrame* pLayFrame,
+ SwFrame* pLastLowerFrame = nullptr )
{
- SwFrm* pLowerFrm = pLayFrm->GetLower();
- while ( pLowerFrm )
+ SwFrame* pLowerFrame = pLayFrame->GetLower();
+ while ( pLowerFrame )
{
// #i44049#
- if ( pLastLowerFrm && pLowerFrm == pLastLowerFrm )
+ if ( pLastLowerFrame && pLowerFrame == pLastLowerFrame )
{
break;
}
- if ( pLowerFrm->IsLayoutFrm() )
- lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pLowerFrm),
- pLastLowerFrm );
+ if ( pLowerFrame->IsLayoutFrame() )
+ lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pLowerFrame),
+ pLastLowerFrame );
else
- pLowerFrm->Calc(pLowerFrm->getRootFrm()->GetCurrShell()->GetOut());
+ pLowerFrame->Calc(pLowerFrame->getRootFrame()->GetCurrShell()->GetOut());
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
}
@@ -667,90 +667,90 @@ static void lcl_FormatContentOfLayoutFrm( SwLayoutFrm* pLayFrm,
to format the frames, which have become invalid due to the anchored
object formatting in the iterative object positioning algorithm
*/
-void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTextFrm )
+void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame )
{
// #i47014# - no format of section and previous columns
// for follow text frames.
- if ( !_rAnchorTextFrm.IsFollow() )
+ if ( !_rAnchorTextFrame.IsFollow() )
{
// if anchor frame is directly inside a section, format this section and
// its previous frames.
// Note: It's a very simple format without formatting objects.
- if ( _rAnchorTextFrm.IsInSct() )
+ if ( _rAnchorTextFrame.IsInSct() )
{
- SwFrm* pSectFrm = _rAnchorTextFrm.GetUpper();
- while ( pSectFrm )
+ SwFrame* pSectFrame = _rAnchorTextFrame.GetUpper();
+ while ( pSectFrame )
{
- if ( pSectFrm->IsSctFrm() || pSectFrm->IsCellFrm() )
+ if ( pSectFrame->IsSctFrame() || pSectFrame->IsCellFrame() )
{
break;
}
- pSectFrm = pSectFrm->GetUpper();
+ pSectFrame = pSectFrame->GetUpper();
}
- if ( pSectFrm && pSectFrm->IsSctFrm() )
+ if ( pSectFrame && pSectFrame->IsSctFrame() )
{
// #i44049#
- _rAnchorTextFrm.LockJoin();
- SwFrm* pFrm = pSectFrm->GetUpper()->GetLower();
+ _rAnchorTextFrame.LockJoin();
+ SwFrame* pFrame = pSectFrame->GetUpper()->GetLower();
// #i49605# - section frame could move forward
// by the format of its previous frame.
- // Thus, check for valid <pFrm>.
- while ( pFrm && pFrm != pSectFrm )
+ // Thus, check for valid <pFrame>.
+ while ( pFrame && pFrame != pSectFrame )
{
- if ( pFrm->IsLayoutFrm() )
- lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) );
+ if ( pFrame->IsLayoutFrame() )
+ lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) );
else
- pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut());
+ pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut());
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
- lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pSectFrm),
- &_rAnchorTextFrm );
+ lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pSectFrame),
+ &_rAnchorTextFrame );
// #i44049#
- _rAnchorTextFrm.UnlockJoin();
+ _rAnchorTextFrame.UnlockJoin();
}
}
// #i40140# - if anchor frame is inside a column,
// format the content of the previous columns.
// Note: It's a very simple format without formatting objects.
- SwFrm* pColFrmOfAnchor = _rAnchorTextFrm.FindColFrm();
- if ( pColFrmOfAnchor )
+ SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame();
+ if ( pColFrameOfAnchor )
{
// #i44049#
- _rAnchorTextFrm.LockJoin();
- SwFrm* pColFrm = pColFrmOfAnchor->GetUpper()->GetLower();
- while ( pColFrm != pColFrmOfAnchor )
+ _rAnchorTextFrame.LockJoin();
+ SwFrame* pColFrame = pColFrameOfAnchor->GetUpper()->GetLower();
+ while ( pColFrame != pColFrameOfAnchor )
{
- SwFrm* pFrm = pColFrm->GetLower();
- while ( pFrm )
+ SwFrame* pFrame = pColFrame->GetLower();
+ while ( pFrame )
{
- if ( pFrm->IsLayoutFrm() )
- lcl_FormatContentOfLayoutFrm( static_cast<SwLayoutFrm*>(pFrm) );
+ if ( pFrame->IsLayoutFrame() )
+ lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) );
else
- pFrm->Calc(pFrm->getRootFrm()->GetCurrShell()->GetOut());
+ pFrame->Calc(pFrame->getRootFrame()->GetCurrShell()->GetOut());
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
- pColFrm = pColFrm->GetNext();
+ pColFrame = pColFrame->GetNext();
}
// #i44049#
- _rAnchorTextFrm.UnlockJoin();
+ _rAnchorTextFrame.UnlockJoin();
}
}
// format anchor frame - format of its follow not needed
// #i43255# - forbid follow format, only if anchor text
// frame is in table
- if ( _rAnchorTextFrm.IsInTab() )
+ if ( _rAnchorTextFrame.IsInTab() )
{
- SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrm );
- _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut());
+ SwForbidFollowFormat aForbidFollowFormat( _rAnchorTextFrame );
+ _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut());
}
else
{
- _rAnchorTextFrm.Calc(_rAnchorTextFrm.getRootFrm()->GetCurrShell()->GetOut());
+ _rAnchorTextFrame.Calc(_rAnchorTextFrame.getRootFrame()->GetCurrShell()->GetOut());
}
}
@@ -758,19 +758,19 @@ void SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTe
#i40141#
*/
-void SwObjectFormatterTextFrm::_FormatAnchorFrmForCheckMoveFwd()
+void SwObjectFormatterTextFrame::_FormatAnchorFrameForCheckMoveFwd()
{
- SwObjectFormatterTextFrm::FormatAnchorFrmAndItsPrevs( mrAnchorTextFrm );
+ SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( mrAnchorTextFrame );
}
/** method to determine if at least one anchored object has state
<temporarly consider wrapping style influence> set.
*/
-bool SwObjectFormatterTextFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence()
+bool SwObjectFormatterTextFrame::_AtLeastOneObjIsTmpConsiderWrapInfluence()
{
bool bRet( false );
- const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs();
+ const SwSortedObjs* pObjs = GetAnchorFrame().GetDrawObjs();
if ( pObjs && pObjs->size() > 1 )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx
index 06d65f9e3db7..8220e60b92c3 100644
--- a/sw/source/core/layout/objectformattertxtfrm.hxx
+++ b/sw/source/core/layout/objectformattertxtfrm.hxx
@@ -22,23 +22,23 @@
#include <objectformatter.hxx>
#include <sal/types.h>
-class SwTextFrm;
+class SwTextFrame;
// #i28701#
// Format floating screen objects, which are anchored at a given anchor text frame
// and registered at the given page frame.
-class SwObjectFormatterTextFrm : public SwObjectFormatter
+class SwObjectFormatterTextFrame : public SwObjectFormatter
{
private:
// anchor text frame
- SwTextFrm& mrAnchorTextFrm;
+ SwTextFrame& mrAnchorTextFrame;
// 'master' anchor text frame
- SwTextFrm* mpMasterAnchorTextFrm;
+ SwTextFrame* mpMasterAnchorTextFrame;
- SwObjectFormatterTextFrm( SwTextFrm& _rAnchorTextFrm,
- const SwPageFrm& _rPageFrm,
- SwTextFrm* _pMasterAnchorTextFrm,
+ SwObjectFormatterTextFrame( SwTextFrame& _rAnchorTextFrame,
+ const SwPageFrame& _rPageFrame,
+ SwTextFrame* _pMasterAnchorTextFrame,
SwLayAction* _pLayAction );
/** method to invalidate objects, anchored previous to given object at
@@ -107,7 +107,7 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter
#i40141#
*/
- void _FormatAnchorFrmForCheckMoveFwd();
+ void _FormatAnchorFrameForCheckMoveFwd();
/** method to determine if at least one anchored object has state
<temporarly consider wrapping style influence> set.
@@ -116,22 +116,22 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter
protected:
- virtual SwFrm& GetAnchorFrm() override;
+ virtual SwFrame& GetAnchorFrame() override;
public:
- virtual ~SwObjectFormatterTextFrm();
+ virtual ~SwObjectFormatterTextFrame();
// #i40147# - add parameter <_bCheckForMovedFwd>.
virtual bool DoFormatObj( SwAnchoredObject& _rAnchoredObj,
const bool _bCheckForMovedFwd = false ) override;
virtual bool DoFormatObjs() override;
- /** method to create an instance of <SwObjectFormatterTextFrm> is
+ /** method to create an instance of <SwObjectFormatterTextFrame> is
necessary.
*/
- static SwObjectFormatterTextFrm* CreateObjFormatter(
- SwTextFrm& _rAnchorTextFrm,
- const SwPageFrm& _rPageFrm,
+ static SwObjectFormatterTextFrame* CreateObjFormatter(
+ SwTextFrame& _rAnchorTextFrame,
+ const SwPageFrame& _rPageFrame,
SwLayAction* _pLayAction );
/** method to format given anchor text frame and its previous frames
@@ -142,11 +142,11 @@ class SwObjectFormatterTextFrm : public SwObjectFormatter
to format the frames, which have become invalid due to the anchored
object formatting in the iterative object positioning algorithm
- @param _rAnchorTextFrm
+ @param _rAnchorTextFrame
input parameter - reference to anchor text frame, which has to be
formatted including its previous frames of the page.
*/
- static void FormatAnchorFrmAndItsPrevs( SwTextFrm& _rAnchorTextFrm );
+ static void FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAnchorTextFrame );
/** method to check the conditions, if 'anchor is moved forward'
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 60ad4dde4908..34adb7a7ea4f 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -60,13 +60,13 @@
using namespace ::com::sun::star;
-SwBodyFrm::SwBodyFrm( SwFrameFormat *pFormat, SwFrm* pSib ):
- SwLayoutFrm( pFormat, pSib )
+SwBodyFrame::SwBodyFrame( SwFrameFormat *pFormat, SwFrame* pSib ):
+ SwLayoutFrame( pFormat, pSib )
{
- mnFrmType = FRM_BODY;
+ mnFrameType = FRM_BODY;
}
-void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
+void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
// Formatting of the body is too simple, thus, it gets its own format method.
// Borders etc. are not taken into account here.
@@ -78,38 +78,38 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
{
SwTwips nHeight = GetUpper()->Prt().Height();
SwTwips nWidth = GetUpper()->Prt().Width();
- const SwFrm *pFrm = GetUpper()->Lower();
+ const SwFrame *pFrame = GetUpper()->Lower();
do
{
- if ( pFrm != this )
+ if ( pFrame != this )
{
- if( pFrm->IsVertical() )
- nWidth -= pFrm->Frm().Width();
+ if( pFrame->IsVertical() )
+ nWidth -= pFrame->Frame().Width();
else
- nHeight -= pFrm->Frm().Height();
+ nHeight -= pFrame->Frame().Height();
}
- pFrm = pFrm->GetNext();
- } while ( pFrm );
+ pFrame = pFrame->GetNext();
+ } while ( pFrame );
if ( nHeight < 0 )
nHeight = 0;
- Frm().Height( nHeight );
+ Frame().Height( nHeight );
- if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frm().Width() )
- Frm().Pos().setX(Frm().Pos().getX() + Frm().Width() - nWidth);
- Frm().Width( nWidth );
+ if( IsVertical() && !IsVertLR() && !IsReverse() && nWidth != Frame().Width() )
+ Frame().Pos().setX(Frame().Pos().getX() + Frame().Width() - nWidth);
+ Frame().Width( nWidth );
}
bool bNoGrid = true;
- if( GetUpper()->IsPageFrm() && static_cast<SwPageFrm*>(GetUpper())->HasGrid() )
+ if( GetUpper()->IsPageFrame() && static_cast<SwPageFrame*>(GetUpper())->HasGrid() )
{
SwTextGridItem const*const pGrid(
- GetGridItem(static_cast<SwPageFrm*>(GetUpper())));
+ GetGridItem(static_cast<SwPageFrame*>(GetUpper())));
if( pGrid )
{
bNoGrid = false;
long nSum = pGrid->GetBaseHeight() + pGrid->GetRubyHeight();
SWRECTFN( this )
- long nSize = (Frm().*fnRect->fnGetWidth)();
+ long nSize = (Frame().*fnRect->fnGetWidth)();
long nBorder = 0;
if( GRID_LINES_CHARS == pGrid->GetGridType() )
{
@@ -123,7 +123,7 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
(Prt().*fnRect->fnSetWidth)( nSize );
// Height of body frame:
- nBorder = (Frm().*fnRect->fnGetHeight)();
+ nBorder = (Frame().*fnRect->fnGetHeight)();
// Number of possible lines in area of body frame:
long nNumberOfLines = nBorder / nSum;
@@ -136,7 +136,7 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
nBorder /= 2;
// #i21774# Footnotes and centering the grid does not work together:
- const bool bAdjust = static_cast<SwPageFrm*>(GetUpper())->GetFormat()->GetDoc()->
+ const bool bAdjust = static_cast<SwPageFrame*>(GetUpper())->GetFormat()->GetDoc()->
GetFootnoteIdxs().empty();
(Prt().*fnRect->fnSetPosY)( bAdjust ? nBorder : 0 );
@@ -147,14 +147,14 @@ void SwBodyFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
{
Prt().Pos().setX(0);
Prt().Pos().setY(0);
- Prt().Height( Frm().Height() );
- Prt().Width( Frm().Width() );
+ Prt().Height( Frame().Height() );
+ Prt().Width( Frame().Width() );
}
mbValidSize = mbValidPrtArea = true;
}
-SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc ) :
- SwFootnoteBossFrm( pFormat, pSib ),
+SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPgDsc ) :
+ SwFootnoteBossFrame( pFormat, pSib ),
m_pSortedObjs( nullptr ),
m_pDesc( pPgDsc ),
m_nPhyPageNum( 0 )
@@ -172,23 +172,23 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc )
m_bHasGrid = false;
SetMaxFootnoteHeight( pPgDsc->GetFootnoteInfo().GetHeight() ?
pPgDsc->GetFootnoteInfo().GetHeight() : LONG_MAX ),
- mnFrmType = FRM_PAGE;
+ mnFrameType = FRM_PAGE;
m_bInvalidLayout = m_bInvalidContent = m_bInvalidSpelling = m_bInvalidSmartTags = m_bInvalidAutoCmplWrds = m_bInvalidWordCount = true;
m_bInvalidFlyLayout = m_bInvalidFlyContent = m_bInvalidFlyInCnt = m_bFootnotePage = m_bEndNotePage = false;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
if ( bBrowseMode )
{
- Frm().Height( 0 );
+ Frame().Height( 0 );
long nWidth = pSh->VisArea().Width();
if ( !nWidth )
nWidth = 5000L; //aendert sich sowieso
- Frm().Width ( nWidth );
+ Frame().Width ( nWidth );
}
else
- Frm().SSize( pFormat->GetFrmSize().GetSize() );
+ Frame().SSize( pFormat->GetFrameSize().GetSize() );
// create and insert body area if it is not a blank page
SwDoc *pDoc = pFormat->GetDoc();
@@ -196,11 +196,11 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc )
{
m_bEmptyPage = false;
Calc(pRenderContext); // so that the PrtArea is correct
- SwBodyFrm *pBodyFrm = new SwBodyFrm( pDoc->GetDfltFrameFormat(), this );
- pBodyFrm->ChgSize( Prt().SSize() );
- pBodyFrm->Paste( this );
- pBodyFrm->Calc(pRenderContext); // so that the columns can be inserted correctly
- pBodyFrm->InvalidatePos();
+ SwBodyFrame *pBodyFrame = new SwBodyFrame( pDoc->GetDfltFrameFormat(), this );
+ pBodyFrame->ChgSize( Prt().SSize() );
+ pBodyFrame->Paste( this );
+ pBodyFrame->Calc(pRenderContext); // so that the columns can be inserted correctly
+ pBodyFrame->InvalidatePos();
if ( bBrowseMode )
_InvalidateSize();
@@ -215,15 +215,15 @@ SwPageFrm::SwPageFrm( SwFrameFormat *pFormat, SwFrm* pSib, SwPageDesc *pPgDsc )
if ( rCol.GetNumCols() > 1 )
{
const SwFormatCol aOld; //ChgColumns() needs an old value
- pBodyFrm->ChgColumns( aOld, rCol );
+ pBodyFrame->ChgColumns( aOld, rCol );
}
}
}
-void SwPageFrm::DestroyImpl()
+void SwPageFrame::DestroyImpl()
{
// Cleanup the header-footer controls in the SwEditWin
- SwViewShell* pSh = getRootFrm()->GetCurrShell();
+ SwViewShell* pSh = getRootFrame()->GetCurrShell();
SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pSh );
if ( pWrtSh )
{
@@ -231,7 +231,7 @@ void SwPageFrm::DestroyImpl()
rEditWin.GetFrameControlsManager( ).RemoveControls( this );
}
- // empty FlyContainer, deletion of the Flys is done by the anchor (in base class SwFrm)
+ // empty FlyContainer, deletion of the Flys is done by the anchor (in base class SwFrame)
if ( m_pSortedObjs )
{
// Objects can be anchored at pages that are before their anchors (why ever...).
@@ -239,7 +239,7 @@ void SwPageFrm::DestroyImpl()
for ( size_t i = 0; i < m_pSortedObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*m_pSortedObjs)[i];
- pAnchoredObj->SetPageFrm( nullptr );
+ pAnchoredObj->SetPageFrame( nullptr );
}
delete m_pSortedObjs;
m_pSortedObjs = nullptr; // reset to zero to prevent problems when detaching the Flys
@@ -261,20 +261,20 @@ void SwPageFrm::DestroyImpl()
// including border and shadow area.
const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
SwRect aRetoucheRect;
- SwPageFrm::GetBorderAndShadowBoundRect( Frm(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
+ SwPageFrame::GetBorderAndShadowBoundRect( Frame(), pSh, pSh->GetOut(), aRetoucheRect, IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
pSh->AddPaintRect( aRetoucheRect );
}
}
}
- SwFootnoteBossFrm::DestroyImpl();
+ SwFootnoteBossFrame::DestroyImpl();
}
-SwPageFrm::~SwPageFrm()
+SwPageFrame::~SwPageFrame()
{
}
-void SwPageFrm::CheckGrid( bool bInvalidate )
+void SwPageFrame::CheckGrid( bool bInvalidate )
{
bool bOld = m_bHasGrid;
m_bHasGrid = true;
@@ -282,22 +282,22 @@ void SwPageFrm::CheckGrid( bool bInvalidate )
m_bHasGrid = nullptr != pGrid;
if( bInvalidate || bOld != m_bHasGrid )
{
- SwLayoutFrm* pBody = FindBodyCont();
+ SwLayoutFrame* pBody = FindBodyCont();
if( pBody )
{
pBody->InvalidatePrt();
- SwContentFrm* pFrm = pBody->ContainsContent();
- while( pBody->IsAnLower( pFrm ) )
+ SwContentFrame* pFrame = pBody->ContainsContent();
+ while( pBody->IsAnLower( pFrame ) )
{
- static_cast<SwTextFrm*>(pFrm)->Prepare();
- pFrm = pFrm->GetNextContentFrm();
+ static_cast<SwTextFrame*>(pFrame)->Prepare();
+ pFrame = pFrame->GetNextContentFrame();
}
}
SetCompletePaint();
}
}
-void SwPageFrm::CheckDirection( bool bVert )
+void SwPageFrame::CheckDirection( bool bVert )
{
sal_uInt16 nDir =
static_cast<const SvxFrameDirectionItem&>(GetFormat()->GetFormatAttr( RES_FRAMEDIR )).GetValue();
@@ -310,7 +310,7 @@ void SwPageFrm::CheckDirection( bool bVert )
}
else
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
mbVertLR = false;
@@ -341,24 +341,24 @@ void SwPageFrm::CheckDirection( bool bVert )
}
/// create specific Flys for this page and format generic content
-static void lcl_FormatLay( SwLayoutFrm *pLay )
+static void lcl_FormatLay( SwLayoutFrame *pLay )
{
- vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut();
- // format all LayoutFrms - no tables, Flys etc.
+ vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut();
+ // format all LayoutFrames - no tables, Flys etc.
- SwFrm *pTmp = pLay->Lower();
+ SwFrame *pTmp = pLay->Lower();
// first the low-level ones
while ( pTmp )
{
if ( pTmp->GetType() & 0x00FF )
- ::lcl_FormatLay( static_cast<SwLayoutFrm*>(pTmp) );
+ ::lcl_FormatLay( static_cast<SwLayoutFrame*>(pTmp) );
pTmp = pTmp->GetNext();
}
pLay->Calc(pRenderContext);
}
/// Create Flys or register draw objects
-static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
+static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrame *pPage )
{
// formats are in the special table of the document
@@ -395,7 +395,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
// object needs to be moved.
// In some cases the object is already anchored to the correct page.
// This will be handled here and does not need to be coded extra.
- SwPageFrm *pPg = pPage->IsEmptyPage() ? static_cast<SwPageFrm*>(pPage->GetNext()) : pPage;
+ SwPageFrame *pPg = pPage->IsEmptyPage() ? static_cast<SwPageFrame*>(pPage->GetNext()) : pPage;
if ( bSdrObj )
{
// OD 23.06.2003 #108784# - consider 'virtual' drawing objects
@@ -413,22 +413,22 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
}
else
{
- if ( pContact->GetAnchorFrm() )
+ if ( pContact->GetAnchorFrame() )
pContact->DisconnectFromLayout( false );
pPg->AppendDrawObj( *(pContact->GetAnchoredObj( pSdrObj )) );
}
}
else
{
- SwIterator<SwFlyFrm,SwFormat> aIter( *pFormat );
- SwFlyFrm *pFly = aIter.First();
+ SwIterator<SwFlyFrame,SwFormat> aIter( *pFormat );
+ SwFlyFrame *pFly = aIter.First();
if ( pFly)
{
- if( pFly->GetAnchorFrm() )
- pFly->AnchorFrm()->RemoveFly( pFly );
+ if( pFly->GetAnchorFrame() )
+ pFly->AnchorFrame()->RemoveFly( pFly );
}
else
- pFly = new SwFlyLayFrm( static_cast<SwFlyFrameFormat*>(pFormat), pPg, pPg );
+ pFly = new SwFlyLayFrame( static_cast<SwFlyFrameFormat*>(pFormat), pPg, pPg );
pPg->AppendFly( pFly );
::RegistFlys( pPg, pFly );
}
@@ -436,7 +436,7 @@ static void lcl_MakeObjs( const SwFrameFormats &rTable, SwPageFrm *pPage )
}
}
-void SwPageFrm::PreparePage( bool bFootnote )
+void SwPageFrame::PreparePage( bool bFootnote )
{
SetFootnotePage( bFootnote );
@@ -444,7 +444,7 @@ void SwPageFrm::PreparePage( bool bFootnote )
// Due to made change on OOo 2.0 code line, method <::lcl_FormatLay(..)> has
// the side effect, that the content of page header and footer are formatted.
// For this formatting it is needed that the anchored objects are registered
- // at the <SwPageFrm> instance.
+ // at the <SwPageFrame> instance.
// Thus, first calling <::RegistFlys(..)>, then call <::lcl_FormatLay(..)>
::RegistFlys( this, this );
@@ -462,31 +462,31 @@ void SwPageFrm::PreparePage( bool bFootnote )
{
SwDoc *pDoc = GetFormat()->GetDoc();
- if ( GetPrev() && static_cast<SwPageFrm*>(GetPrev())->IsEmptyPage() )
- lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), static_cast<SwPageFrm*>(GetPrev()) );
+ if ( GetPrev() && static_cast<SwPageFrame*>(GetPrev())->IsEmptyPage() )
+ lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), static_cast<SwPageFrame*>(GetPrev()) );
lcl_MakeObjs( *pDoc->GetSpzFrameFormats(), this );
// format footer/ header
- SwLayoutFrm *pLow = static_cast<SwLayoutFrm*>(Lower());
+ SwLayoutFrame *pLow = static_cast<SwLayoutFrame*>(Lower());
while ( pLow )
{
if ( pLow->GetType() & (FRM_HEADER|FRM_FOOTER) )
{
- SwContentFrm *pContent = pLow->ContainsContent();
+ SwContentFrame *pContent = pLow->ContainsContent();
while ( pContent && pLow->IsAnLower( pContent ) )
{
pContent->OptCalc(); // not the predecessors
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
}
- pLow = static_cast<SwLayoutFrm*>(pLow->GetNext());
+ pLow = static_cast<SwLayoutFrame*>(pLow->GetNext());
}
}
}
-void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwPageFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( pSh )
pSh->SetFirstVisPageInvalid();
sal_uInt8 nInvFlags = 0;
@@ -508,7 +508,7 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
aOIter.NextItem();
}
if ( aOldSet.Count() || aNewSet.Count() )
- SwLayoutFrm::Modify( &aOldSet, &aNewSet );
+ SwLayoutFrame::Modify( &aOldSet, &aNewSet );
}
else
_UpdateAttr( pOld, pNew, nInvFlags );
@@ -532,24 +532,24 @@ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
-void SwPageFrm::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
+void SwPageFrame::SwClientNotify(const SwModify& rModify, const SfxHint& rHint)
{
if(typeid(sw::PageFootnoteHint) == typeid(rHint))
{
// currently the savest way:
- static_cast<SwRootFrm*>(GetUpper())->SetSuperfluous();
+ static_cast<SwRootFrame*>(GetUpper())->SetSuperfluous();
SetMaxFootnoteHeight(m_pDesc->GetFootnoteInfo().GetHeight());
if(!GetMaxFootnoteHeight())
SetMaxFootnoteHeight(LONG_MAX);
SetColMaxFootnoteHeight();
// here, the page might be destroyed:
- static_cast<SwRootFrm*>(GetUpper())->RemoveFootnotes(nullptr, false, true);
+ static_cast<SwRootFrame*>(GetUpper())->RemoveFootnotes(nullptr, false, true);
}
else
SwClient::SwClientNotify(rModify, rHint);
}
-void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
+void SwPageFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
@@ -569,7 +569,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
const SwFormatCol &rNewCol = pNewFormat->GetCol();
if( rOldCol != rNewCol )
{
- SwLayoutFrm *pB = FindBodyCont();
+ SwLayoutFrame *pB = FindBodyCont();
assert(pB && "Page without Body.");
pB->ChgColumns( rOldCol, rNewCol );
rInvFlags |= 0x20;
@@ -590,47 +590,47 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
// no break
case RES_FRM_SIZE:
{
- const SwRect aOldPageFrmRect( Frm() );
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwRect aOldPageFrameRect( Frame() );
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
mbValidSize = false;
- // OD 28.10.2002 #97265# - Don't call <SwPageFrm::MakeAll()>
+ // OD 28.10.2002 #97265# - Don't call <SwPageFrame::MakeAll()>
// Calculation of the page is not necessary, because its size is
// invalidated here and further invalidation is done in the
- // calling method <SwPageFrm::Modify(..)> and probably by calling
- // <SwLayoutFrm::Modify(..)> at the end.
+ // calling method <SwPageFrame::Modify(..)> and probably by calling
+ // <SwLayoutFrame::Modify(..)> at the end.
// It can also causes inconsistences, because the lowers are
- // adjusted, but not calculated, and a <SwPageFrm::MakeAll()> of
+ // adjusted, but not calculated, and a <SwPageFrame::MakeAll()> of
// a next page is called. This is performed on the switch to the
// online layout.
//MakeAll();
}
else if (pNew)
{
- const SwFormatFrmSize &rSz = nWhich == RES_FMT_CHG ?
- static_cast<const SwFormatChg*>(pNew)->pChangedFormat->GetFrmSize() :
- static_cast<const SwFormatFrmSize&>(*pNew);
+ const SwFormatFrameSize &rSz = nWhich == RES_FMT_CHG ?
+ static_cast<const SwFormatChg*>(pNew)->pChangedFormat->GetFrameSize() :
+ static_cast<const SwFormatFrameSize&>(*pNew);
- Frm().Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
- Frm().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
+ Frame().Height( std::max( rSz.GetHeight(), long(MINLAY) ) );
+ Frame().Width ( std::max( rSz.GetWidth(), long(MINLAY) ) );
if ( GetUpper() )
- static_cast<SwRootFrm*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
+ static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr );
}
// cleanup Window
- if( pSh && pSh->GetWin() && aOldPageFrmRect.HasArea() )
+ if( pSh && pSh->GetWin() && aOldPageFrameRect.HasArea() )
{
// #i9719# - consider border and shadow of
// page frame for determine 'old' rectangle - it's used for invalidating.
const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
SwRect aOldRectWithBorderAndShadow;
- SwPageFrm::GetBorderAndShadowBoundRect( aOldPageFrmRect, pSh, pSh->GetOut(), aOldRectWithBorderAndShadow,
+ SwPageFrame::GetBorderAndShadowBoundRect( aOldPageFrameRect, pSh, pSh->GetOut(), aOldRectWithBorderAndShadow,
IsLeftShadowNeeded(), IsRightShadowNeeded(), bRightSidebar );
pSh->InvalidateWindows( aOldRectWithBorderAndShadow );
}
rInvFlags |= 0x03;
- if ( aOldPageFrmRect.Height() != Frm().Height() )
+ if ( aOldPageFrameRect.Height() != Frame().Height() )
rInvFlags |= 0x04;
}
break;
@@ -639,7 +639,7 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
assert(pOld && pNew); //COL Missing Format
if (pOld && pNew)
{
- SwLayoutFrm *pB = FindBodyCont();
+ SwLayoutFrame *pB = FindBodyCont();
assert(pB); //page without body
pB->ChgColumns( *static_cast<const SwFormatCol*>(pOld), *static_cast<const SwFormatCol*>(pNew) );
rInvFlags |= 0x22;
@@ -673,12 +673,12 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pNewSet->ClearItem( nWhich );
}
else
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
}
/// get information from Modify
-bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
+bool SwPageFrame::GetInfo( SfxPoolItem & rInfo ) const
{
if( RES_AUTOFMT_DOCNODE == rInfo.Which() )
{
@@ -688,7 +688,7 @@ bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const
return true; // continue searching
}
-void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat )
+void SwPageFrame::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat )
{
m_pDesc = pNew;
if ( pFormat )
@@ -704,7 +704,7 @@ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrameFormat *pFormat )
* 4. default PageDesc
* 5. In BrowseMode use the first paragraph or default PageDesc.
*/
-SwPageDesc *SwPageFrm::FindPageDesc()
+SwPageDesc *SwPageFrame::FindPageDesc()
{
// 0.
if ( IsFootnotePage() )
@@ -719,17 +719,17 @@ SwPageDesc *SwPageFrm::FindPageDesc()
SwPageDesc *pRet = nullptr;
//5.
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
{
- SwContentFrm *pFrm = GetUpper()->ContainsContent();
- while (pFrm && !pFrm->IsInDocBody())
- pFrm = pFrm->GetNextContentFrm();
- if (pFrm)
+ SwContentFrame *pFrame = GetUpper()->ContainsContent();
+ while (pFrame && !pFrame->IsInDocBody())
+ pFrame = pFrame->GetNextContentFrame();
+ if (pFrame)
{
- SwFrm *pFlow = pFrm;
+ SwFrame *pFlow = pFrame;
if ( pFlow->IsInTab() )
- pFlow = pFlow->FindTabFrm();
+ pFlow = pFlow->FindTabFrame();
pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc());
}
if ( !pRet )
@@ -737,14 +737,14 @@ SwPageDesc *SwPageFrm::FindPageDesc()
return pRet;
}
- SwFrm *pFlow = FindFirstBodyContent();
+ SwFrame *pFlow = FindFirstBodyContent();
if ( pFlow && pFlow->IsInTab() )
- pFlow = pFlow->FindTabFrm();
+ pFlow = pFlow->FindTabFrame();
//1.
if ( pFlow )
{
- SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pFlow );
+ SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pFlow );
if ( !pTmp->IsFollow() )
pRet = const_cast<SwPageDesc*>(pFlow->GetAttrSet()->GetPageDesc().GetPageDesc());
}
@@ -754,13 +754,13 @@ SwPageDesc *SwPageFrm::FindPageDesc()
// FME 2008-03-03 #i81544# lijian/fme: an empty page should have
// the same page description as its prev, just like after construction
// of the empty page.
- pRet = GetPrev() ? static_cast<SwPageFrm*>(GetPrev())->GetPageDesc() :
- GetNext() ? static_cast<SwPageFrm*>(GetNext())->GetPageDesc() : nullptr;
+ pRet = GetPrev() ? static_cast<SwPageFrame*>(GetPrev())->GetPageDesc() :
+ GetNext() ? static_cast<SwPageFrame*>(GetNext())->GetPageDesc() : nullptr;
//2.
if ( !pRet )
pRet = GetPrev() ?
- static_cast<SwPageFrm*>(GetPrev())->GetPageDesc()->GetFollow() : nullptr;
+ static_cast<SwPageFrame*>(GetPrev())->GetPageDesc()->GetFollow() : nullptr;
//4.
if ( !pRet )
@@ -770,8 +770,8 @@ SwPageDesc *SwPageFrm::FindPageDesc()
return pRet;
}
-// Notify if the RootFrm changes its size
-void AdjustSizeChgNotify( SwRootFrm *pRoot )
+// Notify if the RootFrame changes its size
+void AdjustSizeChgNotify( SwRootFrame *pRoot )
{
const bool bOld = pRoot->IsSuperfluous();
pRoot->mbCheckSuperfluous = false;
@@ -783,21 +783,21 @@ void AdjustSizeChgNotify( SwRootFrm *pRoot )
{
rSh.SizeChgNotify();
if ( rSh.Imp() )
- rSh.Imp()->NotifySizeChg( pRoot->Frm().SSize() );
+ rSh.Imp()->NotifySizeChg( pRoot->Frame().SSize() );
}
}
}
pRoot->mbCheckSuperfluous = bOld;
}
-inline void SetLastPage( SwPageFrm *pPage )
+inline void SetLastPage( SwPageFrame *pPage )
{
- static_cast<SwRootFrm*>(pPage->GetUpper())->mpLastPage = pPage;
+ static_cast<SwRootFrame*>(pPage->GetUpper())->mpLastPage = pPage;
}
-void SwPageFrm::Cut()
+void SwPageFrame::Cut()
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( !IsEmptyPage() )
{
if ( GetNext() )
@@ -812,11 +812,11 @@ void SwPageFrm::Cut()
// #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyAtCntFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyAtContentFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyAtCntFrm*>(pAnchoredObj);
- SwPageFrm *pAnchPage = pFly->GetAnchorFrm() ?
- pFly->AnchorFrm()->FindPageFrm() : nullptr;
+ SwFlyFrame* pFly = static_cast<SwFlyAtContentFrame*>(pAnchoredObj);
+ SwPageFrame *pAnchPage = pFly->GetAnchorFrame() ?
+ pFly->AnchorFrame()->FindPageFrame() : nullptr;
if ( pAnchPage && (pAnchPage != this) )
{
MoveFly( pFly, pAnchPage );
@@ -831,35 +831,35 @@ void SwPageFrm::Cut()
}
// cleanup Window
if ( pSh && pSh->GetWin() )
- pSh->InvalidateWindows( Frm() );
+ pSh->InvalidateWindows( Frame() );
}
// decrease the root's page number
- static_cast<SwRootFrm*>(GetUpper())->DecrPhyPageNums();
- SwPageFrm *pPg = static_cast<SwPageFrm*>(GetNext());
+ static_cast<SwRootFrame*>(GetUpper())->DecrPhyPageNums();
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(GetNext());
if ( pPg )
{
while ( pPg )
{
pPg->DecrPhyPageNum(); //inline --nPhyPageNum
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
}
else
- ::SetLastPage( static_cast<SwPageFrm*>(GetPrev()) );
+ ::SetLastPage( static_cast<SwPageFrame*>(GetPrev()) );
- SwFrm* pRootFrm = GetUpper();
+ SwFrame* pRootFrame = GetUpper();
// cut all connections
RemoveFromLayout();
- if ( pRootFrm )
- static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( nullptr, nullptr );
+ if ( pRootFrame )
+ static_cast<SwRootFrame*>(pRootFrame)->CheckViewLayout( nullptr, nullptr );
}
-void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
+void SwPageFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
{
- OSL_ENSURE( pParent->IsRootFrm(), "Parent is no Root." );
+ OSL_ENSURE( pParent->IsRootFrame(), "Parent is no Root." );
OSL_ENSURE( pParent, "No parent for Paste()." );
OSL_ENSURE( pParent != this, "I'm my own parent." );
OSL_ENSURE( pSibling != this, "I'm my own neighbour." );
@@ -867,15 +867,15 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
"I am still registered somewhere." );
// insert into tree structure
- InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling );
+ InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
// increase the root's page number
- static_cast<SwRootFrm*>(GetUpper())->IncrPhyPageNums();
+ static_cast<SwRootFrame*>(GetUpper())->IncrPhyPageNums();
if( GetPrev() )
- SetPhyPageNum( static_cast<SwPageFrm*>(GetPrev())->GetPhyPageNum() + 1 );
+ SetPhyPageNum( static_cast<SwPageFrame*>(GetPrev())->GetPhyPageNum() + 1 );
else
SetPhyPageNum( 1 );
- SwPageFrm *pPg = static_cast<SwPageFrm*>(GetNext());
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(GetNext());
if ( pPg )
{
while ( pPg )
@@ -883,55 +883,55 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
pPg->IncrPhyPageNum(); //inline ++nPhyPageNum
pPg->_InvalidatePos();
pPg->InvalidateLayout();
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
}
else
::SetLastPage( this );
- if( Frm().Width() != pParent->Prt().Width() )
+ if( Frame().Width() != pParent->Prt().Width() )
_InvalidateSize();
InvalidatePos();
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( pSh )
pSh->SetFirstVisPageInvalid();
- getRootFrm()->CheckViewLayout( nullptr, nullptr );
+ getRootFrame()->CheckViewLayout( nullptr, nullptr );
}
-static void lcl_PrepFlyInCntRegister( SwContentFrm *pFrm )
+static void lcl_PrepFlyInCntRegister( SwContentFrame *pFrame )
{
- pFrm->Prepare( PREP_REGISTER );
- if( pFrm->GetDrawObjs() )
+ pFrame->Prepare( PREP_REGISTER );
+ if( pFrame->GetDrawObjs() )
{
- for( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i )
+ for( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i )
{
// #i28701#
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
- if ( dynamic_cast< const SwFlyInCntFrm *>( pAnchoredObj ) != nullptr )
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
+ if ( dynamic_cast< const SwFlyInContentFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyInCntFrm*>(pAnchoredObj);
- SwContentFrm *pCnt = pFly->ContainsContent();
+ SwFlyFrame* pFly = static_cast<SwFlyInContentFrame*>(pAnchoredObj);
+ SwContentFrame *pCnt = pFly->ContainsContent();
while ( pCnt )
{
lcl_PrepFlyInCntRegister( pCnt );
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
}
}
}
-void SwPageFrm::PrepareRegisterChg()
+void SwPageFrame::PrepareRegisterChg()
{
- SwContentFrm *pFrm = FindFirstBodyContent();
- while( pFrm )
+ SwContentFrame *pFrame = FindFirstBodyContent();
+ while( pFrame )
{
- lcl_PrepFlyInCntRegister( pFrm );
- pFrm = pFrm->GetNextContentFrm();
- if( !IsAnLower( pFrm ) )
+ lcl_PrepFlyInCntRegister( pFrame );
+ pFrame = pFrame->GetNextContentFrame();
+ if( !IsAnLower( pFrame ) )
break;
}
if( GetSortedObjs() )
@@ -940,14 +940,14 @@ void SwPageFrm::PrepareRegisterChg()
{
// #i28701#
SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- pFrm = pFly->ContainsContent();
- while ( pFrm )
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ pFrame = pFly->ContainsContent();
+ while ( pFrame )
{
- ::lcl_PrepFlyInCntRegister( pFrm );
- pFrm = pFrm->GetNextContentFrm();
+ ::lcl_PrepFlyInCntRegister( pFrame );
+ pFrame = pFrame->GetNextContentFrame();
}
}
}
@@ -963,11 +963,11 @@ void SwPageFrm::PrepareRegisterChg()
* @param bNotifyFields
* @param ppPrev
*/
-void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** ppPrev )
+void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFrame** ppPrev )
{
assert(pStart && "no starting page.");
- SwViewShell *pSh = pStart->getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = pStart->getRootFrame()->GetCurrShell();
SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
@@ -980,13 +980,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
// the page position from where invalidation should start.
SwTwips nDocPos = LONG_MAX;
- SwRootFrm *pRoot = static_cast<SwRootFrm*>(pStart->GetUpper());
+ SwRootFrame *pRoot = static_cast<SwRootFrame*>(pStart->GetUpper());
SwDoc* pDoc = pStart->GetFormat()->GetDoc();
const bool bFootnotes = !pDoc->GetFootnoteIdxs().empty();
- SwPageFrm *pPage = pStart;
- if( pPage->GetPrev() && static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() )
- pPage = static_cast<SwPageFrm*>(pPage->GetPrev());
+ SwPageFrame *pPage = pStart;
+ if( pPage->GetPrev() && static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() )
+ pPage = static_cast<SwPageFrame*>(pPage->GetPrev());
while ( pPage )
{
// obtain PageDesc and FrameFormat
@@ -1005,14 +1005,14 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
)
)
{
- // Updating a page might take a while, so check the WaitCrsr
+ // Updating a page might take a while, so check the WaitCursor
if( pImp )
- pImp->CheckWaitCrsr();
+ pImp->CheckWaitCursor();
// invalidate the field, starting from here
if ( nDocPos == LONG_MAX )
nDocPos = pPage->GetPrev() ?
- pPage->GetPrev()->Frm().Top() : pPage->Frm().Top();
+ pPage->GetPrev()->Frame().Top() : pPage->Frame().Top();
// Cases:
// 1. Empty page should be "normal" page -> remove empty page and take next one
@@ -1026,12 +1026,12 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
if ( pPage->IsEmptyPage() && ( pFormatWish || //1.
( !bOdd && !pPage->GetPrev() ) ) )
{
- SwPageFrm *pTmp = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pTmp = static_cast<SwPageFrame*>(pPage->GetNext());
pPage->Cut();
bool bUpdatePrev = false;
if (ppPrev && *ppPrev == pPage)
bUpdatePrev = true;
- SwFrm::DestroyFrm(pPage);
+ SwFrame::DestroyFrame(pPage);
if ( pStart == pPage )
pStart = pTmp;
pPage = pTmp;
@@ -1048,13 +1048,13 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
bActOdd != bOdd &&
( ( !pPage->GetPrev() && !bOdd ) ||
( pPage->GetPrev() &&
- !static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() )
+ !static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() )
)
)
{
if ( pPage->GetPrev() )
- pDesc = static_cast<SwPageFrm*>(pPage->GetPrev())->GetPageDesc();
- SwPageFrm *pTmp = new SwPageFrm( pDoc->GetEmptyPageFormat(),pRoot,pDesc);
+ pDesc = static_cast<SwPageFrame*>(pPage->GetPrev())->GetPageDesc();
+ SwPageFrame *pTmp = new SwPageFrame( pDoc->GetEmptyPageFormat(),pRoot,pDesc);
pTmp->Paste( pRoot, pPage );
pTmp->PreparePage( false );
pPage = pTmp;
@@ -1069,7 +1069,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
// We try to limit the damage...
// If the page has no FootnoteCont it might be problematic.
// Let's hope that invalidation is enough.
- SwFootnoteContFrm *pCont = pPage->FindFootnoteCont();
+ SwFootnoteContFrame *pCont = pPage->FindFootnoteCont();
if ( pCont && !(pOld->GetFootnoteInfo() == pDesc->GetFootnoteInfo()) )
pCont->_InvalidateAll();
}
@@ -1098,16 +1098,16 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
// It also might be that an empty page is not needed at all.
// However, the algorithm above cannot determine that. It is not needed if the following
// page can live without it. Do obtain that information, we need to dig deeper...
- SwPageFrm *pPg = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(pPage->GetNext());
if( !pPg || pPage->OnRightPage() == pPg->WannaRightPage() )
{
// The following page can find a FrameFormat or has no successor -> empty page not needed
- SwPageFrm *pTmp = static_cast<SwPageFrm*>(pPage->GetNext());
+ SwPageFrame *pTmp = static_cast<SwPageFrame*>(pPage->GetNext());
pPage->Cut();
bool bUpdatePrev = false;
if (ppPrev && *ppPrev == pPage)
bUpdatePrev = true;
- SwFrm::DestroyFrm(pPage);
+ SwFrame::DestroyFrame(pPage);
if ( pStart == pPage )
pStart = pTmp;
pPage = pTmp;
@@ -1116,11 +1116,11 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
continue;
}
}
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
pRoot->SetAssertFlyPages();
- SwRootFrm::AssertPageFlys( pStart );
+ SwRootFrame::AssertPageFlys( pStart );
if ( bNotifyFields && (!pImp || !pImp->IsUpdateExpFields()) )
{
@@ -1131,7 +1131,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
#if OSL_DEBUG_LEVEL > 0
//1. check if two empty pages are behind one another
bool bEmpty = false;
- SwPageFrm *pPg = pStart;
+ SwPageFrame *pPg = pStart;
while ( pPg )
{
if ( pPg->IsEmptyPage() )
@@ -1146,25 +1146,25 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p
else
bEmpty = false;
- pPg = static_cast<SwPageFrm*>(pPg->GetNext());
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
}
#endif
}
namespace
{
- bool isDeleteForbidden(const SwPageFrm *pDel)
+ bool isDeleteForbidden(const SwPageFrame *pDel)
{
- const SwLayoutFrm* pBody = pDel->FindBodyCont();
- const SwFrm* pBodyContent = pBody ? pBody->Lower() : nullptr;
+ const SwLayoutFrame* pBody = pDel->FindBodyCont();
+ const SwFrame* pBodyContent = pBody ? pBody->Lower() : nullptr;
return pBodyContent && pBodyContent->IsDeleteForbidden();
}
}
-SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
+SwPageFrame *SwFrame::InsertPage( SwPageFrame *pPrevPage, bool bFootnote )
{
- SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPrevPage->GetUpper());
- SwPageFrm *pSibling = static_cast<SwPageFrm*>(pPrevPage->GetNext());
+ SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPrevPage->GetUpper());
+ SwPageFrame *pSibling = static_cast<SwPageFrame*>(pPrevPage->GetNext());
SwPageDesc *pDesc = nullptr;
// insert right (odd) or left (even) page?
@@ -1172,9 +1172,9 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
bool bWishedOdd = bNextOdd;
// Which PageDesc is relevant?
- // For ContentFrm take the one from format if provided,
+ // For ContentFrame take the one from format if provided,
// otherwise from the Follow of the PrevPage
- if ( IsFlowFrm() && !SwFlowFrm::CastFlowFrm( this )->IsFollow() )
+ if ( IsFlowFrame() && !SwFlowFrame::CastFlowFrame( this )->IsFollow() )
{ SwFormatPageDesc &rDesc = (SwFormatPageDesc&)GetAttrSet()->GetPageDesc();
pDesc = rDesc.GetPageDesc();
if ( rDesc.GetNumOffset() )
@@ -1200,19 +1200,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
{
SwFrameFormat *const pEmptyFormat = pDoc->GetEmptyPageFormat();
SwPageDesc *pTmpDesc = pPrevPage->GetPageDesc();
- SwPageFrm *pPage = new SwPageFrm(pEmptyFormat, pRoot, pTmpDesc);
+ SwPageFrame *pPage = new SwPageFrame(pEmptyFormat, pRoot, pTmpDesc);
pPage->Paste( pRoot, pSibling );
pPage->PreparePage( bFootnote );
// If the sibling has no body text, destroy it as long as it is no footnote page.
if ( pSibling && !pSibling->IsFootnotePage() &&
!pSibling->FindFirstBodyContent() )
{
- SwPageFrm *pDel = pSibling;
- pSibling = static_cast<SwPageFrm*>(pSibling->GetNext());
+ SwPageFrame *pDel = pSibling;
+ pSibling = static_cast<SwPageFrame*>(pSibling->GetNext());
if ( !pDoc->GetFootnoteIdxs().empty() )
pRoot->RemoveFootnotes( pDel, true );
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
else
bCheckPages = true;
@@ -1221,19 +1221,19 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
? pDesc->GetRightFormat(bWishedFirst)
: pDesc->GetLeftFormat(bWishedFirst) );
assert(pFormat);
- SwPageFrm *pPage = new SwPageFrm( pFormat, pRoot, pDesc );
+ SwPageFrame *pPage = new SwPageFrame( pFormat, pRoot, pDesc );
pPage->Paste( pRoot, pSibling );
pPage->PreparePage( bFootnote );
// If the sibling has no body text, destroy it as long as it is no footnote page.
if ( pSibling && !pSibling->IsFootnotePage() &&
!pSibling->FindFirstBodyContent() && !isDeleteForbidden(pSibling) )
{
- SwPageFrm *pDel = pSibling;
- pSibling = static_cast<SwPageFrm*>(pSibling->GetNext());
+ SwPageFrame *pDel = pSibling;
+ pSibling = static_cast<SwPageFrame*>(pSibling->GetNext());
if ( !pDoc->GetFootnoteIdxs().empty() )
pRoot->RemoveFootnotes( pDel, true );
pDel->Cut();
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
}
else
bCheckPages = true;
@@ -1243,7 +1243,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
if ( bCheckPages )
{
CheckPageDescs( pSibling, false );
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
if ( pImp && pImp->IsAction() && !pImp->GetLayAction().IsCheckPages() )
{
@@ -1255,30 +1255,30 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFootnote )
}
}
else
- SwRootFrm::AssertPageFlys( pSibling );
+ SwRootFrame::AssertPageFlys( pSibling );
}
// For the update of page numbering fields, nDocPos provides
// the page position from where invalidation should start.
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( !pSh || !pSh->Imp()->IsUpdateExpFields() )
{
- SwDocPosUpdate aMsgHint( pPrevPage->Frm().Top() );
+ SwDocPosUpdate aMsgHint( pPrevPage->Frame().Top() );
pDoc->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
return pPage;
}
-sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
+sw::sidebarwindows::SidebarPosition SwPageFrame::SidebarPosition() const
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( !pSh || pSh->GetViewOptions()->getBrowseMode() )
{
return sw::sidebarwindows::SidebarPosition::RIGHT;
}
else
{
- const bool bLTR = getRootFrm()->IsLeftToRightViewLayout();
+ const bool bLTR = getRootFrame()->IsLeftToRightViewLayout();
const bool bBookMode = pSh->GetViewOptions()->IsViewLayoutBookMode();
const bool bRightSidebar = bLTR ? (!bBookMode || OnRightPage()) : (bBookMode && !OnRightPage());
@@ -1288,27 +1288,27 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const
}
}
-SwTwips SwRootFrm::GrowFrm( SwTwips nDist, bool bTst, bool )
+SwTwips SwRootFrame::GrowFrame( SwTwips nDist, bool bTst, bool )
{
if ( !bTst )
- Frm().SSize().Height() += nDist;
+ Frame().SSize().Height() += nDist;
return nDist;
}
-SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool )
+SwTwips SwRootFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool )
{
OSL_ENSURE( nDist >= 0, "nDist < 0." );
- OSL_ENSURE( nDist <= Frm().Height(), "nDist > als aktuelle Groesse." );
+ OSL_ENSURE( nDist <= Frame().Height(), "nDist > als aktuelle Groesse." );
if ( !bTst )
- Frm().SSize().Height() -= nDist;
+ Frame().SSize().Height() -= nDist;
return nDist;
}
/// remove pages that are not needed at all
-void SwRootFrm::RemoveSuperfluous()
+void SwRootFrame::RemoveSuperfluous()
{
- // A page is empty if the body text area has no ContentFrm, but not if there
+ // A page is empty if the body text area has no ContentFrame, but not if there
// is at least one Fly or one footnote attached to the page. Two runs are
// needed: one for endnote pages and one for the pages of the body text.
@@ -1316,7 +1316,7 @@ void SwRootFrm::RemoveSuperfluous()
return;
mbCheckSuperfluous = false;
- SwPageFrm *pPage = GetLastPage();
+ SwPageFrame *pPage = GetLastPage();
long nDocPos = LONG_MAX;
// Check the corresponding last page if it is empty and stop loop at the last non-empty page.
@@ -1338,7 +1338,7 @@ void SwRootFrm::RemoveSuperfluous()
// OD 2004-01-19 #110582# - do not consider hidden objects
if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(
pAnchoredObj->GetDrawObj()->GetLayer() ) &&
- !pAnchoredObj->GetAnchorFrm()->FindFooterOrHeader() )
+ !pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() )
{
bOnlySuperfluosObjs = false;
}
@@ -1348,7 +1348,7 @@ void SwRootFrm::RemoveSuperfluous()
// OD 19.06.2003 #108784# - optimization: check first, if essential objects
// exists.
- const SwLayoutFrm* pBody = nullptr;
+ const SwLayoutFrame* pBody = nullptr;
if ( bExistEssentialObjs ||
pPage->FindFootnoteCont() ||
( nullptr != ( pBody = pPage->FindBodyCont() ) &&
@@ -1359,13 +1359,13 @@ void SwRootFrm::RemoveSuperfluous()
// instead of ContainsContent() to cover the empty-table-case,
// but I'm not fully sure, since ContainsAny() also returns
// SectionFrames. Therefore I prefer to do it the safe way:
- ( pBody->Lower() && pBody->Lower()->IsTabFrm() ) ) ) )
+ ( pBody->Lower() && pBody->Lower()->IsTabFrame() ) ) ) )
{
if ( pPage->IsFootnotePage() )
{
while ( pPage->IsFootnotePage() )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetPrev());
+ pPage = static_cast<SwPageFrame*>(pPage->GetPrev());
OSL_ENSURE( pPage, "only endnote pages remain." );
}
continue;
@@ -1376,17 +1376,17 @@ void SwRootFrm::RemoveSuperfluous()
if ( pPage )
{
- SwPageFrm *pEmpty = pPage;
- pPage = static_cast<SwPageFrm*>(pPage->GetPrev());
+ SwPageFrame *pEmpty = pPage;
+ pPage = static_cast<SwPageFrame*>(pPage->GetPrev());
if ( !GetFormat()->GetDoc()->GetFootnoteIdxs().empty() )
RemoveFootnotes( pEmpty, true );
pEmpty->Cut();
- SwFrm::DestroyFrm(pEmpty);
- nDocPos = pPage ? pPage->Frm().Top() : 0;
+ SwFrame::DestroyFrame(pEmpty);
+ nDocPos = pPage ? pPage->Frame().Top() : 0;
}
} while ( pPage );
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( nDocPos != LONG_MAX &&
(!pSh || !pSh->Imp()->IsUpdateExpFields()) )
{
@@ -1396,7 +1396,7 @@ void SwRootFrm::RemoveSuperfluous()
}
/// Ensures that enough pages exist, so that all page bound frames and draw objects can be placed
-void SwRootFrm::AssertFlyPages()
+void SwRootFrame::AssertFlyPages()
{
if ( !IsAssertFlyPages() )
return;
@@ -1415,11 +1415,11 @@ void SwRootFrm::AssertFlyPages()
nMaxPg = rAnch.GetPageNum();
}
// How many pages exist at the moment?
- SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower());
while ( pPage && pPage->GetNext() &&
- !static_cast<SwPageFrm*>(pPage->GetNext())->IsFootnotePage() )
+ !static_cast<SwPageFrame*>(pPage->GetNext())->IsFootnotePage() )
{
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
if ( nMaxPg > pPage->GetPhyPageNum() )
@@ -1427,20 +1427,20 @@ void SwRootFrm::AssertFlyPages()
// Continue pages based on the rules of the PageDesc after the last page.
bool bOdd = (pPage->GetPhyPageNum() % 2) != 0;
SwPageDesc *pDesc = pPage->GetPageDesc();
- SwFrm *pSibling = pPage->GetNext();
+ SwFrame *pSibling = pPage->GetNext();
for ( sal_uInt16 i = pPage->GetPhyPageNum(); i < nMaxPg; ++i )
{
if ( !(bOdd ? pDesc->GetRightFormat() : pDesc->GetLeftFormat()) )
{
// Insert empty page (but Flys will be stored in the next page)
- pPage = new SwPageFrm( pDoc->GetEmptyPageFormat(), this, pDesc );
+ pPage = new SwPageFrame( pDoc->GetEmptyPageFormat(), this, pDesc );
pPage->Paste( this, pSibling );
pPage->PreparePage( false );
bOdd = !bOdd;
++i;
}
pPage = new
- SwPageFrm( (bOdd ? pDesc->GetRightFormat() :
+ SwPageFrame( (bOdd ? pDesc->GetRightFormat() :
pDesc->GetLeftFormat()), this, pDesc );
pPage->Paste( this, pSibling );
pPage->PreparePage( false );
@@ -1450,9 +1450,9 @@ void SwRootFrm::AssertFlyPages()
// If the endnote pages are now corrupt, destroy them.
if ( !pDoc->GetFootnoteIdxs().empty() )
{
- pPage = static_cast<SwPageFrm*>(Lower());
+ pPage = static_cast<SwPageFrame*>(Lower());
while ( pPage && !pPage->IsFootnotePage() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
if ( pPage )
{
@@ -1467,7 +1467,7 @@ void SwRootFrm::AssertFlyPages()
}
/// Ensure that after the given page all page-bound objects are located on the correct page
-void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
+void SwRootFrame::AssertPageFlys( SwPageFrame *pPage )
{
while ( pPage )
{
@@ -1485,7 +1485,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
{
// If on the wrong page, check if previous page is empty
if( nPg && !(pPage->GetPhyPageNum()-1 == nPg &&
- static_cast<SwPageFrm*>(pPage->GetPrev())->IsEmptyPage()) )
+ static_cast<SwPageFrame*>(pPage->GetPrev())->IsEmptyPage()) )
{
// It can move by itself. Just send a modify to its anchor attribute.
#if OSL_DEBUG_LEVEL > 1
@@ -1504,40 +1504,40 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage )
++i;
}
}
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
}
-Size SwRootFrm::ChgSize( const Size& aNewSize )
+Size SwRootFrame::ChgSize( const Size& aNewSize )
{
- Frm().SSize() = aNewSize;
+ Frame().SSize() = aNewSize;
_InvalidatePrt();
mbFixSize = false;
- return Frm().SSize();
+ return Frame().SSize();
}
-void SwRootFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwRootFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( !mbValidPos )
{ mbValidPos = true;
- maFrm.Pos().setX(DOCUMENTBORDER);
- maFrm.Pos().setY(DOCUMENTBORDER);
+ maFrame.Pos().setX(DOCUMENTBORDER);
+ maFrame.Pos().setY(DOCUMENTBORDER);
}
if ( !mbValidPrtArea )
{ mbValidPrtArea = true;
maPrt.Pos().setX(0);
maPrt.Pos().setY(0);
- maPrt.SSize( maFrm.SSize() );
+ maPrt.SSize( maFrame.SSize() );
}
if ( !mbValidSize )
// SSize is set by the pages (Cut/Paste).
mbValidSize = true;
}
-void SwRootFrm::ImplInvalidateBrowseWidth()
+void SwRootFrame::ImplInvalidateBrowseWidth()
{
mbBrowseWidthValid = false;
- SwFrm *pPg = Lower();
+ SwFrame *pPg = Lower();
while ( pPg )
{
pPg->InvalidateSize();
@@ -1545,7 +1545,7 @@ void SwRootFrm::ImplInvalidateBrowseWidth()
}
}
-void SwRootFrm::ImplCalcBrowseWidth()
+void SwRootFrame::ImplCalcBrowseWidth()
{
OSL_ENSURE( GetCurrShell() && GetCurrShell()->GetViewOptions()->getBrowseMode(),
"CalcBrowseWidth and not in BrowseView" );
@@ -1556,27 +1556,27 @@ void SwRootFrm::ImplCalcBrowseWidth()
// Frames and paint objects inside other objects (frames, tables) do not count.
// Borders and columns are not taken into account.
- SwFrm *pFrm = ContainsContent();
- while ( pFrm && !pFrm->IsInDocBody() )
- pFrm = static_cast<SwContentFrm*>(pFrm)->GetNextContentFrm();
- if ( !pFrm )
+ SwFrame *pFrame = ContainsContent();
+ while ( pFrame && !pFrame->IsInDocBody() )
+ pFrame = static_cast<SwContentFrame*>(pFrame)->GetNextContentFrame();
+ if ( !pFrame )
return;
mbBrowseWidthValid = true;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
mnBrowseWidth = pSh
? MINLAY + 2 * pSh->GetOut()->
PixelToLogic( pSh->GetBrowseBorder() ).Width()
: 5000;
do
{
- if ( pFrm->IsInTab() )
- pFrm = pFrm->FindTabFrm();
+ if ( pFrame->IsInTab() )
+ pFrame = pFrame->FindTabFrame();
- if ( pFrm->IsTabFrm() &&
- !static_cast<SwLayoutFrm*>(pFrm)->GetFormat()->GetFrmSize().GetWidthPercent() )
+ if ( pFrame->IsTabFrame() &&
+ !static_cast<SwLayoutFrame*>(pFrame)->GetFormat()->GetFrameSize().GetWidthPercent() )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
const SwFormatHoriOrient &rHori = rAttrs.GetAttrSet().GetHoriOrient();
long nWidth = rAttrs.GetSize().Width();
@@ -1584,7 +1584,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
text::HoriOrientation::FULL != rHori.GetHoriOrient() )
{
const SwHTMLTableLayout *pLayoutInfo =
- static_cast<const SwTabFrm *>(pFrm)->GetTable()
+ static_cast<const SwTabFrame *>(pFrame)->GetTable()
->GetHTMLTableLayout();
if ( pLayoutInfo )
nWidth = std::min( nWidth, pLayoutInfo->GetBrowseWidthMin() );
@@ -1593,10 +1593,10 @@ void SwRootFrm::ImplCalcBrowseWidth()
{
case text::HoriOrientation::NONE:
// OD 23.01.2003 #106895# - add 1st param to <SwBorderAttrs::CalcRight(..)>
- nWidth += rAttrs.CalcLeft( pFrm ) + rAttrs.CalcRight( pFrm );
+ nWidth += rAttrs.CalcLeft( pFrame ) + rAttrs.CalcRight( pFrame );
break;
case text::HoriOrientation::LEFT_AND_WIDTH:
- nWidth += rAttrs.CalcLeft( pFrm );
+ nWidth += rAttrs.CalcLeft( pFrame );
break;
default:
break;
@@ -1604,16 +1604,16 @@ void SwRootFrm::ImplCalcBrowseWidth()
mnBrowseWidth = std::max( mnBrowseWidth, nWidth );
}
}
- else if ( pFrm->GetDrawObjs() )
+ else if ( pFrame->GetDrawObjs() )
{
- for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i )
+ for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i )
{
// #i28701#
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
- const bool bFly = dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr;
+ const bool bFly = dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr;
if ((bFly && (FAR_AWAY == pAnchoredObj->GetObjRect().Width()))
- || rFormat.GetFrmSize().GetWidthPercent())
+ || rFormat.GetFrameSize().GetWidthPercent())
{
continue;
}
@@ -1622,7 +1622,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
switch ( rFormat.GetAnchor().GetAnchorId() )
{
case FLY_AS_CHAR:
- nWidth = bFly ? rFormat.GetFrmSize().GetWidth() :
+ nWidth = bFly ? rFormat.GetFrameSize().GetWidth() :
pAnchoredObj->GetObjRect().Width();
break;
case FLY_AT_PARA:
@@ -1634,7 +1634,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
// at position FAR_AWAY.
if ( bFly )
{
- nWidth = rFormat.GetFrmSize().GetWidth();
+ nWidth = rFormat.GetFrameSize().GetWidth();
const SwFormatHoriOrient &rHori = rFormat.GetHoriOrient();
switch ( rHori.GetHoriOrient() )
{
@@ -1644,7 +1644,7 @@ void SwRootFrm::ImplCalcBrowseWidth()
case text::HoriOrientation::INSIDE:
case text::HoriOrientation::LEFT:
if ( text::RelOrientation::PRINT_AREA == rHori.GetRelationOrient() )
- nWidth += pFrm->Prt().Left();
+ nWidth += pFrame->Prt().Left();
break;
default:
break;
@@ -1662,33 +1662,33 @@ void SwRootFrm::ImplCalcBrowseWidth()
mnBrowseWidth = std::max( mnBrowseWidth, nWidth );
}
}
- pFrm = pFrm->FindNextCnt();
- } while ( pFrm );
+ pFrame = pFrame->FindNextCnt();
+ } while ( pFrame );
}
-void SwRootFrm::StartAllAction()
+void SwRootFrame::StartAllAction()
{
if ( GetCurrShell() )
for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
{
- if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr )
- static_cast<SwCrsrShell*>(&rSh)->StartAction();
+ if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr )
+ static_cast<SwCursorShell*>(&rSh)->StartAction();
else
rSh.StartAction();
}
}
-void SwRootFrm::EndAllAction( bool bVirDev )
+void SwRootFrame::EndAllAction( bool bVirDev )
{
if ( GetCurrShell() )
for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
{
const bool bOldEndActionByVirDev = rSh.IsEndActionByVirDev();
rSh.SetEndActionByVirDev( bVirDev );
- if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr )
+ if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr )
{
- static_cast<SwCrsrShell*>(&rSh)->EndAction();
- static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
+ static_cast<SwCursorShell*>(&rSh)->EndAction();
+ static_cast<SwCursorShell*>(&rSh)->CallChgLnk();
if ( dynamic_cast<const SwFEShell*>( &rSh) != nullptr )
static_cast<SwFEShell*>(&rSh)->SetChainMarker();
}
@@ -1698,7 +1698,7 @@ void SwRootFrm::EndAllAction( bool bVirDev )
}
}
-void SwRootFrm::UnoRemoveAllActions()
+void SwRootFrame::UnoRemoveAllActions()
{
if ( GetCurrShell() )
for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
@@ -1709,15 +1709,15 @@ void SwRootFrm::UnoRemoveAllActions()
if ( !rSh.IsInEndAction() )
{
OSL_ENSURE(!rSh.GetRestoreActions(), "Restore action count is already set!");
- bool bCrsr = dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr;
+ bool bCursor = dynamic_cast<const SwCursorShell*>( &rSh) != nullptr;
bool bFE = dynamic_cast<const SwFEShell*>( &rSh) != nullptr;
sal_uInt16 nRestore = 0;
while( rSh.ActionCount() )
{
- if( bCrsr )
+ if( bCursor )
{
- static_cast<SwCrsrShell*>(&rSh)->EndAction();
- static_cast<SwCrsrShell*>(&rSh)->CallChgLnk();
+ static_cast<SwCursorShell*>(&rSh)->EndAction();
+ static_cast<SwCursorShell*>(&rSh)->CallChgLnk();
if ( bFE )
static_cast<SwFEShell*>(&rSh)->SetChainMarker();
}
@@ -1731,7 +1731,7 @@ void SwRootFrm::UnoRemoveAllActions()
}
}
-void SwRootFrm::UnoRestoreAllActions()
+void SwRootFrame::UnoRestoreAllActions()
{
if ( GetCurrShell() )
for(SwViewShell& rSh : GetCurrShell()->GetRingContainer())
@@ -1739,8 +1739,8 @@ void SwRootFrm::UnoRestoreAllActions()
sal_uInt16 nActions = rSh.GetRestoreActions();
while( nActions-- )
{
- if ( dynamic_cast<const SwCrsrShell*>( &rSh) != nullptr )
- static_cast<SwCrsrShell*>(&rSh)->StartAction();
+ if ( dynamic_cast<const SwCursorShell*>( &rSh) != nullptr )
+ static_cast<SwCursorShell*>(&rSh)->StartAction();
else
rSh.StartAction();
}
@@ -1749,15 +1749,15 @@ void SwRootFrm::UnoRestoreAllActions()
}
}
-// Helper functions for SwRootFrm::CheckViewLayout
-static void lcl_MoveAllLowers( SwFrm* pFrm, const Point& rOffset );
+// Helper functions for SwRootFrame::CheckViewLayout
+static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset );
-static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
+static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset )
{
- const bool bPage = pFrm->IsPageFrm();
+ const bool bPage = pFrame->IsPageFrame();
const SwSortedObjs* pSortedObj = bPage
- ? static_cast<SwPageFrm*>(pFrm)->GetSortedObjs()
- : pFrm->GetDrawObjs();
+ ? static_cast<SwPageFrame*>(pFrame)->GetSortedObjs()
+ : pFrame->GetDrawObjs();
if (pSortedObj == nullptr)
return;
@@ -1773,23 +1773,23 @@ static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
SwObjPositioningInProgress aPosInProgress( *pAnchoredObj );
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFlyFrm( static_cast<SwFlyFrm*>(pAnchoredObj) );
- lcl_MoveAllLowers( pFlyFrm, rOffset );
- pFlyFrm->NotifyDrawObj();
+ SwFlyFrame* pFlyFrame( static_cast<SwFlyFrame*>(pAnchoredObj) );
+ lcl_MoveAllLowers( pFlyFrame, rOffset );
+ pFlyFrame->NotifyDrawObj();
// --> let the active embedded object be moved
- SwFrm* pLower = pFlyFrm->Lower();
+ SwFrame* pLower = pFlyFrame->Lower();
if ( pLower )
{
- if ( pLower->IsNoTextFrm() )
+ if ( pLower->IsNoTextFrame() )
{
- SwRootFrm* pRoot = pLower->getRootFrm();
+ SwRootFrame* pRoot = pLower->getRootFrame();
SwViewShell *pSh = pRoot ? pRoot->GetCurrShell() : nullptr;
if ( pSh )
{
- SwContentFrm* pContentFrm = static_cast<SwContentFrm*>(pLower);
- SwOLENode* pNode = pContentFrm->GetNode()->GetOLENode();
+ SwContentFrame* pContentFrame = static_cast<SwContentFrame*>(pLower);
+ SwOLENode* pNode = pContentFrame->GetNode()->GetOLENode();
if ( pNode )
{
svt::EmbeddedObjectRef& xObj = pNode->GetOLEObj().GetObject();
@@ -1830,54 +1830,54 @@ static void lcl_MoveAllLowerObjs( SwFrm* pFrm, const Point& rOffset )
}
}
-static void lcl_MoveAllLowers( SwFrm* pFrm, const Point& rOffset )
+static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset )
{
- const SwRect aFrm( pFrm->Frm() );
+ const SwRect aFrame( pFrame->Frame() );
// first move the current frame
- Point &rPoint = pFrm->Frm().Pos();
+ Point &rPoint = pFrame->Frame().Pos();
if (rPoint.X() != FAR_AWAY)
rPoint.X() += rOffset.X();
if (rPoint.Y() != FAR_AWAY)
rPoint.Y() += rOffset.Y();
// Don't forget accessibility:
- if( pFrm->IsAccessibleFrm() )
+ if( pFrame->IsAccessibleFrame() )
{
- SwRootFrm *pRootFrm = pFrm->getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = pFrame->getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pFrm, aFrm );
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pFrame, aFrame );
}
}
// the move any objects
- lcl_MoveAllLowerObjs( pFrm, rOffset );
+ lcl_MoveAllLowerObjs( pFrame, rOffset );
// finally, for layout frames we have to call this function recursively:
- if ( dynamic_cast< const SwLayoutFrm *>( pFrm ) != nullptr )
+ if ( dynamic_cast< const SwLayoutFrame *>( pFrame ) != nullptr )
{
- SwFrm* pLowerFrm = pFrm->GetLower();
- while ( pLowerFrm )
+ SwFrame* pLowerFrame = pFrame->GetLower();
+ while ( pLowerFrame )
{
- lcl_MoveAllLowers( pLowerFrm, rOffset );
- pLowerFrm = pLowerFrm->GetNext();
+ lcl_MoveAllLowers( pLowerFrame, rOffset );
+ pLowerFrame = pLowerFrame->GetNext();
}
}
}
// Calculate how the pages have to be positioned
-void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea )
+void SwRootFrame::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVisArea )
{
SwViewShell* pSh = GetCurrShell();
vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
// #i91432#
// No calculation of page positions, if only an empty page is present.
- // This situation occurs when <SwRootFrm> instance is in construction
+ // This situation occurs when <SwRootFrame> instance is in construction
// and the document contains only left pages.
if ( Lower()->GetNext() == nullptr &&
- static_cast<SwPageFrm*>(Lower())->IsEmptyPage() )
+ static_cast<SwPageFrame*>(Lower())->IsEmptyPage() )
{
return;
}
@@ -1917,14 +1917,14 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
maPageRects.clear();
- const long nBorder = Frm().Pos().getX();
+ const long nBorder = Frame().Pos().getX();
const long nVisWidth = mnViewWidth - 2 * nBorder;
const long nGapBetweenPages = pViewOpt ? pViewOpt->GetGapBetweenPages()
: (pSh ? pSh->GetViewOptions()->GetGapBetweenPages()
: SwViewOption::GetDefGapBetweenPages());
// check how many pages fit into the first page layout row:
- SwPageFrm* pPageFrm = static_cast<SwPageFrm*>(Lower());
+ SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(Lower());
// will contain the number of pages per row. 0 means that
// the page does not fit.
@@ -1940,23 +1940,23 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
long nSumRowHeight = 0;
SwTwips nMinPageLeft = TWIPS_MAX;
SwTwips nMaxPageRight = 0;
- SwPageFrm* pStartOfRow = pPageFrm;
+ SwPageFrame* pStartOfRow = pPageFrame;
sal_uInt16 nNumberOfPagesInRow = mbBookMode ? 1 : 0; // in book view, start with right page
bool bFirstRow = true;
bool bPageChanged = false;
const bool bRTL = !IsLeftToRightViewLayout();
- const SwTwips nSidebarWidth = SwPageFrm::GetSidebarBorderWidth( pSh );
+ const SwTwips nSidebarWidth = SwPageFrame::GetSidebarBorderWidth( pSh );
- while ( pPageFrm )
+ while ( pPageFrame )
{
// we consider the current page to be "start of row" if
// 1. it is the first page in the current row or
// 2. it is the second page in the row and the first page is an empty page in non-book view:
- const bool bStartOfRow = pPageFrm == pStartOfRow ||
- ( pStartOfRow->IsEmptyPage() && pPageFrm == pStartOfRow->GetNext() && !mbBookMode );
+ const bool bStartOfRow = pPageFrame == pStartOfRow ||
+ ( pStartOfRow->IsEmptyPage() && pPageFrame == pStartOfRow->GetNext() && !mbBookMode );
- const bool bEmptyPage = pPageFrm->IsEmptyPage() && !mbBookMode;
+ const bool bEmptyPage = pPageFrame->IsEmptyPage() && !mbBookMode;
// no half doc border space for first page in each row and
long nPageWidth = 0;
@@ -1964,17 +1964,17 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
if ( mbBookMode )
{
- const SwFrm& rFormatPage = pPageFrm->GetFormatPage();
+ const SwFrame& rFormatPage = pPageFrame->GetFormatPage();
- nPageWidth = rFormatPage.Frm().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrm->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
- nPageHeight = rFormatPage.Frm().Height() + nGapBetweenPages;
+ nPageWidth = rFormatPage.Frame().Width() + nSidebarWidth + ((bStartOfRow || 1 == (pPageFrame->GetPhyPageNum()%2)) ? 0 : nGapBetweenPages);
+ nPageHeight = rFormatPage.Frame().Height() + nGapBetweenPages;
}
else
{
- if ( !pPageFrm->IsEmptyPage() )
+ if ( !pPageFrame->IsEmptyPage() )
{
- nPageWidth = pPageFrm->Frm().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
- nPageHeight = pPageFrm->Frm().Height() + nGapBetweenPages;
+ nPageWidth = pPageFrame->Frame().Width() + nSidebarWidth + (bStartOfRow ? 0 : nGapBetweenPages);
+ nPageHeight = pPageFrame->Frame().Height() + nGapBetweenPages;
}
}
@@ -1996,34 +1996,34 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
nCurrentRowWidth = nCurrentRowWidth + nPageWidth;
nCurrentRowHeight = std::max( nCurrentRowHeight, nPageHeight );
- pPageFrm = static_cast<SwPageFrm*>(pPageFrm->GetNext());
+ pPageFrame = static_cast<SwPageFrame*>(pPageFrame->GetNext());
- if ( !pPageFrm )
+ if ( !pPageFrame )
bRowFinished = true;
}
if ( bRowFinished )
{
- // pPageFrm now points to the first page in the new row or null
+ // pPageFrame now points to the first page in the new row or null
// pStartOfRow points to the first page in the current row
// special centering for last row. pretend to fill the last row with virtual copies of the last page before centering:
- if ( !pPageFrm && nWidthRemain > 0 )
+ if ( !pPageFrame && nWidthRemain > 0 )
{
// find last page in current row:
- const SwPageFrm* pLastPageInCurrentRow = pStartOfRow;
+ const SwPageFrame* pLastPageInCurrentRow = pStartOfRow;
while( pLastPageInCurrentRow->GetNext() )
- pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetNext());
+ pLastPageInCurrentRow = static_cast<const SwPageFrame*>(pLastPageInCurrentRow->GetNext());
if ( pLastPageInCurrentRow->IsEmptyPage() )
- pLastPageInCurrentRow = static_cast<const SwPageFrm*>(pLastPageInCurrentRow->GetPrev());
+ pLastPageInCurrentRow = static_cast<const SwPageFrame*>(pLastPageInCurrentRow->GetPrev());
// check how many times the last page would still fit into the remaining space:
sal_uInt16 nNumberOfVirtualPages = 0;
const sal_uInt16 nMaxNumberOfVirtualPages = mnColumns > 0 ? mnColumns - nNumberOfPagesInRow : USHRT_MAX;
SwTwips nRemain = nWidthRemain;
SwTwips nVirtualPagesWidth = 0;
- SwTwips nLastPageWidth = pLastPageInCurrentRow->Frm().Width() + nSidebarWidth;
+ SwTwips nLastPageWidth = pLastPageInCurrentRow->Frame().Width() + nSidebarWidth;
while ( ( mnColumns > 0 || nRemain > 0 ) && nNumberOfVirtualPages < nMaxNumberOfVirtualPages )
{
@@ -2047,7 +2047,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
{
// #i88036#
nCurrentRowWidth +=
- pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth;
+ pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth;
}
// center page if possible
@@ -2064,20 +2064,20 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
if ( bFirstRow && mbBookMode )
{
// #i88036#
- nX += pStartOfRow->GetFormatPage().Frm().Width() + nSidebarWidth;
+ nX += pStartOfRow->GetFormatPage().Frame().Width() + nSidebarWidth;
}
- SwPageFrm* pEndOfRow = pPageFrm;
- SwPageFrm* pPageToAdjust = pStartOfRow;
+ SwPageFrame* pEndOfRow = pPageFrame;
+ SwPageFrame* pPageToAdjust = pStartOfRow;
do
{
- const SwPageFrm* pFormatPage = pPageToAdjust;
+ const SwPageFrame* pFormatPage = pPageToAdjust;
if ( mbBookMode )
pFormatPage = &pPageToAdjust->GetFormatPage();
- const SwTwips nCurrentPageWidth = pFormatPage->Frm().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
- const Point aOldPagePos = pPageToAdjust->Frm().Pos();
+ const SwTwips nCurrentPageWidth = pFormatPage->Frame().Width() + (pFormatPage->IsEmptyPage() ? 0 : nSidebarWidth);
+ const Point aOldPagePos = pPageToAdjust->Frame().Pos();
const bool bLeftSidebar = pPageToAdjust->SidebarPosition() == sw::sidebarwindows::SidebarPosition::LEFT;
const SwTwips nLeftPageAddOffset = bLeftSidebar ?
nSidebarWidth :
@@ -2114,7 +2114,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
// border of nGapBetweenPages around the current page:
SwRect aPageRectWithBorders( aNewPagePos.getX() - nGapBetweenPages,
aNewPagePos.getY(),
- pPageToAdjust->Frm().SSize().Width() + nGapBetweenPages + nSidebarWidth,
+ pPageToAdjust->Frame().SSize().Width() + nGapBetweenPages + nSidebarWidth,
nCurrentRowHeight );
static const long nOuterClickDiff = 1000000;
@@ -2132,7 +2132,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
maPageRects.push_back( aPageRectWithBorders );
nX = nX + nCurrentPageWidth;
- pPageToAdjust = static_cast<SwPageFrm*>(pPageToAdjust->GetNext());
+ pPageToAdjust = static_cast<SwPageFrame*>(pPageToAdjust->GetNext());
// distance to next page
if ( pPageToAdjust && pPageToAdjust != pEndOfRow )
@@ -2149,7 +2149,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
// 1. the last empty page in a row
// 2. after an empty page
const bool bDontAddGap = ( pPageToAdjust->IsEmptyPage() && pPageToAdjust->GetNext() == pEndOfRow ) ||
- ( static_cast<SwPageFrm*>(pPageToAdjust->GetPrev())->IsEmptyPage() );
+ ( static_cast<SwPageFrame*>(pPageToAdjust->GetPrev())->IsEmptyPage() );
if ( !bDontAddGap )
nX = nX + nGapBetweenPages;
@@ -2172,7 +2172,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
} // end while
// set size of root frame:
- const Size aOldSize( Frm().SSize() );
+ const Size aOldSize( Frame().SSize() );
const Size aNewSize( nMaxPageRight - nBorder, nSumRowHeight - nGapBetweenPages );
if ( bPageChanged || aNewSize != aOldSize )
@@ -2192,7 +2192,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
}
}
- maPagesArea.Pos( Frm().Pos() );
+ maPagesArea.Pos( Frame().Pos() );
maPagesArea.SSize( aNewSize );
if ( TWIPS_MAX != nMinPageLeft )
maPagesArea._Left( nMinPageLeft );
@@ -2200,22 +2200,22 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
SetCallbackActionEnabled( bOldCallbackActionEnabled );
}
-bool SwRootFrm::IsLeftToRightViewLayout() const
+bool SwRootFrame::IsLeftToRightViewLayout() const
{
// Layout direction determined by layout direction of the first page.
// #i88036#
// Only ask a non-empty page frame for its layout direction
- const SwPageFrm& rPage =
- dynamic_cast<const SwPageFrm&>(*Lower()).GetFormatPage();
+ const SwPageFrame& rPage =
+ dynamic_cast<const SwPageFrame&>(*Lower()).GetFormatPage();
return !rPage.IsRightToLeft() && !rPage.IsVertical();
}
-const SwPageFrm& SwPageFrm::GetFormatPage() const
+const SwPageFrame& SwPageFrame::GetFormatPage() const
{
- const SwPageFrm* pRet = this;
+ const SwPageFrame* pRet = this;
if ( IsEmptyPage() )
{
- pRet = static_cast<const SwPageFrm*>( OnRightPage() ? GetNext() : GetPrev() );
+ pRet = static_cast<const SwPageFrame*>( OnRightPage() ? GetNext() : GetPrev() );
// #i88035#
// Typically a right empty page frame has a next non-empty page frame and
// a left empty page frame has a previous non-empty page frame.
@@ -2227,41 +2227,41 @@ const SwPageFrm& SwPageFrm::GetFormatPage() const
{
if ( OnRightPage() )
{
- pRet = static_cast<const SwPageFrm*>( GetPrev() );
+ pRet = static_cast<const SwPageFrame*>( GetPrev() );
}
else
{
- pRet = static_cast<const SwPageFrm*>( GetNext() );
+ pRet = static_cast<const SwPageFrame*>( GetNext() );
}
}
assert(pRet &&
- "<SwPageFrm::GetFormatPage()> - inconsistent layout: empty page without previous and next page frame --> crash.");
+ "<SwPageFrame::GetFormatPage()> - inconsistent layout: empty page without previous and next page frame --> crash.");
}
return *pRet;
}
-bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const
+bool SwPageFrame::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rControl ) const
{
long nUpperLimit = 0;
long nLowerLimit = 0;
- const SwFrm* pFrm = Lower();
- while ( pFrm )
+ const SwFrame* pFrame = Lower();
+ while ( pFrame )
{
- if ( pFrm->IsBodyFrm() )
+ if ( pFrame->IsBodyFrame() )
{
- nUpperLimit = pFrm->Frm().Top();
- nLowerLimit = pFrm->Frm().Bottom();
+ nUpperLimit = pFrame->Frame().Top();
+ nLowerLimit = pFrame->Frame().Bottom();
}
- else if ( pFrm->IsFootnoteContFrm() )
- nLowerLimit = pFrm->Frm().Bottom();
+ else if ( pFrame->IsFootnoteContFrame() )
+ nLowerLimit = pFrame->Frame().Bottom();
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
- SwRect aHeaderArea( Frm().TopLeft(),
- Size( Frm().Width(), nUpperLimit - Frm().Top() ) );
+ SwRect aHeaderArea( Frame().TopLeft(),
+ Size( Frame().Width(), nUpperLimit - Frame().Top() ) );
- SwViewShell* pViewShell = getRootFrm()->GetCurrShell();
+ SwViewShell* pViewShell = getRootFrame()->GetCurrShell();
const bool bHideWhitespaceMode = pViewShell->GetViewOptions()->IsHideWhitespaceMode();
if ( aHeaderArea.IsInside( rPt ) )
{
@@ -2273,8 +2273,8 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon
}
else
{
- SwRect aFooterArea( Point( Frm().Left(), nLowerLimit ),
- Size( Frm().Width(), Frm().Bottom() - nLowerLimit ) );
+ SwRect aFooterArea( Point( Frame().Left(), nLowerLimit ),
+ Size( Frame().Width(), Frame().Bottom() - nLowerLimit ) );
if ( aFooterArea.IsInside( rPt ) &&
(!bHideWhitespaceMode || static_cast<const SwFrameFormat*>(GetRegisteredIn())->GetFooter().IsActive()) )
@@ -2287,7 +2287,7 @@ bool SwPageFrm::IsOverHeaderFooterArea( const Point& rPt, FrameControlType &rCon
return false;
}
-SwTextGridItem const* GetGridItem(SwPageFrm const*const pPage)
+SwTextGridItem const* GetGridItem(SwPageFrame const*const pPage)
{
if (pPage && pPage->HasGrid())
{
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index cbac1bccf9b5..e8f3ffe6713f 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -113,14 +113,14 @@ void SwPageDesc::Mirror()
SfxItemSet aSet( *m_Master.GetAttrSet().GetPool(),
m_Master.GetAttrSet().GetRanges() );
aSet.Put( aLR );
- aSet.Put( m_Master.GetFrmSize() );
+ aSet.Put( m_Master.GetFrameSize() );
aSet.Put( m_Master.GetPaperBin() );
aSet.Put( m_Master.GetULSpace() );
aSet.Put( m_Master.GetBox() );
aSet.Put( m_Master.makeBackgroundBrushItem() );
aSet.Put( m_Master.GetShadow() );
aSet.Put( m_Master.GetCol() );
- aSet.Put( m_Master.GetFrmDir() );
+ aSet.Put( m_Master.GetFrameDir() );
m_Left.SetFormatAttr( aSet );
}
@@ -185,35 +185,35 @@ void SwPageDesc::RegisterChange()
m_nRegHeight = 0;
{
- SwIterator<SwFrm,SwFormat> aIter( GetMaster() );
- for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ SwIterator<SwFrame,SwFormat> aIter( GetMaster() );
+ for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
- if( pLast->IsPageFrm() )
- static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg();
+ if( pLast->IsPageFrame() )
+ static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
}
}
{
- SwIterator<SwFrm,SwFormat> aIter( GetLeft() );
- for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ SwIterator<SwFrame,SwFormat> aIter( GetLeft() );
+ for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
- if( pLast->IsPageFrm() )
- static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg();
+ if( pLast->IsPageFrame() )
+ static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
}
}
{
- SwIterator<SwFrm,SwFormat> aIter( GetFirstMaster() );
- for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ SwIterator<SwFrame,SwFormat> aIter( GetFirstMaster() );
+ for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
- if( pLast->IsPageFrm() )
- static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg();
+ if( pLast->IsPageFrame() )
+ static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
}
}
{
- SwIterator<SwFrm,SwFormat> aIter( GetFirstLeft() );
- for( SwFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ SwIterator<SwFrame,SwFormat> aIter( GetFirstLeft() );
+ for( SwFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
- if( pLast->IsPageFrm() )
- static_cast<SwPageFrm*>(pLast)->PrepareRegisterChg();
+ if( pLast->IsPageFrame() )
+ static_cast<SwPageFrame*>(pLast)->PrepareRegisterChg();
}
}
}
@@ -231,10 +231,10 @@ void SwPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
}
}
-static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
+static const SwFrame* lcl_GetFrameOfNode( const SwNode& rNd )
{
const SwModify* pMod;
- sal_uInt16 nFrmType = FRM_CNTNT;
+ sal_uInt16 nFrameType = FRM_CNTNT;
if( rNd.IsContentNode() )
{
@@ -243,22 +243,22 @@ static const SwFrm* lcl_GetFrmOfNode( const SwNode& rNd )
else if( rNd.IsTableNode() )
{
pMod = static_cast<const SwTableNode&>(rNd).GetTable().GetFrameFormat();
- nFrmType = FRM_TAB;
+ nFrameType = FRM_TAB;
}
else
pMod = nullptr;
Point aNullPt;
- return pMod ? ::GetFrmOfModify( nullptr, *pMod, nFrmType, &aNullPt )
+ return pMod ? ::GetFrameOfModify( nullptr, *pMod, nFrameType, &aNullPt )
: nullptr;
}
const SwPageDesc* SwPageDesc::GetPageDescOfNode(const SwNode& rNd)
{
const SwPageDesc* pRet = nullptr;
- const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
- if (pChkFrm && nullptr != (pChkFrm = pChkFrm->FindPageFrm()))
- pRet = static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc();
+ const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
+ if (pChkFrame && nullptr != (pChkFrame = pChkFrame->FindPageFrame()))
+ pRet = static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc();
return pRet;
}
@@ -267,19 +267,19 @@ const SwFrameFormat* SwPageDesc::GetPageFormatOfNode( const SwNode& rNd,
{
// which PageDescFormat is valid for this node?
const SwFrameFormat* pRet;
- const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
+ const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
- if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() ))
+ if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() ))
{
const SwPageDesc* pPd = bCheckForThisPgDc ? this :
- static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc();
+ static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc();
pRet = &pPd->GetMaster();
- OSL_ENSURE( static_cast<const SwPageFrm*>(pChkFrm)->GetPageDesc() == pPd, "Wrong node for detection of page format!" );
+ OSL_ENSURE( static_cast<const SwPageFrame*>(pChkFrame)->GetPageDesc() == pPd, "Wrong node for detection of page format!" );
// this page is assigned to which format?
- if( !pChkFrm->KnowsFormat(*pRet) )
+ if( !pChkFrame->KnowsFormat(*pRet) )
{
pRet = &pPd->GetLeft();
- OSL_ENSURE( pChkFrm->KnowsFormat(*pRet), "Wrong node for detection of page format!" );
+ OSL_ENSURE( pChkFrame->KnowsFormat(*pRet), "Wrong node for detection of page format!" );
}
}
else
@@ -292,11 +292,11 @@ bool SwPageDesc::IsFollowNextPageOfNode( const SwNode& rNd ) const
bool bRet = false;
if( GetFollow() && this != GetFollow() )
{
- const SwFrm* pChkFrm = lcl_GetFrmOfNode( rNd );
- if( pChkFrm && nullptr != ( pChkFrm = pChkFrm->FindPageFrm() ) &&
- pChkFrm->IsPageFrm() &&
- ( !pChkFrm->GetNext() || GetFollow() ==
- static_cast<const SwPageFrm*>(pChkFrm->GetNext())->GetPageDesc() ))
+ const SwFrame* pChkFrame = lcl_GetFrameOfNode( rNd );
+ if( pChkFrame && nullptr != ( pChkFrame = pChkFrame->FindPageFrame() ) &&
+ pChkFrame->IsPageFrame() &&
+ ( !pChkFrame->GetNext() || GetFollow() ==
+ static_cast<const SwPageFrame*>(pChkFrame->GetNext())->GetPageDesc() ))
// the page on which the follow points was found
bRet = true;
}
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 54d8a82b40db..683202a63037 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -139,17 +139,17 @@ class SwLineRect : public SwRect
{
Color aColor;
SvxBorderStyle nStyle;
- const SwTabFrm *pTab;
+ const SwTabFrame *pTab;
sal_uInt8 nSubColor; //colorize subsidiary lines
bool bPainted; //already painted?
sal_uInt8 nLock; //To distinguish the line and the hell layer.
public:
SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
- const SwTabFrm *pT , const sal_uInt8 nSCol );
+ const SwTabFrame *pT , const sal_uInt8 nSCol );
const Color& GetColor() const { return aColor;}
SvxBorderStyle GetStyle() const { return nStyle; }
- const SwTabFrm *GetTab() const { return pTab; }
+ const SwTabFrame *GetTab() const { return pTab; }
void SetPainted() { bPainted = true; }
void Lock( bool bLock ) { if ( bLock )
++nLock;
@@ -192,7 +192,7 @@ public:
#endif
}
void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle,
- const SwTabFrm *pTab, const sal_uInt8 nSCol, SwPaintProperties &properties );
+ const SwTabFrame *pTab, const sal_uInt8 nSCol, SwPaintProperties &properties );
void ConnectEdges( OutputDevice *pOut, SwPaintProperties &properties );
void PaintLines ( OutputDevice *pOut, SwPaintProperties &properties );
void LockLines( bool bLock );
@@ -257,9 +257,9 @@ struct SwPaintProperties {
// Retouch for transparent Flys is done by the background of the Flys.
// The Fly itself should certainly not be spared out. See PaintBackground and
// lcl_SubtractFlys()
- SwFlyFrm *pSRetoucheFly;
- SwFlyFrm *pSRetoucheFly2;
- SwFlyFrm *pSFlyOnlyDraw;
+ SwFlyFrame *pSRetoucheFly;
+ SwFlyFrame *pSRetoucheFly2;
+ SwFlyFrame *pSFlyOnlyDraw;
// The borders will be collected in pSLines during the Paint and later
// possibly merge them.
@@ -275,7 +275,7 @@ struct SwPaintProperties {
SfxProgress *pSProgress;
// Sizes of a pixel and the corresponding halves. Will be reset when
- // entering SwRootFrm::Paint
+ // entering SwRootFrame::Paint
long nSPixelSzW;
long nSPixelSzH;
long nSHalfPixelSzW;
@@ -627,7 +627,7 @@ void BorderLines::AddBorderLine(
}
SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl,
- const SwTabFrm *pT, const sal_uInt8 nSCol ) :
+ const SwTabFrame *pT, const sal_uInt8 nSCol ) :
SwRect( rRect ),
nStyle( nStyl ),
pTab( pT ),
@@ -677,7 +677,7 @@ bool SwLineRect::MakeUnion( const SwRect &rRect, SwPaintProperties& properties)
}
void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle,
- const SwTabFrm *pTab, const sal_uInt8 nSCol, SwPaintProperties& properties )
+ const SwTabFrame *pTab, const sal_uInt8 nSCol, SwPaintProperties& properties )
{
// Loop backwards because lines which can be combined, can usually be painted
// in the same context
@@ -1049,8 +1049,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
// Vertical edge, overlapping with the table edge?
SwTwips nLLeft = rLRect.Left() - 30,
nLRight = rLRect.Right() + 30,
- nTLeft = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Left(),
- nTRight = rLRect.GetTab()->Frm().Left() + rLRect.GetTab()->Prt().Right();
+ nTLeft = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Left(),
+ nTRight = rLRect.GetTab()->Frame().Left() + rLRect.GetTab()->Prt().Right();
if ( (nTLeft >= nLLeft && nTLeft <= nLRight) ||
(nTRight>= nLLeft && nTRight<= nLRight) )
bPaint = false;
@@ -1060,8 +1060,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
// Horizontal edge, overlapping with the table edge?
SwTwips nLTop = rLRect.Top() - 30,
nLBottom = rLRect.Bottom() + 30,
- nTTop = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Top(),
- nTBottom = rLRect.GetTab()->Frm().Top() + rLRect.GetTab()->Prt().Bottom();
+ nTTop = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Top(),
+ nTBottom = rLRect.GetTab()->Frame().Top() + rLRect.GetTab()->Prt().Bottom();
if ( (nTTop >= nLTop && nTTop <= nLBottom) ||
(nTBottom >= nLTop && nTBottom <= nLBottom) )
bPaint = false;
@@ -1427,7 +1427,7 @@ static long lcl_MinHeightDist( const long nDist, SwPaintProperties& properties )
/**
* Calculate PrtArea plus surrounding plus shadow
*/
-static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
+static void lcl_CalcBorderRect( SwRect &rRect, const SwFrame *pFrame,
const SwBorderAttrs &rAttrs,
const bool bShadow,
SwPaintProperties& properties)
@@ -1439,25 +1439,25 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
// Notes: Borders of cell frames in R2L text direction will switch its side
// - left border is painted on the right; right border on the left.
// See <lcl_PaintLeftLine> and <lcl_PaintRightLine>.
- if( pFrm->IsSctFrm() )
+ if( pFrame->IsSctFrame() )
{
- rRect = pFrm->Prt();
- rRect.Pos() += pFrm->Frm().Pos();
+ rRect = pFrame->Prt();
+ rRect.Pos() += pFrame->Frame().Pos();
}
- else if ( pFrm->IsCellFrm() )
- rRect = pFrm->Frm();
+ else if ( pFrame->IsCellFrame() )
+ rRect = pFrame->Frame();
else
{
- rRect = pFrm->Prt();
- rRect.Pos() += pFrm->Frm().Pos();
+ rRect = pFrame->Prt();
+ rRect.Pos() += pFrame->Frame().Pos();
if ( rAttrs.IsLine() || rAttrs.IsBorderDist() ||
(bShadow && rAttrs.GetShadow().GetLocation() != SVX_SHADOW_NONE) )
{
- SwRectFn fnRect = pFrm->IsVertical() ? ( pFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
+ SwRectFn fnRect = pFrame->IsVertical() ? ( pFrame->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
const SvxBoxItem &rBox = rAttrs.GetBox();
- const bool bTop = 0 != (pFrm->*fnRect->fnGetTopMargin)();
+ const bool bTop = 0 != (pFrame->*fnRect->fnGetTopMargin)();
if ( bTop )
{
SwTwips nDiff = rBox.GetTop() ?
@@ -1469,17 +1469,17 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
(rRect.*fnRect->fnSubTop)( nDiff );
}
- const bool bBottom = 0 != (pFrm->*fnRect->fnGetBottomMargin)();
+ const bool bBottom = 0 != (pFrame->*fnRect->fnGetBottomMargin)();
if ( bBottom )
{
SwTwips nDiff = 0;
// #i29550#
- if ( pFrm->IsTabFrm() &&
- static_cast<const SwTabFrm*>(pFrm)->IsCollapsingBorders() )
+ if ( pFrame->IsTabFrame() &&
+ static_cast<const SwTabFrame*>(pFrame)->IsCollapsingBorders() )
{
// For collapsing borders, we have to add the height of
// the height of the last line
- nDiff = static_cast<const SwTabFrm*>(pFrm)->GetBottomLineSize();
+ nDiff = static_cast<const SwTabFrame*>(pFrame)->GetBottomLineSize();
}
else
{
@@ -1527,27 +1527,27 @@ static void lcl_CalcBorderRect( SwRect &rRect, const SwFrm *pFrm,
* top of next frame, if border/shadow is joined with previous/next frame
*/
static void lcl_ExtendLeftAndRight( SwRect& _rRect,
- const SwFrm& _rFrm,
+ const SwFrame& _rFrame,
const SwBorderAttrs& _rAttrs,
const SwRectFn& _rRectFn )
{
- if ( _rAttrs.JoinedWithPrev( _rFrm ) )
+ if ( _rAttrs.JoinedWithPrev( _rFrame ) )
{
- const SwFrm* pPrevFrm = _rFrm.GetPrev();
- (_rRect.*_rRectFn->fnSetTop)( (pPrevFrm->*_rRectFn->fnGetPrtBottom)() );
+ const SwFrame* pPrevFrame = _rFrame.GetPrev();
+ (_rRect.*_rRectFn->fnSetTop)( (pPrevFrame->*_rRectFn->fnGetPrtBottom)() );
}
- if ( _rAttrs.JoinedWithNext( _rFrm ) )
+ if ( _rAttrs.JoinedWithNext( _rFrame ) )
{
- const SwFrm* pNextFrm = _rFrm.GetNext();
- (_rRect.*_rRectFn->fnSetBottom)( (pNextFrm->*_rRectFn->fnGetPrtTop)() );
+ const SwFrame* pNextFrame = _rFrame.GetNext();
+ (_rRect.*_rRectFn->fnSetBottom)( (pNextFrame->*_rRectFn->fnGetPrtTop)() );
}
}
-static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
+static void lcl_SubtractFlys( const SwFrame *pFrame, const SwPageFrame *pPage,
const SwRect &rRect, SwRegionRects &rRegion, SwPaintProperties & rProperties)
{
const SwSortedObjs& rObjs = *pPage->GetSortedObjs();
- const SwFlyFrm* pSelfFly = pFrm->IsInFly() ? pFrm->FindFlyFrm() : gProp.pSRetoucheFly2;
+ const SwFlyFrame* pSelfFly = pFrame->IsInFly() ? pFrame->FindFlyFrame() : gProp.pSRetoucheFly2;
if (!gProp.pSRetoucheFly)
gProp.pSRetoucheFly = gProp.pSRetoucheFly2;
@@ -1560,12 +1560,12 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
if (!pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(pSdrObj->GetLayer()))
continue;
- if (dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr)
+ if (dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr)
continue;
- const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
+ const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
- if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->Frm()))
+ if (pSelfFly == pFly || gProp.pSRetoucheFly == pFly || !rRect.IsOver(pFly->Frame()))
continue;
if (!pFly->GetFormat()->GetPrint().GetValue() &&
@@ -1591,7 +1591,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
//or be character bound.
if (pSelfFly && bLowerOfSelf)
{
- OSL_ENSURE( pFly->IsFlyInCntFrm() ||
+ OSL_ENSURE( pFly->IsFlyInContentFrame() ||
pSdrObj->GetOrdNumDirect() > pSelfFly->GetVirtDrawObj()->GetOrdNumDirect(),
"Fly with wrong z-Order" );
}
@@ -1641,11 +1641,11 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
bool bHell = pSdrObj->GetLayer() == rIDDMA.GetHellId();
if ( (bStopOnHell && bHell) ||
/// Change internal order of condition
- /// first check "!bHell", then "..->Lower()" and "..->IsNoTextFrm()"
+ /// first check "!bHell", then "..->Lower()" and "..->IsNoTextFrame()"
/// have not to be performed, if frame is in "Hell"
- ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTextFrm() &&
- (static_cast<SwNoTextFrm const*>(pFly->Lower())->IsTransparent() ||
- static_cast<SwNoTextFrm const*>(pFly->Lower())->HasAnimation() ||
+ ( !bHell && pFly->Lower() && pFly->Lower()->IsNoTextFrame() &&
+ (static_cast<SwNoTextFrame const*>(pFly->Lower())->IsTransparent() ||
+ static_cast<SwNoTextFrame const*>(pFly->Lower())->HasAnimation() ||
pFly->GetFormat()->GetSurround().IsContour()
)
)
@@ -1667,13 +1667,13 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
// avoids drawing of transparent areas more than once, if
// a fly frame inherites a transparent background from its
// parent fly frame.
- if (pFrm->IsFlyFrm() &&
- (pFly->GetAnchorFrm()->FindFlyFrm() == pFrm) &&
+ if (pFrame->IsFlyFrame() &&
+ (pFly->GetAnchorFrame()->FindFlyFrame() == pFrame) &&
static_cast<const SwFlyFrameFormat*>(pFly->GetFormat())->IsBackgroundBrushInherited()
)
{
SwRect aRect;
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(pFly) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(pFly) );
const SwBorderAttrs &rAttrs = *aAccess.Get();
::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties );
rRegion -= aRect;
@@ -1685,12 +1685,12 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
}
}
- if (bHell && pFly->GetAnchorFrm()->IsInFly())
+ if (bHell && pFly->GetAnchorFrame()->IsInFly())
{
//So the border won't get dismantled by the background of the other
//Fly.
SwRect aRect;
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(pFly) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(pFly) );
const SwBorderAttrs &rAttrs = *aAccess.Get();
::lcl_CalcBorderRect( aRect, pFly, rAttrs, true, rProperties );
rRegion -= aRect;
@@ -1698,7 +1698,7 @@ static void lcl_SubtractFlys( const SwFrm *pFrm, const SwPageFrm *pPage,
else
{
SwRect aRect( pFly->Prt() );
- aRect += pFly->Frm().Pos();
+ aRect += pFly->Frame().Pos();
rRegion -= aRect;
}
}
@@ -2313,7 +2313,7 @@ void DrawGraphic(
}
/**
- * Local helper for SwRootFrm::Paint(..) - Adjust given rectangle to pixel size
+ * Local helper for SwRootFrame::Paint(..) - Adjust given rectangle to pixel size
*
* By OD at 27.09.2002 for #103636#
* In order to avoid paint errors caused by multiple alignments (e.g. ::SwAlignRect(..))
@@ -2501,15 +2501,15 @@ struct lt_SwLineEntry
typedef std::set< SwLineEntry, lt_SwLineEntry > SwLineEntrySet;
typedef std::map< SwTwips, SwLineEntrySet > SwLineEntryMap;
-class SwTabFrmPainter
+class SwTabFramePainter
{
SwLineEntryMap maVertLines;
SwLineEntryMap maHoriLines;
- const SwTabFrm& mrTabFrm;
+ const SwTabFrame& mrTabFrame;
void Insert( SwLineEntry&, bool bHori );
- void Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem );
- void HandleFrame( const SwLayoutFrm& rFrm );
+ void Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxItem );
+ void HandleFrame( const SwLayoutFrame& rFrame );
void FindStylesForLine( const Point&,
const Point&,
svx::frame::Style*,
@@ -2518,49 +2518,49 @@ class SwTabFrmPainter
void AdjustTopLeftFrames();
public:
- explicit SwTabFrmPainter( const SwTabFrm& rTabFrm );
+ explicit SwTabFramePainter( const SwTabFrame& rTabFrame );
void PaintLines( OutputDevice& rDev, const SwRect& rRect ) const;
};
-SwTabFrmPainter::SwTabFrmPainter( const SwTabFrm& rTabFrm )
- : mrTabFrm( rTabFrm )
+SwTabFramePainter::SwTabFramePainter( const SwTabFrame& rTabFrame )
+ : mrTabFrame( rTabFrame )
{
- HandleFrame( rTabFrm );
+ HandleFrame( rTabFrame );
AdjustTopLeftFrames();
}
-void SwTabFrmPainter::HandleFrame( const SwLayoutFrm& rLayoutFrm )
+void SwTabFramePainter::HandleFrame( const SwLayoutFrame& rLayoutFrame )
{
// Add border lines of cell frames. Skip covered cells. Skip cells
// in special row span row, which do not have a negative row span:
- if ( rLayoutFrm.IsCellFrm() && !rLayoutFrm.IsCoveredCell() )
+ if ( rLayoutFrame.IsCellFrame() && !rLayoutFrame.IsCoveredCell() )
{
- const SwCellFrm* pThisCell = static_cast<const SwCellFrm*>(&rLayoutFrm);
- const SwRowFrm* pRowFrm = static_cast<const SwRowFrm*>(pThisCell->GetUpper());
+ const SwCellFrame* pThisCell = static_cast<const SwCellFrame*>(&rLayoutFrame);
+ const SwRowFrame* pRowFrame = static_cast<const SwRowFrame*>(pThisCell->GetUpper());
const long nRowSpan = pThisCell->GetTabBox()->getRowSpan();
- if ( !pRowFrm->IsRowSpanLine() || nRowSpan > 1 || nRowSpan < -1 )
+ if ( !pRowFrame->IsRowSpanLine() || nRowSpan > 1 || nRowSpan < -1 )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), &rLayoutFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), &rLayoutFrame );
const SwBorderAttrs& rAttrs = *aAccess.Get();
const SvxBoxItem& rBox = rAttrs.GetBox();
- Insert( rLayoutFrm, rBox );
+ Insert( rLayoutFrame, rBox );
}
}
// Recurse into lower layout frames, but do not recurse into lower tabframes.
- const SwFrm* pLower = rLayoutFrm.Lower();
+ const SwFrame* pLower = rLayoutFrame.Lower();
while ( pLower )
{
- const SwLayoutFrm* pLowerLayFrm = dynamic_cast<const SwLayoutFrm*>(pLower);
- if ( pLowerLayFrm && !pLowerLayFrm->IsTabFrm() )
- HandleFrame( *pLowerLayFrm );
+ const SwLayoutFrame* pLowerLayFrame = dynamic_cast<const SwLayoutFrame*>(pLower);
+ if ( pLowerLayFrame && !pLowerLayFrame->IsTabFrame() )
+ HandleFrame( *pLowerLayFrame );
pLower = pLower->GetNext();
}
}
-void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
+void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
{
// #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, rDev );
@@ -2582,9 +2582,9 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
rDev.SetDrawMode( DrawModeFlags::Default );
}
- const SwFrm* pUpper = mrTabFrm.GetUpper();
+ const SwFrame* pUpper = mrTabFrame.GetUpper();
SwRect aUpper( pUpper->Prt() );
- aUpper.Pos() += pUpper->Frm().Pos();
+ aUpper.Pos() += pUpper->Frame().Pos();
SwRect aUpperAligned( aUpper );
::SwAlignRect( aUpperAligned, gProp.pSGlobalShell, &rDev );
@@ -2730,7 +2730,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
// logically vertical lines are painted centered on the line,
// logically horizontal lines are painted "below" the line
- bool const isBelow((mrTabFrm.IsVertical()) ? !bHori : bHori);
+ bool const isBelow((mrTabFrame.IsVertical()) ? !bHori : bHori);
double const offsetStart = (isBelow)
? aStyles[0].GetWidth() / 2.0
: std::max<double>(aStyles[1].GetWidth(),
@@ -2739,7 +2739,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
? aStyles[0].GetWidth() / 2.0
: std::max<double>(aStyles[4].GetWidth(),
aStyles[6].GetWidth()) / 2.0;
- if (mrTabFrm.IsVertical())
+ if (mrTabFrame.IsVertical())
{
aPaintStart.X() -= static_cast<long>(offsetStart + 0.5);
aPaintEnd.X() -= static_cast<long>(offsetEnd + 0.5);
@@ -2752,7 +2752,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
if (bHori)
{
- mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
+ mrTabFrame.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
aPaintStart,
aPaintEnd,
aStyles[ 0 ], // current style
@@ -2767,7 +2767,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
}
else
{
- mrTabFrm.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
+ mrTabFrame.ProcessPrimitives( svx::frame::CreateBorderPrimitives(
aPaintEnd,
aPaintStart,
aStyles[ 0 ], // current style
@@ -2794,7 +2794,7 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
* StartPoint or Endpoint. The styles of these lines are required for DR's magic
* line painting functions
*/
-void SwTabFrmPainter::FindStylesForLine( const Point& rStartPoint,
+void SwTabFramePainter::FindStylesForLine( const Point& rStartPoint,
const Point& rEndPoint,
svx::frame::Style* pStyles,
bool bHori ) const
@@ -2938,7 +2938,7 @@ void calcOffsetForDoubleLine( SwLineEntryMap& rLines )
}
-void SwTabFrmPainter::AdjustTopLeftFrames()
+void SwTabFramePainter::AdjustTopLeftFrames()
{
calcOffsetForDoubleLine(maHoriLines);
calcOffsetForDoubleLine(maVertLines);
@@ -2949,37 +2949,37 @@ void SwTabFrmPainter::AdjustTopLeftFrames()
* first line in follow table without repeated headlines
*/
static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
- SwTabFrm const& rTabFrm, SwFrm const& rFrm, SvxBoxItem const& rBoxItem)
-{
- SwRowFrm const*const pThisRowFrm =
- dynamic_cast<const SwRowFrm*>(rFrm.GetUpper());
- return (pThisRowFrm
- && (pThisRowFrm->GetUpper() == &rTabFrm)
- && rTabFrm.IsFollow()
- && !rTabFrm.GetTable()->GetRowsToRepeat()
- && ( !pThisRowFrm->GetPrev()
- || static_cast<const SwRowFrm*>(pThisRowFrm->GetPrev())
+ SwTabFrame const& rTabFrame, SwFrame const& rFrame, SvxBoxItem const& rBoxItem)
+{
+ SwRowFrame const*const pThisRowFrame =
+ dynamic_cast<const SwRowFrame*>(rFrame.GetUpper());
+ return (pThisRowFrame
+ && (pThisRowFrame->GetUpper() == &rTabFrame)
+ && rTabFrame.IsFollow()
+ && !rTabFrame.GetTable()->GetRowsToRepeat()
+ && ( !pThisRowFrame->GetPrev()
+ || static_cast<const SwRowFrame*>(pThisRowFrame->GetPrev())
->IsRowSpanLine())
&& !rBoxItem.GetTop()
&& rBoxItem.GetBottom());
}
-void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
+void SwTabFramePainter::Insert( const SwFrame& rFrame, const SvxBoxItem& rBoxItem )
{
// build 4 line entries for the 4 borders:
- SwRect aBorderRect = rFrm.Frm();
- if ( rFrm.IsTabFrm() )
+ SwRect aBorderRect = rFrame.Frame();
+ if ( rFrame.IsTabFrame() )
{
- aBorderRect = rFrm.Prt();
- aBorderRect.Pos() += rFrm.Frm().Pos();
+ aBorderRect = rFrame.Prt();
+ aBorderRect.Pos() += rFrame.Frame().Pos();
}
bool const bBottomAsTop(lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
- mrTabFrm, rFrm, rBoxItem));
- bool const bVert = mrTabFrm.IsVertical();
- bool const bR2L = mrTabFrm.IsRightToLeft();
+ mrTabFrame, rFrame, rBoxItem));
+ bool const bVert = mrTabFrame.IsVertical();
+ bool const bR2L = mrTabFrame.IsRightToLeft();
- SwViewShell* pViewShell = mrTabFrm.getRootFrm()->GetCurrShell();
+ SwViewShell* pViewShell = mrTabFrame.getRootFrame()->GetCurrShell();
OutputDevice* pOutDev = pViewShell->GetOut();
const MapMode& rMapMode = pOutDev->GetMapMode();
const Fraction& rFracX = rMapMode.GetScaleX();
@@ -3022,7 +3022,7 @@ void SwTabFrmPainter::Insert( const SwFrm& rFrm, const SvxBoxItem& rBoxItem )
Insert( aBottom, true );
}
-void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori )
+void SwTabFramePainter::Insert( SwLineEntry& rNew, bool bHori )
{
// get all lines from structure, that have key entry of pLE
SwLineEntryMap* pLine2 = bHori ? &maHoriLines : &maVertLines;
@@ -3147,7 +3147,7 @@ namespace
SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject();
if ( pObj )
{
- bPaint = SwFlyFrm::IsPaint( pObj, &mrViewShell );
+ bPaint = SwFlyFrame::IsPaint( pObj, &mrViewShell );
}
if ( !bPaint )
@@ -3172,9 +3172,9 @@ namespace
* 3. Paint the document content (text)
* 4. Paint the draw layer that is above the document
|*/
-void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const
+void SwRootFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const pPrintData) const
{
- OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower of root is no page." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "Lower of root is no page." );
PROTOCOL( this, PROT_FILE_INIT, 0, nullptr)
@@ -3187,14 +3187,14 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
{
return;
}
- if (SwRootFrm::s_isInPaint)
+ if (SwRootFrame::s_isInPaint)
{
SwPaintQueue::Add( pSh, rRect );
return;
}
}
else
- SwRootFrm::s_isInPaint = bResetRootPaint = true;
+ SwRootFrame::s_isInPaint = bResetRootPaint = true;
SwSavePaintStatics *pStatics = nullptr;
if ( gProp.pSGlobalShell )
@@ -3231,8 +3231,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
}
if ( bPerformLayoutAction )
{
- const_cast<SwRootFrm*>(this)->ResetTurbo();
- SwLayAction aAction( const_cast<SwRootFrm*>(this), pSh->Imp() );
+ const_cast<SwRootFrame*>(this)->ResetTurbo();
+ SwLayAction aAction( const_cast<SwRootFrame*>(this), pSh->Imp() );
aAction.SetPaint( false );
aAction.SetComplete( false );
aAction.SetReschedule( gProp.pSProgress != nullptr );
@@ -3254,13 +3254,13 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
// of the document. Dangerous! We better set this flag to
// avoid the reformat.
const bool bOldAction = IsCallbackActionEnabled();
- const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false );
+ const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( false );
- const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext);
+ const SwPageFrame *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext);
const bool bBookMode = gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode();
- if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() )
- pPage = static_cast<const SwPageFrm*>(pPage->GetPrev());
+ if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() )
+ pPage = static_cast<const SwPageFrame*>(pPage->GetPrev());
// #i68597#
const bool bGridPainting(pSh->GetWin() && pSh->Imp()->HasDrawView() && pSh->Imp()->GetDrawView()->IsGridVisible());
@@ -3271,10 +3271,10 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
{
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
- const SwPageFrm* pHiddenPage = pPage;
+ const SwPageFrame* pHiddenPage = pPage;
while ( pHiddenPage->GetPrev() != nullptr )
{
- pHiddenPage = static_cast< const SwPageFrm* >( pHiddenPage->GetPrev() );
+ pHiddenPage = static_cast< const SwPageFrame* >( pHiddenPage->GetPrev() );
SwFrameControlPtr pControl = rMngr.GetControl( PageBreak, pHiddenPage );
if ( pControl.get() )
pControl->ShowAll( false );
@@ -3293,7 +3293,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
if ( !pPage->IsEmptyPage() )
{
SwRect aPaintRect;
- SwPageFrm::GetBorderAndShadowBoundRect( pPage->Frm(), pSh, &rRenderContext, aPaintRect,
+ SwPageFrame::GetBorderAndShadowBoundRect( pPage->Frame(), pSh, &rRenderContext, aPaintRect,
bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
if ( aRect.IsOver( aPaintRect ) )
@@ -3315,8 +3315,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
SWRECTFN( pPage )
SwRect aPageRectTemp( aPaintRect );
(aPageRectTemp.*fnRect->fnSetLeftAndWidth)(
- (pPage->Frm().*fnRect->fnGetLeft)(),
- (pPage->Frm().*fnRect->fnGetWidth)() );
+ (pPage->Frame().*fnRect->fnGetLeft)(),
+ (pPage->Frame().*fnRect->fnGetWidth)() );
aPageRectTemp._Intersection( pSh->VisArea() );
vcl::Region aPageRectRegion( aPageRectTemp.SVRect() );
aPageRectRegion.Exclude( aPaintRect.SVRect() );
@@ -3368,7 +3368,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess();
pSh->Imp()->PaintLayer( rIDDMA.GetHellId(),
pPrintData,
- pPage->Frm(),
+ pPage->Frame(),
&aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
@@ -3393,8 +3393,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
if( pSh->GetWin() && pSh->GetDoc()->GetDocShell() &&
!pSh->GetDoc()->GetDocShell()->IsInPlaceActive() )
{
- SwPageFrm::PaintBorderAndShadow( pPage->Frm(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
- SwPageFrm::PaintNotesSidebar( pPage->Frm(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
+ SwPageFrame::PaintBorderAndShadow( pPage->Frame(), pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
+ SwPageFrame::PaintNotesSidebar( pPage->Frame(), pSh, pPage->GetPhyPageNum(), bRightSidebar);
}
gProp.pSLines->PaintLines( pSh->GetOut(), gProp );
@@ -3415,7 +3415,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
// OD 09.12.2002 #103045# - add 4th parameter for horizontal text direction.
pSh->Imp()->PaintLayer( pSh->GetDoc()->getIDocumentDrawModelAccess().GetHeavenId(),
pPrintData,
- pPage->Frm(),
+ pPage->Frame(),
&aPageBackgrdColor,
pPage->IsRightToLeft(),
&aSwRedirector );
@@ -3451,13 +3451,13 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
{
// paint empty page
SwRect aPaintRect;
- SwRect aEmptyPageRect( pPage->Frm() );
+ SwRect aEmptyPageRect( pPage->Frame() );
// code from vprint.cxx
- const SwPageFrm& rFormatPage = pPage->GetFormatPage();
- aEmptyPageRect.SSize() = rFormatPage.Frm().SSize();
+ const SwPageFrame& rFormatPage = pPage->GetFormatPage();
+ aEmptyPageRect.SSize() = rFormatPage.Frame().SSize();
- SwPageFrm::GetBorderAndShadowBoundRect( aEmptyPageRect, pSh, &rRenderContext, aPaintRect,
+ SwPageFrame::GetBorderAndShadowBoundRect( aEmptyPageRect, pSh, &rRenderContext, aPaintRect,
bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
aPaintRect._Intersection( aRect );
@@ -3484,7 +3484,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
pSh->GetOut()->DrawRect( aEmptyPageRect.SVRect() );
// paint empty page text
- const vcl::Font& rEmptyPageFont = SwPageFrm::GetEmptyPageFont();
+ const vcl::Font& rEmptyPageFont = SwPageFrame::GetEmptyPageFont();
const vcl::Font aOldFont( pSh->GetOut()->GetFont() );
pSh->GetOut()->SetFont( rEmptyPageFont );
@@ -3497,8 +3497,8 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
// paint shadow and border for empty page
// OD 19.02.2003 #107369# - use new method to paint page border and
// shadow
- SwPageFrm::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
- SwPageFrm::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar);
+ SwPageFrame::PaintBorderAndShadow( aEmptyPageRect, pSh, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
+ SwPageFrame::PaintNotesSidebar( aEmptyPageRect, pSh, pPage->GetPhyPageNum(), bRightSidebar);
{
pSh->DLPostPaint2(true);
@@ -3506,15 +3506,15 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
}
}
- OSL_ENSURE( !pPage->GetNext() || pPage->GetNext()->IsPageFrm(),
+ OSL_ENSURE( !pPage->GetNext() || pPage->GetNext()->IsPageFrame(),
"Neighbour of page is not a page." );
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
DELETEZ( gProp.pSLines );
if ( bResetRootPaint )
- SwRootFrm::s_isInPaint = false;
+ SwRootFrame::s_isInPaint = false;
if ( pStatics )
delete pStatics;
else
@@ -3523,19 +3523,19 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
gProp.pSGlobalShell = nullptr;
}
- const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction );
+ const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( bOldAction );
}
-static void lcl_EmergencyFormatFootnoteCont( SwFootnoteContFrm *pCont )
+static void lcl_EmergencyFormatFootnoteCont( SwFootnoteContFrame *pCont )
{
- vcl::RenderContext* pRenderContext = pCont->getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = pCont->getRootFrame()->GetCurrShell()->GetOut();
//It's possible that the Cont will get destroyed.
- SwContentFrm *pCnt = pCont->ContainsContent();
+ SwContentFrame *pCnt = pCont->ContainsContent();
while ( pCnt && pCnt->IsInFootnote() )
{
pCnt->Calc(pRenderContext);
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
@@ -3544,16 +3544,16 @@ class SwShortCut
SwRectDist fnCheck;
long nLimit;
public:
- SwShortCut( const SwFrm& rFrm, const SwRect& rRect );
+ SwShortCut( const SwFrame& rFrame, const SwRect& rRect );
bool Stop( const SwRect& rRect ) const
{ return (rRect.*fnCheck)( nLimit ) > 0; }
};
-SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
+SwShortCut::SwShortCut( const SwFrame& rFrame, const SwRect& rRect )
{
- bool bVert = rFrm.IsVertical();
- bool bR2L = rFrm.IsRightToLeft();
- if( rFrm.IsNeighbourFrm() && bVert == bR2L )
+ bool bVert = rFrame.IsVertical();
+ bool bR2L = rFrame.IsRightToLeft();
+ if( rFrame.IsNeighbourFrame() && bVert == bR2L )
{
if( bVert )
{
@@ -3566,14 +3566,14 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
nLimit = rRect.Left() + rRect.Width();
}
}
- else if( bVert == rFrm.IsNeighbourFrm() )
+ else if( bVert == rFrame.IsNeighbourFrame() )
{
fnCheck = &SwRect::GetTopDistance;
nLimit = rRect.Top() + rRect.Height();
}
else
{
- if ( rFrm.IsVertLR() )
+ if ( rFrame.IsVertLR() )
{
fnCheck = &SwRect::GetLeftDistance;
nLimit = rRect.Right();
@@ -3586,33 +3586,33 @@ SwShortCut::SwShortCut( const SwFrm& rFrm, const SwRect& rRect )
}
}
-void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
+void SwLayoutFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
// #i16816# tagged pdf support
- Frm_Info aFrmInfo( *this );
- SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrmInfo, nullptr, rRenderContext );
+ Frame_Info aFrameInfo( *this );
+ SwTaggedPDFHelper aTaggedPDFHelper( nullptr, &aFrameInfo, nullptr, rRenderContext );
- const SwFrm *pFrm = Lower();
- if ( !pFrm )
+ const SwFrame *pFrame = Lower();
+ if ( !pFrame )
return;
- SwShortCut aShortCut( *pFrm, rRect );
+ SwShortCut aShortCut( *pFrame, rRect );
bool bCnt;
- if ( (bCnt = pFrm->IsContentFrm()) )
- pFrm->Calc(&rRenderContext);
+ if ( (bCnt = pFrame->IsContentFrame()) )
+ pFrame->Calc(&rRenderContext);
- if ( pFrm->IsFootnoteContFrm() )
+ if ( pFrame->IsFootnoteContFrame() )
{
- ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pFrm)) );
- pFrm = Lower();
+ ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pFrame)) );
+ pFrame = Lower();
}
- const SwPageFrm *pPage = nullptr;
+ const SwPageFrame *pPage = nullptr;
const bool bWin = gProp.pSGlobalShell->GetWin() != nullptr;
- while ( IsAnLower( pFrm ) )
+ while ( IsAnLower( pFrame ) )
{
- SwRect aPaintRect( pFrm->PaintArea() );
+ SwRect aPaintRect( pFrame->PaintArea() );
if( aShortCut.Stop( aPaintRect ) )
break;
if ( bCnt && gProp.pSProgress )
@@ -3620,19 +3620,19 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
//We need to retouch if a frame explicitly requests it.
//First do the retouch, because this could flatten the borders.
- if ( pFrm->IsRetouche() )
+ if ( pFrame->IsRetouche() )
{
- if ( pFrm->IsRetoucheFrm() && bWin && !pFrm->GetNext() )
+ if ( pFrame->IsRetoucheFrame() && bWin && !pFrame->GetNext() )
{ if ( !pPage )
- pPage = FindPageFrm();
- pFrm->Retouche( pPage, rRect );
+ pPage = FindPageFrame();
+ pFrame->Retouche( pPage, rRect );
}
- pFrm->ResetRetouche();
+ pFrame->ResetRetouche();
}
if ( rRect.IsOver( aPaintRect ) )
{
- if ( bCnt && pFrm->IsCompletePaint() &&
+ if ( bCnt && pFrame->IsCompletePaint() &&
!rRect.IsInside( aPaintRect ) && Application::AnyInput( VclInputFlags::KEYBOARD ) )
{
//fix(8104): It may happen, that the processing wasn't complete
@@ -3650,50 +3650,50 @@ void SwLayoutFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect,
if ( aPaintRect.Height() > 0 )
gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
aPaintRect.Top( rRect.Bottom() + 1 );
- aPaintRect.Bottom( pFrm->Frm().Bottom() );
+ aPaintRect.Bottom( pFrame->Frame().Bottom() );
if ( aPaintRect.Height() > 0 )
gProp.pSGlobalShell->InvalidateWindows(aPaintRect);
- aPaintRect.Top( pFrm->Frm().Top() );
- aPaintRect.Bottom( pFrm->Frm().Bottom() );
+ aPaintRect.Top( pFrame->Frame().Top() );
+ aPaintRect.Bottom( pFrame->Frame().Bottom() );
}
else
{
gProp.pSGlobalShell->InvalidateWindows( aPaintRect );
- pFrm = pFrm->GetNext();
- if ( pFrm && (bCnt = pFrm->IsContentFrm()) )
- pFrm->Calc(&rRenderContext);
+ pFrame = pFrame->GetNext();
+ if ( pFrame && (bCnt = pFrame->IsContentFrame()) )
+ pFrame->Calc(&rRenderContext);
continue;
}
}
- pFrm->ResetCompletePaint();
+ pFrame->ResetCompletePaint();
aPaintRect._Intersection( rRect );
- pFrm->Paint( rRenderContext, aPaintRect );
+ pFrame->Paint( rRenderContext, aPaintRect );
- if ( Lower() && Lower()->IsColumnFrm() )
+ if ( Lower() && Lower()->IsColumnFrame() )
{
//Paint the column separator line if needed. The page is
//responsible for the page frame - not the upper.
- const SwFrameFormat *pFormat = GetUpper() && GetUpper()->IsPageFrm()
+ const SwFrameFormat *pFormat = GetUpper() && GetUpper()->IsPageFrame()
? GetUpper()->GetFormat()
: GetFormat();
const SwFormatCol &rCol = pFormat->GetCol();
if ( rCol.GetLineAdj() != COLADJ_NONE )
{
if ( !pPage )
- pPage = pFrm->FindPageFrm();
+ pPage = pFrame->FindPageFrame();
PaintColLines( aPaintRect, rCol, pPage );
}
}
}
- if ( !bCnt && pFrm->GetNext() && pFrm->GetNext()->IsFootnoteContFrm() )
- ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pFrm->GetNext())) );
+ if ( !bCnt && pFrame->GetNext() && pFrame->GetNext()->IsFootnoteContFrame() )
+ ::lcl_EmergencyFormatFootnoteCont( const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pFrame->GetNext())) );
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
- if ( pFrm && (bCnt = pFrm->IsContentFrm()) )
- pFrm->Calc(&rRenderContext);
+ if ( pFrame && (bCnt = pFrame->IsContentFrame()) )
+ pFrame->Calc(&rRenderContext);
}
}
@@ -3752,26 +3752,26 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateDashedIndicatorP
return aSeq;
}
-void SwPageFrm::PaintBreak( ) const
+void SwPageFrame::PaintBreak( ) const
{
if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER &&
!gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
!gProp.pSGlobalShell->IsPreview() )
{
- const SwFrm* pBodyFrm = Lower();
- while ( pBodyFrm && !pBodyFrm->IsBodyFrm() )
- pBodyFrm = pBodyFrm->GetNext();
+ const SwFrame* pBodyFrame = Lower();
+ while ( pBodyFrame && !pBodyFrame->IsBodyFrame() )
+ pBodyFrame = pBodyFrame->GetNext();
- if ( pBodyFrm )
+ if ( pBodyFrame )
{
- const SwLayoutFrm* pLayBody = static_cast< const SwLayoutFrm* >( pBodyFrm );
- const SwFlowFrm *pFlowFrm = pLayBody->ContainsContent();
+ const SwLayoutFrame* pLayBody = static_cast< const SwLayoutFrame* >( pBodyFrame );
+ const SwFlowFrame *pFlowFrame = pLayBody->ContainsContent();
// Test if the first node is a table
- const SwFrm* pFirstFrm = pLayBody->Lower();
- if ( pFirstFrm && pFirstFrm->IsTabFrm() )
- pFlowFrm = static_cast< const SwTabFrm* >( pFirstFrm );
+ const SwFrame* pFirstFrame = pLayBody->Lower();
+ if ( pFirstFrame && pFirstFrame->IsTabFrame() )
+ pFlowFrame = static_cast< const SwTabFrame* >( pFirstFrame );
SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( gProp.pSGlobalShell );
if ( pWrtSh )
@@ -3779,30 +3779,30 @@ void SwPageFrm::PaintBreak( ) const
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
SwFrameControlsManager& rMngr = rEditWin.GetFrameControlsManager();
- if ( pFlowFrm && pFlowFrm->IsPageBreak( true ) )
+ if ( pFlowFrame && pFlowFrame->IsPageBreak( true ) )
rMngr.SetPageBreakControl( this );
else
rMngr.RemoveControlsByType( PageBreak, this );
}
}
- SwLayoutFrm::PaintBreak( );
+ SwLayoutFrame::PaintBreak( );
}
}
-void SwColumnFrm::PaintBreak( ) const
+void SwColumnFrame::PaintBreak( ) const
{
if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER &&
!gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly() &&
!gProp.pSGlobalShell->IsPreview() )
{
- const SwFrm* pBodyFrm = Lower();
- while ( pBodyFrm && !pBodyFrm->IsBodyFrm() )
- pBodyFrm = pBodyFrm->GetNext();
+ const SwFrame* pBodyFrame = Lower();
+ while ( pBodyFrame && !pBodyFrame->IsBodyFrame() )
+ pBodyFrame = pBodyFrame->GetNext();
- if ( pBodyFrm )
+ if ( pBodyFrame )
{
- const SwContentFrm *pCnt = static_cast< const SwLayoutFrm* >( pBodyFrm )->ContainsContent();
+ const SwContentFrame *pCnt = static_cast< const SwLayoutFrame* >( pBodyFrame )->ContainsContent();
if ( pCnt && pCnt->IsColBreak( true ) )
{
// Paint the break only if:
@@ -3814,7 +3814,7 @@ void SwColumnFrm::PaintBreak( ) const
!gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) )
{
SwRect aRect( pCnt->Prt() );
- aRect.Pos() += pCnt->Frm().Pos();
+ aRect.Pos() += pCnt->Frame().Pos();
// Draw the line
basegfx::B2DPoint aStart( double( aRect.Left() ), aRect.Top() );
@@ -3875,28 +3875,28 @@ void SwColumnFrm::PaintBreak( ) const
}
}
-void SwLayoutFrm::PaintBreak( ) const
+void SwLayoutFrame::PaintBreak( ) const
{
- const SwFrm* pFrm = Lower();
- while ( pFrm )
+ const SwFrame* pFrame = Lower();
+ while ( pFrame )
{
- if ( pFrm->IsLayoutFrm() )
- static_cast< const SwLayoutFrm*>( pFrm )->PaintBreak( );
- pFrm = pFrm->GetNext();
+ if ( pFrame->IsLayoutFrame() )
+ static_cast< const SwLayoutFrame*>( pFrame )->PaintBreak( );
+ pFrame = pFrame->GetNext();
}
}
-void SwPageFrm::PaintDecorators( ) const
+void SwPageFrame::PaintDecorators( ) const
{
SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( gProp.pSGlobalShell );
if ( pWrtSh )
{
SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
- const SwLayoutFrm* pBody = FindBodyCont();
+ const SwLayoutFrame* pBody = FindBodyCont();
if ( pBody )
{
- SwRect aBodyRect( pBody->Frm() );
+ SwRect aBodyRect( pBody->Frame() );
if ( gProp.pSGlobalShell->GetOut()->GetOutDevType() != OUTDEV_PRINTER &&
!gProp.pSGlobalShell->GetViewOptions()->IsPDFExport() &&
@@ -3915,9 +3915,9 @@ void SwPageFrm::PaintDecorators( ) const
// Header
if ( gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Header ) )
{
- const SwFrm* pHeaderFrm = Lower();
- if ( !pHeaderFrm->IsHeaderFrm() )
- pHeaderFrm = nullptr;
+ const SwFrame* pHeaderFrame = Lower();
+ if ( !pHeaderFrame->IsHeaderFrame() )
+ pHeaderFrame = nullptr;
long nHeaderYOff = aBodyRect.Top();
Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff ) );
@@ -3927,12 +3927,12 @@ void SwPageFrm::PaintDecorators( ) const
// Footer
if ( gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer ) )
{
- const SwFrm* pFootnoteContFrm = Lower();
- while ( pFootnoteContFrm )
+ const SwFrame* pFootnoteContFrame = Lower();
+ while ( pFootnoteContFrame )
{
- if ( pFootnoteContFrm->IsFootnoteContFrm() )
- aBodyRect.AddBottom( pFootnoteContFrm->Frm().Bottom() - aBodyRect.Bottom() );
- pFootnoteContFrm = pFootnoteContFrm->GetNext();
+ if ( pFootnoteContFrame->IsFootnoteContFrame() )
+ aBodyRect.AddBottom( pFootnoteContFrame->Frame().Bottom() - aBodyRect.Bottom() );
+ pFootnoteContFrame = pFootnoteContFrame->GetNext();
}
long nFooterYOff = aBodyRect.Bottom();
@@ -3957,7 +3957,7 @@ void SwPageFrm::PaintDecorators( ) const
*
* @return true, if background is transparent drawn
*/
-bool SwFlyFrm::IsBackgroundTransparent() const
+bool SwFlyFrame::IsBackgroundTransparent() const
{
bool bBackgroundTransparent = GetFormat()->IsBackgroundTransparent();
if ( !bBackgroundTransparent &&
@@ -4006,7 +4006,7 @@ bool SwFlyFrm::IsBackgroundTransparent() const
return bBackgroundTransparent;
};
-bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
+bool SwFlyFrame::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
{
SdrObjUserCall *pUserCall;
@@ -4022,14 +4022,14 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
if ( bPaint )
{
//The paint may be prevented by the superior Flys.
- SwFrm *pAnch = nullptr;
+ SwFrame *pAnch = nullptr;
if ( dynamic_cast< const SwFlyDrawObj *>( pObj ) != nullptr ) // i#117962#
{
bPaint = false;
}
if ( dynamic_cast< const SwVirtFlyDrawObj *>( pObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
+ SwFlyFrame *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrame();
if ( gProp.pSFlyOnlyDraw && gProp.pSFlyOnlyDraw == pFly )
return true;
@@ -4038,10 +4038,10 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
//painted.
//HACK: exception: printing of frames in tables, those can overlap
//a page once in a while when dealing with oversized tables (HTML).
- SwPageFrm *pPage = pFly->FindPageFrm();
- if ( pPage && pPage->Frm().IsOver( pFly->Frm() ) )
+ SwPageFrame *pPage = pFly->FindPageFrame();
+ if ( pPage && pPage->Frame().IsOver( pFly->Frame() ) )
{
- pAnch = pFly->AnchorFrm();
+ pAnch = pFly->AnchorFrame();
}
}
@@ -4050,7 +4050,7 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
// OD 13.10.2003 #i19919# - consider 'virtual' drawing objects
// OD 2004-03-29 #i26791#
SwDrawContact* pDrawContact = dynamic_cast<SwDrawContact*>(pUserCall);
- pAnch = pDrawContact ? pDrawContact->GetAnchorFrm(pObj) : nullptr;
+ pAnch = pDrawContact ? pDrawContact->GetAnchorFrame(pObj) : nullptr;
if ( pAnch )
{
if ( !pAnch->GetValidPosFlag() )
@@ -4062,8 +4062,8 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
//The objects should get printed if the TableHack is active
//right now. Afterwards they must not be printed if the
//page over which they float position wise gets printed.
- const SwPageFrm *pPage = pAnch->FindPageFrm();
- if ( !pPage->Frm().IsOver( pObj->GetCurrentBoundRect() ) )
+ const SwPageFrame *pPage = pAnch->FindPageFrame();
+ if ( !pPage->Frame().IsOver( pObj->GetCurrentBoundRect() ) )
pAnch = nullptr;
}
}
@@ -4072,14 +4072,14 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
// OD 02.07.2003 #108784# - debug assert
if ( dynamic_cast< const SdrObjGroup *>( pObj ) == nullptr )
{
- OSL_FAIL( "<SwFlyFrm::IsPaint(..)> - paint of drawing object without anchor frame!?" );
+ OSL_FAIL( "<SwFlyFrame::IsPaint(..)> - paint of drawing object without anchor frame!?" );
}
}
}
if ( pAnch )
{
if ( pAnch->IsInFly() )
- bPaint = SwFlyFrm::IsPaint( pAnch->FindFlyFrm()->GetVirtDrawObj(),
+ bPaint = SwFlyFrame::IsPaint( pAnch->FindFlyFrame()->GetVirtDrawObj(),
pSh );
else if ( gProp.pSFlyOnlyDraw )
bPaint = false;
@@ -4090,10 +4090,10 @@ bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh )
return bPaint;
}
-void SwCellFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
+void SwCellFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
if ( GetLayoutRowSpan() >= 1 )
- SwLayoutFrm::Paint( rRenderContext, rRect );
+ SwLayoutFrame::Paint( rRenderContext, rRect );
}
struct BorderLinesGuard
@@ -4111,17 +4111,17 @@ private:
BorderLines *const m_pBorderLines;
};
-void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
+void SwFlyFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
//optimize thumbnail generation and store procedure to improve odt saving performance, #i120030#
- SwViewShell *pShell = getRootFrm()->GetCurrShell();
+ SwViewShell *pShell = getRootFrame()->GetCurrShell();
if (pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocShell())
{
bool bInGenerateThumbnail = pShell->GetDoc()->GetDocShell()->IsInGenerateAndStoreThumbnail();
if (bInGenerateThumbnail)
{
SwRect aVisRect = pShell->VisArea();
- if (!aVisRect.IsOver(Frm()))
+ if (!aVisRect.IsOver(Frame()))
return;
}
}
@@ -4133,14 +4133,14 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
BorderLinesGuard blg; // this should not paint borders added from PaintBaBo
SwRect aRect( rRect );
- aRect._Intersection( Frm() );
+ aRect._Intersection( Frame() );
rRenderContext.Push( PushFlags::CLIPREGION );
rRenderContext.SetClipRegion();
- const SwPageFrm* pPage = FindPageFrm();
+ const SwPageFrame* pPage = FindPageFrame();
- const SwNoTextFrm *pNoText = Lower() && Lower()->IsNoTextFrm()
- ? static_cast<const SwNoTextFrm*>(Lower()) : nullptr;
+ const SwNoTextFrame *pNoText = Lower() && Lower()->IsNoTextFrame()
+ ? static_cast<const SwNoTextFrame*>(Lower()) : nullptr;
bool bIsChart = false; //#i102950# don't paint additional borders for charts
//check whether we have a chart
@@ -4202,7 +4202,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
}
// paint of margin needed.
const bool bPaintMarginOnly( !bPaintCompleteBack &&
- Prt().SSize() != Frm().SSize() );
+ Prt().SSize() != Frame().SSize() );
// #i47804# - paint background of parent fly frame
// for transparent graphics in layer Hell, if parent fly frame isn't
@@ -4213,20 +4213,20 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
if (bIsGraphicTransparent &&
GetFormat()->GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS) &&
GetVirtDrawObj()->GetLayer() == rIDDMA.GetHellId() &&
- GetAnchorFrm()->FindFlyFrm() )
+ GetAnchorFrame()->FindFlyFrame() )
{
- const SwFlyFrm* pParentFlyFrm = GetAnchorFrm()->FindFlyFrm();
- if ( pParentFlyFrm->GetDrawObj()->GetLayer() !=
+ const SwFlyFrame* pParentFlyFrame = GetAnchorFrame()->FindFlyFrame();
+ if ( pParentFlyFrame->GetDrawObj()->GetLayer() !=
rIDDMA.GetHellId() )
{
- SwFlyFrm* pOldRet = gProp.pSRetoucheFly2;
- gProp.pSRetoucheFly2 = const_cast<SwFlyFrm*>(this);
+ SwFlyFrame* pOldRet = gProp.pSRetoucheFly2;
+ gProp.pSRetoucheFly2 = const_cast<SwFlyFrame*>(this);
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pParentFlyFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pParentFlyFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
SwRect aPaintRect( aRect );
- aPaintRect._Intersection( pParentFlyFrm->Frm() );
- pParentFlyFrm->PaintBackground( aPaintRect, pPage, rAttrs );
+ aPaintRect._Intersection( pParentFlyFrame->Frame() );
+ pParentFlyFrame->PaintBackground( aPaintRect, pPage, rAttrs );
gProp.pSRetoucheFly2 = pOldRet;
}
@@ -4242,9 +4242,9 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
rRenderContext.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
rRenderContext.SetLineColor();
- pPage = FindPageFrm();
+ pPage = FindPageFrame();
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(this) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(this) );
const SwBorderAttrs &rAttrs = *aAccess.Get();
// paint background
@@ -4258,7 +4258,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
{
//What we actually want to paint is the small stripe between
//PrtArea and outer border.
- SwRect aTmp( Prt() ); aTmp += Frm().Pos();
+ SwRect aTmp( Prt() ); aTmp += Frame().Pos();
aRegion -= aTmp;
}
if ( bContour )
@@ -4266,10 +4266,10 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
rRenderContext.Push();
// #i80822#
// apply clip region under the same conditions, which are
- // used in <SwNoTextFrm::Paint(..)> to set the clip region
+ // used in <SwNoTextFrame::Paint(..)> to set the clip region
// for painting the graphic/OLE. Thus, the clip region is
// also applied for the PDF export.
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( !rRenderContext.GetConnectMetaFile() || !pSh || !pSh->GetWin() )
{
rRenderContext.SetClipRegion(vcl::Region(aPoly));
@@ -4349,7 +4349,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
}
}
- SwLayoutFrm::Paint( rRenderContext, aRect );
+ SwLayoutFrame::Paint( rRenderContext, aRect );
Validate();
@@ -4366,7 +4366,7 @@ void SwFlyFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
gProp.pSProgress->Reschedule();
}
-void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
+void SwTabFrame::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, SwPrintData const*const) const
{
const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions();
if (pViewOption->IsTable())
@@ -4374,7 +4374,7 @@ void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
// #i29550#
if ( IsCollapsingBorders() )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), static_cast<SwFrm const *>(this) );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), static_cast<SwFrame const *>(this) );
const SwBorderAttrs &rAttrs = *aAccess.Get();
// paint shadow
@@ -4385,23 +4385,23 @@ void SwTabFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, Sw
PaintShadow( rRect, aRect, rAttrs );
}
- SwTabFrmPainter aHelper(*this);
+ SwTabFramePainter aHelper(*this);
aHelper.PaintLines(rRenderContext, rRect);
}
- SwLayoutFrm::Paint( rRenderContext, rRect );
+ SwLayoutFrame::Paint( rRenderContext, rRect );
}
// OD 10.01.2003 #i6467# - no light grey rectangle for page preview
else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
{
// OD 10.01.2003 #i6467# - intersect output rectangle with table frame
SwRect aTabRect( Prt() );
- aTabRect.Pos() += Frm().Pos();
+ aTabRect.Pos() += Frame().Pos();
SwRect aTabOutRect( rRect );
aTabOutRect.Intersection( aTabRect );
SwViewOption::DrawRect( &rRenderContext, aTabOutRect, COL_LIGHTGRAY );
}
- const_cast<SwTabFrm*>(this)->ResetComplete();
+ const_cast<SwTabFrame*>(this)->ResetComplete();
}
/**
@@ -4627,12 +4627,12 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
*
* @note: draw full shadow rectangle for frames with transparent drawn backgrounds (OD 23.08.2002 #99657#)
*/
-void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
+void SwFrame::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
const SwBorderAttrs &rAttrs ) const
{
SvxShadowItem rShadow = rAttrs.GetShadow();
- const bool bCnt = IsContentFrm();
+ const bool bCnt = IsContentFrame();
const bool bTop = !bCnt || rAttrs.GetTopLine ( *(this) );
const bool bBottom = !bCnt || rAttrs.GetBottomLine( *(this) );
@@ -4652,11 +4652,11 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
// be drawn or only two shadow rectangles beside the frame.
// draw full shadow rectangle, if frame background is drawn transparent.
// Status Quo:
- // SwLayoutFrm can have transparent drawn backgrounds. Thus,
+ // SwLayoutFrame can have transparent drawn backgrounds. Thus,
// "asked" their frame format.
const bool bDrawFullShadowRectangle =
- ( IsLayoutFrm() &&
- (static_cast<const SwLayoutFrm*>(this))->GetFormat()->IsBackgroundTransparent()
+ ( IsLayoutFrame() &&
+ (static_cast<const SwLayoutFrame*>(this))->GetFormat()->IsBackgroundTransparent()
);
SWRECTFN( this );
@@ -4665,9 +4665,9 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect,
lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true, gProp);
}
-void SwFrm::PaintBorderLine( const SwRect& rRect,
+void SwFrame::PaintBorderLine( const SwRect& rRect,
const SwRect& rOutRect,
- const SwPageFrm * pPage,
+ const SwPageFrame * pPage,
const Color *pColor,
const SvxBorderStyle nStyle ) const
{
@@ -4677,8 +4677,8 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
SwRect aOut( rOutRect );
aOut._Intersection( rRect );
- const SwTabFrm *pTab = IsCellFrm() ? FindTabFrm() : nullptr;
- sal_uInt8 nSubCol = ( IsCellFrm() || IsRowFrm() ) ? SUBCOL_TAB :
+ const SwTabFrame *pTab = IsCellFrame() ? FindTabFrame() : nullptr;
+ sal_uInt8 nSubCol = ( IsCellFrame() || IsRowFrame() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
if( pColor && gProp.pSGlobalShell->GetWin() &&
@@ -4712,14 +4712,14 @@ void SwFrm::PaintBorderLine( const SwRect& rRect,
static void lcl_SubTopBottom( SwRect& _iorRect,
const SvxBoxItem& _rBox,
const SwBorderAttrs& _rAttrs,
- const SwFrm& _rFrm,
+ const SwFrame& _rFrame,
const SwRectFn& _rRectFn,
const bool _bPrtOutputDev,
SwPaintProperties& properties )
{
- const bool bCnt = _rFrm.IsContentFrm();
+ const bool bCnt = _rFrame.IsContentFrame();
if ( _rBox.GetTop() && _rBox.GetTop()->GetInWidth() &&
- ( !bCnt || _rAttrs.GetTopLine( _rFrm ) )
+ ( !bCnt || _rAttrs.GetTopLine( _rFrame ) )
)
{
// subtract distance between outer and inner line.
@@ -4745,7 +4745,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect,
// is a hair line
if ( bIsInnerTopLineHairline )
{
- if ( _rFrm.IsVertical() )
+ if ( _rFrame.IsVertical() )
{
// right of border rectangle has to be checked and adjusted
Point aCompPt( _iorRect.Right(), 0 );
@@ -4769,7 +4769,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect,
}
if ( _rBox.GetBottom() && _rBox.GetBottom()->GetInWidth() &&
- ( !bCnt || _rAttrs.GetBottomLine( _rFrm ) )
+ ( !bCnt || _rAttrs.GetBottomLine( _rFrame ) )
)
{
// subtract distance between outer and inner line.
@@ -4795,7 +4795,7 @@ static void lcl_SubTopBottom( SwRect& _iorRect,
// bottom line is a hair line.
if ( bIsInnerBottomLineHairline )
{
- if ( _rFrm.IsVertical() )
+ if ( _rFrame.IsVertical() )
{
// left of border rectangle has to be checked and adjusted
Point aCompPt( _iorRect.Left(), 0 );
@@ -4928,8 +4928,8 @@ static void lcl_MakeBorderLine(SwRect const& rRect,
* into new method <lcl_PaintLeftRightLine(..)>
*/
static void lcl_PaintLeftRightLine( const bool _bLeft,
- const SwFrm& _rFrm,
- const SwPageFrm& /*_rPage*/,
+ const SwFrame& _rFrame,
+ const SwPageFrame& /*_rPage*/,
const SwRect& _rOutRect,
const SwRect& /*_rRect*/,
const SwBorderAttrs& _rAttrs,
@@ -4937,7 +4937,7 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
SwPaintProperties& properties)
{
const SvxBoxItem& rBox = _rAttrs.GetBox();
- const bool bR2L = _rFrm.IsCellFrm() && _rFrm.IsRightToLeft();
+ const bool bR2L = _rFrame.IsCellFrame() && _rFrame.IsRightToLeft();
const SvxBorderLine* pLeftRightBorder = nullptr;
const SvxBorderLine* pTopBorder = rBox.GetTop();
const SvxBorderLine* pBottomBorder = rBox.GetBottom();
@@ -4978,13 +4978,13 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
(aRect.*_rRectFn->fnGetWidth)() );
}
- if ( _rFrm.IsContentFrm() )
+ if ( _rFrame.IsContentFrame() )
{
- ::lcl_ExtendLeftAndRight( aRect, _rFrm, _rAttrs, _rRectFn );
+ ::lcl_ExtendLeftAndRight( aRect, _rFrame, _rAttrs, _rRectFn );
// No Top / bottom borders for joint borders
- if ( _rAttrs.JoinedWithPrev( _rFrm ) ) pTopBorder = nullptr;
- if ( _rAttrs.JoinedWithNext( _rFrm ) ) pBottomBorder = nullptr;
+ if ( _rAttrs.JoinedWithPrev( _rFrame ) ) pTopBorder = nullptr;
+ if ( _rAttrs.JoinedWithNext( _rFrame ) ) pBottomBorder = nullptr;
}
if ( !pLeftRightBorder->GetInWidth() )
@@ -4994,7 +4994,7 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
( OUTDEV_PRINTER == properties.pSGlobalShell->GetOut()->GetOutDevType() );
// OD 06.05.2003 #107169# - add 6th parameter
- ::lcl_SubTopBottom( aRect, rBox, _rAttrs, _rFrm, _rRectFn, bPrtOutputDev, properties);
+ ::lcl_SubTopBottom( aRect, rBox, _rAttrs, _rFrame, _rRectFn, bPrtOutputDev, properties);
}
if ( lcl_GetLineWidth( pLeftRightBorder ) > 0 )
@@ -5010,8 +5010,8 @@ static void lcl_PaintLeftRightLine( const bool _bLeft,
* into <lcl_PaintTopLine>
*/
static void lcl_PaintTopBottomLine( const bool _bTop,
- const SwFrm& ,
- const SwPageFrm& /*_rPage*/,
+ const SwFrame& ,
+ const SwPageFrame& /*_rPage*/,
const SwRect& _rOutRect,
const SwRect& /*_rRect*/,
const SwBorderAttrs& _rAttrs,
@@ -5208,20 +5208,20 @@ void PaintCharacterBorder(
}
/// #i15844#
-static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
+static const SwFrame* lcl_HasNextCell( const SwFrame& rFrame )
{
- OSL_ENSURE( rFrm.IsCellFrm(),
- "lcl_HasNextCell( const SwFrm& rFrm ) should be called with SwCellFrm" );
+ OSL_ENSURE( rFrame.IsCellFrame(),
+ "lcl_HasNextCell( const SwFrame& rFrame ) should be called with SwCellFrame" );
- const SwFrm* pTmpFrm = &rFrm;
+ const SwFrame* pTmpFrame = &rFrame;
do
{
- if ( pTmpFrm->GetNext() )
- return pTmpFrm->GetNext();
+ if ( pTmpFrame->GetNext() )
+ return pTmpFrame->GetNext();
- pTmpFrm = pTmpFrm->GetUpper()->GetUpper();
+ pTmpFrame = pTmpFrame->GetUpper()->GetUpper();
}
- while ( pTmpFrm->IsCellFrm() );
+ while ( pTmpFrame->IsCellFrame() );
return nullptr;
}
@@ -5232,13 +5232,13 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
*
* OD 21.02.2003 #b4779636#, #107692#
*
- * @param _pCellFrm
+ * @param _pCellFrame
* input parameter - constant pointer to cell frame for which the cell frame
* for the border attributes has to be determined.
*
* @param _rCellBorderAttrs
* input parameter - constant reference to the border attributes of cell frame
- * <_pCellFrm>.
+ * <_pCellFrame>.
*
* @param _bTop
* input parameter - boolean, that controls, if cell frame for top border or
@@ -5247,83 +5247,83 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm )
* @return constant pointer to cell frame, for which the border attributes has
* to be used
*/
-static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm,
+static const SwFrame* lcl_GetCellFrameForBorderAttrs( const SwFrame* _pCellFrame,
const SwBorderAttrs& _rCellBorderAttrs,
const bool _bTop )
{
- OSL_ENSURE( _pCellFrm, "No cell frame available, dying soon" );
+ OSL_ENSURE( _pCellFrame, "No cell frame available, dying soon" );
// determine, if cell frame is at bottom/top border of a table frame and
// the table frame has/is a follow.
- const SwFrm* pTmpFrm = _pCellFrm;
+ const SwFrame* pTmpFrame = _pCellFrame;
bool bCellAtBorder = true;
- bool bCellAtLeftBorder = !_pCellFrm->GetPrev();
- bool bCellAtRightBorder = !_pCellFrm->GetNext();
- while( !pTmpFrm->IsRowFrm() || !pTmpFrm->GetUpper()->IsTabFrm() )
+ bool bCellAtLeftBorder = !_pCellFrame->GetPrev();
+ bool bCellAtRightBorder = !_pCellFrame->GetNext();
+ while( !pTmpFrame->IsRowFrame() || !pTmpFrame->GetUpper()->IsTabFrame() )
{
- pTmpFrm = pTmpFrm->GetUpper();
- if ( pTmpFrm->IsRowFrm() &&
- (_bTop ? pTmpFrm->GetPrev() : pTmpFrm->GetNext())
+ pTmpFrame = pTmpFrame->GetUpper();
+ if ( pTmpFrame->IsRowFrame() &&
+ (_bTop ? pTmpFrame->GetPrev() : pTmpFrame->GetNext())
)
{
bCellAtBorder = false;
}
- if ( pTmpFrm->IsCellFrm() )
+ if ( pTmpFrame->IsCellFrame() )
{
- if ( pTmpFrm->GetPrev() )
+ if ( pTmpFrame->GetPrev() )
{
bCellAtLeftBorder = false;
}
- if ( pTmpFrm->GetNext() )
+ if ( pTmpFrame->GetNext() )
{
bCellAtRightBorder = false;
}
}
}
- OSL_ENSURE( pTmpFrm && pTmpFrm->IsRowFrm(), "No RowFrm available" );
+ OSL_ENSURE( pTmpFrame && pTmpFrame->IsRowFrame(), "No RowFrame available" );
- const SwLayoutFrm* pParentRowFrm = static_cast<const SwLayoutFrm*>(pTmpFrm);
- const SwTabFrm* pParentTabFrm =
- static_cast<const SwTabFrm*>(pParentRowFrm->GetUpper());
+ const SwLayoutFrame* pParentRowFrame = static_cast<const SwLayoutFrame*>(pTmpFrame);
+ const SwTabFrame* pParentTabFrame =
+ static_cast<const SwTabFrame*>(pParentRowFrame->GetUpper());
const bool bCellNeedsAttribute = bCellAtBorder &&
( _bTop ?
// bCellInFirstRowWithMaster
- ( !pParentRowFrm->GetPrev() &&
- pParentTabFrm->IsFollow() &&
- 0 == pParentTabFrm->GetTable()->GetRowsToRepeat() ) :
+ ( !pParentRowFrame->GetPrev() &&
+ pParentTabFrame->IsFollow() &&
+ 0 == pParentTabFrame->GetTable()->GetRowsToRepeat() ) :
// bCellInLastRowWithFollow
- ( !pParentRowFrm->GetNext() &&
- pParentTabFrm->GetFollow() )
+ ( !pParentRowFrame->GetNext() &&
+ pParentTabFrame->GetFollow() )
);
- const SwFrm* pRet = _pCellFrm;
+ const SwFrame* pRet = _pCellFrame;
if ( bCellNeedsAttribute )
{
// determine, if cell frame has no borders inside the table.
- const SwFrm* pNextCell = nullptr;
+ const SwFrame* pNextCell = nullptr;
bool bNoBordersInside = false;
- if ( bCellAtLeftBorder && ( nullptr != ( pNextCell = lcl_HasNextCell( *_pCellFrm ) ) ) )
+ if ( bCellAtLeftBorder && ( nullptr != ( pNextCell = lcl_HasNextCell( *_pCellFrame ) ) ) )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pNextCell );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pNextCell );
const SwBorderAttrs &rBorderAttrs = *aAccess.Get();
const SvxBoxItem& rBorderBox = rBorderAttrs.GetBox();
bCellAtRightBorder = !lcl_HasNextCell( *pNextCell );
bNoBordersInside =
- ( !rBorderBox.GetTop() || !pParentRowFrm->GetPrev() ) &&
+ ( !rBorderBox.GetTop() || !pParentRowFrame->GetPrev() ) &&
!rBorderBox.GetLeft() &&
( !rBorderBox.GetRight() || bCellAtRightBorder ) &&
- ( !rBorderBox.GetBottom() || !pParentRowFrm->GetNext() );
+ ( !rBorderBox.GetBottom() || !pParentRowFrame->GetNext() );
}
else
{
const SvxBoxItem& rBorderBox = _rCellBorderAttrs.GetBox();
bNoBordersInside =
- ( !rBorderBox.GetTop() || !pParentRowFrm->GetPrev() ) &&
+ ( !rBorderBox.GetTop() || !pParentRowFrame->GetPrev() ) &&
( !rBorderBox.GetLeft() || bCellAtLeftBorder ) &&
( !rBorderBox.GetRight() || bCellAtRightBorder ) &&
- ( !rBorderBox.GetBottom() || !pParentRowFrm->GetNext() );
+ ( !rBorderBox.GetBottom() || !pParentRowFrame->GetNext() );
}
if ( bNoBordersInside )
@@ -5335,18 +5335,18 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm
// it is at the top border of a table frame, which is a follow.
// Thus, use border attributes of cell frame in first row of complete table.
// First, determine first table frame of complete table.
- SwTabFrm* pMasterTabFrm = pParentTabFrm->FindMaster( true );
+ SwTabFrame* pMasterTabFrame = pParentTabFrame->FindMaster( true );
// determine first row of complete table.
- const SwFrm* pFirstRow = pMasterTabFrm->GetLower();
+ const SwFrame* pFirstRow = pMasterTabFrame->GetLower();
// return first cell in first row
- SwFrm* pLowerCell = const_cast<SwFrm*>(pFirstRow->GetLower());
- while ( !pLowerCell->IsCellFrm() ||
- ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrm() )
+ SwFrame* pLowerCell = const_cast<SwFrame*>(pFirstRow->GetLower());
+ while ( !pLowerCell->IsCellFrame() ||
+ ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrame() )
)
{
pLowerCell = pLowerCell->GetLower();
}
- OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
+ OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrame(), "No CellFrame available" );
pRet = pLowerCell;
}
else if ( !_bTop && !_rCellBorderAttrs.GetBox().GetBottom() )
@@ -5356,20 +5356,20 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm
// but it is at the bottom border of a table frame, which has a follow.
// Thus, use border attributes of cell frame in last row of complete table.
// First, determine last table frame of complete table.
- SwTabFrm* pLastTabFrm = const_cast<SwTabFrm*>(pParentTabFrm->GetFollow());
- while ( pLastTabFrm->GetFollow() )
+ SwTabFrame* pLastTabFrame = const_cast<SwTabFrame*>(pParentTabFrame->GetFollow());
+ while ( pLastTabFrame->GetFollow() )
{
- pLastTabFrm = pLastTabFrm->GetFollow();
+ pLastTabFrame = pLastTabFrame->GetFollow();
}
// determine last row of complete table.
- SwFrm* pLastRow = pLastTabFrm->GetLastLower();
+ SwFrame* pLastRow = pLastTabFrame->GetLastLower();
// return first bottom border cell in last row
- SwFrm* pLowerCell = pLastRow->GetLower();
- while ( !pLowerCell->IsCellFrm() ||
- ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrm() )
+ SwFrame* pLowerCell = pLastRow->GetLower();
+ while ( !pLowerCell->IsCellFrame() ||
+ ( pLowerCell->GetLower() && pLowerCell->GetLower()->IsRowFrame() )
)
{
- if ( pLowerCell->IsRowFrm() )
+ if ( pLowerCell->IsRowFrame() )
{
while ( pLowerCell->GetNext() )
{
@@ -5378,7 +5378,7 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm
}
pLowerCell = pLowerCell->GetLower();
}
- OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrm(), "No CellFrm available" );
+ OSL_ENSURE( pLowerCell && pLowerCell->IsCellFrame(), "No CellFrame available" );
pRet = pLowerCell;
}
}
@@ -5387,25 +5387,25 @@ static const SwFrm* lcl_GetCellFrmForBorderAttrs( const SwFrm* _pCellFrm
return pRet;
}
-drawinglayer::processor2d::BaseProcessor2D * SwFrm::CreateProcessor2D( ) const
+drawinglayer::processor2d::BaseProcessor2D * SwFrame::CreateProcessor2D( ) const
{
basegfx::B2DRange aViewRange;
- SdrPage *pDrawPage = getRootFrm()->GetCurrShell()->Imp()->GetPageView()->GetPage();
+ SdrPage *pDrawPage = getRootFrame()->GetCurrShell()->Imp()->GetPageView()->GetPage();
const drawinglayer::geometry::ViewInformation2D aNewViewInfos(
basegfx::B2DHomMatrix( ),
- getRootFrm()->GetCurrShell()->GetOut()->GetViewTransformation(),
+ getRootFrame()->GetCurrShell()->GetOut()->GetViewTransformation(),
aViewRange,
GetXDrawPageForSdrPage( pDrawPage ),
0.0,
uno::Sequence< beans::PropertyValue >() );
return drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
- *getRootFrm()->GetCurrShell()->GetOut(),
+ *getRootFrame()->GetCurrShell()->GetOut(),
aNewViewInfos );
}
-void SwFrm::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const
+void SwFrame::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const
{
drawinglayer::processor2d::BaseProcessor2D * pProcessor2D = CreateProcessor2D();
@@ -5417,24 +5417,24 @@ void SwFrm::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSeque
}
/// Paints shadows and borders
-void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
+void SwFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
const SwBorderAttrs &rAttrs ) const
{
// There's nothing (Row,Body,Footnote,Root,Column,NoText) need to do here
if ((GetType() & (FRM_NOTXT|FRM_ROW|FRM_BODY|FRM_FTN|FRM_COLUMN|FRM_ROOT)))
return;
- if (IsCellFrm() && !gProp.pSGlobalShell->GetViewOptions()->IsTable())
+ if (IsCellFrame() && !gProp.pSGlobalShell->GetViewOptions()->IsTable())
return;
// #i29550#
- if ( IsTabFrm() || IsCellFrm() || IsRowFrm() )
+ if ( IsTabFrame() || IsCellFrame() || IsRowFrame() )
{
- const SwTabFrm* pTabFrm = FindTabFrm();
- if ( pTabFrm->IsCollapsingBorders() )
+ const SwTabFrame* pTabFrame = FindTabFrame();
+ if ( pTabFrame->IsCollapsingBorders() )
return;
- if ( pTabFrm->GetTable()->IsNewModel() && ( !IsCellFrm() || IsCoveredCell() ) )
+ if ( pTabFrame->GetTable()->IsNewModel() && ( !IsCellFrame() || IsCoveredCell() ) )
return;
}
@@ -5445,16 +5445,16 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
//-hack has to be used.
const bool bb4779636HackActive = true;
- const SwFrm* pCellFrmForBottomBorderAttrs = nullptr;
- const SwFrm* pCellFrmForTopBorderAttrs = nullptr;
+ const SwFrame* pCellFrameForBottomBorderAttrs = nullptr;
+ const SwFrame* pCellFrameForTopBorderAttrs = nullptr;
bool bFoundCellForTopOrBorderAttrs = false;
- if ( bb4779636HackActive && IsCellFrm() )
+ if ( bb4779636HackActive && IsCellFrame() )
{
- pCellFrmForBottomBorderAttrs = lcl_GetCellFrmForBorderAttrs( this, rAttrs, false );
- if ( pCellFrmForBottomBorderAttrs != this )
+ pCellFrameForBottomBorderAttrs = lcl_GetCellFrameForBorderAttrs( this, rAttrs, false );
+ if ( pCellFrameForBottomBorderAttrs != this )
bFoundCellForTopOrBorderAttrs = true;
- pCellFrmForTopBorderAttrs = lcl_GetCellFrmForBorderAttrs( this, rAttrs, true );
- if ( pCellFrmForTopBorderAttrs != this )
+ pCellFrameForTopBorderAttrs = lcl_GetCellFrameForBorderAttrs( this, rAttrs, true );
+ if ( pCellFrameForTopBorderAttrs != this )
bFoundCellForTopOrBorderAttrs = true;
}
@@ -5467,7 +5467,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
//For the PrtArea the aligned value needs to be used, otherwise it could
//happen, that some parts won't be processed.
SwRect aRect( Prt() );
- aRect += Frm().Pos();
+ aRect += Frame().Pos();
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
// OD 27.09.2002 #103636# - new local boolean variable in order to
// suspend border paint under special cases - see below.
@@ -5484,8 +5484,8 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
// On transparent background, continue processing, but suspend
// drawing of border by setting <bDrawOnlyShadowForTransparentFrame>
// to true.
- if ( IsLayoutFrm() &&
- static_cast<const SwLayoutFrm*>(this)->GetFormat()->IsBackgroundTransparent() )
+ if ( IsLayoutFrame() &&
+ static_cast<const SwLayoutFrame*>(this)->GetFormat()->IsBackgroundTransparent() )
{
bDrawOnlyShadowForTransparentFrame = true;
}
@@ -5496,7 +5496,7 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
}
if ( !pPage )
- pPage = FindPageFrm();
+ pPage = FindPageFrame();
::lcl_CalcBorderRect( aRect, this, rAttrs, true, gProp );
rAttrs.SetGetCacheLine( true );
@@ -5509,19 +5509,19 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
if ( ( bLine || bFoundCellForTopOrBorderAttrs ) &&
!bDrawOnlyShadowForTransparentFrame )
{
- const SwFrm* pDirRefFrm = IsCellFrm() ? FindTabFrm() : this;
- SWRECTFN( pDirRefFrm )
+ const SwFrame* pDirRefFrame = IsCellFrame() ? FindTabFrame() : this;
+ SWRECTFN( pDirRefFrame )
::lcl_PaintLeftRightLine ( true, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp);
::lcl_PaintLeftRightLine ( false, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp);
- if ( !IsContentFrm() || rAttrs.GetTopLine( *(this) ) )
+ if ( !IsContentFrame() || rAttrs.GetTopLine( *(this) ) )
{
// -
//-hack
// paint is found, paint its top border.
- if ( IsCellFrm() && pCellFrmForTopBorderAttrs != this )
+ if ( IsCellFrame() && pCellFrameForTopBorderAttrs != this )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(),
- pCellFrmForTopBorderAttrs );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(),
+ pCellFrameForTopBorderAttrs );
const SwBorderAttrs &rTopAttrs = *aAccess.Get();
::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rTopAttrs, fnRect, gProp);
}
@@ -5530,15 +5530,15 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
::lcl_PaintTopBottomLine( true, *(this), *(pPage), aRect, rRect, rAttrs, fnRect, gProp );
}
}
- if ( !IsContentFrm() || rAttrs.GetBottomLine( *(this) ) )
+ if ( !IsContentFrame() || rAttrs.GetBottomLine( *(this) ) )
{
// -
//-hack
// paint is found, paint its bottom border.
- if ( IsCellFrm() && pCellFrmForBottomBorderAttrs != this )
+ if ( IsCellFrame() && pCellFrameForBottomBorderAttrs != this )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(),
- pCellFrmForBottomBorderAttrs );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(),
+ pCellFrameForBottomBorderAttrs );
const SwBorderAttrs &rBottomAttrs = *aAccess.Get();
::lcl_PaintTopBottomLine(false, *(this), *(pPage), aRect, rRect, rBottomAttrs, fnRect, gProp);
}
@@ -5558,27 +5558,27 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
* Currently only the top frame needs to be taken into account
* Other lines and shadows are set aside
*/
-void SwFootnoteContFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage,
+void SwFootnoteContFrame::PaintBorder( const SwRect& rRect, const SwPageFrame *pPage,
const SwBorderAttrs & ) const
{
//If the rectangle is completely inside the PrtArea, no border needs to
//be painted.
SwRect aRect( Prt() );
- aRect.Pos() += Frm().Pos();
+ aRect.Pos() += Frame().Pos();
if ( !aRect.IsInside( rRect ) )
PaintLine( rRect, pPage );
}
/// Paint footnote lines.
-void SwFootnoteContFrm::PaintLine( const SwRect& rRect,
- const SwPageFrm *pPage ) const
+void SwFootnoteContFrame::PaintLine( const SwRect& rRect,
+ const SwPageFrame *pPage ) const
{
//The length of the line is derived from the percentual indication on the
//PageDesc. The position is also stated on the PageDesc.
//The pen can directly be taken from the PageDesc.
if ( !pPage )
- pPage = FindPageFrm();
+ pPage = FindPageFrame();
const SwPageFootnoteInfo &rInf = pPage->GetPageDesc()->GetFootnoteInfo();
SWRECTFN( this )
@@ -5600,9 +5600,9 @@ void SwFootnoteContFrm::PaintLine( const SwRect& rRect,
}
SwTwips nLineWidth = rInf.GetLineWidth();
const SwRect aLineRect = bVert ?
- SwRect( Point(Frm().Left()+Frm().Width()-rInf.GetTopDist()-nLineWidth,
+ SwRect( Point(Frame().Left()+Frame().Width()-rInf.GetTopDist()-nLineWidth,
nX), Size( nLineWidth, nWidth ) )
- : SwRect( Point( nX, Frm().Pos().Y() + rInf.GetTopDist() ),
+ : SwRect( Point( nX, Frame().Pos().Y() + rInf.GetTopDist() ),
Size( nWidth, rInf.GetLineWidth()));
if ( aLineRect.HasArea() )
PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(),
@@ -5610,17 +5610,17 @@ void SwFootnoteContFrm::PaintLine( const SwRect& rRect,
}
/// Paints the separator line for inside columns
-void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol,
- const SwPageFrm *pPage ) const
+void SwLayoutFrame::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormatCol,
+ const SwPageFrame *pPage ) const
{
- const SwFrm *pCol = Lower();
- if ( !pCol || !pCol->IsColumnFrm() )
+ const SwFrame *pCol = Lower();
+ if ( !pCol || !pCol->IsColumnFrame() )
return;
SwRectFn fnRect = pCol->IsVertical() ? ( pCol->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
SwRect aLineRect = Prt();
- aLineRect += Frm().Pos();
+ aLineRect += Frame().Pos();
SwTwips nTop = ((aLineRect.*fnRect->fnGetHeight)()*rFormatCol.GetLineHeight())
/ 100 - (aLineRect.*fnRect->fnGetHeight)();
@@ -5655,7 +5655,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormat
while ( pCol->GetNext() )
{
(aLineRect.*fnRect->fnSetPosX)
- ( (pCol->Frm().*fnGetX)() - nPenHalf );
+ ( (pCol->Frame().*fnGetX)() - nPenHalf );
if ( aRect.IsOver( aLineRect ) )
PaintBorderLine( aRect, aLineRect , pPage, &rFormatCol.GetLineColor(),
rFormatCol.GetLineStyle() );
@@ -5663,7 +5663,7 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFormatCol &rFormat
}
}
-void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
+void SwPageFrame::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
{
if( !m_bHasGrid || gProp.pSRetoucheFly || gProp.pSRetoucheFly2 )
return;
@@ -5671,11 +5671,11 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
if( pGrid && ( OUTDEV_PRINTER != pOut->GetOutDevType() ?
pGrid->GetDisplayGrid() : pGrid->GetPrintGrid() ) )
{
- const SwLayoutFrm* pBody = FindBodyCont();
+ const SwLayoutFrame* pBody = FindBodyCont();
if( pBody )
{
SwRect aGrid( pBody->Prt() );
- aGrid += pBody->Frm().Pos();
+ aGrid += pBody->Frame().Pos();
SwRect aInter( aGrid );
aInter.Intersection( rRect );
@@ -5973,13 +5973,13 @@ void SwPageFrm::PaintGrid( OutputDevice* pOut, SwRect &rRect ) const
* input parameter - instance of the view shell, on which the output
* has to be generated.
*/
-void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
+void SwPageFrame::PaintMarginArea( const SwRect& _rOutputRect,
SwViewShell* _pViewShell ) const
{
if ( _pViewShell->GetWin() && !_pViewShell->GetViewOptions()->getBrowseMode() )
{
//UUUU Simplified paint with DrawingLayer FillStyle
- SwRect aPgRect = Frm();
+ SwRect aPgRect = Frame();
aPgRect._Intersection( _rOutputRect );
if(!aPgRect.IsEmpty())
@@ -5996,12 +5996,12 @@ void SwPageFrm::PaintMarginArea( const SwRect& _rOutputRect,
}
}
-const sal_Int8 SwPageFrm::mnShadowPxWidth = 9;
+const sal_Int8 SwPageFrame::mnShadowPxWidth = 9;
-bool SwPageFrm::IsRightShadowNeeded() const
+bool SwPageFrame::IsRightShadowNeeded() const
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- const bool bIsLTR = getRootFrm()->IsLeftToRightViewLayout();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
+ const bool bIsLTR = getRootFrame()->IsLeftToRightViewLayout();
// We paint the right shadow if we're not in book mode
// or if we've no sibling or are the last page of the "row"
@@ -6011,10 +6011,10 @@ bool SwPageFrm::IsRightShadowNeeded() const
}
-bool SwPageFrm::IsLeftShadowNeeded() const
+bool SwPageFrame::IsLeftShadowNeeded() const
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- const bool bIsLTR = getRootFrm()->IsLeftToRightViewLayout();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
+ const bool bIsLTR = getRootFrame()->IsLeftToRightViewLayout();
// We paint the left shadow if we're not in book mode
// or if we've no sibling or are the last page of the "row"
@@ -6027,7 +6027,7 @@ bool SwPageFrm::IsLeftShadowNeeded() const
* Determine rectangle for bottom page shadow
* for #i9719#
*/
-/*static*/ void SwPageFrm::GetHorizontalShadowRect( const SwRect& _rPageRect,
+/*static*/ void SwPageFrame::GetHorizontalShadowRect( const SwRect& _rPageRect,
const SwViewShell* _pViewShell,
OutputDevice* pRenderContext,
SwRect& _orHorizontalShadowRect,
@@ -6091,7 +6091,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
* for #i9719#
* implement paint of page border and shadow
*/
-/*static*/ void SwPageFrm::PaintBorderAndShadow( const SwRect& _rPageRect,
+/*static*/ void SwPageFrame::PaintBorderAndShadow( const SwRect& _rPageRect,
const SwViewShell* _pViewShell,
bool bPaintLeftShadow,
bool bPaintRightShadow,
@@ -6177,7 +6177,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
SwRect aPaintRect;
OutputDevice *pOut = _pViewShell->GetOut();
- SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pOut, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
+ SwPageFrame::GetHorizontalShadowRect( _rPageRect, _pViewShell, pOut, aPaintRect, bPaintLeftShadow, bPaintRightShadow, bRightSidebar );
// Right shadow & corners
if ( bPaintRightShadow )
@@ -6247,7 +6247,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
* mod #i6193# paint sidebar for notes
* IMPORTANT: if you change the rects here, also change SwPostItMgr::ScrollbarHit
*/
-/*static*/void SwPageFrm::PaintNotesSidebar(const SwRect& _rPageRect, SwViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight)
+/*static*/void SwPageFrame::PaintNotesSidebar(const SwRect& _rPageRect, SwViewShell* _pViewShell, sal_uInt16 nPageNum, bool bRight)
{
//TODO: cut out scrollbar area and arrows out of sidepane rect, otherwise it could flicker when pressing arrow buttons
if (!_pViewShell )
@@ -6343,7 +6343,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
}
}
-/*static*/ void SwPageFrm::PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, SwViewShell* _pViewShell, const Color& rColorUp, const Color& rColorDown)
+/*static*/ void SwPageFrame::PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, SwViewShell* _pViewShell, const Color& rColorUp, const Color& rColorDown)
{
tools::Polygon aTriangleUp(3);
tools::Polygon aTriangleDown(3);
@@ -6367,7 +6367,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
*
* for #i9719#
*/
-/*static*/ void SwPageFrm::GetBorderAndShadowBoundRect( const SwRect& _rPageRect,
+/*static*/ void SwPageFrame::GetBorderAndShadowBoundRect( const SwRect& _rPageRect,
const SwViewShell* _pViewShell,
OutputDevice* pRenderContext,
SwRect& _orBorderAndShadowBoundRect,
@@ -6386,7 +6386,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
// Always ask for full shadow since we want a bounding rect
// including at least the page frame
- SwPageFrm::GetHorizontalShadowRect( _rPageRect, _pViewShell, pRenderContext, aTmpRect, false, false, bRightSidebar );
+ SwPageFrame::GetHorizontalShadowRect( _rPageRect, _pViewShell, pRenderContext, aTmpRect, false, false, bRightSidebar );
if(bLeftShadow) aPagePxRect.Left( aTmpRect.Left() - mnShadowPxWidth - 1);
if(bRightShadow) aPagePxRect.Right( aTmpRect.Right() + mnShadowPxWidth + 1);
@@ -6394,33 +6394,33 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
_orBorderAndShadowBoundRect = pRenderContext->PixelToLogic( aPagePxRect.SVRect() );
}
-SwRect SwPageFrm::GetBoundRect(OutputDevice* pOutputDevice) const
+SwRect SwPageFrame::GetBoundRect(OutputDevice* pOutputDevice) const
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- SwRect aPageRect( Frm() );
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
+ SwRect aPageRect( Frame() );
SwRect aResult;
if(!pSh) {
return SwRect( Point(0, 0), Size(0, 0) );
}
- SwPageFrm::GetBorderAndShadowBoundRect( aPageRect, pSh, pOutputDevice, aResult,
+ SwPageFrame::GetBorderAndShadowBoundRect( aPageRect, pSh, pOutputDevice, aResult,
IsLeftShadowNeeded(), IsRightShadowNeeded(), SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT );
return aResult;
}
-/*static*/ SwTwips SwPageFrm::GetSidebarBorderWidth( const SwViewShell* _pViewShell )
+/*static*/ SwTwips SwPageFrame::GetSidebarBorderWidth( const SwViewShell* _pViewShell )
{
const SwPostItMgr* pPostItMgr = _pViewShell ? _pViewShell->GetPostItMgr() : nullptr;
const SwTwips nRet = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ? pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() : 0;
return nRet;
}
-void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
+void SwFrame::PaintBaBo( const SwRect& rRect, const SwPageFrame *pPage,
const bool bLowerBorder, const bool bOnlyTextBackground ) const
{
if ( !pPage )
- pPage = FindPageFrm();
+ pPage = FindPageFrame();
OutputDevice *pOut = gProp.pSGlobalShell->GetOut();
@@ -6431,15 +6431,15 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor();
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
// OD 20.11.2002 #104598# - take care of page margin area
- // Note: code move from <SwFrm::PaintBackground(..)> to new method
- // <SwPageFrm::Paintmargin(..)>.
- if ( IsPageFrm() && !bOnlyTextBackground)
+ // Note: code move from <SwFrame::PaintBackground(..)> to new method
+ // <SwPageFrame::Paintmargin(..)>.
+ if ( IsPageFrame() && !bOnlyTextBackground)
{
- static_cast<const SwPageFrm*>(this)->PaintMarginArea( rRect, gProp.pSGlobalShell );
+ static_cast<const SwPageFrame*>(this)->PaintMarginArea( rRect, gProp.pSGlobalShell );
}
// paint background
@@ -6452,8 +6452,8 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
if (!bOnlyTextBackground)
{
SwRect aRect( rRect );
- if( IsPageFrm() )
- static_cast<const SwPageFrm*>(this)->PaintGrid( pOut, aRect );
+ if( IsPageFrame() )
+ static_cast<const SwPageFrame*>(this)->PaintGrid( pOut, aRect );
PaintBorder( aRect, pPage, rAttrs );
}
@@ -6472,7 +6472,7 @@ static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillA
/// OD 05.09.2002 #102912#
/// Do not paint background for fly frames without a background brush by
/// calling <PaintBaBo> at the page or at the fly frame its anchored
-void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
+void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage,
const SwBorderAttrs & rAttrs,
const bool bLowerMode,
const bool bLowerBorder,
@@ -6480,14 +6480,14 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
{
// OD 20.01.2003 #i1837# - no paint of table background, if corresponding
// option is *not* set.
- if( IsTabFrm() &&
+ if( IsTabFrame() &&
!gProp.pSGlobalShell->GetViewOptions()->IsTable() )
{
return;
}
// nothing to do for covered table cells:
- if( IsCellFrm() && IsCoveredCell() )
+ if( IsCellFrame() && IsCoveredCell() )
return;
SwViewShell *pSh = gProp.pSGlobalShell;
@@ -6501,7 +6501,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
SvxBrushItem* pTmpBackBrush = nullptr;
const Color* pCol;
SwRect aOrigBackRect;
- const bool bPageFrm = IsPageFrm();
+ const bool bPageFrame = IsPageFrame();
bool bLowMode = true;
//UUUU
@@ -6509,7 +6509,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
bool bBack = GetBackgroundBrush( aFillAttributes, pItem, pCol, aOrigBackRect, bLowerMode );
//- Output if a separate background is used.
- bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrm();
+ bool bNoFlyBackground = !gProp.bSFlyMetafile && !bBack && IsFlyFrame();
if ( bNoFlyBackground )
{
// OD 05.09.2002 #102912# - Fly frame has no background.
@@ -6552,31 +6552,31 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
}
}
- SwRect aPaintRect( Frm() );
- if( IsTextFrm() || IsSctFrm() )
- aPaintRect = UnionFrm( true );
+ SwRect aPaintRect( Frame() );
+ if( IsTextFrame() || IsSctFrame() )
+ aPaintRect = UnionFrame( true );
if ( aPaintRect.IsOver( rRect ) )
{
- if ( bBack || bPageFrm || !bLowerMode )
+ if ( bBack || bPageFrame || !bLowerMode )
{
const bool bBrowse = pSh->GetViewOptions()->getBrowseMode();
SwRect aRect;
- if ( (bPageFrm && bBrowse) ||
- (IsTextFrm() && Prt().SSize() == Frm().SSize()) )
+ if ( (bPageFrame && bBrowse) ||
+ (IsTextFrame() && Prt().SSize() == Frame().SSize()) )
{
- aRect = Frm();
+ aRect = Frame();
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
}
else
{
::lcl_CalcBorderRect( aRect, this, rAttrs, false, gProp);
- if ( (IsTextFrm() || IsTabFrm()) && GetPrev() )
+ if ( (IsTextFrame() || IsTabFrame()) && GetPrev() )
{
if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() &&
lcl_compareFillAttributes(GetPrev()->getSdrAllFillAttributesHelper(), getSdrAllFillAttributesHelper()))
{
- aRect.Top( Frm().Top() );
+ aRect.Top( Frame().Top() );
}
}
}
@@ -6608,7 +6608,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
// have to be considered for drawing.
// --> Status Quo: background transparency have to be
// considered for fly frames
- const bool bConsiderBackgroundTransparency = IsFlyFrm();
+ const bool bConsiderBackgroundTransparency = IsFlyFrame();
bool bDone(false);
// #i125189# We are also done when the new DrawingLayer FillAttributes are used
@@ -6650,7 +6650,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
// background transparency have to be considered
// Set missing 5th parameter to the default value GRFNUM_NO
// - see declaration in /core/inc/frmtool.hxx.
- if (IsTextFrm() || !bOnlyTextBackground)
+ if (IsTextFrame() || !bOnlyTextBackground)
::DrawGraphic(
pItem,
pOut,
@@ -6673,40 +6673,40 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
delete pTmpBackBrush;
//Now process lower and his neighbour.
- //We end this as soon as a Frm leaves the chain and therefore is not a lower
+ //We end this as soon as a Frame leaves the chain and therefore is not a lower
//of me anymore
- const SwFrm *pFrm = GetLower();
- if ( pFrm )
+ const SwFrame *pFrame = GetLower();
+ if ( pFrame )
{
- SwRect aFrmRect;
+ SwRect aFrameRect;
SwRect aRect( PaintArea() );
aRect._Intersection( rRect );
SwRect aBorderRect( aRect );
- SwShortCut aShortCut( *pFrm, aBorderRect );
+ SwShortCut aShortCut( *pFrame, aBorderRect );
do
{ if ( gProp.pSProgress )
gProp.pSProgress->Reschedule();
- aFrmRect = pFrm->PaintArea();
- if ( aFrmRect.IsOver( aBorderRect ) )
+ aFrameRect = pFrame->PaintArea();
+ if ( aFrameRect.IsOver( aBorderRect ) )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rTmpAttrs = *aAccess.Get();
- if ( ( pFrm->IsLayoutFrm() && bLowerBorder ) ||
- aFrmRect.IsOver( aRect ) )
- pFrm->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode,
+ if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) ||
+ aFrameRect.IsOver( aRect ) )
+ pFrame->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode,
bLowerBorder );
if ( bLowerBorder )
- pFrm->PaintBorder( aBorderRect, pPage, rTmpAttrs );
+ pFrame->PaintBorder( aBorderRect, pPage, rTmpAttrs );
}
- pFrm = pFrm->GetNext();
- } while ( pFrm && pFrm->GetUpper() == this &&
- !aShortCut.Stop( aFrmRect ) );
+ pFrame = pFrame->GetNext();
+ } while ( pFrame && pFrame->GetUpper() == this &&
+ !aShortCut.Stop( aFrameRect ) );
}
}
/// Refreshes all subsidiary lines of a page.
-void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
+void SwPageFrame::RefreshSubsidiary( const SwRect &rRect ) const
{
if ( IS_SUBS || isTableBoundariesEnabled() || IS_SUBS_SECTION || IS_SUBS_FLYS )
{
@@ -6740,23 +6740,23 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const
}
}
-void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
+void SwLayoutFrame::RefreshLaySubsidiary( const SwPageFrame *pPage,
const SwRect &rRect ) const
{
const bool bSubsOpt = IS_SUBS;
if ( bSubsOpt )
PaintSubsidiaryLines( pPage, rRect );
- const SwFrm *pLow = Lower();
+ const SwFrame *pLow = Lower();
if( !pLow )
return;
SwShortCut aShortCut( *pLow, rRect );
- while( pLow && !aShortCut.Stop( pLow->Frm() ) )
+ while( pLow && !aShortCut.Stop( pLow->Frame() ) )
{
- if ( pLow->Frm().IsOver( rRect ) && pLow->Frm().HasArea() )
+ if ( pLow->Frame().IsOver( rRect ) && pLow->Frame().HasArea() )
{
- if ( pLow->IsLayoutFrm() )
- static_cast<const SwLayoutFrm*>(pLow)->RefreshLaySubsidiary( pPage, rRect);
+ if ( pLow->IsLayoutFrame() )
+ static_cast<const SwLayoutFrame*>(pLow)->RefreshLaySubsidiary( pPage, rRect);
else if ( pLow->GetDrawObjs() )
{
const SwSortedObjs& rObjs = *(pLow->GetDrawObjs());
@@ -6765,14 +6765,14 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
const SwAnchoredObject* pAnchoredObj = rObjs[i];
if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(
pAnchoredObj->GetDrawObj()->GetLayer() ) &&
- dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- const SwFlyFrm *pFly =
- static_cast<const SwFlyFrm*>(pAnchoredObj);
- if ( pFly->IsFlyInCntFrm() && pFly->Frm().IsOver( rRect ) )
+ const SwFlyFrame *pFly =
+ static_cast<const SwFlyFrame*>(pAnchoredObj);
+ if ( pFly->IsFlyInContentFrame() && pFly->Frame().IsOver( rRect ) )
{
- if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrm() ||
- !static_cast<const SwNoTextFrm*>(pFly->Lower())->HasAnimation())
+ if ( !pFly->Lower() || !pFly->Lower()->IsNoTextFrame() ||
+ !static_cast<const SwNoTextFrame*>(pFly->Lower())->HasAnimation())
pFly->RefreshLaySubsidiary( pPage, rRect );
}
}
@@ -6785,11 +6785,11 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage,
/**
* Subsidiary lines to paint the PrtAreas
- * Only the LayoutFrms which directly contain Content
+ * Only the LayoutFrames which directly contain Content
* Paints the desired line and pays attention to not overpaint any flys
*/
-static void lcl_RefreshLine( const SwLayoutFrm *pLay,
- const SwPageFrm *pPage,
+static void lcl_RefreshLine( const SwLayoutFrame *pLay,
+ const SwPageFrame *pPage,
const Point &rP1,
const Point &rP2,
const sal_uInt8 nSubColor,
@@ -6823,11 +6823,11 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
//Even if I'm inside a fly or inside a fly inside a fly a.s.o I won't
//avoid any of those flys.
SwOrderIter aIter( pPage );
- const SwFlyFrm *pMyFly = pLay->FindFlyFrm();
+ const SwFlyFrame *pMyFly = pLay->FindFlyFrame();
if ( pMyFly )
{
aIter.Current( pMyFly->GetVirtDrawObj() );
- while ( nullptr != (pMyFly = pMyFly->GetAnchorFrm()->FindFlyFrm()) )
+ while ( nullptr != (pMyFly = pMyFly->GetAnchorFrame()->FindFlyFrame()) )
{
if ( aIter()->GetOrdNum() > pMyFly->GetVirtDrawObj()->GetOrdNum() )
aIter.Current( pMyFly->GetVirtDrawObj() );
@@ -6839,7 +6839,7 @@ static void lcl_RefreshLine( const SwLayoutFrm *pLay,
while ( aIter() )
{
const SwVirtFlyDrawObj *pObj = static_cast<const SwVirtFlyDrawObj*>(aIter());
- const SwFlyFrm *pFly = pObj ? pObj->GetFlyFrm() : nullptr;
+ const SwFlyFrame *pFly = pObj ? pObj->GetFlyFrame() : nullptr;
//I certainly won't avoid myself, even if I'm placed _inside_ the
//fly I won't avoid it.
@@ -6985,26 +6985,26 @@ static drawinglayer::primitive2d::Primitive2DSequence lcl_CreateColumnAreaDelimi
return aSeq;
}
-void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *,
+void SwPageFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
if ( !gProp.pSGlobalShell->IsHeaderFooterEdit() )
{
- const SwFrm* pLay = Lower();
- const SwFrm* pFootnoteCont = nullptr;
- const SwFrm* pPageBody = nullptr;
+ const SwFrame* pLay = Lower();
+ const SwFrame* pFootnoteCont = nullptr;
+ const SwFrame* pPageBody = nullptr;
while ( pLay && !( pFootnoteCont && pPageBody ) )
{
- if ( pLay->IsFootnoteContFrm( ) )
+ if ( pLay->IsFootnoteContFrame( ) )
pFootnoteCont = pLay;
- if ( pLay->IsBodyFrm() )
+ if ( pLay->IsBodyFrame() )
pPageBody = pLay;
pLay = pLay->GetNext();
}
- SwRect aArea( pPageBody->Frm() );
+ SwRect aArea( pPageBody->Frame() );
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->Frm().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() );
if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) )
ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) );
@@ -7013,36 +7013,36 @@ void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *,
}
}
-void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *,
+void SwColumnFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
- const SwFrm* pLay = Lower();
- const SwFrm* pFootnoteCont = nullptr;
- const SwFrm* pColBody = nullptr;
+ const SwFrame* pLay = Lower();
+ const SwFrame* pFootnoteCont = nullptr;
+ const SwFrame* pColBody = nullptr;
while ( pLay && !( pFootnoteCont && pColBody ) )
{
- if ( pLay->IsFootnoteContFrm( ) )
+ if ( pLay->IsFootnoteContFrame( ) )
pFootnoteCont = pLay;
- if ( pLay->IsBodyFrm() )
+ if ( pLay->IsBodyFrame() )
pColBody = pLay;
pLay = pLay->GetNext();
}
- SwRect aArea( pColBody->Frm() );
+ SwRect aArea( pColBody->Frame() );
// #i3662# - enlarge top of column body frame's printing area
// in sections to top of section frame.
- const bool bColInSection = GetUpper()->IsSctFrm();
+ const bool bColInSection = GetUpper()->IsSctFrame();
if ( bColInSection )
{
if ( IsVertical() )
- aArea.Right( GetUpper()->Frm().Right() );
+ aArea.Right( GetUpper()->Frame().Right() );
else
- aArea.Top( GetUpper()->Frm().Top() );
+ aArea.Top( GetUpper()->Frame().Top() );
}
if ( pFootnoteCont )
- aArea.AddBottom( pFootnoteCont->Frm().Bottom() - aArea.Bottom() );
+ aArea.AddBottom( pFootnoteCont->Frame().Bottom() - aArea.Bottom() );
::SwAlignRect( aArea, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
@@ -7052,31 +7052,31 @@ void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *,
ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) );
}
-void SwSectionFrm::PaintSubsidiaryLines( const SwPageFrm * pPage,
+void SwSectionFrame::PaintSubsidiaryLines( const SwPageFrame * pPage,
const SwRect & rRect ) const
{
- const bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrm();
+ const bool bNoLowerColumn = !Lower() || !Lower()->IsColumnFrame();
if ( bNoLowerColumn )
{
- SwLayoutFrm::PaintSubsidiaryLines( pPage, rRect );
+ SwLayoutFrame::PaintSubsidiaryLines( pPage, rRect );
}
}
/**
- * The SwBodyFrm doesn't print any subsidiary line: it's bounds are painted
+ * The SwBodyFrame doesn't print any subsidiary line: it's bounds are painted
* either by the parent page or the parent column frame.
*/
-void SwBodyFrm::PaintSubsidiaryLines( const SwPageFrm *,
+void SwBodyFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
}
-void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect & ) const
+void SwHeadFootFrame::PaintSubsidiaryLines( const SwPageFrame *, const SwRect & ) const
{
if ( gProp.pSGlobalShell->IsHeaderFooterEdit() )
{
SwRect aArea( Prt() );
- aArea.Pos() += Frm().Pos();
+ aArea.Pos() += Frame().Pos();
if ( !gProp.pSGlobalShell->GetViewOptions()->IsViewMetaChars( ) )
ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) );
else
@@ -7088,7 +7088,7 @@ void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect & ) co
* This method is overridden in order to have no subsidiary lines
* around the footnotes.
*/
-void SwFootnoteFrm::PaintSubsidiaryLines( const SwPageFrm *,
+void SwFootnoteFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
}
@@ -7097,42 +7097,42 @@ void SwFootnoteFrm::PaintSubsidiaryLines( const SwPageFrm *,
* This method is overridden in order to have no subsidiary lines
* around the footnotes containers.
*/
-void SwFootnoteContFrm::PaintSubsidiaryLines( const SwPageFrm *,
+void SwFootnoteContFrame::PaintSubsidiaryLines( const SwPageFrame *,
const SwRect & ) const
{
}
-void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
+void SwLayoutFrame::PaintSubsidiaryLines( const SwPageFrame *pPage,
const SwRect &rRect ) const
{
bool bNewTableModel = false;
// #i29550#
- if ( IsTabFrm() || IsCellFrm() || IsRowFrm() )
+ if ( IsTabFrame() || IsCellFrame() || IsRowFrame() )
{
- const SwTabFrm* pTabFrm = FindTabFrm();
- if ( pTabFrm->IsCollapsingBorders() )
+ const SwTabFrame* pTabFrame = FindTabFrame();
+ if ( pTabFrame->IsCollapsingBorders() )
return;
- bNewTableModel = pTabFrm->GetTable()->IsNewModel();
+ bNewTableModel = pTabFrame->GetTable()->IsNewModel();
// in the new table model, we have an early return for all cell-related
// frames, except from non-covered table cells
if ( bNewTableModel )
- if ( IsTabFrm() ||
- IsRowFrm() ||
- ( IsCellFrm() && IsCoveredCell() ) )
+ if ( IsTabFrame() ||
+ IsRowFrame() ||
+ ( IsCellFrame() && IsCoveredCell() ) )
return;
}
const bool bFlys = pPage->GetSortedObjs() != nullptr;
- const bool bCell = IsCellFrm();
+ const bool bCell = IsCellFrame();
// use frame area for cells
// OD 13.02.2003 #i3662# - for section use also frame area
- const bool bUseFrmArea = bCell || IsSctFrm();
- SwRect aOriginal( bUseFrmArea ? Frm() : Prt() );
- if ( !bUseFrmArea )
- aOriginal.Pos() += Frm().Pos();
+ const bool bUseFrameArea = bCell || IsSctFrame();
+ SwRect aOriginal( bUseFrameArea ? Frame() : Prt() );
+ if ( !bUseFrameArea )
+ aOriginal.Pos() += Frame().Pos();
::SwAlignRect( aOriginal, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
@@ -7149,14 +7149,14 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
const Point aRB( nRight, nBottom );
const Point aLB( aOut.Left(), nBottom );
- sal_uInt8 nSubColor = ( bCell || IsRowFrm() ) ? SUBCOL_TAB :
+ sal_uInt8 nSubColor = ( bCell || IsRowFrame() ) ? SUBCOL_TAB :
( IsInSct() ? SUBCOL_SECT :
( IsInFly() ? SUBCOL_FLY : SUBCOL_PAGE ) );
// OD 18.11.2002 #99672# - collect body, header, footer, footnote and section
// sub-lines in <pSpecSubsLine> array.
- const bool bSpecialSublines = IsBodyFrm() || IsHeaderFrm() || IsFooterFrm() ||
- IsFootnoteFrm() || IsSctFrm();
+ const bool bSpecialSublines = IsBodyFrame() || IsHeaderFrame() || IsFooterFrame() ||
+ IsFootnoteFrame() || IsSctFrame();
SwLineRects* pUsedSubsLines = bSpecialSublines ? gProp.pSSpecSubsLines : gProp.pSSubsLines;
// NOTE: for cell frames only left and right (horizontal layout) respectively
@@ -7229,7 +7229,7 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage,
* Refreshes all extra data (line breaks a.s.o) of the page. Basically only those objects
* are considered which horizontally overlap the Rect.
*/
-void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
+void SwPageFrame::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFormat()->GetDoc()->GetLineNumberInfo();
bool bLineInFly = (rInfo.IsPaintLineNumbers() && rInfo.IsCountInFlys())
@@ -7239,24 +7239,24 @@ void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const
::SwAlignRect( aRect, gProp.pSGlobalShell, gProp.pSGlobalShell->GetOut() );
if ( aRect.HasArea() )
{
- SwLayoutFrm::RefreshExtraData( aRect );
+ SwLayoutFrame::RefreshExtraData( aRect );
if ( bLineInFly && GetSortedObjs() )
for ( size_t i = 0; i < GetSortedObjs()->size(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
- if ( pFly->Frm().Top() <= aRect.Bottom() &&
- pFly->Frm().Bottom() >= aRect.Top() )
+ const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
+ if ( pFly->Frame().Top() <= aRect.Bottom() &&
+ pFly->Frame().Bottom() >= aRect.Top() )
pFly->RefreshExtraData( aRect );
}
}
}
}
-void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
+void SwLayoutFrame::RefreshExtraData( const SwRect &rRect ) const
{
const SwLineNumberInfo &rInfo = GetFormat()->GetDoc()->GetLineNumberInfo();
@@ -7264,32 +7264,32 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
bLineInFly = bLineInBody && rInfo.IsCountInFlys(),
bRedLine = (sal_Int16)SW_MOD()->GetRedlineMarkPos()!=text::HoriOrientation::NONE;
- const SwContentFrm *pCnt = ContainsContent();
+ const SwContentFrame *pCnt = ContainsContent();
while ( pCnt && IsAnLower( pCnt ) )
{
- if ( pCnt->IsTextFrm() && ( bRedLine ||
+ if ( pCnt->IsTextFrame() && ( bRedLine ||
( !pCnt->IsInTab() &&
((bLineInBody && pCnt->IsInDocBody()) ||
(bLineInFly && pCnt->IsInFly())) ) ) &&
- pCnt->Frm().Top() <= rRect.Bottom() &&
- pCnt->Frm().Bottom() >= rRect.Top() )
+ pCnt->Frame().Top() <= rRect.Bottom() &&
+ pCnt->Frame().Bottom() >= rRect.Top() )
{
- static_cast<const SwTextFrm*>(pCnt)->PaintExtraData( rRect );
+ static_cast<const SwTextFrame*>(pCnt)->PaintExtraData( rRect );
}
if ( bLineInFly && pCnt->GetDrawObjs() )
for ( size_t i = 0; i < pCnt->GetDrawObjs()->size(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pCnt->GetDrawObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- const SwFlyFrm *pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
- if ( pFly->IsFlyInCntFrm() &&
- pFly->Frm().Top() <= rRect.Bottom() &&
- pFly->Frm().Bottom() >= rRect.Top() )
+ const SwFlyFrame *pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
+ if ( pFly->IsFlyInContentFrame() &&
+ pFly->Frame().Top() <= rRect.Bottom() &&
+ pFly->Frame().Bottom() >= rRect.Top() )
pFly->RefreshExtraData( rRect );
}
}
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
@@ -7297,13 +7297,13 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const
* For #102450#
* Determine the color, that is respectively will be drawn as background
* for the page frame.
- * Using existing method SwFrm::GetBackgroundBrush to determine the color
+ * Using existing method SwFrame::GetBackgroundBrush to determine the color
* that is set at the page frame respectively is parent. If none is found
* return the global retouche color
*
* @return Color
*/
-const Color SwPageFrm::GetDrawBackgrdColor() const
+const Color SwPageFrame::GetDrawBackgrdColor() const
{
const SvxBrushItem* pBrushItem;
const Color* pDummyColor;
@@ -7322,7 +7322,7 @@ const Color SwPageFrm::GetDrawBackgrdColor() const
else if(pBrushItem)
{
OUString referer;
- SwViewShell * sh1 = getRootFrm()->GetCurrShell();
+ SwViewShell * sh1 = getRootFrame()->GetCurrShell();
if (sh1 != nullptr) {
SfxObjectShell * sh2 = sh1->GetDoc()->GetPersist();
if (sh2 != nullptr && sh2->HasName()) {
@@ -7351,7 +7351,7 @@ const Color SwPageFrm::GetDrawBackgrdColor() const
}
/// create/return font used to paint the "empty page" string
-const vcl::Font& SwPageFrm::GetEmptyPageFont()
+const vcl::Font& SwPageFrame::GetEmptyPageFont()
{
static vcl::Font* pEmptyPgFont = nullptr;
if ( nullptr == pEmptyPgFont )
@@ -7372,20 +7372,20 @@ const vcl::Font& SwPageFrm::GetEmptyPageFont()
/**
* Retouch for a section
*
- * Retouch will only be done, if the Frm is the last one in his chain.
- * The whole area of the upper which is located below the Frm will be
+ * Retouch will only be done, if the Frame is the last one in his chain.
+ * The whole area of the upper which is located below the Frame will be
* cleared using PaintBackground.
*/
-void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
+void SwFrame::Retouche( const SwPageFrame * pPage, const SwRect &rRect ) const
{
if ( gProp.bSFlyMetafile )
return;
OSL_ENSURE( GetUpper(), "Retouche try without Upper." );
- OSL_ENSURE( getRootFrm()->GetCurrShell() && gProp.pSGlobalShell->GetWin(), "Retouche on a printer?" );
+ OSL_ENSURE( getRootFrame()->GetCurrShell() && gProp.pSGlobalShell->GetWin(), "Retouche on a printer?" );
SwRect aRetouche( GetUpper()->PaintArea() );
- aRetouche.Top( Frm().Top() + Frm().Height() );
+ aRetouche.Top( Frame().Top() + Frame().Height() );
aRetouche.Intersection( gProp.pSGlobalShell->VisArea() );
if ( aRetouche.HasArea() )
@@ -7394,7 +7394,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
//cut out.
SwRegionRects aRegion( aRetouche );
aRegion -= rRect;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
// #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( nullptr, nullptr, nullptr, *pSh->GetOut() );
@@ -7451,9 +7451,9 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
* of the frame transparency is considered and its color is not "no fill"/"auto fill"
*
* Old description in German:
- * Returns the Backgroundbrush for the area of the Frm.
- * The Brush is defined by the Frm or by an upper, the first Brush is
- * used. If no Brush is defined for a Frm, false is returned.
+ * Returns the Backgroundbrush for the area of the Frame.
+ * The Brush is defined by the Frame or by an upper, the first Brush is
+ * used. If no Brush is defined for a Frame, false is returned.
*
* @param rpBrush
* output parameter - constant reference pointer the found background brush
@@ -7479,32 +7479,32 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const
*
* @return true, if a background brush for the frame is found
*/
-bool SwFrm::GetBackgroundBrush(
+bool SwFrame::GetBackgroundBrush(
drawinglayer::attribute::SdrAllFillAttributesHelperPtr& rFillAttributes,
const SvxBrushItem* & rpBrush,
const Color*& rpCol,
SwRect &rOrigRect,
bool bLowerMode ) const
{
- const SwFrm *pFrm = this;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwFrame *pFrame = this;
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
const SwViewOption *pOpt = pSh->GetViewOptions();
rpBrush = nullptr;
rpCol = nullptr;
do
- { if ( pFrm->IsPageFrm() && !pOpt->IsPageBack() )
+ { if ( pFrame->IsPageFrame() && !pOpt->IsPageBack() )
return false;
//UUUU
- if (pFrm->supportsFullDrawingLayerFillAttributeSet())
- rFillAttributes = pFrm->getSdrAllFillAttributesHelper();
- const SvxBrushItem &rBack = pFrm->GetAttrSet()->GetBackground();
+ if (pFrame->supportsFullDrawingLayerFillAttributeSet())
+ rFillAttributes = pFrame->getSdrAllFillAttributesHelper();
+ const SvxBrushItem &rBack = pFrame->GetAttrSet()->GetBackground();
- if( pFrm->IsSctFrm() )
+ if( pFrame->IsSctFrame() )
{
- const SwSection* pSection = static_cast<const SwSectionFrm*>(pFrm)->GetSection();
+ const SwSection* pSection = static_cast<const SwSectionFrame*>(pFrame)->GetSection();
// OD 20.08.2002 #99657# #GetTransChg#
- // Note: If frame <pFrm> is a section of the index and
+ // Note: If frame <pFrame> is a section of the index and
// it its background color is "no fill"/"auto fill" and
// it has no background graphic and
// we are not in the page preview and
@@ -7529,10 +7529,10 @@ bool SwFrm::GetBackgroundBrush(
}
// OD 20.08.2002 #99657#
- // determine, if background draw of frame <pFrm> considers transparency
+ // determine, if background draw of frame <pFrame> considers transparency
// --> Status Quo: background transparency have to be
// considered for fly frames
- const bool bConsiderBackgroundTransparency = pFrm->IsFlyFrm();
+ const bool bConsiderBackgroundTransparency = pFrame->IsFlyFrame();
// #i125189# Do not base the decision for using the parent's fill style for this
// frame when the new DrawingLayer FillAttributes are used on the SdrAllFillAttributesHelper
@@ -7552,7 +7552,7 @@ bool SwFrm::GetBackgroundBrush(
{
// maybe optimized already when 100% transparency is used somewhere, need to test
// XFillStyleItem directly from the model data
- const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrm->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue());
+ const drawing::FillStyle eFillStyle(static_cast< const XFillStyleItem& >(pFrame->GetAttrSet()->Get(XATTR_FILLSTYLE)).GetValue());
if(drawing::FillStyle_NONE != eFillStyle)
{
@@ -7564,7 +7564,7 @@ bool SwFrm::GetBackgroundBrush(
// OD 20.08.2002 #99657#
// add condition:
// If <bConsiderBackgroundTransparency> is set - see above -,
- // return brush of frame <pFrm>, if its color is *not* "no fill"/"auto fill"
+ // return brush of frame <pFrame>, if its color is *not* "no fill"/"auto fill"
if (
// #i125189# Done when the new DrawingLayer FillAttributes are used and
// not drawing::FillStyle_NONE (see above)
@@ -7581,22 +7581,22 @@ bool SwFrm::GetBackgroundBrush(
)
{
rpBrush = &rBack;
- if ( pFrm->IsPageFrm() && pSh->GetViewOptions()->getBrowseMode() )
+ if ( pFrame->IsPageFrame() && pSh->GetViewOptions()->getBrowseMode() )
{
- rOrigRect = pFrm->Frm();
+ rOrigRect = pFrame->Frame();
}
else
{
- if ( pFrm->Frm().SSize() != pFrm->Prt().SSize() )
+ if ( pFrame->Frame().SSize() != pFrame->Prt().SSize() )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFrm );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- ::lcl_CalcBorderRect( rOrigRect, pFrm, rAttrs, false, gProp );
+ ::lcl_CalcBorderRect( rOrigRect, pFrame, rAttrs, false, gProp );
}
else
{
- rOrigRect = pFrm->Prt();
- rOrigRect += pFrm->Frm().Pos();
+ rOrigRect = pFrame->Prt();
+ rOrigRect += pFrame->Frame().Pos();
}
}
@@ -7610,16 +7610,16 @@ bool SwFrm::GetBackgroundBrush(
}
// get parent frame - anchor or upper - for next loop
- if ( pFrm->IsFlyFrm() )
+ if ( pFrame->IsFlyFrame() )
{
// OD 20.08.2002 - use "static_cast" instead of "old C-cast"
- pFrm = (static_cast<const SwFlyFrm*>(pFrm))->GetAnchorFrm();
+ pFrame = (static_cast<const SwFlyFrame*>(pFrame))->GetAnchorFrame();
}
else
{
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
}
- } while ( pFrm );
+ } while ( pFrame );
return false;
}
@@ -7641,10 +7641,10 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
{
Graphic aRet;
//search any Fly!
- SwIterator<SwFrm,SwFormat> aIter( *this );
- SwFrm *pFirst = aIter.First();
+ SwIterator<SwFrame,SwFormat> aIter( *this );
+ SwFrame *pFirst = aIter.First();
SwViewShell *pSh;
- if ( pFirst && nullptr != ( pSh = pFirst->getRootFrm()->GetCurrShell()) )
+ if ( pFirst && nullptr != ( pSh = pFirst->getRootFrame()->GetCurrShell()) )
{
SwViewShell *pOldGlobal = gProp.pSGlobalShell;
gProp.pSGlobalShell = pSh;
@@ -7656,7 +7656,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
OSL_ENSURE( !pNoteURL, "MakeGraphic: pNoteURL already used? " );
pNoteURL = new SwNoteURL;
}
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pFirst);
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pFirst);
OutputDevice *pOld = pSh->GetOut();
ScopedVclPtrInstance< VirtualDevice > pDev( *pOld );
@@ -7668,7 +7668,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
aMet.SetPrefMapMode( aMap );
::SwCalcPixStatics( pSh->GetOut() );
- aMet.SetPrefSize( pFly->Frm().SSize() );
+ aMet.SetPrefSize( pFly->Frame().SSize() );
aMet.Record( pDev.get() );
pDev->SetLineColor();
@@ -7676,8 +7676,8 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pDev->SetFont( pOld->GetFont() );
//Enlarge the rectangle if needed, so the border is painted too.
- SwRect aOut( pFly->Frm() );
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pFly );
+ SwRect aOut( pFly->Frame() );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFly );
const SwBorderAttrs &rAttrs = *aAccess.Get();
if ( rAttrs.CalcRightLine() )
aOut.SSize().Width() += 2*gProp.nSPixelSzW;
@@ -7699,7 +7699,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
gProp.pSLines = new SwLineRects;
// OD 09.12.2002 #103045# - determine page, fly frame is on
- const SwPageFrm* pFlyPage = pFly->FindPageFrm();
+ const SwPageFrame* pFlyPage = pFly->FindPageFrame();
const Color aPageBackgrdColor(pFlyPage->GetDrawBackgrdColor());
const IDocumentDrawModelAccess& rIDDMA = pSh->getIDocumentDrawModelAccess();
// --> OD #i76669#
@@ -7709,7 +7709,7 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pFlyPage->IsRightToLeft(),
&aSwRedirector );
gProp.pSLines->PaintLines( pDev, gProp );
- if ( pFly->IsFlyInCntFrm() )
+ if ( pFly->IsFlyInContentFrame() )
pFly->Paint( *pDev, aOut );
gProp.pSLines->PaintLines( pDev, gProp );
// OD 30.08.2002 #102450# - add 3rd parameter
@@ -7728,13 +7728,13 @@ Graphic SwFlyFrameFormat::MakeGraphic( ImageMap* pMap )
pSh->DLPostPaint2(true);
aMet.Stop();
- aMet.Move( -pFly->Frm().Left(), -pFly->Frm().Top() );
+ aMet.Move( -pFly->Frame().Left(), -pFly->Frame().Top() );
aRet = Graphic( aMet );
if( bNoteURL )
{
OSL_ENSURE( pNoteURL, "MakeGraphic: Good Bye, NoteURL." );
- pNoteURL->FillImageMap( pMap, pFly->Frm().Pos(), aMap );
+ pNoteURL->FillImageMap( pMap, pFly->Frame().Pos(), aMap );
delete pNoteURL;
pNoteURL = nullptr;
}
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 00ffaec8a6f5..c9bf7173e4b3 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -40,9 +40,9 @@
#include <flyfrms.hxx>
#include <sortedobjs.hxx>
-SwSectionFrm::SwSectionFrm( SwSection &rSect, SwFrm* pSib )
- : SwLayoutFrm( rSect.GetFormat(), pSib )
- , SwFlowFrm( static_cast<SwFrm&>(*this) )
+SwSectionFrame::SwSectionFrame( SwSection &rSect, SwFrame* pSib )
+ : SwLayoutFrame( rSect.GetFormat(), pSib )
+ , SwFlowFrame( static_cast<SwFrame&>(*this) )
, m_pSection( &rSect )
, m_bFootnoteAtEnd(false)
, m_bEndnAtEnd(false)
@@ -50,15 +50,15 @@ SwSectionFrm::SwSectionFrm( SwSection &rSect, SwFrm* pSib )
, m_bOwnFootnoteNum(false)
, m_bFootnoteLock(false)
{
- mnFrmType = FRM_SECTION;
+ mnFrameType = FRM_SECTION;
CalcFootnoteAtEndFlag();
CalcEndAtEndFlag();
}
-SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) :
- SwLayoutFrm( rSect.GetFormat(), rSect.getRootFrm() ),
- SwFlowFrm( (SwFrm&)*this ),
+SwSectionFrame::SwSectionFrame( SwSectionFrame &rSect, bool bMaster ) :
+ SwLayoutFrame( rSect.GetFormat(), rSect.getRootFrame() ),
+ SwFlowFrame( (SwFrame&)*this ),
m_pSection( rSect.GetSection() ),
m_bFootnoteAtEnd( rSect.IsFootnoteAtEnd() ),
m_bEndnAtEnd( rSect.IsEndnAtEnd() ),
@@ -66,7 +66,7 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) :
m_bOwnFootnoteNum( false ),
m_bFootnoteLock( false )
{
- mnFrmType = FRM_SECTION;
+ mnFrameType = FRM_SECTION;
PROTOCOL( this, PROT_SECTION, bMaster ? ACT_CREATE_MASTER : ACT_CREATE_FOLLOW, &rSect )
@@ -74,7 +74,7 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) :
{
if( rSect.IsFollow() )
{
- SwSectionFrm* pMaster = rSect.FindMaster();
+ SwSectionFrame* pMaster = rSect.FindMaster();
pMaster->SetFollow( this );
}
SetFollow( &rSect );
@@ -90,15 +90,15 @@ SwSectionFrm::SwSectionFrm( SwSectionFrm &rSect, bool bMaster ) :
}
}
-// NOTE: call <SwSectionFrm::Init()> directly after creation of a new section
+// NOTE: call <SwSectionFrame::Init()> directly after creation of a new section
// frame and its insert in the layout.
-void SwSectionFrm::Init()
+void SwSectionFrame::Init()
{
- OSL_ENSURE( GetUpper(), "SwSectionFrm::Init before insertion?!" );
+ OSL_ENSURE( GetUpper(), "SwSectionFrame::Init before insertion?!" );
SWRECTFN( this )
long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
- (Frm().*fnRect->fnSetWidth)( nWidth );
- (Frm().*fnRect->fnSetHeight)( 0 );
+ (Frame().*fnRect->fnSetWidth)( nWidth );
+ (Frame().*fnRect->fnSetHeight)( 0 );
// #109700# LRSpace for sections
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
@@ -117,16 +117,16 @@ void SwSectionFrm::Init()
}
}
-void SwSectionFrm::DestroyImpl()
+void SwSectionFrame::DestroyImpl()
{
if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm )
- pRootFrm->RemoveFromList( this );
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame )
+ pRootFrame->RemoveFromList( this );
if( IsFollow() )
{
- SwSectionFrm *pMaster = FindMaster();
+ SwSectionFrame *pMaster = FindMaster();
if( pMaster )
{
PROTOCOL( this, PROT_SECTION, ACT_DEL_FOLLOW, pMaster )
@@ -145,21 +145,21 @@ void SwSectionFrm::DestroyImpl()
}
}
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwSectionFrm::~SwSectionFrm()
+SwSectionFrame::~SwSectionFrame()
{
}
-void SwSectionFrm::DelEmpty( bool bRemove )
+void SwSectionFrame::DelEmpty( bool bRemove )
{
if( IsColLocked() )
{
- OSL_ENSURE( !bRemove, "Don't delete locked SectionFrms" );
+ OSL_ENSURE( !bRemove, "Don't delete locked SectionFrames" );
return;
}
- SwFrm* pUp = GetUpper();
+ SwFrame* pUp = GetUpper();
if( pUp )
{
// #i27138#
@@ -168,18 +168,18 @@ void SwSectionFrm::DelEmpty( bool bRemove )
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
// and relation CONTENT_FLOWS_TO for current previous paragraph will change.
{
- SwViewShell* pViewShell( getRootFrm()->GetCurrShell() );
+ SwViewShell* pViewShell( getRootFrame()->GetCurrShell() );
if ( pViewShell && pViewShell->GetLayout() &&
pViewShell->GetLayout()->IsAnyShellAccessible() )
{
pViewShell->InvalidateAccessibleParaFlowRelation(
- dynamic_cast<SwTextFrm*>(FindNextCnt( true )),
- dynamic_cast<SwTextFrm*>(FindPrevCnt( true )) );
+ dynamic_cast<SwTextFrame*>(FindNextCnt( true )),
+ dynamic_cast<SwTextFrame*>(FindPrevCnt( true )) );
}
}
_Cut( bRemove );
}
- SwSectionFrm *pMaster = IsFollow() ? FindMaster() : nullptr;
+ SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr;
if (pMaster)
{
pMaster->SetFollow( GetFollow() );
@@ -193,107 +193,107 @@ void SwSectionFrm::DelEmpty( bool bRemove )
SetFollow(nullptr);
if( pUp )
{
- Frm().Height( 0 );
+ Frame().Height( 0 );
// If we are destroyed immediately anyway, we don't need
// to put us into the list
if( bRemove )
{ // If we already were half dead before this DelEmpty,
// we are likely in the list and have to remove us from
// it
- if( !m_pSection && getRootFrm() )
- getRootFrm()->RemoveFromList( this );
+ if( !m_pSection && getRootFrame() )
+ getRootFrame()->RemoveFromList( this );
}
- else if( getRootFrm() )
- getRootFrm()->InsertEmptySct( this );
+ else if( getRootFrame() )
+ getRootFrame()->InsertEmptySct( this );
m_pSection = nullptr; // like this a reanimation is virtually impossible though
}
}
-void SwSectionFrm::Cut()
+void SwSectionFrame::Cut()
{
_Cut( true );
}
-void SwSectionFrm::_Cut( bool bRemove )
+void SwSectionFrame::_Cut( bool bRemove )
{
OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
PROTOCOL( this, PROT_CUT, 0, GetUpper() )
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- SwFrm *pFrm = GetNext();
- SwFrm* pPrepFrm = nullptr;
- while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() )
- pFrm = pFrm->GetNext();
- if( pFrm )
+ SwFrame *pFrame = GetNext();
+ SwFrame* pPrepFrame = nullptr;
+ while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() )
+ pFrame = pFrame->GetNext();
+ if( pFrame )
{ // The former successor might have calculated a gap to the predecessor
// which is now obsolete since he becomes the first
- pFrm->_InvalidatePrt();
- pFrm->_InvalidatePos();
- if( pFrm->IsSctFrm() )
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if ( pFrm && pFrm->IsContentFrm() )
+ pFrame->_InvalidatePrt();
+ pFrame->_InvalidatePos();
+ if( pFrame->IsSctFrame() )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if ( pFrame && pFrame->IsContentFrame() )
{
- pFrm->InvalidatePage( pPage );
+ pFrame->InvalidatePage( pPage );
if( IsInFootnote() && !GetIndPrev() )
- pPrepFrm = pFrm;
+ pPrepFrame = pFrame;
}
}
else
{
InvalidateNextPos();
// Someone has to take over the retouching: predecessor or Upper
- if ( nullptr != (pFrm = GetPrev()) )
- { pFrm->SetRetouche();
- pFrm->Prepare( PREP_WIDOWS_ORPHANS );
- if ( pFrm->IsContentFrm() )
- pFrm->InvalidatePage( pPage );
+ if ( nullptr != (pFrame = GetPrev()) )
+ { pFrame->SetRetouche();
+ pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+ if ( pFrame->IsContentFrame() )
+ pFrame->InvalidatePage( pPage );
}
- // If I am (was) the only FlowFrm in my Upper, then he has to take over
+ // If I am (was) the only FlowFrame in my Upper, then he has to take over
// the retouching.
// Furthermore a blank page could have emerged
else
- { SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPage->GetUpper());
+ { SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPage->GetUpper());
pRoot->SetSuperfluous();
GetUpper()->SetCompletePaint();
}
}
// First remove, then shrink Upper
- SwLayoutFrm *pUp = GetUpper();
+ SwLayoutFrame *pUp = GetUpper();
if( bRemove )
{
RemoveFromLayout();
- if( pUp && !pUp->Lower() && pUp->IsFootnoteFrm() && !pUp->IsColLocked() &&
+ if( pUp && !pUp->Lower() && pUp->IsFootnoteFrame() && !pUp->IsColLocked() &&
pUp->GetUpper() )
{
pUp->Cut();
- SwFrm::DestroyFrm(pUp);
+ SwFrame::DestroyFrame(pUp);
pUp = nullptr;
}
}
- if( pPrepFrm )
- pPrepFrm->Prepare( PREP_FTN );
+ if( pPrepFrame )
+ pPrepFrame->Prepare( PREP_FTN );
if ( pUp )
{
SWRECTFN( this );
- SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if( nFrmHeight > 0 )
+ SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if( nFrameHeight > 0 )
{
if( !bRemove )
{
- (Frm().*fnRect->fnSetHeight)( 0 );
+ (Frame().*fnRect->fnSetHeight)( 0 );
(Prt().*fnRect->fnSetHeight)( 0 );
}
- pUp->Shrink( nFrmHeight );
+ pUp->Shrink( nFrameHeight );
}
}
}
-void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
+void SwSectionFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
{
OSL_ENSURE( pParent, "No parent for Paste()." );
- OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." );
+ OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." );
OSL_ENSURE( pParent != this, "I'm my own parent." );
OSL_ENSURE( pSibling != this, "I'm my own neighbour." );
OSL_ENSURE( !GetPrev() && !GetUpper(),
@@ -302,13 +302,13 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
PROTOCOL( this, PROT_PASTE, 0, GetUpper() )
// Add to the tree
- SwSectionFrm* pSect = pParent->FindSctFrm();
+ SwSectionFrame* pSect = pParent->FindSctFrame();
// Assure that parent is not inside a table frame, which is inside the found section frame.
if ( pSect )
{
- SwTabFrm* pTableFrm = pParent->FindTabFrm();
- if ( pTableFrm &&
- pSect->IsAnLower( pTableFrm ) )
+ SwTabFrame* pTableFrame = pParent->FindTabFrame();
+ if ( pTableFrame &&
+ pSect->IsAnLower( pTableFrame ) )
{
pSect = nullptr;
}
@@ -317,37 +317,37 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
SWRECTFN( pParent )
if( pSect && HasToBreak( pSect ) )
{
- if( pParent->IsColBodyFrm() ) // dealing with a single-column area
+ if( pParent->IsColBodyFrame() ) // dealing with a single-column area
{
// If we are coincidentally at the end of a column, pSibling
// has to point to the first frame of the next column in order
// for the content of the next column to be moved correctly to the
// newly created pSect by the InsertGroup
- SwColumnFrm *pCol = static_cast<SwColumnFrm*>(pParent->GetUpper());
- while( !pSibling && nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
- pSibling = static_cast<SwLayoutFrm*>(static_cast<SwColumnFrm*>(pCol)->Lower())->Lower();
+ SwColumnFrame *pCol = static_cast<SwColumnFrame*>(pParent->GetUpper());
+ while( !pSibling && nullptr != ( pCol = static_cast<SwColumnFrame*>(pCol->GetNext()) ) )
+ pSibling = static_cast<SwLayoutFrame*>(static_cast<SwColumnFrame*>(pCol)->Lower())->Lower();
if( pSibling )
{
// Even worse: every following column content has to
// be attached to the pSibling-chain in order to be
// taken along
- SwFrm *pTmp = pSibling;
- while ( nullptr != ( pCol = static_cast<SwColumnFrm*>(pCol->GetNext()) ) )
+ SwFrame *pTmp = pSibling;
+ while ( nullptr != ( pCol = static_cast<SwColumnFrame*>(pCol->GetNext()) ) )
{
while ( pTmp->GetNext() )
pTmp = pTmp->GetNext();
- SwFrm* pSave = ::SaveContent( pCol );
+ SwFrame* pSave = ::SaveContent( pCol );
if (pSave)
::RestoreContent( pSave, pSibling->GetUpper(), pTmp, true );
}
}
}
pParent = pSect;
- pSect = new SwSectionFrm( *static_cast<SwSectionFrm*>(pParent)->GetSection(), pParent );
+ pSect = new SwSectionFrame( *static_cast<SwSectionFrame*>(pParent)->GetSection(), pParent );
// if pParent is decomposed into two parts, its Follow has to be attached
// to the new second part
- pSect->SetFollow( static_cast<SwSectionFrm*>(pParent)->GetFollow() );
- static_cast<SwSectionFrm*>(pParent)->SetFollow( nullptr );
+ pSect->SetFollow( static_cast<SwSectionFrame*>(pParent)->GetFollow() );
+ static_cast<SwSectionFrame*>(pParent)->SetFollow( nullptr );
if( pSect->GetFollow() )
pParent->_InvalidateSize();
@@ -357,9 +357,9 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
pSect->Init();
(pSect->*fnRect->fnMakePos)( pSect->GetUpper(), pSect->GetPrev(), true);
}
- if( !static_cast<SwLayoutFrm*>(pParent)->Lower() )
+ if( !static_cast<SwLayoutFrame*>(pParent)->Lower() )
{
- SwSectionFrm::MoveContentAndDelete( static_cast<SwSectionFrm*>(pParent), false );
+ SwSectionFrame::MoveContentAndDelete( static_cast<SwSectionFrame*>(pParent), false );
pParent = this;
}
}
@@ -367,46 +367,46 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
InsertGroupBefore( pParent, pSibling, nullptr );
_InvalidateAll();
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( pSibling )
{
pSibling->_InvalidatePos();
pSibling->_InvalidatePrt();
- if ( pSibling->IsContentFrm() )
+ if ( pSibling->IsContentFrame() )
pSibling->InvalidatePage( pPage );
}
- SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if( nFrmHeight )
- pParent->Grow( nFrmHeight );
+ SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if( nFrameHeight )
+ pParent->Grow( nFrameHeight );
if ( GetPrev() )
{
if ( !IsFollow() )
{
GetPrev()->InvalidateSize();
- if ( GetPrev()->IsContentFrm() )
+ if ( GetPrev()->IsContentFrame() )
GetPrev()->InvalidatePage( pPage );
}
}
}
/**
-|* Here it's decided whether the this-SectionFrm should break up
+|* Here it's decided whether the this-SectionFrame should break up
|* the passed (Section)frm (or not).
|* Initially, all superior sections are broken up. Later on that could
|* be made configurable.
|*/
-bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
+bool SwSectionFrame::HasToBreak( const SwFrame* pFrame ) const
{
- if( !pFrm->IsSctFrm() )
+ if( !pFrame->IsSctFrame() )
return false;
const SwSectionFormat *pTmp = static_cast<const SwSectionFormat*>(GetFormat());
- const SwFrameFormat *pOtherFormat = static_cast<const SwSectionFrm*>(pFrm)->GetFormat();
+ const SwFrameFormat *pOtherFormat = static_cast<const SwSectionFrame*>(pFrame)->GetFormat();
do
{
pTmp = pTmp->GetParent();
@@ -418,11 +418,11 @@ bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const
}
/**
-|* Merges two SectionFrms, in case it's about the same section.
+|* Merges two SectionFrames, in case it's about the same section.
|* This can be necessary when a (sub)section is deleted that had
|* divided another part into two.
|*/
-void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
+void SwSectionFrame::MergeNext( SwSectionFrame* pNxt )
{
if (pNxt->IsDeleteForbidden())
return;
@@ -431,18 +431,18 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
{
PROTOCOL( this, PROT_SECTION, ACT_MERGE, pNxt )
- SwFrm* pTmp = ::SaveContent( pNxt );
+ SwFrame* pTmp = ::SaveContent( pNxt );
if( pTmp )
{
- SwFrm* pLast = Lower();
- SwLayoutFrm* pLay = this;
+ SwFrame* pLast = Lower();
+ SwLayoutFrame* pLay = this;
if( pLast )
{
while( pLast->GetNext() )
pLast = pLast->GetNext();
- if( pLast->IsColumnFrm() )
- { // Columns now with BodyFrm
- pLay = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pLast)->Lower());
+ if( pLast->IsColumnFrame() )
+ { // Columns now with BodyFrame
+ pLay = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pLast)->Lower());
pLast = pLay->Lower();
if( pLast )
while( pLast->GetNext() )
@@ -454,32 +454,32 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt )
SetFollow( pNxt->GetFollow() );
pNxt->SetFollow( nullptr );
pNxt->Cut();
- SwFrm::DestroyFrm(pNxt);
+ SwFrame::DestroyFrame(pNxt);
InvalidateSize();
}
}
/**
-|* Divides a SectionFrm into two parts. The second one starts with the
+|* Divides a SectionFrame into two parts. The second one starts with the
|* passed frame.
|* This is required when inserting an inner section, because the MoveFwd
|* cannot have the desired effect within a frame or a table cell.
|*/
-bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres )
+bool SwSectionFrame::SplitSect( SwFrame* pFrame, bool bApres )
{
- OSL_ENSURE( pFrm, "SplitSect: Why?" );
- SwFrm* pOther = bApres ? pFrm->FindNext() : pFrm->FindPrev();
+ OSL_ENSURE( pFrame, "SplitSect: Why?" );
+ SwFrame* pOther = bApres ? pFrame->FindNext() : pFrame->FindPrev();
if( !pOther )
return false;
- SwSectionFrm* pSect = pOther->FindSctFrm();
+ SwSectionFrame* pSect = pOther->FindSctFrame();
if( pSect != this )
return false;
// Put the content aside
- SwFrm* pSav = ::SaveContent( this, bApres ? pOther : pFrm );
+ SwFrame* pSav = ::SaveContent( this, bApres ? pOther : pFrame );
OSL_ENSURE( pSav, "SplitSect: What's on?" );
if( pSav ) // be robust
- { // Create a new SctFrm, not as a Follower/master
- SwSectionFrm* pNew = new SwSectionFrm( *pSect->GetSection(), pSect );
+ { // Create a new SctFrame, not as a Follower/master
+ SwSectionFrame* pNew = new SwSectionFrame( *pSect->GetSection(), pSect );
pNew->InsertBehind( pSect->GetUpper(), pSect );
pNew->Init();
SWRECTFN( this )
@@ -489,10 +489,10 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres )
// of the section frame. In the section initialization the columns are
// created.
{
- SwLayoutFrm* pLay = pNew;
+ SwLayoutFrame* pLay = pNew;
// Search for last layout frame, e.g. for columned sections.
- while( pLay->Lower() && pLay->Lower()->IsLayoutFrm() )
- pLay = static_cast<SwLayoutFrm*>(pLay->Lower());
+ while( pLay->Lower() && pLay->Lower()->IsLayoutFrame() )
+ pLay = static_cast<SwLayoutFrame*>(pLay->Lower());
::RestoreContent( pSav, pLay, nullptr, true );
}
_InvalidateSize();
@@ -507,61 +507,61 @@ bool SwSectionFrm::SplitSect( SwFrm* pFrm, bool bApres )
}
/**
-|* MoveContent is called for destroying a SectionFrms, due to
+|* MoveContent is called for destroying a SectionFrames, due to
|* the cancellation or hiding of a section, to handle the content.
-|* If the SectionFrm hasn't broken up another one, then the content
+|* If the SectionFrame hasn't broken up another one, then the content
|* is moved to the Upper. Otherwise the content is moved to another
-|* SectionFrm, which has to be potentially merged.
+|* SectionFrame, which has to be potentially merged.
|*/
-// If a multi-column section is cancelled, the ContentFrms have to be
+// If a multi-column section is cancelled, the ContentFrames have to be
// invalidated
-static void lcl_InvalidateInfFlags( SwFrm* pFrm, bool bInva )
+static void lcl_InvalidateInfFlags( SwFrame* pFrame, bool bInva )
{
- while ( pFrm )
+ while ( pFrame )
{
- pFrm->InvalidateInfFlags();
+ pFrame->InvalidateInfFlags();
if( bInva )
{
- pFrm->_InvalidatePos();
- pFrm->_InvalidateSize();
- pFrm->_InvalidatePrt();
+ pFrame->_InvalidatePos();
+ pFrame->_InvalidateSize();
+ pFrame->_InvalidatePrt();
}
- if( pFrm->IsLayoutFrm() )
- lcl_InvalidateInfFlags( static_cast<SwLayoutFrm*>(pFrm)->GetLower(), false );
- pFrm = pFrm->GetNext();
+ if( pFrame->IsLayoutFrame() )
+ lcl_InvalidateInfFlags( static_cast<SwLayoutFrame*>(pFrame)->GetLower(), false );
+ pFrame = pFrame->GetNext();
}
}
-// Works like SwContentFrm::ImplGetNextContentFrm, but starts with a LayoutFrm
-static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd )
+// Works like SwContentFrame::ImplGetNextContentFrame, but starts with a LayoutFrame
+static SwContentFrame* lcl_GetNextContentFrame( const SwLayoutFrame* pLay, bool bFwd )
{
if ( bFwd )
{
- if ( pLay->GetNext() && pLay->GetNext()->IsContentFrm() )
- return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pLay->GetNext()));
+ if ( pLay->GetNext() && pLay->GetNext()->IsContentFrame() )
+ return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pLay->GetNext()));
}
else
{
- if ( pLay->GetPrev() && pLay->GetPrev()->IsContentFrm() )
- return const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pLay->GetPrev()));
+ if ( pLay->GetPrev() && pLay->GetPrev()->IsContentFrame() )
+ return const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pLay->GetPrev()));
}
- const SwFrm* pFrm = pLay;
- SwContentFrm *pContentFrm = nullptr;
+ const SwFrame* pFrame = pLay;
+ SwContentFrame *pContentFrame = nullptr;
bool bGoingUp = true;
do {
- const SwFrm *p = nullptr;
+ const SwFrame *p = nullptr;
bool bGoingFwdOrBwd = false;
- bool bGoingDown = !bGoingUp && ( nullptr != ( p = pFrm->IsLayoutFrm() ? static_cast<const SwLayoutFrm*>(pFrm)->Lower() : nullptr ) );
+ bool bGoingDown = !bGoingUp && ( nullptr != ( p = pFrame->IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(pFrame)->Lower() : nullptr ) );
if ( !bGoingDown )
{
- bGoingFwdOrBwd = ( nullptr != ( p = pFrm->IsFlyFrm() ?
- ( bFwd ? static_cast<const SwFlyFrm*>(pFrm)->GetNextLink() : static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink() ) :
- ( bFwd ? pFrm->GetNext() :pFrm->GetPrev() ) ) );
+ bGoingFwdOrBwd = ( nullptr != ( p = pFrame->IsFlyFrame() ?
+ ( bFwd ? static_cast<const SwFlyFrame*>(pFrame)->GetNextLink() : static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink() ) :
+ ( bFwd ? pFrame->GetNext() :pFrame->GetPrev() ) ) );
if ( !bGoingFwdOrBwd )
{
- bGoingUp = (nullptr != (p = pFrm->GetUpper() ) );
+ bGoingUp = (nullptr != (p = pFrame->GetUpper() ) );
if ( !bGoingUp )
return nullptr;
}
@@ -573,45 +573,45 @@ static SwContentFrm* lcl_GetNextContentFrm( const SwLayoutFrm* pLay, bool bFwd )
while ( p->GetNext() )
p = p->GetNext();
- pFrm = p;
- } while ( nullptr == (pContentFrm = (pFrm->IsContentFrm() ? const_cast<SwContentFrm*>(static_cast<const SwContentFrm*>(pFrm)) : nullptr) ));
+ pFrame = p;
+ } while ( nullptr == (pContentFrame = (pFrame->IsContentFrame() ? const_cast<SwContentFrame*>(static_cast<const SwContentFrame*>(pFrame)) : nullptr) ));
- return pContentFrm;
+ return pContentFrame;
}
-#define FIRSTLEAF( pLayFrm ) ( ( pLayFrm->Lower() && pLayFrm->Lower()->IsColumnFrm() )\
- ? pLayFrm->GetNextLayoutLeaf() \
- : pLayFrm )
+#define FIRSTLEAF( pLayFrame ) ( ( pLayFrame->Lower() && pLayFrame->Lower()->IsColumnFrame() )\
+ ? pLayFrame->GetNextLayoutLeaf() \
+ : pLayFrame )
-void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
+void SwSectionFrame::MoveContentAndDelete( SwSectionFrame* pDel, bool bSave )
{
- bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrm();
- SwFrm* pPrv = pDel->GetPrev();
- SwLayoutFrm* pUp = pDel->GetUpper();
+ bool bSize = pDel->Lower() && pDel->Lower()->IsColumnFrame();
+ SwFrame* pPrv = pDel->GetPrev();
+ SwLayoutFrame* pUp = pDel->GetUpper();
// OD 27.03.2003 #i12711# - initialize local pointer variables.
- SwSectionFrm* pPrvSct = nullptr;
- SwSectionFrm* pNxtSct = nullptr;
+ SwSectionFrame* pPrvSct = nullptr;
+ SwSectionFrame* pNxtSct = nullptr;
SwSectionFormat* pParent = static_cast<SwSectionFormat*>(pDel->GetFormat())->GetParent();
if( pDel->IsInTab() && pParent )
{
- SwTabFrm *pTab = pDel->FindTabFrm();
+ SwTabFrame *pTab = pDel->FindTabFrame();
// If we are within a table, we can only have broken up sections that
// are inside as well, but not a section that contains the whole table.
- if( pTab->IsInSct() && pParent == pTab->FindSctFrm()->GetFormat() )
+ if( pTab->IsInSct() && pParent == pTab->FindSctFrame()->GetFormat() )
pParent = nullptr;
}
// If our Format has a parent, we have probably broken up another
- // SectionFrm, which has to be checked. To do so we first acquire the
- // succeeding and the preceding ContentFrm, let's see if they
- // lay in the SectionFrms.
+ // SectionFrame, which has to be checked. To do so we first acquire the
+ // succeeding and the preceding ContentFrame, let's see if they
+ // lay in the SectionFrames.
// OD 27.03.2003 #i12711# - check, if previous and next section belonging
// together and can be joined, *not* only if deleted section contains content.
if ( pParent )
{
- SwFrm* pPrvContent = lcl_GetNextContentFrm( pDel, false );
- pPrvSct = pPrvContent ? pPrvContent->FindSctFrm() : nullptr;
- SwFrm* pNxtContent = lcl_GetNextContentFrm( pDel, true );
- pNxtSct = pNxtContent ? pNxtContent->FindSctFrm() : nullptr;
+ SwFrame* pPrvContent = lcl_GetNextContentFrame( pDel, false );
+ pPrvSct = pPrvContent ? pPrvContent->FindSctFrame() : nullptr;
+ SwFrame* pNxtContent = lcl_GetNextContentFrame( pDel, true );
+ pNxtSct = pNxtContent ? pNxtContent->FindSctFrame() : nullptr;
}
else
{
@@ -620,15 +620,15 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
}
// Now the content is put aside and the frame is destroyed
- SwFrm *pSave = bSave ? ::SaveContent( pDel ) : nullptr;
+ SwFrame *pSave = bSave ? ::SaveContent( pDel ) : nullptr;
bool bOldFootnote = true;
- if( pSave && pUp->IsFootnoteFrm() )
+ if( pSave && pUp->IsFootnoteFrame() )
{
- bOldFootnote = static_cast<SwFootnoteFrm*>(pUp)->IsColLocked();
- static_cast<SwFootnoteFrm*>(pUp)->ColLock();
+ bOldFootnote = static_cast<SwFootnoteFrame*>(pUp)->IsColLocked();
+ static_cast<SwFootnoteFrame*>(pUp)->ColLock();
}
pDel->DelEmpty( true );
- SwFrm::DestroyFrm(pDel);
+ SwFrame::DestroyFrame(pDel);
if( pParent )
{ // Search for the appropriate insert position
if( pNxtSct && pNxtSct->GetFormat() == pParent )
@@ -641,11 +641,11 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
else if( pPrvSct && pPrvSct->GetFormat() == pParent )
{ // Wonderful, here we can insert ourselves at the end
pUp = pPrvSct;
- if( pUp->Lower() && pUp->Lower()->IsColumnFrm() )
+ if( pUp->Lower() && pUp->Lower()->IsColumnFrame() )
{
- pUp = static_cast<SwLayoutFrm*>(pUp->GetLastLower());
+ pUp = static_cast<SwLayoutFrame*>(pUp->GetLastLower());
// The body of the last column
- pUp = static_cast<SwLayoutFrm*>(pUp->Lower());
+ pUp = static_cast<SwLayoutFrame*>(pUp->Lower());
}
// In order to perform the insertion after the last one
pPrv = pUp->GetLastLower();
@@ -660,7 +660,7 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
// that derives from the same Parent.
// In that case, there's not (yet) a part of our parent available
// that can store the content, so we create it here.
- pPrvSct = new SwSectionFrm( *pParent->GetSection(), pUp );
+ pPrvSct = new SwSectionFrame( *pParent->GetSection(), pUp );
pPrvSct->InsertBehind( pUp, pPrv );
pPrvSct->Init();
SWRECTFN( pUp )
@@ -676,9 +676,9 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
{
lcl_InvalidateInfFlags( pSave, bSize );
::RestoreContent( pSave, pUp, pPrv, true );
- pUp->FindPageFrm()->InvalidateContent();
+ pUp->FindPageFrame()->InvalidateContent();
if( !bOldFootnote )
- static_cast<SwFootnoteFrm*>(pUp)->ColUnlock();
+ static_cast<SwFootnoteFrame*>(pUp)->ColUnlock();
}
// Now two parts of the superior section could possibly be merged
if( pPrvSct && !pPrvSct->IsJoinLocked() )
@@ -688,14 +688,14 @@ void SwSectionFrm::MoveContentAndDelete( SwSectionFrm* pDel, bool bSave )
}
}
-void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
+void SwSectionFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
{
if ( IsJoinLocked() || IsColLocked() || StackHack::IsLocked() || StackHack::Count() > 50 )
return;
if( !m_pSection ) // Via DelEmpty
{
#ifdef DBG_UTIL
- OSL_ENSURE( getRootFrm()->IsInDelList( this ), "SectionFrm without Section" );
+ OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" );
#endif
if( !mbValidPos )
{
@@ -712,21 +712,21 @@ void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
while( GetNext() && GetNext() == GetFollow() )
{
- const SwFrm* pFoll = GetFollow();
- MergeNext( static_cast<SwSectionFrm*>(GetNext()) );
+ const SwFrame* pFoll = GetFollow();
+ MergeNext( static_cast<SwSectionFrame*>(GetNext()) );
if( pFoll == GetFollow() )
break;
}
// OD 2004-03-15 #116561# - In online layout join the follows, if section
// can grow.
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() &&
( Grow( LONG_MAX, true ) > 0 ) )
{
while( GetFollow() )
{
- const SwFrm* pFoll = GetFollow();
+ const SwFrame* pFoll = GetFollow();
MergeNext( GetFollow() );
if( pFoll == GetFollow() )
break;
@@ -742,19 +742,19 @@ void SwSectionFrm::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const SwFormatCol &rCol = GetFormat()->GetCol();
(void)rCol;
#endif
- SwLayoutFrm::MakeAll(getRootFrm()->GetCurrShell()->GetOut());
+ SwLayoutFrame::MakeAll(getRootFrame()->GetCurrShell()->GetOut());
UnlockJoin();
if( m_pSection && IsSuperfluous() )
DelEmpty( false );
}
-bool SwSectionFrm::ShouldBwdMoved( SwLayoutFrm *, bool , bool & )
+bool SwSectionFrame::ShouldBwdMoved( SwLayoutFrame *, bool , bool & )
{
OSL_FAIL( "Hups, wo ist meine Tarnkappe?" );
return false;
}
-const SwSectionFormat* SwSectionFrm::_GetEndSectFormat() const
+const SwSectionFormat* SwSectionFrame::_GetEndSectFormat() const
{
const SwSectionFormat *pFormat = m_pSection->GetFormat();
while( !pFormat->GetEndAtTextEnd().IsAtEnd() )
@@ -767,41 +767,41 @@ const SwSectionFormat* SwSectionFrm::_GetEndSectFormat() const
return pFormat;
}
-static void lcl_FindContentFrm( SwContentFrm* &rpContentFrm, SwFootnoteFrm* &rpFootnoteFrm,
- SwFrm* pFrm, bool &rbChkFootnote )
+static void lcl_FindContentFrame( SwContentFrame* &rpContentFrame, SwFootnoteFrame* &rpFootnoteFrame,
+ SwFrame* pFrame, bool &rbChkFootnote )
{
- if( pFrm )
+ if( pFrame )
{
- while( pFrm->GetNext() )
- pFrm = pFrm->GetNext();
- while( !rpContentFrm && pFrm )
+ while( pFrame->GetNext() )
+ pFrame = pFrame->GetNext();
+ while( !rpContentFrame && pFrame )
{
- if( pFrm->IsContentFrm() )
- rpContentFrm = static_cast<SwContentFrm*>(pFrm);
- else if( pFrm->IsLayoutFrm() )
+ if( pFrame->IsContentFrame() )
+ rpContentFrame = static_cast<SwContentFrame*>(pFrame);
+ else if( pFrame->IsLayoutFrame() )
{
- if( pFrm->IsFootnoteFrm() )
+ if( pFrame->IsFootnoteFrame() )
{
if( rbChkFootnote )
{
- rpFootnoteFrm = static_cast<SwFootnoteFrm*>(pFrm);
- rbChkFootnote = rpFootnoteFrm->GetAttr()->GetFootnote().IsEndNote();
+ rpFootnoteFrame = static_cast<SwFootnoteFrame*>(pFrame);
+ rbChkFootnote = rpFootnoteFrame->GetAttr()->GetFootnote().IsEndNote();
}
}
else
- lcl_FindContentFrm( rpContentFrm, rpFootnoteFrm,
- static_cast<SwLayoutFrm*>(pFrm)->Lower(), rbChkFootnote );
+ lcl_FindContentFrame( rpContentFrame, rpFootnoteFrame,
+ static_cast<SwLayoutFrame*>(pFrame)->Lower(), rbChkFootnote );
}
- pFrm = pFrm->GetPrev();
+ pFrame = pFrame->GetPrev();
}
}
}
-SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode )
+SwContentFrame *SwSectionFrame::FindLastContent( sal_uInt8 nMode )
{
- SwContentFrm *pRet = nullptr;
- SwFootnoteFrm *pFootnoteFrm = nullptr;
- SwSectionFrm *pSect = this;
+ SwContentFrame *pRet = nullptr;
+ SwFootnoteFrame *pFootnoteFrame = nullptr;
+ SwSectionFrame *pSect = this;
if( nMode )
{
const SwSectionFormat *pFormat = IsEndnAtEnd() ? GetEndSectFormat() :
@@ -809,13 +809,13 @@ SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode )
do {
while( pSect->HasFollow() )
pSect = pSect->GetFollow();
- SwFrm* pTmp = pSect->FindNext();
- while( pTmp && pTmp->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pTmp)->GetSection() )
+ SwFrame* pTmp = pSect->FindNext();
+ while( pTmp && pTmp->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pTmp)->GetSection() )
pTmp = pTmp->FindNext();
- if( pTmp && pTmp->IsSctFrm() &&
- static_cast<SwSectionFrm*>(pTmp)->IsDescendantFrom( pFormat ) )
- pSect = static_cast<SwSectionFrm*>(pTmp);
+ if( pTmp && pTmp->IsSctFrame() &&
+ static_cast<SwSectionFrame*>(pTmp)->IsDescendantFrom( pFormat ) )
+ pSect = static_cast<SwSectionFrame*>(pTmp);
else
break;
} while( true );
@@ -823,24 +823,24 @@ SwContentFrm *SwSectionFrm::FindLastContent( sal_uInt8 nMode )
bool bFootnoteFound = nMode == FINDMODE_ENDNOTE;
do
{
- lcl_FindContentFrm( pRet, pFootnoteFrm, pSect->Lower(), bFootnoteFound );
+ lcl_FindContentFrame( pRet, pFootnoteFrame, pSect->Lower(), bFootnoteFound );
if( pRet || !pSect->IsFollow() || !nMode ||
( FINDMODE_MYLAST == nMode && this == pSect ) )
break;
pSect = pSect->FindMaster();
} while( pSect );
- if( ( nMode == FINDMODE_ENDNOTE ) && pFootnoteFrm )
- pRet = pFootnoteFrm->ContainsContent();
+ if( ( nMode == FINDMODE_ENDNOTE ) && pFootnoteFrame )
+ pRet = pFootnoteFrame->ContainsContent();
return pRet;
}
-bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
+bool SwSectionFrame::CalcMinDiff( SwTwips& rMinDiff ) const
{
if( ToMaximize( true ) )
{
SWRECTFN( this )
rMinDiff = (GetUpper()->*fnRect->fnGetPrtBottom)();
- rMinDiff = (Frm().*fnRect->fnBottomDist)( rMinDiff );
+ rMinDiff = (Frame().*fnRect->fnBottomDist)( rMinDiff );
return true;
}
return false;
@@ -849,36 +849,36 @@ bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const
/**
* CollectEndnotes looks for endnotes in the sectionfrm and his follows,
* the endnotes will cut off the layout and put into the array.
- * If the first endnote is not a master-SwFootnoteFrm, the whole sectionfrm
+ * If the first endnote is not a master-SwFootnoteFrame, the whole sectionfrm
* contains only endnotes and it is not necessary to collect them.
*/
-static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
+static SwFootnoteFrame* lcl_FindEndnote( SwSectionFrame* &rpSect, bool &rbEmpty,
SwLayouter *pLayouter )
{
// if rEmpty is set, the rpSect is already searched
- SwSectionFrm* pSect = rbEmpty ? rpSect->GetFollow() : rpSect;
+ SwSectionFrame* pSect = rbEmpty ? rpSect->GetFollow() : rpSect;
while( pSect )
{
- OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrm()) || pSect->GetUpper()->IsFootnoteFrm(),
+ OSL_ENSURE( (pSect->Lower() && pSect->Lower()->IsColumnFrame()) || pSect->GetUpper()->IsFootnoteFrame(),
"InsertEndnotes: Where's my column?" );
// i73332: Columned section in endnote
- SwColumnFrm* pCol = nullptr;
- if(pSect->Lower() && pSect->Lower()->IsColumnFrm())
- pCol = static_cast<SwColumnFrm*>(pSect->Lower());
+ SwColumnFrame* pCol = nullptr;
+ if(pSect->Lower() && pSect->Lower()->IsColumnFrame())
+ pCol = static_cast<SwColumnFrame*>(pSect->Lower());
while( pCol ) // check all columns
{
- SwFootnoteContFrm* pFootnoteCont = pCol->FindFootnoteCont();
+ SwFootnoteContFrame* pFootnoteCont = pCol->FindFootnoteCont();
if( pFootnoteCont )
{
- SwFootnoteFrm* pRet = static_cast<SwFootnoteFrm*>(pFootnoteCont->Lower());
+ SwFootnoteFrame* pRet = static_cast<SwFootnoteFrame*>(pFootnoteCont->Lower());
while( pRet ) // look for endnotes
{
/* CollectEndNode can destroy pRet so we need to get the
next early
*/
- SwFootnoteFrm* pRetNext = static_cast<SwFootnoteFrm*>(pRet->GetNext());
+ SwFootnoteFrame* pRetNext = static_cast<SwFootnoteFrame*>(pRet->GetNext());
if( pRet->GetAttr()->GetFootnote().IsEndNote() )
{
if( pRet->GetMaster() )
@@ -894,7 +894,7 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
pRet = pRetNext;
}
}
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
}
rpSect = pSect;
pSect = pLayouter ? pSect->GetFollow() : nullptr;
@@ -903,23 +903,23 @@ static SwFootnoteFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty,
return nullptr;
}
-static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow )
+static void lcl_ColumnRefresh( SwSectionFrame* pSect, bool bFollow )
{
- vcl::RenderContext* pRenderContext = pSect->getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = pSect->getRootFrame()->GetCurrShell()->GetOut();
while( pSect )
{
bool bOldLock = pSect->IsColLocked();
pSect->ColLock();
- if( pSect->Lower() && pSect->Lower()->IsColumnFrm() )
+ if( pSect->Lower() && pSect->Lower()->IsColumnFrame() )
{
- SwColumnFrm *pCol = static_cast<SwColumnFrm*>(pSect->Lower());
+ SwColumnFrame *pCol = static_cast<SwColumnFrame*>(pSect->Lower());
do
{ pCol->_InvalidateSize();
pCol->_InvalidatePos();
- static_cast<SwLayoutFrm*>(pCol)->Lower()->_InvalidateSize();
+ static_cast<SwLayoutFrame*>(pCol)->Lower()->_InvalidateSize();
pCol->Calc(pRenderContext); // calculation of column and
- static_cast<SwLayoutFrm*>(pCol)->Lower()->Calc(pRenderContext); // body
- pCol = static_cast<SwColumnFrm*>(pCol->GetNext());
+ static_cast<SwLayoutFrame*>(pCol)->Lower()->Calc(pRenderContext); // body
+ pCol = static_cast<SwColumnFrame*>(pCol->GetNext());
} while ( pCol );
}
if( !bOldLock )
@@ -931,14 +931,14 @@ static void lcl_ColumnRefresh( SwSectionFrm* pSect, bool bFollow )
}
}
-void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
+void SwSectionFrame::CollectEndnotes( SwLayouter* pLayouter )
{
OSL_ENSURE( IsColLocked(), "CollectEndnotes: You love the risk?" );
// i73332: Section in footnode does not have columns!
- OSL_ENSURE( (Lower() && Lower()->IsColumnFrm()) || GetUpper()->IsFootnoteFrm(), "Where's my column?" );
+ OSL_ENSURE( (Lower() && Lower()->IsColumnFrame()) || GetUpper()->IsFootnoteFrame(), "Where's my column?" );
- SwSectionFrm* pSect = this;
- SwFootnoteFrm* pFootnote;
+ SwSectionFrame* pSect = this;
+ SwFootnoteFrame* pFootnote;
bool bEmpty = false;
// pSect is the last sectionfrm without endnotes or the this-pointer
// the first sectionfrm with endnotes may be destroyed, when the endnotes
@@ -959,15 +959,15 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter )
|*
|* @note: perform calculation of content, only if height has changed (OD 18.09.2002 #100522#)
|*/
-void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
+void SwSectionFrame::_CheckClipping( bool bGrow, bool bMaximize )
{
SWRECTFN( this )
long nDiff;
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
- if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrm() ||
- !FindFlyFrm()->IsLocked() ) )
+ if( bGrow && ( !IsInFly() || !GetUpper()->IsColBodyFrame() ||
+ !FindFlyFrame()->IsLocked() ) )
{
- nDiff = -(Frm().*fnRect->fnBottomDist)( nDeadLine );
+ nDiff = -(Frame().*fnRect->fnBottomDist)( nDeadLine );
if( !bMaximize )
nDiff += Undersize();
if( nDiff > 0 )
@@ -979,26 +979,26 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
nDeadLine += nAdd;
}
}
- nDiff = -(Frm().*fnRect->fnBottomDist)( nDeadLine );
+ nDiff = -(Frame().*fnRect->fnBottomDist)( nDeadLine );
SetUndersized( !bMaximize && nDiff >= 0 );
const bool bCalc = ( IsUndersized() || bMaximize ) &&
( nDiff ||
- (Prt().*fnRect->fnGetTop)() > (Frm().*fnRect->fnGetHeight)() );
+ (Prt().*fnRect->fnGetTop)() > (Frame().*fnRect->fnGetHeight)() );
// OD 03.11.2003 #i19737# - introduce local variable <bExtraCalc> to indicate
// that a calculation has to be done beside the value of <bCalc>.
bool bExtraCalc = false;
if( !bCalc && !bGrow && IsAnyNoteAtEnd() && !IsInFootnote() )
{
- SwSectionFrm *pSect = this;
+ SwSectionFrame *pSect = this;
bool bEmpty = false;
- SwLayoutFrm* pFootnote = IsEndnAtEnd() ?
+ SwLayoutFrame* pFootnote = IsEndnAtEnd() ?
lcl_FindEndnote( pSect, bEmpty, nullptr ) : nullptr;
if( pFootnote )
{
- pFootnote = pFootnote->FindFootnoteBossFrm();
- SwFrm* pTmp = FindLastContent( FINDMODE_LASTCNT );
- // OD 08.11.2002 #104840# - use <SwLayoutFrm::IsBefore(..)>
- if ( pTmp && pFootnote->IsBefore( pTmp->FindFootnoteBossFrm() ) )
+ pFootnote = pFootnote->FindFootnoteBossFrame();
+ SwFrame* pTmp = FindLastContent( FINDMODE_LASTCNT );
+ // OD 08.11.2002 #104840# - use <SwLayoutFrame::IsBefore(..)>
+ if ( pTmp && pFootnote->IsBefore( pTmp->FindFootnoteBossFrame() ) )
bExtraCalc = true;
}
else if( GetFollow() && !GetFollow()->ContainsAny() )
@@ -1006,13 +1006,13 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
}
if ( bCalc || bExtraCalc )
{
- nDiff = (*fnRect->fnYDiff)( nDeadLine, (Frm().*fnRect->fnGetTop)() );
+ nDiff = (*fnRect->fnYDiff)( nDeadLine, (Frame().*fnRect->fnGetTop)() );
if( nDiff < 0 )
- nDeadLine = (Frm().*fnRect->fnGetTop)();
+ nDeadLine = (Frame().*fnRect->fnGetTop)();
const Size aOldSz( Prt().SSize() );
long nTop = (this->*fnRect->fnGetTopMargin)();
- (Frm().*fnRect->fnSetBottom)( nDeadLine );
- nDiff = (Frm().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetBottom)( nDeadLine );
+ nDiff = (Frame().*fnRect->fnGetHeight)();
if( nTop > nDiff )
nTop = nDiff;
(this->*fnRect->fnSetYMargins)( nTop, 0 );
@@ -1032,7 +1032,7 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
// no content except footnotes/endnotes, the content has also been calculated.
if ( ( bHeightChanged || bExtraCalc ) && Lower() )
{
- if( Lower()->IsColumnFrm() )
+ if( Lower()->IsColumnFrame() )
{
lcl_ColumnRefresh( this, false );
::CalcContent( this );
@@ -1047,7 +1047,7 @@ void SwSectionFrm::_CheckClipping( bool bGrow, bool bMaximize )
}
}
-void SwSectionFrm::SimpleFormat()
+void SwSectionFrame::SimpleFormat()
{
if ( IsJoinLocked() || IsColLocked() )
return;
@@ -1063,10 +1063,10 @@ void SwSectionFrm::SimpleFormat()
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
// OD 22.10.2002 #97265# - call always method <lcl_ColumnRefresh(..)>, in
// order to get calculated lowers, not only if there space left in its upper.
- if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) >= 0 )
+ if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) >= 0 )
{
- (Frm().*fnRect->fnSetBottom)( nDeadLine );
- long nHeight = (Frm().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetBottom)( nDeadLine );
+ long nHeight = (Frame().*fnRect->fnGetHeight)();
long nTop = CalcUpperSpace();
if( nTop > nHeight )
nTop = nHeight;
@@ -1081,12 +1081,12 @@ void SwSectionFrm::SimpleFormat()
class ExtraFormatToPositionObjs
{
private:
- SwSectionFrm* mpSectFrm;
+ SwSectionFrame* mpSectFrame;
bool mbExtraFormatPerformed;
public:
- explicit ExtraFormatToPositionObjs( SwSectionFrm& _rSectFrm)
- : mpSectFrm( &_rSectFrm ),
+ explicit ExtraFormatToPositionObjs( SwSectionFrame& _rSectFrame)
+ : mpSectFrame( &_rSectFrame ),
mbExtraFormatPerformed( false )
{}
@@ -1095,15 +1095,15 @@ class ExtraFormatToPositionObjs
if ( mbExtraFormatPerformed )
{
// release keep locked position of lower floating screen objects
- SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
+ SwPageFrame* pPageFrame = mpSectFrame->FindPageFrame();
+ SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- if ( mpSectFrm->IsAnLower( pAnchoredObj->GetAnchorFrm() ) )
+ if ( mpSectFrame->IsAnLower( pAnchoredObj->GetAnchorFrame() ) )
{
pAnchoredObj->SetKeepPosLocked( false );
}
@@ -1113,9 +1113,9 @@ class ExtraFormatToPositionObjs
}
// #i81555#
- void InitObjs( SwFrm& rFrm )
+ void InitObjs( SwFrame& rFrame )
{
- SwSortedObjs* pObjs = rFrm.GetDrawObjs();
+ SwSortedObjs* pObjs = rFrame.GetDrawObjs();
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
@@ -1126,54 +1126,54 @@ class ExtraFormatToPositionObjs
pAnchoredObj->SetClearedEnvironment( false );
}
}
- SwLayoutFrm* pLayoutFrm = dynamic_cast<SwLayoutFrm*>(&rFrm);
- if ( pLayoutFrm != nullptr )
+ SwLayoutFrame* pLayoutFrame = dynamic_cast<SwLayoutFrame*>(&rFrame);
+ if ( pLayoutFrame != nullptr )
{
- SwFrm* pLowerFrm = pLayoutFrm->GetLower();
- while ( pLowerFrm != nullptr )
+ SwFrame* pLowerFrame = pLayoutFrame->GetLower();
+ while ( pLowerFrame != nullptr )
{
- InitObjs( *pLowerFrm );
+ InitObjs( *pLowerFrame );
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
}
}
void FormatSectionToPositionObjs()
{
- vcl::RenderContext* pRenderContext = mpSectFrm->getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = mpSectFrame->getRootFrame()->GetCurrShell()->GetOut();
// perform extra format for multi-columned section.
- if ( mpSectFrm->Lower() && mpSectFrm->Lower()->IsColumnFrm() &&
- mpSectFrm->Lower()->GetNext() )
+ if ( mpSectFrame->Lower() && mpSectFrame->Lower()->IsColumnFrame() &&
+ mpSectFrame->Lower()->GetNext() )
{
// grow section till bottom of printing area of upper frame
- SWRECTFN( mpSectFrm );
- SwTwips nTopMargin = (mpSectFrm->*fnRect->fnGetTopMargin)();
- Size aOldSectPrtSize( mpSectFrm->Prt().SSize() );
- SwTwips nDiff = (mpSectFrm->Frm().*fnRect->fnBottomDist)(
- (mpSectFrm->GetUpper()->*fnRect->fnGetPrtBottom)() );
- (mpSectFrm->Frm().*fnRect->fnAddBottom)( nDiff );
- (mpSectFrm->*fnRect->fnSetYMargins)( nTopMargin, 0 );
+ SWRECTFN( mpSectFrame );
+ SwTwips nTopMargin = (mpSectFrame->*fnRect->fnGetTopMargin)();
+ Size aOldSectPrtSize( mpSectFrame->Prt().SSize() );
+ SwTwips nDiff = (mpSectFrame->Frame().*fnRect->fnBottomDist)(
+ (mpSectFrame->GetUpper()->*fnRect->fnGetPrtBottom)() );
+ (mpSectFrame->Frame().*fnRect->fnAddBottom)( nDiff );
+ (mpSectFrame->*fnRect->fnSetYMargins)( nTopMargin, 0 );
// #i59789#
// suppress formatting, if printing area of section is too narrow
- if ( (mpSectFrm->Prt().*fnRect->fnGetHeight)() <= 0 )
+ if ( (mpSectFrame->Prt().*fnRect->fnGetHeight)() <= 0 )
{
return;
}
- mpSectFrm->ChgLowersProp( aOldSectPrtSize );
+ mpSectFrame->ChgLowersProp( aOldSectPrtSize );
// format column frames and its body and footnote container
- SwColumnFrm* pColFrm = static_cast<SwColumnFrm*>(mpSectFrm->Lower());
- while ( pColFrm )
+ SwColumnFrame* pColFrame = static_cast<SwColumnFrame*>(mpSectFrame->Lower());
+ while ( pColFrame )
{
- pColFrm->Calc(pRenderContext);
- pColFrm->Lower()->Calc(pRenderContext);
- if ( pColFrm->Lower()->GetNext() )
+ pColFrame->Calc(pRenderContext);
+ pColFrame->Lower()->Calc(pRenderContext);
+ if ( pColFrame->Lower()->GetNext() )
{
- pColFrm->Lower()->GetNext()->Calc(pRenderContext);
+ pColFrame->Lower()->GetNext()->Calc(pRenderContext);
}
- pColFrm = static_cast<SwColumnFrm*>(pColFrm->GetNext());
+ pColFrame = static_cast<SwColumnFrame*>(pColFrame->GetNext());
}
// unlock position of lower floating screen objects for the extra format
@@ -1181,23 +1181,23 @@ class ExtraFormatToPositionObjs
// Section frame can already have changed the page and its content
// can still be on the former page.
// Thus, initialize objects via lower-relationship
- InitObjs( *mpSectFrm );
+ InitObjs( *mpSectFrame );
// format content - first with collecting its foot-/endnotes before content
// format, second without collecting its foot-/endnotes.
- ::CalcContent( mpSectFrm );
- ::CalcContent( mpSectFrm, true );
+ ::CalcContent( mpSectFrame );
+ ::CalcContent( mpSectFrame, true );
// keep locked position of lower floating screen objects
- SwPageFrm* pPageFrm = mpSectFrm->FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
+ SwPageFrame* pPageFrame = mpSectFrame->FindPageFrame();
+ SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- if ( mpSectFrm->IsAnLower( pAnchoredObj->GetAnchorFrm() ) )
+ if ( mpSectFrame->IsAnLower( pAnchoredObj->GetAnchorFrame() ) )
{
pAnchoredObj->SetKeepPosLocked( true );
}
@@ -1209,13 +1209,13 @@ class ExtraFormatToPositionObjs
}
};
-/// "formats" the frame; Frm and PrtArea
-void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttr )
+/// "formats" the frame; Frame and PrtArea
+void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderAttrs *pAttr )
{
if( !m_pSection ) // via DelEmpty
{
#ifdef DBG_UTIL
- OSL_ENSURE( getRootFrm()->IsInDelList( this ), "SectionFrm without Section" );
+ OSL_ENSURE( getRootFrame()->IsInDelList( this ), "SectionFrame without Section" );
#endif
mbValidSize = mbValidPos = mbValidPrtArea = true;
return;
@@ -1234,7 +1234,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
if( nUpper != (this->*fnRect->fnGetTopMargin)() )
{
mbValidSize = false;
- SwFrm* pOwn = ContainsAny();
+ SwFrame* pOwn = ContainsAny();
if( pOwn )
pOwn->_InvalidatePos();
}
@@ -1244,13 +1244,13 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
if ( !mbValidSize )
{
PROTOCOL_ENTER( this, PROT_SIZE, 0, nullptr )
- const long nOldHeight = (Frm().*fnRect->fnGetHeight)();
+ const long nOldHeight = (Frame().*fnRect->fnGetHeight)();
bool bOldLock = IsColLocked();
ColLock();
mbValidSize = true;
- // The size is only determined by the content, if the SectFrm does not have a
+ // The size is only determined by the content, if the SectFrame does not have a
// Follow. Otherwise it fills (occupies) the Upper down to the lower edge.
// It is not responsible for the text flow, but the content is.
bool bMaximize = ToMaximize( false );
@@ -1273,14 +1273,14 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
// Column widths have to be adjusted before calling _CheckClipping.
// _CheckClipping can cause the formatting of the lower frames
// which still have a width of 0.
- const bool bHasColumns = Lower() && Lower()->IsColumnFrm();
+ const bool bHasColumns = Lower() && Lower()->IsColumnFrame();
if ( bHasColumns && Lower()->GetNext() )
AdjustColumns( nullptr, false );
if( GetUpper() )
{
long nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
- (maFrm.*fnRect->fnSetWidth)( nWidth );
+ (maFrame.*fnRect->fnSetWidth)( nWidth );
// #109700# LRSpace for sections
const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace();
@@ -1290,7 +1290,7 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
// OD 15.10.2002 #103517# - allow grow in online layout
// Thus, set <..IsBrowseMode()> as parameter <bGrow> on calling
// method <_CheckClipping(..)>.
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
_CheckClipping( pSh && pSh->GetViewOptions()->getBrowseMode(), bMaximize );
bMaximize = ToMaximize( false );
mbValidSize = true;
@@ -1298,19 +1298,19 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
// Check the width of the columns and adjust if necessary
if ( bHasColumns && ! Lower()->GetNext() && bMaximize )
- static_cast<SwColumnFrm*>(Lower())->Lower()->Calc(pRenderContext);
+ static_cast<SwColumnFrame*>(Lower())->Lower()->Calc(pRenderContext);
if ( !bMaximize )
{
SwTwips nRemaining = (this->*fnRect->fnGetTopMargin)();
- SwFrm *pFrm = m_pLower;
- if( pFrm )
+ SwFrame *pFrame = m_pLower;
+ if( pFrame )
{
- if( pFrm->IsColumnFrm() && pFrm->GetNext() )
+ if( pFrame->IsColumnFrame() && pFrame->GetNext() )
{
// #i61435#
// suppress formatting, if upper frame has height <= 0
- if ( (GetUpper()->Frm().*fnRect->fnGetHeight)() > 0 )
+ if ( (GetUpper()->Frame().*fnRect->fnGetHeight)() > 0 )
{
FormatWidthCols( *pAttr, nRemaining, MINLAY );
}
@@ -1319,40 +1319,40 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
while( HasFollow() && !GetFollow()->ContainsContent() &&
!GetFollow()->ContainsAny( true ) )
{
- SwFrm* pOld = GetFollow();
+ SwFrame* pOld = GetFollow();
GetFollow()->DelEmpty( false );
if( pOld == GetFollow() )
break;
}
bMaximize = ToMaximize( false );
- nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)();
+ nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)();
}
else
{
- if( pFrm->IsColumnFrm() )
+ if( pFrame->IsColumnFrame() )
{
- pFrm->Calc(pRenderContext);
- pFrm = static_cast<SwColumnFrm*>(pFrm)->Lower();
- pFrm->Calc(pRenderContext);
- pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower();
+ pFrame->Calc(pRenderContext);
+ pFrame = static_cast<SwColumnFrame*>(pFrame)->Lower();
+ pFrame->Calc(pRenderContext);
+ pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower();
CalcFootnoteContent();
}
// If we are in a columned frame which calls a CalcContent
// in the FormatWidthCols, the content might need calculating
- if( pFrm && !pFrm->IsValid() && IsInFly() &&
- FindFlyFrm()->IsColLocked() )
+ if( pFrame && !pFrame->IsValid() && IsInFly() &&
+ FindFlyFrame()->IsColLocked() )
::CalcContent( this );
nRemaining += InnerHeight();
bMaximize = HasFollow();
}
}
- SwTwips nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining;
+ SwTwips nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining;
if( nDiff < 0)
{
SwTwips nDeadLine = (GetUpper()->*fnRect->fnGetPrtBottom)();
{
- long nBottom = (Frm().*fnRect->fnGetBottom)();
+ long nBottom = (Frame().*fnRect->fnGetBottom)();
nBottom = (*fnRect->fnYInc)( nBottom, -nDiff );
long nTmpDiff = (*fnRect->fnYDiff)( nBottom, nDeadLine );
if( nTmpDiff > 0 )
@@ -1369,36 +1369,36 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
}
if( nDiff )
{
- long nTmp = nRemaining - (Frm().*fnRect->fnGetHeight)();
+ long nTmp = nRemaining - (Frame().*fnRect->fnGetHeight)();
long nTop = (this->*fnRect->fnGetTopMargin)();
- (Frm().*fnRect->fnAddBottom)( nTmp );
+ (Frame().*fnRect->fnAddBottom)( nTmp );
(this->*fnRect->fnSetYMargins)( nTop, 0 );
InvalidateNextPos();
- if (m_pLower && (!m_pLower->IsColumnFrm() || !m_pLower->GetNext()))
+ if (m_pLower && (!m_pLower->IsColumnFrame() || !m_pLower->GetNext()))
{
// If a single-column section just created the space that
// was requested by the "undersized" paragraphs, then they
// have to be invalidated and calculated, so they fully cover it
- pFrm = m_pLower;
- if( pFrm->IsColumnFrm() )
+ pFrame = m_pLower;
+ if( pFrame->IsColumnFrame() )
{
- pFrm->_InvalidateSize();
- pFrm->_InvalidatePos();
- pFrm->Calc(pRenderContext);
- pFrm = static_cast<SwColumnFrm*>(pFrm)->Lower();
- pFrm->Calc(pRenderContext);
- pFrm = static_cast<SwLayoutFrm*>(pFrm)->Lower();
+ pFrame->_InvalidateSize();
+ pFrame->_InvalidatePos();
+ pFrame->Calc(pRenderContext);
+ pFrame = static_cast<SwColumnFrame*>(pFrame)->Lower();
+ pFrame->Calc(pRenderContext);
+ pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower();
CalcFootnoteContent();
}
bool bUnderSz = false;
- while( pFrm )
+ while( pFrame )
{
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
{
- pFrm->Prepare( PREP_ADJUST_FRM );
+ pFrame->Prepare( PREP_ADJUST_FRM );
bUnderSz = true;
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
if( bUnderSz && !IsContentLocked() )
::CalcContent( this );
@@ -1412,12 +1412,12 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
_CheckClipping( true, bMaximize );
if( !bOldLock )
ColUnlock();
- long nDiff = nOldHeight - (Frm().*fnRect->fnGetHeight)();
+ long nDiff = nOldHeight - (Frame().*fnRect->fnGetHeight)();
if( nDiff > 0 )
{
if( !GetNext() )
SetRetouche(); // Take over the retouching ourselves
- if( GetUpper() && !GetUpper()->IsFooterFrm() )
+ if( GetUpper() && !GetUpper()->IsFooterFrame() )
GetUpper()->Shrink( nDiff );
}
if( IsUndersized() )
@@ -1427,26 +1427,26 @@ void SwSectionFrm::Format( vcl::RenderContext* pRenderContext, const SwBorderAtt
/// Returns the next layout sheet where the frame can be moved in.
/// New pages are created only if specified by the parameter.
-SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
+SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
{
// Attention: Nested sections are currently not supported
- PROTOCOL_ENTER( this, PROT_LEAF, ACT_NEXT_SECT, GetUpper()->FindSctFrm() )
+ PROTOCOL_ENTER( this, PROT_LEAF, ACT_NEXT_SECT, GetUpper()->FindSctFrame() )
// Shortcuts for "columned" sections, if we're not in the last column
// Can we slide to the next column of the section?
- if( IsColBodyFrm() && GetUpper()->GetNext() )
- return static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(GetUpper()->GetNext())->Lower());
- if( GetUpper()->IsColBodyFrm() && GetUpper()->GetUpper()->GetNext() )
- return static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(GetUpper()->GetUpper()->GetNext())->Lower());
+ if( IsColBodyFrame() && GetUpper()->GetNext() )
+ return static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(GetUpper()->GetNext())->Lower());
+ if( GetUpper()->IsColBodyFrame() && GetUpper()->GetUpper()->GetNext() )
+ return static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(GetUpper()->GetUpper()->GetNext())->Lower());
// Inside a section, in tables, or sections of headers/footers, there can be only
// one column shift be made, one of the above shortcuts should have applied!
if( GetUpper()->IsInTab() || FindFooterOrHeader() )
return nullptr;
- SwSectionFrm *pSect = FindSctFrm();
+ SwSectionFrame *pSect = FindSctFrame();
bool bWrongPage = false;
- OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrm" );
+ OSL_ENSURE( pSect, "GetNextSctLeaf: Missing SectionFrame" );
// Shortcut for sections with Follows. That's ok,
// if no columns or pages (except dummy pages) lie in between.
@@ -1456,7 +1456,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
{
if( pSect->GetFollow() == pSect->GetNext() )
{
- SwPageFrm *pPg = pSect->GetFollow()->FindPageFrm();
+ SwPageFrame *pPg = pSect->GetFollow()->FindPageFrame();
if( WrongPageDesc( pPg ) )
bWrongPage = true;
else
@@ -1464,27 +1464,27 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
}
else
{
- SwFrm* pTmp;
- if( !pSect->GetUpper()->IsColBodyFrm() ||
+ SwFrame* pTmp;
+ if( !pSect->GetUpper()->IsColBodyFrame() ||
nullptr == ( pTmp = pSect->GetUpper()->GetUpper()->GetNext() ) )
- pTmp = pSect->FindPageFrm()->GetNext();
+ pTmp = pSect->FindPageFrame()->GetNext();
if( pTmp ) // is now the next column or page
{
- SwFrm* pTmpX = pTmp;
- if( pTmp->IsPageFrm() && static_cast<SwPageFrm*>(pTmp)->IsEmptyPage() )
+ SwFrame* pTmpX = pTmp;
+ if( pTmp->IsPageFrame() && static_cast<SwPageFrame*>(pTmp)->IsEmptyPage() )
pTmp = pTmp->GetNext(); // skip dummy pages
- SwFrm *pUp = pSect->GetFollow()->GetUpper();
+ SwFrame *pUp = pSect->GetFollow()->GetUpper();
// pUp becomes the next column if the Follow lies in a column
// that is not a "not first" one, otherwise the page
- if( !pUp->IsColBodyFrm() ||
+ if( !pUp->IsColBodyFrame() ||
!( pUp = pUp->GetUpper() )->GetPrev() )
- pUp = pUp->FindPageFrm();
+ pUp = pUp->FindPageFrame();
// Now pUp and pTmp have to be the same page/column, otherwise
// pages or columns lie between Master and Follow
if( pUp == pTmp || pUp->GetNext() == pTmpX )
{
- SwPageFrm* pNxtPg = pUp->IsPageFrm() ?
- static_cast<SwPageFrm*>(pUp) : pUp->FindPageFrm();
+ SwPageFrame* pNxtPg = pUp->IsPageFrame() ?
+ static_cast<SwPageFrame*>(pUp) : pUp->FindPageFrame();
if( WrongPageDesc( pNxtPg ) )
bWrongPage = true;
else
@@ -1496,28 +1496,28 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
// Always end up in the same section: Body again inside Body etc.
const bool bBody = IsInDocBody();
- const bool bFootnotePage = FindPageFrm()->IsFootnotePage();
+ const bool bFootnotePage = FindPageFrame()->IsFootnotePage();
- SwLayoutFrm *pLayLeaf;
- // A shortcut for TabFrms such that not all cells need to be visited
+ SwLayoutFrame *pLayLeaf;
+ // A shortcut for TabFrames such that not all cells need to be visited
if( bWrongPage )
pLayLeaf = nullptr;
- else if( IsTabFrm() )
+ else if( IsTabFrame() )
{
- SwContentFrm* pTmpCnt = static_cast<SwTabFrm*>(this)->FindLastContent();
+ SwContentFrame* pTmpCnt = static_cast<SwTabFrame*>(this)->FindLastContent();
pLayLeaf = pTmpCnt ? pTmpCnt->GetUpper() : nullptr;
}
else
{
pLayLeaf = GetNextLayoutLeaf();
- if( IsColumnFrm() )
+ if( IsColumnFrame() )
{
- while( pLayLeaf && static_cast<SwColumnFrm*>(this)->IsAnLower( pLayLeaf ) )
+ while( pLayLeaf && static_cast<SwColumnFrame*>(this)->IsAnLower( pLayLeaf ) )
pLayLeaf = pLayLeaf->GetNextLayoutLeaf();
}
}
- SwLayoutFrm *pOldLayLeaf = nullptr; // Such that in case of newly
+ SwLayoutFrame *pOldLayLeaf = nullptr; // Such that in case of newly
// created pages, the search is
// not started over at the beginning
@@ -1526,9 +1526,9 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
if( pLayLeaf )
{
// A layout leaf was found, let's see whether it can store me or
- // another SectionFrm can be inserted here, or we have to continue
+ // another SectionFrame can be inserted here, or we have to continue
// searching
- SwPageFrm* pNxtPg = pLayLeaf->FindPageFrm();
+ SwPageFrame* pNxtPg = pLayLeaf->FindPageFrame();
if ( !bFootnotePage && pNxtPg->IsFootnotePage() )
{ // If I reached the end note pages it's over
pLayLeaf = nullptr;
@@ -1539,7 +1539,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
(IsInFootnote() != pLayLeaf->IsInFootnote() ) ||
pLayLeaf->IsInTab() ||
( pLayLeaf->IsInSct() && ( !pSect->HasFollow()
- || pSect->GetFollow() != pLayLeaf->FindSctFrm() ) ) )
+ || pSect->GetFollow() != pLayLeaf->FindSctFrame() ) ) )
{
// Rejected - try again.
pOldLayLeaf = pLayLeaf;
@@ -1556,12 +1556,12 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
continue;
}
}
- // There is no further LayoutFrm that fits, so a new page
+ // There is no further LayoutFrame that fits, so a new page
// has to be created, although new pages are worthless within a frame
else if( !pSect->IsInFly() &&
( eMakePage == MAKEPAGE_APPEND || eMakePage == MAKEPAGE_INSERT ) )
{
- InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrm() : FindPageFrm(),
+ InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrame() : FindPageFrame(),
false );
// and again the whole thing
pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
@@ -1575,20 +1575,20 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
// We have found the suitable layout sheet. If there (in the sheet) is
// already a Follow of our section, we take its first layout sheet,
// otherwise it is time to create a section follow
- SwSectionFrm* pNew;
+ SwSectionFrame* pNew;
// This can be omitted if existing Follows were cut short
- SwFrm* pFirst = pLayLeaf->Lower();
- // Here SectionFrms that are to be deleted must be ignored
- while( pFirst && pFirst->IsSctFrm() && !static_cast<SwSectionFrm*>(pFirst)->GetSection() )
+ SwFrame* pFirst = pLayLeaf->Lower();
+ // Here SectionFrames that are to be deleted must be ignored
+ while( pFirst && pFirst->IsSctFrame() && !static_cast<SwSectionFrame*>(pFirst)->GetSection() )
pFirst = pFirst->GetNext();
- if( pFirst && pFirst->IsSctFrm() && pSect->GetFollow() == pFirst )
+ if( pFirst && pFirst->IsSctFrame() && pSect->GetFollow() == pFirst )
pNew = pSect->GetFollow();
else if( MAKEPAGE_NOSECTION == eMakePage )
return pLayLeaf;
else
{
- pNew = new SwSectionFrm( *pSect, false );
+ pNew = new SwSectionFrame( *pSect, false );
pNew->InsertBefore( pLayLeaf, pLayLeaf->Lower() );
pNew->Init();
SWRECTFN( pNew )
@@ -1596,43 +1596,43 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
// If our section frame has a successor then that has to be
// moved behind the new Follow of the section frames
- SwFrm* pTmp = pSect->GetNext();
+ SwFrame* pTmp = pSect->GetNext();
if( pTmp && pTmp != pSect->GetFollow() )
{
- SwFlowFrm* pNxt;
- SwContentFrm* pNxtContent = nullptr;
- if( pTmp->IsContentFrm() )
+ SwFlowFrame* pNxt;
+ SwContentFrame* pNxtContent = nullptr;
+ if( pTmp->IsContentFrame() )
{
- pNxt = static_cast<SwContentFrm*>(pTmp);
- pNxtContent = static_cast<SwContentFrm*>(pTmp);
+ pNxt = static_cast<SwContentFrame*>(pTmp);
+ pNxtContent = static_cast<SwContentFrame*>(pTmp);
}
else
{
- pNxtContent = static_cast<SwLayoutFrm*>(pTmp)->ContainsContent();
- if( pTmp->IsSctFrm() )
- pNxt = static_cast<SwSectionFrm*>(pTmp);
+ pNxtContent = static_cast<SwLayoutFrame*>(pTmp)->ContainsContent();
+ if( pTmp->IsSctFrame() )
+ pNxt = static_cast<SwSectionFrame*>(pTmp);
else
{
- OSL_ENSURE( pTmp->IsTabFrm(), "GetNextSctLeaf: Wrong Type" );
- pNxt = static_cast<SwTabFrm*>(pTmp);
+ OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" );
+ pNxt = static_cast<SwTabFrame*>(pTmp);
}
while( !pNxtContent && nullptr != ( pTmp = pTmp->GetNext() ) )
{
- if( pTmp->IsContentFrm() )
- pNxtContent = static_cast<SwContentFrm*>(pTmp);
+ if( pTmp->IsContentFrame() )
+ pNxtContent = static_cast<SwContentFrame*>(pTmp);
else
- pNxtContent = static_cast<SwLayoutFrm*>(pTmp)->ContainsContent();
+ pNxtContent = static_cast<SwLayoutFrame*>(pTmp)->ContainsContent();
}
}
if( pNxtContent )
{
- SwFootnoteBossFrm* pOldBoss = pSect->FindFootnoteBossFrm( true );
- if( pOldBoss == pNxtContent->FindFootnoteBossFrm( true ) )
+ SwFootnoteBossFrame* pOldBoss = pSect->FindFootnoteBossFrame( true );
+ if( pOldBoss == pNxtContent->FindFootnoteBossFrame( true ) )
{
SwSaveFootnoteHeight aHeight( pOldBoss,
- pOldBoss->Frm().Top() + pOldBoss->Frm().Height() );
+ pOldBoss->Frame().Top() + pOldBoss->Frame().Height() );
pSect->GetUpper()->MoveLowerFootnotes( pNxtContent, pOldBoss,
- pLayLeaf->FindFootnoteBossFrm( true ), false );
+ pLayLeaf->FindFootnoteBossFrame( true ), false );
}
}
pNxt->MoveSubTree( pLayLeaf, pNew->GetNext() );
@@ -1640,22 +1640,22 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage )
if( pNew->GetFollow() )
pNew->SimpleFormat();
}
- // The wanted layout sheet is now the first of the determined SctFrms:
+ // The wanted layout sheet is now the first of the determined SctFrames:
pLayLeaf = FIRSTLEAF( pNew );
}
return pLayLeaf;
}
/// Returns the preceding layout sheet where the frame can be moved into
-SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
+SwLayoutFrame *SwFrame::GetPrevSctLeaf( MakePageType )
{
- PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrm() )
+ PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrame() )
- SwLayoutFrm* pCol;
- // ColumnFrm always contain a BodyFrm now
- if( IsColBodyFrm() )
+ SwLayoutFrame* pCol;
+ // ColumnFrame always contain a BodyFrame now
+ if( IsColBodyFrame() )
pCol = GetUpper();
- else if( GetUpper()->IsColBodyFrm() )
+ else if( GetUpper()->IsColBodyFrame() )
pCol = GetUpper()->GetUpper();
else
pCol = nullptr;
@@ -1666,58 +1666,58 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
{
do
{
- pCol = static_cast<SwLayoutFrm*>(pCol->GetPrev());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetPrev());
// Is there any content?
- if( static_cast<SwLayoutFrm*>(pCol->Lower())->Lower() )
+ if( static_cast<SwLayoutFrame*>(pCol->Lower())->Lower() )
{
if( bJump ) // Did we skip a blank page?
- SwFlowFrm::SetMoveBwdJump( true );
- return static_cast<SwLayoutFrm*>(pCol->Lower()); // The columnm body
+ SwFlowFrame::SetMoveBwdJump( true );
+ return static_cast<SwLayoutFrame*>(pCol->Lower()); // The columnm body
}
bJump = true;
} while( pCol->GetPrev() );
// We get here when all columns are empty, pCol is now the
// first column, we need the body though
- pCol = static_cast<SwLayoutFrm*>(pCol->Lower());
+ pCol = static_cast<SwLayoutFrame*>(pCol->Lower());
}
else
pCol = nullptr;
}
if( bJump ) // Did we skip a blank page?
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
// Within sections in tables or section in headers/footers there can
// be only one column change be made, one of the above shortcuts should
// have applied, also when the section has a pPrev.
// Now we even consider an empty column...
- OSL_ENSURE( FindSctFrm(), "GetNextSctLeaf: Missing SectionFrm" );
- if( ( IsInTab() && !IsTabFrm() ) || FindFooterOrHeader() )
+ OSL_ENSURE( FindSctFrame(), "GetNextSctLeaf: Missing SectionFrame" );
+ if( ( IsInTab() && !IsTabFrame() ) || FindFooterOrHeader() )
return pCol;
// === IMPORTANT ===
// Precondition, which needs to be hold, is that the <this> frame can be
// inside a table, but then the found section frame <pSect> is also inside
// this table.
- SwSectionFrm *pSect = FindSctFrm();
+ SwSectionFrame *pSect = FindSctFrame();
// #i95698#
// A table cell containing directly a section does not break - see lcl_FindSectionsInRow(..)
// Thus, a table inside a section, which is inside another table can only
// flow backward in the columns of its section.
// Note: The table cell, which contains the section, can not have a master table cell.
- if ( IsTabFrm() && pSect->IsInTab() )
+ if ( IsTabFrame() && pSect->IsInTab() )
{
return pCol;
}
{
- SwFrm *pPrv;
+ SwFrame *pPrv;
if( nullptr != ( pPrv = pSect->GetIndPrev() ) )
{
- // Mooching, half dead SectionFrms shouldn't confuse us
- while( pPrv && pPrv->IsSctFrm() && !static_cast<SwSectionFrm*>(pPrv)->GetSection() )
+ // Mooching, half dead SectionFrames shouldn't confuse us
+ while( pPrv && pPrv->IsSctFrame() && !static_cast<SwSectionFrame*>(pPrv)->GetSection() )
pPrv = pPrv->GetPrev();
if( pPrv )
return pCol;
@@ -1727,8 +1727,8 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
const bool bBody = IsInDocBody();
const bool bFly = IsInFly();
- SwLayoutFrm *pLayLeaf = GetPrevLayoutLeaf();
- SwLayoutFrm *pPrevLeaf = nullptr;
+ SwLayoutFrame *pLayLeaf = GetPrevLayoutLeaf();
+ SwLayoutFrame *pPrevLeaf = nullptr;
while ( pLayLeaf )
{
@@ -1741,20 +1741,20 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
{
// If there is a pLayLeaf has a lower pLayLeaf is the frame we are looking for.
// Exception: pLayLeaf->Lower() is a zombie section frame
- const SwFrm* pTmp = pLayLeaf->Lower();
+ const SwFrame* pTmp = pLayLeaf->Lower();
// OD 11.04.2003 #108824# - consider, that the zombie section frame
// can have frame below it in the found layout leaf.
// Thus, skipping zombie section frame, if possible.
- while ( pTmp && pTmp->IsSctFrm() &&
- !( static_cast<const SwSectionFrm*>(pTmp)->GetSection() ) &&
+ while ( pTmp && pTmp->IsSctFrame() &&
+ !( static_cast<const SwSectionFrame*>(pTmp)->GetSection() ) &&
pTmp->GetNext()
)
{
pTmp = pTmp->GetNext();
}
if ( pTmp &&
- ( !pTmp->IsSctFrm() ||
- ( static_cast<const SwSectionFrm*>(pTmp)->GetSection() )
+ ( !pTmp->IsSctFrame() ||
+ ( static_cast<const SwSectionFrame*>(pTmp)->GetSection() )
)
)
{
@@ -1763,7 +1763,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pPrevLeaf = pLayLeaf;
pLayLeaf = pLayLeaf->GetPrevLayoutLeaf();
if ( pLayLeaf )
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
}
else if ( bFly )
break; // Contents in Flys every layout sheet should be right. Why?
@@ -1777,26 +1777,26 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
pLayLeaf = pPrevLeaf;
}
- SwSectionFrm* pNew = nullptr;
+ SwSectionFrame* pNew = nullptr;
// At first go to the end of the layout sheet
- SwFrm *pTmp = pLayLeaf->Lower();
+ SwFrame *pTmp = pLayLeaf->Lower();
if( pTmp )
{
while( pTmp->GetNext() )
pTmp = pTmp->GetNext();
- if( pTmp->IsSctFrm() )
+ if( pTmp->IsSctFrame() )
{
// Half dead ones only interfere here
- while( !static_cast<SwSectionFrm*>(pTmp)->GetSection() && pTmp->GetPrev() &&
- pTmp->GetPrev()->IsSctFrm() )
+ while( !static_cast<SwSectionFrame*>(pTmp)->GetSection() && pTmp->GetPrev() &&
+ pTmp->GetPrev()->IsSctFrame() )
pTmp = pTmp->GetPrev();
- if( static_cast<SwSectionFrm*>(pTmp)->GetFollow() == pSect )
- pNew = static_cast<SwSectionFrm*>(pTmp);
+ if( static_cast<SwSectionFrame*>(pTmp)->GetFollow() == pSect )
+ pNew = static_cast<SwSectionFrame*>(pTmp);
}
}
if( !pNew )
{
- pNew = new SwSectionFrm( *pSect, true );
+ pNew = new SwSectionFrame( *pSect, true );
pNew->InsertBefore( pLayLeaf, nullptr );
pNew->Init();
SWRECTFN( pNew )
@@ -1806,7 +1806,7 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( !pNew->Lower() ) // Format single column sections
{
pNew->MakePos();
- pLayLeaf->Format(getRootFrm()->GetCurrShell()->GetOut()); // In order that the PrtArea is correct for the MoveBwd
+ pLayLeaf->Format(getRootFrame()->GetCurrShell()->GetOut()); // In order that the PrtArea is correct for the MoveBwd
}
else
pNew->SimpleFormat();
@@ -1814,14 +1814,14 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
else
{
pLayLeaf = FIRSTLEAF( pNew );
- if( pLayLeaf->IsColBodyFrm() )
+ if( pLayLeaf->IsColBodyFrame() )
{
// In existent section columns we're looking for the last not empty
// column.
- SwLayoutFrm *pTmpLay = pLayLeaf;
+ SwLayoutFrame *pTmpLay = pLayLeaf;
while( pLayLeaf->GetUpper()->GetNext() )
{
- pLayLeaf = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pLayLeaf->GetUpper()->GetNext())->Lower());
+ pLayLeaf = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pLayLeaf->GetUpper()->GetNext())->Lower());
if( pLayLeaf->Lower() )
pTmpLay = pLayLeaf;
}
@@ -1829,61 +1829,61 @@ SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType )
if( pLayLeaf != pTmpLay )
{
pLayLeaf = pTmpLay;
- SwFlowFrm::SetMoveBwdJump( true );
+ SwFlowFrame::SetMoveBwdJump( true );
}
}
}
return pLayLeaf;
}
-static SwTwips lcl_DeadLine( const SwFrm* pFrm )
+static SwTwips lcl_DeadLine( const SwFrame* pFrame )
{
- const SwLayoutFrm* pUp = pFrm->GetUpper();
+ const SwLayoutFrame* pUp = pFrame->GetUpper();
while( pUp && pUp->IsInSct() )
{
- if( pUp->IsSctFrm() )
+ if( pUp->IsSctFrame() )
pUp = pUp->GetUpper();
- // Columns now with BodyFrm
- else if( pUp->IsColBodyFrm() && pUp->GetUpper()->GetUpper()->IsSctFrm() )
+ // Columns now with BodyFrame
+ else if( pUp->IsColBodyFrame() && pUp->GetUpper()->GetUpper()->IsSctFrame() )
pUp = pUp->GetUpper()->GetUpper();
else
break;
}
- SWRECTFN( pFrm )
+ SWRECTFN( pFrame )
return pUp ? (pUp->*fnRect->fnGetPrtBottom)() :
- (pFrm->Frm().*fnRect->fnGetBottom)();
+ (pFrame->Frame().*fnRect->fnGetBottom)();
}
-/// checks whether the SectionFrm is still able to grow, as case may be the environment has to be asked
-bool SwSectionFrm::Growable() const
+/// checks whether the SectionFrame is still able to grow, as case may be the environment has to be asked
+bool SwSectionFrame::Growable() const
{
SWRECTFN( this )
if( (*fnRect->fnYDiff)( lcl_DeadLine( this ),
- (Frm().*fnRect->fnGetBottom)() ) > 0 )
+ (Frame().*fnRect->fnGetBottom)() ) > 0 )
return true;
- return ( GetUpper() && const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->Grow( LONG_MAX, true ) );
+ return ( GetUpper() && const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->Grow( LONG_MAX, true ) );
}
-SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst )
+SwTwips SwSectionFrame::_Grow( SwTwips nDist, bool bTst )
{
if ( !IsColLocked() && !HasFixSize() )
{
SWRECTFN( this )
- long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if( nFrmHeight > 0 && nDist > (LONG_MAX - nFrmHeight) )
- nDist = LONG_MAX - nFrmHeight;
+ long nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
+ nDist = LONG_MAX - nFrameHeight;
if ( nDist <= 0L )
return 0L;
- bool bInCalcContent = GetUpper() && IsInFly() && FindFlyFrm()->IsLocked();
+ bool bInCalcContent = GetUpper() && IsInFly() && FindFlyFrame()->IsLocked();
// OD 2004-03-15 #116561# - allow grow in online layout
- bool bGrow = !Lower() || !Lower()->IsColumnFrm() || !Lower()->GetNext() ||
+ bool bGrow = !Lower() || !Lower()->IsColumnFrame() || !Lower()->GetNext() ||
GetSection()->GetFormat()->GetBalancedColumns().GetValue();
if( !bGrow )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
bGrow = pSh && pSh->GetViewOptions()->getBrowseMode();
}
if( bGrow )
@@ -1895,7 +1895,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst )
{
nGrow = lcl_DeadLine( this );
nGrow = (*fnRect->fnYDiff)( nGrow,
- (Frm().*fnRect->fnGetBottom)() );
+ (Frame().*fnRect->fnGetBottom)() );
}
SwTwips nSpace = nGrow;
if( !bInCalcContent && nGrow < nDist && GetUpper() )
@@ -1930,16 +1930,16 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst )
SetCompletePaint();
InvalidatePage();
}
- if( GetUpper() && GetUpper()->IsHeaderFrm() )
+ if( GetUpper() && GetUpper()->IsHeaderFrame() )
GetUpper()->InvalidateSize();
}
- (Frm().*fnRect->fnAddBottom)( nGrow );
+ (Frame().*fnRect->fnAddBottom)( nGrow );
long nPrtHeight = (Prt().*fnRect->fnGetHeight)() + nGrow;
(Prt().*fnRect->fnSetHeight)( nPrtHeight );
- if( Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() )
+ if( Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() )
{
- SwFrm* pTmp = Lower();
+ SwFrame* pTmp = Lower();
do
{
pTmp->_InvalidateSize();
@@ -1949,15 +1949,15 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst )
}
if( GetNext() )
{
- SwFrm *pFrm = GetNext();
- while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() )
- pFrm = pFrm->GetNext();
- if( pFrm )
+ SwFrame *pFrame = GetNext();
+ while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() )
+ pFrame = pFrame->GetNext();
+ if( pFrame )
{
if( bInCalcContent )
- pFrm->_InvalidatePos();
+ pFrame->_InvalidatePos();
else
- pFrm->InvalidatePos();
+ pFrame->InvalidatePos();
}
}
// #i28701# - Due to the new object positioning
@@ -1983,7 +1983,7 @@ SwTwips SwSectionFrm::_Grow( SwTwips nDist, bool bTst )
return 0L;
}
-SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
+SwTwips SwSectionFrame::_Shrink( SwTwips nDist, bool bTst )
{
if ( Lower() && !IsColLocked() && !HasFixSize() )
{
@@ -1995,11 +1995,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
else
{
SWRECTFN( this )
- long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if ( nDist > nFrmHeight )
- nDist = nFrmHeight;
+ long nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if ( nDist > nFrameHeight )
+ nDist = nFrameHeight;
- if ( Lower()->IsColumnFrm() && Lower()->GetNext() && // FootnoteAtEnd
+ if ( Lower()->IsColumnFrame() && Lower()->GetNext() && // FootnoteAtEnd
!GetSection()->GetFormat()->GetBalancedColumns().GetValue() )
{ // With column bases the format takes over the control of the
// growth (because of the balance)
@@ -2016,7 +2016,7 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
SetCompletePaint();
InvalidatePage();
}
- (Frm().*fnRect->fnAddBottom)( -nDist );
+ (Frame().*fnRect->fnAddBottom)( -nDist );
long nPrtHeight = (Prt().*fnRect->fnGetHeight)() - nDist;
(Prt().*fnRect->fnSetHeight)( nPrtHeight );
@@ -2034,12 +2034,12 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
// the footer. This may not happen, because shrinking the footer
// would cause the top of the section frame to overlap with the
// fly frame again, this would result in a perfect loop.
- if( GetUpper() && !GetUpper()->IsFooterFrm() )
+ if( GetUpper() && !GetUpper()->IsFooterFrame() )
GetUpper()->Shrink( nDist, bTst );
- if( Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() )
+ if( Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() )
{
- SwFrm* pTmp = Lower();
+ SwFrame* pTmp = Lower();
do
{
pTmp->_InvalidateSize();
@@ -2048,11 +2048,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
}
if( GetNext() )
{
- SwFrm* pFrm = GetNext();
- while( pFrm && pFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pFrm)->GetSection() )
- pFrm = pFrm->GetNext();
- if( pFrm )
- pFrm->InvalidatePos();
+ SwFrame* pFrame = GetNext();
+ while( pFrame && pFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pFrame)->GetSection() )
+ pFrame = pFrame->GetNext();
+ if( pFrame )
+ pFrame->InvalidatePos();
else
SetRetouche();
}
@@ -2066,11 +2066,11 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
}
/*
-|* When are Frms within a SectionFrms moveable?
-|* If they are not in the last column of a SectionFrms yet,
+|* When are Frames within a SectionFrames moveable?
+|* If they are not in the last column of a SectionFrames yet,
|* if there is no Follow,
-|* if the SectionFrm cannot grow anymore, then it gets more complicated,
-|* in that case it depends on whether the SectionFrm can find a next
+|* if the SectionFrame cannot grow anymore, then it gets more complicated,
+|* in that case it depends on whether the SectionFrame can find a next
|* layout sheet. In (column based/chained) Flys this is checked via
|* GetNextLayout, in tables and headers/footers there is none, however in the
|* DocBody and in foot notes there is always one.
@@ -2078,13 +2078,13 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, bool bTst )
|* This routine is used in the TextFormatter to decided whether it's allowed to
|* create a (paragraph-)Follow or whether the paragraph has to stick together
|*/
-bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
+bool SwSectionFrame::MoveAllowed( const SwFrame* pFrame) const
{
// Is there a Follow or is the Frame not in the last column?
- if( HasFollow() || ( pFrm->GetUpper()->IsColBodyFrm() &&
- pFrm->GetUpper()->GetUpper()->GetNext() ) )
+ if( HasFollow() || ( pFrame->GetUpper()->IsColBodyFrame() &&
+ pFrame->GetUpper()->GetUpper()->GetNext() ) )
return true;
- if( pFrm->IsInFootnote() )
+ if( pFrame->IsInFootnote() )
{
if( IsInFootnote() )
{
@@ -2092,26 +2092,26 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
{
if( Growable() )
return false;
- return GetUpper()->FindSctFrm()->MoveAllowed( this );
+ return GetUpper()->FindSctFrame()->MoveAllowed( this );
}
else
return true;
}
// The content of footnote inside a columned sectionfrm is moveable
// except in the last column
- const SwLayoutFrm *pLay = pFrm->FindFootnoteFrm()->GetUpper()->GetUpper();
- if( pLay->IsColumnFrm() && pLay->GetNext() )
+ const SwLayoutFrame *pLay = pFrame->FindFootnoteFrame()->GetUpper()->GetUpper();
+ if( pLay->IsColumnFrame() && pLay->GetNext() )
{
// The first paragraph in the first footnote in the first column
// in the sectionfrm at the top of the page is not moveable,
// if the columnbody is empty.
bool bRet = false;
- if( pLay->GetIndPrev() || pFrm->GetIndPrev() ||
- pFrm->FindFootnoteFrm()->GetPrev() )
+ if( pLay->GetIndPrev() || pFrame->GetIndPrev() ||
+ pFrame->FindFootnoteFrame()->GetPrev() )
bRet = true;
else
{
- const SwLayoutFrm* pBody = static_cast<const SwColumnFrm*>(pLay)->FindBodyCont();
+ const SwLayoutFrame* pBody = static_cast<const SwColumnFrame*>(pLay)->FindBodyCont();
if( pBody && pBody->Lower() )
bRet = true;
}
@@ -2127,7 +2127,7 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
if( IsInTab() || ( !IsInDocBody() && FindFooterOrHeader() ) )
return false; // It doesn't work in tables/headers/footers
if( IsInFly() ) // In column based or chained frames
- return nullptr != const_cast<SwFrm*>(static_cast<SwFrm const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE );
+ return nullptr != const_cast<SwFrame*>(static_cast<SwFrame const *>(GetUpper()))->GetNextLeaf( MAKEPAGE_NONE );
return true;
}
@@ -2138,31 +2138,31 @@ bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const
Note: For a frame inside a table frame, which is inside a section frame,
NULL is returned.
*/
-SwFrm* SwFrm::_GetIndPrev() const
+SwFrame* SwFrame::_GetIndPrev() const
{
- SwFrm *pRet = nullptr;
+ SwFrame *pRet = nullptr;
// #i79774#
// Do not assert, if the frame has a direct previous frame, because it
// could be an empty section frame. The caller has to assure, that the
// frame has no direct previous frame or only empty section frames as
// previous frames.
OSL_ENSURE( /*!pPrev &&*/ IsInSct(), "Why?" );
- const SwFrm* pSct = GetUpper();
+ const SwFrame* pSct = GetUpper();
if( !pSct )
return nullptr;
- if( pSct->IsSctFrm() )
+ if( pSct->IsSctFrame() )
pRet = pSct->GetIndPrev();
- else if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() )
+ else if( pSct->IsColBodyFrame() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrame() )
{
// Do not return the previous frame of the outer section, if in one
// of the previous columns is content.
- const SwFrm* pCol = GetUpper()->GetUpper()->GetPrev();
+ const SwFrame* pCol = GetUpper()->GetUpper()->GetPrev();
while( pCol )
{
- OSL_ENSURE( pCol->IsColumnFrm(), "GetIndPrev(): ColumnFrm expected" );
- OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
+ OSL_ENSURE( pCol->IsColumnFrame(), "GetIndPrev(): ColumnFrame expected" );
+ OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(),
"GetIndPrev(): Where's the body?");
- if( static_cast<const SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pCol)->Lower())->Lower() )
+ if( static_cast<const SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pCol)->Lower())->Lower() )
return nullptr;
pCol = pCol->GetPrev();
}
@@ -2170,29 +2170,29 @@ SwFrm* SwFrm::_GetIndPrev() const
}
// skip empty section frames
- while( pRet && pRet->IsSctFrm() && !static_cast<SwSectionFrm*>(pRet)->GetSection() )
+ while( pRet && pRet->IsSctFrame() && !static_cast<SwSectionFrame*>(pRet)->GetSection() )
pRet = pRet->GetIndPrev();
return pRet;
}
-SwFrm* SwFrm::_GetIndNext()
+SwFrame* SwFrame::_GetIndNext()
{
OSL_ENSURE( !mpNext && IsInSct(), "Why?" );
- SwFrm* pSct = GetUpper();
+ SwFrame* pSct = GetUpper();
if( !pSct )
return nullptr;
- if( pSct->IsSctFrm() )
+ if( pSct->IsSctFrame() )
return pSct->GetIndNext();
- if( pSct->IsColBodyFrm() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrm() )
- { // We can only return the successor of the SectionFrms if there is no
+ if( pSct->IsColBodyFrame() && (pSct = pSct->GetUpper()->GetUpper())->IsSctFrame() )
+ { // We can only return the successor of the SectionFrames if there is no
// content in the successing columns
- SwFrm* pCol = GetUpper()->GetUpper()->GetNext();
+ SwFrame* pCol = GetUpper()->GetUpper()->GetNext();
while( pCol )
{
- OSL_ENSURE( pCol->IsColumnFrm(), "GetIndNext(): ColumnFrm expected" );
- OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrm(),
+ OSL_ENSURE( pCol->IsColumnFrame(), "GetIndNext(): ColumnFrame expected" );
+ OSL_ENSURE( pCol->GetLower() && pCol->GetLower()->IsBodyFrame(),
"GetIndNext(): Where's the body?");
- if( static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pCol)->Lower())->Lower() )
+ if( static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pCol)->Lower())->Lower() )
return nullptr;
pCol = pCol->GetNext();
}
@@ -2201,7 +2201,7 @@ SwFrm* SwFrm::_GetIndNext()
return nullptr;
}
-bool SwSectionFrm::IsDescendantFrom( const SwSectionFormat* pFormat ) const
+bool SwSectionFrame::IsDescendantFrom( const SwSectionFormat* pFormat ) const
{
if( !m_pSection || !pFormat )
return false;
@@ -2216,7 +2216,7 @@ bool SwSectionFrm::IsDescendantFrom( const SwSectionFormat* pFormat ) const
return true;
}
-void SwSectionFrm::CalcFootnoteAtEndFlag()
+void SwSectionFrame::CalcFootnoteAtEndFlag()
{
SwSectionFormat *pFormat = GetSection()->GetFormat();
sal_uInt16 nVal = pFormat->GetFootnoteAtTextEnd( false ).GetValue();
@@ -2239,12 +2239,12 @@ void SwSectionFrm::CalcFootnoteAtEndFlag()
}
}
-bool SwSectionFrm::IsEndnoteAtMyEnd() const
+bool SwSectionFrame::IsEndnoteAtMyEnd() const
{
return m_pSection->GetFormat()->GetEndAtTextEnd( false ).IsAtEnd();
}
-void SwSectionFrm::CalcEndAtEndFlag()
+void SwSectionFrame::CalcEndAtEndFlag()
{
SwSectionFormat *pFormat = GetSection()->GetFormat();
m_bEndnAtEnd = pFormat->GetEndAtTextEnd( false ).IsAtEnd();
@@ -2258,7 +2258,7 @@ void SwSectionFrm::CalcEndAtEndFlag()
}
}
-void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwSectionFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
sal_uInt8 nInvFlags = 0;
@@ -2279,7 +2279,7 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
aOIter.NextItem();
}
if ( aOldSet.Count() || aNewSet.Count() )
- SwLayoutFrm::Modify( &aOldSet, &aNewSet );
+ SwLayoutFrame::Modify( &aOldSet, &aNewSet );
}
else
_UpdateAttr( pOld, pNew, nInvFlags );
@@ -2293,19 +2293,19 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
-void SwSectionFrm::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
+void SwSectionFrame::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
{
SwClient::SwClientNotify(rMod, rHint);
// #i117863#
- const SwSectionFrmMoveAndDeleteHint* pHint =
- dynamic_cast<const SwSectionFrmMoveAndDeleteHint*>(&rHint);
+ const SwSectionFrameMoveAndDeleteHint* pHint =
+ dynamic_cast<const SwSectionFrameMoveAndDeleteHint*>(&rHint);
if ( pHint && pHint->GetId() == SFX_HINT_DYING && &rMod == GetRegisteredIn() )
{
- SwSectionFrm::MoveContentAndDelete( this, pHint->IsSaveContent() );
+ SwSectionFrame::MoveContentAndDelete( this, pHint->IsSaveContent() );
}
}
-void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
+void SwSectionFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
@@ -2322,10 +2322,10 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
// on the old column attribute. We're left with creating a
// temporary attribute here.
SwFormatCol aCol;
- if ( Lower() && Lower()->IsColumnFrm() )
+ if ( Lower() && Lower()->IsColumnFrame() )
{
sal_uInt16 nCol = 0;
- SwFrm *pTmp = Lower();
+ SwFrame *pTmp = Lower();
do
{ ++nCol;
pTmp = pTmp->GetNext();
@@ -2399,7 +2399,7 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
case RES_PROTECT:
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetLayout()->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
@@ -2418,18 +2418,18 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
pNewSet->ClearItem( nWhich );
}
else
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
}
/// A follow or a ftncontainer at the end of the page causes a maximal Size of the sectionframe.
-bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const
+bool SwSectionFrame::ToMaximize( bool bCheckFollow ) const
{
if( HasFollow() )
{
if( !bCheckFollow ) // Don't check superfluous follows
return true;
- const SwSectionFrm* pFoll = GetFollow();
+ const SwSectionFrame* pFoll = GetFollow();
while( pFoll && pFoll->IsSuperfluous() )
pFoll = pFoll->GetFollow();
if( pFoll )
@@ -2437,7 +2437,7 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const
}
if( IsFootnoteAtEnd() )
return false;
- const SwFootnoteContFrm* pCont = ContainsFootnoteCont();
+ const SwFootnoteContFrame* pCont = ContainsFootnoteCont();
if( !IsEndnAtEnd() )
return nullptr != pCont;
bool bRet = false;
@@ -2451,157 +2451,157 @@ bool SwSectionFrm::ToMaximize( bool bCheckFollow ) const
return bRet;
}
-/// Check every Column for FootnoteContFrms.
-SwFootnoteContFrm* SwSectionFrm::ContainsFootnoteCont( const SwFootnoteContFrm* pCont ) const
+/// Check every Column for FootnoteContFrames.
+SwFootnoteContFrame* SwSectionFrame::ContainsFootnoteCont( const SwFootnoteContFrame* pCont ) const
{
- SwFootnoteContFrm* pRet = nullptr;
- const SwLayoutFrm* pLay;
+ SwFootnoteContFrame* pRet = nullptr;
+ const SwLayoutFrame* pLay;
if( pCont )
{
- pLay = pCont->FindFootnoteBossFrm();
+ pLay = pCont->FindFootnoteBossFrame();
OSL_ENSURE( IsAnLower( pLay ), "ConatainsFootnoteCont: Wrong FootnoteContainer" );
- pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext());
+ pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext());
}
- else if( Lower() && Lower()->IsColumnFrm() )
- pLay = static_cast<const SwLayoutFrm*>(Lower());
+ else if( Lower() && Lower()->IsColumnFrame() )
+ pLay = static_cast<const SwLayoutFrame*>(Lower());
else
pLay = nullptr;
while ( !pRet && pLay )
{
if( pLay->Lower() && pLay->Lower()->GetNext() )
{
- OSL_ENSURE( pLay->Lower()->GetNext()->IsFootnoteContFrm(),
+ OSL_ENSURE( pLay->Lower()->GetNext()->IsFootnoteContFrame(),
"ToMaximize: Unexpected Frame" );
- pRet = const_cast<SwFootnoteContFrm*>(static_cast<const SwFootnoteContFrm*>(pLay->Lower()->GetNext()));
+ pRet = const_cast<SwFootnoteContFrame*>(static_cast<const SwFootnoteContFrame*>(pLay->Lower()->GetNext()));
}
- OSL_ENSURE( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrm(),
- "ToMaximize: ColFrm expected" );
- pLay = static_cast<const SwLayoutFrm*>(pLay->GetNext());
+ OSL_ENSURE( !pLay->GetNext() || pLay->GetNext()->IsLayoutFrame(),
+ "ToMaximize: ColFrame expected" );
+ pLay = static_cast<const SwLayoutFrame*>(pLay->GetNext());
}
return pRet;
}
-void SwSectionFrm::InvalidateFootnotePos()
+void SwSectionFrame::InvalidateFootnotePos()
{
- SwFootnoteContFrm* pCont = ContainsFootnoteCont();
+ SwFootnoteContFrame* pCont = ContainsFootnoteCont();
if( pCont )
{
- SwFrm *pTmp = pCont->ContainsContent();
+ SwFrame *pTmp = pCont->ContainsContent();
if( pTmp )
pTmp->_InvalidatePos();
}
}
-SwTwips SwSectionFrm::CalcUndersize() const
+SwTwips SwSectionFrame::CalcUndersize() const
{
SWRECTFN(this);
return InnerHeight() - (Prt().*fnRect->fnGetHeight)();
}
-SwTwips SwSectionFrm::Undersize(bool bOverSize)
+SwTwips SwSectionFrame::Undersize(bool bOverSize)
{
const auto nRet = CalcUndersize();
m_bUndersized = (nRet > 0);
return (nRet <= 0 && !bOverSize) ? 0 : nRet;
}
-void SwSectionFrm::CalcFootnoteContent()
+void SwSectionFrame::CalcFootnoteContent()
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
- SwFootnoteContFrm* pCont = ContainsFootnoteCont();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
+ SwFootnoteContFrame* pCont = ContainsFootnoteCont();
if( pCont )
{
- SwFrm* pFrm = pCont->ContainsAny();
- if( pFrm )
+ SwFrame* pFrame = pCont->ContainsAny();
+ if( pFrame )
pCont->Calc(pRenderContext);
- while( pFrm && IsAnLower( pFrm ) )
+ while( pFrame && IsAnLower( pFrame ) )
{
- SwFootnoteFrm* pFootnote = pFrm->FindFootnoteFrm();
+ SwFootnoteFrame* pFootnote = pFrame->FindFootnoteFrame();
if( pFootnote )
pFootnote->Calc(pRenderContext);
- pFrm->Calc(pRenderContext);
- if( pFrm->IsSctFrm() )
+ pFrame->Calc(pRenderContext);
+ if( pFrame->IsSctFrame() )
{
- SwFrm *pTmp = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
+ SwFrame *pTmp = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
if( pTmp )
{
- pFrm = pTmp;
+ pFrame = pTmp;
continue;
}
}
- pFrm = pFrm->FindNext();
+ pFrame = pFrame->FindNext();
}
}
}
/*
- * If a SectionFrm gets empty, e.g. because its content changes the page/column,
+ * If a SectionFrame gets empty, e.g. because its content changes the page/column,
* it is not destroyed immediately (there could be a pointer left to it on the
- * stack), instead it puts itself in a list at the RootFrm, which is processed
+ * stack), instead it puts itself in a list at the RootFrame, which is processed
* later on (in Layaction::Action among others). Its size is set to Null and
- * the pointer to its page as well. Such SectionFrms that are to be deleted
+ * the pointer to its page as well. Such SectionFrames that are to be deleted
* must be ignored by the layout/during formatting.
*
- * With InsertEmptySct the RootFrm stores a SectionFrm in the list,
+ * With InsertEmptySct the RootFrame stores a SectionFrame in the list,
* with RemoveFromList it can be removed from the list (Dtor),
- * with DeleteEmptySct the list is processed and the SectionFrms are destroyed.
+ * with DeleteEmptySct the list is processed and the SectionFrames are destroyed.
*/
-void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel )
+void SwRootFrame::InsertEmptySct( SwSectionFrame* pDel )
{
if( !mpDestroy )
mpDestroy = new SwDestroyList;
mpDestroy->insert( pDel );
}
-void SwRootFrm::_DeleteEmptySct()
+void SwRootFrame::_DeleteEmptySct()
{
OSL_ENSURE( mpDestroy, "Keine Liste, keine Kekse" );
while( !mpDestroy->empty() )
{
- SwSectionFrm* pSect = *mpDestroy->begin();
+ SwSectionFrame* pSect = *mpDestroy->begin();
mpDestroy->erase( mpDestroy->begin() );
OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
- "DeleteEmptySct: Locked SectionFrm" );
- if( !pSect->Frm().HasArea() && !pSect->ContainsContent() )
+ "DeleteEmptySct: Locked SectionFrame" );
+ if( !pSect->Frame().HasArea() && !pSect->ContainsContent() )
{
- SwLayoutFrm* pUp = pSect->GetUpper();
+ SwLayoutFrame* pUp = pSect->GetUpper();
pSect->RemoveFromLayout();
- SwFrm::DestroyFrm(pSect);
+ SwFrame::DestroyFrame(pSect);
if( pUp && !pUp->Lower() )
{
- if( pUp->IsPageBodyFrm() )
- pUp->getRootFrm()->SetSuperfluous();
- else if( pUp->IsFootnoteFrm() && !pUp->IsColLocked() &&
+ if( pUp->IsPageBodyFrame() )
+ pUp->getRootFrame()->SetSuperfluous();
+ else if( pUp->IsFootnoteFrame() && !pUp->IsColLocked() &&
pUp->GetUpper() )
{
pUp->Cut();
- SwFrm::DestroyFrm(pUp);
+ SwFrame::DestroyFrame(pUp);
}
}
}
else {
- OSL_ENSURE( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrm?!" );
+ OSL_ENSURE( pSect->GetSection(), "DeleteEmptySct: Halbtoter SectionFrame?!" );
}
}
}
-void SwRootFrm::_RemoveFromList( SwSectionFrm* pSct )
+void SwRootFrame::_RemoveFromList( SwSectionFrame* pSct )
{
OSL_ENSURE( mpDestroy, "Where's my list?" );
mpDestroy->erase( pSct );
}
#ifdef DBG_UTIL
-bool SwRootFrm::IsInDelList( SwSectionFrm* pSct ) const
+bool SwRootFrame::IsInDelList( SwSectionFrame* pSct ) const
{
return mpDestroy && mpDestroy->find( pSct ) != mpDestroy->end();
}
#endif
-bool SwSectionFrm::IsBalancedSection() const
+bool SwSectionFrame::IsBalancedSection() const
{
bool bRet = false;
- if ( GetSection() && Lower() && Lower()->IsColumnFrm() && Lower()->GetNext() )
+ if ( GetSection() && Lower() && Lower()->IsColumnFrame() && Lower()->GetNext() )
{
bRet = !GetSection()->GetFormat()->GetBalancedColumns().GetValue();
}
diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx
index ca1ad036e209..ce792711641d 100644
--- a/sw/source/core/layout/softpagebreak.cxx
+++ b/sw/source/core/layout/softpagebreak.cxx
@@ -27,41 +27,41 @@
void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const
{
- SwIterator<SwTextFrm,SwTextNode> aIter( *this );
- for( const SwTextFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
+ SwIterator<SwTextFrame,SwTextNode> aIter( *this );
+ for( const SwTextFrame *pFrame = aIter.First(); pFrame; pFrame = aIter.Next() )
{
// No soft page break in header or footer
- if( pFrm->FindFooterOrHeader() || pFrm->IsInFly() )
+ if( pFrame->FindFooterOrHeader() || pFrame->IsInFly() )
return;
// No soft page break if I'm not the first frame in my layout frame
- if( pFrm->GetIndPrev() )
+ if( pFrame->GetIndPrev() )
continue;
- const SwPageFrm* pPage = pFrm->FindPageFrm();
+ const SwPageFrame* pPage = pFrame->FindPageFrame();
// No soft page break at the first page
if( pPage && pPage->GetPrev() )
{
- const SwContentFrm* pFirst2 = pPage->FindFirstBodyContent();
+ const SwContentFrame* pFirst2 = pPage->FindFirstBodyContent();
// Special handling for content frame in table frames
- if( pFrm->IsInTab() )
+ if( pFrame->IsInTab() )
{
// No soft page break if I'm in a table but the first content frame
// at my page is not in a table
if( !pFirst2 || !pFirst2->IsInTab() )
continue;
- const SwLayoutFrm *pRow = pFrm->GetUpper();
+ const SwLayoutFrame *pRow = pFrame->GetUpper();
// Looking for the "most upper" row frame,
// skipping sub tables and/or table in table
- while( !pRow->IsRowFrm() || !pRow->GetUpper()->IsTabFrm() ||
+ while( !pRow->IsRowFrame() || !pRow->GetUpper()->IsTabFrame() ||
pRow->GetUpper()->GetUpper()->IsInTab() )
pRow = pRow->GetUpper();
- const SwTabFrm *pTab = pRow->FindTabFrm();
+ const SwTabFrame *pTab = pRow->FindTabFrame();
// For master tables the soft page break will exported at the table row,
// not at the content frame.
// If the first content is outside my table frame, no soft page break.
if( !pTab->IsFollow() || !pTab->IsAnLower( pFirst2 ) )
continue;
// Only content of non-heading-rows can get a soft page break
- const SwFrm* pFirstRow = pTab->GetFirstNonHeadlineRow();
+ const SwFrame* pFirstRow = pTab->GetFirstNonHeadlineRow();
// If there's no follow flow line, the soft page break will be
// exported at the row, not at the content.
if( pRow == pFirstRow &&
@@ -72,14 +72,14 @@ void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const
// the soft page break itself.
// Every first content frame of every cell frame in this row
// will get the soft page break
- const SwFrm* pCell = pRow->Lower();
+ const SwFrame* pCell = pRow->Lower();
while( pCell )
{
- pFirst2 = static_cast<const SwLayoutFrm*>(pCell)->ContainsContent();
- if( pFirst2 == pFrm )
+ pFirst2 = static_cast<const SwLayoutFrame*>(pCell)->ContainsContent();
+ if( pFirst2 == pFrame )
{ // Here we are: a first content inside a cell
// inside the splitted row => soft page break
- rBreak.insert( pFrm->GetOfst() );
+ rBreak.insert( pFrame->GetOfst() );
break;
}
pCell = pCell->GetNext();
@@ -87,8 +87,8 @@ void SwTextNode::fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const
}
}
else // No soft page break if there's a "hard" page break attribute
- if( pFirst2 == pFrm && !pFrm->IsPageBreak( true ) )
- rBreak.insert( pFrm->GetOfst() );
+ if( pFirst2 == pFrame && !pFrame->IsPageBreak( true ) )
+ rBreak.insert( pFrame->GetOfst() );
}
}
}
@@ -98,12 +98,12 @@ bool SwTableLine::hasSoftPageBreak() const
// No soft page break for sub tables
if( GetUpper() || !GetFrameFormat() )
return false;
- SwIterator<SwRowFrm,SwFormat> aIter( *GetFrameFormat() );
- for( SwRowFrm* pLast = aIter.First(); pLast; pLast = aIter.Next() )
+ SwIterator<SwRowFrame,SwFormat> aIter( *GetFrameFormat() );
+ for( SwRowFrame* pLast = aIter.First(); pLast; pLast = aIter.Next() )
{
if( pLast->GetTabLine() == this )
{
- const SwTabFrm* pTab = pLast->FindTabFrm();
+ const SwTabFrame* pTab = pLast->FindTabFrame();
// No soft page break for
// tables with prevs, i.e. if the frame is not the first in its layout frame
// tables in footer or header
@@ -114,19 +114,19 @@ bool SwTableLine::hasSoftPageBreak() const
|| pTab->IsInFly() || pTab->GetUpper()->IsInTab() ||
( !pTab->IsFollow() && pTab->IsPageBreak( true ) ) )
return false;
- const SwPageFrm* pPage = pTab->FindPageFrm();
+ const SwPageFrame* pPage = pTab->FindPageFrame();
// No soft page break at the first page of the document
if( pPage && !pPage->GetPrev() )
return false;
- const SwContentFrm* pFirst = pPage ? pPage->FindFirstBodyContent() : nullptr;
+ const SwContentFrame* pFirst = pPage ? pPage->FindFirstBodyContent() : nullptr;
// No soft page break for
// tables which does not contain the first body content of the page
- if( !pFirst || !pTab->IsAnLower( pFirst->FindTabFrm() ) )
+ if( !pFirst || !pTab->IsAnLower( pFirst->FindTabFrame() ) )
return false;
// The row which could get a soft page break must be either the first
// row of a master table frame or the first "non-headline-row" of a
// follow table frame...
- const SwFrm* pRow = pTab->IsFollow() ?
+ const SwFrame* pRow = pTab->IsFollow() ?
pTab->GetFirstNonHeadlineRow() : pTab->Lower();
if( pRow == pLast )
{
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 1e1db225397d..b20fadb93cbd 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -33,163 +33,163 @@
#include <hints.hxx>
// No inline cause we need the function pointers
-long SwFrm::GetTopMargin() const
+long SwFrame::GetTopMargin() const
{ return Prt().Top(); }
-long SwFrm::GetBottomMargin() const
- { return Frm().Height() -Prt().Height() -Prt().Top(); }
-long SwFrm::GetLeftMargin() const
+long SwFrame::GetBottomMargin() const
+ { return Frame().Height() -Prt().Height() -Prt().Top(); }
+long SwFrame::GetLeftMargin() const
{ return Prt().Left(); }
-long SwFrm::GetRightMargin() const
- { return Frm().Width() - Prt().Width() - Prt().Left(); }
-long SwFrm::GetPrtLeft() const
- { return Frm().Left() + Prt().Left(); }
-long SwFrm::GetPrtBottom() const
- { return Frm().Top() + Prt().Height() + Prt().Top(); }
-long SwFrm::GetPrtRight() const
- { return Frm().Left() + Prt().Width() + Prt().Left(); }
-long SwFrm::GetPrtTop() const
- { return Frm().Top() + Prt().Top(); }
-
-bool SwFrm::SetMinLeft( long nDeadline )
+long SwFrame::GetRightMargin() const
+ { return Frame().Width() - Prt().Width() - Prt().Left(); }
+long SwFrame::GetPrtLeft() const
+ { return Frame().Left() + Prt().Left(); }
+long SwFrame::GetPrtBottom() const
+ { return Frame().Top() + Prt().Height() + Prt().Top(); }
+long SwFrame::GetPrtRight() const
+ { return Frame().Left() + Prt().Width() + Prt().Left(); }
+long SwFrame::GetPrtTop() const
+ { return Frame().Top() + Prt().Top(); }
+
+bool SwFrame::SetMinLeft( long nDeadline )
{
- SwTwips nDiff = nDeadline - Frm().Left();
+ SwTwips nDiff = nDeadline - Frame().Left();
if( nDiff > 0 )
{
- Frm().Left( nDeadline );
+ Frame().Left( nDeadline );
Prt().Width( Prt().Width() - nDiff );
return true;
}
return false;
}
-bool SwFrm::SetMaxBottom( long nDeadline )
+bool SwFrame::SetMaxBottom( long nDeadline )
{
- SwTwips nDiff = Frm().Top() + Frm().Height() - nDeadline;
+ SwTwips nDiff = Frame().Top() + Frame().Height() - nDeadline;
if( nDiff > 0 )
{
- Frm().Height( Frm().Height() - nDiff );
+ Frame().Height( Frame().Height() - nDiff );
Prt().Height( Prt().Height() - nDiff );
return true;
}
return false;
}
-bool SwFrm::SetMinTop( long nDeadline )
+bool SwFrame::SetMinTop( long nDeadline )
{
- SwTwips nDiff = nDeadline - Frm().Top();
+ SwTwips nDiff = nDeadline - Frame().Top();
if( nDiff > 0 )
{
- Frm().Top( nDeadline );
+ Frame().Top( nDeadline );
Prt().Height( Prt().Height() - nDiff );
return true;
}
return false;
}
-bool SwFrm::SetMaxRight( long nDeadline )
+bool SwFrame::SetMaxRight( long nDeadline )
{
- SwTwips nDiff = Frm().Left() + Frm().Width() - nDeadline;
+ SwTwips nDiff = Frame().Left() + Frame().Width() - nDeadline;
if( nDiff > 0 )
{
- Frm().Width( Frm().Width() - nDiff );
+ Frame().Width( Frame().Width() - nDiff );
Prt().Width( Prt().Width() - nDiff );
return true;
}
return false;
}
-void SwFrm::MakeBelowPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify )
+void SwFrame::MakeBelowPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
- maFrm.Pos().Y() += pPrv->Frm().Height();
+ maFrame.Pos( pPrv->Frame().Pos() );
+ maFrame.Pos().Y() += pPrv->Frame().Height();
}
else
{
- maFrm.Pos( pUp->Frm().Pos() );
- maFrm.Pos() += pUp->Prt().Pos();
+ maFrame.Pos( pUp->Frame().Pos() );
+ maFrame.Pos() += pUp->Prt().Pos();
}
if( bNotify )
- maFrm.Pos().Y() += 1;
+ maFrame.Pos().Y() += 1;
}
-void SwFrm::MakeUpperPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify )
+void SwFrame::MakeUpperPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
- maFrm.Pos().Y() -= Frm().Height();
+ maFrame.Pos( pPrv->Frame().Pos() );
+ maFrame.Pos().Y() -= Frame().Height();
}
else
{
- maFrm.Pos( pUp->Frm().Pos() );
- maFrm.Pos() += pUp->Prt().Pos();
- maFrm.Pos().Y() += pUp->Prt().Height() - maFrm.Height();
+ maFrame.Pos( pUp->Frame().Pos() );
+ maFrame.Pos() += pUp->Prt().Pos();
+ maFrame.Pos().Y() += pUp->Prt().Height() - maFrame.Height();
}
if( bNotify )
- maFrm.Pos().Y() -= 1;
+ maFrame.Pos().Y() -= 1;
}
-void SwFrm::MakeLeftPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify )
+void SwFrame::MakeLeftPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
- maFrm.Pos().X() -= Frm().Width();
+ maFrame.Pos( pPrv->Frame().Pos() );
+ maFrame.Pos().X() -= Frame().Width();
}
else
{
- maFrm.Pos( pUp->Frm().Pos() );
- maFrm.Pos() += pUp->Prt().Pos();
- maFrm.Pos().X() += pUp->Prt().Width() - maFrm.Width();
+ maFrame.Pos( pUp->Frame().Pos() );
+ maFrame.Pos() += pUp->Prt().Pos();
+ maFrame.Pos().X() += pUp->Prt().Width() - maFrame.Width();
}
if( bNotify )
- maFrm.Pos().X() -= 1;
+ maFrame.Pos().X() -= 1;
}
-void SwFrm::MakeRightPos( const SwFrm* pUp, const SwFrm* pPrv, bool bNotify )
+void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotify )
{
if( pPrv )
{
- maFrm.Pos( pPrv->Frm().Pos() );
- maFrm.Pos().X() += pPrv->Frm().Width();
+ maFrame.Pos( pPrv->Frame().Pos() );
+ maFrame.Pos().X() += pPrv->Frame().Width();
}
else
{
- maFrm.Pos( pUp->Frm().Pos() );
- maFrm.Pos() += pUp->Prt().Pos();
+ maFrame.Pos( pUp->Frame().Pos() );
+ maFrame.Pos() += pUp->Prt().Pos();
}
if( bNotify )
- maFrm.Pos().X() += 1;
+ maFrame.Pos().X() += 1;
}
-void SwFrm::SetTopBottomMargins( long nTop, long nBot )
+void SwFrame::SetTopBottomMargins( long nTop, long nBot )
{
Prt().Top( nTop );
- Prt().Height( Frm().Height() - nTop - nBot );
+ Prt().Height( Frame().Height() - nTop - nBot );
}
-void SwFrm::SetBottomTopMargins( long nBot, long nTop )
+void SwFrame::SetBottomTopMargins( long nBot, long nTop )
{
Prt().Top( nTop );
- Prt().Height( Frm().Height() - nTop - nBot );
+ Prt().Height( Frame().Height() - nTop - nBot );
}
-void SwFrm::SetLeftRightMargins( long nLeft, long nRight)
+void SwFrame::SetLeftRightMargins( long nLeft, long nRight)
{
Prt().Left( nLeft );
- Prt().Width( Frm().Width() - nLeft - nRight );
+ Prt().Width( Frame().Width() - nLeft - nRight );
}
-void SwFrm::SetRightLeftMargins( long nRight, long nLeft)
+void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
{
Prt().Left( nLeft );
- Prt().Width( Frm().Width() - nLeft - nRight );
+ Prt().Width( Frame().Width() - nLeft - nRight );
}
/// checks the layout direction and invalidates the lower frames recursively, if necessary.
-void SwFrm::CheckDirChange()
+void SwFrame::CheckDirChange()
{
bool bOldVert = GetVerticalFlag();
bool bOldRev = IsReverse();
@@ -201,21 +201,21 @@ void SwFrm::CheckDirChange()
if( ( IsVertical() != bOldVert ) || bChg || IsReverse() != bOldRev || bOldVertL2R != IsVertLR() )
{
InvalidateAll();
- if( IsLayoutFrm() )
+ if( IsLayoutFrame() )
{
// set minimum row height for vertical cells in horizontal table:
- if ( IsCellFrm() && GetUpper() )
+ if ( IsCellFrame() && GetUpper() )
{
if ( IsVertical() != GetUpper()->IsVertical() &&
- static_cast<SwCellFrm*>(this)->GetTabBox()->getRowSpan() == 1 )
+ static_cast<SwCellFrame*>(this)->GetTabBox()->getRowSpan() == 1 )
{
enum {
MIN_VERT_CELL_HEIGHT = 1135
};
- SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrm*>(this)->GetTabBox()->GetUpper());
+ SwTableLine* pLine = const_cast<SwTableLine*>(static_cast<SwCellFrame*>(this)->GetTabBox()->GetUpper());
SwFrameFormat* pFrameFormat = pLine->GetFrameFormat();
- SwFormatFrmSize aNew( pFrameFormat->GetFrmSize() );
+ SwFormatFrameSize aNew( pFrameFormat->GetFrameSize() );
if ( ATT_FIX_SIZE != aNew.GetHeightSizeType() )
aNew.SetHeightSizeType( ATT_MIN_SIZE );
if ( aNew.GetHeight() < MIN_VERT_CELL_HEIGHT )
@@ -225,37 +225,37 @@ void SwFrm::CheckDirChange()
}
}
- SwFrm* pFrm = static_cast<SwLayoutFrm*>(this)->Lower();
+ SwFrame* pFrame = static_cast<SwLayoutFrame*>(this)->Lower();
const SwFormatCol* pCol = nullptr;
- SwLayoutFrm* pBody = nullptr;
- if( pFrm )
+ SwLayoutFrame* pBody = nullptr;
+ if( pFrame )
{
- if( IsPageFrm() )
+ if( IsPageFrame() )
{
// If we're a page frame and we change our layout direction,
// we have to look for columns and rearrange them.
- pBody = static_cast<SwPageFrm*>(this)->FindBodyCont();
- if(pBody && pBody->Lower() && pBody->Lower()->IsColumnFrm())
- pCol = &static_cast<SwPageFrm*>(this)->GetFormat()->GetCol();
+ pBody = static_cast<SwPageFrame*>(this)->FindBodyCont();
+ if(pBody && pBody->Lower() && pBody->Lower()->IsColumnFrame())
+ pCol = &static_cast<SwPageFrame*>(this)->GetFormat()->GetCol();
}
- else if( pFrm->IsColumnFrm() )
+ else if( pFrame->IsColumnFrame() )
{
- pBody = static_cast<SwLayoutFrm*>(this);
+ pBody = static_cast<SwLayoutFrame*>(this);
const SwFrameFormat *pFormat = pBody->GetFormat();
if( pFormat )
pCol = &pFormat->GetCol();
}
}
- while( pFrm )
+ while( pFrame )
{
- pFrm->CheckDirChange();
- pFrm = pFrm->GetNext();
+ pFrame->CheckDirChange();
+ pFrame = pFrame->GetNext();
}
if( pCol )
pBody->AdjustColumns( pCol, true );
}
- else if( IsTextFrm() )
- static_cast<SwTextFrm*>(this)->Prepare();
+ else if( IsTextFrame() )
+ static_cast<SwTextFrame*>(this)->Prepare();
// #i31698# - notify anchored objects also for page frames.
// Remove code above for special handling of page frames
@@ -266,8 +266,8 @@ void SwFrm::CheckDirChange()
for ( size_t i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
- static_cast<SwFlyFrm*>(pAnchoredObj)->CheckDirChange();
+ if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
+ static_cast<SwFlyFrame*>(pAnchoredObj)->CheckDirChange();
else
{
// OD 2004-04-06 #i26791# - direct object
@@ -278,7 +278,7 @@ void SwFrm::CheckDirChange()
// #i31698# - update layout direction of
// anchored object
{
- ::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrmContainingAnchPos() );
+ ::setContextWritingMode( pAnchoredObj->DrawObj(), pAnchoredObj->GetAnchorFrameContainingAnchPos() );
pAnchoredObj->UpdateLayoutDir();
}
}
@@ -289,17 +289,17 @@ void SwFrm::CheckDirChange()
/// returns the position for anchors based on frame direction
// OD 2004-03-10 #i11860# - consider lower space and line spacing of
// previous frame according to new option 'Use former object positioning'
-Point SwFrm::GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
+Point SwFrame::GetFrameAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
{
- Point aAnchor = Frm().Pos();
+ Point aAnchor = Frame().Pos();
if ( ( IsVertical() && !IsVertLR() ) || IsRightToLeft() )
- aAnchor.X() += Frm().Width();
+ aAnchor.X() += Frame().Width();
- if ( IsTextFrm() )
+ if ( IsTextFrame() )
{
SwTwips nBaseOfstForFly =
- static_cast<const SwTextFrm*>(this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame );
+ static_cast<const SwTextFrame*>(this)->GetBaseOfstForFly( bIgnoreFlysAnchoredAtThisFrame );
if ( IsVertical() )
aAnchor.Y() += nBaseOfstForFly;
else
@@ -308,38 +308,38 @@ Point SwFrm::GetFrmAnchorPos( bool bIgnoreFlysAnchoredAtThisFrame ) const
// OD 2004-03-10 #i11860# - if option 'Use former object positioning'
// is OFF, consider the lower space and the line spacing of the
// previous frame and the spacing considered for the page grid
- const SwTextFrm* pThisTextFrm = static_cast<const SwTextFrm*>(this);
- const SwTwips nUpperSpaceAmountConsideredForPrevFrmAndPageGrid =
- pThisTextFrm->GetUpperSpaceAmountConsideredForPrevFrmAndPageGrid();
+ const SwTextFrame* pThisTextFrame = static_cast<const SwTextFrame*>(this);
+ const SwTwips nUpperSpaceAmountConsideredForPrevFrameAndPageGrid =
+ pThisTextFrame->GetUpperSpaceAmountConsideredForPrevFrameAndPageGrid();
if ( IsVertical() )
{
- aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrmAndPageGrid;
+ aAnchor.X() -= nUpperSpaceAmountConsideredForPrevFrameAndPageGrid;
}
else
{
- aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrmAndPageGrid;
+ aAnchor.Y() += nUpperSpaceAmountConsideredForPrevFrameAndPageGrid;
}
}
return aAnchor;
}
-void SwFrm::DestroyImpl()
+void SwFrame::DestroyImpl()
{
mbInDtor = true;
// accessible objects for fly and cell frames have been already disposed
// by the destructors of the derived classes.
- if( IsAccessibleFrm() && !(IsFlyFrm() || IsCellFrm()) && GetDep() )
+ if( IsAccessibleFrame() && !(IsFlyFrame() || IsCellFrame()) && GetDep() )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() )
{
- SwViewShell *pVSh = pRootFrm->GetCurrShell();
+ SwViewShell *pVSh = pRootFrame->GetCurrShell();
if( pVSh && pVSh->Imp() )
{
OSL_ENSURE( !GetLower(), "Lowers should be dispose already!" );
- pVSh->Imp()->DisposeAccessibleFrm( this );
+ pVSh->Imp()->DisposeAccessibleFrame( this );
}
}
}
@@ -349,9 +349,9 @@ void SwFrm::DestroyImpl()
for ( size_t i = mpDrawObjs->size(); i; )
{
SwAnchoredObject* pAnchoredObj = (*mpDrawObjs)[--i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj));
+ SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
}
else
{
@@ -359,7 +359,7 @@ void SwFrm::DestroyImpl()
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
OSL_ENSURE( pContact,
- "<SwFrm::~SwFrm> - missing contact for drawing object" );
+ "<SwFrame::~SwFrame> - missing contact for drawing object" );
if ( pContact )
{
pContact->DisconnectObjFromLayout( pSdrObj );
@@ -371,9 +371,9 @@ void SwFrm::DestroyImpl()
}
}
-SwFrm::~SwFrm()
+SwFrame::~SwFrame()
{
- assert(m_isInDestroy); // check that only DestroySwFrm does "delete"
+ assert(m_isInDestroy); // check that only DestroySwFrame does "delete"
assert(!IsDeleteForbidden()); // check that its not deleted while deletes are forbidden
#if OSL_DEBUG_LEVEL > 0
// JP 15.10.2001: for detection of access to deleted frames
@@ -381,28 +381,28 @@ SwFrm::~SwFrm()
#endif
}
-void SwFrm::DestroyFrm(SwFrm *const pFrm)
+void SwFrame::DestroyFrame(SwFrame *const pFrame)
{
- if (pFrm)
+ if (pFrame)
{
- pFrm->m_isInDestroy = true;
- pFrm->DestroyImpl();
- assert(pFrm->mbInDtor); // check that nobody forgot to call base class
- delete pFrm;
+ pFrame->m_isInDestroy = true;
+ pFrame->DestroyImpl();
+ assert(pFrame->mbInDtor); // check that nobody forgot to call base class
+ delete pFrame;
}
}
-const SwFrameFormat * SwLayoutFrm::GetFormat() const
+const SwFrameFormat * SwLayoutFrame::GetFormat() const
{
return static_cast< const SwFrameFormat * >( GetDep() );
}
-SwFrameFormat * SwLayoutFrm::GetFormat()
+SwFrameFormat * SwLayoutFrame::GetFormat()
{
return static_cast< SwFrameFormat * >( GetDep() );
}
-void SwLayoutFrm::SetFrameFormat( SwFrameFormat *pNew )
+void SwLayoutFrame::SetFrameFormat( SwFrameFormat *pNew )
{
if ( pNew != GetFormat() )
{
@@ -413,20 +413,20 @@ void SwLayoutFrm::SetFrameFormat( SwFrameFormat *pNew )
}
}
-SwContentFrm::SwContentFrm( SwContentNode * const pContent, SwFrm* pSib ) :
- SwFrm( pContent, pSib ),
- SwFlowFrm( (SwFrm&)*this )
+SwContentFrame::SwContentFrame( SwContentNode * const pContent, SwFrame* pSib ) :
+ SwFrame( pContent, pSib ),
+ SwFlowFrame( (SwFrame&)*this )
{
}
-void SwContentFrm::DestroyImpl()
+void SwContentFrame::DestroyImpl()
{
const SwContentNode* pCNd;
if( nullptr != ( pCNd = dynamic_cast<SwContentNode*>( GetRegisteredIn() ) ) &&
!pCNd->GetDoc()->IsInDtor() )
{
//Unregister from root if I'm still in turbo there.
- SwRootFrm *pRoot = getRootFrm();
+ SwRootFrame *pRoot = getRootFrame();
if( pRoot && pRoot->GetTurbo() == this )
{
pRoot->DisallowTurbo();
@@ -434,48 +434,48 @@ void SwContentFrm::DestroyImpl()
}
}
- SwFrm::DestroyImpl();
+ SwFrame::DestroyImpl();
}
-SwContentFrm::~SwContentFrm()
+SwContentFrame::~SwContentFrame()
{
}
-void SwContentFrm::RegisterToNode( SwContentNode& rNode )
+void SwContentFrame::RegisterToNode( SwContentNode& rNode )
{
rNode.Add( this );
}
-void SwLayoutFrm::DestroyImpl()
+void SwLayoutFrame::DestroyImpl()
{
- while (!m_VertPosOrientFrmsFor.empty())
+ while (!m_VertPosOrientFramesFor.empty())
{
- SwAnchoredObject *pObj = *m_VertPosOrientFrmsFor.begin();
- pObj->ClearVertPosOrientFrm();
+ SwAnchoredObject *pObj = *m_VertPosOrientFramesFor.begin();
+ pObj->ClearVertPosOrientFrame();
}
- assert(m_VertPosOrientFrmsFor.empty());
+ assert(m_VertPosOrientFramesFor.empty());
- SwFrm *pFrm = m_pLower;
+ SwFrame *pFrame = m_pLower;
if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() )
{
- while ( pFrm )
+ while ( pFrame )
{
- //First delete the Objs of the Frm because they can't unregister
+ //First delete the Objs of the Frame because they can't unregister
//from the page after remove.
//We don't want to create an endless loop only because one couldn't
//unregister.
- while ( pFrm->GetDrawObjs() && pFrm->GetDrawObjs()->size() )
+ while ( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() )
{
- const size_t nCnt = pFrm->GetDrawObjs()->size();
+ const size_t nCnt = pFrame->GetDrawObjs()->size();
// #i28701#
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[0];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0];
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj));
- assert(!pFrm->GetDrawObjs() || nCnt > pFrm->GetDrawObjs()->size());
+ SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
+ assert(!pFrame->GetDrawObjs() || nCnt > pFrame->GetDrawObjs()->size());
}
else
{
@@ -483,22 +483,22 @@ void SwLayoutFrm::DestroyImpl()
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
OSL_ENSURE( pContact,
- "<SwFrm::~SwFrm> - missing contact for drawing object" );
+ "<SwFrame::~SwFrame> - missing contact for drawing object" );
if ( pContact )
{
pContact->DisconnectObjFromLayout( pSdrObj );
}
- if ( pFrm->GetDrawObjs() &&
- nCnt == pFrm->GetDrawObjs()->size() )
+ if ( pFrame->GetDrawObjs() &&
+ nCnt == pFrame->GetDrawObjs()->size() )
{
- pFrm->GetDrawObjs()->Remove( *pAnchoredObj );
+ pFrame->GetDrawObjs()->Remove( *pAnchoredObj );
}
}
}
- pFrm->RemoveFromLayout();
- SwFrm::DestroyFrm(pFrm);
- pFrm = m_pLower;
+ pFrame->RemoveFromLayout();
+ SwFrame::DestroyFrame(pFrame);
+ pFrame = m_pLower;
}
//Delete the Flys, the last one also deletes the array.
while ( GetDrawObjs() && GetDrawObjs()->size() )
@@ -507,9 +507,9 @@ void SwLayoutFrm::DestroyImpl()
// #i28701#
SwAnchoredObject* pAnchoredObj = (*GetDrawObjs())[0];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFrm::DestroyFrm(static_cast<SwFlyFrm*>(pAnchoredObj));
+ SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
assert(!GetDrawObjs() || nCnt > GetDrawObjs()->size());
}
else
@@ -518,7 +518,7 @@ void SwLayoutFrm::DestroyImpl()
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
OSL_ENSURE( pContact,
- "<SwFrm::~SwFrm> - missing contact for drawing object" );
+ "<SwFrame::~SwFrame> - missing contact for drawing object" );
if ( pContact )
{
pContact->DisconnectObjFromLayout( pSdrObj );
@@ -533,18 +533,18 @@ void SwLayoutFrm::DestroyImpl()
}
else
{
- while( pFrm )
+ while( pFrame )
{
- SwFrm *pNxt = pFrm->GetNext();
- SwFrm::DestroyFrm(pFrm);
- pFrm = pNxt;
+ SwFrame *pNxt = pFrame->GetNext();
+ SwFrame::DestroyFrame(pFrame);
+ pFrame = pNxt;
}
}
- SwFrm::DestroyImpl();
+ SwFrame::DestroyImpl();
}
-SwLayoutFrm::~SwLayoutFrm()
+SwLayoutFrame::~SwLayoutFrame()
{
}
@@ -553,51 +553,51 @@ SwLayoutFrm::~SwLayoutFrm()
|* to be displayed. This region could be larger than the printarea (Prt())
|* of the upper, it includes e.g. often the margin of the page.
|*/
-const SwRect SwFrm::PaintArea() const
+const SwRect SwFrame::PaintArea() const
{
// NEW TABLES
// Cell frames may not leave their upper:
- SwRect aRect = IsRowFrm() ? GetUpper()->Frm() : Frm();
+ SwRect aRect = IsRowFrame() ? GetUpper()->Frame() : Frame();
const bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
long nRight = (aRect.*fnRect->fnGetRight)();
long nLeft = (aRect.*fnRect->fnGetLeft)();
- const SwFrm* pTmp = this;
+ const SwFrame* pTmp = this;
bool bLeft = true;
bool bRight = true;
long nRowSpan = 0;
while( pTmp )
{
- if( pTmp->IsCellFrm() && pTmp->GetUpper() &&
+ if( pTmp->IsCellFrame() && pTmp->GetUpper() &&
pTmp->GetUpper()->IsVertical() != pTmp->IsVertical() )
- nRowSpan = static_cast<const SwCellFrm*>(pTmp)->GetTabBox()->getRowSpan();
- long nTmpRight = (pTmp->Frm().*fnRect->fnGetRight)();
- long nTmpLeft = (pTmp->Frm().*fnRect->fnGetLeft)();
- if( pTmp->IsRowFrm() && nRowSpan > 1 )
+ nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan();
+ long nTmpRight = (pTmp->Frame().*fnRect->fnGetRight)();
+ long nTmpLeft = (pTmp->Frame().*fnRect->fnGetLeft)();
+ if( pTmp->IsRowFrame() && nRowSpan > 1 )
{
- const SwFrm* pNxt = pTmp;
+ const SwFrame* pNxt = pTmp;
while( --nRowSpan > 0 && pNxt->GetNext() )
pNxt = pNxt->GetNext();
if( pTmp->IsVertical() )
- nTmpLeft = (pNxt->Frm().*fnRect->fnGetLeft)();
+ nTmpLeft = (pNxt->Frame().*fnRect->fnGetLeft)();
else
- nTmpRight = (pNxt->Frm().*fnRect->fnGetRight)();
+ nTmpRight = (pNxt->Frame().*fnRect->fnGetRight)();
}
OSL_ENSURE( pTmp, "PaintArea lost in time and space" );
- if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() ||
- pTmp->IsCellFrm() || pTmp->IsRowFrm() || //nobody leaves a table!
- pTmp->IsRootFrm() )
+ if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() ||
+ pTmp->IsCellFrame() || pTmp->IsRowFrame() || //nobody leaves a table!
+ pTmp->IsRootFrame() )
{
if( bLeft || nLeft < nTmpLeft )
nLeft = nTmpLeft;
if( bRight || nTmpRight < nRight )
nRight = nTmpRight;
- if( pTmp->IsPageFrm() || pTmp->IsFlyFrm() || pTmp->IsRootFrm() )
+ if( pTmp->IsPageFrame() || pTmp->IsFlyFrame() || pTmp->IsRootFrame() )
break;
bLeft = false;
bRight = false;
}
- else if( pTmp->IsColumnFrm() ) // nobody enters neightbour columns
+ else if( pTmp->IsColumnFrame() ) // nobody enters neightbour columns
{
bool bR2L = pTmp->IsRightToLeft();
// the first column has _no_ influence to the left range
@@ -615,7 +615,7 @@ const SwRect SwFrm::PaintArea() const
bRight = false;
}
}
- else if( bVert && pTmp->IsBodyFrm() )
+ else if( bVert && pTmp->IsBodyFrame() )
{
// Header and footer frames have always horizontal direction and
// limit the body frame.
@@ -629,7 +629,7 @@ const SwRect SwFrm::PaintArea() const
bLeft = false;
}
if( pTmp->GetNext() &&
- ( pTmp->GetNext()->IsFooterFrm() || pTmp->GetNext()->GetNext() )
+ ( pTmp->GetNext()->IsFooterFrame() || pTmp->GetNext()->GetNext() )
&& ( bRight || nTmpRight < nRight ) )
{
nRight = nTmpRight;
@@ -644,15 +644,15 @@ const SwRect SwFrm::PaintArea() const
}
/**
-|* The unionframe is the framearea (Frm()) of a frame expanded by the
+|* The unionframe is the framearea (Frame()) of a frame expanded by the
|* printarea, if there's a negative margin at the left or right side.
|*/
-const SwRect SwFrm::UnionFrm( bool bBorder ) const
+const SwRect SwFrame::UnionFrame( bool bBorder ) const
{
bool bVert = IsVertical();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- long nLeft = (Frm().*fnRect->fnGetLeft)();
- long nWidth = (Frm().*fnRect->fnGetWidth)();
+ long nLeft = (Frame().*fnRect->fnGetLeft)();
+ long nWidth = (Frame().*fnRect->fnGetWidth)();
long nPrtLeft = (Prt().*fnRect->fnGetLeft)();
long nPrtWidth = (Prt().*fnRect->fnGetWidth)();
if( nPrtLeft + nPrtWidth > nWidth )
@@ -666,7 +666,7 @@ const SwRect SwFrm::UnionFrm( bool bBorder ) const
long nAdd = 0;
if( bBorder )
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
const SvxBoxItem &rBox = rAttrs.GetBox();
if ( rBox.GetLeft() )
@@ -684,14 +684,14 @@ const SwRect SwFrm::UnionFrm( bool bBorder ) const
nAdd += rShadow.CalcShadowSpace( SvxShadowItemSide::RIGHT );
}
}
- if( IsTextFrm() && static_cast<const SwTextFrm*>(this)->HasPara() )
+ if( IsTextFrame() && static_cast<const SwTextFrame*>(this)->HasPara() )
{
- long nTmp = static_cast<const SwTextFrm*>(this)->HangingMargin();
+ long nTmp = static_cast<const SwTextFrame*>(this)->HangingMargin();
if( nTmp > nAdd )
nAdd = nTmp;
}
nWidth = nRight + nAdd - nLeft;
- SwRect aRet( Frm() );
+ SwRect aRet( Frame() );
(aRet.*fnRect->fnSetPosX)( nLeft );
(aRet.*fnRect->fnSetWidth)( nWidth );
return aRet;
diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx
index ac71d89c2841..23f6de0e9b4e 100644
--- a/sw/source/core/layout/swselectionlist.cxx
+++ b/sw/source/core/layout/swselectionlist.cxx
@@ -30,49 +30,49 @@ namespace {
A context is the environment where text is allowed to flow.
The context is represented by
- - the SwRootFrm if the frame is part of a page body
- - the SwHeaderFrm if the frame is part of a page header
- - the SwFooterFrm if the frame is part of a page footer
- - the (master) SwFootnoteFrm if the frame is part of footnote
- - the (first) SwFlyFrm if the frame is part of a (linked) fly frame
+ - the SwRootFrame if the frame is part of a page body
+ - the SwHeaderFrame if the frame is part of a page header
+ - the SwFooterFrame if the frame is part of a page footer
+ - the (master) SwFootnoteFrame if the frame is part of footnote
+ - the (first) SwFlyFrame if the frame is part of a (linked) fly frame
- @param pFrm
+ @param pFrame
the given frame
- @return the context of the frame, represented by a SwFrm*
+ @return the context of the frame, represented by a SwFrame*
*/
- const SwFrm* getContext( const SwFrm* pFrm )
+ const SwFrame* getContext( const SwFrame* pFrame )
{
- while( pFrm )
+ while( pFrame )
{
- if( pFrm->IsRootFrm() || pFrm->IsHeaderFrm() || pFrm->IsFooterFrm() )
+ if( pFrame->IsRootFrame() || pFrame->IsHeaderFrame() || pFrame->IsFooterFrame() )
break;
- if( pFrm->IsFlyFrm() )
+ if( pFrame->IsFlyFrame() )
{
- const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>( pFrm );
+ const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>( pFrame );
while( pFly->GetPrevLink() )
pFly = pFly->GetPrevLink();
break;
}
- if( pFrm->IsFootnoteFrm() )
+ if( pFrame->IsFootnoteFrame() )
{
- const SwFootnoteFrm* pFootnote = static_cast<const SwFootnoteFrm*>( pFrm );
+ const SwFootnoteFrame* pFootnote = static_cast<const SwFootnoteFrame*>( pFrame );
while( pFootnote->GetMaster() )
pFootnote = pFootnote->GetMaster();
break;
}
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
}
- return pFrm;
+ return pFrame;
}
}
-SwSelectionList::SwSelectionList( const SwFrm* pInitCxt ) :
+SwSelectionList::SwSelectionList( const SwFrame* pInitCxt ) :
pContext( getContext( pInitCxt ) )
{
}
-bool SwSelectionList::checkContext( const SwFrm* pCheck )
+bool SwSelectionList::checkContext( const SwFrame* pCheck )
{
pCheck = getContext( pCheck );
if( !pContext )
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 495dab2e64f9..cea182f6360c 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -59,9 +59,9 @@
using namespace ::com::sun::star;
-SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib )
- : SwLayoutFrm( rTab.GetFrameFormat(), pSib )
- , SwFlowFrm( static_cast<SwFrm&>(*this) )
+SwTabFrame::SwTabFrame( SwTable &rTab, SwFrame* pSib )
+ : SwLayoutFrame( rTab.GetFrameFormat(), pSib )
+ , SwFlowFrame( static_cast<SwFrame&>(*this) )
, m_pTable( &rTab )
, m_bComplete(false)
, m_bCalcLowers(false)
@@ -78,28 +78,28 @@ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib )
, m_bInRecalcLowerRow(false)
{
mbFixSize = false; //Don't fall for import filter again.
- mnFrmType = FRM_TAB;
+ mnFrameType = FRM_TAB;
//Create the lines and insert them.
const SwTableLines &rLines = rTab.GetTabLines();
- SwFrm *pTmpPrev = nullptr;
+ SwFrame *pTmpPrev = nullptr;
for ( size_t i = 0; i < rLines.size(); ++i )
{
- SwRowFrm *pNew = new SwRowFrm( *rLines[i], this );
+ SwRowFrame *pNew = new SwRowFrame( *rLines[i], this );
if( pNew->Lower() )
{
pNew->InsertBehind( this, pTmpPrev );
pTmpPrev = pNew;
}
else
- SwFrm::DestroyFrm(pNew);
+ SwFrame::DestroyFrame(pNew);
}
- OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "SwTabFrm::SwTabFrm: No rows." );
+ OSL_ENSURE( Lower() && Lower()->IsRowFrame(), "SwTabFrame::SwTabFrame: No rows." );
}
-SwTabFrm::SwTabFrm( SwTabFrm &rTab )
- : SwLayoutFrm( rTab.GetFormat(), &rTab )
- , SwFlowFrm( static_cast<SwFrm&>(*this) )
+SwTabFrame::SwTabFrame( SwTabFrame &rTab )
+ : SwLayoutFrame( rTab.GetFormat(), &rTab )
+ , SwFlowFrame( static_cast<SwFrame&>(*this) )
, m_pTable( rTab.GetTable() )
, m_bComplete(false)
, m_bCalcLowers(false)
@@ -116,105 +116,105 @@ SwTabFrm::SwTabFrm( SwTabFrm &rTab )
, m_bInRecalcLowerRow(false)
{
mbFixSize = false; //Don't fall for import filter again.
- mnFrmType = FRM_TAB;
+ mnFrameType = FRM_TAB;
SetFollow( rTab.GetFollow() );
rTab.SetFollow( this );
}
extern const SwTable *g_pColumnCacheLastTable;
-extern const SwTabFrm *g_pColumnCacheLastTabFrm;
-extern const SwFrm *g_pColumnCacheLastCellFrm;
+extern const SwTabFrame *g_pColumnCacheLastTabFrame;
+extern const SwFrame *g_pColumnCacheLastCellFrame;
extern const SwTable *g_pRowCacheLastTable;
-extern const SwTabFrm *g_pRowCacheLastTabFrm;
-extern const SwFrm *g_pRowCacheLastCellFrm;
+extern const SwTabFrame *g_pRowCacheLastTabFrame;
+extern const SwFrame *g_pRowCacheLastCellFrame;
-//return the SwTabFrm (if any) that this SwTabFrm is a follow flow line for
-SwTabFrm* SwTabFrm::GetFollowFlowLineFor()
+//return the SwTabFrame (if any) that this SwTabFrame is a follow flow line for
+SwTabFrame* SwTabFrame::GetFollowFlowLineFor()
{
- SwFlowFrm *pPrec = GetPrecede();
- if (pPrec && pPrec->GetFrm().IsTabFrm())
+ SwFlowFrame *pPrec = GetPrecede();
+ if (pPrec && pPrec->GetFrame().IsTabFrame())
{
- SwTabFrm *pPrevTabFrm = static_cast<SwTabFrm*>(pPrec);
- assert(this == pPrevTabFrm->GetFollow());
- if (pPrevTabFrm->HasFollowFlowLine() && pPrevTabFrm->GetFollow() == this)
- return pPrevTabFrm;
+ SwTabFrame *pPrevTabFrame = static_cast<SwTabFrame*>(pPrec);
+ assert(this == pPrevTabFrame->GetFollow());
+ if (pPrevTabFrame->HasFollowFlowLine() && pPrevTabFrame->GetFollow() == this)
+ return pPrevTabFrame;
}
return nullptr;
}
-void SwTabFrm::DestroyImpl()
+void SwTabFrame::DestroyImpl()
{
//rhbz#907933, we are a follow flow line for something and have been
//deleted, remove ourself as a follow flowline
- SwTabFrm* pFlowFrameFor = GetFollowFlowLineFor();
+ SwTabFrame* pFlowFrameFor = GetFollowFlowLineFor();
if (pFlowFrameFor)
pFlowFrameFor->RemoveFollowFlowLine();
// There is some terrible code in fetab.cxx, that
// makes use of these global pointers. Obviously
- // this code did not consider that a TabFrm can be
+ // this code did not consider that a TabFrame can be
// deleted.
- if (this == g_pColumnCacheLastTabFrm)
+ if (this == g_pColumnCacheLastTabFrame)
{
g_pColumnCacheLastTable = nullptr;
- g_pColumnCacheLastTabFrm = nullptr;
- g_pColumnCacheLastCellFrm = nullptr;
+ g_pColumnCacheLastTabFrame = nullptr;
+ g_pColumnCacheLastCellFrame = nullptr;
g_pRowCacheLastTable = nullptr;
- g_pRowCacheLastTabFrm = nullptr;
- g_pRowCacheLastCellFrm = nullptr;
+ g_pRowCacheLastTabFrame = nullptr;
+ g_pRowCacheLastCellFrame = nullptr;
}
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwTabFrm::~SwTabFrm()
+SwTabFrame::~SwTabFrame()
{
}
-void SwTabFrm::JoinAndDelFollows()
+void SwTabFrame::JoinAndDelFollows()
{
- SwTabFrm *pFoll = GetFollow();
+ SwTabFrame *pFoll = GetFollow();
if ( pFoll->HasFollow() )
pFoll->JoinAndDelFollows();
pFoll->Cut();
SetFollow( pFoll->GetFollow() );
- SwFrm::DestroyFrm(pFoll);
+ SwFrame::DestroyFrame(pFoll);
}
-void SwTabFrm::RegistFlys()
+void SwTabFrame::RegistFlys()
{
- OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "No rows." );
+ OSL_ENSURE( Lower() && Lower()->IsRowFrame(), "No rows." );
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( pPage )
{
- SwRowFrm *pRow = static_cast<SwRowFrm*>(Lower());
+ SwRowFrame *pRow = static_cast<SwRowFrame*>(Lower());
do
{
pRow->RegistFlys( pPage );
- pRow = static_cast<SwRowFrm*>(pRow->GetNext());
+ pRow = static_cast<SwRowFrame*>(pRow->GetNext());
} while ( pRow );
}
}
-void SwInvalidateAll( SwFrm *pFrm, long nBottom );
-static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom );
-static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva );
+void SwInvalidateAll( SwFrame *pFrame, long nBottom );
+static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom );
+static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva );
// #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-static bool lcl_InnerCalcLayout( SwFrm *pFrm,
+static bool lcl_InnerCalcLayout( SwFrame *pFrame,
long nBottom,
bool _bOnlyRowsAndCells = false );
// OD 2004-02-18 #106629# - correct type of 1st parameter
// #i26945# - add parameter <_bConsiderObjs> in order to
// control, if floating screen objects have to be considered for the minimal
// cell height.
-static SwTwips lcl_CalcMinRowHeight( const SwRowFrm *pRow,
+static SwTwips lcl_CalcMinRowHeight( const SwRowFrame *pRow,
const bool _bConsiderObjs );
-static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm&, const SwBorderAttrs& );
+static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrame&, const SwBorderAttrs& );
-static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount )
+static SwTwips lcl_GetHeightOfRows( const SwFrame* pStart, long nCount )
{
if ( !nCount || !pStart)
return 0;
@@ -223,7 +223,7 @@ static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount )
SWRECTFN( pStart )
while ( pStart && nCount > 0 )
{
- nRet += (pStart->Frm().*fnRect->fnGetHeight)();
+ nRet += (pStart->Frame().*fnRect->fnGetHeight)();
pStart = pStart->GetNext();
--nCount;
}
@@ -232,15 +232,15 @@ static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount )
}
// Local helper function to insert a new follow flow line
-static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, bool bRowSpanLine )
+static SwRowFrame* lcl_InsertNewFollowFlowLine( SwTabFrame& rTab, const SwFrame& rTmpRow, bool bRowSpanLine )
{
- OSL_ENSURE( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" );
- const SwRowFrm& rRow = static_cast<const SwRowFrm&>(rTmpRow);
+ OSL_ENSURE( rTmpRow.IsRowFrame(), "No row frame to copy for FollowFlowLine" );
+ const SwRowFrame& rRow = static_cast<const SwRowFrame&>(rTmpRow);
rTab.SetFollowFlowLine( true );
- SwRowFrm *pFollowFlowLine = new SwRowFrm(*rRow.GetTabLine(), &rTab, false );
+ SwRowFrame *pFollowFlowLine = new SwRowFrame(*rRow.GetTabLine(), &rTab, false );
pFollowFlowLine->SetRowSpanLine( bRowSpanLine );
- SwFrm* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow();
+ SwFrame* pFirstRow = rTab.GetFollow()->GetFirstNonHeadlineRow();
pFollowFlowLine->InsertBefore( rTab.GetFollow(), pFirstRow );
return pFollowFlowLine;
}
@@ -248,36 +248,36 @@ static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpR
// #i26945# - local helper function to invalidate all lower
// objects. By parameter <_bMoveObjsOutOfRange> it can be controlled, if
// additionally the objects are moved 'out of range'.
-static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
+static void lcl_InvalidateLowerObjs( SwLayoutFrame& _rLayoutFrame,
const bool _bMoveObjsOutOfRange = false,
- SwPageFrm* _pPageFrm = nullptr )
+ SwPageFrame* _pPageFrame = nullptr )
{
// determine page frame, if needed
- if ( !_pPageFrm )
+ if ( !_pPageFrame )
{
- _pPageFrm = _rLayoutFrm.FindPageFrm();
- OSL_ENSURE( _pPageFrm,
+ _pPageFrame = _rLayoutFrame.FindPageFrame();
+ OSL_ENSURE( _pPageFrame,
"<lcl_InvalidateLowerObjs(..)> - missing page frame -> no move of lower objects out of range" );
- if ( !_pPageFrm )
+ if ( !_pPageFrame )
{
return;
}
}
// loop on lower frames
- SwFrm* pLowerFrm = _rLayoutFrm.Lower();
- while ( pLowerFrm )
+ SwFrame* pLowerFrame = _rLayoutFrame.Lower();
+ while ( pLowerFrame )
{
- if ( pLowerFrm->IsLayoutFrm() )
+ if ( pLowerFrame->IsLayoutFrame() )
{
- ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrm*>(pLowerFrm)),
- _bMoveObjsOutOfRange, _pPageFrm );
+ ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrame*>(pLowerFrame)),
+ _bMoveObjsOutOfRange, _pPageFrame );
}
- if ( pLowerFrm->GetDrawObjs() )
+ if ( pLowerFrame->GetDrawObjs() )
{
- for ( size_t i = 0; i < pLowerFrm->GetDrawObjs()->size(); ++i )
+ for ( size_t i = 0; i < pLowerFrame->GetDrawObjs()->size(); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pLowerFrm->GetDrawObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*pLowerFrame->GetDrawObjs())[i];
// invalidate position of anchored object
pAnchoredObj->SetTmpConsiderWrapInfluence( false );
@@ -292,7 +292,7 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
// modification of the anchored object resp. its attributes
// due to the movement
SwObjPositioningInProgress aObjPosInProgress( *pAnchoredObj );
- pAnchoredObj->SetObjLeft( _pPageFrm->Frm().Right() );
+ pAnchoredObj->SetObjLeft( _pPageFrame->Frame().Right() );
// #115759# - reset character rectangle,
// top of line and relative position in order to assure,
// that anchored object is correctly positioned.
@@ -301,41 +301,41 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm,
if ( pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
== FLY_AS_CHAR )
{
- pAnchoredObj->AnchorFrm()
+ pAnchoredObj->AnchorFrame()
->Prepare( PREP_FLY_ATTR_CHG,
&(pAnchoredObj->GetFrameFormat()) );
}
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
pFly->GetVirtDrawObj()->SetRectsDirty();
pFly->GetVirtDrawObj()->SetChanged();
}
}
// If anchored object is a fly frame, invalidate its lower objects
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- ::lcl_InvalidateLowerObjs( *pFly, _bMoveObjsOutOfRange, _pPageFrm );
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ ::lcl_InvalidateLowerObjs( *pFly, _bMoveObjsOutOfRange, _pPageFrame );
}
}
}
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
}
// Local helper function to shrink all lowers of rRow to 0 height
-static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
+static void lcl_ShrinkCellsAndAllContent( SwRowFrame& rRow )
{
- SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rRow.Lower());
+ SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rRow.Lower());
SWRECTFN( pCurrMasterCell )
while ( pCurrMasterCell )
{
// NEW TABLES
- SwCellFrm& rToAdjust = pCurrMasterCell->GetTabBox()->getRowSpan() < 1 ?
- const_cast<SwCellFrm&>(pCurrMasterCell->FindStartEndOfRowSpanCell( true, true )) :
+ SwCellFrame& rToAdjust = pCurrMasterCell->GetTabBox()->getRowSpan() < 1 ?
+ const_cast<SwCellFrame&>(pCurrMasterCell->FindStartEndOfRowSpanCell( true, true )) :
*pCurrMasterCell;
// #i26945#
@@ -346,11 +346,11 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
// TODO: Optimize number of frames which are set to 0 height
// we have to start with the last lower frame, otherwise
// the shrink will not shrink the current cell
- SwFrm* pTmp = rToAdjust.GetLastLower();
+ SwFrame* pTmp = rToAdjust.GetLastLower();
- if ( pTmp && pTmp->IsRowFrm() )
+ if ( pTmp && pTmp->IsRowFrame() )
{
- SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pTmp);
+ SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pTmp);
lcl_ShrinkCellsAndAllContent( *pTmpRow );
}
else
@@ -359,18 +359,18 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
while ( pTmp )
{
// the frames have to be shrunk
- if ( pTmp->IsTabFrm() )
+ if ( pTmp->IsTabFrame() )
{
- SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(static_cast<SwTabFrm*>(pTmp)->Lower());
+ SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(static_cast<SwTabFrame*>(pTmp)->Lower());
while ( pTmpRow )
{
lcl_ShrinkCellsAndAllContent( *pTmpRow );
- pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetNext());
+ pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext());
}
}
else
{
- pTmp->Shrink( (pTmp->Frm().*fnRect->fnGetHeight)() );
+ pTmp->Shrink( (pTmp->Frame().*fnRect->fnGetHeight)() );
(pTmp->Prt().*fnRect->fnSetTop)( 0 );
(pTmp->Prt().*fnRect->fnSetHeight)( 0 );
}
@@ -384,44 +384,44 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow )
false );
}
- pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext());
+ pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext());
}
}
// Local helper function to move the content from rSourceLine to rDestLine
// The content is inserted behind the last content in the corresponding
// cell in rDestLine.
-static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine )
+static void lcl_MoveRowContent( SwRowFrame& rSourceLine, SwRowFrame& rDestLine )
{
- SwCellFrm* pCurrDestCell = static_cast<SwCellFrm*>(rDestLine.Lower());
- SwCellFrm* pCurrSourceCell = static_cast<SwCellFrm*>(rSourceLine.Lower());
+ SwCellFrame* pCurrDestCell = static_cast<SwCellFrame*>(rDestLine.Lower());
+ SwCellFrame* pCurrSourceCell = static_cast<SwCellFrame*>(rSourceLine.Lower());
// Move content of follow cells into master cells
while ( pCurrSourceCell )
{
- if ( pCurrSourceCell->Lower() && pCurrSourceCell->Lower()->IsRowFrm() )
+ if ( pCurrSourceCell->Lower() && pCurrSourceCell->Lower()->IsRowFrame() )
{
- SwRowFrm* pTmpSourceRow = static_cast<SwRowFrm*>(pCurrSourceCell->Lower());
+ SwRowFrame* pTmpSourceRow = static_cast<SwRowFrame*>(pCurrSourceCell->Lower());
while ( pTmpSourceRow )
{
// #125926# Achtung! It is possible,
// that pTmpSourceRow->IsFollowFlowRow() but pTmpDestRow
// cannot be found. In this case, we have to move the complete
// row.
- SwRowFrm* pTmpDestRow = static_cast<SwRowFrm*>(pCurrDestCell->Lower());
+ SwRowFrame* pTmpDestRow = static_cast<SwRowFrame*>(pCurrDestCell->Lower());
if ( pTmpSourceRow->IsFollowFlowRow() && pTmpDestRow )
{
// move content from follow flow row to pTmpDestRow:
while ( pTmpDestRow->GetNext() )
- pTmpDestRow = static_cast<SwRowFrm*>(pTmpDestRow->GetNext());
+ pTmpDestRow = static_cast<SwRowFrame*>(pTmpDestRow->GetNext());
OSL_ENSURE( pTmpDestRow->GetFollowRow() == pTmpSourceRow, "Table contains node" );
lcl_MoveRowContent( *pTmpSourceRow, *pTmpDestRow );
pTmpDestRow->SetFollowRow( pTmpSourceRow->GetFollowRow() );
pTmpSourceRow->RemoveFromLayout();
- SwFrm::DestroyFrm(pTmpSourceRow);
+ SwFrame::DestroyFrame(pTmpSourceRow);
}
else
{
@@ -430,57 +430,57 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine )
pTmpSourceRow->InsertBefore( pCurrDestCell, nullptr );
}
- pTmpSourceRow = static_cast<SwRowFrm*>(pCurrSourceCell->Lower());
+ pTmpSourceRow = static_cast<SwRowFrame*>(pCurrSourceCell->Lower());
}
}
else
{
- SwFrm *pTmp = ::SaveContent( pCurrSourceCell );
+ SwFrame *pTmp = ::SaveContent( pCurrSourceCell );
if ( pTmp )
{
// NEW TABLES
- SwCellFrm* pDestCell = static_cast<SwCellFrm*>(pCurrDestCell);
+ SwCellFrame* pDestCell = static_cast<SwCellFrame*>(pCurrDestCell);
if ( pDestCell->GetTabBox()->getRowSpan() < 1 )
- pDestCell = & const_cast<SwCellFrm&>(pDestCell->FindStartEndOfRowSpanCell( true, true ));
+ pDestCell = & const_cast<SwCellFrame&>(pDestCell->FindStartEndOfRowSpanCell( true, true ));
// Find last content
- SwFrm* pFrm = pDestCell->GetLastLower();
- ::RestoreContent( pTmp, pDestCell, pFrm, true );
+ SwFrame* pFrame = pDestCell->GetLastLower();
+ ::RestoreContent( pTmp, pDestCell, pFrame, true );
}
}
- pCurrDestCell = static_cast<SwCellFrm*>(pCurrDestCell->GetNext());
- pCurrSourceCell = static_cast<SwCellFrm*>(pCurrSourceCell->GetNext());
+ pCurrDestCell = static_cast<SwCellFrame*>(pCurrDestCell->GetNext());
+ pCurrSourceCell = static_cast<SwCellFrame*>(pCurrSourceCell->GetNext());
}
}
-// Local helper function to move all footnotes in rRowFrm from
+// Local helper function to move all footnotes in rRowFrame from
// the footnote boss of rSource to the footnote boss of rDest.
-static void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& rRowFrm )
+static void lcl_MoveFootnotes( SwTabFrame& rSource, SwTabFrame& rDest, SwLayoutFrame& rRowFrame )
{
if ( !rSource.GetFormat()->GetDoc()->GetFootnoteIdxs().empty() )
{
- SwFootnoteBossFrm* pOldBoss = rSource.FindFootnoteBossFrm( true );
- SwFootnoteBossFrm* pNewBoss = rDest.FindFootnoteBossFrm( true );
- rRowFrm.MoveLowerFootnotes( nullptr, pOldBoss, pNewBoss, true );
+ SwFootnoteBossFrame* pOldBoss = rSource.FindFootnoteBossFrame( true );
+ SwFootnoteBossFrame* pNewBoss = rDest.FindFootnoteBossFrame( true );
+ rRowFrame.MoveLowerFootnotes( nullptr, pOldBoss, pNewBoss, true );
}
}
// Local helper function to handle nested table cells before the split process
-static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
- SwRowFrm& rFollowFlowLine, SwTwips nRemain )
+static void lcl_PreprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine,
+ SwRowFrame& rFollowFlowLine, SwTwips nRemain )
{
- SwCellFrm* pCurrLastLineCell = static_cast<SwCellFrm*>(rLastLine.Lower());
- SwCellFrm* pCurrFollowFlowLineCell = static_cast<SwCellFrm*>(rFollowFlowLine.Lower());
+ SwCellFrame* pCurrLastLineCell = static_cast<SwCellFrame*>(rLastLine.Lower());
+ SwCellFrame* pCurrFollowFlowLineCell = static_cast<SwCellFrame*>(rFollowFlowLine.Lower());
SWRECTFN( pCurrLastLineCell )
// Move content of follow cells into master cells
while ( pCurrLastLineCell )
{
- if ( pCurrLastLineCell->Lower() && pCurrLastLineCell->Lower()->IsRowFrm() )
+ if ( pCurrLastLineCell->Lower() && pCurrLastLineCell->Lower()->IsRowFrame() )
{
SwTwips nTmpCut = nRemain;
- SwRowFrm* pTmpLastLineRow = static_cast<SwRowFrm*>(pCurrLastLineCell->Lower());
+ SwRowFrame* pTmpLastLineRow = static_cast<SwRowFrame*>(pCurrLastLineCell->Lower());
// #i26945#
SwTwips nCurrentHeight =
@@ -489,7 +489,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
while ( pTmpLastLineRow->GetNext() && nTmpCut > nCurrentHeight )
{
nTmpCut -= nCurrentHeight;
- pTmpLastLineRow = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
+ pTmpLastLineRow = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext());
// #i26945#
nCurrentHeight =
lcl_CalcMinRowHeight( pTmpLastLineRow,
@@ -499,7 +499,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
// pTmpLastLineRow does not fit to the line or it is the last line
// Check if we can move pTmpLastLineRow to the follow table,
// or if we have to split the line:
- SwFrm* pCell = pTmpLastLineRow->Lower();
+ SwFrame* pCell = pTmpLastLineRow->Lower();
bool bTableLayoutToComplex = false;
long nMinHeight = 0;
@@ -508,25 +508,25 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
// 2. The borders of the cells inside the row
// 3. The minimum height of the row
if ( pTmpLastLineRow->HasFixSize() )
- nMinHeight = (pTmpLastLineRow->Frm().*fnRect->fnGetHeight)();
+ nMinHeight = (pTmpLastLineRow->Frame().*fnRect->fnGetHeight)();
else
{
while ( pCell )
{
- if ( static_cast<SwCellFrm*>(pCell)->Lower() &&
- static_cast<SwCellFrm*>(pCell)->Lower()->IsRowFrm() )
+ if ( static_cast<SwCellFrame*>(pCell)->Lower() &&
+ static_cast<SwCellFrame*>(pCell)->Lower()->IsRowFrame() )
{
bTableLayoutToComplex = true;
break;
}
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCell );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
- nMinHeight = std::max( nMinHeight, lcl_CalcTopAndBottomMargin( *static_cast<SwLayoutFrm*>(pCell), rAttrs ) );
+ nMinHeight = std::max( nMinHeight, lcl_CalcTopAndBottomMargin( *static_cast<SwLayoutFrame*>(pCell), rAttrs ) );
pCell = pCell->GetNext();
}
- const SwFormatFrmSize &rSz = pTmpLastLineRow->GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = pTmpLastLineRow->GetFormat()->GetFrameSize();
if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE )
nMinHeight = std::max( nMinHeight, rSz.GetHeight() );
}
@@ -544,75 +544,75 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine,
!bTableLayoutToComplex && nMinHeight < nTmpCut ) )
{
// The line has to be split:
- SwRowFrm* pNewRow = new SwRowFrm( *pTmpLastLineRow->GetTabLine(), &rTab, false );
+ SwRowFrame* pNewRow = new SwRowFrame( *pTmpLastLineRow->GetTabLine(), &rTab, false );
pNewRow->SetFollowFlowRow( true );
pNewRow->SetFollowRow( pTmpLastLineRow->GetFollowRow() );
pTmpLastLineRow->SetFollowRow( pNewRow );
pNewRow->InsertBehind( pCurrFollowFlowLineCell, nullptr );
- pTmpLastLineRow = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
+ pTmpLastLineRow = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext());
}
// The following lines have to be moved:
while ( pTmpLastLineRow )
{
- SwRowFrm* pTmp = static_cast<SwRowFrm*>(pTmpLastLineRow->GetNext());
+ SwRowFrame* pTmp = static_cast<SwRowFrame*>(pTmpLastLineRow->GetNext());
lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pTmpLastLineRow );
pTmpLastLineRow->RemoveFromLayout();
pTmpLastLineRow->InsertBefore( pCurrFollowFlowLineCell, nullptr );
- pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
- pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frm().*fnRect->fnGetHeight)() );
+ pTmpLastLineRow->Shrink( ( pTmpLastLineRow->Frame().*fnRect->fnGetHeight)() );
+ pCurrFollowFlowLineCell->Grow( ( pTmpLastLineRow->Frame().*fnRect->fnGetHeight)() );
pTmpLastLineRow = pTmp;
}
}
- pCurrLastLineCell = static_cast<SwCellFrm*>(pCurrLastLineCell->GetNext());
- pCurrFollowFlowLineCell = static_cast<SwCellFrm*>(pCurrFollowFlowLineCell->GetNext());
+ pCurrLastLineCell = static_cast<SwCellFrame*>(pCurrLastLineCell->GetNext());
+ pCurrFollowFlowLineCell = static_cast<SwCellFrame*>(pCurrFollowFlowLineCell->GetNext());
}
}
// Local helper function to handle nested table cells after the split process
-static void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine )
+static void lcl_PostprocessRowsInCells( SwTabFrame& rTab, SwRowFrame& rLastLine )
{
- SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rLastLine.Lower());
+ SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rLastLine.Lower());
while ( pCurrMasterCell )
{
if ( pCurrMasterCell->Lower() &&
- pCurrMasterCell->Lower()->IsRowFrm() )
+ pCurrMasterCell->Lower()->IsRowFrame() )
{
- SwRowFrm* pRowFrm = static_cast<SwRowFrm*>(pCurrMasterCell->GetLastLower());
+ SwRowFrame* pRowFrame = static_cast<SwRowFrame*>(pCurrMasterCell->GetLastLower());
- if ( nullptr != pRowFrm->GetPrev() && !pRowFrm->ContainsContent() )
+ if ( nullptr != pRowFrame->GetPrev() && !pRowFrame->ContainsContent() )
{
- OSL_ENSURE( pRowFrm->GetFollowRow(), "Deleting row frame without follow" );
+ OSL_ENSURE( pRowFrame->GetFollowRow(), "Deleting row frame without follow" );
// The footnotes have to be moved:
- lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pRowFrm );
- pRowFrm->Cut();
- SwRowFrm* pFollowRow = pRowFrm->GetFollowRow();
- pRowFrm->Paste( pFollowRow->GetUpper(), pFollowRow );
- pRowFrm->SetFollowRow( pFollowRow->GetFollowRow() );
- lcl_MoveRowContent( *pFollowRow, *pRowFrm );
+ lcl_MoveFootnotes( rTab, *rTab.GetFollow(), *pRowFrame );
+ pRowFrame->Cut();
+ SwRowFrame* pFollowRow = pRowFrame->GetFollowRow();
+ pRowFrame->Paste( pFollowRow->GetUpper(), pFollowRow );
+ pRowFrame->SetFollowRow( pFollowRow->GetFollowRow() );
+ lcl_MoveRowContent( *pFollowRow, *pRowFrame );
pFollowRow->Cut();
- SwFrm::DestroyFrm(pFollowRow);
+ SwFrame::DestroyFrame(pFollowRow);
::SwInvalidateAll( pCurrMasterCell, LONG_MAX );
}
}
- pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext());
+ pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext());
}
}
// Local helper function to re-calculate the split line.
-inline void TableSplitRecalcLock( SwFlowFrm *pTab ) { pTab->LockJoin(); }
-inline void TableSplitRecalcUnlock( SwFlowFrm *pTab ) { pTab->UnlockJoin(); }
+inline void TableSplitRecalcLock( SwFlowFrame *pTab ) { pTab->LockJoin(); }
+inline void TableSplitRecalcUnlock( SwFlowFrame *pTab ) { pTab->UnlockJoin(); }
-static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
+static bool lcl_RecalcSplitLine( SwRowFrame& rLastLine, SwRowFrame& rFollowLine,
SwTwips nRemainingSpaceForLastRow )
{
bool bRet = true;
- vcl::RenderContext* pRenderContext = rLastLine.getRootFrm()->GetCurrShell()->GetOut();
- SwTabFrm& rTab = static_cast<SwTabFrm&>(*rLastLine.GetUpper());
+ vcl::RenderContext* pRenderContext = rLastLine.getRootFrame()->GetCurrShell()->GetOut();
+ SwTabFrame& rTab = static_cast<SwTabFrame&>(*rLastLine.GetUpper());
// If there are nested cells in rLastLine, the recalculation of the last
// line needs some preprocessing.
@@ -642,7 +642,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
// Lock this tab frame and its follow
bool bUnlockMaster = false;
bool bUnlockFollow = false;
- SwTabFrm* pMaster = rTab.IsFollow() ? rTab.FindMaster() : nullptr;
+ SwTabFrame* pMaster = rTab.IsFollow() ? rTab.FindMaster() : nullptr;
if ( pMaster && !pMaster->IsJoinLocked() )
{
bUnlockMaster = true;
@@ -680,7 +680,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
// 1. Check if table fits to its upper.
// #i26945# - include check, if objects fit
const SwTwips nDistanceToUpperPrtBottom =
- (rTab.Frm().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)());
+ (rTab.Frame().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)());
if ( nDistanceToUpperPrtBottom < 0 || !rTab.DoesObjsFit() )
bRet = false;
@@ -691,7 +691,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
{
if ( !rLastLine.IsInFollowFlowRow() )
{
- SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rLastLine.Lower());
+ SwCellFrame* pCurrMasterCell = static_cast<SwCellFrame*>(rLastLine.Lower());
while ( pCurrMasterCell )
{
if ( !pCurrMasterCell->ContainsContent() && pCurrMasterCell->GetTabBox()->getRowSpan() >= 1 )
@@ -699,7 +699,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
bRet = false;
break;
}
- pCurrMasterCell = static_cast<SwCellFrm*>(pCurrMasterCell->GetNext());
+ pCurrMasterCell = static_cast<SwCellFrame*>(pCurrMasterCell->GetNext());
}
}
}
@@ -744,39 +744,39 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine,
}
// Sets the correct height for all spanned cells
-static void lcl_AdjustRowSpanCells( SwRowFrm* pRow )
+static void lcl_AdjustRowSpanCells( SwRowFrame* pRow )
{
SWRECTFN( pRow )
- SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(pRow->GetLower());
- while ( pCellFrm )
+ SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pRow->GetLower());
+ while ( pCellFrame )
{
- const long nLayoutRowSpan = pCellFrm->GetLayoutRowSpan();
+ const long nLayoutRowSpan = pCellFrame->GetLayoutRowSpan();
if ( nLayoutRowSpan > 1 )
{
// calculate height of cell:
const long nNewCellHeight = lcl_GetHeightOfRows( pRow, nLayoutRowSpan );
- const long nDiff = nNewCellHeight - (pCellFrm->Frm().*fnRect->fnGetHeight)();
+ const long nDiff = nNewCellHeight - (pCellFrame->Frame().*fnRect->fnGetHeight)();
if ( nDiff )
- (pCellFrm->Frm().*fnRect->fnAddBottom)( nDiff );
+ (pCellFrame->Frame().*fnRect->fnAddBottom)( nDiff );
}
- pCellFrm = static_cast<SwCellFrm*>(pCellFrm->GetNext());
+ pCellFrame = static_cast<SwCellFrame*>(pCellFrame->GetNext());
}
}
// Returns the maximum layout row span of the row
// Looking for the next row that contains no covered cells:
-static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow )
+static long lcl_GetMaximumLayoutRowSpan( const SwRowFrame& rRow )
{
long nRet = 1;
- const SwRowFrm* pCurrentRowFrm = static_cast<const SwRowFrm*>(rRow.GetNext());
+ const SwRowFrame* pCurrentRowFrame = static_cast<const SwRowFrame*>(rRow.GetNext());
bool bNextRow = false;
- while ( pCurrentRowFrm )
+ while ( pCurrentRowFrame )
{
// if there is any covered cell, we proceed to the next row frame
- const SwCellFrm* pLower = static_cast<const SwCellFrm*>( pCurrentRowFrm->Lower());
+ const SwCellFrame* pLower = static_cast<const SwCellFrame*>( pCurrentRowFrame->Lower());
while ( pLower )
{
if ( pLower->GetTabBox()->getRowSpan() < 0 )
@@ -785,10 +785,10 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow )
bNextRow = true;
break;
}
- pLower = static_cast<const SwCellFrm*>(pLower->GetNext());
+ pLower = static_cast<const SwCellFrame*>(pLower->GetNext());
}
- pCurrentRowFrm = bNextRow ?
- static_cast<const SwRowFrm*>(pCurrentRowFrm->GetNext() ) :
+ pCurrentRowFrame = bNextRow ?
+ static_cast<const SwRowFrame*>(pCurrentRowFrame->GetNext() ) :
nullptr;
}
@@ -798,20 +798,20 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow )
// Function to remove the FollowFlowLine of rTab.
// The content of the FollowFlowLine is moved to the associated line in the
// master table.
-bool SwTabFrm::RemoveFollowFlowLine()
+bool SwTabFrame::RemoveFollowFlowLine()
{
// find FollowFlowLine
- SwRowFrm* pFollowFlowLine = static_cast<SwRowFrm*>(GetFollow()->GetFirstNonHeadlineRow());
+ SwRowFrame* pFollowFlowLine = static_cast<SwRowFrame*>(GetFollow()->GetFirstNonHeadlineRow());
// find last row in master
- SwFrm* pLastLine = GetLastLower();
+ SwFrame* pLastLine = GetLastLower();
OSL_ENSURE( HasFollowFlowLine() &&
pFollowFlowLine &&
pLastLine, "There should be a flowline in the follow" );
// We have to reset the flag here, because lcl_MoveRowContent
- // calls a GrowFrm(), which has a different bahavior if
+ // calls a GrowFrame(), which has a different bahavior if
// this flag is set.
SetFollowFlowLine( false );
@@ -820,7 +820,7 @@ bool SwTabFrm::RemoveFollowFlowLine()
return true;
// Move content
- lcl_MoveRowContent( *pFollowFlowLine, *static_cast<SwRowFrm*>(pLastLine) );
+ lcl_MoveRowContent( *pFollowFlowLine, *static_cast<SwRowFrame*>(pLastLine) );
// NEW TABLES
// If a row span follow flow line is removed, we want to move the whole span
@@ -830,17 +830,17 @@ bool SwTabFrm::RemoveFollowFlowLine()
if ( nRowsToMove > 1 )
{
SWRECTFN( this )
- SwFrm* pRow = pFollowFlowLine->GetNext();
- SwFrm* pInsertBehind = GetLastLower();
+ SwFrame* pRow = pFollowFlowLine->GetNext();
+ SwFrame* pInsertBehind = GetLastLower();
SwTwips nGrow = 0;
while ( pRow && nRowsToMove-- > 1 )
{
- SwFrm* pNxt = pRow->GetNext();
- nGrow += (pRow->Frm().*fnRect->fnGetHeight)();
+ SwFrame* pNxt = pRow->GetNext();
+ nGrow += (pRow->Frame().*fnRect->fnGetHeight)();
// The footnotes have to be moved:
- lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrm&>(*pRow) );
+ lcl_MoveFootnotes( *GetFollow(), *this, static_cast<SwRowFrame&>(*pRow) );
pRow->RemoveFromLayout();
pRow->InsertBehind( this, pInsertBehind );
@@ -850,10 +850,10 @@ bool SwTabFrm::RemoveFollowFlowLine()
pRow = pNxt;
}
- SwFrm* pFirstRow = Lower();
+ SwFrame* pFirstRow = Lower();
while ( pFirstRow )
{
- lcl_AdjustRowSpanCells( static_cast<SwRowFrm*>(pFirstRow) );
+ lcl_AdjustRowSpanCells( static_cast<SwRowFrame*>(pFirstRow) );
pFirstRow = pFirstRow->GetNext();
}
@@ -863,45 +863,45 @@ bool SwTabFrm::RemoveFollowFlowLine()
bool bJoin = !pFollowFlowLine->GetNext();
pFollowFlowLine->Cut();
- SwFrm::DestroyFrm(pFollowFlowLine);
+ SwFrame::DestroyFrame(pFollowFlowLine);
return bJoin;
}
// #i26945# - Floating screen objects are no longer searched.
-static bool lcl_FindSectionsInRow( const SwRowFrm& rRow )
+static bool lcl_FindSectionsInRow( const SwRowFrame& rRow )
{
bool bRet = false;
- const SwCellFrm* pLower = static_cast<const SwCellFrm*>(rRow.Lower());
+ const SwCellFrame* pLower = static_cast<const SwCellFrame*>(rRow.Lower());
while ( pLower )
{
if ( pLower->IsVertical() != rRow.IsVertical() )
return true;
- const SwFrm* pTmpFrm = pLower->Lower();
- while ( pTmpFrm )
+ const SwFrame* pTmpFrame = pLower->Lower();
+ while ( pTmpFrame )
{
- if ( pTmpFrm->IsRowFrm() )
+ if ( pTmpFrame->IsRowFrame() )
{
- bRet = lcl_FindSectionsInRow( *static_cast<const SwRowFrm*>(pTmpFrm) );
+ bRet = lcl_FindSectionsInRow( *static_cast<const SwRowFrame*>(pTmpFrame) );
}
else
{
// #i26945# - search only for sections
- bRet = pTmpFrm->IsSctFrm();
+ bRet = pTmpFrame->IsSctFrame();
}
if ( bRet )
return true;
- pTmpFrm = pTmpFrm->GetNext();
+ pTmpFrame = pTmpFrame->GetNext();
}
- pLower = static_cast<const SwCellFrm*>(pLower->GetNext());
+ pLower = static_cast<const SwCellFrame*>(pLower->GetNext());
}
return bRet;
}
-bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep )
+bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep )
{
bool bRet = true;
@@ -918,7 +918,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
//In order to be able to compare the positions of the cells whit CutPos,
//they have to be calculated consecutively starting from the table.
//They can definitely be invalid because of position changes of the table.
- SwRowFrm *pRow = static_cast<SwRowFrm*>(Lower());
+ SwRowFrame *pRow = static_cast<SwRowFrame*>(Lower());
if( !pRow )
return bRet;
@@ -926,21 +926,21 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
sal_uInt16 nRowCount = 0; // pRow currently points to the first row
SwTwips nRemainingSpaceForLastRow =
- (*fnRect->fnYDiff)( nCutPos, (Frm().*fnRect->fnGetTop)() );
+ (*fnRect->fnYDiff)( nCutPos, (Frame().*fnRect->fnGetTop)() );
nRemainingSpaceForLastRow -= (this->*fnRect->fnGetTopMargin)();
// Make pRow point to the line that does not fit anymore:
while( pRow->GetNext() &&
- nRemainingSpaceForLastRow >= ( (pRow->Frm().*fnRect->fnGetHeight)() +
+ nRemainingSpaceForLastRow >= ( (pRow->Frame().*fnRect->fnGetHeight)() +
(IsCollapsingBorders() ?
pRow->GetBottomLineSize() :
0 ) ) )
{
if( bTryToSplit || !pRow->IsRowSpanLine() ||
- 0 != (pRow->Frm().*fnRect->fnGetHeight)() )
+ 0 != (pRow->Frame().*fnRect->fnGetHeight)() )
++nRowCount;
- nRemainingSpaceForLastRow -= (pRow->Frm().*fnRect->fnGetHeight)();
- pRow = static_cast<SwRowFrm*>(pRow->GetNext());
+ nRemainingSpaceForLastRow -= (pRow->Frame().*fnRect->fnGetHeight)();
+ pRow = static_cast<SwRowFrame*>(pRow->GetNext());
}
// bSplitRowAllowed: Row may be split according to its attributes.
@@ -984,21 +984,21 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
{
// Check if there are (first) rows inside this row,
// which are not allowed to be split.
- SwCellFrm* pLowerCell = static_cast<SwCellFrm*>(pRow->Lower());
+ SwCellFrame* pLowerCell = static_cast<SwCellFrame*>(pRow->Lower());
while ( pLowerCell )
{
- if ( pLowerCell->Lower() && pLowerCell->Lower()->IsRowFrm() )
+ if ( pLowerCell->Lower() && pLowerCell->Lower()->IsRowFrame() )
{
- const SwRowFrm* pLowerRow = static_cast<SwRowFrm*>(pLowerCell->Lower());
+ const SwRowFrame* pLowerRow = static_cast<SwRowFrame*>(pLowerCell->Lower());
if ( !pLowerRow->IsRowSplitAllowed() &&
- (pLowerRow->Frm().*fnRect->fnGetHeight)() >
+ (pLowerRow->Frame().*fnRect->fnGetHeight)() >
nRemainingSpaceForLastRow )
{
bKeepNextRow = true;
break;
}
}
- pLowerCell = static_cast<SwCellFrm*>(pLowerCell->GetNext());
+ pLowerCell = static_cast<SwCellFrame*>(pLowerCell->GetNext());
}
}
else
@@ -1009,11 +1009,11 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
if ( bKeepNextRow )
{
pRow = GetFirstNonHeadlineRow();
- if( pRow && pRow->IsRowSpanLine() && 0 == (pRow->Frm().*fnRect->fnGetHeight)() )
- pRow = static_cast<SwRowFrm*>(pRow->GetNext());
+ if( pRow && pRow->IsRowSpanLine() && 0 == (pRow->Frame().*fnRect->fnGetHeight)() )
+ pRow = static_cast<SwRowFrame*>(pRow->GetNext());
if ( pRow )
{
- pRow = static_cast<SwRowFrm*>(pRow->GetNext());
+ pRow = static_cast<SwRowFrame*>(pRow->GetNext());
++nRowCount;
}
}
@@ -1033,14 +1033,14 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// Adjust pRow according to the keep-with-next attribute:
if ( !bSplitRowAllowed && bTableRowKeep )
{
- SwRowFrm* pTmpRow = static_cast<SwRowFrm*>(pRow->GetPrev());
- SwRowFrm* pOldRow = pRow;
+ SwRowFrame* pTmpRow = static_cast<SwRowFrame*>(pRow->GetPrev());
+ SwRowFrame* pOldRow = pRow;
while ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() &&
nRowCount > nRepeat )
{
pRow = pTmpRow;
--nRowCount;
- pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetPrev());
+ pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetPrev());
}
// loop prevention
@@ -1055,16 +1055,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// false, indicating an error
if ( !bSplitRowAllowed )
{
- SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
+ SwRowFrame* pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
if ( pRow == pFirstNonHeadlineRow )
return false;
// #i91764#
// Ignore row span lines
- SwRowFrm* pTmpRow = pFirstNonHeadlineRow;
+ SwRowFrame* pTmpRow = pFirstNonHeadlineRow;
while ( pTmpRow && pTmpRow->IsRowSpanLine() )
{
- pTmpRow = static_cast<SwRowFrm*>(pTmpRow->GetNext());
+ pTmpRow = static_cast<SwRowFrame*>(pTmpRow->GetNext());
}
if ( !pTmpRow || pRow == pTmpRow )
{
@@ -1074,7 +1074,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// Build follow table if not already done:
bool bNewFollow;
- SwTabFrm *pFoll;
+ SwTabFrame *pFoll;
if ( GetFollow() )
{
pFoll = GetFollow();
@@ -1083,12 +1083,12 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
else
{
bNewFollow = true;
- pFoll = new SwTabFrm( *this );
+ pFoll = new SwTabFrame( *this );
// We give the follow table an initial width.
- (pFoll->Frm().*fnRect->fnAddWidth)( (Frm().*fnRect->fnGetWidth)() );
+ (pFoll->Frame().*fnRect->fnAddWidth)( (Frame().*fnRect->fnGetWidth)() );
(pFoll->Prt().*fnRect->fnAddWidth)( (Prt().*fnRect->fnGetWidth)() );
- (pFoll->Frm().*fnRect->fnSetLeft)( (Frm().*fnRect->fnGetLeft)() );
+ (pFoll->Frame().*fnRect->fnSetLeft)( (Frame().*fnRect->fnGetLeft)() );
// Insert the new follow table
pFoll->InsertBehind( GetUpper(), this );
@@ -1098,32 +1098,32 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
{
// Insert new headlines:
bDontCreateObjects = true; //frmtool
- SwRowFrm* pHeadline = new SwRowFrm(
+ SwRowFrame* pHeadline = new SwRowFrame(
*GetTable()->GetTabLines()[ nRowCount ], this );
pHeadline->SetRepeatedHeadline( true );
bDontCreateObjects = false;
pHeadline->InsertBefore( pFoll, nullptr );
- SwPageFrm *pPage = pHeadline->FindPageFrm();
+ SwPageFrame *pPage = pHeadline->FindPageFrame();
const SwFrameFormats *pTable = GetFormat()->GetDoc()->GetSpzFrameFormats();
if( !pTable->empty() )
{
sal_uLong nIndex;
- SwContentFrm* pFrm = pHeadline->ContainsContent();
- while( pFrm )
+ SwContentFrame* pFrame = pHeadline->ContainsContent();
+ while( pFrame )
{
- nIndex = pFrm->GetNode()->GetIndex();
- AppendObjs( pTable, nIndex, pFrm, pPage, GetFormat()->GetDoc());
- pFrm = pFrm->GetNextContentFrm();
- if( !pHeadline->IsAnLower( pFrm ) )
+ nIndex = pFrame->GetNode()->GetIndex();
+ AppendObjs( pTable, nIndex, pFrame, pPage, GetFormat()->GetDoc());
+ pFrame = pFrame->GetNextContentFrame();
+ if( !pHeadline->IsAnLower( pFrame ) )
break;
}
}
}
}
- SwRowFrm* pLastRow = nullptr; // will point to the last remaining line in master
- SwRowFrm* pFollowRow = nullptr; // points to either the follow flow line of the
+ SwRowFrame* pLastRow = nullptr; // will point to the last remaining line in master
+ SwRowFrame* pFollowRow = nullptr; // points to either the follow flow line of the
// first regular line in the follow
if ( bSplitRowAllowed )
@@ -1131,7 +1131,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// If the row that does not fit anymore is allowed
// to be split, the next row has to be moved to the follow table.
pLastRow = pRow;
- pRow = static_cast<SwRowFrm*>(pRow->GetNext());
+ pRow = static_cast<SwRowFrame*>(pRow->GetNext());
// new follow flow line for last row of master table
pFollowRow = lcl_InsertNewFollowFlowLine( *this, *pLastRow, false );
@@ -1143,16 +1143,16 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
// NEW TABLES
// check if we will break a row span by moving pFollowRow to the follow:
// In this case we want to reformat the last line.
- const SwCellFrm* pCellFrm = static_cast<const SwCellFrm*>(pFollowRow->GetLower());
- while ( pCellFrm )
+ const SwCellFrame* pCellFrame = static_cast<const SwCellFrame*>(pFollowRow->GetLower());
+ while ( pCellFrame )
{
- if ( pCellFrm->GetTabBox()->getRowSpan() < 1 )
+ if ( pCellFrame->GetTabBox()->getRowSpan() < 1 )
{
- pLastRow = static_cast<SwRowFrm*>(pRow->GetPrev());
+ pLastRow = static_cast<SwRowFrame*>(pRow->GetPrev());
break;
}
- pCellFrm = static_cast<const SwCellFrm*>(pCellFrm->GetNext());
+ pCellFrame = static_cast<const SwCellFrame*>(pCellFrame->GetNext());
}
// new follow flow line for last row of master table
@@ -1167,31 +1167,31 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
//such situations).
if ( bNewFollow )
{
- SwFrm* pInsertBehind = pFoll->GetLastLower();
+ SwFrame* pInsertBehind = pFoll->GetLastLower();
while ( pRow )
{
- SwFrm* pNxt = pRow->GetNext();
- nRet += (pRow->Frm().*fnRect->fnGetHeight)();
+ SwFrame* pNxt = pRow->GetNext();
+ nRet += (pRow->Frame().*fnRect->fnGetHeight)();
// The footnotes do not have to be moved, this is done in the
// MoveFwd of the follow table!!!
pRow->RemoveFromLayout();
pRow->InsertBehind( pFoll, pInsertBehind );
pRow->_InvalidateAll();
pInsertBehind = pRow;
- pRow = static_cast<SwRowFrm*>(pNxt);
+ pRow = static_cast<SwRowFrame*>(pNxt);
}
}
else
{
- SwFrm* pPasteBefore = HasFollowFlowLine() ?
+ SwFrame* pPasteBefore = HasFollowFlowLine() ?
pFollowRow->GetNext() :
pFoll->GetFirstNonHeadlineRow();
while ( pRow )
{
- SwFrm* pNxt = pRow->GetNext();
- nRet += (pRow->Frm().*fnRect->fnGetHeight)();
+ SwFrame* pNxt = pRow->GetNext();
+ nRet += (pRow->Frame().*fnRect->fnGetHeight)();
// The footnotes have to be moved:
lcl_MoveFootnotes( *this, *GetFollow(), *pRow );
@@ -1200,7 +1200,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
pRow->Paste( pFoll, pPasteBefore );
pRow->CheckDirChange();
- pRow = static_cast<SwRowFrm*>(pNxt);
+ pRow = static_cast<SwRowFrame*>(pNxt);
}
}
@@ -1227,28 +1227,28 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee
return bRet;
}
-bool SwTabFrm::Join()
+bool SwTabFrame::Join()
{
OSL_ENSURE( !HasFollowFlowLine(), "Joining follow flow line" );
- SwTabFrm *pFoll = GetFollow();
+ SwTabFrame *pFoll = GetFollow();
if ( !pFoll->IsJoinLocked() )
{
SWRECTFN( this )
pFoll->Cut(); //Cut out first to avoid unnecessary notifications.
- SwFrm *pRow = pFoll->GetFirstNonHeadlineRow(),
+ SwFrame *pRow = pFoll->GetFirstNonHeadlineRow(),
*pNxt;
- SwFrm* pPrv = GetLastLower();
+ SwFrame* pPrv = GetLastLower();
SwTwips nHeight = 0; //Total height of the inserted rows as return value.
while ( pRow )
{
pNxt = pRow->GetNext();
- nHeight += (pRow->Frm().*fnRect->fnGetHeight)();
+ nHeight += (pRow->Frame().*fnRect->fnGetHeight)();
pRow->RemoveFromLayout();
pRow->_InvalidateAll();
pRow->InsertBehind( this, pPrv );
@@ -1259,7 +1259,7 @@ bool SwTabFrm::Join()
SetFollow( pFoll->GetFollow() );
SetFollowFlowLine( pFoll->HasFollowFlowLine() );
- SwFrm::DestroyFrm(pFoll);
+ SwFrame::DestroyFrame(pFoll);
Grow( nHeight );
}
@@ -1267,49 +1267,49 @@ bool SwTabFrm::Join()
return true;
}
-void SwInvalidatePositions( SwFrm *pFrm, long nBottom )
+void SwInvalidatePositions( SwFrame *pFrame, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
- SWRECTFN( pFrm )
+ SWRECTFN( pFrame )
do
- { pFrm->_InvalidatePos();
- pFrm->_InvalidateSize();
- if( pFrm->IsLayoutFrm() )
+ { pFrame->_InvalidatePos();
+ pFrame->_InvalidateSize();
+ if( pFrame->IsLayoutFrame() )
{
- if ( static_cast<SwLayoutFrm*>(pFrm)->Lower() )
+ if ( static_cast<SwLayoutFrame*>(pFrame)->Lower() )
{
- ::SwInvalidatePositions( static_cast<SwLayoutFrm*>(pFrm)->Lower(), nBottom);
+ ::SwInvalidatePositions( static_cast<SwLayoutFrame*>(pFrame)->Lower(), nBottom);
// #i26945#
- ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrm*>(pFrm)) );
+ ::lcl_InvalidateLowerObjs( *(static_cast<SwLayoutFrame*>(pFrame)) );
}
}
else
- pFrm->Prepare( PREP_ADJUST_FRM );
- pFrm = pFrm->GetNext();
- } while ( pFrm &&
+ pFrame->Prepare( PREP_ADJUST_FRM );
+ pFrame = pFrame->GetNext();
+ } while ( pFrame &&
( bAll ||
- (*fnRect->fnYDiff)( (pFrm->Frm().*fnRect->fnGetTop)(), nBottom ) < 0 ) );
+ (*fnRect->fnYDiff)( (pFrame->Frame().*fnRect->fnGetTop)(), nBottom ) < 0 ) );
}
-void SwInvalidateAll( SwFrm *pFrm, long nBottom )
+void SwInvalidateAll( SwFrame *pFrame, long nBottom )
{
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
- SWRECTFN( pFrm )
+ SWRECTFN( pFrame )
do
{
- pFrm->_InvalidatePos();
- pFrm->_InvalidateSize();
- pFrm->_InvalidatePrt();
- if( pFrm->IsLayoutFrm() )
+ pFrame->_InvalidatePos();
+ pFrame->_InvalidateSize();
+ pFrame->_InvalidatePrt();
+ if( pFrame->IsLayoutFrame() )
{
// NEW TABLES
- SwLayoutFrm* pToInvalidate = static_cast<SwLayoutFrm*>(pFrm);
- SwCellFrm* pThisCell = dynamic_cast<SwCellFrm*>(pFrm);
+ SwLayoutFrame* pToInvalidate = static_cast<SwLayoutFrame*>(pFrame);
+ SwCellFrame* pThisCell = dynamic_cast<SwCellFrame*>(pFrame);
if ( pThisCell && pThisCell->GetTabBox()->getRowSpan() < 1 )
{
- pToInvalidate = & const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( true, true ));
+ pToInvalidate = & const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( true, true ));
pToInvalidate->_InvalidatePos();
pToInvalidate->_InvalidateSize();
pToInvalidate->_InvalidatePrt();
@@ -1319,49 +1319,49 @@ void SwInvalidateAll( SwFrm *pFrm, long nBottom )
::SwInvalidateAll( pToInvalidate->Lower(), nBottom);
}
else
- pFrm->Prepare();
+ pFrame->Prepare();
- pFrm = pFrm->GetNext();
- } while ( pFrm &&
+ pFrame = pFrame->GetNext();
+ } while ( pFrame &&
( bAll ||
- (*fnRect->fnYDiff)( (pFrm->Frm().*fnRect->fnGetTop)(), nBottom ) < 0 ) );
+ (*fnRect->fnYDiff)( (pFrame->Frame().*fnRect->fnGetTop)(), nBottom ) < 0 ) );
}
// #i29550#
-static void lcl_InvalidateAllLowersPrt( SwLayoutFrm* pLayFrm )
+static void lcl_InvalidateAllLowersPrt( SwLayoutFrame* pLayFrame )
{
- pLayFrm->_InvalidatePrt();
- pLayFrm->_InvalidateSize();
- pLayFrm->SetCompletePaint();
+ pLayFrame->_InvalidatePrt();
+ pLayFrame->_InvalidateSize();
+ pLayFrame->SetCompletePaint();
- SwFrm* pFrm = pLayFrm->Lower();
+ SwFrame* pFrame = pLayFrame->Lower();
- while ( pFrm )
+ while ( pFrame )
{
- if ( pFrm->IsLayoutFrm() )
- lcl_InvalidateAllLowersPrt( static_cast<SwLayoutFrm*>(pFrm) );
+ if ( pFrame->IsLayoutFrame() )
+ lcl_InvalidateAllLowersPrt( static_cast<SwLayoutFrame*>(pFrame) );
else
{
- pFrm->_InvalidatePrt();
- pFrm->_InvalidateSize();
- pFrm->SetCompletePaint();
+ pFrame->_InvalidatePrt();
+ pFrame->_InvalidateSize();
+ pFrame->SetCompletePaint();
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
}
-bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave,
+bool SwContentFrame::CalcLowers( SwLayoutFrame* pLay, const SwLayoutFrame* pDontLeave,
long nBottom, bool bSkipRowSpanCells )
{
if ( !pLay )
return true;
- vcl::RenderContext* pRenderContext = pLay->getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = pLay->getRootFrame()->GetCurrShell()->GetOut();
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
bool bRet = false;
- SwContentFrm *pCnt = pLay->ContainsContent();
+ SwContentFrame *pCnt = pLay->ContainsContent();
SWRECTFN( pLay )
// FME 2007-08-30 #i81146# new loop control
@@ -1373,20 +1373,20 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave,
{
// #115759# - check, if a format of content frame is
// possible. Thus, 'copy' conditions, found at the beginning of
- // <SwContentFrm::MakeAll(..)>, and check these.
+ // <SwContentFrame::MakeAll(..)>, and check these.
const bool bFormatPossible = !pCnt->IsJoinLocked() &&
- ( !pCnt->IsTextFrm() ||
- !static_cast<SwTextFrm*>(pCnt)->IsLocked() ) &&
+ ( !pCnt->IsTextFrame() ||
+ !static_cast<SwTextFrame*>(pCnt)->IsLocked() ) &&
( pCnt->IsFollow() || !StackHack::IsLocked() );
// NEW TABLES
bool bSkipContent = false;
if ( bSkipRowSpanCells && pCnt->IsInTab() )
{
- const SwFrm* pCell = pCnt->GetUpper();
- while ( pCell && !pCell->IsCellFrm() )
+ const SwFrame* pCell = pCnt->GetUpper();
+ while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
- if ( pCell && 1 != static_cast<const SwCellFrm*>( pCell )->GetLayoutRowSpan() )
+ if ( pCell && 1 != static_cast<const SwCellFrame*>( pCell )->GetLayoutRowSpan() )
bSkipContent = true;
}
@@ -1395,22 +1395,22 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave,
bRet |= !pCnt->IsValid();
// #i26945# - no extra invalidation of floating
// screen objects needed.
- // Thus, delete call of method <SwFrm::InvalidateObjs( true )>
+ // Thus, delete call of method <SwFrame::InvalidateObjs( true )>
pCnt->Calc(pRenderContext);
- // OD 2004-05-11 #i28701# - usage of new method <::FormatObjsAtFrm(..)>
+ // OD 2004-05-11 #i28701# - usage of new method <::FormatObjsAtFrame(..)>
// to format the floating screen objects
// #i46941# - frame has to be valid
// Note: frame could be invalid after calling its format, if it's locked.
- OSL_ENSURE( !pCnt->IsTextFrm() ||
+ OSL_ENSURE( !pCnt->IsTextFrame() ||
pCnt->IsValid() ||
- static_cast<SwTextFrm*>(pCnt)->IsJoinLocked(),
- "<SwContentFrm::CalcLowers(..)> - text frame invalid and not locked." );
- if ( pCnt->IsTextFrm() && pCnt->IsValid() )
+ static_cast<SwTextFrame*>(pCnt)->IsJoinLocked(),
+ "<SwContentFrame::CalcLowers(..)> - text frame invalid and not locked." );
+ if ( pCnt->IsTextFrame() && pCnt->IsValid() )
{
// #i23129#, #i36347# - pass correct page frame to
// the object formatter
- if ( !SwObjectFormatter::FormatObjsAtFrm( *pCnt,
- *(pCnt->FindPageFrm()) ) )
+ if ( !SwObjectFormatter::FormatObjsAtFrame( *pCnt,
+ *(pCnt->FindPageFrame()) ) )
{
if ( pCnt->GetRegisteredIn() == pLoopControlCond )
++nLoopControlRuns;
@@ -1428,66 +1428,66 @@ bool SwContentFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave,
}
#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "LoopControl in SwContentFrm::CalcLowers" );
+ OSL_FAIL( "LoopControl in SwContentFrame::CalcLowers" );
#endif
}
}
pCnt->GetUpper()->Calc(pRenderContext);
}
- if( ! bAll && (*fnRect->fnYDiff)((pCnt->Frm().*fnRect->fnGetTop)(), nBottom) > 0 )
+ if( ! bAll && (*fnRect->fnYDiff)((pCnt->Frame().*fnRect->fnGetTop)(), nBottom) > 0 )
break;
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
return bRet;
}
// #i26945# - add parameter <_bOnlyRowsAndCells> to control
// that only row and cell frames are formatted.
-static bool lcl_InnerCalcLayout( SwFrm *pFrm,
+static bool lcl_InnerCalcLayout( SwFrame *pFrame,
long nBottom,
bool _bOnlyRowsAndCells )
{
- vcl::RenderContext* pRenderContext = pFrm->getRootFrm()->GetCurrShell() ? pFrm->getRootFrm()->GetCurrShell()->GetOut() : nullptr;
+ vcl::RenderContext* pRenderContext = pFrame->getRootFrame()->GetCurrShell() ? pFrame->getRootFrame()->GetCurrShell()->GetOut() : nullptr;
// LONG_MAX == nBottom means we have to calculate all
bool bAll = LONG_MAX == nBottom;
bool bRet = false;
- const SwFrm* pOldUp = pFrm->GetUpper();
- SWRECTFN( pFrm )
+ const SwFrame* pOldUp = pFrame->GetUpper();
+ SWRECTFN( pFrame )
do
{
// #i26945# - parameter <_bOnlyRowsAndCells> controls,
// if only row and cell frames are formatted.
- if ( pFrm->IsLayoutFrm() &&
- ( !_bOnlyRowsAndCells || pFrm->IsRowFrm() || pFrm->IsCellFrm() ) )
+ if ( pFrame->IsLayoutFrame() &&
+ ( !_bOnlyRowsAndCells || pFrame->IsRowFrame() || pFrame->IsCellFrame() ) )
{
// #130744# An invalid locked table frame will
// not be calculated => It will not become valid =>
// Loop in lcl_RecalcRow(). Therefore we do not consider them for bRet.
- bRet |= !pFrm->IsValid() && ( !pFrm->IsTabFrm() || !static_cast<SwTabFrm*>(pFrm)->IsJoinLocked() );
- pFrm->Calc(pRenderContext);
- if( static_cast<SwLayoutFrm*>(pFrm)->Lower() )
- bRet |= lcl_InnerCalcLayout( static_cast<SwLayoutFrm*>(pFrm)->Lower(), nBottom);
+ bRet |= !pFrame->IsValid() && ( !pFrame->IsTabFrame() || !static_cast<SwTabFrame*>(pFrame)->IsJoinLocked() );
+ pFrame->Calc(pRenderContext);
+ if( static_cast<SwLayoutFrame*>(pFrame)->Lower() )
+ bRet |= lcl_InnerCalcLayout( static_cast<SwLayoutFrame*>(pFrame)->Lower(), nBottom);
// NEW TABLES
- SwCellFrm* pThisCell = dynamic_cast<SwCellFrm*>(pFrm);
+ SwCellFrame* pThisCell = dynamic_cast<SwCellFrame*>(pFrame);
if ( pThisCell && pThisCell->GetTabBox()->getRowSpan() < 1 )
{
- SwCellFrm& rToCalc = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( true, true ));
+ SwCellFrame& rToCalc = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( true, true ));
bRet |= !rToCalc.IsValid();
rToCalc.Calc(pRenderContext);
if ( rToCalc.Lower() )
bRet |= lcl_InnerCalcLayout( rToCalc.Lower(), nBottom);
}
}
- pFrm = pFrm->GetNext();
- } while( pFrm &&
+ pFrame = pFrame->GetNext();
+ } while( pFrame &&
( bAll ||
- (*fnRect->fnYDiff)((pFrm->Frm().*fnRect->fnGetTop)(), nBottom) < 0 )
- && pFrm->GetUpper() == pOldUp );
+ (*fnRect->fnYDiff)((pFrame->Frame().*fnRect->fnGetTop)(), nBottom) < 0 )
+ && pFrame->GetUpper() == pOldUp );
return bRet;
}
-static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
+static void lcl_RecalcRow( SwRowFrame& rRow, long nBottom )
{
// FME 2007-08-30 #i81146# new loop control
int nLoopControlRuns_1 = 0;
@@ -1523,29 +1523,29 @@ static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
{
// #115759# - force another format of the
// lowers, if at least one of it was invalid.
- bCheck = SwContentFrm::CalcLowers( &rRow, rRow.GetUpper(), nBottom, true );
+ bCheck = SwContentFrame::CalcLowers( &rRow, rRow.GetUpper(), nBottom, true );
// NEW TABLES
// First we calculate the cells with row span of < 1, afterwards
// all cells with row span of > 1:
for ( int i = 0; i < 2; ++i )
{
- SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(rRow.Lower());
- while ( pCellFrm )
+ SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(rRow.Lower());
+ while ( pCellFrame )
{
const bool bCalc = 0 == i ?
- pCellFrm->GetLayoutRowSpan() < 1 :
- pCellFrm->GetLayoutRowSpan() > 1;
+ pCellFrame->GetLayoutRowSpan() < 1 :
+ pCellFrame->GetLayoutRowSpan() > 1;
if ( bCalc )
{
- SwCellFrm& rToRecalc = 0 == i ?
- const_cast<SwCellFrm&>(pCellFrm->FindStartEndOfRowSpanCell( true, true )) :
- *pCellFrm;
- bCheck |= SwContentFrm::CalcLowers( &rToRecalc, &rToRecalc, nBottom, false );
+ SwCellFrame& rToRecalc = 0 == i ?
+ const_cast<SwCellFrame&>(pCellFrame->FindStartEndOfRowSpanCell( true, true )) :
+ *pCellFrame;
+ bCheck |= SwContentFrame::CalcLowers( &rToRecalc, &rToRecalc, nBottom, false );
}
- pCellFrm = static_cast<SwCellFrm*>(pCellFrm->GetNext());
+ pCellFrame = static_cast<SwCellFrame*>(pCellFrame->GetNext());
}
}
@@ -1571,37 +1571,37 @@ static void lcl_RecalcRow( SwRowFrm& rRow, long nBottom )
} while( true );
}
-static void lcl_RecalcTable( SwTabFrm& rTab,
- SwLayoutFrm *pFirstRow,
+static void lcl_RecalcTable( SwTabFrame& rTab,
+ SwLayoutFrame *pFirstRow,
SwLayNotify &rNotify )
{
if ( rTab.Lower() )
{
if ( !pFirstRow )
{
- pFirstRow = static_cast<SwLayoutFrm*>(rTab.Lower());
+ pFirstRow = static_cast<SwLayoutFrame*>(rTab.Lower());
rNotify.SetLowersComplete( true );
}
::SwInvalidatePositions( pFirstRow, LONG_MAX );
- lcl_RecalcRow( static_cast<SwRowFrm&>(*pFirstRow), LONG_MAX );
+ lcl_RecalcRow( static_cast<SwRowFrame&>(*pFirstRow), LONG_MAX );
}
}
// This is a new function to check the first condition whether
// a tab frame may move backward. It replaces the formerly used
// GetIndPrev(), which did not work correctly for #i5947#
-static bool lcl_NoPrev( const SwFrm& rFrm )
+static bool lcl_NoPrev( const SwFrame& rFrame )
{
// #i79774#
// skip empty sections on investigation of direct previous frame.
// use information, that at least one empty section is skipped in the following code.
bool bSkippedDirectPrevEmptySection( false );
- if ( rFrm.GetPrev() )
+ if ( rFrame.GetPrev() )
{
- const SwFrm* pPrev( rFrm.GetPrev() );
+ const SwFrame* pPrev( rFrame.GetPrev() );
while ( pPrev &&
- pPrev->IsSctFrm() &&
- !dynamic_cast<const SwSectionFrm&>(*pPrev).GetSection() )
+ pPrev->IsSctFrame() &&
+ !dynamic_cast<const SwSectionFrame&>(*pPrev).GetSection() )
{
pPrev = pPrev->GetPrev();
bSkippedDirectPrevEmptySection = true;
@@ -1612,9 +1612,9 @@ static bool lcl_NoPrev( const SwFrm& rFrm )
}
}
- if ( ( !bSkippedDirectPrevEmptySection && !rFrm.GetIndPrev() ) ||
+ if ( ( !bSkippedDirectPrevEmptySection && !rFrame.GetIndPrev() ) ||
( bSkippedDirectPrevEmptySection &&
- ( !rFrm.IsInSct() || !rFrm._GetIndPrev() ) ) )
+ ( !rFrame.IsInSct() || !rFrame._GetIndPrev() ) ) )
{
return true;
}
@@ -1622,13 +1622,13 @@ static bool lcl_NoPrev( const SwFrm& rFrm )
// I do not have a direct prev, but I have an indirect prev.
// In section frames I have to check if I'm located inside
// the first column:
- if ( rFrm.IsInSct() )
+ if ( rFrame.IsInSct() )
{
- const SwFrm* pSct = rFrm.GetUpper();
- if ( pSct && pSct->IsColBodyFrm() &&
- pSct->GetUpper()->GetUpper()->IsSctFrm() )
+ const SwFrame* pSct = rFrame.GetUpper();
+ if ( pSct && pSct->IsColBodyFrame() &&
+ pSct->GetUpper()->GetUpper()->IsSctFrame() )
{
- const SwFrm* pPrevCol = rFrm.GetUpper()->GetUpper()->GetPrev();
+ const SwFrame* pPrevCol = rFrame.GetUpper()->GetUpper()->GetPrev();
if ( pPrevCol )
// I'm not inside the first column and do not have a direct
// prev. I can try to go backward.
@@ -1645,32 +1645,32 @@ static bool lcl_NoPrev( const SwFrm& rFrm )
// a table frame and format it to assure keep attribute.
// method return true, if a next content frame is formatted.
// Precondition: The given table frame hasn't a follow and isn't a follow.
-SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm )
+SwFrame* sw_FormatNextContentForKeep( SwTabFrame* pTabFrame )
{
- vcl::RenderContext* pRenderContext = pTabFrm->getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = pTabFrame->getRootFrame()->GetCurrShell()->GetOut();
// find next content, table or section
- SwFrm* pNxt = pTabFrm->FindNext();
+ SwFrame* pNxt = pTabFrame->FindNext();
// skip empty sections
- while ( pNxt && pNxt->IsSctFrm() &&
- !static_cast<SwSectionFrm*>(pNxt)->GetSection() )
+ while ( pNxt && pNxt->IsSctFrame() &&
+ !static_cast<SwSectionFrame*>(pNxt)->GetSection() )
{
pNxt = pNxt->FindNext();
}
// if found next frame is a section, get its first content.
- if ( pNxt && pNxt->IsSctFrm() )
+ if ( pNxt && pNxt->IsSctFrame() )
{
- pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny();
+ pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny();
}
// format found next frame.
- // if table frame is inside another table, method <SwFrm::MakeAll()> is
+ // if table frame is inside another table, method <SwFrame::MakeAll()> is
// called to avoid that the superior table frame is formatted.
if ( pNxt )
{
- if ( pTabFrm->GetUpper()->IsInTab() )
- pNxt->MakeAll(pNxt->getRootFrm()->GetCurrShell()->GetOut());
+ if ( pTabFrame->GetUpper()->IsInTab() )
+ pNxt->MakeAll(pNxt->getRootFrame()->GetCurrShell()->GetOut());
else
pNxt->Calc(pRenderContext);
}
@@ -1679,32 +1679,32 @@ SwFrm* sw_FormatNextContentForKeep( SwTabFrm* pTabFrm )
}
namespace {
- bool AreAllRowsKeepWithNext( const SwRowFrm* pFirstRowFrm )
+ bool AreAllRowsKeepWithNext( const SwRowFrame* pFirstRowFrame )
{
- bool bRet = pFirstRowFrm != nullptr &&
- pFirstRowFrm->ShouldRowKeepWithNext();
+ bool bRet = pFirstRowFrame != nullptr &&
+ pFirstRowFrame->ShouldRowKeepWithNext();
- while ( bRet && pFirstRowFrm->GetNext() != nullptr )
+ while ( bRet && pFirstRowFrame->GetNext() != nullptr )
{
- pFirstRowFrm = dynamic_cast<const SwRowFrm*>(pFirstRowFrm->GetNext());
- bRet = pFirstRowFrm != nullptr &&
- pFirstRowFrm->ShouldRowKeepWithNext();
+ pFirstRowFrame = dynamic_cast<const SwRowFrame*>(pFirstRowFrame->GetNext());
+ bRet = pFirstRowFrame != nullptr &&
+ pFirstRowFrame->ShouldRowKeepWithNext();
}
return bRet;
}
}
-void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
+void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 )
return;
if ( HasFollow() )
{
- SwTabFrm* pFollowFrm = GetFollow();
- OSL_ENSURE( !pFollowFrm->IsJoinLocked() || !pFollowFrm->IsRebuildLastLine(),
- "SwTabFrm::MakeAll for master while follow is in RebuildLastLine()" );
- if ( pFollowFrm->IsJoinLocked() && pFollowFrm->IsRebuildLastLine() )
+ SwTabFrame* pFollowFrame = GetFollow();
+ OSL_ENSURE( !pFollowFrame->IsJoinLocked() || !pFollowFrame->IsRebuildLastLine(),
+ "SwTabFrame::MakeAll for master while follow is in RebuildLastLine()" );
+ if ( pFollowFrame->IsJoinLocked() && pFollowFrame->IsRebuildLastLine() )
return;
}
@@ -1746,22 +1746,22 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout )
m_bCalcLowers = pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ) );
+ pLayout->GetBrowseWidthByTabFrame( *this ) );
}
// as long as bMakePage is true, a new page can be created (exactly once)
bool bMakePage = true;
// bMovedBwd gets set to true when the frame flows backwards
bool bMovedBwd = false;
- // as long as bMovedFwd is false, the Frm may flow backwards (until
+ // as long as bMovedFwd is false, the Frame may flow backwards (until
// it has been moved forward once)
bool bMovedFwd = false;
- // gets set to true when the Frm is split
+ // gets set to true when the Frame is split
bool bSplit = false;
const bool bFootnotesInDoc = !GetFormat()->GetDoc()->GetFootnoteIdxs().empty();
const bool bFly = IsInFly();
- auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ auto pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
const SwBorderAttrs *pAttrs = pAccess->Get();
// The beloved keep attribute
@@ -1819,7 +1819,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// Join follow table, if last row of this table should keep:
if ( bTableRowKeep && GetFollow() && !GetFollow()->IsJoinLocked() )
{
- const SwRowFrm* pTmpRow = static_cast<const SwRowFrm*>(GetLastLower());
+ const SwRowFrame* pTmpRow = static_cast<const SwRowFrame*>(GetLastLower());
if ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() )
{
if ( HasFollowFlowLine() )
@@ -1829,10 +1829,10 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
}
// a new one is moved forwards immediately
- if ( !Frm().Top() && IsFollow() )
+ if ( !Frame().Top() && IsFollow() )
{
- SwFrm *pPre = GetPrev();
- if ( pPre && pPre->IsTabFrm() && static_cast<SwTabFrm*>(pPre)->GetFollow() == this)
+ SwFrame *pPre = GetPrev();
+ if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this)
{
if ( !MoveFwd( bMakePage, false ) )
bMakePage = false;
@@ -1857,27 +1857,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
bSplit = false;
}
- Point aOldPos( (Frm().*fnRect->fnGetPos)() );
+ Point aOldPos( (Frame().*fnRect->fnGetPos)() );
MakePos();
- if ( aOldPos != (Frm().*fnRect->fnGetPos)() )
+ if ( aOldPos != (Frame().*fnRect->fnGetPos)() )
{
- if ( aOldPos.Y() != (Frm().*fnRect->fnGetTop)() )
+ if ( aOldPos.Y() != (Frame().*fnRect->fnGetTop)() )
{
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if( pLayout )
{
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ) );
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pLayout->GetBrowseWidthByTabFrame( *this ) );
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
mbValidPrtArea = false;
aNotify.SetLowersComplete( false );
}
- SwFrm *pPre;
+ SwFrame *pPre;
if ( bKeep || (nullptr != (pPre = FindPrev()) &&
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
@@ -1894,27 +1894,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
long n1StLineHeight = 0;
if ( IsFollow() )
{
- SwFrm* pFrm = GetFirstNonHeadlineRow();
- if ( pFrm )
- n1StLineHeight = (pFrm->Frm().*fnRect->fnGetHeight)();
+ SwFrame* pFrame = GetFirstNonHeadlineRow();
+ if ( pFrame )
+ n1StLineHeight = (pFrame->Frame().*fnRect->fnGetHeight)();
}
if ( !mbValidSize || !mbValidPrtArea )
{
const long nOldPrtWidth = (Prt().*fnRect->fnGetWidth)();
- const long nOldFrmWidth = (Frm().*fnRect->fnGetWidth)();
+ const long nOldFrameWidth = (Frame().*fnRect->fnGetWidth)();
const Point aOldPrtPos = (Prt().*fnRect->fnGetPos)();
- Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
+ Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
if ( pLayout &&
((Prt().*fnRect->fnGetWidth)() != nOldPrtWidth ||
- (Frm().*fnRect->fnGetWidth)() != nOldFrmWidth) )
+ (Frame().*fnRect->fnGetWidth)() != nOldFrameWidth) )
{
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
- pLayout->GetBrowseWidthByTabFrm( *this ) );
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pLayout->GetBrowseWidthByTabFrame( *this ) );
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
if ( aOldPrtPos != (Prt().*fnRect->fnGetPos)() )
@@ -1932,16 +1932,16 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( IsFollow() )
{
// Only if the height of the first line got smaller.
- SwFrm *pFrm = GetFirstNonHeadlineRow();
- if( pFrm && n1StLineHeight >(pFrm->Frm().*fnRect->fnGetHeight )() )
+ SwFrame *pFrame = GetFirstNonHeadlineRow();
+ if( pFrame && n1StLineHeight >(pFrame->Frame().*fnRect->fnGetHeight )() )
{
- SwTabFrm *pMaster = FindMaster();
+ SwTabFrame *pMaster = FindMaster();
bool bDummy;
if ( ShouldBwdMoved( pMaster->GetUpper(), false, bDummy ) )
pMaster->InvalidatePos();
}
}
- SwFootnoteBossFrm *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrm( true ) : nullptr;
+ SwFootnoteBossFrame *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrame( true ) : nullptr;
bool bReformat;
if ( MoveBwd( bReformat ) )
{
@@ -1952,9 +1952,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true );
if ( bReformat || bKeep )
{
- long nOldTop = (Frm().*fnRect->fnGetTop)();
+ long nOldTop = (Frame().*fnRect->fnGetTop)();
MakePos();
- if( nOldTop != (Frm().*fnRect->fnGetTop)() )
+ if( nOldTop != (Frame().*fnRect->fnGetTop)() )
{
SwHTMLTableLayout *pHTMLLayout =
GetTable()->GetHTMLTableLayout();
@@ -1962,14 +1962,14 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
pAccess.reset();
m_bCalcLowers |= pHTMLLayout->Resize(
- pHTMLLayout->GetBrowseWidthByTabFrm( *this ) );
+ pHTMLLayout->GetBrowseWidthByTabFrame( *this ) );
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
mbValidPrtArea = false;
- Format( getRootFrm()->GetCurrShell()->GetOut(), pAttrs );
+ Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
}
lcl_RecalcTable( *this, nullptr, aNotify );
m_bLowersFormatted = true;
@@ -2002,17 +2002,17 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// table frame bottom to the bottom of the upper printing area.
// Note: negative values denotes the situation that table frame doesn't fit in its upper.
SwTwips nDistanceToUpperPrtBottom =
- (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
+ (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
/// In online layout try to grow upper of table frame, if table frame doesn't fit in its upper.
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
if ( nDistanceToUpperPrtBottom < 0 && bBrowseMode )
{
if ( GetUpper()->Grow( -nDistanceToUpperPrtBottom ) )
{
// upper is grown --> recalculate <nDistanceToUpperPrtBottom>
- nDistanceToUpperPrtBottom = (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
+ nDistanceToUpperPrtBottom = (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
}
}
@@ -2029,27 +2029,27 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
bool bDummy;
if ( GetFollow()->ShouldBwdMoved( GetUpper(), false, bDummy ) )
{
- SwFrm *pTmp = GetUpper();
+ SwFrame *pTmp = GetUpper();
SwTwips nDeadLine = (pTmp->*fnRect->fnGetPrtBottom)();
if ( bBrowseMode )
nDeadLine += pTmp->Grow( LONG_MAX, true );
- if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 )
+ if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) > 0 )
{
// First, we remove an existing follow flow line.
if ( HasFollowFlowLine() )
{
- SwFrm* pLastLine = GetLastLower();
+ SwFrame* pLastLine = GetLastLower();
RemoveFollowFlowLine();
// invalidate and rebuild last row
if ( pLastLine )
{
::SwInvalidateAll( pLastLine, LONG_MAX );
SetRebuildLastLine( true );
- lcl_RecalcRow( static_cast<SwRowFrm&>(*pLastLine), LONG_MAX );
+ lcl_RecalcRow( static_cast<SwRowFrame&>(*pLastLine), LONG_MAX );
SetRebuildLastLine( false );
}
- SwFrm* pRow = GetFollow()->GetFirstNonHeadlineRow();
+ SwFrame* pRow = GetFollow()->GetFirstNonHeadlineRow();
if ( !pRow || !pRow->GetNext() )
//The follow becomes empty and invalid for this reason.
@@ -2060,7 +2060,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// If there is no follow flow line, we move the first
// row in the follow table to the master table.
- SwRowFrm *pRow = GetFollow()->GetFirstNonHeadlineRow();
+ SwRowFrame *pRow = GetFollow()->GetFirstNonHeadlineRow();
//The follow becomes empty and invalid for this reason.
if ( !pRow )
@@ -2069,19 +2069,19 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
continue;
}
- const SwTwips nOld = (Frm().*fnRect->fnGetHeight)();
+ const SwTwips nOld = (Frame().*fnRect->fnGetHeight)();
long nRowsToMove = lcl_GetMaximumLayoutRowSpan( *pRow );
- SwFrm* pRowToMove = pRow;
+ SwFrame* pRowToMove = pRow;
while ( pRowToMove && nRowsToMove-- > 0 )
{
const bool bMoveFootnotes = bFootnotesInDoc && !GetFollow()->IsJoinLocked();
- SwFootnoteBossFrm *pOldBoss = nullptr;
+ SwFootnoteBossFrame *pOldBoss = nullptr;
if ( bMoveFootnotes )
- pOldBoss = pRowToMove->FindFootnoteBossFrm( true );
+ pOldBoss = pRowToMove->FindFootnoteBossFrame( true );
- SwFrm* pNextRow = pRowToMove->GetNext();
+ SwFrame* pNextRow = pRowToMove->GetNext();
if ( !pNextRow )
{
@@ -2096,14 +2096,14 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
//Displace the footnotes!
if ( bMoveFootnotes )
- if ( static_cast<SwLayoutFrm*>(pRowToMove)->MoveLowerFootnotes( nullptr, pOldBoss, FindFootnoteBossFrm( true ), true ) )
+ if ( static_cast<SwLayoutFrame*>(pRowToMove)->MoveLowerFootnotes( nullptr, pOldBoss, FindFootnoteBossFrame( true ), true ) )
GetUpper()->Calc(pRenderContext);
pRowToMove = pNextRow;
}
- if ( nOld != (Frm().*fnRect->fnGetHeight)() )
- lcl_RecalcTable( *this, static_cast<SwLayoutFrm*>(pRow), aNotify );
+ if ( nOld != (Frame().*fnRect->fnGetHeight)() )
+ lcl_RecalcTable( *this, static_cast<SwLayoutFrame*>(pRow), aNotify );
continue;
}
@@ -2128,7 +2128,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// 5. There is no break before attribute set behind the table
// 6. There is no section change behind the table (see IsKeep)
// 7. The last table row wants to keep with its next.
- const SwRowFrm* pLastRow = static_cast<const SwRowFrm*>(GetLastLower());
+ const SwRowFrame* pLastRow = static_cast<const SwRowFrame*>(GetLastLower());
if ( pLastRow && IsKeep( pAttrs->GetAttrSet(), true ) &&
pLastRow->ShouldRowKeepWithNext() )
bFormat = true;
@@ -2142,9 +2142,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// it has to be avoided, that superior table is formatted.
// Thus, find next content, table or section and, if a section
// is found, get its first content.
- const SwFrm* pTmpNxt = sw_FormatNextContentForKeep( this );
+ const SwFrame* pTmpNxt = sw_FormatNextContentForKeep( this );
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
// The last row wants to keep with the frame behind the table.
@@ -2168,7 +2168,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
}
else if (m_bONECalcLowers)
{
- lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
+ lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX );
m_bONECalcLowers = false;
}
}
@@ -2178,7 +2178,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
//I don't fit in the higher-ranked element anymore, therefore it's the
//right moment to do some preferably constructive changes.
- //If I'm NOT allowed to leave the parent Frm, I've got a problem.
+ //If I'm NOT allowed to leave the parent Frame, I've got a problem.
// Following Arthur Dent, we do the only thing that you can do with
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable )
@@ -2191,7 +2191,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
}
else if (m_bONECalcLowers)
{
- lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
+ lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX );
m_bONECalcLowers = false;
}
@@ -2215,8 +2215,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// 1. We have at least one non headline row
// 2. If this row wants to keep, we need an additional row
// 3. The table is allowed to split or we do not have an pIndPrev:
- SwFrm* pIndPrev = GetIndPrev();
- const SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
+ SwFrame* pIndPrev = GetIndPrev();
+ const SwRowFrame* pFirstNonHeadlineRow = GetFirstNonHeadlineRow();
// #i120016# if this row wants to keep, allow split in case that all rows want to keep with next,
// the table can not move forward as it is the first one and a split is in general allowed.
const bool bAllowSplitOfRow = ( bTableRowKeep &&
@@ -2234,8 +2234,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// section which has a height of 0, because this is not growable and thus
// all kinds of unexpected things could happen.
if ( IsInSct() &&
- (FindSctFrm())->Lower()->IsColumnFrm() &&
- 0 == (GetUpper()->Frm().*fnRect->fnGetHeight)() )
+ (FindSctFrame())->Lower()->IsColumnFrame() &&
+ 0 == (GetUpper()->Frame().*fnRect->fnGetHeight)() )
{
bTryToSplit = false;
}
@@ -2251,7 +2251,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
{
SetInRecalcLowerRow( true );
- ::lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), nDeadLine );
+ ::lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), nDeadLine );
SetInRecalcLowerRow( false );
}
m_bLowersFormatted = true;
@@ -2260,7 +2260,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// One more check if its really necessary to split the table.
// 1. The table either has to exceed the deadline or
// 2. We explicitly want to cut off the last row.
- if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
+ if( (Frame().*fnRect->fnBottomDist)( nDeadLine ) > 0 && !bLastRowHasToMoveToFollow )
{
continue;
}
@@ -2274,10 +2274,10 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// to split, we do not try to split:
if ( GetUpper()->IsInTab() )
{
- const SwFrm* pTmpRow = GetUpper();
- while ( pTmpRow && !pTmpRow->IsRowFrm() )
+ const SwFrame* pTmpRow = GetUpper();
+ while ( pTmpRow && !pTmpRow->IsRowFrame() )
pTmpRow = pTmpRow->GetUpper();
- if ( pTmpRow && !static_cast<const SwRowFrm*>(pTmpRow)->IsRowSplitAllowed() )
+ if ( pTmpRow && !static_cast<const SwRowFrame*>(pTmpRow)->IsRowSplitAllowed() )
continue;
}
@@ -2285,11 +2285,11 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( bTableRowKeep )
{
- const SwRowFrm* pTmpRow = pFirstNonHeadlineRow;
+ const SwRowFrame* pTmpRow = pFirstNonHeadlineRow;
while ( pTmpRow && pTmpRow->ShouldRowKeepWithNext() )
{
++nMinNumOfLines;
- pTmpRow = static_cast<const SwRowFrm*>(pTmpRow->GetNext());
+ pTmpRow = static_cast<const SwRowFrame*>(pTmpRow->GetNext());
}
}
@@ -2297,7 +2297,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
++nMinNumOfLines;
const SwTwips nBreakLine = (*fnRect->fnYInc)(
- (Frm().*fnRect->fnGetTop)(),
+ (Frame().*fnRect->fnGetTop)(),
(this->*fnRect->fnGetTopMargin)() +
lcl_GetHeightOfRows( GetLower(), nMinNumOfLines ) );
@@ -2347,7 +2347,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// to nDeadLine may not be enough.
if ( bSplitError && bTryToSplit ) // no restart if we did not try to split: i72847, i79426
{
- lcl_RecalcRow( static_cast<SwRowFrm&>(*Lower()), LONG_MAX );
+ lcl_RecalcRow( static_cast<SwRowFrame&>(*Lower()), LONG_MAX );
mbValidPos = false;
bTryToSplit = false;
continue;
@@ -2379,7 +2379,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
GetFollow()->MakeAll(pRenderContext);
- pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrm::GetCache(), this);
+ pAccess = o3tl::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
GetFollow()->SetLowersFormatted(false);
@@ -2388,8 +2388,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// its content.
const bool bOldJoinLock = GetFollow()->IsJoinLocked();
GetFollow()->LockJoin();
- ::lcl_RecalcRow( static_cast<SwRowFrm&>(*GetFollow()->Lower()),
- (GetFollow()->GetUpper()->Frm().*fnRectX->fnGetBottom)() );
+ ::lcl_RecalcRow( static_cast<SwRowFrame&>(*GetFollow()->Lower()),
+ (GetFollow()->GetUpper()->Frame().*fnRectX->fnGetBottom)() );
// #i43913#
// #i63632# Do not unlock the
// follow if it wasn't locked before.
@@ -2398,7 +2398,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( !GetFollow()->GetFollow() )
{
- SwFrm* pNxt = static_cast<SwFrm*>(GetFollow())->FindNext();
+ SwFrame* pNxt = static_cast<SwFrame*>(GetFollow())->FindNext();
if ( pNxt )
{
// #i18103# - no formatting of found next
@@ -2406,9 +2406,9 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// 'ColLocked' section, the follow table is
// in.
bool bCalcNxt = true;
- if ( GetFollow()->IsInSct() && pNxt->IsSctFrm() )
+ if ( GetFollow()->IsInSct() && pNxt->IsSctFrame() )
{
- SwSectionFrm* pSct = GetFollow()->FindSctFrm();
+ SwSectionFrame* pSct = GetFollow()->FindSctFrame();
if ( pSct->IsColLocked() &&
pSct->GetFollow() == pNxt )
{
@@ -2434,16 +2434,16 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// Set to false again as early as possible.
bLastRowHasToMoveToFollow = false;
- if( IsInSct() && bMovedFwd && bMakePage && GetUpper()->IsColBodyFrm() &&
- GetUpper()->GetUpper()->GetUpper()->IsSctFrm() &&
+ if( IsInSct() && bMovedFwd && bMakePage && GetUpper()->IsColBodyFrame() &&
+ GetUpper()->GetUpper()->GetUpper()->IsSctFrame() &&
( GetUpper()->GetUpper()->GetPrev() || GetIndPrev() ) &&
- static_cast<SwSectionFrm*>(GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) )
+ static_cast<SwSectionFrame*>(GetUpper()->GetUpper()->GetUpper())->MoveAllowed(this) )
{
bMovedFwd = false;
}
// #i29771# Reset bTryToSplit flag on change of upper
- const SwFrm* pOldUpper = GetUpper();
+ const SwFrame* pOldUpper = GetUpper();
//Let's see if we find some place anywhere...
if ( !bMovedFwd && !MoveFwd( bMakePage, false ) )
@@ -2463,7 +2463,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
if ( IsFollow() )
{
//To avoid oscillations now invalid master should drop behind.
- SwTabFrm *pTab = FindMaster();
+ SwTabFrame *pTab = FindMaster();
if ( pTab->GetUpper() )
pTab->GetUpper()->Calc(pRenderContext);
pTab->Calc(pRenderContext);
@@ -2492,7 +2492,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
// and can cause layout loops, if table doesn't fit and isn't
// allowed to split.
SwTwips nDistToUpperPrtBottom =
- (Frm().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
+ (Frame().*fnRect->fnBottomDist)( (GetUpper()->*fnRect->fnGetPrtBottom)());
if ( nDistToUpperPrtBottom >= 0 || bTryToSplit )
{
lcl_RecalcTable( *this, nullptr, aNotify );
@@ -2502,7 +2502,7 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
#if OSL_DEBUG_LEVEL > 0
else
{
- OSL_FAIL( "debug assertion: <SwTabFrm::MakeAll()> - format of table lowers suppressed by fix i44910" );
+ OSL_FAIL( "debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910" );
}
#endif
}
@@ -2513,8 +2513,8 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
//next best opportunity.
if ( IsFollow() )
{
- SwFrm *pPre = GetPrev();
- if ( pPre && pPre->IsTabFrm() && static_cast<SwTabFrm*>(pPre)->GetFollow() == this)
+ SwFrame *pPre = GetPrev();
+ if ( pPre && pPre->IsTabFrame() && static_cast<SwTabFrame*>(pPre)->GetFollow() == this)
pPre->InvalidatePos();
}
@@ -2526,13 +2526,13 @@ void SwTabFrm::MakeAll(vcl::RenderContext* pRenderContext)
}
/// Calculate the offsets arising because of FlyFrames
-bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
+bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
long& rLeftOffset,
long& rRightOffset ) const
{
bool bInvalidatePrtArea = false;
- const SwPageFrm *pPage = FindPageFrm();
- const SwFlyFrm* pMyFly = FindFlyFrm();
+ const SwPageFrame *pPage = FindPageFrame();
+ const SwFlyFrame* pMyFly = FindFlyFrame();
// --> #108724# Page header/footer content doesn't have to wrap around
// floating screen objects
@@ -2545,18 +2545,18 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
{
SWRECTFN( this )
const bool bConsiderWrapOnObjPos = rIDSA.get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION);
- long nPrtPos = (Frm().*fnRect->fnGetTop)();
+ long nPrtPos = (Frame().*fnRect->fnGetTop)();
nPrtPos = (*fnRect->fnYInc)( nPrtPos, rUpper );
- SwRect aRect( Frm() );
+ SwRect aRect( Frame() );
long nYDiff = (*fnRect->fnYDiff)( (Prt().*fnRect->fnGetTop)(), rUpper );
if( nYDiff > 0 )
(aRect.*fnRect->fnAddBottom)( -nYDiff );
for ( size_t i = 0; i < pPage->GetSortedObjs()->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
const SwRect aFlyRect = pFly->GetObjRectWithSpaces();
// #i26945# - correction of conditions,
// if Writer fly frame has to be considered:
@@ -2574,19 +2574,19 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
// E.g., it could happen, that the fly frame is still registered
// at the page frame, the table is on, but it's anchor character
// text frame has already changed its page.
- const SwTextFrm* pAnchorCharFrm = pFly->FindAnchorCharFrm();
+ const SwTextFrame* pAnchorCharFrame = pFly->FindAnchorCharFrame();
bool bConsiderFly =
// #i46807# - do not consider invalid
// Writer fly frames.
pFly->IsValid() &&
// fly anchored at character
- pFly->IsFlyAtCntFrm() &&
+ pFly->IsFlyAtContentFrame() &&
// fly overlaps with corresponding table rectangle
aFlyRect.IsOver( aRect ) &&
// fly isn't lower of table and
// anchor character frame of fly isn't lower of table
( !IsAnLower( pFly ) &&
- ( !pAnchorCharFrm || !IsAnLower( pAnchorCharFrm ) ) ) &&
+ ( !pAnchorCharFrame || !IsAnLower( pAnchorCharFrame ) ) ) &&
// table isn't lower of fly
!pFly->IsAnLower( this ) &&
// fly is lower of fly, the table is in
@@ -2596,25 +2596,25 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
// which is inside a frame.
( ( !pMyFly ||
pMyFly->IsAnLower( pFly ) ) &&
- pMyFly == pFly->GetAnchorFrmContainingAnchPos()->FindFlyFrm() ) &&
+ pMyFly == pFly->GetAnchorFrameContainingAnchPos()->FindFlyFrame() ) &&
// anchor frame not on following page
pPage->GetPhyPageNum() >=
- pFly->GetAnchorFrm()->FindPageFrm()->GetPhyPageNum() &&
+ pFly->GetAnchorFrame()->FindPageFrame()->GetPhyPageNum() &&
// anchor character text frame on same page
- ( !pAnchorCharFrm ||
- pAnchorCharFrm->FindPageFrm()->GetPhyPageNum() ==
+ ( !pAnchorCharFrame ||
+ pAnchorCharFrame->FindPageFrame()->GetPhyPageNum() ==
pPage->GetPhyPageNum() );
if ( bConsiderFly )
{
- const SwFrm* pFlyHeaderFooterFrm = pFly->GetAnchorFrm()->FindFooterOrHeader();
- const SwFrm* pThisHeaderFooterFrm = FindFooterOrHeader();
+ const SwFrame* pFlyHeaderFooterFrame = pFly->GetAnchorFrame()->FindFooterOrHeader();
+ const SwFrame* pThisHeaderFooterFrame = FindFooterOrHeader();
- if ( pFlyHeaderFooterFrm != pThisHeaderFooterFrm &&
+ if ( pFlyHeaderFooterFrame != pThisHeaderFooterFrame &&
// #148493# If bConsiderWrapOnObjPos is set,
// we want to consider the fly if it is located in the header and
// the table is located in the body:
- ( !bConsiderWrapOnObjPos || nullptr != pThisHeaderFooterFrm || !pFlyHeaderFooterFrm->IsHeaderFrm() ) )
+ ( !bConsiderWrapOnObjPos || nullptr != pThisHeaderFooterFrame || !pFlyHeaderFooterFrame->IsHeaderFrame() ) )
bConsiderFly = false;
}
@@ -2635,7 +2635,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
{
const long nWidth = (*fnRect->fnXDiff)(
(aFlyRect.*fnRect->fnGetRight)(),
- (pFly->GetAnchorFrm()->Frm().*fnRect->fnGetLeft)() );
+ (pFly->GetAnchorFrame()->Frame().*fnRect->fnGetLeft)() );
rLeftOffset = std::max( rLeftOffset, nWidth );
bInvalidatePrtArea = true;
}
@@ -2644,7 +2644,7 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
text::HoriOrientation::RIGHT == rHori.GetHoriOrient() )
{
const long nWidth = (*fnRect->fnXDiff)(
- (pFly->GetAnchorFrm()->Frm().*fnRect->fnGetRight)(),
+ (pFly->GetAnchorFrame()->Frame().*fnRect->fnGetRight)(),
(aFlyRect.*fnRect->fnGetLeft)() );
rRightOffset = std::max( rRightOffset, nWidth );
bInvalidatePrtArea = true;
@@ -2652,25 +2652,25 @@ bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper,
}
}
}
- rUpper = (*fnRect->fnYDiff)( nPrtPos, (Frm().*fnRect->fnGetTop)() );
+ rUpper = (*fnRect->fnYDiff)( nPrtPos, (Frame().*fnRect->fnGetTop)() );
}
return bInvalidatePrtArea;
}
-/// "Formats" the frame; Frm and PrtArea.
+/// "Formats" the frame; Frame and PrtArea.
/// The fixed size is not adjusted here.
-void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
+void SwTabFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
- OSL_ENSURE( pAttrs, "TabFrm::Format, pAttrs ist 0." );
+ OSL_ENSURE( pAttrs, "TabFrame::Format, pAttrs ist 0." );
SWRECTFN( this )
if ( !mbValidSize )
{
long nDiff = (GetUpper()->Prt().*fnRect->fnGetWidth)() -
- (Frm().*fnRect->fnGetWidth)();
+ (Frame().*fnRect->fnGetWidth)();
if( nDiff )
- (maFrm.*fnRect->fnAddRight)( nDiff );
+ (maFrame.*fnRect->fnAddRight)( nDiff );
}
//VarSize is always the height.
@@ -2700,13 +2700,13 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
//The width of the PrtArea is given by the FrameFormat, the borders have to
//be set accordingly.
//Minimum borders are determined depending on margins and shadows.
- //The borders are adjusted so that the PrtArea is aligned into the Frm
+ //The borders are adjusted so that the PrtArea is aligned into the Frame
//according to the adjustment.
//If the adjustment is 0, the borders are set according to the border
//attributes.
const SwTwips nOldHeight = (Prt().*fnRect->fnGetHeight)();
- const SwTwips nMax = (maFrm.*fnRect->fnGetWidth)();
+ const SwTwips nMax = (maFrame.*fnRect->fnGetWidth)();
// OD 14.03.2003 #i9040# - adjust variable names.
const SwTwips nLeftLine = pAttrs->CalcLeftLine();
@@ -2715,7 +2715,7 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
//The width possibly is a percentage value. If the table is inside
//something else, the value applies to the surrounding. If it's the body
//the value applies to the screen width in the BrowseView.
- const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
// OD 14.03.2003 #i9040# - adjust variable name.
const SwTwips nWishedTableWidth = CalcRel( rSz, true );
@@ -2876,15 +2876,15 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
else
(this->*fnRect->fnSetXMargins)( nLeftSpacing, nRightSpacing );
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if ( bCheckBrowseWidth &&
pSh && pSh->GetViewOptions()->getBrowseMode() &&
- GetUpper()->IsPageBodyFrm() && // only PageBodyFrms and not ColBodyFrms
+ GetUpper()->IsPageBodyFrame() && // only PageBodyFrames and not ColBodyFrames
pSh->VisArea().Width() )
{
//Don't overlap the edge of the visible area.
//The page width can be bigger because objects with
- //"over-size" are possible (RootFrm::ImplCalcBrowseWidth())
+ //"over-size" are possible (RootFrame::ImplCalcBrowseWidth())
long nWidth = pSh->GetBrowseWidth();
nWidth -= Prt().Left();
nWidth -= pAttrs->CalcRightLine();
@@ -2901,16 +2901,16 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
//The size is defined by the content plus the borders.
SwTwips nRemaining = 0, nDiff;
- SwFrm *pFrm = m_pLower;
- while ( pFrm )
+ SwFrame *pFrame = m_pLower;
+ while ( pFrame )
{
- nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
+ nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
}
//And now add the borders
nRemaining += nUpper + nLower;
- nDiff = (Frm().*fnRect->fnGetHeight)() - nRemaining;
+ nDiff = (Frame().*fnRect->fnGetHeight)() - nRemaining;
if ( nDiff > 0 )
Shrink( nDiff );
else if ( nDiff < 0 )
@@ -2918,10 +2918,10 @@ void SwTabFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
}
}
-SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SWRECTFN( this )
- SwTwips nHeight =(Frm().*fnRect->fnGetHeight)();
+ SwTwips nHeight =(Frame().*fnRect->fnGetHeight)();
if( nHeight > 0 && nDist > ( LONG_MAX - nHeight ) )
nDist = LONG_MAX - nHeight;
@@ -2930,16 +2930,16 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( GetUpper() )
{
- SwRect aOldFrm( Frm() );
+ SwRect aOldFrame( Frame() );
//The upper only grows as far as needed. nReal provides the distance
//which is already available.
SwTwips nReal = (GetUpper()->Prt().*fnRect->fnGetHeight)();
- SwFrm *pFrm = GetUpper()->Lower();
- while ( pFrm && GetFollow() != pFrm )
+ SwFrame *pFrame = GetUpper()->Lower();
+ while ( pFrame && GetFollow() != pFrame )
{
- nReal -= (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
+ nReal -= (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
}
if ( nReal < nDist )
@@ -2955,24 +2955,24 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
- (Frm().*fnRect->fnAddBottom)( nDist );
+ (Frame().*fnRect->fnAddBottom)( nDist );
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm );
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame );
}
}
}
if ( !bTst && ( nDist || IsRestrictTableGrowth() ) )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
{
GetNext()->_InvalidatePos();
- if ( GetNext()->IsContentFrm() )
+ if ( GetNext()->IsContentFrame() )
GetNext()->InvalidatePage( pPage );
}
// #i28701# - Due to the new object positioning the
@@ -2997,7 +2997,7 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
return nDist;
}
-void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwTabFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
sal_uInt8 nInvFlags = 0;
bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
@@ -3019,26 +3019,26 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
aOIter.NextItem();
}
if ( aOldSet.Count() || aNewSet.Count() )
- SwLayoutFrm::Modify( &aOldSet, &aNewSet );
+ SwLayoutFrame::Modify( &aOldSet, &aNewSet );
}
else
_UpdateAttr( pOld, pNew, nInvFlags );
if ( nInvFlags != 0 )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( nInvFlags & 0x02 )
_InvalidatePrt();
if ( nInvFlags & 0x40 )
_InvalidatePos();
- SwFrm *pTmp;
+ SwFrame *pTmp;
if ( nullptr != (pTmp = GetIndNext()) )
{
if ( nInvFlags & 0x04 )
{
pTmp->_InvalidatePrt();
- if ( pTmp->IsContentFrm() )
+ if ( pTmp->IsContentFrame() )
pTmp->InvalidatePage( pPage );
}
if ( nInvFlags & 0x10 )
@@ -3047,20 +3047,20 @@ void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( nInvFlags & 0x08 && nullptr != (pTmp = GetPrev()) )
{
pTmp->_InvalidatePrt();
- if ( pTmp->IsContentFrm() )
+ if ( pTmp->IsContentFrame() )
pTmp->InvalidatePage( pPage );
}
if ( nInvFlags & 0x20 )
{
if ( pPage && pPage->GetUpper() && !IsFollow() )
- static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth();
}
if ( nInvFlags & 0x80 )
InvalidateNextPos();
}
}
-void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
+void SwTabFrame::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
@@ -3072,11 +3072,11 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( IsFollow() )
{
// Delete remaining headlines:
- SwRowFrm* pLowerRow = nullptr;
- while ( nullptr != ( pLowerRow = static_cast<SwRowFrm*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() )
+ SwRowFrame* pLowerRow = nullptr;
+ while ( nullptr != ( pLowerRow = static_cast<SwRowFrame*>(Lower()) ) && pLowerRow->IsRepeatedHeadline() )
{
pLowerRow->Cut();
- SwFrm::DestroyFrm(pLowerRow);
+ SwFrame::DestroyFrame(pLowerRow);
}
// insert new headlines
@@ -3084,7 +3084,7 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
for ( sal_uInt16 nIdx = 0; nIdx < nNewRepeat; ++nIdx )
{
bDontCreateObjects = true; //frmtool
- SwRowFrm* pHeadline = new SwRowFrm( *GetTable()->GetTabLines()[ nIdx ], this );
+ SwRowFrame* pHeadline = new SwRowFrame( *GetTable()->GetTabLines()[ nIdx ], this );
pHeadline->SetRepeatedHeadline( true );
bDontCreateObjects = false;
pHeadline->Paste( this, pLowerRow );
@@ -3102,14 +3102,14 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
if ( IsInDocBody() )
{
rInvFlags |= 0x40;
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if (pPage)
{
if ( !GetPrev() )
CheckPageDescs( pPage );
if (GetFormat()->GetPageDesc().GetNumOffset())
- static_cast<SwRootFrm*>(pPage->GetUpper())->SetVirtPageNum( true );
- SwDocPosUpdate aMsgHint( pPage->Frm().Top() );
+ static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true );
+ SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
}
@@ -3148,16 +3148,16 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
pNewSet->ClearItem( nWhich );
}
else
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
}
-bool SwTabFrm::GetInfo( SfxPoolItem &rHint ) const
+bool SwTabFrame::GetInfo( SfxPoolItem &rHint ) const
{
if ( RES_VIRTPAGENUM_INFO == rHint.Which() && IsInDocBody() && !IsFollow() )
{
SwVirtPageNumInfo &rInfo = static_cast<SwVirtPageNumInfo&>(rHint);
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
if ( pPage )
{
if ( pPage == rInfo.GetOrigPage() && !GetPrev() )
@@ -3178,19 +3178,19 @@ bool SwTabFrm::GetInfo( SfxPoolItem &rHint ) const
return true;
}
-SwContentFrm *SwTabFrm::FindLastContent()
+SwContentFrame *SwTabFrame::FindLastContent()
{
- SwFrm *pRet = m_pLower;
+ SwFrame *pRet = m_pLower;
- while ( pRet && !pRet->IsContentFrm() )
+ while ( pRet && !pRet->IsContentFrame() )
{
- SwFrm *pOld = pRet;
+ SwFrame *pOld = pRet;
- SwFrm *pTmp = pRet; // To skip empty section frames
+ SwFrame *pTmp = pRet; // To skip empty section frames
while ( pRet->GetNext() )
{
pRet = pRet->GetNext();
- if( !pRet->IsSctFrm() || static_cast<SwSectionFrm*>(pRet)->GetSection() )
+ if( !pRet->IsSctFrame() || static_cast<SwSectionFrame*>(pRet)->GetSection() )
pTmp = pRet;
}
pRet = pTmp;
@@ -3201,31 +3201,31 @@ SwContentFrm *SwTabFrm::FindLastContent()
{
// Check all other columns if there is a column based section with
// an empty last column at the end of the last line - this is done
- // by SwSectionFrm::FindLastContent
- if( pRet->IsColBodyFrm() )
+ // by SwSectionFrame::FindLastContent
+ if( pRet->IsColBodyFrame() )
{
#if OSL_DEBUG_LEVEL > 0
- SwSectionFrm* pSect = pRet->FindSctFrm();
+ SwSectionFrame* pSect = pRet->FindSctFrame();
OSL_ENSURE( pSect, "Where does this column come fron?");
OSL_ENSURE( IsAnLower( pSect ), "Splited cell?" );
#endif
- return pRet->FindSctFrm()->FindLastContent();
+ return pRet->FindSctFrame()->FindLastContent();
}
// pRet may be a cell frame without a lower (cell has been split).
// We have to find the last content the hard way:
- OSL_ENSURE( pRet->IsCellFrm(), "SwTabFrm::FindLastContent failed" );
- const SwFrm* pRow = pRet->GetUpper();
- while ( pRow && !pRow->GetUpper()->IsTabFrm() )
+ OSL_ENSURE( pRet->IsCellFrame(), "SwTabFrame::FindLastContent failed" );
+ const SwFrame* pRow = pRet->GetUpper();
+ while ( pRow && !pRow->GetUpper()->IsTabFrame() )
pRow = pRow->GetUpper();
- const SwContentFrm* pContentFrm = pRow ? static_cast<const SwLayoutFrm*>(pRow)->ContainsContent() : nullptr;
+ const SwContentFrame* pContentFrame = pRow ? static_cast<const SwLayoutFrame*>(pRow)->ContainsContent() : nullptr;
pRet = nullptr;
- while ( pContentFrm && static_cast<const SwLayoutFrm*>(pRow)->IsAnLower( pContentFrm ) )
+ while ( pContentFrame && static_cast<const SwLayoutFrame*>(pRow)->IsAnLower( pContentFrame ) )
{
- pRet = const_cast<SwContentFrm*>(pContentFrm);
- pContentFrm = pContentFrm->GetNextContentFrm();
+ pRet = const_cast<SwContentFrame*>(pContentFrame);
+ pContentFrame = pContentFrame->GetNextContentFrame();
}
}
}
@@ -3240,40 +3240,40 @@ SwContentFrm *SwTabFrm::FindLastContent()
while ( pRet->GetNext() )
pRet = pRet->GetNext();
- if( pRet->IsSctFrm() )
- pRet = static_cast<SwSectionFrm*>(pRet)->FindLastContent();
+ if( pRet->IsSctFrame() )
+ pRet = static_cast<SwSectionFrame*>(pRet)->FindLastContent();
}
- return static_cast<SwContentFrm*>(pRet);
+ return static_cast<SwContentFrame*>(pRet);
}
/// Return value defines if the frm needs to be relocated
-bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
+bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat )
{
rReformat = false;
- if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove()) )
+ if ( (SwFlowFrame::IsMoveBwdJump() || !IsPrevObjMove()) )
{
- //Floating back Frm's is quite time consuming unfortunately.
- //Most often the location where the Frm wants to float to has the same
- //FixSize as the Frm itself. In such a situation it's easy to check if
- //the Frm will find enough space for its VarSize, if this is not the
+ //Floating back Frame's is quite time consuming unfortunately.
+ //Most often the location where the Frame wants to float to has the same
+ //FixSize as the Frame itself. In such a situation it's easy to check if
+ //the Frame will find enough space for its VarSize, if this is not the
//case, the relocation can be skipped.
- //Checking if the Frm will find enough space is done by the Frm itself,
- //this also takes the possibility of splitting the Frm into account.
+ //Checking if the Frame will find enough space is done by the Frame itself,
+ //this also takes the possibility of splitting the Frame into account.
//If the FixSize is different or Flys are involved (at the old or the
- //new position) the whole checks don't make sense at all, the Frm then
+ //new position) the whole checks don't make sense at all, the Frame then
//needs to be relocated tentatively (if a bit of space is available).
//The FixSize of the surrounding which contain tables is always the
//width.
- SwPageFrm *pOldPage = FindPageFrm(),
- *pNewPage = pNewUpper->FindPageFrm();
+ SwPageFrame *pOldPage = FindPageFrame(),
+ *pNewPage = pNewUpper->FindPageFrame();
bool bMoveAnyway = false;
SwTwips nSpace = 0;
SWRECTFN( this )
- if ( !SwFlowFrm::IsMoveBwdJump() )
+ if ( !SwFlowFrame::IsMoveBwdJump() )
{
long nOldWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
@@ -3281,16 +3281,16 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
long nNewWidth = (pNewUpper->Prt().*fnRectX->fnGetWidth)();
if( std::abs( nNewWidth - nOldWidth ) < 2 )
{
- if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frm() ) > 1) ) )
+ if( !( bMoveAnyway = (BwdMoveNecessary( pOldPage, Frame() ) > 1) ) )
{
SwRect aRect( pNewUpper->Prt() );
- aRect.Pos() += pNewUpper->Frm().Pos();
- const SwFrm *pPrevFrm = pNewUpper->Lower();
- while ( pPrevFrm && pPrevFrm != this )
+ aRect.Pos() += pNewUpper->Frame().Pos();
+ const SwFrame *pPrevFrame = pNewUpper->Lower();
+ while ( pPrevFrame && pPrevFrame != this )
{
- (aRect.*fnRectX->fnSetTop)( (pPrevFrm->Frm().*fnRectX->
+ (aRect.*fnRectX->fnSetTop)( (pPrevFrame->Frame().*fnRectX->
fnGetBottom)() );
- pPrevFrm = pPrevFrm->GetNext();
+ pPrevFrame = pPrevFrame->GetNext();
}
bMoveAnyway = BwdMoveNecessary( pNewPage, aRect) > 1;
@@ -3305,7 +3305,7 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
if ( (pNewUpper->Prt().*fnRectX->fnGetHeight)() > 0 || nTmpSpace <= 0 )
nSpace = nTmpSpace;
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetViewOptions()->getBrowseMode() )
nSpace += pNewUpper->Grow( LONG_MAX, true );
}
@@ -3326,9 +3326,9 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
// #i26945# - check, if follow flow line
// contains frame, which are moved forward due to its object
// positioning.
- SwRowFrm* pFirstRow = GetFirstNonHeadlineRow();
+ SwRowFrame* pFirstRow = GetFirstNonHeadlineRow();
if ( pFirstRow && pFirstRow->IsInFollowFlowRow() &&
- SwLayouter::DoesRowContainMovedFwdFrm(
+ SwLayouter::DoesRowContainMovedFwdFrame(
*(pFirstRow->GetFormat()->GetDoc()),
*(pFirstRow) ) )
{
@@ -3346,24 +3346,24 @@ bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, bool, bool &rReformat )
return false;
}
-void SwTabFrm::Cut()
+void SwTabFrame::Cut()
{
OSL_ENSURE( GetUpper(), "Cut ohne Upper()." );
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- SwFrm *pFrm = GetNext();
- if( pFrm )
+ SwFrame *pFrame = GetNext();
+ if( pFrame )
{
//The old follower eventually calculated a margin to the predecessor
//which is obsolete now as it became the first one
- pFrm->_InvalidatePrt();
- pFrm->_InvalidatePos();
- if ( pFrm->IsContentFrm() )
- pFrm->InvalidatePage( pPage );
+ pFrame->_InvalidatePrt();
+ pFrame->_InvalidatePos();
+ if ( pFrame->IsContentFrame() )
+ pFrame->InvalidatePage( pPage );
if( IsInSct() && !GetPrev() )
{
- SwSectionFrm* pSct = FindSctFrm();
+ SwSectionFrame* pSct = FindSctFrame();
if( !pSct->IsFollow() )
{
pSct->_InvalidatePrt();
@@ -3375,22 +3375,22 @@ void SwTabFrm::Cut()
{
InvalidateNextPos();
//Someone has to do the retouch: predecessor or upper
- if ( nullptr != (pFrm = GetPrev()) )
- { pFrm->SetRetouche();
- pFrm->Prepare( PREP_WIDOWS_ORPHANS );
- pFrm->_InvalidatePos();
- if ( pFrm->IsContentFrm() )
- pFrm->InvalidatePage( pPage );
- }
- //If I am (was) the only FlowFrm in my own upper, it has to do
+ if ( nullptr != (pFrame = GetPrev()) )
+ { pFrame->SetRetouche();
+ pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+ pFrame->_InvalidatePos();
+ if ( pFrame->IsContentFrame() )
+ pFrame->InvalidatePage( pPage );
+ }
+ //If I am (was) the only FlowFrame in my own upper, it has to do
//the retouch. Moreover it has to do the retouch.
else
- { SwRootFrm *pRoot = static_cast<SwRootFrm*>(pPage->GetUpper());
+ { SwRootFrame *pRoot = static_cast<SwRootFrame*>(pPage->GetUpper());
pRoot->SetSuperfluous();
GetUpper()->SetCompletePaint();
if( IsInSct() )
{
- SwSectionFrm* pSct = FindSctFrm();
+ SwSectionFrame* pSct = FindSctFrame();
if( !pSct->IsFollow() )
{
pSct->_InvalidatePrt();
@@ -3401,17 +3401,17 @@ void SwTabFrm::Cut()
}
//First remove, then shrink the upper.
- SwLayoutFrm *pUp = GetUpper();
+ SwLayoutFrame *pUp = GetUpper();
SWRECTFN( this )
RemoveFromLayout();
if ( pUp )
{
- OSL_ENSURE( !pUp->IsFootnoteFrm(), "Table in Footnote." );
- SwSectionFrm *pSct = nullptr;
+ OSL_ENSURE( !pUp->IsFootnoteFrame(), "Table in Footnote." );
+ SwSectionFrame *pSct = nullptr;
// #126020# - adjust check for empty section
// #130797# - correct fix #126020#
if ( !pUp->Lower() && pUp->IsInSct() &&
- !(pSct = pUp->FindSctFrm())->ContainsContent() &&
+ !(pSct = pUp->FindSctFrame())->ContainsContent() &&
!pSct->ContainsAny( true ) )
{
if ( pUp->GetUpper() )
@@ -3420,59 +3420,59 @@ void SwTabFrm::Cut()
pSct->_InvalidateSize();
}
}
- else if( (Frm().*fnRect->fnGetHeight)() )
+ else if( (Frame().*fnRect->fnGetHeight)() )
{
// OD 26.08.2003 #i18103# - *no* 'ColUnlock' of section -
// undo changes of fix for #104992#
- pUp->Shrink( Frm().Height() );
+ pUp->Shrink( Frame().Height() );
}
}
if ( pPage && !IsFollow() && pPage->GetUpper() )
- static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth();
}
-void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
+void SwTabFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
{
OSL_ENSURE( pParent, "No parent for pasting." );
- OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." );
+ OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." );
OSL_ENSURE( pParent != this, "I'm the parent myself." );
OSL_ENSURE( pSibling != this, "I'm my own neighbour." );
OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"I'm still registred somewhere." );
//Insert in the tree.
- InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling );
+ InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
_InvalidateAll();
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( GetNext() )
{
GetNext()->_InvalidatePos();
GetNext()->_InvalidatePrt();
- if ( GetNext()->IsContentFrm() )
+ if ( GetNext()->IsContentFrame() )
GetNext()->InvalidatePage( pPage );
}
SWRECTFN( this )
- if( (Frm().*fnRect->fnGetHeight)() )
- pParent->Grow( (Frm().*fnRect->fnGetHeight)() );
+ if( (Frame().*fnRect->fnGetHeight)() )
+ pParent->Grow( (Frame().*fnRect->fnGetHeight)() );
- if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)() )
+ if( (Frame().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)() )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
{
if ( !IsFollow() )
{
GetPrev()->InvalidateSize();
- if ( GetPrev()->IsContentFrm() )
+ if ( GetPrev()->IsContentFrame() )
GetPrev()->InvalidatePage( pPage );
}
}
else if ( GetNext() )
- //Take the marging into account when dealing with ContentFrm's. There are
+ //Take the marging into account when dealing with ContentFrame's. There are
//two situations (both always happen at once):
//a) The Content becomes the first in a chain
//b) The new follower was the first in a chain before
@@ -3481,7 +3481,7 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
if ( pPage && !IsFollow() )
{
if ( pPage->GetUpper() )
- static_cast<SwRootFrm*>(pPage->GetUpper())->InvalidateBrowseWidth();
+ static_cast<SwRootFrame*>(pPage->GetUpper())->InvalidateBrowseWidth();
if ( !GetPrev() )//At least needed for HTML with a table at the beginning.
{
@@ -3493,15 +3493,15 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling )
}
}
-bool SwTabFrm::Prepare( const PrepareHint eHint, const void *, bool )
+bool SwTabFrame::Prepare( const PrepareHint eHint, const void *, bool )
{
if( PREP_BOSS_CHGD == eHint )
CheckDirChange();
return false;
}
-SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent)
- : SwLayoutFrm( rLine.GetFrameFormat(), pSib )
+SwRowFrame::SwRowFrame(const SwTableLine &rLine, SwFrame* pSib, bool bInsertContent)
+ : SwLayoutFrame( rLine.GetFrameFormat(), pSib )
, m_pTabLine( &rLine )
, m_pFollowRow( nullptr )
// #i29550#
@@ -3514,20 +3514,20 @@ SwRowFrm::SwRowFrm(const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent)
, m_bIsRepeatedHeadline( false )
, m_bIsRowSpanLine( false )
{
- mnFrmType = FRM_ROW;
+ mnFrameType = FRM_ROW;
//Create the boxes and insert them.
const SwTableBoxes &rBoxes = rLine.GetTabBoxes();
- SwFrm *pTmpPrev = nullptr;
+ SwFrame *pTmpPrev = nullptr;
for ( size_t i = 0; i < rBoxes.size(); ++i )
{
- SwCellFrm *pNew = new SwCellFrm( *rBoxes[i], this, bInsertContent );
+ SwCellFrame *pNew = new SwCellFrame( *rBoxes[i], this, bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
pTmpPrev = pNew;
}
}
-void SwRowFrm::DestroyImpl()
+void SwRowFrame::DestroyImpl()
{
SwModify* pMod = GetFormat();
if( pMod )
@@ -3537,19 +3537,19 @@ void SwRowFrm::DestroyImpl()
delete pMod; // and delete
}
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwRowFrm::~SwRowFrm()
+SwRowFrame::~SwRowFrame()
{
}
-void SwRowFrm::RegistFlys( SwPageFrm *pPage )
+void SwRowFrame::RegistFlys( SwPageFrame *pPage )
{
- ::RegistFlys( pPage ? pPage : FindPageFrm(), this );
+ ::RegistFlys( pPage ? pPage : FindPageFrame(), this );
}
-void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwRowFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = nullptr;
@@ -3566,7 +3566,7 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( pItem )
{
- SwTabFrm *pTab = FindTabFrm();
+ SwTabFrame *pTab = FindTabFrame();
if ( pTab )
{
const bool bInFirstNonHeadlineRow = pTab->IsFollow() &&
@@ -3582,44 +3582,44 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
-void SwRowFrm::MakeAll(vcl::RenderContext* pRenderContext)
+void SwRowFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( !GetNext() )
mbValidSize = false;
- SwLayoutFrm::MakeAll(pRenderContext);
+ SwLayoutFrame::MakeAll(pRenderContext);
}
-long CalcHeightWithFlys( const SwFrm *pFrm )
+long CalcHeightWithFlys( const SwFrame *pFrame )
{
- SWRECTFN( pFrm )
+ SWRECTFN( pFrame )
long nHeight = 0;
- const SwFrm* pTmp = pFrm->IsSctFrm() ?
- static_cast<const SwSectionFrm*>(pFrm)->ContainsContent() : pFrm;
+ const SwFrame* pTmp = pFrame->IsSctFrame() ?
+ static_cast<const SwSectionFrame*>(pFrame)->ContainsContent() : pFrame;
while( pTmp )
{
// #i26945# - consider follow text frames
const SwSortedObjs* pObjs( nullptr );
bool bIsFollow( false );
- if ( pTmp->IsTextFrm() && static_cast<const SwTextFrm*>(pTmp)->IsFollow() )
+ if ( pTmp->IsTextFrame() && static_cast<const SwTextFrame*>(pTmp)->IsFollow() )
{
- const SwFrm* pMaster;
+ const SwFrame* pMaster;
// #i46450# Master does not necessarily have
- // to exist if this function is called from JoinFrm() ->
+ // to exist if this function is called from JoinFrame() ->
// Cut() -> Shrink()
- const SwTextFrm* pTmpFrm = static_cast<const SwTextFrm*>(pTmp);
- if ( pTmpFrm->GetPrev() && pTmpFrm->GetPrev()->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() &&
- static_cast<const SwTextFrm*>(pTmpFrm->GetPrev())->GetFollow() != pTmp )
+ const SwTextFrame* pTmpFrame = static_cast<const SwTextFrame*>(pTmp);
+ if ( pTmpFrame->GetPrev() && pTmpFrame->GetPrev()->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pTmpFrame->GetPrev())->GetFollow() &&
+ static_cast<const SwTextFrame*>(pTmpFrame->GetPrev())->GetFollow() != pTmp )
pMaster = nullptr;
else
- pMaster = pTmpFrm->FindMaster();
+ pMaster = pTmpFrame->FindMaster();
if ( pMaster )
{
- pObjs = static_cast<const SwTextFrm*>(pTmp)->FindMaster()->GetDrawObjs();
+ pObjs = static_cast<const SwTextFrame*>(pTmp)->FindMaster()->GetDrawObjs();
bIsFollow = true;
}
}
@@ -3635,7 +3635,7 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
// #i26945# - if <pTmp> is follow, the
// anchor character frame has to be <pTmp>.
if ( bIsFollow &&
- const_cast<SwAnchoredObject*>(pAnchoredObj)->FindAnchorCharFrm() != pTmp )
+ const_cast<SwAnchoredObject*>(pAnchoredObj)->FindAnchorCharFrame() != pTmp )
{
continue;
}
@@ -3648,10 +3648,10 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
(rFrameFormat.GetAnchor().GetAnchorId() != FLY_AS_CHAR) &&
pAnchoredObj->GetObjRect().Top() != FAR_AWAY &&
rFrameFormat.GetFollowTextFlow().GetValue() &&
- pAnchoredObj->GetPageFrm() == pTmp->FindPageFrm();
+ pAnchoredObj->GetPageFrame() == pTmp->FindPageFrame();
if ( bConsiderObj )
{
- const SwFormatFrmSize &rSz = rFrameFormat.GetFrmSize();
+ const SwFormatFrameSize &rSz = rFrameFormat.GetFrameSize();
if( !rSz.GetHeightPercent() )
{
const SwTwips nDistOfFlyBottomToAnchorTop =
@@ -3660,24 +3660,24 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
pAnchoredObj->GetCurrRelPos().X() :
pAnchoredObj->GetCurrRelPos().Y() );
- const SwTwips nFrmDiff =
+ const SwTwips nFrameDiff =
(*fnRect->fnYDiff)(
- (pTmp->Frm().*fnRect->fnGetTop)(),
- (pFrm->Frm().*fnRect->fnGetTop)() );
+ (pTmp->Frame().*fnRect->fnGetTop)(),
+ (pFrame->Frame().*fnRect->fnGetTop)() );
- nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrmDiff -
- (pFrm->Frm().*fnRect->fnGetHeight)() );
+ nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop + nFrameDiff -
+ (pFrame->Frame().*fnRect->fnGetHeight)() );
// #i56115# The first height calculation
- // gives wrong results if pFrm->Prt().Y() > 0. We do
+ // gives wrong results if pFrame->Prt().Y() > 0. We do
// a second calculation based on the actual rectangles of
- // pFrm and pAnchoredObj, and use the maximum of the results.
+ // pFrame and pAnchoredObj, and use the maximum of the results.
// I do not want to remove the first calculation because
// if clipping has been applied, using the GetCurrRelPos
// might be the better option to calculate nHeight.
const SwTwips nDistOfFlyBottomToAnchorTop2 = (*fnRect->fnYDiff)(
(pAnchoredObj->GetObjRect().*fnRect->fnGetBottom)(),
- (pFrm->Frm().*fnRect->fnGetBottom)() );
+ (pFrame->Frame().*fnRect->fnGetBottom)() );
nHeight = std::max( nHeight, nDistOfFlyBottomToAnchorTop2 );
}
@@ -3685,26 +3685,26 @@ long CalcHeightWithFlys( const SwFrm *pFrm )
}
}
}
- if( !pFrm->IsSctFrm() )
+ if( !pFrame->IsSctFrame() )
break;
pTmp = pTmp->FindNextCnt();
- if( !static_cast<const SwSectionFrm*>(pFrm)->IsAnLower( pTmp ) )
+ if( !static_cast<const SwSectionFrame*>(pFrame)->IsAnLower( pTmp ) )
break;
}
return nHeight;
}
-static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBorderAttrs& rAttrs )
+static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrame& rCell, const SwBorderAttrs& rAttrs )
{
- const SwTabFrm* pTab = rCell.FindTabFrm();
+ const SwTabFrame* pTab = rCell.FindTabFrame();
SwTwips nTopSpace = 0;
SwTwips nBottomSpace = 0;
// #i29550#
- if ( pTab->IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrm() )
+ if ( pTab->IsCollapsingBorders() && rCell.Lower() && !rCell.Lower()->IsRowFrame() )
{
- nTopSpace = static_cast<const SwRowFrm*>(rCell.GetUpper())->GetTopMarginForLowers();
- nBottomSpace = static_cast<const SwRowFrm*>(rCell.GetUpper())->GetBottomMarginForLowers();
+ nTopSpace = static_cast<const SwRowFrame*>(rCell.GetUpper())->GetTopMarginForLowers();
+ nBottomSpace = static_cast<const SwRowFrame*>(rCell.GetUpper())->GetBottomMarginForLowers();
}
else
{
@@ -3726,13 +3726,13 @@ static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBor
// #i26945# - add parameter <_bConsiderObjs> in order to
// control, if floating screen objects have to be considered for the minimal
// cell height.
-static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
+static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrame *_pCell,
const bool _bConsiderObjs,
const SwBorderAttrs *pAttrs = nullptr )
{
SWRECTFN( _pCell )
SwTwips nHeight = 0;
- const SwFrm* pLow = _pCell->Lower();
+ const SwFrame* pLow = _pCell->Lower();
if ( pLow )
{
long nFlyAdd = 0;
@@ -3740,15 +3740,15 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
{
// OD 2004-02-18 #106629# - change condition and switch then-body
// and else-body
- if ( pLow->IsRowFrm() )
+ if ( pLow->IsRowFrame() )
{
// #i26945#
- nHeight += ::lcl_CalcMinRowHeight( static_cast<const SwRowFrm*>(pLow),
+ nHeight += ::lcl_CalcMinRowHeight( static_cast<const SwRowFrame*>(pLow),
_bConsiderObjs );
}
else
{
- long nLowHeight = (pLow->Frm().*fnRect->fnGetHeight)();
+ long nLowHeight = (pLow->Frame().*fnRect->fnGetHeight)();
nHeight += nLowHeight;
// #i26945#
if ( _bConsiderObjs )
@@ -3764,7 +3764,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
nHeight += nFlyAdd;
}
//The border needs to be considered too, unfortunately it can't be
- //calculated using PrtArea and Frm because those can be invalid in arbitrary
+ //calculated using PrtArea and Frame because those can be invalid in arbitrary
//combinations.
if ( _pCell->Lower() )
{
@@ -3772,7 +3772,7 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
nHeight += lcl_CalcTopAndBottomMargin( *_pCell, *pAttrs );
else
{
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), _pCell );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), _pCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
nHeight += lcl_CalcTopAndBottomMargin( *_pCell, rAttrs );
}
@@ -3783,12 +3783,12 @@ static SwTwips lcl_CalcMinCellHeight( const SwLayoutFrm *_pCell,
// OD 2004-02-18 #106629# - correct type of 1st parameter
// #i26945# - add parameter <_bConsiderObjs> in order to control,
// if floating screen objects have to be considered for the minimal cell height
-static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
+static SwTwips lcl_CalcMinRowHeight( const SwRowFrame* _pRow,
const bool _bConsiderObjs )
{
SWRECTFN( _pRow )
- const SwFormatFrmSize &rSz = _pRow->GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = _pRow->GetFormat()->GetFrameSize();
if ( _pRow->HasFixSize() && !_pRow->IsRowSpanLine() )
{
@@ -3797,7 +3797,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
}
SwTwips nHeight = 0;
- const SwCellFrm* pLow = static_cast<const SwCellFrm*>(_pRow->Lower());
+ const SwCellFrame* pLow = static_cast<const SwCellFrame*>(_pRow->Lower());
while ( pLow )
{
SwTwips nTmp = 0;
@@ -3816,12 +3816,12 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
// Height of the last cell of a row span is height of master cell
// minus the height of the other rows which are covered by the master
// cell:
- const SwCellFrm& rMaster = pLow->FindStartEndOfRowSpanCell( true, true );
+ const SwCellFrame& rMaster = pLow->FindStartEndOfRowSpanCell( true, true );
nTmp = ::lcl_CalcMinCellHeight( &rMaster, _bConsiderObjs );
- const SwFrm* pMasterRow = rMaster.GetUpper();
+ const SwFrame* pMasterRow = rMaster.GetUpper();
while ( pMasterRow && pMasterRow != _pRow )
{
- nTmp -= (pMasterRow->Frm().*fnRect->fnGetHeight)();
+ nTmp -= (pMasterRow->Frame().*fnRect->fnGetHeight)();
pMasterRow = pMasterRow->GetNext();
}
}
@@ -3831,7 +3831,7 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
if ( pLow->IsVertical() == bVert && nTmp > nHeight )
nHeight = nTmp;
- pLow = static_cast<const SwCellFrm*>(pLow->GetNext());
+ pLow = static_cast<const SwCellFrame*>(pLow->GetNext());
}
if ( rSz.GetHeightSizeType() == ATT_MIN_SIZE && !_pRow->IsRowSpanLine() )
nHeight = std::max( nHeight, rSz.GetHeight() );
@@ -3841,18 +3841,18 @@ static SwTwips lcl_CalcMinRowHeight( const SwRowFrm* _pRow,
// #i29550#
// Calculate the maximum of (TopLineSize + TopLineDist) over all lowers:
-static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
+static sal_uInt16 lcl_GetTopSpace( const SwRowFrame& rRow )
{
sal_uInt16 nTopSpace = 0;
- for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower;
- pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) )
+ for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower;
+ pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) )
{
sal_uInt16 nTmpTopSpace = 0;
- if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
- nTmpTopSpace = lcl_GetTopSpace( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) );
+ if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() )
+ nTmpTopSpace = lcl_GetTopSpace( *static_cast<const SwRowFrame*>(pCurrLower->Lower()) );
else
{
- const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet();
+ const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet();
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpTopSpace = rBoxItem.CalcLineSpace( SvxBoxItemLine::TOP, true );
}
@@ -3862,18 +3862,18 @@ static sal_uInt16 lcl_GetTopSpace( const SwRowFrm& rRow )
}
// Calculate the maximum of TopLineDist over all lowers:
-static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
+static sal_uInt16 lcl_GetTopLineDist( const SwRowFrame& rRow )
{
sal_uInt16 nTopLineDist = 0;
- for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower;
- pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) )
+ for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower;
+ pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) )
{
sal_uInt16 nTmpTopLineDist = 0;
- if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
- nTmpTopLineDist = lcl_GetTopLineDist( *static_cast<const SwRowFrm*>(pCurrLower->Lower()) );
+ if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() )
+ nTmpTopLineDist = lcl_GetTopLineDist( *static_cast<const SwRowFrame*>(pCurrLower->Lower()) );
else
{
- const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet();
+ const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet();
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpTopLineDist = rBoxItem.GetDistance( SvxBoxItemLine::TOP );
}
@@ -3883,21 +3883,21 @@ static sal_uInt16 lcl_GetTopLineDist( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineSize over all lowers:
-static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
+static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrame& rRow )
{
sal_uInt16 nBottomLineSize = 0;
- for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower;
- pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) )
+ for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower;
+ pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) )
{
sal_uInt16 nTmpBottomLineSize = 0;
- if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
+ if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() )
{
- const SwFrm* pRow = pCurrLower->GetLastLower();
- nTmpBottomLineSize = lcl_GetBottomLineSize( *static_cast<const SwRowFrm*>(pRow) );
+ const SwFrame* pRow = pCurrLower->GetLastLower();
+ nTmpBottomLineSize = lcl_GetBottomLineSize( *static_cast<const SwRowFrame*>(pRow) );
}
else
{
- const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet();
+ const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet();
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpBottomLineSize = rBoxItem.CalcLineSpace( SvxBoxItemLine::BOTTOM, true ) -
rBoxItem.GetDistance( SvxBoxItemLine::BOTTOM );
@@ -3908,21 +3908,21 @@ static sal_uInt16 lcl_GetBottomLineSize( const SwRowFrm& rRow )
}
// Calculate the maximum of BottomLineDist over all lowers:
-static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
+static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrame& rRow )
{
sal_uInt16 nBottomLineDist = 0;
- for ( const SwCellFrm* pCurrLower = static_cast<const SwCellFrm*>(rRow.Lower()); pCurrLower;
- pCurrLower = static_cast<const SwCellFrm*>(pCurrLower->GetNext()) )
+ for ( const SwCellFrame* pCurrLower = static_cast<const SwCellFrame*>(rRow.Lower()); pCurrLower;
+ pCurrLower = static_cast<const SwCellFrame*>(pCurrLower->GetNext()) )
{
sal_uInt16 nTmpBottomLineDist = 0;
- if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrm() )
+ if ( pCurrLower->Lower() && pCurrLower->Lower()->IsRowFrame() )
{
- const SwFrm* pRow = pCurrLower->GetLastLower();
- nTmpBottomLineDist = lcl_GetBottomLineDist( *static_cast<const SwRowFrm*>(pRow) );
+ const SwFrame* pRow = pCurrLower->GetLastLower();
+ nTmpBottomLineDist = lcl_GetBottomLineDist( *static_cast<const SwRowFrame*>(pRow) );
}
else
{
- const SwAttrSet& rSet = const_cast<SwCellFrm*>(pCurrLower)->GetFormat()->GetAttrSet();
+ const SwAttrSet& rSet = const_cast<SwCellFrame*>(pCurrLower)->GetFormat()->GetAttrSet();
const SvxBoxItem& rBoxItem = rSet.GetBox();
nTmpBottomLineDist = rBoxItem.GetDistance( SvxBoxItemLine::BOTTOM );
}
@@ -3931,34 +3931,34 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow )
return nBottomLineDist;
}
-void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
+void SwRowFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
SWRECTFN( this )
- OSL_ENSURE( pAttrs, "SwRowFrm::Format without Attrs." );
+ OSL_ENSURE( pAttrs, "SwRowFrame::Format without Attrs." );
const bool bFix = mbFixSize;
if ( !mbValidPrtArea )
{
- //RowFrms don't have borders and so on therefore the PrtArea always
- //matches the Frm.
+ //RowFrames don't have borders and so on therefore the PrtArea always
+ //matches the Frame.
mbValidPrtArea = true;
maPrt.Left( 0 );
maPrt.Top( 0 );
- maPrt.Width ( maFrm.Width() );
- maPrt.Height( maFrm.Height() );
+ maPrt.Width ( maFrame.Width() );
+ maPrt.Height( maFrame.Height() );
// #i29550#
// Here we calculate the top-printing area for the lower cell frames
- SwTabFrm* pTabFrm = FindTabFrm();
- if ( pTabFrm->IsCollapsingBorders() )
+ SwTabFrame* pTabFrame = FindTabFrame();
+ if ( pTabFrame->IsCollapsingBorders() )
{
const sal_uInt16 nTopSpace = lcl_GetTopSpace( *this );
const sal_uInt16 nTopLineDist = lcl_GetTopLineDist( *this );
const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this );
const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this );
- const SwRowFrm* pPreviousRow = nullptr;
+ const SwRowFrame* pPreviousRow = nullptr;
// #i32456#
// In order to calculate the top printing area for the lower cell
@@ -3966,9 +3966,9 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// the bottom values of the 'previous' row with the 'top' values
// of this row. The best way to find the 'previous' row is to
// use the table structure:
- const SwTable* pTable = pTabFrm->GetTable();
+ const SwTable* pTable = pTabFrame->GetTable();
const SwTableLine* pPrevTabLine = nullptr;
- const SwRowFrm* pTmpRow = this;
+ const SwRowFrame* pTmpRow = this;
while ( pTmpRow && !pPrevTabLine )
{
@@ -3990,8 +3990,8 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// pTmpRow is a first row in the table structure.
// We go up in the table structure:
pTmpRow = pTmpRow->GetUpper()->GetUpper() &&
- pTmpRow->GetUpper()->GetUpper()->IsRowFrm() ?
- static_cast<const SwRowFrm*>( pTmpRow->GetUpper()->GetUpper() ) :
+ pTmpRow->GetUpper()->GetUpper()->IsRowFrame() ?
+ static_cast<const SwRowFrame*>( pTmpRow->GetUpper()->GetUpper() ) :
nullptr;
}
}
@@ -3999,8 +3999,8 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// If we found a 'previous' row, we look for the appropriate row frame:
if ( pPrevTabLine )
{
- SwIterator<SwRowFrm,SwFormat> aIter( *pPrevTabLine->GetFrameFormat() );
- for ( SwRowFrm* pRow = aIter.First(); pRow; pRow = aIter.Next() )
+ SwIterator<SwRowFrame,SwFormat> aIter( *pPrevTabLine->GetFrameFormat() );
+ for ( SwRowFrame* pRow = aIter.First(); pRow; pRow = aIter.Next() )
{
// #115759# - do *not* take repeated
// headlines, because during split of table it can be
@@ -4025,7 +4025,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// table has to be notified if it has to change its lower
// margin due to changes of nBottomLineSize:
if ( !GetNext() && nBottomLineSize != GetBottomLineSize() )
- pTabFrm->_InvalidatePrt();
+ pTabFrame->_InvalidatePrt();
// If there are rows nested inside this row, the nested rows
// may not have been calculated yet. Therefore the
@@ -4036,7 +4036,7 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
// Note: If any further invalidations should be necessary, we
// should consider moving the invalidation stuff to the
// appropriate SwNotify object.
- if ( GetUpper()->GetUpper()->IsRowFrm() &&
+ if ( GetUpper()->GetUpper()->IsRowFrame() &&
( nBottomLineDist != GetBottomMarginForLowers() ||
nTopPrtMargin != GetTopMarginForLowers() ) )
GetUpper()->GetUpper()->_InvalidateSize();
@@ -4055,16 +4055,16 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
#if OSL_DEBUG_LEVEL > 0
if ( HasFixSize() )
{
- const SwFormatFrmSize &rFrmSize = GetFormat()->GetFrmSize();
- OSL_ENSURE( rFrmSize.GetSize().Height() > 0, "Hat ihn" );
+ const SwFormatFrameSize &rFrameSize = GetFormat()->GetFrameSize();
+ OSL_ENSURE( rFrameSize.GetSize().Height() > 0, "Hat ihn" );
}
#endif
- const SwTwips nDiff = (Frm().*fnRect->fnGetHeight)() -
+ const SwTwips nDiff = (Frame().*fnRect->fnGetHeight)() -
( HasFixSize() && !IsRowSpanLine()
? pAttrs->GetSize().Height()
// #i26945#
: ::lcl_CalcMinRowHeight( this,
- FindTabFrm()->IsConsiderObjsForMinCellHeight() ) );
+ FindTabFrame()->IsConsiderObjsForMinCellHeight() ) );
if ( nDiff )
{
mbFixSize = false;
@@ -4081,9 +4081,9 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
{
//The last fills the remaining space in the upper.
SwTwips nDiff = (GetUpper()->Prt().*fnRect->fnGetHeight)();
- SwFrm *pSibling = GetUpper()->Lower();
+ SwFrame *pSibling = GetUpper()->Lower();
do
- { nDiff -= (pSibling->Frm().*fnRect->fnGetHeight)();
+ { nDiff -= (pSibling->Frame().*fnRect->fnGetHeight)();
pSibling = pSibling->GetNext();
} while ( pSibling );
if ( nDiff > 0 )
@@ -4096,20 +4096,20 @@ void SwRowFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAtt
}
}
-void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
+void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight )
{
- SwFrm *pFrm = Lower();
+ SwFrame *pFrame = Lower();
if ( bHeight )
{
- SwRootFrm *pRootFrm = getRootFrm();
+ SwRootFrame *pRootFrame = getRootFrame();
SWRECTFN( this )
- SwRect aOldFrm;
+ SwRect aOldFrame;
- while ( pFrm )
+ while ( pFrame )
{
- SwFrm* pNotify = nullptr;
+ SwFrame* pNotify = nullptr;
- SwCellFrm* pCellFrm = static_cast<SwCellFrm*>(pFrm);
+ SwCellFrame* pCellFrame = static_cast<SwCellFrame*>(pFrame);
// NEW TABLES
// Which cells need to be adjusted if the current row changes
@@ -4117,30 +4117,30 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
// Current frame is a covered frame:
// Set new height for covered cell and adjust master cell:
- if ( pCellFrm->GetTabBox()->getRowSpan() < 1 )
+ if ( pCellFrame->GetTabBox()->getRowSpan() < 1 )
{
// Set height of current (covered) cell to new line height.
- const long nDiff = nHeight - (pCellFrm->Frm().*fnRect->fnGetHeight)();
+ const long nDiff = nHeight - (pCellFrame->Frame().*fnRect->fnGetHeight)();
if ( nDiff )
{
- (pCellFrm->Frm().*fnRect->fnAddBottom)( nDiff );
- pCellFrm->_InvalidatePrt();
+ (pCellFrame->Frame().*fnRect->fnAddBottom)( nDiff );
+ pCellFrame->_InvalidatePrt();
}
}
- SwCellFrm* pToAdjust = nullptr;
- SwFrm* pToAdjustRow = nullptr;
+ SwCellFrame* pToAdjust = nullptr;
+ SwFrame* pToAdjustRow = nullptr;
// If current frame is covered frame, we still want to adjust the
// height of the cell starting the row span
- if ( pCellFrm->GetLayoutRowSpan() < 1 )
+ if ( pCellFrame->GetLayoutRowSpan() < 1 )
{
- pToAdjust = const_cast< SwCellFrm*>(&pCellFrm->FindStartEndOfRowSpanCell( true, true ));
+ pToAdjust = const_cast< SwCellFrame*>(&pCellFrame->FindStartEndOfRowSpanCell( true, true ));
pToAdjustRow = pToAdjust->GetUpper();
}
else
{
- pToAdjust = pCellFrm;
+ pToAdjust = pCellFrame;
pToAdjustRow = this;
}
@@ -4152,7 +4152,7 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
// Use new height for the current row:
nSumRowHeight += pToAdjustRow == this ?
nHeight :
- (pToAdjustRow->Frm().*fnRect->fnGetHeight)();
+ (pToAdjustRow->Frame().*fnRect->fnGetHeight)();
if ( nRowSpan-- == 1 )
break;
@@ -4163,77 +4163,77 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const bool bHeight )
if ( pToAdjustRow && pToAdjustRow != this )
pToAdjustRow->_InvalidateSize();
- const long nDiff = nSumRowHeight - (pToAdjust->Frm().*fnRect->fnGetHeight)();
+ const long nDiff = nSumRowHeight - (pToAdjust->Frame().*fnRect->fnGetHeight)();
if ( nDiff )
{
- aOldFrm = pToAdjust->Frm();
- (pToAdjust->Frm().*fnRect->fnAddBottom)( nDiff );
+ aOldFrame = pToAdjust->Frame();
+ (pToAdjust->Frame().*fnRect->fnAddBottom)( nDiff );
pNotify = pToAdjust;
}
if ( pNotify )
{
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() && pRootFrm->GetCurrShell() )
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( pNotify, aOldFrm );
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() )
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame );
pNotify->_InvalidatePrt();
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
}
else
- { while ( pFrm )
+ { while ( pFrame )
{
- pFrm->_InvalidateAll();
- pFrm = pFrm->GetNext();
+ pFrame->_InvalidateAll();
+ pFrame = pFrame->GetNext();
}
}
InvalidatePage();
}
-void SwRowFrm::Cut()
+void SwRowFrame::Cut()
{
- SwTabFrm *pTab = FindTabFrm();
+ SwTabFrame *pTab = FindTabFrame();
if ( pTab && pTab->IsFollow() && this == pTab->GetFirstNonHeadlineRow() )
{
pTab->FindMaster()->InvalidatePos();
}
- SwLayoutFrm::Cut();
+ SwLayoutFrame::Cut();
}
-SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SwTwips nReal = 0;
- SwTabFrm* pTab = FindTabFrm();
+ SwTabFrame* pTab = FindTabFrame();
SWRECTFN( pTab )
bool bRestrictTableGrowth;
bool bHasFollowFlowLine = pTab->HasFollowFlowLine();
- if ( GetUpper()->IsTabFrm() )
+ if ( GetUpper()->IsTabFrame() )
{
- const SwRowFrm* pFollowFlowRow = IsInSplitTableRow();
+ const SwRowFrame* pFollowFlowRow = IsInSplitTableRow();
bRestrictTableGrowth = pFollowFlowRow && !pFollowFlowRow->IsRowSpanLine();
}
else
{
- OSL_ENSURE( GetUpper()->IsCellFrm(), "RowFrm->GetUpper neither table nor cell" );
+ OSL_ENSURE( GetUpper()->IsCellFrame(), "RowFrame->GetUpper neither table nor cell" );
bRestrictTableGrowth = GetFollowRow() && bHasFollowFlowLine;
OSL_ENSURE( !bRestrictTableGrowth || !GetNext(),
"GetFollowRow for row frame that has a Next" );
// There may still be some space left in my direct upper:
const SwTwips nAdditionalSpace =
- (Frm().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() );
+ (Frame().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() );
if ( bRestrictTableGrowth && nAdditionalSpace > 0 )
{
nReal = std::min( nAdditionalSpace, nDist );
nDist -= nReal;
if ( !bTst )
- (Frm().*fnRect->fnAddBottom)( nReal );
+ (Frame().*fnRect->fnAddBottom)( nReal );
}
}
@@ -4245,12 +4245,12 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
// If the current row frame is inside another cell frame,
// and the current row frame has no follow, it should not
// be allowed to grow. In fact, setting bRestrictTableGrowth
- // to 'false' does not work, because the surrounding RowFrm
+ // to 'false' does not work, because the surrounding RowFrame
// would set this to 'true'.
pTab->SetFollowFlowLine( false );
}
- nReal += SwLayoutFrm::GrowFrm( nDist, bTst, bInfo);
+ nReal += SwLayoutFrame::GrowFrame( nDist, bTst, bInfo);
pTab->SetRestrictTableGrowth( false );
pTab->SetFollowFlowLine( bHasFollowFlowLine );
@@ -4267,7 +4267,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
return nReal;
}
-SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SWRECTFN( this )
if( HasFixSize() )
@@ -4276,14 +4276,14 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
return 0L;
}
- // bInfo may be set to true by SwRowFrm::Format; we need to hangle this
+ // bInfo may be set to true by SwRowFrame::Format; we need to hangle this
// here accordingly
const bool bShrinkAnyway = bInfo;
//Only shrink as much as the content of the biggest cell allows.
SwTwips nRealDist = nDist;
{
- const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
rSz.GetHeight() :
0;
@@ -4291,16 +4291,16 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
// Only necessary to calculate minimal row height if height
// of pRow is at least nMinHeight. Otherwise nMinHeight is the
// minimum height.
- if( nMinHeight < (Frm().*fnRect->fnGetHeight)() )
+ if( nMinHeight < (Frame().*fnRect->fnGetHeight)() )
{
// #i26945#
- OSL_ENSURE( FindTabFrm(), "<SwRowFrm::ShrinkFrm(..)> - no table frame -> crash." );
- const bool bConsiderObjs( FindTabFrm()->IsConsiderObjsForMinCellHeight() );
+ OSL_ENSURE( FindTabFrame(), "<SwRowFrame::ShrinkFrame(..)> - no table frame -> crash." );
+ const bool bConsiderObjs( FindTabFrame()->IsConsiderObjsForMinCellHeight() );
nMinHeight = lcl_CalcMinRowHeight( this, bConsiderObjs );
}
- if ( ((Frm().*fnRect->fnGetHeight)() - nRealDist) < nMinHeight )
- nRealDist = (Frm().*fnRect->fnGetHeight)() - nMinHeight;
+ if ( ((Frame().*fnRect->fnGetHeight)() - nRealDist) < nMinHeight )
+ nRealDist = (Frame().*fnRect->fnGetHeight)() - nMinHeight;
}
if ( nRealDist < 0 )
nRealDist = 0;
@@ -4310,11 +4310,11 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
{
if ( !bTst )
{
- SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnSetHeight)( nHeight - nReal );
+ SwTwips nHeight = (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetHeight)( nHeight - nReal );
if( IsVertical() && !IsVertLR() && !bRev )
- Frm().Pos().X() += nReal;
+ Frame().Pos().X() += nReal;
}
SwTwips nTmp = GetUpper()->Shrink( nReal, bTst );
@@ -4325,11 +4325,11 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
nReal -= nTmp;
- SwTwips nHeight = (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnSetHeight)( nHeight + nReal );
+ SwTwips nHeight = (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetHeight)( nHeight + nReal );
if( IsVertical() && !IsVertLR() && !bRev )
- Frm().Pos().X() -= nReal;
+ Frame().Pos().X() -= nReal;
}
nReal = nTmp;
}
@@ -4345,13 +4345,13 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
_InvalidateAll();
SetCompletePaint();
- SwTabFrm *pTab = FindTabFrm();
+ SwTabFrame *pTab = FindTabFrame();
if ( !pTab->IsRebuildLastLine()
&& pTab->IsFollow()
&& this == pTab->GetFirstNonHeadlineRow()
&& !pTab->IsInRecalcLowerRow() )
{
- SwTabFrm* pMasterTab = pTab->FindMaster();
+ SwTabFrame* pMasterTab = pTab->FindMaster();
pMasterTab->InvalidatePos();
}
}
@@ -4360,19 +4360,19 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
return nReal;
}
-bool SwRowFrm::IsRowSplitAllowed() const
+bool SwRowFrame::IsRowSplitAllowed() const
{
// Fixed size rows are never allowed to split:
if ( HasFixSize() )
{
- OSL_ENSURE( ATT_FIX_SIZE == GetFormat()->GetFrmSize().GetHeightSizeType(), "pRow claims to have fixed size" );
+ OSL_ENSURE( ATT_FIX_SIZE == GetFormat()->GetFrameSize().GetHeightSizeType(), "pRow claims to have fixed size" );
return false;
}
// Repeated headlines are never allowed to split:
- const SwTabFrm* pTabFrm = FindTabFrm();
- if ( pTabFrm->GetTable()->GetRowsToRepeat() > 0 &&
- pTabFrm->IsInHeadline( *this ) )
+ const SwTabFrame* pTabFrame = FindTabFrame();
+ if ( pTabFrame->GetTable()->GetRowsToRepeat() > 0 &&
+ pTabFrame->IsInHeadline( *this ) )
return false;
const SwTableLineFormat* pFrameFormat = static_cast<SwTableLineFormat*>(GetTabLine()->GetFrameFormat());
@@ -4380,29 +4380,29 @@ bool SwRowFrm::IsRowSplitAllowed() const
return rLP.GetValue();
}
-bool SwRowFrm::ShouldRowKeepWithNext() const
+bool SwRowFrame::ShouldRowKeepWithNext() const
{
// No KeepWithNext if nested in another table
- if ( GetUpper()->GetUpper()->IsCellFrm() )
+ if ( GetUpper()->GetUpper()->IsCellFrame() )
return false;
- const SwCellFrm* pCell = static_cast<const SwCellFrm*>(Lower());
- const SwFrm* pText = pCell->Lower();
+ const SwCellFrame* pCell = static_cast<const SwCellFrame*>(Lower());
+ const SwFrame* pText = pCell->Lower();
- return pText && pText->IsTextFrm() &&
- static_cast<const SwTextFrm*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue();
+ return pText && pText->IsTextFrame() &&
+ static_cast<const SwTextFrame*>(pText)->GetTextNode()->GetSwAttrSet().GetKeep().GetValue();
}
-SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent)
- : SwLayoutFrm( rBox.GetFrameFormat(), pSib )
+SwCellFrame::SwCellFrame(const SwTableBox &rBox, SwFrame* pSib, bool bInsertContent)
+ : SwLayoutFrame( rBox.GetFrameFormat(), pSib )
, m_pTabBox( &rBox )
{
- mnFrmType = FRM_CELL;
+ mnFrameType = FRM_CELL;
if ( !bInsertContent )
return;
- //If a StartIdx is available, ContentFrms are added in the cell, otherwise
+ //If a StartIdx is available, ContentFrames are added in the cell, otherwise
//Rows have to be present and those are added.
if ( rBox.GetSttIdx() )
{
@@ -4412,28 +4412,28 @@ SwCellFrm::SwCellFrm(const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent)
else
{
const SwTableLines &rLines = rBox.GetTabLines();
- SwFrm *pTmpPrev = nullptr;
+ SwFrame *pTmpPrev = nullptr;
for ( size_t i = 0; i < rLines.size(); ++i )
{
- SwRowFrm *pNew = new SwRowFrm( *rLines[i], this, bInsertContent );
+ SwRowFrame *pNew = new SwRowFrame( *rLines[i], this, bInsertContent );
pNew->InsertBehind( this, pTmpPrev );
pTmpPrev = pNew;
}
}
}
-void SwCellFrm::DestroyImpl()
+void SwCellFrame::DestroyImpl()
{
SwModify* pMod = GetFormat();
if( pMod )
{
// At this stage the lower frames aren't destroyed already,
// therefore we have to do a recursive dispose.
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->DisposeAccessibleFrm( this, true );
+ pRootFrame->GetCurrShell()->Imp()->DisposeAccessibleFrame( this, true );
}
pMod->Remove( this ); // remove,
@@ -4441,47 +4441,47 @@ void SwCellFrm::DestroyImpl()
delete pMod; // and delete
}
- SwLayoutFrm::DestroyImpl();
+ SwLayoutFrame::DestroyImpl();
}
-SwCellFrm::~SwCellFrm()
+SwCellFrame::~SwCellFrame()
{
}
-static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
+static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
{
bool bRet = false;
- SwFrm *pFrm = pLay->Lower();
+ SwFrame *pFrame = pLay->Lower();
SWRECTFN( pLay )
- while ( pFrm )
+ while ( pFrame )
{
- long nFrmTop = (pFrm->Frm().*fnRect->fnGetTop)();
- if( nFrmTop != lYStart )
+ long nFrameTop = (pFrame->Frame().*fnRect->fnGetTop)();
+ if( nFrameTop != lYStart )
{
bRet = true;
- const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrmTop );
- const long lDiffX = lYStart - nFrmTop;
- (pFrm->Frm().*fnRect->fnSubTop)( -lDiff );
- (pFrm->Frm().*fnRect->fnAddBottom)( lDiff );
- pFrm->SetCompletePaint();
- if ( !pFrm->GetNext() )
- pFrm->SetRetouche();
+ const long lDiff = (*fnRect->fnYDiff)( lYStart, nFrameTop );
+ const long lDiffX = lYStart - nFrameTop;
+ (pFrame->Frame().*fnRect->fnSubTop)( -lDiff );
+ (pFrame->Frame().*fnRect->fnAddBottom)( lDiff );
+ pFrame->SetCompletePaint();
+ if ( !pFrame->GetNext() )
+ pFrame->SetRetouche();
if( bInva )
- pFrm->Prepare( PREP_POS_CHGD );
- if ( pFrm->IsLayoutFrm() && static_cast<SwLayoutFrm*>(pFrm)->Lower() )
- lcl_ArrangeLowers( static_cast<SwLayoutFrm*>(pFrm),
- (static_cast<SwLayoutFrm*>(pFrm)->Lower()->Frm().*fnRect->fnGetTop)()
+ pFrame->Prepare( PREP_POS_CHGD );
+ if ( pFrame->IsLayoutFrame() && static_cast<SwLayoutFrame*>(pFrame)->Lower() )
+ lcl_ArrangeLowers( static_cast<SwLayoutFrame*>(pFrame),
+ (static_cast<SwLayoutFrame*>(pFrame)->Lower()->Frame().*fnRect->fnGetTop)()
+ lDiffX, bInva );
- if ( pFrm->GetDrawObjs() )
+ if ( pFrame->GetDrawObjs() )
{
- for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i )
+ for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
// #i26945# - check, if anchored object
// is lower of layout frame by checking, if the anchor
// frame, which contains the anchor position, is a lower
// of the layout frame.
- if ( !pLay->IsAnLower( pAnchoredObj->GetAnchorFrmContainingAnchPos() ) )
+ if ( !pLay->IsAnLower( pAnchoredObj->GetAnchorFrameContainingAnchPos() ) )
{
continue;
}
@@ -4501,9 +4501,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
default: break;
}
}
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
// OD 2004-05-18 #i28701# - no direct move of objects,
// which are anchored to-paragraph/to-character, if
@@ -4512,13 +4512,13 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
// #i52904# - no direct move of objects,
// whose vertical position doesn't depend on anchor frame.
const bool bDirectMove =
- FAR_AWAY != pFly->Frm().Top() &&
+ FAR_AWAY != pFly->Frame().Top() &&
bVertPosDepOnAnchor &&
!pFly->ConsiderObjWrapInfluenceOnObjPos();
if ( bDirectMove )
{
- (pFly->Frm().*fnRect->fnSubTop)( -lDiff );
- (pFly->Frm().*fnRect->fnAddBottom)( lDiff );
+ (pFly->Frame().*fnRect->fnSubTop)( -lDiff );
+ (pFly->Frame().*fnRect->fnAddBottom)( lDiff );
pFly->GetVirtDrawObj()->SetRectsDirty();
// --> OD 2004-08-17 - also notify view of <SdrObject>
// instance, which represents the Writer fly frame in
@@ -4528,9 +4528,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
pFly->InvalidateObjRectWithSpaces();
}
- if ( pFly->IsFlyInCntFrm() )
+ if ( pFly->IsFlyInContentFrame() )
{
- static_cast<SwFlyInCntFrm*>(pFly)->AddRefOfst( lDiff );
+ static_cast<SwFlyInContentFrame*>(pFly)->AddRefOfst( lDiff );
// #115759# - reset current relative
// position to get re-positioned, if not directly moved.
if ( !bDirectMove )
@@ -4549,20 +4549,20 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
// page frame of anchor frame, if table frame isn't
// a follow table and table frame isn't in its
// rebuild of last line.
- const SwTabFrm* pTabFrm = pLay->FindTabFrm();
+ const SwTabFrame* pTabFrame = pLay->FindTabFrame();
// - save: check, if table frame is found.
- if ( pTabFrm &&
- !( pTabFrm->IsFollow() &&
- pTabFrm->FindMaster()->IsRebuildLastLine() ) &&
- pFly->IsFlyFreeFrm() )
+ if ( pTabFrame &&
+ !( pTabFrame->IsFollow() &&
+ pTabFrame->FindMaster()->IsRebuildLastLine() ) &&
+ pFly->IsFlyFreeFrame() )
{
- SwPageFrm* pPageFrm = pFly->GetPageFrm();
- SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm();
- if ( pPageFrm != pPageOfAnchor )
+ SwPageFrame* pPageFrame = pFly->GetPageFrame();
+ SwPageFrame* pPageOfAnchor = pFrame->FindPageFrame();
+ if ( pPageFrame != pPageOfAnchor )
{
pFly->InvalidatePos();
- if ( pPageFrm )
- pPageFrm->MoveFly( pFly, pPageOfAnchor );
+ if ( pPageFrame )
+ pPageFrame->MoveFly( pFly, pPageOfAnchor );
else
pPageOfAnchor->AppendFlyToPage( pFly );
}
@@ -4587,21 +4587,21 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchoredObj ) != nullptr )
{
// #i26945#
- const SwTabFrm* pTabFrm = pLay->FindTabFrm();
- if ( pTabFrm &&
- !( pTabFrm->IsFollow() &&
- pTabFrm->FindMaster()->IsRebuildLastLine() ) &&
+ const SwTabFrame* pTabFrame = pLay->FindTabFrame();
+ if ( pTabFrame &&
+ !( pTabFrame->IsFollow() &&
+ pTabFrame->FindMaster()->IsRebuildLastLine() ) &&
(pAnchoredObj->GetFrameFormat().GetAnchor().GetAnchorId()
!= FLY_AS_CHAR))
{
- SwPageFrm* pPageFrm = pAnchoredObj->GetPageFrm();
- SwPageFrm* pPageOfAnchor = pFrm->FindPageFrm();
- if ( pPageFrm != pPageOfAnchor )
+ SwPageFrame* pPageFrame = pAnchoredObj->GetPageFrame();
+ SwPageFrame* pPageOfAnchor = pFrame->FindPageFrame();
+ if ( pPageFrame != pPageOfAnchor )
{
pAnchoredObj->InvalidateObjPos();
- if ( pPageFrm )
+ if ( pPageFrame )
{
- pPageFrm->RemoveDrawObjFromPage( *pAnchoredObj );
+ pPageFrame->RemoveDrawObjFromPage( *pAnchoredObj );
}
pPageOfAnchor->AppendDrawObjToPage( *pAnchoredObj );
}
@@ -4640,9 +4640,9 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
}
}
// Columns and cells are ordered horizontal, not vertical
- if( !pFrm->IsColumnFrm() && !pFrm->IsCellFrm() )
+ if( !pFrame->IsColumnFrame() && !pFrame->IsCellFrame() )
lYStart = (*fnRect->fnYInc)( lYStart,
- (pFrm->Frm().*fnRect->fnGetHeight)() );
+ (pFrame->Frame().*fnRect->fnGetHeight)() );
// Nowadays, the content inside a cell can flow into the follow table.
// Thus, the cell may only grow up to the end of the environment.
@@ -4650,28 +4650,28 @@ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva )
// Therefore we have to trigger a formatting for the frames, which do
// not fit into the cell anymore:
SwTwips nDistanceToUpperPrtBottom =
- (pFrm->Frm().*fnRect->fnBottomDist)( (pLay->*fnRect->fnGetPrtBottom)());
+ (pFrame->Frame().*fnRect->fnBottomDist)( (pLay->*fnRect->fnGetPrtBottom)());
// #i56146# - Revise fix of issue #i26945#
// do *not* consider content inside fly frames, if it's an undersized paragraph.
// #i26945# - consider content inside fly frames
if ( nDistanceToUpperPrtBottom < 0 &&
- ( ( pFrm->IsInFly() &&
- ( !pFrm->IsTextFrm() ||
- !static_cast<SwTextFrm*>(pFrm)->IsUndersized() ) ) ||
- pFrm->IsInSplitTableRow() ) )
+ ( ( pFrame->IsInFly() &&
+ ( !pFrame->IsTextFrame() ||
+ !static_cast<SwTextFrame*>(pFrame)->IsUndersized() ) ) ||
+ pFrame->IsInSplitTableRow() ) )
{
- pFrm->InvalidatePos();
+ pFrame->InvalidatePos();
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
return bRet;
}
-void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
+void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
- OSL_ENSURE( pAttrs, "CellFrm::Format, pAttrs ist 0." );
- const SwTabFrm* pTab = FindTabFrm();
+ OSL_ENSURE( pAttrs, "CellFrame::Format, pAttrs ist 0." );
+ const SwTabFrame* pTab = FindTabFrame();
SWRECTFN( pTab )
if ( !mbValidPrtArea )
@@ -4683,13 +4683,13 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
{
SwTwips nTopSpace, nBottomSpace, nLeftSpace, nRightSpace;
// #i29550#
- if ( pTab->IsCollapsingBorders() && !Lower()->IsRowFrm() )
+ if ( pTab->IsCollapsingBorders() && !Lower()->IsRowFrame() )
{
const SvxBoxItem& rBoxItem = pAttrs->GetBox();
nLeftSpace = rBoxItem.GetDistance( SvxBoxItemLine::LEFT );
nRightSpace = rBoxItem.GetDistance( SvxBoxItemLine::RIGHT );
- nTopSpace = static_cast<SwRowFrm*>(GetUpper())->GetTopMarginForLowers();
- nBottomSpace = static_cast<SwRowFrm*>(GetUpper())->GetBottomMarginForLowers();
+ nTopSpace = static_cast<SwRowFrame*>(GetUpper())->GetTopMarginForLowers();
+ nBottomSpace = static_cast<SwRowFrame*>(GetUpper())->GetBottomMarginForLowers();
}
else
{
@@ -4711,18 +4711,18 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
{
mbValidSize = true;
- //The VarSize of the CellFrms is always the width.
+ //The VarSize of the CellFrames is always the width.
//The width is not variable though, it is defined by the format.
//This predefined value however does not necessary match the actual
//width. The width is calculated based on the attribute, the value in
- //the attribute matches the desired value of the TabFrm. Changes which
+ //the attribute matches the desired value of the TabFrame. Changes which
//were done there are taken into account here proportionately.
//If the cell doesn't have a neighbour anymore, it does not take the
//attribute into account and takes the rest of the upper instead.
SwTwips nWidth;
if ( GetNext() )
{
- const SwTwips nWish = pTab->GetFormat()->GetFrmSize().GetWidth();
+ const SwTwips nWish = pTab->GetFormat()->GetFrameSize().GetWidth();
nWidth = pAttrs->GetSize().Width();
OSL_ENSURE( nWish, "Table without width?" );
@@ -4745,7 +4745,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
do
{
pTmpBox = rBoxes[ i++ ];
- nSumWidth += pTmpBox->GetFrameFormat()->GetFrmSize().GetWidth();
+ nSumWidth += pTmpBox->GetFrameFormat()->GetFrameSize().GetWidth();
}
while ( pTmpBox != GetTabBox() );
@@ -4756,11 +4756,11 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
nWidth = (SwTwips)nTmpWidth;
// 3. calculate frame widths of cells up to this one:
- const SwFrm* pTmpCell = static_cast<const SwLayoutFrm*>(GetUpper())->Lower();
+ const SwFrame* pTmpCell = static_cast<const SwLayoutFrame*>(GetUpper())->Lower();
SwTwips nSumFrameWidths = 0;
while ( pTmpCell != this )
{
- nSumFrameWidths += (pTmpCell->Frm().*fnRect->fnGetWidth)();
+ nSumFrameWidths += (pTmpCell->Frame().*fnRect->fnGetWidth)();
pTmpCell = pTmpCell->GetNext();
}
@@ -4781,22 +4781,22 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
{
OSL_ENSURE( pAttrs->GetSize().Width() > 0, "Box without width" );
nWidth = (GetUpper()->Prt().*fnRect->fnGetWidth)();
- SwFrm *pPre = GetUpper()->Lower();
+ SwFrame *pPre = GetUpper()->Lower();
while ( pPre != this )
{
- nWidth -= (pPre->Frm().*fnRect->fnGetWidth)();
+ nWidth -= (pPre->Frame().*fnRect->fnGetWidth)();
pPre = pPre->GetNext();
}
}
- const long nDiff = nWidth - (Frm().*fnRect->fnGetWidth)();
- if( IsNeighbourFrm() && IsRightToLeft() )
- (Frm().*fnRect->fnSubLeft)( nDiff );
+ const long nDiff = nWidth - (Frame().*fnRect->fnGetWidth)();
+ if( IsNeighbourFrame() && IsRightToLeft() )
+ (Frame().*fnRect->fnSubLeft)( nDiff );
else
- (Frm().*fnRect->fnAddRight)( nDiff );
+ (Frame().*fnRect->fnAddRight)( nDiff );
(Prt().*fnRect->fnAddRight)( nDiff );
//Adjust the height, it's defined through the content and the border.
- const long nDiffHeight = nRemaining - (Frm().*fnRect->fnGetHeight)();
+ const long nDiffHeight = nRemaining - (Frame().*fnRect->fnGetHeight)();
if ( nDiffHeight )
{
if ( nDiffHeight > 0 )
@@ -4823,13 +4823,13 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
// From now on, all operations are related to the table cell.
SWREFRESHFN( this )
- SwPageFrm* pPg = nullptr;
- if ( !FindTabFrm()->IsRebuildLastLine() && text::VertOrientation::NONE != rOri.GetVertOrient() &&
+ SwPageFrame* pPg = nullptr;
+ if ( !FindTabFrame()->IsRebuildLastLine() && text::VertOrientation::NONE != rOri.GetVertOrient() &&
// #158225# no vertical alignment of covered cells
!IsCoveredCell() &&
- (pPg = FindPageFrm())!=nullptr )
+ (pPg = FindPageFrame())!=nullptr )
{
- if ( !Lower()->IsContentFrm() && !Lower()->IsSctFrm() && !Lower()->IsTabFrm() )
+ if ( !Lower()->IsContentFrame() && !Lower()->IsSctFrame() && !Lower()->IsTabFrame() )
{
// OSL_ENSURE(for HTML-import!
OSL_ENSURE( false, "VAlign to cell without content" );
@@ -4843,7 +4843,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
//No alignment if border with flow overlaps the cell.
if ( pPg->GetSortedObjs() )
{
- SwRect aRect( Prt() ); aRect += Frm().Pos();
+ SwRect aRect( Prt() ); aRect += Frame().Pos();
for ( size_t i = 0; i < pPg->GetSortedObjs()->size(); ++i )
{
const SwAnchoredObject* pAnchoredObj = (*pPg->GetSortedObjs())[i];
@@ -4856,15 +4856,15 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
if ( SURROUND_THROUGHT != rSur.GetSurround() )
{
// frames, which the cell is a lower of, aren't relevant
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- const SwFlyFrm *pFly =
- static_cast<const SwFlyFrm*>(pAnchoredObj);
+ const SwFlyFrame *pFly =
+ static_cast<const SwFlyFrame*>(pAnchoredObj);
if ( pFly->IsAnLower( this ) )
continue;
}
- const SwFrm* pAnch = pAnchoredObj->GetAnchorFrm();
+ const SwFrame* pAnch = pAnchoredObj->GetAnchorFrame();
// #i43913#
// #i52904# - no vertical alignment,
// if object, anchored inside cell, has temporarly
@@ -4886,7 +4886,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
long nPrtHeight = (Prt().*fnRect->fnGetHeight)();
if( ( bVertDir && ( nRemaining -= lcl_CalcTopAndBottomMargin( *this, *pAttrs ) ) < nPrtHeight ) ||
- (Lower()->Frm().*fnRect->fnGetTop)() != (this->*fnRect->fnGetPrtTop)() )
+ (Lower()->Frame().*fnRect->fnGetTop)() != (this->*fnRect->fnGetPrtTop)() )
{
long nDiff = (Prt().*fnRect->fnGetHeight)() - nRemaining;
if ( nDiff >= 0 )
@@ -4911,7 +4911,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
else
{
//Was an old alignment taken into account?
- if ( Lower()->IsContentFrm() )
+ if ( Lower()->IsContentFrame() )
{
const long lYStart = (this->*fnRect->fnGetPrtTop)();
lcl_ArrangeLowers( this, lYStart, true );
@@ -4919,7 +4919,7 @@ void SwCellFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAt
}
}
-void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwCellFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which();
const SfxPoolItem *pItem = nullptr;
@@ -4934,7 +4934,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
bool bInva = true;
if ( text::VertOrientation::NONE == static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient() &&
// OD 04.11.2003 #112910#
- Lower() && Lower()->IsContentFrm() )
+ Lower() && Lower()->IsContentFrame() )
{
SWRECTFN( this )
const long lYStart = (this->*fnRect->fnGetPrtTop)();
@@ -4951,7 +4951,7 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_PROTECT, false ) ) ||
( pNew && RES_PROTECT == pNew->Which()) )
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh && pSh->GetLayout()->IsAnyShellAccessible() )
pSh->Imp()->InvalidateAccessibleEditableState( true, this );
}
@@ -4967,33 +4967,33 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( bAttrSetChg && pNew &&
SfxItemState::SET == static_cast<const SwAttrSetChg*>(pNew)->GetChgSet()->GetItemState( RES_BOX, false, &pItem ) )
{
- SwFrm* pTmpUpper = GetUpper();
- while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrm() )
+ SwFrame* pTmpUpper = GetUpper();
+ while ( pTmpUpper->GetUpper() && !pTmpUpper->GetUpper()->IsTabFrame() )
pTmpUpper = pTmpUpper->GetUpper();
- SwTabFrm* pTabFrm = static_cast<SwTabFrm*>(pTmpUpper->GetUpper());
- if ( pTabFrm->IsCollapsingBorders() )
+ SwTabFrame* pTabFrame = static_cast<SwTabFrame*>(pTmpUpper->GetUpper());
+ if ( pTabFrame->IsCollapsingBorders() )
{
// Invalidate lowers of this and next row:
- lcl_InvalidateAllLowersPrt( static_cast<SwRowFrm*>(pTmpUpper) );
+ lcl_InvalidateAllLowersPrt( static_cast<SwRowFrame*>(pTmpUpper) );
pTmpUpper = pTmpUpper->GetNext();
if ( pTmpUpper )
- lcl_InvalidateAllLowersPrt( static_cast<SwRowFrm*>(pTmpUpper) );
+ lcl_InvalidateAllLowersPrt( static_cast<SwRowFrame*>(pTmpUpper) );
else
- pTabFrm->InvalidatePrt();
+ pTabFrame->InvalidatePrt();
}
}
- SwLayoutFrm::Modify( pOld, pNew );
+ SwLayoutFrame::Modify( pOld, pNew );
}
-long SwCellFrm::GetLayoutRowSpan() const
+long SwCellFrame::GetLayoutRowSpan() const
{
long nRet = GetTabBox()->getRowSpan();
if ( nRet < 1 )
{
- const SwFrm* pRow = GetUpper();
- const SwTabFrm* pTab = pRow ? static_cast<const SwTabFrm*>(pRow->GetUpper()) : nullptr;
+ const SwFrame* pRow = GetUpper();
+ const SwTabFrame* pTab = pRow ? static_cast<const SwTabFrame*>(pRow->GetUpper()) : nullptr;
if ( pTab && pTab->IsFollow() && pRow == pTab->GetFirstNonHeadlineRow() )
nRet = -nRet;
@@ -5002,36 +5002,36 @@ long SwCellFrm::GetLayoutRowSpan() const
}
// #i103961#
-void SwCellFrm::Cut()
+void SwCellFrame::Cut()
{
// notification for accessibility
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() )
{
- SwViewShell* pVSh = pRootFrm->GetCurrShell();
+ SwViewShell* pVSh = pRootFrame->GetCurrShell();
if ( pVSh && pVSh->Imp() )
{
- pVSh->Imp()->DisposeAccessibleFrm( this );
+ pVSh->Imp()->DisposeAccessibleFrame( this );
}
}
}
- SwLayoutFrm::Cut();
+ SwLayoutFrame::Cut();
}
// Helper functions for repeated headlines:
-bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const
+bool SwTabFrame::IsInHeadline( const SwFrame& rFrame ) const
{
- OSL_ENSURE( IsAnLower( &rFrm ) && rFrm.IsInTab(),
- "SwTabFrm::IsInHeadline called for frame not lower of table" );
+ OSL_ENSURE( IsAnLower( &rFrame ) && rFrame.IsInTab(),
+ "SwTabFrame::IsInHeadline called for frame not lower of table" );
- const SwFrm* pTmp = &rFrm;
- while ( !pTmp->GetUpper()->IsTabFrm() )
+ const SwFrame* pTmp = &rFrame;
+ while ( !pTmp->GetUpper()->IsTabFrame() )
pTmp = pTmp->GetUpper();
- return GetTable()->IsHeadline( *static_cast<const SwRowFrm*>(pTmp)->GetTabLine() );
+ return GetTable()->IsHeadline( *static_cast<const SwRowFrame*>(pTmp)->GetTabLine() );
}
/*
@@ -5041,22 +5041,22 @@ bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const
* layout, e.g., during deletion of rows, which makes it necessary to find
* the first non-headline row by evaluating the headline flag at the row frame.
*/
-SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const
+SwRowFrame* SwTabFrame::GetFirstNonHeadlineRow() const
{
- SwRowFrm* pRet = const_cast<SwRowFrm*>(static_cast<const SwRowFrm*>(Lower()));
+ SwRowFrame* pRet = const_cast<SwRowFrame*>(static_cast<const SwRowFrame*>(Lower()));
if ( pRet )
{
if ( IsFollow() )
{
while ( pRet && pRet->IsRepeatedHeadline() )
- pRet = static_cast<SwRowFrm*>(pRet->GetNext());
+ pRet = static_cast<SwRowFrame*>(pRet->GetNext());
}
else
{
sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
while ( pRet && nRepeat > 0 )
{
- pRet = static_cast<SwRowFrm*>(pRet->GetNext());
+ pRet = static_cast<SwRowFrame*>(pRet->GetNext());
--nRepeat;
}
}
@@ -5074,40 +5074,40 @@ bool SwTable::IsHeadline( const SwTableLine& rLine ) const
return false;
}
-bool SwTabFrm::IsLayoutSplitAllowed() const
+bool SwTabFrame::IsLayoutSplitAllowed() const
{
return GetFormat()->GetLayoutSplit().GetValue();
}
// #i29550#
-sal_uInt16 SwTabFrm::GetBottomLineSize() const
+sal_uInt16 SwTabFrame::GetBottomLineSize() const
{
OSL_ENSURE( IsCollapsingBorders(),
"BottomLineSize only required for collapsing borders" );
OSL_ENSURE( Lower(), "Warning! Trying to prevent a crash" );
- const SwFrm* pTmp = GetLastLower();
+ const SwFrame* pTmp = GetLastLower();
// #124755# Try to make code robust
if ( !pTmp ) return 0;
- return static_cast<const SwRowFrm*>(pTmp)->GetBottomLineSize();
+ return static_cast<const SwRowFrame*>(pTmp)->GetBottomLineSize();
}
-bool SwTabFrm::IsCollapsingBorders() const
+bool SwTabFrame::IsCollapsingBorders() const
{
return static_cast<const SfxBoolItem&>(GetFormat()->GetAttrSet().Get( RES_COLLAPSING_BORDERS )).GetValue();
}
/// Local helper function to calculate height of first text row
-static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine )
+static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine )
{
// Find corresponding split line in master table
- const SwTabFrm* pTab = rSourceLine.FindTabFrm();
+ const SwTabFrame* pTab = rSourceLine.FindTabFrame();
SWRECTFN( pTab )
- const SwCellFrm* pCurrSourceCell = static_cast<const SwCellFrm*>(rSourceLine.Lower());
+ const SwCellFrame* pCurrSourceCell = static_cast<const SwCellFrame*>(rSourceLine.Lower());
// 1. Case: rSourceLine is a follow flow line.
// In this case we have to return the minimum of the heights
@@ -5126,78 +5126,78 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine )
// the follow flow line:
if ( bIsInFollowFlowLine && pCurrSourceCell->GetLayoutRowSpan() > 1 )
{
- pCurrSourceCell = static_cast<const SwCellFrm*>(pCurrSourceCell->GetNext());
+ pCurrSourceCell = static_cast<const SwCellFrame*>(pCurrSourceCell->GetNext());
continue;
}
- const SwFrm *pTmp = pCurrSourceCell->Lower();
+ const SwFrame *pTmp = pCurrSourceCell->Lower();
if ( pTmp )
{
SwTwips nTmpHeight = USHRT_MAX;
// #i32456# Consider lower row frames
- if ( pTmp->IsRowFrm() )
+ if ( pTmp->IsRowFrame() )
{
- const SwRowFrm* pTmpSourceRow = static_cast<const SwRowFrm*>(pCurrSourceCell->Lower());
+ const SwRowFrame* pTmpSourceRow = static_cast<const SwRowFrame*>(pCurrSourceCell->Lower());
nTmpHeight = lcl_CalcHeightOfFirstContentLine( *pTmpSourceRow );
}
- if ( pTmp->IsTabFrm() )
+ if ( pTmp->IsTabFrame() )
{
- nTmpHeight = static_cast<const SwTabFrm*>(pTmp)->CalcHeightOfFirstContentLine();
+ nTmpHeight = static_cast<const SwTabFrame*>(pTmp)->CalcHeightOfFirstContentLine();
}
- else if ( pTmp->IsTextFrm() )
+ else if ( pTmp->IsTextFrame() )
{
- SwTextFrm* pTextFrm = const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pTmp));
- pTextFrm->GetFormatted();
- nTmpHeight = pTextFrm->FirstLineHeight();
+ SwTextFrame* pTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp));
+ pTextFrame->GetFormatted();
+ nTmpHeight = pTextFrame->FirstLineHeight();
}
if ( USHRT_MAX != nTmpHeight )
{
- const SwCellFrm* pPrevCell = pCurrSourceCell->GetPreviousCell();
+ const SwCellFrame* pPrevCell = pCurrSourceCell->GetPreviousCell();
if ( pPrevCell )
{
// If we are in a split row, there may be some space
// left in the cell frame of the master row.
// We look for the minimum of all first line heights;
SwTwips nReal = (pPrevCell->Prt().*fnRect->fnGetHeight)();
- const SwFrm* pFrm = pPrevCell->Lower();
- const SwFrm* pLast = pFrm;
- while ( pFrm )
+ const SwFrame* pFrame = pPrevCell->Lower();
+ const SwFrame* pLast = pFrame;
+ while ( pFrame )
{
- nReal -= (pFrm->Frm().*fnRect->fnGetHeight)();
- pLast = pFrm;
- pFrm = pFrm->GetNext();
+ nReal -= (pFrame->Frame().*fnRect->fnGetHeight)();
+ pLast = pFrame;
+ pFrame = pFrame->GetNext();
}
// #i26831#, #i26520#
// The additional lower space of the current last.
// #115759# - do *not* consider the
// additional lower space for 'master' text frames
- if ( pLast && pLast->IsFlowFrm() &&
- ( !pLast->IsTextFrm() ||
- !static_cast<const SwTextFrm*>(pLast)->GetFollow() ) )
+ if ( pLast && pLast->IsFlowFrame() &&
+ ( !pLast->IsTextFrame() ||
+ !static_cast<const SwTextFrame*>(pLast)->GetFollow() ) )
{
- nReal += SwFlowFrm::CastFlowFrm(pLast)->CalcAddLowerSpaceAsLastInTableCell();
+ nReal += SwFlowFrame::CastFlowFrame(pLast)->CalcAddLowerSpaceAsLastInTableCell();
}
// Don't forget the upper space and lower space,
// #115759# - do *not* consider the upper
// and the lower space for follow text frames.
- if ( pTmp->IsFlowFrm() &&
- ( !pTmp->IsTextFrm() ||
- !static_cast<const SwTextFrm*>(pTmp)->IsFollow() ) )
+ if ( pTmp->IsFlowFrame() &&
+ ( !pTmp->IsTextFrame() ||
+ !static_cast<const SwTextFrame*>(pTmp)->IsFollow() ) )
{
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace( nullptr, pLast);
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcLowerSpace();
+ nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcUpperSpace( nullptr, pLast);
+ nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcLowerSpace();
}
// #115759# - consider additional lower
// space of <pTmp>, if contains only one line.
// In this case it would be the new last text frame, which
// would have no follow and thus would add this space.
- if ( pTmp->IsTextFrm() &&
- const_cast<SwTextFrm*>(static_cast<const SwTextFrm*>(pTmp))
+ if ( pTmp->IsTextFrame() &&
+ const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp))
->GetLineCount( COMPLETE_STRING ) == 1 )
{
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)
+ nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)
->CalcAddLowerSpaceAsLastInTableCell();
}
if ( nReal > 0 )
@@ -5207,15 +5207,15 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine )
{
// pFirstRow is not a FollowFlowRow. In this case,
// we look for the maximum of all first line heights:
- SwBorderAttrAccess aAccess( SwFrm::GetCache(), pCurrSourceCell );
+ SwBorderAttrAccess aAccess( SwFrame::GetCache(), pCurrSourceCell );
const SwBorderAttrs &rAttrs = *aAccess.Get();
nTmpHeight += rAttrs.CalcTop() + rAttrs.CalcBottom();
// #i26250#
// Don't forget the upper space and lower space,
- if ( pTmp->IsFlowFrm() )
+ if ( pTmp->IsFlowFrame() )
{
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcUpperSpace();
- nTmpHeight += SwFlowFrm::CastFlowFrm(pTmp)->CalcLowerSpace();
+ nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcUpperSpace();
+ nTmpHeight += SwFlowFrame::CastFlowFrame(pTmp)->CalcLowerSpace();
}
}
}
@@ -5234,14 +5234,14 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine )
}
}
- pCurrSourceCell = static_cast<const SwCellFrm*>(pCurrSourceCell->GetNext());
+ pCurrSourceCell = static_cast<const SwCellFrame*>(pCurrSourceCell->GetNext());
}
return ( LONG_MAX == nHeight ) ? 0 : nHeight;
}
/// Function to calculate height of first text row
-SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
+SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const
{
SWRECTFN( this )
@@ -5250,17 +5250,17 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
if ( bDontSplit )
{
// Table is not allowed to split: Take the whole height, that's all
- return (Frm().*fnRect->fnGetHeight)();
+ return (Frame().*fnRect->fnGetHeight)();
}
SwTwips nTmpHeight = 0;
- SwRowFrm* pFirstRow = GetFirstNonHeadlineRow();
+ SwRowFrame* pFirstRow = GetFirstNonHeadlineRow();
OSL_ENSURE( !IsFollow() || pFirstRow, "FollowTable without Lower" );
// NEW TABLES
if ( pFirstRow && pFirstRow->IsRowSpanLine() && pFirstRow->GetNext() )
- pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext());
+ pFirstRow = static_cast<SwRowFrame*>(pFirstRow->GetNext());
// Calculate the height of the headlines:
const sal_uInt16 nRepeat = GetTable()->GetRowsToRepeat();
@@ -5277,7 +5277,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
while ( pFirstRow && pFirstRow->ShouldRowKeepWithNext() )
{
++nKeepRows;
- pFirstRow = static_cast<SwRowFrm*>(pFirstRow->GetNext());
+ pFirstRow = static_cast<SwRowFrame*>(pFirstRow->GetNext());
}
if ( nKeepRows > nRepeat )
@@ -5301,7 +5301,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
if ( pFirstRow )
{
const bool bSplittable = pFirstRow->IsRowSplitAllowed();
- const SwTwips nFirstLineHeight = (pFirstRow->Frm().*fnRect->fnGetHeight)();
+ const SwTwips nFirstLineHeight = (pFirstRow->Frame().*fnRect->fnGetHeight)();
if ( !bSplittable )
{
@@ -5311,11 +5311,11 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
// line as it would be on the last page. Since this is quite complicated to calculate,
// we only calculate the height of the first line.
if ( pFirstRow->GetPrev() &&
- static_cast<SwRowFrm*>(pFirstRow->GetPrev())->IsRowSpanLine() )
+ static_cast<SwRowFrame*>(pFirstRow->GetPrev())->IsRowSpanLine() )
{
// Calculate maximum height of all cells with rowspan = 1:
SwTwips nMaxHeight = 0;
- const SwCellFrm* pLower2 = static_cast<const SwCellFrm*>(pFirstRow->Lower());
+ const SwCellFrame* pLower2 = static_cast<const SwCellFrame*>(pFirstRow->Lower());
while ( pLower2 )
{
if ( 1 == pLower2->GetTabBox()->getRowSpan() )
@@ -5323,7 +5323,7 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
const SwTwips nCellHeight = lcl_CalcMinCellHeight( pLower2, true );
nMaxHeight = std::max( nCellHeight, nMaxHeight );
}
- pLower2 = static_cast<const SwCellFrm*>(pLower2->GetNext());
+ pLower2 = static_cast<const SwCellFrame*>(pLower2->GetNext());
}
nTmpHeight += nMaxHeight;
}
@@ -5339,18 +5339,18 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
else if ( 0 != nFirstLineHeight )
{
const bool bOldJoinLock = IsJoinLocked();
- const_cast<SwTabFrm*>(this)->LockJoin();
+ const_cast<SwTabFrame*>(this)->LockJoin();
const SwTwips nHeightOfFirstContentLine = lcl_CalcHeightOfFirstContentLine( *pFirstRow );
// Consider minimum row height:
- const SwFormatFrmSize &rSz = static_cast<const SwRowFrm*>(pFirstRow)->GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = static_cast<const SwRowFrame*>(pFirstRow)->GetFormat()->GetFrameSize();
const SwTwips nMinRowHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
rSz.GetHeight() : 0;
nTmpHeight += std::max( nHeightOfFirstContentLine, nMinRowHeight );
if ( !bOldJoinLock )
- const_cast<SwTabFrm*>(this)->UnlockJoin();
+ const_cast<SwTabFrame*>(this)->UnlockJoin();
}
}
@@ -5358,26 +5358,26 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const
}
// Some more functions for covered/covering cells. This way inclusion of
-// SwCellFrm can be avoided
+// SwCellFrame can be avoided
-bool SwFrm::IsLeaveUpperAllowed() const
+bool SwFrame::IsLeaveUpperAllowed() const
{
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
return pThisCell && pThisCell->GetLayoutRowSpan() > 1;
}
-bool SwFrm::IsCoveredCell() const
+bool SwFrame::IsCoveredCell() const
{
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
return pThisCell && pThisCell->GetLayoutRowSpan() < 1;
}
-bool SwFrm::IsInCoveredCell() const
+bool SwFrame::IsInCoveredCell() const
{
bool bRet = false;
- const SwFrm* pThis = this;
- while ( pThis && !pThis->IsCellFrm() )
+ const SwFrame* pThis = this;
+ while ( pThis && !pThis->IsCellFrame() )
pThis = pThis->GetUpper();
if ( pThis )
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index ce7182388964..aa8673225901 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -49,12 +49,12 @@
#include <swselectionlist.hxx>
namespace {
- bool lcl_GetCrsrOfst_Objects( const SwPageFrm* pPageFrm, bool bSearchBackground,
- SwPosition *pPos, Point& rPoint, SwCrsrMoveState* pCMS )
+ bool lcl_GetCursorOfst_Objects( const SwPageFrame* pPageFrame, bool bSearchBackground,
+ SwPosition *pPos, Point& rPoint, SwCursorMoveState* pCMS )
{
bool bRet = false;
Point aPoint( rPoint );
- SwOrderIter aIter( pPageFrm );
+ SwOrderIter aIter( pPageFrame );
aIter.Top();
while ( aIter() )
{
@@ -68,11 +68,11 @@ namespace {
bool bBackgroundMatches = ( bInBackground && bSearchBackground ) ||
( !bInBackground && !bSearchBackground );
- const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr;
+ const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr;
if ( pFly && bBackgroundMatches &&
( ( pCMS && pCMS->m_bSetInReadOnly ) ||
!pFly->IsProtected() ) &&
- pFly->GetCrsrOfst( pPos, aPoint, pCMS ) )
+ pFly->GetCursorOfst( pPos, aPoint, pCMS ) )
{
bRet = true;
break;
@@ -101,65 +101,65 @@ namespace {
}
}
-//For SwFlyFrm::GetCrsrOfst
-class SwCrsrOszControl
+//For SwFlyFrame::GetCursorOfst
+class SwCursorOszControl
{
public:
// So the compiler can initialize the class already. No DTOR and member
// as public members
- const SwFlyFrm *pEntry;
- const SwFlyFrm *pStk1;
- const SwFlyFrm *pStk2;
+ const SwFlyFrame *pEntry;
+ const SwFlyFrame *pStack1;
+ const SwFlyFrame *pStack2;
- bool ChkOsz( const SwFlyFrm *pFly )
+ bool ChkOsz( const SwFlyFrame *pFly )
{
bool bRet = true;
- if ( pFly != pStk1 && pFly != pStk2 )
+ if ( pFly != pStack1 && pFly != pStack2 )
{
- pStk1 = pStk2;
- pStk2 = pFly;
+ pStack1 = pStack2;
+ pStack2 = pFly;
bRet = false;
}
return bRet;
}
- void Entry( const SwFlyFrm *pFly )
+ void Entry( const SwFlyFrame *pFly )
{
if ( !pEntry )
- pEntry = pStk1 = pFly;
+ pEntry = pStack1 = pFly;
}
- void Exit( const SwFlyFrm *pFly )
+ void Exit( const SwFlyFrame *pFly )
{
if ( pFly == pEntry )
- pEntry = pStk1 = pStk2 = nullptr;
+ pEntry = pStack1 = pStack2 = nullptr;
}
};
-static SwCrsrOszControl g_OszCtrl = { nullptr, nullptr, nullptr };
+static SwCursorOszControl g_OszCtrl = { nullptr, nullptr, nullptr };
-/** Searches the ContentFrm owning the PrtArea containing the point. */
-bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
- SwCrsrMoveState* pCMS, bool ) const
+/** Searches the ContentFrame owning the PrtArea containing the point. */
+bool SwLayoutFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
+ SwCursorMoveState* pCMS, bool ) const
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
bool bRet = false;
- const SwFrm *pFrm = Lower();
- while ( !bRet && pFrm )
+ const SwFrame *pFrame = Lower();
+ while ( !bRet && pFrame )
{
- pFrm->Calc(pRenderContext);
+ pFrame->Calc(pRenderContext);
// #i43742# New function
- const bool bContentCheck = pFrm->IsTextFrm() && pCMS && pCMS->m_bContentCheck;
+ const bool bContentCheck = pFrame->IsTextFrame() && pCMS && pCMS->m_bContentCheck;
const SwRect aPaintRect( bContentCheck ?
- pFrm->UnionFrm() :
- pFrm->PaintArea() );
+ pFrame->UnionFrame() :
+ pFrame->PaintArea() );
if ( aPaintRect.IsInside( rPoint ) &&
- ( bContentCheck || pFrm->GetCrsrOfst( pPos, rPoint, pCMS ) ) )
+ ( bContentCheck || pFrame->GetCursorOfst( pPos, rPoint, pCMS ) ) )
bRet = true;
else
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
if ( pCMS && pCMS->m_bStop )
return false;
}
@@ -168,30 +168,30 @@ bool SwLayoutFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
/** Searches the page containing the searched point. */
-bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
- SwCrsrMoveState* pCMS, bool bTestBackground ) const
+bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
+ SwCursorMoveState* pCMS, bool bTestBackground ) const
{
bool bRet = false;
Point aPoint( rPoint );
// check, if we have to adjust the point
- if ( !Frm().IsInside( aPoint ) )
+ if ( !Frame().IsInside( aPoint ) )
{
- aPoint.X() = std::max( aPoint.X(), Frm().Left() );
- aPoint.X() = std::min( aPoint.X(), Frm().Right() );
- aPoint.Y() = std::max( aPoint.Y(), Frm().Top() );
- aPoint.Y() = std::min( aPoint.Y(), Frm().Bottom() );
+ aPoint.X() = std::max( aPoint.X(), Frame().Left() );
+ aPoint.X() = std::min( aPoint.X(), Frame().Right() );
+ aPoint.Y() = std::max( aPoint.Y(), Frame().Top() );
+ aPoint.Y() = std::min( aPoint.Y(), Frame().Bottom() );
}
bool bTextRet = false;
bool bBackRet = false;
//Could it be a free flying one?
- //If his content should be protected, we can't set the Crsr in it, thus
+ //If his content should be protected, we can't set the Cursor in it, thus
//all changes should be impossible.
if ( GetSortedObjs() )
{
- bRet = lcl_GetCrsrOfst_Objects( this, false, pPos, rPoint, pCMS );
+ bRet = lcl_GetCursorOfst_Objects( this, false, pPos, rPoint, pCMS );
}
if ( !bRet )
@@ -202,7 +202,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//We fix the StartPoint if no Content below the page 'answers' and then
//start all over again one page before the current one.
//However we can't use Flys in such a case.
- if ( SwLayoutFrm::GetCrsrOfst( &aTextPos, aPoint, pCMS ) )
+ if ( SwLayoutFrame::GetCursorOfst( &aTextPos, aPoint, pCMS ) )
{
bTextRet = true;
}
@@ -210,18 +210,18 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
{
if ( pCMS && (pCMS->m_bStop || pCMS->m_bExactOnly) )
{
- static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true;
+ static_cast<SwCursorMoveState*>(pCMS)->m_bStop = true;
return false;
}
- const SwContentFrm *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false );
+ const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false );
if ( pCMS && pCMS->m_bStop )
return false;
- OSL_ENSURE( pCnt, "Crsr is gone to a Black hole" );
- if( pCMS && pCMS->m_pFill && pCnt->IsTextFrm() )
- bTextRet = pCnt->GetCrsrOfst( &aTextPos, rPoint, pCMS );
+ OSL_ENSURE( pCnt, "Cursor is gone to a Black hole" );
+ if( pCMS && pCMS->m_pFill && pCnt->IsTextFrame() )
+ bTextRet = pCnt->GetCursorOfst( &aTextPos, rPoint, pCMS );
else
- bTextRet = pCnt->GetCrsrOfst( &aTextPos, aPoint, pCMS );
+ bTextRet = pCnt->GetCursorOfst( &aTextPos, aPoint, pCMS );
if ( !bTextRet )
{
@@ -250,7 +250,7 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
// Check objects in the background if nothing else matched
if ( GetSortedObjs() )
{
- bBackRet = lcl_GetCrsrOfst_Objects( this, true, &aBackPos, rPoint, pCMS );
+ bBackRet = lcl_GetCursorOfst_Objects( this, true, &aBackPos, rPoint, pCMS );
}
if ( ( bConsiderBackground && bTestBackground && bBackRet ) || !bTextRet )
@@ -273,18 +273,18 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
bool bValidTextDistance = false;
if (pContentNode)
{
- SwContentFrm* pTextFrm = pContentNode->getLayoutFrm( getRootFrm( ) );
+ SwContentFrame* pTextFrame = pContentNode->getLayoutFrame( getRootFrame( ) );
// try this again but prefer the "previous" position
- SwCrsrMoveState aMoveState;
- SwCrsrMoveState *const pState((pCMS) ? pCMS : &aMoveState);
+ SwCursorMoveState aMoveState;
+ SwCursorMoveState *const pState((pCMS) ? pCMS : &aMoveState);
comphelper::FlagRestorationGuard g(
pState->m_bPosMatchesBounds, true);
SwPosition prevTextPos(*pPos);
- SwLayoutFrm::GetCrsrOfst(&prevTextPos, aPoint, pState);
+ SwLayoutFrame::GetCursorOfst(&prevTextPos, aPoint, pState);
SwRect aTextRect;
- pTextFrm->GetCharRect(aTextRect, prevTextPos);
+ pTextFrame->GetCharRect(aTextRect, prevTextPos);
if (prevTextPos.nContent < pContentNode->Len())
{
@@ -295,8 +295,8 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
SwPosition const nextTextPos(prevTextPos.nNode,
SwIndex(prevTextPos.nContent, +1));
SwRect nextTextRect;
- pTextFrm->GetCharRect(nextTextRect, nextTextPos);
- SWRECTFN(pTextFrm);
+ pTextFrame->GetCharRect(nextTextRect, nextTextPos);
+ SWRECTFN(pTextFrame);
if ((aTextRect.*fnRect->fnGetTop)() ==
(nextTextRect.*fnRect->fnGetTop)()) // same line?
{
@@ -325,11 +325,11 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if ( pBackNd && bConsiderBackground)
{
// FIXME There are still cases were we don't have the proper node here.
- SwContentFrm* pBackFrm = pBackNd->getLayoutFrm( getRootFrm( ) );
+ SwContentFrame* pBackFrame = pBackNd->getLayoutFrame( getRootFrame( ) );
SwRect rBackRect;
- if (pBackFrm)
+ if (pBackFrame)
{
- pBackFrm->GetCharRect( rBackRect, aBackPos );
+ pBackFrame->GetCharRect( rBackRect, aBackPos );
nBackDistance = lcl_getDistance( rBackRect, rPoint );
bValidBackDistance = true;
@@ -355,36 +355,36 @@ bool SwPageFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
return bRet;
}
-bool SwLayoutFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const
+bool SwLayoutFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const
{
bool bRet = false;
if( rRect.IsOver(PaintArea()) )
{
- const SwFrm* pFrm = Lower();
- while( pFrm )
+ const SwFrame* pFrame = Lower();
+ while( pFrame )
{
- pFrm->FillSelection( rList, rRect );
- pFrm = pFrm->GetNext();
+ pFrame->FillSelection( rList, rRect );
+ pFrame = pFrame->GetNext();
}
}
return bRet;
}
-bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const
+bool SwPageFrame::FillSelection( SwSelectionList& rList, const SwRect& rRect ) const
{
bool bRet = false;
if( rRect.IsOver(PaintArea()) )
{
- bRet = SwLayoutFrm::FillSelection( rList, rRect );
+ bRet = SwLayoutFrame::FillSelection( rList, rRect );
if( GetSortedObjs() )
{
const SwSortedObjs &rObjs = *GetSortedObjs();
for ( size_t i = 0; i < rObjs.size(); ++i )
{
const SwAnchoredObject* pAnchoredObj = rObjs[i];
- if( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr )
+ if( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr )
continue;
- const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
+ const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
if( pFly->FillSelection( rList, rRect ) )
bRet = true;
}
@@ -393,15 +393,15 @@ bool SwPageFrm::FillSelection( SwSelectionList& rList, const SwRect& rRect ) con
return bRet;
}
-bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) const
+bool SwRootFrame::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) const
{
- const SwFrm *pPage = Lower();
+ const SwFrame *pPage = Lower();
const long nBottom = rRect.Bottom();
while( pPage )
{
- if( pPage->Frm().Top() < nBottom )
+ if( pPage->Frame().Top() < nBottom )
{
- if( pPage->Frm().Bottom() > rRect.Top() )
+ if( pPage->Frame().Bottom() > rRect.Top() )
pPage->FillSelection( aSelList, rRect );
pPage = pPage->GetNext();
}
@@ -415,37 +415,37 @@ bool SwRootFrm::FillSelection( SwSelectionList& aSelList, const SwRect& rRect) c
*
* @return false, if the passed Point gets changed
*/
-bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
- SwCrsrMoveState* pCMS, bool bTestBackground ) const
+bool SwRootFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
+ SwCursorMoveState* pCMS, bool bTestBackground ) const
{
const bool bOldAction = IsCallbackActionEnabled();
- const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false );
- OSL_ENSURE( (Lower() && Lower()->IsPageFrm()), "No PageFrm found." );
+ const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( false );
+ OSL_ENSURE( (Lower() && Lower()->IsPageFrame()), "No PageFrame found." );
if( pCMS && pCMS->m_pFill )
- static_cast<SwCrsrMoveState*>(pCMS)->m_bFillRet = false;
+ static_cast<SwCursorMoveState*>(pCMS)->m_bFillRet = false;
Point aOldPoint = rPoint;
// search for page containing rPoint. The borders around the pages are considered
- const SwPageFrm* pPage = GetPageAtPos( rPoint, nullptr, true );
+ const SwPageFrame* pPage = GetPageAtPos( rPoint, nullptr, true );
// #i95626#
// special handling for <rPoint> beyond root frames area
if ( !pPage &&
- rPoint.X() > Frm().Right() &&
- rPoint.Y() > Frm().Bottom() )
+ rPoint.X() > Frame().Right() &&
+ rPoint.Y() > Frame().Bottom() )
{
- pPage = dynamic_cast<const SwPageFrm*>(Lower());
+ pPage = dynamic_cast<const SwPageFrame*>(Lower());
while ( pPage && pPage->GetNext() )
{
- pPage = dynamic_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = dynamic_cast<const SwPageFrame*>(pPage->GetNext());
}
}
if ( pPage )
{
- pPage->SwPageFrm::GetCrsrOfst( pPos, rPoint, pCMS, bTestBackground );
+ pPage->SwPageFrame::GetCursorOfst( pPos, rPoint, pCMS, bTestBackground );
}
- const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( bOldAction );
+ const_cast<SwRootFrame*>(this)->SetCallbackActionEnabled( bOldAction );
if( pCMS )
{
if( pCMS->m_bStop )
@@ -457,15 +457,15 @@ bool SwRootFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
}
/**
- * If this is about a Content-carrying cell the Crsr will be force inserted into one of the ContentFrms
+ * If this is about a Content-carrying cell the Cursor will be force inserted into one of the ContentFrames
* if there are no other options.
*
* There is no entry for protected cells.
*/
-bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
- SwCrsrMoveState* pCMS, bool ) const
+bool SwCellFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
+ SwCursorMoveState* pCMS, bool ) const
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
// cell frame does not necessarily have a lower (split table cell)
if ( !Lower() )
return false;
@@ -476,45 +476,45 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
if ( pCMS && pCMS->m_eState == MV_TBLSEL )
{
- const SwTabFrm *pTab = FindTabFrm();
+ const SwTabFrame *pTab = FindTabFrame();
if ( pTab->IsFollow() && pTab->IsInHeadline( *this ) )
{
- static_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true;
+ static_cast<SwCursorMoveState*>(pCMS)->m_bStop = true;
return false;
}
}
if ( Lower() )
{
- if ( Lower()->IsLayoutFrm() )
- return SwLayoutFrm::GetCrsrOfst( pPos, rPoint, pCMS );
+ if ( Lower()->IsLayoutFrame() )
+ return SwLayoutFrame::GetCursorOfst( pPos, rPoint, pCMS );
else
{
Calc(pRenderContext);
bool bRet = false;
- const SwFrm *pFrm = Lower();
- while ( pFrm && !bRet )
+ const SwFrame *pFrame = Lower();
+ while ( pFrame && !bRet )
{
- pFrm->Calc(pRenderContext);
- if ( pFrm->Frm().IsInside( rPoint ) )
+ pFrame->Calc(pRenderContext);
+ if ( pFrame->Frame().IsInside( rPoint ) )
{
- bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
+ bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->m_bStop )
return false;
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
if ( !bRet )
{
const bool bFill = pCMS && pCMS->m_pFill;
Point aPoint( rPoint );
- const SwContentFrm *pCnt = GetContentPos( rPoint, true );
- if( bFill && pCnt->IsTextFrm() )
+ const SwContentFrame *pCnt = GetContentPos( rPoint, true );
+ if( bFill && pCnt->IsTextFrame() )
{
rPoint = aPoint;
}
- pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
+ pCnt->GetCursorOfst( pPos, rPoint, pCMS );
}
return true;
}
@@ -528,28 +528,28 @@ bool SwCellFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
//Because we recursively check if a Point doesn't randomly lie inside an other
//fly which lies completely inside the current Fly we could trigger an endless
//loop with the mentioned situation above.
-//Using the helper class SwCrsrOszControl we prevent the recursion. During
-//a recursion GetCrsrOfst picks the one which lies on top.
-bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
- SwCrsrMoveState* pCMS, bool ) const
+//Using the helper class SwCursorOszControl we prevent the recursion. During
+//a recursion GetCursorOfst picks the one which lies on top.
+bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint,
+ SwCursorMoveState* pCMS, bool ) const
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
g_OszCtrl.Entry( this );
- //If the Points lies inside the Fly, we try hard to set the Crsr inside it.
+ //If the Points lies inside the Fly, we try hard to set the Cursor inside it.
//However if the Point sits inside a Fly which is completely located inside
- //the current one, we call GetCrsrOfst for it.
+ //the current one, we call GetCursorOfst for it.
Calc(pRenderContext);
- bool bInside = Frm().IsInside( rPoint ) && Lower();
+ bool bInside = Frame().IsInside( rPoint ) && Lower();
bool bRet = false;
- //If an Frm contains a graphic, but only text was requested, it basically
- //won't accept the Crsr.
+ //If an Frame contains a graphic, but only text was requested, it basically
+ //won't accept the Cursor.
if ( bInside && pCMS && pCMS->m_eState == MV_SETONLYTEXT &&
- (!Lower() || Lower()->IsNoTextFrm()) )
+ (!Lower() || Lower()->IsNoTextFrame()) )
bInside = false;
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
if ( bInside && pPage && pPage->GetSortedObjs() )
{
SwOrderIter aIter( pPage );
@@ -557,13 +557,13 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
while ( aIter() && !bRet )
{
const SwVirtFlyDrawObj* pObj = static_cast<const SwVirtFlyDrawObj*>(aIter());
- const SwFlyFrm* pFly = pObj ? pObj->GetFlyFrm() : nullptr;
- if ( pFly && pFly->Frm().IsInside( rPoint ) &&
- Frm().IsInside( pFly->Frm() ) )
+ const SwFlyFrame* pFly = pObj ? pObj->GetFlyFrame() : nullptr;
+ if ( pFly && pFly->Frame().IsInside( rPoint ) &&
+ Frame().IsInside( pFly->Frame() ) )
{
if (g_OszCtrl.ChkOsz(pFly))
break;
- bRet = pFly->GetCrsrOfst( pPos, rPoint, pCMS );
+ bRet = pFly->GetCursorOfst( pPos, rPoint, pCMS );
if ( bRet )
break;
if ( pCMS && pCMS->m_bStop )
@@ -575,30 +575,30 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
while ( bInside && !bRet )
{
- const SwFrm *pFrm = Lower();
- while ( pFrm && !bRet )
+ const SwFrame *pFrame = Lower();
+ while ( pFrame && !bRet )
{
- pFrm->Calc(pRenderContext);
- if ( pFrm->Frm().IsInside( rPoint ) )
+ pFrame->Calc(pRenderContext);
+ if ( pFrame->Frame().IsInside( rPoint ) )
{
- bRet = pFrm->GetCrsrOfst( pPos, rPoint, pCMS );
+ bRet = pFrame->GetCursorOfst( pPos, rPoint, pCMS );
if ( pCMS && pCMS->m_bStop )
return false;
}
- pFrm = pFrm->GetNext();
+ pFrame = pFrame->GetNext();
}
if ( !bRet )
{
const bool bFill = pCMS && pCMS->m_pFill;
Point aPoint( rPoint );
- const SwContentFrm *pCnt = GetContentPos( rPoint, true, false, false, pCMS );
+ const SwContentFrame *pCnt = GetContentPos( rPoint, true, false, false, pCMS );
if ( pCMS && pCMS->m_bStop )
return false;
- if( bFill && pCnt->IsTextFrm() )
+ if( bFill && pCnt->IsTextFrame() )
{
rPoint = aPoint;
}
- pCnt->GetCrsrOfst( pPos, rPoint, pCMS );
+ pCnt->GetCursorOfst( pPos, rPoint, pCMS );
bRet = true;
}
}
@@ -607,7 +607,7 @@ bool SwFlyFrm::GetCrsrOfst( SwPosition *pPos, Point &rPoint,
}
/** Layout dependent cursor travelling */
-bool SwContentFrm::LeftMargin(SwPaM *pPam) const
+bool SwContentFrame::LeftMargin(SwPaM *pPam) const
{
if( &pPam->GetNode() != GetNode() )
return false;
@@ -616,7 +616,7 @@ bool SwContentFrm::LeftMargin(SwPaM *pPam) const
return true;
}
-bool SwContentFrm::RightMargin(SwPaM *pPam, bool) const
+bool SwContentFrame::RightMargin(SwPaM *pPam, bool) const
{
if( &pPam->GetNode() != GetNode() )
return false;
@@ -625,32 +625,32 @@ bool SwContentFrm::RightMargin(SwPaM *pPam, bool) const
return true;
}
-static const SwContentFrm *lcl_GetNxtCnt( const SwContentFrm* pCnt )
+static const SwContentFrame *lcl_GetNxtCnt( const SwContentFrame* pCnt )
{
- return pCnt->GetNextContentFrm();
+ return pCnt->GetNextContentFrame();
}
-static const SwContentFrm *lcl_GetPrvCnt( const SwContentFrm* pCnt )
+static const SwContentFrame *lcl_GetPrvCnt( const SwContentFrame* pCnt )
{
- return pCnt->GetPrevContentFrm();
+ return pCnt->GetPrevContentFrame();
}
-typedef const SwContentFrm *(*GetNxtPrvCnt)( const SwContentFrm* );
+typedef const SwContentFrame *(*GetNxtPrvCnt)( const SwContentFrame* );
/// Frame in repeated headline?
-static bool lcl_IsInRepeatedHeadline( const SwFrm *pFrm,
- const SwTabFrm** ppTFrm = nullptr )
+static bool lcl_IsInRepeatedHeadline( const SwFrame *pFrame,
+ const SwTabFrame** ppTFrame = nullptr )
{
- const SwTabFrm *pTab = pFrm->FindTabFrm();
- if( ppTFrm )
- *ppTFrm = pTab;
- return pTab && pTab->IsFollow() && pTab->IsInHeadline( *pFrm );
+ const SwTabFrame *pTab = pFrame->FindTabFrame();
+ if( ppTFrame )
+ *ppTFrame = pTab;
+ return pTab && pTab->IsFollow() && pTab->IsInHeadline( *pFrame );
}
/// Skip protected table cells. Optionally also skip repeated headlines.
//MA 1998-01-26: Chg also skip other protected areas
//FME: Skip follow flow cells
-static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt,
+static const SwContentFrame * lcl_MissProtectedFrames( const SwContentFrame *pCnt,
GetNxtPrvCnt fnNxtPrv,
bool bMissHeadline,
bool bInReadOnly,
@@ -661,8 +661,8 @@ static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt,
bool bProtect = true;
while ( pCnt && bProtect )
{
- const SwLayoutFrm *pCell = pCnt->GetUpper();
- while ( pCell && !pCell->IsCellFrm() )
+ const SwLayoutFrame *pCell = pCnt->GetUpper();
+ while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
if ( !pCell ||
(( ( bInReadOnly || !pCell->GetFormat()->GetProtect().IsContentProtected() ) &&
@@ -681,13 +681,13 @@ static const SwContentFrm * lcl_MissProtectedFrames( const SwContentFrm *pCnt,
return pCnt;
}
-static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
+static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
GetNxtPrvCnt fnNxtPrv, bool bInReadOnly )
{
OSL_ENSURE( &pPam->GetNode() == pStart->GetNode(),
"lcl_UpDown doesn't work for others." );
- const SwContentFrm *pCnt = nullptr;
+ const SwContentFrame *pCnt = nullptr;
//We have to cheat a little bit during a table selection: Go to the
//beginning of the cell while going up and go to the end of the cell while
@@ -698,25 +698,25 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
pPam->GetNode( false ).StartOfSectionNode() )
{
bTableSel = true;
- const SwLayoutFrm *pCell = pStart->GetUpper();
- while ( !pCell->IsCellFrm() )
+ const SwLayoutFrame *pCell = pStart->GetUpper();
+ while ( !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
// Check, if cell has a Prev/Follow cell:
const bool bFwd = ( fnNxtPrv == lcl_GetNxtCnt );
- const SwLayoutFrm* pTmpCell = bFwd ?
- static_cast<const SwCellFrm*>(pCell)->GetFollowCell() :
- static_cast<const SwCellFrm*>(pCell)->GetPreviousCell();
+ const SwLayoutFrame* pTmpCell = bFwd ?
+ static_cast<const SwCellFrame*>(pCell)->GetFollowCell() :
+ static_cast<const SwCellFrame*>(pCell)->GetPreviousCell();
- const SwContentFrm* pTmpStart = pStart;
+ const SwContentFrame* pTmpStart = pStart;
while ( pTmpCell && nullptr != ( pTmpStart = pTmpCell->ContainsContent() ) )
{
pCell = pTmpCell;
pTmpCell = bFwd ?
- static_cast<const SwCellFrm*>(pCell)->GetFollowCell() :
- static_cast<const SwCellFrm*>(pCell)->GetPreviousCell();
+ static_cast<const SwCellFrame*>(pCell)->GetFollowCell() :
+ static_cast<const SwCellFrame*>(pCell)->GetPreviousCell();
}
- const SwContentFrm *pNxt = pCnt = pTmpStart;
+ const SwContentFrame *pNxt = pCnt = pTmpStart;
while ( pCell->IsAnLower( pNxt ) )
{
@@ -728,26 +728,26 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
pCnt = (*fnNxtPrv)( pCnt ? pCnt : pStart );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
- const SwTabFrm *pStTab = pStart->FindTabFrm();
- const SwTabFrm *pTable = nullptr;
+ const SwTabFrame *pStTab = pStart->FindTabFrame();
+ const SwTabFrame *pTable = nullptr;
const bool bTab = pStTab || (pCnt && pCnt->IsInTab());
bool bEnd = !bTab;
- const SwFrm* pVertRefFrm = pStart;
+ const SwFrame* pVertRefFrame = pStart;
if ( bTableSel && pStTab )
- pVertRefFrm = pStTab;
- SWRECTFN( pVertRefFrm )
+ pVertRefFrame = pStTab;
+ SWRECTFN( pVertRefFrame )
SwTwips nX = 0;
if ( bTab )
{
// pStart or pCnt is inside a table. nX will be used for travelling:
- SwRect aRect( pStart->Frm() );
+ SwRect aRect( pStart->Frame() );
pStart->GetCharRect( aRect, *pPam->GetPoint() );
Point aCenter = aRect.Center();
nX = bVert ? aCenter.Y() : aCenter.X();
- pTable = pCnt ? pCnt->FindTabFrm() : nullptr;
+ pTable = pCnt ? pCnt->FindTabFrame() : nullptr;
if ( !pTable )
pTable = pStTab;
@@ -755,20 +755,20 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
!pStTab->GetUpper()->IsInTab() &&
!pTable->GetUpper()->IsInTab() )
{
- const SwFrm *pCell = pStart->GetUpper();
- while ( pCell && !pCell->IsCellFrm() )
+ const SwFrame *pCell = pStart->GetUpper();
+ while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
OSL_ENSURE( pCell, "could not find the cell" );
- nX = (pCell->Frm().*fnRect->fnGetLeft)() +
- (pCell->Frm().*fnRect->fnGetWidth)() / 2;
+ nX = (pCell->Frame().*fnRect->fnGetLeft)() +
+ (pCell->Frame().*fnRect->fnGetWidth)() / 2;
//The flow leads from one table to the next. The X-value needs to be
//corrected based on the middle of the starting cell by the amount
//of the offset of the tables.
if ( pStTab != pTable )
{
- nX += (pTable->Frm().*fnRect->fnGetLeft)() -
- (pStTab->Frm().*fnRect->fnGetLeft)();
+ nX += (pTable->Frame().*fnRect->fnGetLeft)() -
+ (pStTab->Frame().*fnRect->fnGetLeft)();
}
}
@@ -799,7 +799,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
if ( pStart->IsInDocBody() )
{
while ( pCnt && (!pCnt->IsInDocBody() ||
- (pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow())))
+ (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -811,7 +811,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
else if ( pStart->IsInFootnote() )
{
while ( pCnt && (!pCnt->IsInFootnote() ||
- (pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow())))
+ (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow())))
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -821,7 +821,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
//In Flys we can go ahead blindly as long as we find a Content.
else if ( pStart->IsInFly() )
{
- if ( pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow() )
+ if ( pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow() )
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -831,11 +831,11 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
//Otherwise I'll just refuse to leave to current area.
else if ( pCnt )
{
- const SwFrm *pUp = pStart->GetUpper();
+ const SwFrame *pUp = pStart->GetUpper();
while (pUp && pUp->GetUpper() && !(pUp->GetType() & FRM_HEADFOOT))
pUp = pUp->GetUpper();
bool bSame = false;
- const SwFrm *pCntUp = pCnt->GetUpper();
+ const SwFrame *pCntUp = pCnt->GetUpper();
while ( pCntUp && !bSame )
{
if ( pUp == pCntUp )
@@ -845,7 +845,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
}
if ( !bSame )
pCnt = nullptr;
- else if ( pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow() ) // i73332
+ else if ( pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow() ) // i73332
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -858,7 +858,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
bEnd = true;
else
{
- const SwTabFrm *pTab = pCnt->FindTabFrm();
+ const SwTabFrame *pTab = pCnt->FindTabFrame();
if( !pTab )
bEnd = true;
else
@@ -871,18 +871,18 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
if ( pTable &&
!pTab->GetUpper()->IsInTab() &&
!pTable->GetUpper()->IsInTab() )
- nX += pTab->Frm().Left() - pTable->Frm().Left();
+ nX += pTab->Frame().Left() - pTable->Frame().Left();
pTable = pTab;
}
- const SwLayoutFrm *pCell = pCnt->GetUpper();
- while ( pCell && !pCell->IsCellFrm() )
+ const SwLayoutFrame *pCell = pCnt->GetUpper();
+ while ( pCell && !pCell->IsCellFrame() )
pCell = pCell->GetUpper();
Point aInsideCell;
Point aInsideCnt;
if ( pCell )
{
- long nTmpTop = (pCell->Frm().*fnRect->fnGetTop)();
+ long nTmpTop = (pCell->Frame().*fnRect->fnGetTop)();
if ( bVert )
{
if ( nTmpTop )
@@ -894,7 +894,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
aInsideCell = Point( nX, nTmpTop );
}
- long nTmpTop = (pCnt->Frm().*fnRect->fnGetTop)();
+ long nTmpTop = (pCnt->Frame().*fnRect->fnGetTop)();
if ( bVert )
{
if ( nTmpTop )
@@ -905,19 +905,19 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
else
aInsideCnt = Point( nX, nTmpTop );
- if ( pCell && pCell->Frm().IsInside( aInsideCell ) )
+ if ( pCell && pCell->Frame().IsInside( aInsideCell ) )
{
bEnd = true;
//Get the right Content out of the cell.
- if ( !pCnt->Frm().IsInside( aInsideCnt ) )
+ if ( !pCnt->Frame().IsInside( aInsideCnt ) )
{
pCnt = pCell->ContainsContent();
if ( fnNxtPrv == lcl_GetPrvCnt )
- while ( pCell->IsAnLower(pCnt->GetNextContentFrm()) )
- pCnt = pCnt->GetNextContentFrm();
+ while ( pCell->IsAnLower(pCnt->GetNextContentFrame()) )
+ pCnt = pCnt->GetNextContentFrame();
}
}
- else if ( pCnt->Frm().IsInside( aInsideCnt ) )
+ else if ( pCnt->Frame().IsInside( aInsideCnt ) )
bEnd = true;
}
}
@@ -929,7 +929,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
}
} while ( !bEnd ||
- (pCnt && pCnt->IsTextFrm() && static_cast<const SwTextFrm*>(pCnt)->IsHiddenNow()));
+ (pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow()));
if( pCnt )
{ // set the Point on the Content-Node
@@ -944,12 +944,12 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrm *pStart,
return false;
}
-bool SwContentFrm::UnitUp( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const
+bool SwContentFrame::UnitUp( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetPrvCnt, bInReadOnly );
}
-bool SwContentFrm::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const
+bool SwContentFrame::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) const
{
return ::lcl_UpDown( pPam, this, lcl_GetNxtCnt, bInReadOnly );
}
@@ -959,14 +959,14 @@ bool SwContentFrm::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) cons
* If the method gets a PaM then the current page is the one in which the PaM sits. Otherwise the
* current page is the first one inside the VisibleArea. We only work on available pages!
*/
-sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
+sal_uInt16 SwRootFrame::GetCurrPage( const SwPaM *pActualCursor ) const
{
- OSL_ENSURE( pActualCrsr, "got no page cursor" );
- SwFrm const*const pActFrm = pActualCrsr->GetPoint()->nNode.GetNode().
- GetContentNode()->getLayoutFrm( this, nullptr,
- pActualCrsr->GetPoint(),
+ OSL_ENSURE( pActualCursor, "got no page cursor" );
+ SwFrame const*const pActFrame = pActualCursor->GetPoint()->nNode.GetNode().
+ GetContentNode()->getLayoutFrame( this, nullptr,
+ pActualCursor->GetPoint(),
false );
- return pActFrm->FindPageFrm()->GetPhyPageNum();
+ return pActFrame->FindPageFrame()->GetPhyPageNum();
}
/** Returns a PaM which sits at the beginning of the requested page.
@@ -976,54 +976,54 @@ sal_uInt16 SwRootFrm::GetCurrPage( const SwPaM *pActualCrsr ) const
*
* @return Null, if the operation was not possible.
*/
-sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
+sal_uInt16 SwRootFrame::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
{
vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr;
- OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "No page available." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "No page available." );
- SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower());
bool bEnd =false;
while ( !bEnd && pPage->GetPhyPageNum() != nPageNum )
{ if ( pPage->GetNext() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
else
- { //Search the first ContentFrm and format until a new page is started
- //or until the ContentFrm are all done.
- const SwContentFrm *pContent = pPage->ContainsContent();
+ { //Search the first ContentFrame and format until a new page is started
+ //or until the ContentFrame are all done.
+ const SwContentFrame *pContent = pPage->ContainsContent();
while ( pContent && pPage->IsAnLower( pContent ) )
{
pContent->Calc(pRenderContext);
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
//Either this is a new page or we found the last page.
if ( pPage->GetNext() )
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
else
bEnd = true;
}
}
//pPage now points to the 'requested' page. Now we have to create the PaM
- //on the beginning of the first ContentFrm in the body-text.
+ //on the beginning of the first ContentFrame in the body-text.
//If this is a footnote-page, the PaM will be set in the first footnote.
- const SwContentFrm *pContent = pPage->ContainsContent();
+ const SwContentFrame *pContent = pPage->ContainsContent();
if ( pPage->IsFootnotePage() )
while ( pContent && !pContent->IsInFootnote() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
else
while ( pContent && !pContent->IsInDocBody() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
if ( pContent )
{
SwContentNode* pCNd = const_cast<SwContentNode*>(pContent->GetNode());
pToSet->GetPoint()->nNode = *pCNd;
pCNd->MakeStartIndex( &pToSet->GetPoint()->nContent );
- pToSet->GetPoint()->nContent = static_cast<const SwTextFrm*>(pContent)->GetOfst();
+ pToSet->GetPoint()->nContent = static_cast<const SwTextFrame*>(pContent)->GetOfst();
- SwShellCrsr* pSCrsr = dynamic_cast<SwShellCrsr*>(pToSet);
- if( pSCrsr )
+ SwShellCursor* pSCursor = dynamic_cast<SwShellCursor*>(pToSet);
+ if( pSCursor )
{
- Point &rPt = pSCrsr->GetPtPos();
- rPt = pContent->Frm().Pos();
+ Point &rPt = pSCursor->GetPtPos();
+ rPt = pContent->Frame().Pos();
rPt += pContent->Prt().Pos();
}
return pPage->GetPhyPageNum();
@@ -1031,42 +1031,42 @@ sal_uInt16 SwRootFrm::SetCurrPage( SwCursor* pToSet, sal_uInt16 nPageNum )
return 0;
}
-SwContentFrm *GetFirstSub( const SwLayoutFrm *pLayout )
+SwContentFrame *GetFirstSub( const SwLayoutFrame *pLayout )
{
- return const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pLayout))->FindFirstBodyContent();
+ return const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pLayout))->FindFirstBodyContent();
}
-SwContentFrm *GetLastSub( const SwLayoutFrm *pLayout )
+SwContentFrame *GetLastSub( const SwLayoutFrame *pLayout )
{
- return const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pLayout))->FindLastBodyContent();
+ return const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pLayout))->FindLastBodyContent();
}
-SwLayoutFrm *GetNextFrm( const SwLayoutFrm *pFrm )
+SwLayoutFrame *GetNextFrame( const SwLayoutFrame *pFrame )
{
- SwLayoutFrm *pNext =
- (pFrm->GetNext() && pFrm->GetNext()->IsLayoutFrm()) ?
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetNext())) : nullptr;
+ SwLayoutFrame *pNext =
+ (pFrame->GetNext() && pFrame->GetNext()->IsLayoutFrame()) ?
+ const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFrame->GetNext())) : nullptr;
// #i39402# in case of an empty page
if(pNext && !pNext->ContainsContent())
- pNext = (pNext->GetNext() && pNext->GetNext()->IsLayoutFrm()) ?
- static_cast<SwLayoutFrm*>(pNext->GetNext()) : nullptr;
+ pNext = (pNext->GetNext() && pNext->GetNext()->IsLayoutFrame()) ?
+ static_cast<SwLayoutFrame*>(pNext->GetNext()) : nullptr;
return pNext;
}
-SwLayoutFrm *GetThisFrm( const SwLayoutFrm *pFrm )
+SwLayoutFrame *GetThisFrame( const SwLayoutFrame *pFrame )
{
- return const_cast<SwLayoutFrm*>(pFrm);
+ return const_cast<SwLayoutFrame*>(pFrame);
}
-SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm )
+SwLayoutFrame *GetPrevFrame( const SwLayoutFrame *pFrame )
{
- SwLayoutFrm *pPrev =
- (pFrm->GetPrev() && pFrm->GetPrev()->IsLayoutFrm()) ?
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pFrm->GetPrev())) : nullptr;
+ SwLayoutFrame *pPrev =
+ (pFrame->GetPrev() && pFrame->GetPrev()->IsLayoutFrame()) ?
+ const_cast<SwLayoutFrame*>(static_cast<const SwLayoutFrame*>(pFrame->GetPrev())) : nullptr;
// #i39402# in case of an empty page
if(pPrev && !pPrev->ContainsContent())
- pPrev = (pPrev->GetPrev() && pPrev->GetPrev()->IsLayoutFrm()) ?
- static_cast<SwLayoutFrm*>(pPrev->GetPrev()) : nullptr;
+ pPrev = (pPrev->GetPrev() && pPrev->GetPrev()->IsLayoutFrame()) ?
+ static_cast<SwLayoutFrame*>(pPrev->GetPrev()) : nullptr;
return pPrev;
}
@@ -1074,37 +1074,37 @@ SwLayoutFrm *GetPrevFrm( const SwLayoutFrm *pFrm )
//they are declared in cshtyp.hxx
SwPosPage fnPageStart = GetFirstSub;
SwPosPage fnPageEnd = GetLastSub;
-SwWhichPage fnPagePrev = GetPrevFrm;
-SwWhichPage fnPageCurr = GetThisFrm;
-SwWhichPage fnPageNext = GetNextFrm;
+SwWhichPage fnPagePrev = GetPrevFrame;
+SwWhichPage fnPageCurr = GetThisFrame;
+SwWhichPage fnPageNext = GetNextFrame;
/**
* Returns the first/last Contentframe (controlled using the parameter fnPosPage)
* of the current/previous/next page (controlled using the parameter fnWhichPage).
*/
-bool GetFrmInPage( const SwContentFrm *pCnt, SwWhichPage fnWhichPage,
+bool GetFrameInPage( const SwContentFrame *pCnt, SwWhichPage fnWhichPage,
SwPosPage fnPosPage, SwPaM *pPam )
{
//First find the requested page, at first the current, then the one which
//was requests through fnWichPage.
- const SwLayoutFrm *pLayoutFrm = pCnt->FindPageFrm();
- if ( !pLayoutFrm || (nullptr == (pLayoutFrm = (*fnWhichPage)(pLayoutFrm))) )
+ const SwLayoutFrame *pLayoutFrame = pCnt->FindPageFrame();
+ if ( !pLayoutFrame || (nullptr == (pLayoutFrame = (*fnWhichPage)(pLayoutFrame))) )
return false;
- //Now the desired ContentFrm below the page
- if( nullptr == (pCnt = (*fnPosPage)(pLayoutFrm)) )
+ //Now the desired ContentFrame below the page
+ if( nullptr == (pCnt = (*fnPosPage)(pLayoutFrame)) )
return false;
else
{
// repeated headlines in tables
if ( pCnt->IsInTab() && fnPosPage == GetFirstSub )
{
- const SwTabFrm* pTab = pCnt->FindTabFrm();
+ const SwTabFrame* pTab = pCnt->FindTabFrame();
if ( pTab->IsFollow() )
{
if ( pTab->IsInHeadline( *pCnt ) )
{
- SwLayoutFrm* pRow = pTab->GetFirstNonHeadlineRow();
+ SwLayoutFrame* pRow = pTab->GetFirstNonHeadlineRow();
if ( pRow )
{
// We are in the first line of a follow table
@@ -1123,10 +1123,10 @@ bool GetFrmInPage( const SwContentFrm *pCnt, SwWhichPage fnWhichPage,
pPam->GetPoint()->nNode = *pCNd;
sal_Int32 nIdx;
if( fnPosPage == GetFirstSub )
- nIdx = static_cast<const SwTextFrm*>(pCnt)->GetOfst();
+ nIdx = static_cast<const SwTextFrame*>(pCnt)->GetOfst();
else
nIdx = pCnt->GetFollow() ?
- static_cast<const SwTextFrm*>(pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len();
+ static_cast<const SwTextFrame*>(pCnt)->GetFollow()->GetOfst()-1 : pCNd->Len();
pPam->GetPoint()->nContent.Assign( pCNd, nIdx );
return true;
}
@@ -1146,22 +1146,22 @@ static sal_uInt64 CalcDiff(const Point &rPt1, const Point &rPt2)
/** Check if the point lies inside the page part in which also the ContentFrame lies.
*
* In this context header, page body, footer and footnote-container count as page part.
- * This will suit the purpose that the ContentFrm which lies in the "right" page part will be
+ * This will suit the purpose that the ContentFrame which lies in the "right" page part will be
* accepted instead of one which doesn't lie there although his distance to the point is shorter.
*/
-static const SwLayoutFrm* lcl_Inside( const SwContentFrm *pCnt, Point& rPt )
+static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point& rPt )
{
- const SwLayoutFrm* pUp = pCnt->GetUpper();
+ const SwLayoutFrame* pUp = pCnt->GetUpper();
while( pUp )
{
- if( pUp->IsPageBodyFrm() || pUp->IsFooterFrm() || pUp->IsHeaderFrm() )
+ if( pUp->IsPageBodyFrame() || pUp->IsFooterFrame() || pUp->IsHeaderFrame() )
{
- if( rPt.Y() >= pUp->Frm().Top() && rPt.Y() <= pUp->Frm().Bottom() )
+ if( rPt.Y() >= pUp->Frame().Top() && rPt.Y() <= pUp->Frame().Bottom() )
return pUp;
return nullptr;
}
- if( pUp->IsFootnoteContFrm() )
- return pUp->Frm().IsInside( rPt ) ? pUp : nullptr;
+ if( pUp->IsFootnoteContFrame() )
+ return pUp->Frame().IsInside( rPt ) ? pUp : nullptr;
pUp = pUp->GetUpper();
}
return nullptr;
@@ -1172,30 +1172,30 @@ static const SwLayoutFrm* lcl_Inside( const SwContentFrm *pCnt, Point& rPt )
* Considers the previous, the current and the next page.
* If no content is found, the area gets expanded until one is found.
*
- * @return The 'semantically correct' position inside the PrtArea of the found ContentFrm.
+ * @return The 'semantically correct' position inside the PrtArea of the found ContentFrame.
*/
-const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
+const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
const bool bDontLeave,
const bool bBodyOnly,
const bool bCalc,
- const SwCrsrMoveState *pCMS,
+ const SwCursorMoveState *pCMS,
const bool bDefaultExpand ) const
{
- vcl::RenderContext* pRenderContext = getRootFrm()->GetCurrShell()->GetOut();
- //Determine the first ContentFrm.
- const SwLayoutFrm *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ?
- static_cast<const SwLayoutFrm*>(GetPrev()) : this;
- const SwContentFrm *pContent = pStart->ContainsContent();
+ vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut();
+ //Determine the first ContentFrame.
+ const SwLayoutFrame *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ?
+ static_cast<const SwLayoutFrame*>(GetPrev()) : this;
+ const SwContentFrame *pContent = pStart->ContainsContent();
if ( !pContent && (GetPrev() && !bDontLeave) )
pContent = ContainsContent();
if ( bBodyOnly && pContent && !pContent->IsInDocBody() )
while ( pContent && !pContent->IsInDocBody() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
- const SwContentFrm *pActual= pContent;
- const SwLayoutFrm *pInside = nullptr;
+ const SwContentFrame *pActual= pContent;
+ const SwLayoutFrame *pInside = nullptr;
sal_uInt16 nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
Point aPoint = rPoint;
sal_uInt64 nDistance = SAL_MAX_UINT64;
@@ -1206,24 +1206,24 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
((!bDontLeave || IsAnLower( pContent )) &&
(pContent->GetPhyPageNum() <= nMaxPage)) )
{
- if ( ( bCalc || pContent->Frm().Width() ) &&
+ if ( ( bCalc || pContent->Frame().Width() ) &&
( !bBodyOnly || pContent->IsInDocBody() ) )
{
//If the Content lies in a protected area (cell, Footnote, section),
//we search the next Content which is not protected.
- const SwContentFrm *pComp = pContent;
+ const SwContentFrame *pComp = pContent;
pContent = ::lcl_MissProtectedFrames( pContent, lcl_GetNxtCnt, false,
pCMS && pCMS->m_bSetInReadOnly, false );
if ( pComp != pContent )
continue;
- if ( !pContent->IsTextFrm() || !static_cast<const SwTextFrm*>(pContent)->IsHiddenNow() )
+ if ( !pContent->IsTextFrame() || !static_cast<const SwTextFrame*>(pContent)->IsHiddenNow() )
{
if ( bCalc )
pContent->Calc(pRenderContext);
- SwRect aCntFrm( pContent->UnionFrm() );
- if ( aCntFrm.IsInside( rPoint ) )
+ SwRect aContentFrame( pContent->UnionFrame() );
+ if ( aContentFrame.IsInside( rPoint ) )
{
pActual = pContent;
aPoint = rPoint;
@@ -1234,22 +1234,22 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
Point aContentPoint( rPoint );
//First set the vertical position
- if ( aCntFrm.Top() > aContentPoint.Y() )
- aContentPoint.Y() = aCntFrm.Top();
- else if ( aCntFrm.Bottom() < aContentPoint.Y() )
- aContentPoint.Y() = aCntFrm.Bottom();
+ if ( aContentFrame.Top() > aContentPoint.Y() )
+ aContentPoint.Y() = aContentFrame.Top();
+ else if ( aContentFrame.Bottom() < aContentPoint.Y() )
+ aContentPoint.Y() = aContentFrame.Bottom();
//Now the horizontal position
- if ( aCntFrm.Left() > aContentPoint.X() )
- aContentPoint.X() = aCntFrm.Left();
- else if ( aCntFrm.Right() < aContentPoint.X() )
- aContentPoint.X() = aCntFrm.Right();
+ if ( aContentFrame.Left() > aContentPoint.X() )
+ aContentPoint.X() = aContentFrame.Left();
+ else if ( aContentFrame.Right() < aContentPoint.X() )
+ aContentPoint.X() = aContentFrame.Right();
// pInside is a page area in which the point lies. As soon
// as pInside != 0 only frames are accepted which are
// placed inside.
if( !pInside || ( pInside->IsAnLower( pContent ) &&
- ( !pContent->IsInFootnote() || pInside->IsFootnoteContFrm() ) ) )
+ ( !pContent->IsInFootnote() || pInside->IsFootnoteContFrame() ) ) )
{
const sal_uInt64 nDiff = ::CalcDiff(aContentPoint, rPoint);
bool bBetter = nDiff < nDistance; // This one is nearer
@@ -1268,10 +1268,10 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
}
}
}
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
if ( bBodyOnly )
while ( pContent && !pContent->IsInDocBody() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
if ( !pActual )
{ //If we not yet found one we have to expand the searched
@@ -1283,18 +1283,18 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
while ( !pContent && pStart->GetPrev() )
{
++nMaxPage;
- if( !pStart->GetPrev()->IsLayoutFrm() )
+ if( !pStart->GetPrev()->IsLayoutFrame() )
return nullptr;
- pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev());
+ pStart = static_cast<const SwLayoutFrame*>(pStart->GetPrev());
pContent = pStart->IsInDocBody()
? pStart->ContainsContent()
- : pStart->FindPageFrm()->FindFirstBodyContent();
+ : pStart->FindPageFrame()->FindFirstBodyContent();
}
if ( !pContent ) // Somewhere down the road we have to start with one!
{
- pContent = pStart->FindPageFrm()->GetUpper()->ContainsContent();
+ pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent();
while ( pContent && !pContent->IsInDocBody() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
if ( !pContent )
return nullptr; // There is no document content yet!
}
@@ -1304,13 +1304,13 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
++nMaxPage;
if ( pStart->GetPrev() )
{
- if( !pStart->GetPrev()->IsLayoutFrm() )
+ if( !pStart->GetPrev()->IsLayoutFrame() )
return nullptr;
- pStart = static_cast<const SwLayoutFrm*>(pStart->GetPrev());
+ pStart = static_cast<const SwLayoutFrame*>(pStart->GetPrev());
pContent = pStart->ContainsContent();
}
else // Somewhere down the road we have to start with one!
- pContent = pStart->FindPageFrm()->GetUpper()->ContainsContent();
+ pContent = pStart->FindPageFrame()->GetUpper()->ContainsContent();
}
pActual = pContent;
}
@@ -1324,10 +1324,10 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
//Special case for selecting tables not in repeated TableHeadlines.
if ( pActual->IsInTab() && pCMS && pCMS->m_eState == MV_TBLSEL )
{
- const SwTabFrm *pTab = pActual->FindTabFrm();
+ const SwTabFrame *pTab = pActual->FindTabFrame();
if ( pTab->IsFollow() && pTab->IsInHeadline( *pActual ) )
{
- const_cast<SwCrsrMoveState*>(pCMS)->m_bStop = true;
+ const_cast<SwCursorMoveState*>(pCMS)->m_bStop = true;
return nullptr;
}
}
@@ -1342,8 +1342,8 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
(*fnRect->fnYDiff)( (pActual->*fnRect->fnGetPrtTop)(),
bVert ? rPoint.X() : rPoint.Y() ) > 0 )
{
- aPoint.Y() = pActual->Frm().Top() + pActual->Prt().Top();
- aPoint.X() = pActual->Frm().Left() +
+ aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Top();
+ aPoint.X() = pActual->Frame().Left() +
( pActual->IsRightToLeft() || bVert ?
pActual->Prt().Right() :
pActual->Prt().Left() );
@@ -1352,8 +1352,8 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
(*fnRect->fnYDiff)( (pActual->*fnRect->fnGetPrtBottom)(),
bVert ? rPoint.X() : rPoint.Y() ) < 0 )
{
- aPoint.Y() = pActual->Frm().Top() + pActual->Prt().Bottom();
- aPoint.X() = pActual->Frm().Left() +
+ aPoint.Y() = pActual->Frame().Top() + pActual->Prt().Bottom();
+ aPoint.X() = pActual->Frame().Left() +
( pActual->IsRightToLeft() || bVert ?
pActual->Prt().Left() :
pActual->Prt().Right() );
@@ -1362,7 +1362,7 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
//Bring the Point in to the PrtArea
if ( bCalc )
pActual->Calc(pRenderContext);
- const SwRect aRect( pActual->Frm().Pos() + pActual->Prt().Pos(),
+ const SwRect aRect( pActual->Frame().Pos() + pActual->Prt().Pos(),
aActualSize );
if ( aPoint.Y() < aRect.Top() )
aPoint.Y() = aRect.Top();
@@ -1376,31 +1376,31 @@ const SwContentFrm *SwLayoutFrm::GetContentPos( Point& rPoint,
return pActual;
}
-/** Same as SwLayoutFrm::GetContentPos(). Specialized for fields and border. */
-void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
+/** Same as SwLayoutFrame::GetContentPos(). Specialized for fields and border. */
+void SwPageFrame::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
{
- //Determine the first ContentFrm.
- const SwContentFrm *pContent = ContainsContent();
+ //Determine the first ContentFrame.
+ const SwContentFrame *pContent = ContainsContent();
if ( pContent )
{
//Look back one more (if possible).
- const SwContentFrm *pTmp = pContent->GetPrevContentFrm();
+ const SwContentFrame *pTmp = pContent->GetPrevContentFrame();
while ( pTmp && !pTmp->IsInDocBody() )
- pTmp = pTmp->GetPrevContentFrm();
+ pTmp = pTmp->GetPrevContentFrame();
if ( pTmp )
pContent = pTmp;
}
else
pContent = GetUpper()->ContainsContent();
- const SwContentFrm *pAct = pContent;
+ const SwContentFrame *pAct = pContent;
Point aAct = rPt;
sal_uInt64 nDist = SAL_MAX_UINT64;
while ( pContent )
{
- SwRect aCntFrm( pContent->UnionFrm() );
- if ( aCntFrm.IsInside( rPt ) )
+ SwRect aContentFrame( pContent->UnionFrame() );
+ if ( aContentFrame.IsInside( rPt ) )
{
//This is the nearest one.
pAct = pContent;
@@ -1411,16 +1411,16 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
Point aPoint( rPt );
//Calculate the vertical position first
- if ( aCntFrm.Top() > rPt.Y() )
- aPoint.Y() = aCntFrm.Top();
- else if ( aCntFrm.Bottom() < rPt.Y() )
- aPoint.Y() = aCntFrm.Bottom();
+ if ( aContentFrame.Top() > rPt.Y() )
+ aPoint.Y() = aContentFrame.Top();
+ else if ( aContentFrame.Bottom() < rPt.Y() )
+ aPoint.Y() = aContentFrame.Bottom();
//And now the horizontal position
- if ( aCntFrm.Left() > rPt.X() )
- aPoint.X() = aCntFrm.Left();
- else if ( aCntFrm.Right() < rPt.X() )
- aPoint.X() = aCntFrm.Right();
+ if ( aContentFrame.Left() > rPt.X() )
+ aPoint.X() = aContentFrame.Left();
+ else if ( aContentFrame.Right() < rPt.X() )
+ aPoint.X() = aContentFrame.Right();
const sal_uInt64 nDiff = ::CalcDiff( aPoint, rPt );
if ( nDiff < nDist )
@@ -1429,17 +1429,17 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
nDist = nDiff;
pAct = pContent;
}
- else if ( aCntFrm.Top() > Frm().Bottom() )
+ else if ( aContentFrame.Top() > Frame().Bottom() )
//In terms of fields, it's not possible to be closer any more!
break;
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
while ( pContent && !pContent->IsInDocBody() )
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
}
//Bring the point into the PrtArea.
- const SwRect aRect( pAct->Frm().Pos() + pAct->Prt().Pos(), pAct->Prt().SSize() );
+ const SwRect aRect( pAct->Frame().Pos() + pAct->Prt().Pos(), pAct->Prt().SSize() );
if ( aAct.Y() < aRect.Top() )
aAct.Y() = aRect.Top();
else if ( aAct.Y() > aRect.Bottom() )
@@ -1451,7 +1451,7 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
if( !pAct->IsValid() )
{
- // ContentFrm not formatted -> always on node-beginning
+ // ContentFrame not formatted -> always on node-beginning
SwContentNode* pCNd = const_cast<SwContentNode*>(pAct->GetNode());
OSL_ENSURE( pCNd, "Where is my ContentNode?" );
rPos.nNode = *pCNd;
@@ -1459,8 +1459,8 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
}
else
{
- SwCrsrMoveState aTmpState( MV_SETONLYTEXT );
- pAct->GetCrsrOfst( &rPos, aAct, &aTmpState );
+ SwCursorMoveState aTmpState( MV_SETONLYTEXT );
+ pAct->GetCursorOfst( &rPos, aAct, &aTmpState );
}
}
@@ -1469,20 +1469,20 @@ void SwPageFrm::GetContentPosition( const Point &rPt, SwPosition &rPos ) const
class DisableCallbackAction
{
private:
- SwRootFrm& mrRootFrm;
+ SwRootFrame& mrRootFrame;
bool mbOldCallbackActionState;
public:
- explicit DisableCallbackAction( const SwRootFrm& _rRootFrm ) :
- mrRootFrm( const_cast<SwRootFrm&>(_rRootFrm) ),
- mbOldCallbackActionState( _rRootFrm.IsCallbackActionEnabled() )
+ explicit DisableCallbackAction( const SwRootFrame& _rRootFrame ) :
+ mrRootFrame( const_cast<SwRootFrame&>(_rRootFrame) ),
+ mbOldCallbackActionState( _rRootFrame.IsCallbackActionEnabled() )
{
- mrRootFrm.SetCallbackActionEnabled( false );
+ mrRootFrame.SetCallbackActionEnabled( false );
}
~DisableCallbackAction()
{
- mrRootFrm.SetCallbackActionEnabled( mbOldCallbackActionState );
+ mrRootFrame.SetCallbackActionEnabled( mbOldCallbackActionState );
}
};
@@ -1492,24 +1492,24 @@ class DisableCallbackAction
* @note Only the nearest vertically one will be searched.
* @note JP 11.10.2001: only in tables we try to find the right column - Bug 72294
*/
-Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const
+Point SwRootFrame::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const
{
vcl::RenderContext* pRenderContext = GetCurrShell() ? GetCurrShell()->GetOut() : nullptr;
// #123110# - disable creation of an action by a callback
// event during processing of this method. Needed because formatting is
// triggered by this method.
DisableCallbackAction aDisableCallbackAction( *this );
- //Search the first ContentFrm and his successor in the body area.
+ //Search the first ContentFrame and his successor in the body area.
//To be efficient (and not formatting too much) we'll start at the correct
//page.
- const SwLayoutFrm *pPage = static_cast<const SwLayoutFrm*>(Lower());
+ const SwLayoutFrame *pPage = static_cast<const SwLayoutFrame*>(Lower());
if( pPage )
- while( pPage->GetNext() && pPage->Frm().Bottom() < rPoint.Y() )
- pPage = static_cast<const SwLayoutFrm*>(pPage->GetNext());
+ while( pPage->GetNext() && pPage->Frame().Bottom() < rPoint.Y() )
+ pPage = static_cast<const SwLayoutFrame*>(pPage->GetNext());
- const SwContentFrm *pCnt = pPage ? pPage->ContainsContent() : ContainsContent();
+ const SwContentFrame *pCnt = pPage ? pPage->ContainsContent() : ContainsContent();
while ( pCnt && !pCnt->IsInDocBody() )
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
if ( !pCnt )
return Point( 0, 0 );
@@ -1517,65 +1517,65 @@ Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const
pCnt->Calc(pRenderContext);
if( !bNext )
{
- // As long as the point lies before the first ContentFrm and there are
+ // As long as the point lies before the first ContentFrame and there are
// still precedent pages I'll go to the next page.
- while ( rPoint.Y() < pCnt->Frm().Top() && pPage->GetPrev() )
+ while ( rPoint.Y() < pCnt->Frame().Top() && pPage->GetPrev() )
{
- pPage = static_cast<const SwLayoutFrm*>(pPage->GetPrev());
+ pPage = static_cast<const SwLayoutFrame*>(pPage->GetPrev());
pCnt = pPage->ContainsContent();
while ( !pCnt )
{
- pPage = static_cast<const SwLayoutFrm*>(pPage->GetPrev());
+ pPage = static_cast<const SwLayoutFrame*>(pPage->GetPrev());
if ( pPage )
pCnt = pPage->ContainsContent();
else
- return ContainsContent()->UnionFrm().Pos();
+ return ContainsContent()->UnionFrame().Pos();
}
pCnt->Calc(pRenderContext);
}
}
- //Does the point lie above the first ContentFrm?
- if ( rPoint.Y() < pCnt->Frm().Top() && !lcl_IsInRepeatedHeadline( pCnt ) )
- return pCnt->UnionFrm().Pos();
+ //Does the point lie above the first ContentFrame?
+ if ( rPoint.Y() < pCnt->Frame().Top() && !lcl_IsInRepeatedHeadline( pCnt ) )
+ return pCnt->UnionFrame().Pos();
Point aRet(0, 0);
do
{
- //Does the point lie in the current ContentFrm?
- SwRect aCntFrm( pCnt->UnionFrm() );
- if ( aCntFrm.IsInside( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt ))
+ //Does the point lie in the current ContentFrame?
+ SwRect aContentFrame( pCnt->UnionFrame() );
+ if ( aContentFrame.IsInside( rPoint ) && !lcl_IsInRepeatedHeadline( pCnt ))
{
aRet = rPoint;
break;
}
- //Is the current one the last ContentFrm?
- //If the next ContentFrm lies behind the point, then the current on is the
+ //Is the current one the last ContentFrame?
+ //If the next ContentFrame lies behind the point, then the current on is the
//one we searched.
- const SwContentFrm *pNxt = pCnt->GetNextContentFrm();
+ const SwContentFrame *pNxt = pCnt->GetNextContentFrame();
while ( pNxt && !pNxt->IsInDocBody() )
- pNxt = pNxt->GetNextContentFrm();
+ pNxt = pNxt->GetNextContentFrame();
- //Does the point lie behind the last ContentFrm?
+ //Does the point lie behind the last ContentFrame?
if ( !pNxt )
{
- aRet = Point( aCntFrm.Right(), aCntFrm.Bottom() );
+ aRet = Point( aContentFrame.Right(), aContentFrame.Bottom() );
break;
}
- //If the next ContentFrm lies behind the point then it is the one we
+ //If the next ContentFrame lies behind the point then it is the one we
//searched.
- const SwTabFrm* pTFrm;
+ const SwTabFrame* pTFrame;
pNxt->Calc(pRenderContext);
- if( pNxt->Frm().Top() > rPoint.Y() &&
- !lcl_IsInRepeatedHeadline( pCnt, &pTFrm ) &&
- ( !pTFrm || pNxt->Frm().Left() > rPoint.X() ))
+ if( pNxt->Frame().Top() > rPoint.Y() &&
+ !lcl_IsInRepeatedHeadline( pCnt, &pTFrame ) &&
+ ( !pTFrame || pNxt->Frame().Left() > rPoint.X() ))
{
if (bNext)
- aRet = pNxt->Frm().Pos();
+ aRet = pNxt->Frame().Pos();
else
- aRet = Point( aCntFrm.Right(), aCntFrm.Bottom() );
+ aRet = Point( aContentFrame.Right(), aContentFrame.Bottom() );
break;
}
pCnt = pNxt;
@@ -1591,35 +1591,35 @@ Point SwRootFrm::GetNextPrevContentPos( const Point& rPoint, bool bNext ) const
*
* @return Null, if the operation failed.
*/
-Point SwRootFrm::GetPagePos( sal_uInt16 nPageNum ) const
+Point SwRootFrame::GetPagePos( sal_uInt16 nPageNum ) const
{
- OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "No page available." );
+ OSL_ENSURE( Lower() && Lower()->IsPageFrame(), "No page available." );
- const SwPageFrm *pPage = static_cast<const SwPageFrm*>(Lower());
+ const SwPageFrame *pPage = static_cast<const SwPageFrame*>(Lower());
while ( true )
{
if ( pPage->GetPhyPageNum() >= nPageNum || !pPage->GetNext() )
break;
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
- return pPage->Frm().Pos();
+ return pPage->Frame().Pos();
}
/** get page frame by phyiscal page number
*
* @return pointer to the page frame with the given physical page number
*/
-SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const
+SwPageFrame* SwRootFrame::GetPageByPageNum( sal_uInt16 _nPageNum ) const
{
- const SwPageFrm* pPageFrm = static_cast<const SwPageFrm*>( Lower() );
- while ( pPageFrm && pPageFrm->GetPhyPageNum() < _nPageNum )
+ const SwPageFrame* pPageFrame = static_cast<const SwPageFrame*>( Lower() );
+ while ( pPageFrame && pPageFrame->GetPhyPageNum() < _nPageNum )
{
- pPageFrm = static_cast<const SwPageFrm*>( pPageFrm->GetNext() );
+ pPageFrame = static_cast<const SwPageFrame*>( pPageFrame->GetNext() );
}
- if ( pPageFrm && pPageFrm->GetPhyPageNum() == _nPageNum )
+ if ( pPageFrame && pPageFrame->GetPhyPageNum() == _nPageNum )
{
- return const_cast<SwPageFrm*>( pPageFrm );
+ return const_cast<SwPageFrame*>( pPageFrame );
}
else
{
@@ -1630,81 +1630,81 @@ SwPageFrm* SwRootFrm::GetPageByPageNum( sal_uInt16 _nPageNum ) const
/**
* @return true, when the given physical pagenumber does't exist or this page is an empty page.
*/
-bool SwRootFrm::IsDummyPage( sal_uInt16 nPageNum ) const
+bool SwRootFrame::IsDummyPage( sal_uInt16 nPageNum ) const
{
if( !Lower() || !nPageNum || nPageNum > GetPageNum() )
return true;
- const SwPageFrm *pPage = static_cast<const SwPageFrm*>(Lower());
+ const SwPageFrame *pPage = static_cast<const SwPageFrame*>(Lower());
while( pPage && nPageNum < pPage->GetPhyPageNum() )
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
return !pPage || pPage->IsEmptyPage();
}
-/** Is the Frm or rather the Section in which it lies protected?
+/** Is the Frame or rather the Section in which it lies protected?
*
* Also Fly in Fly in ... and Footnotes
*/
-bool SwFrm::IsProtected() const
+bool SwFrame::IsProtected() const
{
- if (this->IsContentFrm() && static_cast<const SwContentFrm*>(this)->GetNode())
+ if (this->IsContentFrame() && static_cast<const SwContentFrame*>(this)->GetNode())
{
- const SwDoc *pDoc=static_cast<const SwContentFrm*>(this)->GetNode()->GetDoc();
+ const SwDoc *pDoc=static_cast<const SwContentFrame*>(this)->GetNode()->GetDoc();
bool isFormProtected=pDoc->GetDocumentSettingManager().get(DocumentSettingId::PROTECT_FORM );
if (isFormProtected)
{
return false; // TODO a hack for now, well deal with it later, I we return true here we have a "double" locking
}
}
- //The Frm can be protected in borders, cells or sections.
- //Also goes up FlyFrms recursive and from footnote to anchor.
- const SwFrm *pFrm = this;
+ //The Frame can be protected in borders, cells or sections.
+ //Also goes up FlyFrames recursive and from footnote to anchor.
+ const SwFrame *pFrame = this;
do
{
- if ( pFrm->IsContentFrm() )
+ if ( pFrame->IsContentFrame() )
{
- if ( static_cast<const SwContentFrm*>(pFrm)->GetNode() &&
- static_cast<const SwContentFrm*>(pFrm)->GetNode()->IsInProtectSect() )
+ if ( static_cast<const SwContentFrame*>(pFrame)->GetNode() &&
+ static_cast<const SwContentFrame*>(pFrame)->GetNode()->IsInProtectSect() )
return true;
}
else
{
- if ( static_cast<const SwLayoutFrm*>(pFrm)->GetFormat() &&
- static_cast<const SwLayoutFrm*>(pFrm)->GetFormat()->
+ if ( static_cast<const SwLayoutFrame*>(pFrame)->GetFormat() &&
+ static_cast<const SwLayoutFrame*>(pFrame)->GetFormat()->
GetProtect().IsContentProtected() )
return true;
- if ( pFrm->IsCoveredCell() )
+ if ( pFrame->IsCoveredCell() )
return true;
}
- if ( pFrm->IsFlyFrm() )
+ if ( pFrame->IsFlyFrame() )
{
//In a chain the protection of the content can be specified by the
//master of the chain.
- if ( static_cast<const SwFlyFrm*>(pFrm)->GetPrevLink() )
+ if ( static_cast<const SwFlyFrame*>(pFrame)->GetPrevLink() )
{
- const SwFlyFrm *pMaster = static_cast<const SwFlyFrm*>(pFrm);
+ const SwFlyFrame *pMaster = static_cast<const SwFlyFrame*>(pFrame);
do
{ pMaster = pMaster->GetPrevLink();
} while ( pMaster->GetPrevLink() );
if ( pMaster->IsProtected() )
return true;
}
- pFrm = static_cast<const SwFlyFrm*>(pFrm)->GetAnchorFrm();
+ pFrame = static_cast<const SwFlyFrame*>(pFrame)->GetAnchorFrame();
}
- else if ( pFrm->IsFootnoteFrm() )
- pFrm = static_cast<const SwFootnoteFrm*>(pFrm)->GetRef();
+ else if ( pFrame->IsFootnoteFrame() )
+ pFrame = static_cast<const SwFootnoteFrame*>(pFrame)->GetRef();
else
- pFrm = pFrm->GetUpper();
+ pFrame = pFrame->GetUpper();
- } while ( pFrm );
+ } while ( pFrame );
return false;
}
/** @return the physical page number */
-sal_uInt16 SwFrm::GetPhyPageNum() const
+sal_uInt16 SwFrame::GetPhyPageNum() const
{
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
return pPage ? pPage->GetPhyPageNum() : 0;
}
@@ -1719,20 +1719,20 @@ sal_uInt16 SwFrm::GetPhyPageNum() const
* If there is no number offset, we take the physical page number instead,
* but a previous empty page don't count.
*/
-bool SwFrm::WannaRightPage() const
+bool SwFrame::WannaRightPage() const
{
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
if ( !pPage || !pPage->GetUpper() )
return true;
- const SwFrm *pFlow = pPage->FindFirstBodyContent();
+ const SwFrame *pFlow = pPage->FindFirstBodyContent();
const SwPageDesc *pDesc = nullptr;
::boost::optional<sal_uInt16> oPgNum;
if ( pFlow )
{
if ( pFlow->IsInTab() )
- pFlow = pFlow->FindTabFrm();
- const SwFlowFrm *pTmp = SwFlowFrm::CastFlowFrm( pFlow );
+ pFlow = pFlow->FindTabFrame();
+ const SwFlowFrame *pTmp = SwFlowFrame::CastFlowFrame( pFlow );
if ( !pTmp->IsFollow() )
{
const SwFormatPageDesc& rPgDesc = pFlow->GetAttrSet()->GetPageDesc();
@@ -1742,9 +1742,9 @@ bool SwFrm::WannaRightPage() const
}
if ( !pDesc )
{
- SwPageFrm *pPrv = const_cast<SwPageFrm*>(static_cast<const SwPageFrm*>(pPage->GetPrev()));
+ SwPageFrame *pPrv = const_cast<SwPageFrame*>(static_cast<const SwPageFrame*>(pPage->GetPrev()));
if( pPrv && pPrv->IsEmptyPage() )
- pPrv = static_cast<SwPageFrm*>(pPrv->GetPrev());
+ pPrv = static_cast<SwPageFrame*>(pPrv->GetPrev());
if( pPrv )
pDesc = pPrv->GetPageDesc()->GetFollow();
else
@@ -1760,7 +1760,7 @@ bool SwFrm::WannaRightPage() const
else
{
bOdd = pPage->OnRightPage();
- if( pPage->GetPrev() && static_cast<const SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() )
+ if( pPage->GetPrev() && static_cast<const SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() )
bOdd = !bOdd;
}
if( !pPage->IsEmptyPage() )
@@ -1773,18 +1773,18 @@ bool SwFrm::WannaRightPage() const
return bOdd;
}
-bool SwFrm::OnFirstPage() const
+bool SwFrame::OnFirstPage() const
{
bool bRet = false;
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
if (pPage)
{
- const SwPageFrm* pPrevFrm = dynamic_cast<const SwPageFrm*>(pPage->GetPrev());
- if (pPrevFrm)
+ const SwPageFrame* pPrevFrame = dynamic_cast<const SwPageFrame*>(pPage->GetPrev());
+ if (pPrevFrame)
{
const SwPageDesc* pDesc = pPage->GetPageDesc();
- bRet = pPrevFrm->GetPageDesc() != pDesc;
+ bRet = pPrevFrame->GetPageDesc() != pDesc;
}
else
bRet = true;
@@ -1792,38 +1792,38 @@ bool SwFrm::OnFirstPage() const
return bRet;
}
-void SwFrm::Calc(vcl::RenderContext* pRenderContext) const
+void SwFrame::Calc(vcl::RenderContext* pRenderContext) const
{
if ( !mbValidPos || !mbValidPrtArea || !mbValidSize )
- const_cast<SwFrm*>(this)->PrepareMake(pRenderContext);
+ const_cast<SwFrame*>(this)->PrepareMake(pRenderContext);
}
-Point SwFrm::GetRelPos() const
+Point SwFrame::GetRelPos() const
{
- Point aRet( maFrm.Pos() );
- // here we cast since SwLayoutFrm is declared only as forwarded
+ Point aRet( maFrame.Pos() );
+ // here we cast since SwLayoutFrame is declared only as forwarded
aRet -= GetUpper()->Prt().Pos();
- aRet -= GetUpper()->Frm().Pos();
+ aRet -= GetUpper()->Frame().Pos();
return aRet;
}
/** @return the virtual page number with the offset. */
-sal_uInt16 SwFrm::GetVirtPageNum() const
+sal_uInt16 SwFrame::GetVirtPageNum() const
{
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
if ( !pPage || !pPage->GetUpper() )
return 0;
sal_uInt16 nPhyPage = pPage->GetPhyPageNum();
- if ( !(static_cast<const SwRootFrm*>(pPage->GetUpper()))->IsVirtPageNum() )
+ if ( !(static_cast<const SwRootFrame*>(pPage->GetUpper()))->IsVirtPageNum() )
return nPhyPage;
//Search the nearest section using the virtual page number.
//Because searching backwards needs a lot of time we search specific using
//the dependencies. From the PageDescs we get the attributes and from the
//attributes we get the sections.
- const SwPageFrm *pVirtPage = nullptr;
- const SwFrm *pFrm = nullptr;
+ const SwPageFrame *pVirtPage = nullptr;
+ const SwFrame *pFrame = nullptr;
const SfxItemPool &rPool = pPage->GetFormat()->GetDoc()->GetAttrPool();
sal_uInt32 nMaxItems = rPool.GetItemCount2( RES_PAGEDESC );
for( sal_uInt32 n = 0; n < nMaxItems; ++n )
@@ -1843,61 +1843,61 @@ sal_uInt16 SwFrm::GetVirtPageNum() const
if( !pVirtPage || aInfo.GetPage()->GetPhyPageNum() > pVirtPage->GetPhyPageNum() )
{
pVirtPage = aInfo.GetPage();
- pFrm = aInfo.GetFrm();
+ pFrame = aInfo.GetFrame();
}
}
}
}
- if ( pFrm )
+ if ( pFrame )
{
- ::boost::optional<sal_uInt16> oNumOffset = pFrm->GetAttrSet()->GetPageDesc().GetNumOffset();
+ ::boost::optional<sal_uInt16> oNumOffset = pFrame->GetAttrSet()->GetPageDesc().GetNumOffset();
if (oNumOffset)
{
- return nPhyPage - pFrm->GetPhyPageNum() + oNumOffset.get();
+ return nPhyPage - pFrame->GetPhyPageNum() + oNumOffset.get();
}
else
{
- return nPhyPage - pFrm->GetPhyPageNum();
+ return nPhyPage - pFrame->GetPhyPageNum();
}
}
return nPhyPage;
}
/** Determines and sets those cells which are enclosed by the selection. */
-bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr )
+bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor )
{
//Find Union-Rects and tables (Follows) of the selection.
- OSL_ENSURE( rTableCrsr.GetContentNode() && rTableCrsr.GetContentNode( false ),
+ OSL_ENSURE( rTableCursor.GetContentNode() && rTableCursor.GetContentNode( false ),
"Tabselection nicht auf Cnt." );
bool bRet = false;
// For new table models there's no need to ask the layout..
- if( rTableCrsr.NewTableSelection() )
+ if( rTableCursor.NewTableSelection() )
return true;
Point aPtPt, aMkPt;
{
- SwShellCrsr* pShCrsr = dynamic_cast<SwShellCrsr*>(&rTableCrsr);
+ SwShellCursor* pShCursor = dynamic_cast<SwShellCursor*>(&rTableCursor);
- if( pShCrsr )
+ if( pShCursor )
{
- aPtPt = pShCrsr->GetPtPos();
- aMkPt = pShCrsr->GetMkPos();
+ aPtPt = pShCursor->GetPtPos();
+ aMkPt = pShCursor->GetMkPos();
}
}
// #151012# Made code robust here
- const SwContentNode* pTmpStartNode = rTableCrsr.GetContentNode();
- const SwContentNode* pTmpEndNode = rTableCrsr.GetContentNode(false);
+ const SwContentNode* pTmpStartNode = rTableCursor.GetContentNode();
+ const SwContentNode* pTmpEndNode = rTableCursor.GetContentNode(false);
- const SwFrm* pTmpStartFrm = pTmpStartNode ? pTmpStartNode->getLayoutFrm( this, &aPtPt, nullptr, false ) : nullptr;
- const SwFrm* pTmpEndFrm = pTmpEndNode ? pTmpEndNode->getLayoutFrm( this, &aMkPt, nullptr, false ) : nullptr;
+ const SwFrame* pTmpStartFrame = pTmpStartNode ? pTmpStartNode->getLayoutFrame( this, &aPtPt, nullptr, false ) : nullptr;
+ const SwFrame* pTmpEndFrame = pTmpEndNode ? pTmpEndNode->getLayoutFrame( this, &aMkPt, nullptr, false ) : nullptr;
- const SwLayoutFrm* pStart = pTmpStartFrm ? pTmpStartFrm->GetUpper() : nullptr;
- const SwLayoutFrm* pEnd = pTmpEndFrm ? pTmpEndFrm->GetUpper() : nullptr;
+ const SwLayoutFrame* pStart = pTmpStartFrame ? pTmpStartFrame->GetUpper() : nullptr;
+ const SwLayoutFrame* pEnd = pTmpEndFrame ? pTmpEndFrame->GetUpper() : nullptr;
- OSL_ENSURE( pStart && pEnd, "MakeTableCrsrs: Good to have the code robust here!" );
+ OSL_ENSURE( pStart && pEnd, "MakeTableCursors: Good to have the code robust here!" );
/* #109590# Only change table boxes if the frames are
valid. Needed because otherwise the table cursor after moving
@@ -1909,44 +1909,44 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr )
SwSelBoxes aNew;
- const bool bReadOnlyAvailable = rTableCrsr.IsReadOnlyAvailable();
+ const bool bReadOnlyAvailable = rTableCursor.IsReadOnlyAvailable();
for ( size_t 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:
- SwLayoutFrm* pRow = pTable->IsFollow() ?
+ SwLayoutFrame* pRow = pTable->IsFollow() ?
pTable->GetFirstNonHeadlineRow() :
- const_cast<SwLayoutFrm*>(static_cast<const SwLayoutFrm*>(pTable->Lower()));
+ const_cast<SwLayoutFrame*>(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 ) )
{
- OSL_ENSURE( pCell->IsCellFrm(), "Frame without cell" );
- if( IsFrmInTableSel( pUnion->GetUnion(), pCell ) &&
+ OSL_ENSURE( pCell->IsCellFrame(), "Frame without cell" );
+ if( IsFrameInTableSel( pUnion->GetUnion(), pCell ) &&
(bReadOnlyAvailable ||
!pCell->GetFormat()->GetProtect().IsContentProtected()))
{
SwTableBox* pInsBox = const_cast<SwTableBox*>(
- static_cast<const SwCellFrm*>(pCell)->GetTabBox());
+ static_cast<const SwCellFrame*>(pCell)->GetTabBox());
aNew.insert( pInsBox );
}
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
{
- const SwLayoutFrm* pLastCell = pCell;
+ const SwLayoutFrame* pLastCell = pCell;
do
{
pCell = pCell->GetNextLayoutLeaf();
@@ -1954,7 +1954,7 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr )
// For sections with columns
if( pCell && pCell->IsInTab() )
{
- while( !pCell->IsCellFrm() )
+ while( !pCell->IsCellFrame() )
{
pCell = pCell->GetUpper();
OSL_ENSURE( pCell, "Where's my cell?" );
@@ -1963,11 +1963,11 @@ bool SwRootFrm::MakeTableCrsrs( SwTableCursor& rTableCrsr )
}
}
}
- pRow = static_cast<SwLayoutFrm*>(pRow->GetNext());
+ pRow = static_cast<SwLayoutFrame*>(pRow->GetNext());
}
}
- rTableCrsr.ActualizeSelection( aNew );
+ rTableCursor.ActualizeSelection( aNew );
bRet = true;
}
@@ -2000,7 +2000,7 @@ inline void Add( SwRegionRects& rRegion, const SwRect& rRect )
* and if more than two frames are involved add the PrtArea of all
* frames which lie in between
*
- * Big reorganization because of the FlyFrm - those need to be locked out.
+ * Big reorganization because of the FlyFrame - those need to be locked out.
* Exceptions: - The Fly in which the selection took place (if it took place
* in a Fly)
* - The Flys which are underrun by the text
@@ -2011,10 +2011,10 @@ inline void Add( SwRegionRects& rRegion, const SwRect& rRect )
* inverted rectangles are available.
* In the end the Flys are cut out of the section.
*/
-void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
+void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor)
{
- SwPosition *pStartPos = rCrsr.Start(),
- *pEndPos = rCrsr.GetPoint() == pStartPos ? rCrsr.GetMark() : rCrsr.GetPoint();
+ SwPosition *pStartPos = rCursor.Start(),
+ *pEndPos = rCursor.GetPoint() == pStartPos ? rCursor.GetMark() : rCursor.GetPoint();
SwViewShell *pSh = GetCurrShell();
@@ -2025,35 +2025,35 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
// #i12836# enhanced pdf
SwRegionRects aRegion( !bIgnoreVisArea ?
pSh->VisArea() :
- Frm() );
+ Frame() );
if( !pStartPos->nNode.GetNode().IsContentNode() ||
- !pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrm(this) ||
+ !pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ||
( pStartPos->nNode != pEndPos->nNode &&
( !pEndPos->nNode.GetNode().IsContentNode() ||
- !pEndPos->nNode.GetNode().GetContentNode()->getLayoutFrm(this) ) ) )
+ !pEndPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ) ) )
{
return;
}
- //First obtain the ContentFrms for the start and the end - those are needed
+ //First obtain the ContentFrames for the start and the end - those are needed
//anyway.
- SwContentFrm const* pStartFrm = pStartPos->nNode.GetNode().
- GetContentNode()->getLayoutFrm( this, &rCrsr.GetSttPos(), pStartPos );
+ SwContentFrame const* pStartFrame = pStartPos->nNode.GetNode().
+ GetContentNode()->getLayoutFrame( this, &rCursor.GetSttPos(), pStartPos );
- SwContentFrm const* pEndFrm = pEndPos->nNode.GetNode().
- GetContentNode()->getLayoutFrm( this, &rCrsr.GetEndPos(), pEndPos );
+ SwContentFrame const* pEndFrame = pEndPos->nNode.GetNode().
+ GetContentNode()->getLayoutFrame( this, &rCursor.GetEndPos(), pEndPos );
- OSL_ENSURE( (pStartFrm && pEndFrm), "Keine ContentFrms gefunden." );
+ OSL_ENSURE( (pStartFrame && pEndFrame), "Keine ContentFrames gefunden." );
- //Do not subtract the FlyFrms in which selected Frames lie.
+ //Do not subtract the FlyFrames in which selected Frames lie.
SwSortedObjs aSortObjs;
- if ( pStartFrm->IsInFly() )
+ if ( pStartFrame->IsInFly() )
{
- const SwAnchoredObject* pObj = pStartFrm->FindFlyFrm();
+ const SwAnchoredObject* pObj = pStartFrame->FindFlyFrame();
OSL_ENSURE( pObj, "No Start Object." );
if (pObj) aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) );
- const SwAnchoredObject* pObj2 = pEndFrm->FindFlyFrm();
- OSL_ENSURE( pObj2, "SwRootFrm::CalcFrmRects(..) - FlyFrame missing - looks like an invalid selection" );
+ const SwAnchoredObject* pObj2 = pEndFrame->FindFlyFrame();
+ OSL_ENSURE( pObj2, "SwRootFrame::CalcFrameRects(..) - FlyFrame missing - looks like an invalid selection" );
if ( pObj2 != nullptr && pObj2 != pObj )
{
aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj2)) );
@@ -2063,83 +2063,83 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
// if a selection which is not allowed exists, we correct what is not
// allowed (header/footer/table-headline) for two pages.
do { // middle check loop
- const SwLayoutFrm* pSttLFrm = pStartFrm->GetUpper();
+ const SwLayoutFrame* pSttLFrame = pStartFrame->GetUpper();
const sal_uInt16 cHdFtTableHd = FRM_HEADER | FRM_FOOTER | FRM_TAB;
- while( pSttLFrm &&
- ! (cHdFtTableHd & pSttLFrm->GetType() ))
- pSttLFrm = pSttLFrm->GetUpper();
- if( !pSttLFrm )
+ while( pSttLFrame &&
+ ! (cHdFtTableHd & pSttLFrame->GetType() ))
+ pSttLFrame = pSttLFrame->GetUpper();
+ if( !pSttLFrame )
break;
- const SwLayoutFrm* pEndLFrm = pEndFrm->GetUpper();
- while( pEndLFrm &&
- ! (cHdFtTableHd & pEndLFrm->GetType() ))
- pEndLFrm = pEndLFrm->GetUpper();
- if( !pEndLFrm )
+ const SwLayoutFrame* pEndLFrame = pEndFrame->GetUpper();
+ while( pEndLFrame &&
+ ! (cHdFtTableHd & pEndLFrame->GetType() ))
+ pEndLFrame = pEndLFrame->GetUpper();
+ if( !pEndLFrame )
break;
- OSL_ENSURE( pEndLFrm->GetType() == pSttLFrm->GetType(),
+ OSL_ENSURE( pEndLFrame->GetType() == pSttLFrame->GetType(),
"Selection over different content" );
- switch( pSttLFrm->GetType() )
+ switch( pSttLFrame->GetType() )
{
case FRM_HEADER:
case FRM_FOOTER:
// On different pages? Then always on the start-page
- if( pEndLFrm->FindPageFrm() != pSttLFrm->FindPageFrm() )
+ if( pEndLFrame->FindPageFrame() != pSttLFrame->FindPageFrame() )
{
// Set end- to the start-ContentFrame
- if( pStartPos == rCrsr.GetPoint() )
- pEndFrm = pStartFrm;
+ if( pStartPos == rCursor.GetPoint() )
+ pEndFrame = pStartFrame;
else
- pStartFrm = pEndFrm;
+ pStartFrame = pEndFrame;
}
break;
case FRM_TAB:
// On different pages? Then check for table-headline
{
- const SwTabFrm* pTabFrm = static_cast<const SwTabFrm*>(pSttLFrm);
- if( ( pTabFrm->GetFollow() ||
- static_cast<const SwTabFrm*>(pEndLFrm)->GetFollow() ) &&
- pTabFrm->GetTable()->GetRowsToRepeat() > 0 &&
- pTabFrm->GetLower() != static_cast<const SwTabFrm*>(pEndLFrm)->GetLower() &&
- ( lcl_IsInRepeatedHeadline( pStartFrm ) ||
- lcl_IsInRepeatedHeadline( pEndFrm ) ) )
+ const SwTabFrame* pTabFrame = static_cast<const SwTabFrame*>(pSttLFrame);
+ if( ( pTabFrame->GetFollow() ||
+ static_cast<const SwTabFrame*>(pEndLFrame)->GetFollow() ) &&
+ pTabFrame->GetTable()->GetRowsToRepeat() > 0 &&
+ pTabFrame->GetLower() != static_cast<const SwTabFrame*>(pEndLFrame)->GetLower() &&
+ ( lcl_IsInRepeatedHeadline( pStartFrame ) ||
+ lcl_IsInRepeatedHeadline( pEndFrame ) ) )
{
// Set end- to the start-ContentFrame
- if( pStartPos == rCrsr.GetPoint() )
- pEndFrm = pStartFrm;
+ if( pStartPos == rCursor.GetPoint() )
+ pEndFrame = pStartFrame;
else
- pStartFrm = pEndFrm;
+ pStartFrame = pEndFrame;
}
}
break;
}
} while( false );
- SwCrsrMoveState aTmpState( MV_NONE );
+ SwCursorMoveState aTmpState( MV_NONE );
aTmpState.m_b2Lines = true;
aTmpState.m_bNoScroll = true;
- aTmpState.m_nCursorBidiLevel = pStartFrm->IsRightToLeft() ? 1 : 0;
+ aTmpState.m_nCursorBidiLevel = pStartFrame->IsRightToLeft() ? 1 : 0;
- //ContentRects to Start- and EndFrms.
+ //ContentRects to Start- and EndFrames.
SwRect aStRect, aEndRect;
- pStartFrm->GetCharRect( aStRect, *pStartPos, &aTmpState );
+ pStartFrame->GetCharRect( aStRect, *pStartPos, &aTmpState );
Sw2LinesPos *pSt2Pos = aTmpState.m_p2Lines;
aTmpState.m_p2Lines = nullptr;
- aTmpState.m_nCursorBidiLevel = pEndFrm->IsRightToLeft() ? 1 : 0;
+ aTmpState.m_nCursorBidiLevel = pEndFrame->IsRightToLeft() ? 1 : 0;
- pEndFrm->GetCharRect( aEndRect, *pEndPos, &aTmpState );
+ pEndFrame->GetCharRect( aEndRect, *pEndPos, &aTmpState );
Sw2LinesPos *pEnd2Pos = aTmpState.m_p2Lines;
- SwRect aStFrm ( pStartFrm->UnionFrm( true ) );
- aStFrm.Intersection( pStartFrm->PaintArea() );
- SwRect aEndFrm( pStartFrm == pEndFrm ? aStFrm : pEndFrm->UnionFrm( true ) );
- if( pStartFrm != pEndFrm )
+ SwRect aStFrame ( pStartFrame->UnionFrame( true ) );
+ aStFrame.Intersection( pStartFrame->PaintArea() );
+ SwRect aEndFrame( pStartFrame == pEndFrame ? aStFrame : pEndFrame->UnionFrame( true ) );
+ if( pStartFrame != pEndFrame )
{
- aEndFrm.Intersection( pEndFrm->PaintArea() );
+ aEndFrame.Intersection( pEndFrame->PaintArea() );
}
- SWRECTFN( pStartFrm )
- const bool bR2L = pStartFrm->IsRightToLeft();
- const bool bEndR2L = pEndFrm->IsRightToLeft();
+ SWRECTFN( pStartFrame )
+ const bool bR2L = pStartFrame->IsRightToLeft();
+ const bool bEndR2L = pEndFrame->IsRightToLeft();
// If there's no doubleline portion involved or start and end are both
// in the same doubleline portion, all works fine, but otherwise
@@ -2174,7 +2174,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
{
SwRect aTmp2( pSt2Pos->aPortion );
(aTmp2.*fnRect->fnSetRight)( nLeftAbs );
- aTmp2.Intersection( aEndFrm );
+ aTmp2.Intersection( aEndFrame );
Sub( aRegion, aTmp2 );
}
}
@@ -2196,7 +2196,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
(pSt2Pos->aLine.*fnRect->fnGetTop)() );
}
- aTmp.Intersection( aStFrm );
+ aTmp.Intersection( aStFrame );
Sub( aRegion, aTmp );
SwTwips nTmp = (pSt2Pos->aLine.*fnRect->fnGetBottom)();
@@ -2215,7 +2215,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
(aTmp.*fnRect->fnSetLeft)(
(pSt2Pos->aPortion.*fnRect->fnGetLeft)() );
}
- aTmp.Intersection( aStFrm );
+ aTmp.Intersection( aStFrame );
Sub( aRegion, aTmp );
}
@@ -2228,7 +2228,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
if( pEnd2Pos )
{
- SWRECTFNX( pEndFrm )
+ SWRECTFNX( pEndFrame )
SwRect aTmp( aEndRect );
// BiDi-Portions are swimming against the current.
@@ -2250,7 +2250,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
{
SwRect aTmp2( pEnd2Pos->aPortion );
(aTmp2.*fnRectX->fnSetLeft)( nRightAbs );
- aTmp2.Intersection( aEndFrm );
+ aTmp2.Intersection( aEndFrame );
Sub( aRegion, aTmp2 );
}
}
@@ -2272,7 +2272,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
(pEnd2Pos->aLine.*fnRectX->fnGetBottom)() );
}
- aTmp.Intersection( aEndFrm );
+ aTmp.Intersection( aEndFrame );
Sub( aRegion, aTmp );
// The next statement means neither ruby nor rotate(90):
@@ -2294,7 +2294,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
(aTmp.*fnRectX->fnSetRight)(
(pEnd2Pos->aPortion.*fnRectX->fnGetRight)() );
}
- aTmp.Intersection( aEndFrm );
+ aTmp.Intersection( aEndFrame );
Sub( aRegion, aTmp );
}
}
@@ -2324,7 +2324,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
long nLeftAbs = nRightAbs - (pSt2Pos->aPortion2.*fnRect->fnGetWidth)();
(aTmp.*fnRect->fnSetRight)( nRightAbs );
- aTmp.Intersection( aStFrm );
+ aTmp.Intersection( aStFrame );
Sub( aRegion, aTmp );
aStRect = pSt2Pos->aLine;
@@ -2332,7 +2332,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
(aStRect.*fnRect->fnSetWidth)( 1 );
}
- SWRECTFNX( pEndFrm )
+ SWRECTFNX( pEndFrame )
if ( (pEnd2Pos->aPortion2.*fnRectX->fnGetWidth)() )
{
SwRect aTmp( aEndRect );
@@ -2341,7 +2341,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
long nLeftAbs = nRightAbs - (pEnd2Pos->aPortion2.*fnRectX->fnGetWidth)();
(aTmp.*fnRectX->fnSetLeft)( nLeftAbs );
- aTmp.Intersection( aEndFrm );
+ aTmp.Intersection( aEndFrame );
Sub( aRegion, aTmp );
aEndRect = pEnd2Pos->aLine;
@@ -2352,26 +2352,26 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
// The charrect may be outside the paintarea (for cursortravelling)
// but the selection has to be restricted to the paintarea
- if( aStRect.Left() < aStFrm.Left() )
- aStRect.Left( aStFrm.Left() );
- else if( aStRect.Left() > aStFrm.Right() )
- aStRect.Left( aStFrm.Right() );
+ if( aStRect.Left() < aStFrame.Left() )
+ aStRect.Left( aStFrame.Left() );
+ else if( aStRect.Left() > aStFrame.Right() )
+ aStRect.Left( aStFrame.Right() );
SwTwips nTmp = aStRect.Right();
- if( nTmp < aStFrm.Left() )
- aStRect.Right( aStFrm.Left() );
- else if( nTmp > aStFrm.Right() )
- aStRect.Right( aStFrm.Right() );
- if( aEndRect.Left() < aEndFrm.Left() )
- aEndRect.Left( aEndFrm.Left() );
- else if( aEndRect.Left() > aEndFrm.Right() )
- aEndRect.Left( aEndFrm.Right() );
+ if( nTmp < aStFrame.Left() )
+ aStRect.Right( aStFrame.Left() );
+ else if( nTmp > aStFrame.Right() )
+ aStRect.Right( aStFrame.Right() );
+ if( aEndRect.Left() < aEndFrame.Left() )
+ aEndRect.Left( aEndFrame.Left() );
+ else if( aEndRect.Left() > aEndFrame.Right() )
+ aEndRect.Left( aEndFrame.Right() );
nTmp = aEndRect.Right();
- if( nTmp < aEndFrm.Left() )
- aEndRect.Right( aEndFrm.Left() );
- else if( nTmp > aEndFrm.Right() )
- aEndRect.Right( aEndFrm.Right() );
+ if( nTmp < aEndFrame.Left() )
+ aEndRect.Right( aEndFrame.Left() );
+ else if( nTmp > aEndFrame.Right() )
+ aEndRect.Right( aEndFrame.Right() );
- if( pStartFrm == pEndFrm )
+ if( pStartFrame == pEndFrame )
{
bool bSameRotatedOrBidi = pSt2Pos && pEnd2Pos &&
( MultiPortionType::BIDI == pSt2Pos->nMultiType ) &&
@@ -2401,18 +2401,18 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
SwRect aTmp = SwRect( aTmpSt, aTmpEnd );
// Bug 34888: If content is selected which doesn't take space
// away (i.e. PostIts, RefMarks, TOXMarks), then at
- // least set the width of the Crsr.
+ // least set the width of the Cursor.
if( 1 == (aTmp.*fnRect->fnGetWidth)() &&
pStartPos->nContent.GetIndex() !=
pEndPos->nContent.GetIndex() )
{
OutputDevice* pOut = pSh->GetOut();
- long nCrsrWidth = pOut->GetSettings().GetStyleSettings().
+ long nCursorWidth = pOut->GetSettings().GetStyleSettings().
GetCursorSize();
(aTmp.*fnRect->fnSetWidth)( pOut->PixelToLogic(
- Size( nCrsrWidth, 0 ) ).Width() );
+ Size( nCursorWidth, 0 ) ).Width() );
}
- aTmp.Intersection( aStFrm );
+ aTmp.Intersection( aStFrame );
Sub( aRegion, aTmp );
}
//case 2: (Same frame, but not the same line)
@@ -2426,14 +2426,14 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
}
else
{
- lLeft = (pStartFrm->Frm().*fnRect->fnGetLeft)() +
- (pStartFrm->Prt().*fnRect->fnGetLeft)();
- lRight = (aEndFrm.*fnRect->fnGetRight)();
+ lLeft = (pStartFrame->Frame().*fnRect->fnGetLeft)() +
+ (pStartFrame->Prt().*fnRect->fnGetLeft)();
+ lRight = (aEndFrame.*fnRect->fnGetRight)();
}
- if( lLeft < (aStFrm.*fnRect->fnGetLeft)() )
- lLeft = (aStFrm.*fnRect->fnGetLeft)();
- if( lRight > (aStFrm.*fnRect->fnGetRight)() )
- lRight = (aStFrm.*fnRect->fnGetRight)();
+ if( lLeft < (aStFrame.*fnRect->fnGetLeft)() )
+ lLeft = (aStFrame.*fnRect->fnGetLeft)();
+ if( lRight > (aStFrame.*fnRect->fnGetRight)() )
+ lRight = (aStFrame.*fnRect->fnGetRight)();
SwRect aSubRect( aStRect );
//First line
if( bR2L )
@@ -2469,49 +2469,49 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
//The startframe first...
SwRect aSubRect( aStRect );
if( bR2L )
- (aSubRect.*fnRect->fnSetLeft)( (aStFrm.*fnRect->fnGetLeft)());
+ (aSubRect.*fnRect->fnSetLeft)( (aStFrame.*fnRect->fnGetLeft)());
else
- (aSubRect.*fnRect->fnSetRight)( (aStFrm.*fnRect->fnGetRight)());
+ (aSubRect.*fnRect->fnSetRight)( (aStFrame.*fnRect->fnGetRight)());
Sub( aRegion, aSubRect );
SwTwips nTmpTwips = (aStRect.*fnRect->fnGetBottom)();
- if( (aStFrm.*fnRect->fnGetBottom)() != nTmpTwips )
+ if( (aStFrame.*fnRect->fnGetBottom)() != nTmpTwips )
{
- aSubRect = aStFrm;
+ aSubRect = aStFrame;
(aSubRect.*fnRect->fnSetTop)( nTmpTwips );
Sub( aRegion, aSubRect );
}
//Now the frames between, if there are any
- bool const bBody = pStartFrm->IsInDocBody();
- const SwTableBox* pCellBox = pStartFrm->GetUpper()->IsCellFrm() ?
- static_cast<const SwCellFrm*>(pStartFrm->GetUpper())->GetTabBox() : nullptr;
+ bool const bBody = pStartFrame->IsInDocBody();
+ const SwTableBox* pCellBox = pStartFrame->GetUpper()->IsCellFrame() ?
+ static_cast<const SwCellFrame*>(pStartFrame->GetUpper())->GetTabBox() : nullptr;
if (pSh->IsSelectAll())
pCellBox = nullptr;
- const SwContentFrm *pContent = pStartFrm->GetNextContentFrm();
+ const SwContentFrame *pContent = pStartFrame->GetNextContentFrame();
SwRect aPrvRect;
OSL_ENSURE( pContent,
- "<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect" );
- while ( pContent && pContent != pEndFrm )
+ "<SwRootFrame::CalcFrameRects(..)> - no content frame. This is a serious defect" );
+ while ( pContent && pContent != pEndFrame )
{
if ( pContent->IsInFly() )
{
- const SwAnchoredObject* pObj = pContent->FindFlyFrm();
+ const SwAnchoredObject* pObj = pContent->FindFlyFrame();
aSortObjs.Insert( *(const_cast<SwAnchoredObject*>(pObj)) );
}
- // Consider only frames which have the same IsInDocBody value like pStartFrm
- // If pStartFrm is inside a SwCellFrm, consider only frames which are inside the
+ // Consider only frames which have the same IsInDocBody value like pStartFrame
+ // If pStartFrame is inside a SwCellFrame, consider only frames which are inside the
// same cell frame (or its follow cell)
- const SwTableBox* pTmpCellBox = pContent->GetUpper()->IsCellFrm() ?
- static_cast<const SwCellFrm*>(pContent->GetUpper())->GetTabBox() : nullptr;
+ const SwTableBox* pTmpCellBox = pContent->GetUpper()->IsCellFrame() ?
+ static_cast<const SwCellFrame*>(pContent->GetUpper())->GetTabBox() : nullptr;
if (pSh->IsSelectAll())
pTmpCellBox = nullptr;
if ( bBody == pContent->IsInDocBody() &&
( !pCellBox || pCellBox == pTmpCellBox ) )
{
- SwRect aCRect( pContent->UnionFrm( true ) );
+ SwRect aCRect( pContent->UnionFrame( true ) );
aCRect.Intersection( pContent->PaintArea() );
if( aCRect.IsOver( aRegion.GetOrigin() ))
{
@@ -2531,30 +2531,30 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
}
}
}
- pContent = pContent->GetNextContentFrm();
+ pContent = pContent->GetNextContentFrame();
OSL_ENSURE( pContent,
- "<SwRootFrm::CalcFrmRects(..)> - no content frame. This is a serious defect!" );
+ "<SwRootFrame::CalcFrameRects(..)> - no content frame. This is a serious defect!" );
}
if ( aPrvRect.HasArea() )
Sub( aRegion, aPrvRect );
//At least the endframe...
- bVert = pEndFrm->IsVertical();
- bRev = pEndFrm->IsReverse();
- fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrm->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) :
+ bVert = pEndFrame->IsVertical();
+ bRev = pEndFrame->IsReverse();
+ fnRect = bVert ? ( bRev ? fnRectVL2R : ( pEndFrame->IsVertLR() ? fnRectVertL2R : fnRectVert ) ) :
( bRev ? fnRectB2T : fnRectHori );
nTmpTwips = (aEndRect.*fnRect->fnGetTop)();
- if( (aEndFrm.*fnRect->fnGetTop)() != nTmpTwips )
+ if( (aEndFrame.*fnRect->fnGetTop)() != nTmpTwips )
{
- aSubRect = aEndFrm;
+ aSubRect = aEndFrame;
(aSubRect.*fnRect->fnSetBottom)( nTmpTwips );
Sub( aRegion, aSubRect );
}
aSubRect = aEndRect;
if( bEndR2L )
- (aSubRect.*fnRect->fnSetRight)((aEndFrm.*fnRect->fnGetRight)());
+ (aSubRect.*fnRect->fnSetRight)((aEndFrame.*fnRect->fnGetRight)());
else
- (aSubRect.*fnRect->fnSetLeft)( (aEndFrm.*fnRect->fnGetLeft)() );
+ (aSubRect.*fnRect->fnSetLeft)( (aEndFrame.*fnRect->fnGetLeft)() );
Sub( aRegion, aSubRect );
}
@@ -2563,13 +2563,13 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
delete pEnd2Pos;
// Cut out Flys during loop. We don't cut out Flys when:
- // - the Lower is StartFrm/EndFrm (FlyInCnt and all other Flys which again
+ // - the Lower is StartFrame/EndFrame (FlyInCnt and all other Flys which again
// sit in it)
- // - if in the Z-order we have Flys above those in which the StartFrm is
+ // - if in the Z-order we have Flys above those in which the StartFrame is
// placed
// - if they are anchored to inside the selection and thus part of it
- const SwPageFrm *pPage = pStartFrm->FindPageFrm();
- const SwPageFrm *pEndPage = pEndFrm->FindPageFrm();
+ const SwPageFrame *pPage = pStartFrame->FindPageFrame();
+ const SwPageFrame *pEndPage = pEndFrame->FindPageFrame();
while ( pPage )
{
@@ -2579,9 +2579,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) == nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) == nullptr )
continue;
- const SwFlyFrm* pFly = static_cast<const SwFlyFrm*>(pAnchoredObj);
+ const SwFlyFrame* pFly = static_cast<const SwFlyFrame*>(pAnchoredObj);
const SwVirtFlyDrawObj* pObj = pFly->GetVirtDrawObj();
const SwFormatSurround &rSur = pFly->GetFormat()->GetSurround();
const SwPosition* anchoredAt = pAnchoredObj->GetFrameFormat().GetAnchor().GetContentAnchor();
@@ -2599,8 +2599,8 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
}
}
if( inSelection )
- Add( aRegion, pFly->Frm() );
- else if ( !pFly->IsAnLower( pStartFrm ) &&
+ Add( aRegion, pFly->Frame() );
+ else if ( !pFly->IsAnLower( pStartFrame ) &&
(rSur.GetSurround() != SURROUND_THROUGHT &&
!rSur.IsContour()) )
{
@@ -2611,9 +2611,9 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
const sal_uInt32 nPos = pObj->GetOrdNum();
for ( size_t k = 0; bSub && k < aSortObjs.size(); ++k )
{
- OSL_ENSURE( dynamic_cast< const SwFlyFrm *>( aSortObjs[k] ) != nullptr,
- "<SwRootFrm::CalcFrmRects(..)> - object in <aSortObjs> of unexpected type" );
- const SwFlyFrm* pTmp = static_cast<SwFlyFrm*>(aSortObjs[k]);
+ OSL_ENSURE( dynamic_cast< const SwFlyFrame *>( aSortObjs[k] ) != nullptr,
+ "<SwRootFrame::CalcFrameRects(..)> - object in <aSortObjs> of unexpected type" );
+ const SwFlyFrame* pTmp = static_cast<SwFlyFrame*>(aSortObjs[k]);
do
{
if ( nPos < pTmp->GetVirtDrawObj()->GetOrdNumDirect() )
@@ -2622,35 +2622,35 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
}
else
{
- pTmp = pTmp->GetAnchorFrm()->FindFlyFrm();
+ pTmp = pTmp->GetAnchorFrame()->FindFlyFrame();
}
} while ( bSub && pTmp );
}
if ( bSub )
- Sub( aRegion, pFly->Frm() );
+ Sub( aRegion, pFly->Frame() );
}
}
}
if ( pPage == pEndPage )
break;
else
- pPage = static_cast<const SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<const SwPageFrame*>(pPage->GetNext());
}
//Because it looks better, we close the DropCaps.
SwRect aDropRect;
- if ( pStartFrm->IsTextFrm() )
+ if ( pStartFrame->IsTextFrame() )
{
- if ( static_cast<const SwTextFrm*>(pStartFrm)->GetDropRect( aDropRect ) )
+ if ( static_cast<const SwTextFrame*>(pStartFrame)->GetDropRect( aDropRect ) )
Sub( aRegion, aDropRect );
}
- if ( pEndFrm != pStartFrm && pEndFrm->IsTextFrm() )
+ if ( pEndFrame != pStartFrame && pEndFrame->IsTextFrame() )
{
- if ( static_cast<const SwTextFrm*>(pEndFrm)->GetDropRect( aDropRect ) )
+ if ( static_cast<const SwTextFrame*>(pEndFrame)->GetDropRect( aDropRect ) )
Sub( aRegion, aDropRect );
}
- rCrsr.assign( aRegion.begin(), aRegion.end() );
+ rCursor.assign( aRegion.begin(), aRegion.end() );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx
index 11e8ca6aa3c6..c6b328a2bab9 100644
--- a/sw/source/core/layout/unusedf.cxx
+++ b/sw/source/core/layout/unusedf.cxx
@@ -21,55 +21,55 @@
#include "cntfrm.hxx"
#include "flyfrm.hxx"
-void SwFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
+void SwFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs * )
{
OSL_FAIL( "Format() of the base class called." );
}
-void SwFrm::Paint(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const
+void SwFrame::Paint(vcl::RenderContext&, SwRect const&, SwPrintData const*const) const
{
OSL_FAIL( "Paint() of the base class called." );
}
-bool SwContentFrm::WouldFit( SwTwips &, bool&, bool )
+bool SwContentFrame::WouldFit( SwTwips &, bool&, bool )
{
- OSL_FAIL( "WouldFit of ContentFrm called." );
+ OSL_FAIL( "WouldFit of ContentFrame called." );
return false;
}
-bool SwFrm::FillSelection( SwSelectionList& , const SwRect& ) const
+bool SwFrame::FillSelection( SwSelectionList& , const SwRect& ) const
{
OSL_FAIL( "Don't call this function at the base class!" );
return false;
}
-bool SwFrm::GetCrsrOfst( SwPosition *, Point&, SwCrsrMoveState*, bool ) const
+bool SwFrame::GetCursorOfst( SwPosition *, Point&, SwCursorMoveState*, bool ) const
{
- OSL_FAIL( "GetCrsrOfst of the base class, hi!" );
+ OSL_FAIL( "GetCursorOfst of the base class, hi!" );
return false;
}
#ifdef DBG_UTIL
-void SwRootFrm::Cut()
+void SwRootFrame::Cut()
{
- OSL_FAIL( "Cut() of RootFrm called." );
+ OSL_FAIL( "Cut() of RootFrame called." );
}
-void SwRootFrm::Paste( SwFrm *, SwFrm * )
+void SwRootFrame::Paste( SwFrame *, SwFrame * )
{
- OSL_FAIL( "Paste() of RootFrm called." );
+ OSL_FAIL( "Paste() of RootFrame called." );
}
-void SwFlyFrm::Paste( SwFrm *, SwFrm * )
+void SwFlyFrame::Paste( SwFrame *, SwFrame * )
{
- OSL_FAIL( "Paste() of FlyFrm called." );
+ OSL_FAIL( "Paste() of FlyFrame called." );
}
#endif
-bool SwFrm::GetCharRect( SwRect&, const SwPosition&,
- SwCrsrMoveState* ) const
+bool SwFrame::GetCharRect( SwRect&, const SwPosition&,
+ SwCursorMoveState* ) const
{
OSL_FAIL( "GetCharRect() of the base called." );
return false;
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 36beac8d2e3c..6097773116d6 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -48,24 +48,24 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect,
#endif
/* The SWLayVout class manages the virtual output devices.
- * RootFrm has a static member of this class which is created in _FrmInit
- * and destroyed in _FrmFinit.
+ * RootFrame has a static member of this class which is created in _FrameInit
+ * and destroyed in _FrameFinit.
* */
-bool SwRootFrm::FlushVout()
+bool SwRootFrame::FlushVout()
{
- if (SwRootFrm::s_pVout->IsFlushable())
+ if (SwRootFrame::s_pVout->IsFlushable())
{
- SwRootFrm::s_pVout->_Flush();
+ SwRootFrame::s_pVout->_Flush();
return true;
}
return false;
}
-bool SwRootFrm::HasSameRect( const SwRect& rRect )
+bool SwRootFrame::HasSameRect( const SwRect& rRect )
{
- if (SwRootFrm::s_pVout->IsFlushable())
- return ( rRect == SwRootFrm::s_pVout->GetOrgRect() );
+ if (SwRootFrame::s_pVout->IsFlushable())
+ return ( rRect == SwRootFrame::s_pVout->GetOrgRect() );
return false;
}
diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx
index 1b00c40208e3..93821891ccee 100644
--- a/sw/source/core/layout/virtoutp.hxx
+++ b/sw/source/core/layout/virtoutp.hxx
@@ -29,7 +29,7 @@ class SwViewShell;
class SwLayVout
{
- friend void _FrmFinit(); //deletes Vout
+ friend void _FrameFinit(); //deletes Vout
private:
SwViewShell* pSh;
VclPtr<OutputDevice> pOut;
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index ac3d1c849712..edd660df2471 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -53,17 +53,17 @@
using namespace ::com::sun::star;
-SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) :
+SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib ) :
SwClient( pMod ),
mbIfAccTableShouldDisposing( false ), //A member to identify if the acc table should dispose
mbInDtor(false),
- mnFrmId( SwFrm::mnLastFrmId++ ),
- mpRoot( pSib ? pSib->getRootFrm() : nullptr ),
+ mnFrameId( SwFrame::mnLastFrameId++ ),
+ mpRoot( pSib ? pSib->getRootFrame() : nullptr ),
mpUpper(nullptr),
mpNext(nullptr),
mpPrev(nullptr),
mpDrawObjs(nullptr),
- mnFrmType(0),
+ mnFrameType(0),
mbInfBody( false ),
mbInfTab ( false ),
mbInfFly ( false ),
@@ -81,22 +81,22 @@ SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) :
mbForbidDelete = false;
}
-const IDocumentDrawModelAccess& SwFrm::getIDocumentDrawModelAccess()
+const IDocumentDrawModelAccess& SwFrame::getIDocumentDrawModelAccess()
{
return GetUpper()->GetFormat()->getIDocumentDrawModelAccess();
}
-bool SwFrm::KnowsFormat( const SwFormat& rFormat ) const
+bool SwFrame::KnowsFormat( const SwFormat& rFormat ) const
{
return GetRegisteredIn() == &rFormat;
}
-void SwFrm::RegisterToFormat( SwFormat& rFormat )
+void SwFrame::RegisterToFormat( SwFormat& rFormat )
{
rFormat.Add( this );
}
-void SwFrm::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse )
+void SwFrame::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse )
{
if( FRMDIR_ENVIRONMENT == nDir || ( bVert && bOnlyBiDi ) )
{
@@ -133,11 +133,11 @@ void SwFrm::CheckDir( sal_uInt16 nDir, bool bVert, bool bOnlyBiDi, bool bBrowse
}
}
-void SwFrm::CheckDirection( bool bVert )
+void SwFrame::CheckDirection( bool bVert )
{
if( bVert )
{
- if( !IsHeaderFrm() && !IsFooterFrm() )
+ if( !IsHeaderFrame() && !IsFooterFrame() )
{
mbDerivedVert = true;
SetDirFlags( bVert );
@@ -150,49 +150,49 @@ void SwFrm::CheckDirection( bool bVert )
}
}
-void SwSectionFrm::CheckDirection( bool bVert )
+void SwSectionFrame::CheckDirection( bool bVert )
{
const SwFrameFormat* pFormat = GetFormat();
if( pFormat )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(),
bVert, true, bBrowseMode );
}
else
- SwFrm::CheckDirection( bVert );
+ SwFrame::CheckDirection( bVert );
}
-void SwFlyFrm::CheckDirection( bool bVert )
+void SwFlyFrame::CheckDirection( bool bVert )
{
const SwFrameFormat* pFormat = GetFormat();
if( pFormat )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(),
bVert, false, bBrowseMode );
}
else
- SwFrm::CheckDirection( bVert );
+ SwFrame::CheckDirection( bVert );
}
-void SwTabFrm::CheckDirection( bool bVert )
+void SwTabFrame::CheckDirection( bool bVert )
{
const SwFrameFormat* pFormat = GetFormat();
if( pFormat )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
CheckDir(static_cast<const SvxFrameDirectionItem&>(pFormat->GetFormatAttr(RES_FRAMEDIR)).GetValue(),
bVert, true, bBrowseMode );
}
else
- SwFrm::CheckDirection( bVert );
+ SwFrame::CheckDirection( bVert );
}
-void SwCellFrm::CheckDirection( bool bVert )
+void SwCellFrame::CheckDirection( bool bVert )
{
const SwFrameFormat* pFormat = GetFormat();
const SfxPoolItem* pItem;
@@ -201,24 +201,24 @@ void SwCellFrm::CheckDirection( bool bVert )
// to LTR in case of OOo 1.0 documents.
if( pFormat && SfxItemState::SET == pFormat->GetItemState( RES_FRAMEDIR, true, &pItem ) )
{
- const SvxFrameDirectionItem* pFrmDirItem = static_cast<const SvxFrameDirectionItem*>(pItem);
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SvxFrameDirectionItem* pFrameDirItem = static_cast<const SvxFrameDirectionItem*>(pItem);
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
- CheckDir( pFrmDirItem->GetValue(), bVert, false, bBrowseMode );
+ CheckDir( pFrameDirItem->GetValue(), bVert, false, bBrowseMode );
}
else
- SwFrm::CheckDirection( bVert );
+ SwFrame::CheckDirection( bVert );
}
-void SwTextFrm::CheckDirection( bool bVert )
+void SwTextFrame::CheckDirection( bool bVert )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
- CheckDir( GetNode()->GetSwAttrSet().GetFrmDir().GetValue(), bVert,
+ CheckDir( GetNode()->GetSwAttrSet().GetFrameDir().GetValue(), bVert,
true, bBrowseMode );
}
-void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
sal_uInt8 nInvFlags = 0;
@@ -228,7 +228,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
SfxItemIter aOIter( *static_cast<const SwAttrSetChg*>(pOld)->GetChgSet() );
while( true )
{
- _UpdateAttrFrm( aOIter.GetCurItem(),
+ _UpdateAttrFrame( aOIter.GetCurItem(),
aNIter.GetCurItem(), nInvFlags );
if( aNIter.IsAtEnd() )
break;
@@ -237,17 +237,17 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
else
- _UpdateAttrFrm( pOld, pNew, nInvFlags );
+ _UpdateAttrFrame( pOld, pNew, nInvFlags );
if ( nInvFlags != 0 )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( nInvFlags & 0x01 )
{
_InvalidatePrt();
- if( !GetPrev() && IsTabFrm() && IsInSct() )
- FindSctFrm()->_InvalidatePrt();
+ if( !GetPrev() && IsTabFrame() && IsInSct() )
+ FindSctFrame()->_InvalidatePrt();
}
if ( nInvFlags & 0x02 )
_InvalidateSize();
@@ -255,7 +255,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
_InvalidatePos();
if ( nInvFlags & 0x08 )
SetCompletePaint();
- SwFrm *pNxt;
+ SwFrame *pNxt;
if ( nInvFlags & 0x30 && nullptr != (pNxt = GetNext()) )
{
pNxt->InvalidatePage( pPage );
@@ -267,7 +267,7 @@ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
-void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
+void SwFrame::_UpdateAttrFrame( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
sal_uInt8 &rInvFlags )
{
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
@@ -295,7 +295,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
break;
case RES_FRM_SIZE:
- ReinitializeFrmSizeAttrFlags();
+ ReinitializeFrameSizeAttrFlags();
rInvFlags |= 0x13;
break;
@@ -305,12 +305,12 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
case RES_ROW_SPLIT:
{
- if ( IsRowFrm() )
+ if ( IsRowFrame() )
{
bool bInFollowFlowRow = nullptr != IsInFollowFlowRow();
if ( bInFollowFlowRow || nullptr != IsInSplitTableRow() )
{
- SwTabFrm* pTab = FindTabFrm();
+ SwTabFrame* pTab = FindTabFrame();
if ( bInFollowFlowRow )
pTab = pTab->FindMaster();
pTab->SetRemoveFollowFlowLinePending( true );
@@ -319,7 +319,7 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
break;
}
case RES_COL:
- OSL_FAIL( "Columns for new FrmTyp?" );
+ OSL_FAIL( "Columns for new FrameTyp?" );
break;
default:
@@ -332,37 +332,37 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
}
}
-bool SwFrm::Prepare( const PrepareHint, const void *, bool )
+bool SwFrame::Prepare( const PrepareHint, const void *, bool )
{
/* Do nothing */
return false;
}
/**
- * Invalidates the page in which the Frm is currently placed.
- * The page is invalidated depending on the type (Layout, Content, FlyFrm)
+ * Invalidates the page in which the Frame is currently placed.
+ * The page is invalidated depending on the type (Layout, Content, FlyFrame)
*/
-void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
+void SwFrame::InvalidatePage( const SwPageFrame *pPage ) const
{
if ( !pPage )
{
- pPage = FindPageFrm();
+ pPage = FindPageFrame();
// #i28701# - for at-character and as-character
// anchored Writer fly frames additionally invalidate also page frame
// its 'anchor character' is on.
- if ( pPage && pPage->GetUpper() && IsFlyFrm() )
+ if ( pPage && pPage->GetUpper() && IsFlyFrame() )
{
- const SwFlyFrm* pFlyFrm = static_cast<const SwFlyFrm*>(this);
- if ( pFlyFrm->IsAutoPos() || pFlyFrm->IsFlyInCntFrm() )
+ const SwFlyFrame* pFlyFrame = static_cast<const SwFlyFrame*>(this);
+ if ( pFlyFrame->IsAutoPos() || pFlyFrame->IsFlyInContentFrame() )
{
- // #i33751#, #i34060# - method <GetPageFrmOfAnchor()>
- // is replaced by method <FindPageFrmOfAnchor()>. It's return value
+ // #i33751#, #i34060# - method <GetPageFrameOfAnchor()>
+ // is replaced by method <FindPageFrameOfAnchor()>. It's return value
// have to be checked.
- SwPageFrm* pPageFrmOfAnchor =
- const_cast<SwFlyFrm*>(pFlyFrm)->FindPageFrmOfAnchor();
- if ( pPageFrmOfAnchor && pPageFrmOfAnchor != pPage )
+ SwPageFrame* pPageFrameOfAnchor =
+ const_cast<SwFlyFrame*>(pFlyFrame)->FindPageFrameOfAnchor();
+ if ( pPageFrameOfAnchor && pPageFrameOfAnchor != pPage )
{
- InvalidatePage( pPageFrmOfAnchor );
+ InvalidatePage( pPageFrameOfAnchor );
}
}
}
@@ -373,21 +373,21 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
if ( pPage->GetFormat()->GetDoc()->IsInDtor() )
return;
- SwRootFrm *pRoot = const_cast<SwRootFrm*>(static_cast<const SwRootFrm*>(pPage->GetUpper()));
- const SwFlyFrm *pFly = FindFlyFrm();
- if ( IsContentFrm() )
+ SwRootFrame *pRoot = const_cast<SwRootFrame*>(static_cast<const SwRootFrame*>(pPage->GetUpper()));
+ const SwFlyFrame *pFly = FindFlyFrame();
+ if ( IsContentFrame() )
{
if ( pRoot->IsTurboAllowed() )
{
// If a ContentFrame wants to register for a second time, make it a TurboAction.
if ( !pRoot->GetTurbo() || this == pRoot->GetTurbo() )
- pRoot->SetTurbo( static_cast<const SwContentFrm*>(this) );
+ pRoot->SetTurbo( static_cast<const SwContentFrame*>(this) );
else
{
pRoot->DisallowTurbo();
//The page of the Turbo could be a different one then mine,
//therefore we have to invalidate it.
- const SwFrm *pTmp = pRoot->GetTurbo();
+ const SwFrame *pTmp = pRoot->GetTurbo();
pRoot->ResetTurbo();
pTmp->InvalidatePage();
}
@@ -397,10 +397,10 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
if ( pFly )
{ if( !pFly->IsLocked() )
{
- if ( pFly->IsFlyInCntFrm() )
+ if ( pFly->IsFlyInContentFrame() )
{ pPage->InvalidateFlyInCnt();
- static_cast<const SwFlyInCntFrm*>(pFly)->InvalidateContent();
- pFly->GetAnchorFrm()->InvalidatePage();
+ static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateContent();
+ pFly->GetAnchorFrame()->InvalidatePage();
}
else
pPage->InvalidateFlyContent();
@@ -417,11 +417,11 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
{
if ( !pFly->IsLocked() )
{
- if ( pFly->IsFlyInCntFrm() )
+ if ( pFly->IsFlyInContentFrame() )
{
pPage->InvalidateFlyInCnt();
- static_cast<const SwFlyInCntFrm*>(pFly)->InvalidateLayout();
- pFly->GetAnchorFrm()->InvalidatePage();
+ static_cast<const SwFlyInContentFrame*>(pFly)->InvalidateLayout();
+ pFly->GetAnchorFrame()->InvalidatePage();
}
else
pPage->InvalidateFlyLayout();
@@ -431,7 +431,7 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
pPage->InvalidateLayout();
if ( pRoot->GetTurbo() )
- { const SwFrm *pTmp = pRoot->GetTurbo();
+ { const SwFrame *pTmp = pRoot->GetTurbo();
pRoot->ResetTurbo();
pTmp->InvalidatePage();
}
@@ -444,10 +444,10 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const
}
}
-Size SwFrm::ChgSize( const Size& aNewSize )
+Size SwFrame::ChgSize( const Size& aNewSize )
{
mbFixSize = true;
- const Size aOldSize( Frm().SSize() );
+ const Size aOldSize( Frame().SSize() );
if ( aNewSize == aOldSize )
return aOldSize;
@@ -455,19 +455,19 @@ Size SwFrm::ChgSize( const Size& aNewSize )
{
SWRECTFN2( this )
SwRect aNew( Point(0,0), aNewSize );
- (maFrm.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() );
+ (maFrame.*fnRect->fnSetWidth)( (aNew.*fnRect->fnGetWidth)() );
long nNew = (aNew.*fnRect->fnGetHeight)();
- long nDiff = nNew - (maFrm.*fnRect->fnGetHeight)();
+ long nDiff = nNew - (maFrame.*fnRect->fnGetHeight)();
if( nDiff )
{
- if ( GetUpper()->IsFootnoteBossFrm() && HasFixSize() &&
+ if ( GetUpper()->IsFootnoteBossFrame() && HasFixSize() &&
NA_GROW_SHRINK !=
- static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this ) )
+ static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this ) )
{
- (maFrm.*fnRect->fnSetHeight)( nNew );
- SwTwips nReal = static_cast<SwLayoutFrm*>(this)->AdjustNeighbourhood(nDiff);
+ (maFrame.*fnRect->fnSetHeight)( nNew );
+ SwTwips nReal = static_cast<SwLayoutFrame*>(this)->AdjustNeighbourhood(nDiff);
if ( nReal != nDiff )
- (maFrm.*fnRect->fnSetHeight)( nNew - nDiff + nReal );
+ (maFrame.*fnRect->fnSetHeight)( nNew - nDiff + nReal );
}
else
{
@@ -480,49 +480,49 @@ Size SwFrm::ChgSize( const Size& aNewSize )
else
Shrink( -nDiff );
- if ( GetUpper() && (maFrm.*fnRect->fnGetHeight)() != nNew )
+ if ( GetUpper() && (maFrame.*fnRect->fnGetHeight)() != nNew )
GetUpper()->_InvalidateSize();
}
// Even if grow/shrink did not yet set the desired width, for
// example when called by ChgColumns to set the column width, we
// set the right width now.
- (maFrm.*fnRect->fnSetHeight)( nNew );
+ (maFrame.*fnRect->fnSetHeight)( nNew );
}
}
}
else
- maFrm.SSize( aNewSize );
+ maFrame.SSize( aNewSize );
- if ( Frm().SSize() != aOldSize )
+ if ( Frame().SSize() != aOldSize )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
{
GetNext()->_InvalidatePos();
GetNext()->InvalidatePage( pPage );
}
- if( IsLayoutFrm() )
+ if( IsLayoutFrame() )
{
if( IsRightToLeft() )
_InvalidatePos();
- if( static_cast<SwLayoutFrm*>(this)->Lower() )
- static_cast<SwLayoutFrm*>(this)->Lower()->_InvalidateSize();
+ if( static_cast<SwLayoutFrame*>(this)->Lower() )
+ static_cast<SwLayoutFrame*>(this)->Lower()->_InvalidateSize();
}
_InvalidatePrt();
_InvalidateSize();
InvalidatePage( pPage );
}
- return maFrm.SSize();
+ return maFrame.SSize();
}
-/** Insert SwFrm into existing structure.
+/** Insert SwFrame into existing structure.
*
* Insertion is done below the parent either before pBehind or
* at the end of the chain if pBehind is empty.
*/
-void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind )
+void SwFrame::InsertBefore( SwLayoutFrame* pParent, SwFrame* pBehind )
{
OSL_ENSURE( pParent, "No parent for insert." );
OSL_ENSURE( (!pBehind || pParent == pBehind->GetUpper()),
@@ -552,12 +552,12 @@ void SwFrm::InsertBefore( SwLayoutFrm* pParent, SwFrm* pBehind )
}
}
-/** Insert SwFrm into existing structure.
+/** Insert SwFrame into existing structure.
*
* Insertion is done below the parent either after pBehind or
* at the beginning of the chain if pBehind is empty.
*/
-void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
+void SwFrame::InsertBehind( SwLayoutFrame *pParent, SwFrame *pBefore )
{
OSL_ENSURE( pParent, "No Parent for Insert." );
OSL_ENSURE( (!pBefore || pParent == pBefore->GetUpper()),
@@ -582,29 +582,29 @@ void SwFrm::InsertBehind( SwLayoutFrm *pParent, SwFrm *pBefore )
}
}
-/** Insert a chain of SwFrms into an existing struction
+/** Insert a chain of SwFrames into an existing struction
*
* Currently, this method is used to insert a SectionFrame (which may have some siblings) into an
* existing structure. If the third parameter is NULL, this method is (besides handling the
- * siblings) equal to SwFrm::InsertBefore(..).
+ * siblings) equal to SwFrame::InsertBefore(..).
*
* If the third parameter is passed, the following happens:
* - this becomes mpNext of pParent
* - pSct becomes mpNext of the last one in the this-chain
* - pBehind is reconnected from pParent to pSct
- * The purpose is: a SectionFrm (this) won't become a child of another SectionFrm (pParent), but
+ * The purpose is: a SectionFrame (this) won't become a child of another SectionFrame (pParent), but
* pParent gets split into two siblings (pParent+pSect) and this is inserted between.
*/
-bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
+bool SwFrame::InsertGroupBefore( SwFrame* pParent, SwFrame* pBehind, SwFrame* pSct )
{
OSL_ENSURE( pParent, "No parent for insert." );
OSL_ENSURE( (!pBehind || ( (pBehind && (pParent == pBehind->GetUpper()))
- || ((pParent->IsSctFrm() && pBehind->GetUpper()->IsColBodyFrm())) ) ),
+ || ((pParent->IsSctFrame() && pBehind->GetUpper()->IsColBodyFrame())) ) ),
"Frame tree inconsistent." );
if( pSct )
{
mpUpper = pParent->GetUpper();
- SwFrm *pLast = this;
+ SwFrame *pLast = this;
while( pLast->GetNext() )
{
pLast = pLast->GetNext();
@@ -638,11 +638,11 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
else
pBehind->GetUpper()->m_pLower = nullptr;
pBehind->mpPrev = nullptr;
- SwLayoutFrm* pTmp = static_cast<SwLayoutFrm*>(pSct);
+ SwLayoutFrame* pTmp = static_cast<SwLayoutFrame*>(pSct);
if( pTmp->Lower() )
{
- OSL_ENSURE( pTmp->Lower()->IsColumnFrm(), "InsertGrp: Used SectionFrm" );
- pTmp = static_cast<SwLayoutFrm*>(static_cast<SwLayoutFrm*>(pTmp->Lower())->Lower());
+ OSL_ENSURE( pTmp->Lower()->IsColumnFrame(), "InsertGrp: Used SectionFrame" );
+ pTmp = static_cast<SwLayoutFrame*>(static_cast<SwLayoutFrame*>(pTmp->Lower())->Lower());
OSL_ENSURE( pTmp, "InsertGrp: Missing ColBody" );
}
pBehind->mpUpper = pTmp;
@@ -656,15 +656,15 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
}
else
{
- OSL_ENSURE( pSct->IsSctFrm(), "InsertGroup: For SectionFrms only" );
- SwFrm::DestroyFrm(pSct);
+ OSL_ENSURE( pSct->IsSctFrame(), "InsertGroup: For SectionFrames only" );
+ SwFrame::DestroyFrame(pSct);
return false;
}
}
else
{
- mpUpper = static_cast<SwLayoutFrm*>(pParent);
- SwFrm *pLast = this;
+ mpUpper = static_cast<SwLayoutFrame*>(pParent);
+ SwFrame *pLast = this;
while( pLast->GetNext() )
{
pLast = pLast->GetNext();
@@ -696,7 +696,7 @@ bool SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct )
return true;
}
-void SwFrm::RemoveFromLayout()
+void SwFrame::RemoveFromLayout()
{
OSL_ENSURE( mpUpper, "Remove without upper?" );
@@ -716,21 +716,21 @@ void SwFrm::RemoveFromLayout()
mpUpper = nullptr;
}
-void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
+void SwContentFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
{
OSL_ENSURE( pParent, "No parent for pasting." );
- OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." );
+ OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." );
OSL_ENSURE( pParent != this, "I'm the parent." );
OSL_ENSURE( pSibling != this, "I'm my own neighbour." );
OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"I'm still registered somewhere" );
- OSL_ENSURE( !pSibling || pSibling->IsFlowFrm(),
- "<SwContentFrm::Paste(..)> - sibling not of expected type." );
+ OSL_ENSURE( !pSibling || pSibling->IsFlowFrame(),
+ "<SwContentFrame::Paste(..)> - sibling not of expected type." );
//Insert in the tree.
- InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling );
+ InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
_InvalidateAll();
InvalidatePage( pPage );
@@ -744,30 +744,30 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
if ( GetNext() )
{
- SwFrm* pNxt = GetNext();
+ SwFrame* pNxt = GetNext();
pNxt->_InvalidatePrt();
pNxt->_InvalidatePos();
pNxt->InvalidatePage( pPage );
- if( pNxt->IsSctFrm() )
- pNxt = static_cast<SwSectionFrm*>(pNxt)->ContainsContent();
- if( pNxt && pNxt->IsTextFrm() && pNxt->IsInFootnote() )
+ if( pNxt->IsSctFrame() )
+ pNxt = static_cast<SwSectionFrame*>(pNxt)->ContainsContent();
+ if( pNxt && pNxt->IsTextFrame() && pNxt->IsInFootnote() )
pNxt->Prepare( PREP_FTN, nullptr, false );
}
- if ( Frm().Height() )
- pParent->Grow( Frm().Height() );
+ if ( Frame().Height() )
+ pParent->Grow( Frame().Height() );
- if ( Frm().Width() != pParent->Prt().Width() )
+ if ( Frame().Width() != pParent->Prt().Width() )
Prepare( PREP_FIXSIZE_CHG );
if ( GetPrev() )
{
if ( IsFollow() )
//I'm a direct follower of my master now
- static_cast<SwContentFrm*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS );
+ static_cast<SwContentFrame*>(GetPrev())->Prepare( PREP_FOLLOW_FOLLOWS );
else
{
- if ( GetPrev()->Frm().Height() !=
+ if ( GetPrev()->Frame().Height() !=
GetPrev()->Prt().Height() + GetPrev()->Prt().Top() )
{
// Take the border into account?
@@ -776,7 +776,7 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
// OD 18.02.2003 #104989# - force complete paint of previous frame,
// if frame is inserted at the end of a section frame, in order to
// get subsidiary lines repainted for the section.
- if ( pParent->IsSctFrm() && !GetNext() )
+ if ( pParent->IsSctFrame() && !GetNext() )
{
// force complete paint of previous frame, if new inserted frame
// in the section is the last one.
@@ -787,26 +787,26 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
}
if ( IsInFootnote() )
{
- SwFrm* pFrm = GetIndPrev();
- if( pFrm && pFrm->IsSctFrm() )
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
+ SwFrame* pFrame = GetIndPrev();
+ if( pFrame && pFrame->IsSctFrame() )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if( pFrame )
+ pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
if( !GetNext() )
{
- pFrm = FindFootnoteFrm()->GetNext();
- if( pFrm && nullptr != (pFrm=static_cast<SwLayoutFrm*>(pFrm)->ContainsAny()) )
- pFrm->_InvalidatePrt();
+ pFrame = FindFootnoteFrame()->GetNext();
+ if( pFrame && nullptr != (pFrame=static_cast<SwLayoutFrame*>(pFrame)->ContainsAny()) )
+ pFrame->_InvalidatePrt();
}
}
_InvalidateLineNum();
- SwFrm *pNxt = FindNextCnt();
+ SwFrame *pNxt = FindNextCnt();
if ( pNxt )
{
while ( pNxt && pNxt->IsInTab() )
{
- if( nullptr != (pNxt = pNxt->FindTabFrm()) )
+ if( nullptr != (pNxt = pNxt->FindTabFrame()) )
pNxt = pNxt->FindNextCnt();
}
if ( pNxt )
@@ -818,37 +818,37 @@ void SwContentFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
}
}
-void SwContentFrm::Cut()
+void SwContentFrame::Cut()
{
OSL_ENSURE( GetUpper(), "Cut without Upper()." );
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- SwFrm *pFrm = GetIndPrev();
- if( pFrm )
+ SwFrame *pFrame = GetIndPrev();
+ if( pFrame )
{
- if( pFrm->IsSctFrm() )
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if ( pFrm && pFrm->IsContentFrm() )
+ if( pFrame->IsSctFrame() )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if ( pFrame && pFrame->IsContentFrame() )
{
- pFrm->_InvalidatePrt();
+ pFrame->_InvalidatePrt();
if( IsInFootnote() )
- pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
+ pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
}
// #i26250# - invalidate printing area of previous
// table frame.
- else if ( pFrm && pFrm->IsTabFrm() )
+ else if ( pFrame && pFrame->IsTabFrame() )
{
- pFrm->InvalidatePrt();
+ pFrame->InvalidatePrt();
}
}
- SwFrm *pNxt = FindNextCnt();
+ SwFrame *pNxt = FindNextCnt();
if ( pNxt )
{
while ( pNxt && pNxt->IsInTab() )
{
- if( nullptr != (pNxt = pNxt->FindTabFrm()) )
+ if( nullptr != (pNxt = pNxt->FindTabFrame()) )
pNxt = pNxt->FindNextCnt();
}
if ( pNxt )
@@ -859,28 +859,28 @@ void SwContentFrm::Cut()
}
}
- if( nullptr != (pFrm = GetIndNext()) )
+ if( nullptr != (pFrame = GetIndNext()) )
{
// The old follow may have calculated a gap to the predecessor which
// now becomes obsolete or different as it becomes the first one itself
- pFrm->_InvalidatePrt();
- pFrm->_InvalidatePos();
- pFrm->InvalidatePage( pPage );
- if( pFrm->IsSctFrm() )
+ pFrame->_InvalidatePrt();
+ pFrame->_InvalidatePos();
+ pFrame->InvalidatePage( pPage );
+ if( pFrame->IsSctFrame() )
{
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if( pFrm )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if( pFrame )
{
- pFrm->_InvalidatePrt();
- pFrm->_InvalidatePos();
- pFrm->InvalidatePage( pPage );
+ pFrame->_InvalidatePrt();
+ pFrame->_InvalidatePos();
+ pFrame->InvalidatePage( pPage );
}
}
- if( pFrm && IsInFootnote() )
- pFrm->Prepare( PREP_ERGOSUM, nullptr, false );
+ if( pFrame && IsInFootnote() )
+ pFrame->Prepare( PREP_ERGOSUM, nullptr, false );
if( IsInSct() && !GetPrev() )
{
- SwSectionFrm* pSct = FindSctFrm();
+ SwSectionFrame* pSct = FindSctFrame();
if( !pSct->IsFollow() )
{
pSct->_InvalidatePrt();
@@ -892,16 +892,16 @@ void SwContentFrm::Cut()
{
InvalidateNextPos();
//Someone needs to do the retouching: predecessor or upper
- if ( nullptr != (pFrm = GetPrev()) )
- { pFrm->SetRetouche();
- pFrm->Prepare( PREP_WIDOWS_ORPHANS );
- pFrm->_InvalidatePos();
- pFrm->InvalidatePage( pPage );
+ if ( nullptr != (pFrame = GetPrev()) )
+ { pFrame->SetRetouche();
+ pFrame->Prepare( PREP_WIDOWS_ORPHANS );
+ pFrame->_InvalidatePos();
+ pFrame->InvalidatePage( pPage );
}
- // If I'm (was) the only ContentFrm in my upper, it has to do the
+ // If I'm (was) the only ContentFrame in my upper, it has to do the
// retouching. Also, perhaps a page became empty.
else
- { SwRootFrm *pRoot = getRootFrm();
+ { SwRootFrame *pRoot = getRootFrame();
if ( pRoot )
{
pRoot->SetSuperfluous();
@@ -910,7 +910,7 @@ void SwContentFrm::Cut()
}
if( IsInSct() )
{
- SwSectionFrm* pSct = FindSctFrm();
+ SwSectionFrame* pSct = FindSctFrame();
if( !pSct->IsFollow() )
{
pSct->_InvalidatePrt();
@@ -921,8 +921,8 @@ void SwContentFrm::Cut()
// of removing the follow flow line.
if ( IsInTab() )
{
- SwTabFrm* pThisTab = FindTabFrm();
- SwTabFrm* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr;
+ SwTabFrame* pThisTab = FindTabFrame();
+ SwTabFrame* pMasterTab = pThisTab && pThisTab->IsFollow() ? pThisTab->FindMaster() : nullptr;
if ( pMasterTab )
{
pMasterTab->_InvalidatePos();
@@ -932,44 +932,44 @@ void SwContentFrm::Cut()
}
}
//Remove first, then shrink the upper.
- SwLayoutFrm *pUp = GetUpper();
+ SwLayoutFrame *pUp = GetUpper();
RemoveFromLayout();
if ( pUp )
{
- SwSectionFrm *pSct = nullptr;
+ SwSectionFrame *pSct = nullptr;
if ( !pUp->Lower() &&
- ( ( pUp->IsFootnoteFrm() && !pUp->IsColLocked() ) ||
+ ( ( pUp->IsFootnoteFrame() && !pUp->IsColLocked() ) ||
( pUp->IsInSct() &&
// #i29438#
// We have to consider the case that the section may be "empty"
// except from a temporary empty table frame.
// This can happen due to the new cell split feature.
- !pUp->IsCellFrm() &&
+ !pUp->IsCellFrame() &&
// #126020# - adjust check for empty section
// #130797# - correct fix #126020#
- !(pSct = pUp->FindSctFrm())->ContainsContent() &&
+ !(pSct = pUp->FindSctFrame())->ContainsContent() &&
!pSct->ContainsAny( true ) ) ) )
{
if ( pUp->GetUpper() )
{
// prevent delete of <ColLocked> footnote frame
- if ( pUp->IsFootnoteFrm() && !pUp->IsColLocked())
+ if ( pUp->IsFootnoteFrame() && !pUp->IsColLocked())
{
if( pUp->GetNext() && !pUp->GetPrev() )
{
- SwFrm* pTmp = static_cast<SwLayoutFrm*>(pUp->GetNext())->ContainsAny();
+ SwFrame* pTmp = static_cast<SwLayoutFrame*>(pUp->GetNext())->ContainsAny();
if( pTmp )
pTmp->_InvalidatePrt();
}
pUp->Cut();
- SwFrm::DestroyFrm(pUp);
+ SwFrame::DestroyFrame(pUp);
}
else
{
if ( pSct->IsColLocked() || !pSct->IsInFootnote() ||
- ( pUp->IsFootnoteFrm() && pUp->IsColLocked() ) )
+ ( pUp->IsFootnoteFrame() && pUp->IsColLocked() ) )
{
pSct->DelEmpty( false );
// If a locked section may not be deleted then at least
@@ -980,7 +980,7 @@ void SwContentFrm::Cut()
else
{
pSct->DelEmpty( true );
- SwFrm::DestroyFrm(pSct);
+ SwFrame::DestroyFrame(pSct);
}
}
}
@@ -988,24 +988,24 @@ void SwContentFrm::Cut()
else
{
SWRECTFN( this )
- long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if( nFrmHeight )
- pUp->Shrink( nFrmHeight );
+ long nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if( nFrameHeight )
+ pUp->Shrink( nFrameHeight );
}
}
}
-void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
+void SwLayoutFrame::Paste( SwFrame* pParent, SwFrame* pSibling)
{
OSL_ENSURE( pParent, "No parent for pasting." );
- OSL_ENSURE( pParent->IsLayoutFrm(), "Parent is ContentFrm." );
+ OSL_ENSURE( pParent->IsLayoutFrame(), "Parent is ContentFrame." );
OSL_ENSURE( pParent != this, "I'm the parent oneself." );
OSL_ENSURE( pSibling != this, "I'm my own neighbour." );
OSL_ENSURE( !GetPrev() && !GetNext() && !GetUpper(),
"I'm still registered somewhere." );
//Insert in the tree.
- InsertBefore( static_cast<SwLayoutFrm*>(pParent), pSibling );
+ InsertBefore( static_cast<SwLayoutFrame*>(pParent), pSibling );
// OD 24.10.2002 #103517# - correct setting of variable <fnRect>
// <fnRect> is used for the following:
@@ -1034,49 +1034,49 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
// --> <fnRect> = fnRectHori
//SwRectFn fnRect = IsVertical() ? fnRectHori : fnRectVert;
SwRectFn fnRect;
- if ( IsHeaderFrm() || IsFooterFrm() )
+ if ( IsHeaderFrame() || IsFooterFrame() )
fnRect = fnRectHori;
- else if ( IsCellFrm() || IsColumnFrm() )
+ else if ( IsCellFrame() || IsColumnFrame() )
fnRect = GetUpper()->IsVertical() ? fnRectHori : ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert );
else
fnRect = GetUpper()->IsVertical() ? ( GetUpper()->IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
- if( (Frm().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)())
+ if( (Frame().*fnRect->fnGetWidth)() != (pParent->Prt().*fnRect->fnGetWidth)())
_InvalidateSize();
_InvalidatePos();
- const SwPageFrm *pPage = FindPageFrm();
+ const SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- if( !IsColumnFrm() )
+ if( !IsColumnFrame() )
{
- SwFrm *pFrm = GetIndNext();
- if( nullptr != pFrm )
+ SwFrame *pFrame = GetIndNext();
+ if( nullptr != pFrame )
{
- pFrm->_InvalidatePos();
+ pFrame->_InvalidatePos();
if( IsInFootnote() )
{
- if( pFrm->IsSctFrm() )
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if( pFrm )
- pFrm->Prepare( PREP_ERGOSUM, nullptr, false );
+ if( pFrame->IsSctFrame() )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if( pFrame )
+ pFrame->Prepare( PREP_ERGOSUM, nullptr, false );
}
}
- if ( IsInFootnote() && nullptr != ( pFrm = GetIndPrev() ) )
+ if ( IsInFootnote() && nullptr != ( pFrame = GetIndPrev() ) )
{
- if( pFrm->IsSctFrm() )
- pFrm = static_cast<SwSectionFrm*>(pFrm)->ContainsAny();
- if( pFrm )
- pFrm->Prepare( PREP_QUOVADIS, nullptr, false );
+ if( pFrame->IsSctFrame() )
+ pFrame = static_cast<SwSectionFrame*>(pFrame)->ContainsAny();
+ if( pFrame )
+ pFrame->Prepare( PREP_QUOVADIS, nullptr, false );
}
}
- if( (Frm().*fnRect->fnGetHeight)() )
+ if( (Frame().*fnRect->fnGetHeight)() )
{
// AdjustNeighbourhood is now also called in columns which are not
// placed inside a frame
- sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrm() ?
- static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this )
+ sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrame() ?
+ static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
- SwTwips nGrow = (Frm().*fnRect->fnGetHeight)();
+ SwTwips nGrow = (Frame().*fnRect->fnGetHeight)();
if( NA_ONLY_ADJUST == nAdjust )
AdjustNeighbourhood( nGrow );
else
@@ -1092,16 +1092,16 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling)
}
}
-void SwLayoutFrm::Cut()
+void SwLayoutFrame::Cut()
{
if ( GetNext() )
GetNext()->_InvalidatePos();
SWRECTFN( this )
- SwTwips nShrink = (Frm().*fnRect->fnGetHeight)();
+ SwTwips nShrink = (Frame().*fnRect->fnGetHeight)();
// Remove first, then shrink upper.
- SwLayoutFrm *pUp = GetUpper();
+ SwLayoutFrame *pUp = GetUpper();
// AdjustNeighbourhood is now also called in columns which are not
// placed inside a frame.
@@ -1111,9 +1111,9 @@ void SwLayoutFrm::Cut()
// of its content.
if ( pUp && nShrink )
{
- if( pUp->IsFootnoteBossFrm() )
+ if( pUp->IsFootnoteBossFrame() )
{
- sal_uInt8 nAdjust= static_cast<SwFootnoteBossFrm*>(pUp)->NeighbourhoodAdjustment( this );
+ sal_uInt8 nAdjust= static_cast<SwFootnoteBossFrame*>(pUp)->NeighbourhoodAdjustment( this );
if( NA_ONLY_ADJUST == nAdjust )
AdjustNeighbourhood( -nShrink );
else
@@ -1123,10 +1123,10 @@ void SwLayoutFrm::Cut()
nReal = -AdjustNeighbourhood( -nShrink );
if( nReal < nShrink )
{
- SwTwips nOldHeight = (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnSetHeight)( 0 );
+ SwTwips nOldHeight = (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetHeight)( 0 );
nReal += pUp->Shrink( nShrink - nReal );
- (Frm().*fnRect->fnSetHeight)( nOldHeight );
+ (Frame().*fnRect->fnSetHeight)( nOldHeight );
}
if( NA_GROW_ADJUST == nAdjust && nReal < nShrink )
AdjustNeighbourhood( nReal - nShrink );
@@ -1149,7 +1149,7 @@ void SwLayoutFrm::Cut()
}
}
-SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwFrame::Grow( SwTwips nDist, bool bTst, bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negative growth?" );
@@ -1163,16 +1163,16 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo )
if( nPrtHeight > 0 && nDist > (LONG_MAX - nPrtHeight) )
nDist = LONG_MAX - nPrtHeight;
- if ( IsFlyFrm() )
- return static_cast<SwFlyFrm*>(this)->_Grow( nDist, bTst );
- else if( IsSctFrm() )
- return static_cast<SwSectionFrm*>(this)->_Grow( nDist, bTst );
+ if ( IsFlyFrame() )
+ return static_cast<SwFlyFrame*>(this)->_Grow( nDist, bTst );
+ else if( IsSctFrame() )
+ return static_cast<SwSectionFrame*>(this)->_Grow( nDist, bTst );
else
{
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
if ( pThisCell )
{
- const SwTabFrm* pTab = FindTabFrm();
+ const SwTabFrame* pTab = FindTabFrame();
// NEW TABLES
if ( pTab->IsVertical() != IsVertical() ||
@@ -1180,12 +1180,12 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo )
return 0;
}
- const SwTwips nReal = GrowFrm( nDist, bTst, bInfo );
+ const SwTwips nReal = GrowFrame( nDist, bTst, bInfo );
if( !bTst )
{
nPrtHeight = (Prt().*fnRect->fnGetHeight)();
(Prt().*fnRect->fnSetHeight)( nPrtHeight +
- ( IsContentFrm() ? nDist : nReal ) );
+ ( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
}
@@ -1193,7 +1193,7 @@ SwTwips SwFrm::Grow( SwTwips nDist, bool bTst, bool bInfo )
return 0L;
}
-SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
{
OSL_ENSURE( nDist >= 0, "Negative reduction?" );
@@ -1201,16 +1201,16 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo )
if ( nDist )
{
- if ( IsFlyFrm() )
- return static_cast<SwFlyFrm*>(this)->_Shrink( nDist, bTst );
- else if( IsSctFrm() )
- return static_cast<SwSectionFrm*>(this)->_Shrink( nDist, bTst );
+ if ( IsFlyFrame() )
+ return static_cast<SwFlyFrame*>(this)->_Shrink( nDist, bTst );
+ else if( IsSctFrame() )
+ return static_cast<SwSectionFrame*>(this)->_Shrink( nDist, bTst );
else
{
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
if ( pThisCell )
{
- const SwTabFrm* pTab = FindTabFrm();
+ const SwTabFrame* pTab = FindTabFrame();
// NEW TABLES
if ( pTab->IsVertical() != IsVertical() ||
@@ -1219,14 +1219,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo )
}
SWRECTFN( this )
- SwTwips nReal = (Frm().*fnRect->fnGetHeight)();
- ShrinkFrm( nDist, bTst, bInfo );
- nReal -= (Frm().*fnRect->fnGetHeight)();
+ SwTwips nReal = (Frame().*fnRect->fnGetHeight)();
+ ShrinkFrame( nDist, bTst, bInfo );
+ nReal -= (Frame().*fnRect->fnGetHeight)();
if( !bTst )
{
const SwTwips nPrtHeight = (Prt().*fnRect->fnGetHeight)();
(Prt().*fnRect->fnSetHeight)( nPrtHeight -
- ( IsContentFrm() ? nDist : nReal ) );
+ ( IsContentFrame() ? nDist : nReal ) );
}
return nReal;
}
@@ -1236,14 +1236,14 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo )
/** Adjust surrounding neighbourhood after insertion
*
- * A Frm needs "normalization" if it is directly placed below a footnote boss (page/column) and its
+ * A Frame needs "normalization" if it is directly placed below a footnote boss (page/column) and its
* size changes. There is always a frame that takes the maximum possible space (the frame that
* contains the Body text) and zero or more frames which only take the space needed (header/footer
* area, footnote container). If one of these frames changes, the body-text-frame has to grow or
* shrink accordingly, even tough it's fixed.
*
* !! Is it possible to do this in a generic way and not restrict it to the page and a distinct
- * frame which takes the maximum space (controlled using the FrmSize attribute)?
+ * frame which takes the maximum space (controlled using the FrameSize attribute)?
* Problems:
* - What if multiple frames taking the maximum space are placed next to each other?
* - How is the maximum space calculated?
@@ -1254,33 +1254,33 @@ SwTwips SwFrm::Shrink( SwTwips nDist, bool bTst, bool bInfo )
*
* @param nDiff the value around which the space has to be allocated
*/
-SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
+SwTwips SwFrame::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
{
PROTOCOL_ENTER( this, PROT_ADJUSTN, 0, &nDiff );
- if ( !nDiff || !GetUpper()->IsFootnoteBossFrm() ) // only inside pages/columns
+ if ( !nDiff || !GetUpper()->IsFootnoteBossFrame() ) // only inside pages/columns
return 0L;
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
//The (Page-)Body only changes in BrowseMode, but only if it does not
//contain columns.
- if ( IsPageBodyFrm() && (!bBrowse ||
- (static_cast<SwLayoutFrm*>(this)->Lower() &&
- static_cast<SwLayoutFrm*>(this)->Lower()->IsColumnFrm())) )
+ if ( IsPageBodyFrame() && (!bBrowse ||
+ (static_cast<SwLayoutFrame*>(this)->Lower() &&
+ static_cast<SwLayoutFrame*>(this)->Lower()->IsColumnFrame())) )
return 0L;
- //In BrowseView mode the PageFrm can handle some of the requests.
+ //In BrowseView mode the PageFrame can handle some of the requests.
long nBrowseAdd = 0;
- if ( bBrowse && GetUpper()->IsPageFrm() ) // only (Page-)BodyFrms
+ if ( bBrowse && GetUpper()->IsPageFrame() ) // only (Page-)BodyFrames
{
- SwViewShell *pViewShell = getRootFrm()->GetCurrShell();
- SwLayoutFrm *pUp = GetUpper();
+ SwViewShell *pViewShell = getRootFrame()->GetCurrShell();
+ SwLayoutFrame *pUp = GetUpper();
long nChg;
- const long nUpPrtBottom = pUp->Frm().Height() -
+ const long nUpPrtBottom = pUp->Frame().Height() -
pUp->Prt().Height() - pUp->Prt().Top();
- SwRect aInva( pUp->Frm() );
+ SwRect aInva( pUp->Frame() );
if ( pViewShell )
{
aInva.Pos().X() = pViewShell->VisArea().Left();
@@ -1288,25 +1288,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
if ( nDiff > 0 )
{
- nChg = BROWSE_HEIGHT - pUp->Frm().Height();
+ nChg = BROWSE_HEIGHT - pUp->Frame().Height();
nChg = std::min( nDiff, nChg );
- if ( !IsBodyFrm() )
+ if ( !IsBodyFrame() )
{
SetCompletePaint();
- if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->Frm().Height() )
+ if ( !pViewShell || pViewShell->VisArea().Height() >= pUp->Frame().Height() )
{
//First minimize Body, it will grow again later.
- SwFrm *pBody = static_cast<SwFootnoteBossFrm*>(pUp)->FindBodyCont();
+ SwFrame *pBody = static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont();
const long nTmp = nChg - pBody->Prt().Height();
if ( !bTst )
{
- pBody->Frm().Height(std::max( 0L, pBody->Frm().Height() - nChg ));
+ pBody->Frame().Height(std::max( 0L, pBody->Frame().Height() - nChg ));
pBody->_InvalidatePrt();
pBody->_InvalidateSize();
if ( pBody->GetNext() )
pBody->GetNext()->_InvalidatePos();
- if ( !IsHeaderFrm() )
+ if ( !IsHeaderFrame() )
pBody->SetCompletePaint();
}
nChg = nTmp <= 0 ? 0 : nTmp;
@@ -1324,10 +1324,10 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
nChg = nDiff;
long nInvaAdd = 0;
if ( pViewShell && !pUp->GetPrev() &&
- pUp->Frm().Height() + nDiff < pViewShell->VisArea().Height() )
+ pUp->Frame().Height() + nDiff < pViewShell->VisArea().Height() )
{
// This means that we have to invalidate adequately.
- nChg = pViewShell->VisArea().Height() - pUp->Frm().Height();
+ nChg = pViewShell->VisArea().Height() - pUp->Frame().Height();
nInvaAdd = -(nDiff - nChg);
}
@@ -1335,11 +1335,11 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
long nBorder = nUpPrtBottom + 20;
nBorder -= nChg;
aInva.Top( aInva.Bottom() - (nBorder+nInvaAdd) );
- if ( !IsBodyFrm() )
+ if ( !IsBodyFrame() )
{
SetCompletePaint();
- if ( !IsHeaderFrm() )
- static_cast<SwFootnoteBossFrm*>(pUp)->FindBodyCont()->SetCompletePaint();
+ if ( !IsHeaderFrame() )
+ static_cast<SwFootnoteBossFrame*>(pUp)->FindBodyCont()->SetCompletePaint();
}
//Invalidate the page because of the frames. Thereby the page becomes
//the right size again if a frame didn't fit. This only works
@@ -1354,7 +1354,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
if ( !bTst && nChg )
{
- pUp->Frm().SSize().Height() += nChg;
+ pUp->Frame().SSize().Height() += nChg;
pUp->Prt().SSize().Height() += nChg;
if ( pViewShell )
pViewShell->Imp()->SetFirstVisPageInvalid();
@@ -1366,7 +1366,7 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
SvxBrushItem aBack(pUp->GetFormat()->makeBackgroundBrushItem());
const SvxGraphicPosition ePos = aBack.GetGraphicPos();
if ( ePos != GPOS_NONE && ePos != GPOS_TILED )
- pViewShell->InvalidateWindows( pUp->Frm() );
+ pViewShell->InvalidateWindows( pUp->Frame() );
if ( pUp->GetUpper() )
{
@@ -1375,25 +1375,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
//Sad but true: during notify on ViewImp a Calc on the page and
//its Lower may be called. The values should not be changed
- //because the caller takes care of the adjustment of Frm and
+ //because the caller takes care of the adjustment of Frame and
//Prt.
- const long nOldFrmHeight = Frm().Height();
+ const long nOldFrameHeight = Frame().Height();
const long nOldPrtHeight = Prt().Height();
const bool bOldComplete = IsCompletePaint();
- if ( IsBodyFrm() )
- Prt().SSize().Height() = nOldFrmHeight;
+ if ( IsBodyFrame() )
+ Prt().SSize().Height() = nOldFrameHeight;
if ( pUp->GetUpper() )
- static_cast<SwRootFrm*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr );
- //static_cast<SwPageFrm*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect );
+ static_cast<SwRootFrame*>(pUp->GetUpper())->CheckViewLayout( nullptr, nullptr );
+ //static_cast<SwPageFrame*>(pUp)->AdjustRootSize( CHG_CHGPAGE, &aOldRect );
- Frm().SSize().Height() = nOldFrmHeight;
+ Frame().SSize().Height() = nOldFrameHeight;
Prt().SSize().Height() = nOldPrtHeight;
mbCompletePaint = bOldComplete;
}
- if ( !IsBodyFrm() )
+ if ( !IsBodyFrame() )
pUp->_InvalidateSize();
- InvalidatePage( static_cast<SwPageFrm*>(pUp) );
+ InvalidatePage( static_cast<SwPageFrame*>(pUp) );
}
nDiff -= nChg;
if ( !nDiff )
@@ -1402,63 +1402,63 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
nBrowseAdd = nChg;
}
- const SwFootnoteBossFrm *pBoss = static_cast<SwFootnoteBossFrm*>(GetUpper());
+ const SwFootnoteBossFrame *pBoss = static_cast<SwFootnoteBossFrame*>(GetUpper());
SwTwips nReal = 0,
nAdd = 0;
- SwFrm *pFrm = nullptr;
+ SwFrame *pFrame = nullptr;
SWRECTFN( this )
- if( IsBodyFrm() )
+ if( IsBodyFrame() )
{
if( IsInSct() )
{
- SwSectionFrm *pSect = FindSctFrm();
+ SwSectionFrame *pSect = FindSctFrame();
if( nDiff > 0 && pSect->IsEndnAtEnd() && GetNext() &&
- GetNext()->IsFootnoteContFrm() )
+ GetNext()->IsFootnoteContFrame() )
{
- SwFootnoteContFrm* pCont = static_cast<SwFootnoteContFrm*>(GetNext());
+ SwFootnoteContFrame* pCont = static_cast<SwFootnoteContFrame*>(GetNext());
SwTwips nMinH = 0;
- SwFootnoteFrm* pFootnote = static_cast<SwFootnoteFrm*>(pCont->Lower());
+ SwFootnoteFrame* pFootnote = static_cast<SwFootnoteFrame*>(pCont->Lower());
bool bFootnote = false;
while( pFootnote )
{
if( !pFootnote->GetAttr()->GetFootnote().IsEndNote() )
{
- nMinH += (pFootnote->Frm().*fnRect->fnGetHeight)();
+ nMinH += (pFootnote->Frame().*fnRect->fnGetHeight)();
bFootnote = true;
}
- pFootnote = static_cast<SwFootnoteFrm*>(pFootnote->GetNext());
+ pFootnote = static_cast<SwFootnoteFrame*>(pFootnote->GetNext());
}
if( bFootnote )
nMinH += (pCont->Prt().*fnRect->fnGetTop)();
- nReal = (pCont->Frm().*fnRect->fnGetHeight)() - nMinH;
+ nReal = (pCont->Frame().*fnRect->fnGetHeight)() - nMinH;
if( nReal > nDiff )
nReal = nDiff;
if( nReal > 0 )
- pFrm = GetNext();
+ pFrame = GetNext();
else
nReal = 0;
}
if( !bTst && !pSect->IsColLocked() )
pSect->InvalidateSize();
}
- if( !pFrm )
+ if( !pFrame )
return nBrowseAdd;
}
else
{
- const bool bFootnotePage = pBoss->IsPageFrm() && static_cast<const SwPageFrm*>(pBoss)->IsFootnotePage();
- if ( bFootnotePage && !IsFootnoteContFrm() )
- pFrm = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoss->FindFootnoteCont()));
- if ( !pFrm )
- pFrm = const_cast<SwFrm*>(static_cast<SwFrm const *>(pBoss->FindBodyCont()));
+ const bool bFootnotePage = pBoss->IsPageFrame() && static_cast<const SwPageFrame*>(pBoss)->IsFootnotePage();
+ if ( bFootnotePage && !IsFootnoteContFrame() )
+ pFrame = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoss->FindFootnoteCont()));
+ if ( !pFrame )
+ pFrame = const_cast<SwFrame*>(static_cast<SwFrame const *>(pBoss->FindBodyCont()));
- if ( !pFrm )
+ if ( !pFrame )
return 0;
//If not one is found, everything else is solved.
- nReal = (pFrm->Frm().*fnRect->fnGetHeight)();
+ nReal = (pFrame->Frame().*fnRect->fnGetHeight)();
if( nReal > nDiff )
nReal = nDiff;
if( !bFootnotePage )
@@ -1470,26 +1470,26 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if ( nReal > nMax )
nReal = nMax;
}
- if( !IsFootnoteContFrm() && nDiff > nReal &&
- pFrm->GetNext() && pFrm->GetNext()->IsFootnoteContFrm()
- && ( pFrm->GetNext()->IsVertical() == IsVertical() )
+ if( !IsFootnoteContFrame() && nDiff > nReal &&
+ pFrame->GetNext() && pFrame->GetNext()->IsFootnoteContFrame()
+ && ( pFrame->GetNext()->IsVertical() == IsVertical() )
)
{
//If the Body doesn't return enough, we look for a footnote, if
//there is one, we steal there accordingly.
- const SwTwips nAddMax = (pFrm->GetNext()->Frm().*fnRect->
+ const SwTwips nAddMax = (pFrame->GetNext()->Frame().*fnRect->
fnGetHeight)();
nAdd = nDiff - nReal;
if ( nAdd > nAddMax )
nAdd = nAddMax;
if ( !bTst )
{
- (pFrm->GetNext()->Frm().*fnRect->fnSetHeight)(nAddMax-nAdd);
+ (pFrame->GetNext()->Frame().*fnRect->fnSetHeight)(nAddMax-nAdd);
if( bVert && !bVertL2R && !bRev )
- pFrm->GetNext()->Frm().Pos().X() += nAdd;
- pFrm->GetNext()->InvalidatePrt();
- if ( pFrm->GetNext()->GetNext() )
- pFrm->GetNext()->GetNext()->_InvalidatePos();
+ pFrame->GetNext()->Frame().Pos().X() += nAdd;
+ pFrame->GetNext()->InvalidatePrt();
+ if ( pFrame->GetNext()->GetNext() )
+ pFrame->GetNext()->GetNext()->_InvalidatePos();
}
}
}
@@ -1497,31 +1497,31 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
if ( !bTst && nReal )
{
- SwTwips nTmp = (pFrm->Frm().*fnRect->fnGetHeight)();
- (pFrm->Frm().*fnRect->fnSetHeight)( nTmp - nReal );
+ SwTwips nTmp = (pFrame->Frame().*fnRect->fnGetHeight)();
+ (pFrame->Frame().*fnRect->fnSetHeight)( nTmp - nReal );
if( bVert && !bVertL2R && !bRev )
- pFrm->Frm().Pos().X() += nReal;
- pFrm->InvalidatePrt();
- if ( pFrm->GetNext() )
- pFrm->GetNext()->_InvalidatePos();
- if( nReal < 0 && pFrm->IsInSct() )
- {
- SwLayoutFrm* pUp = pFrm->GetUpper();
- if( pUp && nullptr != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrm() &&
+ pFrame->Frame().Pos().X() += nReal;
+ pFrame->InvalidatePrt();
+ if ( pFrame->GetNext() )
+ pFrame->GetNext()->_InvalidatePos();
+ if( nReal < 0 && pFrame->IsInSct() )
+ {
+ SwLayoutFrame* pUp = pFrame->GetUpper();
+ if( pUp && nullptr != ( pUp = pUp->GetUpper() ) && pUp->IsSctFrame() &&
!pUp->IsColLocked() )
pUp->InvalidateSize();
}
- if( ( IsHeaderFrm() || IsFooterFrm() ) && pBoss->GetDrawObjs() )
+ if( ( IsHeaderFrame() || IsFooterFrame() ) && pBoss->GetDrawObjs() )
{
const SwSortedObjs &rObjs = *pBoss->GetDrawObjs();
- OSL_ENSURE( pBoss->IsPageFrm(), "Header/Footer out of page?" );
+ OSL_ENSURE( pBoss->IsPageFrame(), "Header/Footer out of page?" );
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- OSL_ENSURE( !pFly->IsFlyInCntFrm(), "FlyInCnt at Page?" );
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ OSL_ENSURE( !pFly->IsFlyInContentFrame(), "FlyInCnt at Page?" );
const SwFormatVertOrient &rVert =
pFly->GetFormat()->GetVertOrient();
// When do we have to invalidate?
@@ -1532,8 +1532,8 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
// position.
if( ( rVert.GetRelationOrient() == text::RelOrientation::PRINT_AREA ||
rVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA ) &&
- ((IsHeaderFrm() && rVert.GetVertOrient()!=text::VertOrientation::BOTTOM) ||
- (IsFooterFrm() && rVert.GetVertOrient()!=text::VertOrientation::NONE &&
+ ((IsHeaderFrame() && rVert.GetVertOrient()!=text::VertOrientation::BOTTOM) ||
+ (IsFooterFrame() && rVert.GetVertOrient()!=text::VertOrientation::NONE &&
rVert.GetVertOrient() != text::VertOrientation::TOP)) )
{
pFly->_InvalidatePos();
@@ -1547,25 +1547,25 @@ SwTwips SwFrm::AdjustNeighbourhood( SwTwips nDiff, bool bTst )
}
/** method to perform additional actions on an invalidation (2004-05-19 #i28701#) */
-void SwFrm::_ActionOnInvalidation( const InvalidationType )
+void SwFrame::_ActionOnInvalidation( const InvalidationType )
{
// default behaviour is to perform no additional action
}
/** method to determine, if an invalidation is allowed (2004-05-19 #i28701#) */
-bool SwFrm::_InvalidationAllowed( const InvalidationType ) const
+bool SwFrame::_InvalidationAllowed( const InvalidationType ) const
{
// default behaviour is to allow invalidation
return true;
}
-void SwFrm::ImplInvalidateSize()
+void SwFrame::ImplInvalidateSize()
{
if ( _InvalidationAllowed( INVALID_SIZE ) )
{
mbValidSize = false;
- if ( IsFlyFrm() )
- static_cast<SwFlyFrm*>(this)->_Invalidate();
+ if ( IsFlyFrame() )
+ static_cast<SwFlyFrame*>(this)->_Invalidate();
else
InvalidatePage();
@@ -1574,13 +1574,13 @@ void SwFrm::ImplInvalidateSize()
}
}
-void SwFrm::ImplInvalidatePrt()
+void SwFrame::ImplInvalidatePrt()
{
if ( _InvalidationAllowed( INVALID_PRTAREA ) )
{
mbValidPrtArea = false;
- if ( IsFlyFrm() )
- static_cast<SwFlyFrm*>(this)->_Invalidate();
+ if ( IsFlyFrame() )
+ static_cast<SwFlyFrame*>(this)->_Invalidate();
else
InvalidatePage();
@@ -1589,14 +1589,14 @@ void SwFrm::ImplInvalidatePrt()
}
}
-void SwFrm::ImplInvalidatePos()
+void SwFrame::ImplInvalidatePos()
{
if ( _InvalidationAllowed( INVALID_POS ) )
{
mbValidPos = false;
- if ( IsFlyFrm() )
+ if ( IsFlyFrame() )
{
- static_cast<SwFlyFrm*>(this)->_Invalidate();
+ static_cast<SwFlyFrame*>(this)->_Invalidate();
}
else
{
@@ -1608,12 +1608,12 @@ void SwFrm::ImplInvalidatePos()
}
}
-void SwFrm::ImplInvalidateLineNum()
+void SwFrame::ImplInvalidateLineNum()
{
if ( _InvalidationAllowed( INVALID_LINENUM ) )
{
mbValidLineNum = false;
- OSL_ENSURE( IsTextFrm(), "line numbers are implemented for text only" );
+ OSL_ENSURE( IsTextFrame(), "line numbers are implemented for text only" );
InvalidatePage();
// OD 2004-05-19 #i28701#
@@ -1621,22 +1621,22 @@ void SwFrm::ImplInvalidateLineNum()
}
}
-void SwFrm::ReinitializeFrmSizeAttrFlags()
+void SwFrame::ReinitializeFrameSizeAttrFlags()
{
- const SwFormatFrmSize &rFormatSize = GetAttrSet()->GetFrmSize();
+ const SwFormatFrameSize &rFormatSize = GetAttrSet()->GetFrameSize();
if ( ATT_VAR_SIZE == rFormatSize.GetHeightSizeType() ||
ATT_MIN_SIZE == rFormatSize.GetHeightSizeType())
{
mbFixSize = false;
if ( GetType() & (FRM_HEADER | FRM_FOOTER | FRM_ROW) )
{
- SwFrm *pFrm = static_cast<SwLayoutFrm*>(this)->Lower();
- while ( pFrm )
- { pFrm->_InvalidateSize();
- pFrm->_InvalidatePrt();
- pFrm = pFrm->GetNext();
+ SwFrame *pFrame = static_cast<SwLayoutFrame*>(this)->Lower();
+ while ( pFrame )
+ { pFrame->_InvalidateSize();
+ pFrame->_InvalidatePrt();
+ pFrame = pFrame->GetNext();
}
- SwContentFrm *pCnt = static_cast<SwLayoutFrm*>(this)->ContainsContent();
+ SwContentFrame *pCnt = static_cast<SwLayoutFrame*>(this)->ContainsContent();
// #i36991# - be save.
// E.g., a row can contain *no* content.
if ( pCnt )
@@ -1646,21 +1646,21 @@ void SwFrm::ReinitializeFrmSizeAttrFlags()
{
pCnt->Prepare( PREP_ADJUST_FRM );
pCnt->_InvalidateSize();
- pCnt = pCnt->GetNextContentFrm();
- } while ( static_cast<SwLayoutFrm*>(this)->IsAnLower( pCnt ) );
+ pCnt = pCnt->GetNextContentFrame();
+ } while ( static_cast<SwLayoutFrame*>(this)->IsAnLower( pCnt ) );
}
}
}
else if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE )
{
if( IsVertical() )
- ChgSize( Size( rFormatSize.GetWidth(), Frm().Height()));
+ ChgSize( Size( rFormatSize.GetWidth(), Frame().Height()));
else
- ChgSize( Size( Frm().Width(), rFormatSize.GetHeight()));
+ ChgSize( Size( Frame().Width(), rFormatSize.GetHeight()));
}
}
-void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
+void SwFrame::ValidateThisAndAllLowers( const sal_uInt16 nStage )
{
// Stage 0: Only validate frames. Do not process any objects.
// Stage 1: Only validate fly frames and all of their contents.
@@ -1669,7 +1669,7 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
const bool bOnlyObject = 1 == nStage;
const bool bIncludeObjects = 1 <= nStage;
- if ( !bOnlyObject || dynamic_cast< const SwFlyFrm *>( this ) != nullptr )
+ if ( !bOnlyObject || dynamic_cast< const SwFlyFrame *>( this ) != nullptr )
{
mbValidSize = true;
mbValidPrtArea = true;
@@ -1685,17 +1685,17 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
for ( size_t i = 0; i < nCnt; ++i )
{
SwAnchoredObject* pAnchObj = (*pObjs)[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchObj ) != nullptr )
- static_cast<SwFlyFrm*>(pAnchObj)->ValidateThisAndAllLowers( 2 );
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchObj ) != nullptr )
+ static_cast<SwFlyFrame*>(pAnchObj)->ValidateThisAndAllLowers( 2 );
else if ( dynamic_cast< const SwAnchoredDrawObject *>( pAnchObj ) != nullptr )
static_cast<SwAnchoredDrawObject*>(pAnchObj)->ValidateThis();
}
}
}
- if ( IsLayoutFrm() )
+ if ( IsLayoutFrame() )
{
- SwFrm* pLower = static_cast<SwLayoutFrm*>(this)->Lower();
+ SwFrame* pLower = static_cast<SwLayoutFrame*>(this)->Lower();
while ( pLower )
{
pLower->ValidateThisAndAllLowers( nStage );
@@ -1704,25 +1704,25 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage )
}
}
-SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwContentFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SWRECTFN( this )
- SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if( nFrmHeight > 0 &&
- nDist > (LONG_MAX - nFrmHeight ) )
- nDist = LONG_MAX - nFrmHeight;
+ SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if( nFrameHeight > 0 &&
+ nDist > (LONG_MAX - nFrameHeight ) )
+ nDist = LONG_MAX - nFrameHeight;
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body
if( !(GetUpper()->GetType() & nTmpType) && GetUpper()->HasFixSize() )
{
if ( !bTst )
{
- (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
+ (Frame().*fnRect->fnSetHeight)( nFrameHeight + nDist );
if( IsVertical() && !IsVertLR() && !IsReverse() )
- Frm().Pos().X() -= nDist;
+ Frame().Pos().X() -= nDist;
if ( GetNext() )
{
GetNext()->InvalidatePos();
@@ -1741,20 +1741,20 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
}
SwTwips nReal = (GetUpper()->Prt().*fnRect->fnGetHeight)();
- SwFrm *pFrm = GetUpper()->Lower();
- while( pFrm && nReal > 0 )
- { nReal -= (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
+ SwFrame *pFrame = GetUpper()->Lower();
+ while( pFrame && nReal > 0 )
+ { nReal -= (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
}
if ( !bTst )
{
//Contents are always resized to the wished value.
- long nOld = (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnSetHeight)( nOld + nDist );
+ long nOld = (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnSetHeight)( nOld + nDist );
if( IsVertical()&& !IsVertLR() && !IsReverse() )
- Frm().Pos().X() -= nDist;
- SwTabFrm *pTab = (nOld && IsInTab()) ? FindTabFrm() : nullptr;
+ Frame().Pos().X() -= nDist;
+ SwTabFrame *pTab = (nOld && IsInTab()) ? FindTabFrame() : nullptr;
if (pTab)
{
if ( pTab->GetTable()->GetHTMLTableLayout() &&
@@ -1772,7 +1772,7 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
{
if( GetUpper() )
{
- if( bTst || !GetUpper()->IsFooterFrm() )
+ if( bTst || !GetUpper()->IsFooterFrame() )
nReal = GetUpper()->Grow( nDist - (nReal > 0 ? nReal : 0),
bTst, bInfo );
else
@@ -1807,30 +1807,30 @@ SwTwips SwContentFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
return nReal;
}
-SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwContentFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
SWRECTFN( this )
OSL_ENSURE( nDist >= 0, "nDist < 0" );
- OSL_ENSURE( nDist <= (Frm().*fnRect->fnGetHeight)(),
+ OSL_ENSURE( nDist <= (Frame().*fnRect->fnGetHeight)(),
"nDist > than current size." );
if ( !bTst )
{
SwTwips nRstHeight;
if( GetUpper() )
- nRstHeight = (Frm().*fnRect->fnBottomDist)
+ nRstHeight = (Frame().*fnRect->fnBottomDist)
( (GetUpper()->*fnRect->fnGetPrtBottom)() );
else
nRstHeight = 0;
if( nRstHeight < 0 )
{
SwTwips nNextHeight = 0;
- if( GetUpper()->IsSctFrm() && nDist > LONG_MAX/2 )
+ if( GetUpper()->IsSctFrame() && nDist > LONG_MAX/2 )
{
- SwFrm *pNxt = GetNext();
+ SwFrame *pNxt = GetNext();
while( pNxt )
{
- nNextHeight += (pNxt->Frm().*fnRect->fnGetHeight)();
+ nNextHeight += (pNxt->Frame().*fnRect->fnGetHeight)();
pNxt = pNxt->GetNext();
}
}
@@ -1838,11 +1838,11 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
}
else
nRstHeight = nDist;
- (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)() - nDist );
+ (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)() - nDist );
if( IsVertical() && !IsVertLR() )
- Frm().Pos().X() += nDist;
+ Frame().Pos().X() += nDist;
nDist = nRstHeight;
- SwTabFrm *pTab = IsInTab() ? FindTabFrm() : nullptr;
+ SwTabFrame *pTab = IsInTab() ? FindTabFrame() : nullptr;
if (pTab)
{
if ( pTab->GetTable()->GetHTMLTableLayout() &&
@@ -1858,7 +1858,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nReal;
if( GetUpper() && nDist > 0 )
{
- if( bTst || !GetUpper()->IsFooterFrm() )
+ if( bTst || !GetUpper()->IsFooterFrame() )
nReal = GetUpper()->Shrink( nDist, bTst, bInfo );
else
{
@@ -1872,8 +1872,8 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
// #109722# : The fix for #108745# was too strict.
bool bInvalidate = true;
- const SwRect aRect( Frm() );
- const SwPageFrm* pPage = FindPageFrm();
+ const SwRect aRect( Frame() );
+ const SwPageFrame* pPage = FindPageFrame();
const SwSortedObjs* pSorted = pPage ? pPage->GetSortedObjs() : nullptr;
if( pSorted )
{
@@ -1890,7 +1890,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
const SwFrameFormat& rFormat = pAnchoredObj->GetFrameFormat();
if( SURROUND_THROUGHT != rFormat.GetSurround().GetSurround() )
{
- const SwFrm* pAnchor = pAnchoredObj->GetAnchorFrm();
+ const SwFrame* pAnchor = pAnchoredObj->GetAnchorFrame();
if ( pAnchor && pAnchor->FindFooterOrHeader() == GetUpper() )
{
bInvalidate = false;
@@ -1910,7 +1910,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( !bTst )
{
- //The position of the next Frm changes for sure.
+ //The position of the next Frame changes for sure.
InvalidateNextPos();
//If I don't have a successor I have to do the retouch by myself.
@@ -1920,7 +1920,7 @@ SwTwips SwContentFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
return nReal;
}
-void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
+void SwContentFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
sal_uInt8 nInvFlags = 0;
@@ -1941,14 +1941,14 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
aOIter.NextItem();
}
if ( aOldSet.Count() || aNewSet.Count() )
- SwFrm::Modify( &aOldSet, &aNewSet );
+ SwFrame::Modify( &aOldSet, &aNewSet );
}
else
_UpdateAttr( pOld, pNew, nInvFlags );
if ( nInvFlags != 0 )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
if ( nInvFlags & 0x01 )
SetCompletePaint();
@@ -1960,7 +1960,7 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
{
if( IsInSct() && !GetPrev() )
{
- SwSectionFrm *pSect = FindSctFrm();
+ SwSectionFrame *pSect = FindSctFrame();
if( pSect->ContainsAny() == this )
{
pSect->_InvalidatePrt();
@@ -1969,23 +1969,23 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
_InvalidatePrt();
}
- SwFrm* mpNextFrm = GetIndNext();
- if ( mpNextFrm && nInvFlags & 0x10)
+ SwFrame* mpNextFrame = GetIndNext();
+ if ( mpNextFrame && nInvFlags & 0x10)
{
- mpNextFrm->_InvalidatePrt();
- mpNextFrm->InvalidatePage( pPage );
+ mpNextFrame->_InvalidatePrt();
+ mpNextFrame->InvalidatePage( pPage );
}
- if ( mpNextFrm && nInvFlags & 0x80 )
+ if ( mpNextFrame && nInvFlags & 0x80 )
{
- mpNextFrm->SetCompletePaint();
+ mpNextFrame->SetCompletePaint();
}
if ( nInvFlags & 0x20 )
{
- SwFrm* pPrevFrm = GetPrev();
- if ( pPrevFrm )
+ SwFrame* pPrevFrame = GetPrev();
+ if ( pPrevFrame )
{
- pPrevFrm->_InvalidatePrt();
- pPrevFrm->InvalidatePage( pPage );
+ pPrevFrame->_InvalidatePrt();
+ pPrevFrame->InvalidatePage( pPage );
}
}
if ( nInvFlags & 0x40 )
@@ -1993,7 +1993,7 @@ void SwContentFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
-void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew,
+void SwContentFrame::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew,
sal_uInt8 &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
{
@@ -2009,12 +2009,12 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
if ( IsInDocBody() && !IsInTab() )
{
rInvFlags |= 0x02;
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( !GetPrev() )
CheckPageDescs( pPage );
if ( GetAttrSet()->GetPageDesc().GetNumOffset() )
- static_cast<SwRootFrm*>(pPage->GetUpper())->SetVirtPageNum( true );
- SwDocPosUpdate aMsgHint( pPage->Frm().Top() );
+ static_cast<SwRootFrame*>(pPage->GetUpper())->SetVirtPageNum( true );
+ SwDocPosUpdate aMsgHint( pPage->Frame().Top() );
pPage->GetFormat()->GetDoc()->getIDocumentFieldsAccess().UpdatePageFields( &aMsgHint );
}
break;
@@ -2026,15 +2026,15 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// for footnote content.
if ( !GetIndNext() )
{
- SwFrm* pNxt = FindNext();
+ SwFrame* pNxt = FindNext();
if ( pNxt )
{
- SwPageFrm* pPg = pNxt->FindPageFrm();
+ SwPageFrame* pPg = pNxt->FindPageFrame();
pNxt->InvalidatePage( pPg );
pNxt->_InvalidatePrt();
- if( pNxt->IsSctFrm() )
+ if( pNxt->IsSctFrame() )
{
- SwFrm* pCnt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny();
+ SwFrame* pCnt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny();
if( pCnt )
{
pCnt->_InvalidatePrt();
@@ -2051,7 +2051,7 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// OD 2004-07-01 #i28701# - use new method <InvalidateObjs(..)>
GetIndNext()->InvalidateObjs( true );
}
- Prepare( PREP_UL_SPACE ); //TextFrm has to correct line spacing.
+ Prepare( PREP_UL_SPACE ); //TextFrame has to correct line spacing.
rInvFlags |= 0x80;
/* no break here */
}
@@ -2059,7 +2059,7 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
case RES_BOX:
case RES_SHADOW:
Prepare( PREP_FIXSIZE_CHG );
- SwFrm::Modify( pOld, pNew );
+ SwFrame::Modify( pOld, pNew );
rInvFlags |= 0x30;
break;
@@ -2071,15 +2071,15 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
rIDSA.get(DocumentSettingId::PARA_SPACE_MAX_AT_PAGES) )
{
rInvFlags |= 0x1;
- SwFrm* pNxt = FindNext();
+ SwFrame* pNxt = FindNext();
if( pNxt )
{
- SwPageFrm* pPg = pNxt->FindPageFrm();
+ SwPageFrame* pPg = pNxt->FindPageFrame();
pNxt->InvalidatePage( pPg );
pNxt->_InvalidatePrt();
- if( pNxt->IsSctFrm() )
+ if( pNxt->IsSctFrame() )
{
- SwFrm* pCnt = static_cast<SwSectionFrm*>(pNxt)->ContainsAny();
+ SwFrame* pCnt = static_cast<SwSectionFrame*>(pNxt)->ContainsAny();
if( pCnt )
{
pCnt->_InvalidatePrt();
@@ -2096,13 +2096,13 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
case RES_PARATR_CONNECT_BORDER:
{
rInvFlags |= 0x01;
- if ( IsTextFrm() )
+ if ( IsTextFrame() )
{
InvalidateNextPrtArea();
}
if ( !GetIndNext() && IsInTab() && IsInSplitTableRow() )
{
- FindTabFrm()->InvalidateSize();
+ FindTabFrame()->InvalidateSize();
}
}
break;
@@ -2139,36 +2139,36 @@ void SwContentFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew
pNewSet->ClearItem( nWhich );
}
else
- SwFrm::Modify( pOld, pNew );
+ SwFrame::Modify( pOld, pNew );
}
}
-SwLayoutFrm::SwLayoutFrm(SwFrameFormat *const pFormat, SwFrm *const pSib)
- : SwFrm(pFormat, pSib)
+SwLayoutFrame::SwLayoutFrame(SwFrameFormat *const pFormat, SwFrame *const pSib)
+ : SwFrame(pFormat, pSib)
, m_pLower(nullptr)
{
- const SwFormatFrmSize &rFormatSize = pFormat->GetFrmSize();
+ const SwFormatFrameSize &rFormatSize = pFormat->GetFrameSize();
if ( rFormatSize.GetHeightSizeType() == ATT_FIX_SIZE )
mbFixSize = true;
}
// #i28701#
-SwTwips SwLayoutFrm::InnerHeight() const
+SwTwips SwLayoutFrame::InnerHeight() const
{
- const SwFrm* pCnt = Lower();
+ const SwFrame* pCnt = Lower();
if (!pCnt)
return 0;
SWRECTFN( this )
SwTwips nRet = 0;
- if( pCnt->IsColumnFrm() || pCnt->IsCellFrm() )
+ if( pCnt->IsColumnFrame() || pCnt->IsCellFrame() )
{
do
{
- SwTwips nTmp = static_cast<const SwLayoutFrm*>(pCnt)->InnerHeight();
+ SwTwips nTmp = static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight();
if( pCnt->GetValidPrtAreaFlag() )
- nTmp += (pCnt->Frm().*fnRect->fnGetHeight)() -
+ nTmp += (pCnt->Frame().*fnRect->fnGetHeight)() -
(pCnt->Prt().*fnRect->fnGetHeight)();
if( nRet < nTmp )
nRet = nTmp;
@@ -2179,12 +2179,12 @@ SwTwips SwLayoutFrm::InnerHeight() const
{
do
{
- nRet += (pCnt->Frm().*fnRect->fnGetHeight)();
- if( pCnt->IsContentFrm() && static_cast<const SwTextFrm*>(pCnt)->IsUndersized() )
- nRet += static_cast<const SwTextFrm*>(pCnt)->GetParHeight() -
+ nRet += (pCnt->Frame().*fnRect->fnGetHeight)();
+ if( pCnt->IsContentFrame() && static_cast<const SwTextFrame*>(pCnt)->IsUndersized() )
+ nRet += static_cast<const SwTextFrame*>(pCnt)->GetParHeight() -
(pCnt->Prt().*fnRect->fnGetHeight)();
- if( pCnt->IsLayoutFrm() && !pCnt->IsTabFrm() )
- nRet += static_cast<const SwLayoutFrm*>(pCnt)->InnerHeight() -
+ if( pCnt->IsLayoutFrame() && !pCnt->IsTabFrame() )
+ nRet += static_cast<const SwLayoutFrame*>(pCnt)->InnerHeight() -
(pCnt->Prt().*fnRect->fnGetHeight)();
pCnt = pCnt->GetNext();
} while( pCnt );
@@ -2193,44 +2193,44 @@ SwTwips SwLayoutFrm::InnerHeight() const
return nRet;
}
-SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse with Body
if( !(GetType() & nTmpType) && HasFixSize() )
return 0;
SWRECTFN( this )
- const SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- const SwTwips nFrmPos = Frm().Pos().X();
+ const SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ const SwTwips nFramePos = Frame().Pos().X();
- if ( nFrmHeight > 0 && nDist > (LONG_MAX - nFrmHeight) )
- nDist = LONG_MAX - nFrmHeight;
+ if ( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) )
+ nDist = LONG_MAX - nFrameHeight;
SwTwips nMin = 0;
- if ( GetUpper() && !IsCellFrm() )
+ if ( GetUpper() && !IsCellFrame() )
{
- SwFrm *pFrm = GetUpper()->Lower();
- while( pFrm )
- { nMin += (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
+ SwFrame *pFrame = GetUpper()->Lower();
+ while( pFrame )
+ { nMin += (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
}
nMin = (GetUpper()->Prt().*fnRect->fnGetHeight)() - nMin;
if ( nMin < 0 )
nMin = 0;
}
- SwRect aOldFrm( Frm() );
- bool bMoveAccFrm = false;
+ SwRect aOldFrame( Frame() );
+ bool bMoveAccFrame = false;
bool bChgPos = IsVertical() && !IsReverse();
if ( !bTst )
{
- (Frm().*fnRect->fnSetHeight)( nFrmHeight + nDist );
+ (Frame().*fnRect->fnSetHeight)( nFrameHeight + nDist );
if( bChgPos && !IsVertLR() )
- Frm().Pos().X() -= nDist;
- bMoveAccFrm = true;
+ Frame().Pos().X() -= nDist;
+ bMoveAccFrame = true;
}
SwTwips nReal = nDist - nMin;
@@ -2238,8 +2238,8 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
{
if ( GetUpper() )
{ // AdjustNeighbourhood now only for the columns (but not in frames)
- sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrm() ?
- static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this )
+ sal_uInt8 nAdjust = GetUpper()->IsFootnoteBossFrame() ?
+ static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
if( NA_ONLY_ADJUST == nAdjust )
nReal = AdjustNeighbourhood( nReal, bTst );
@@ -2251,15 +2251,15 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
SwTwips nGrow = 0;
if( 0 < nReal )
{
- SwFrm* pToGrow = GetUpper();
+ SwFrame* pToGrow = GetUpper();
// NEW TABLES
// A cell with a row span of > 1 is allowed to grow the
// line containing the end of the row span if it is
// located in the same table frame:
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
if ( pThisCell && pThisCell->GetLayoutRowSpan() > 1 )
{
- SwCellFrm& rEndCell = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( false, true ));
+ SwCellFrame& rEndCell = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( false, true ));
if ( -1 == rEndCell.GetTabBox()->getRowSpan() )
pToGrow = rEndCell.GetUpper();
else
@@ -2272,15 +2272,15 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if( NA_GROW_ADJUST == nAdjust && nGrow < nReal )
nReal += AdjustNeighbourhood( nReal - nGrow, bTst );
- if ( IsFootnoteFrm() && (nGrow != nReal) && GetNext() )
+ if ( IsFootnoteFrame() && (nGrow != nReal) && GetNext() )
{
//Footnotes can replace their successor.
SwTwips nSpace = bTst ? 0 : -nDist;
- const SwFrm *pFrm = GetUpper()->Lower();
+ const SwFrame *pFrame = GetUpper()->Lower();
do
- { nSpace += (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
- } while ( pFrm != GetNext() );
+ { nSpace += (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
+ } while ( pFrame != GetNext() );
nSpace = (GetUpper()->Prt().*fnRect->fnGetHeight)() -nSpace;
if ( nSpace < 0 )
nSpace = 0;
@@ -2288,7 +2288,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if ( nReal > nSpace )
nReal = nSpace;
if ( nReal && !bTst )
- static_cast<SwFootnoteFrm*>(this)->InvalidateNxtFootnoteCnts( FindPageFrm() );
+ static_cast<SwFootnoteFrame*>(this)->InvalidateNxtFootnoteCnts( FindPageFrame() );
}
else
nReal = nGrow;
@@ -2306,24 +2306,24 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
{
if( nReal != nDist &&
// NEW TABLES
- ( !IsCellFrm() || static_cast<SwCellFrm*>(this)->GetLayoutRowSpan() > 1 ) )
+ ( !IsCellFrame() || static_cast<SwCellFrame*>(this)->GetLayoutRowSpan() > 1 ) )
{
- (Frm().*fnRect->fnSetHeight)( nFrmHeight + nReal );
+ (Frame().*fnRect->fnSetHeight)( nFrameHeight + nReal );
if( bChgPos && !IsVertLR() )
- Frm().Pos().X() = nFrmPos - nReal;
- bMoveAccFrm = true;
+ Frame().Pos().X() = nFramePos - nReal;
+ bMoveAccFrame = true;
}
if ( nReal )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
{
GetNext()->_InvalidatePos();
- if ( GetNext()->IsContentFrm() )
+ if ( GetNext()->IsContentFrame() )
GetNext()->InvalidatePage( pPage );
}
- if ( !IsPageBodyFrm() )
+ if ( !IsPageBodyFrame() )
{
_InvalidateAll();
InvalidatePage( pPage );
@@ -2331,7 +2331,7 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
NotifyLowerObjs();
- if( IsCellFrm() )
+ if( IsCellFrame() )
InvaPercentLowers( nReal );
SvxBrushItem aBack(GetFormat()->makeBackgroundBrushItem());
@@ -2341,21 +2341,21 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, bool bTst, bool bInfo )
}
}
- if( bMoveAccFrm && IsAccessibleFrm() )
+ if( bMoveAccFrame && IsAccessibleFrame() )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm );
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame );
}
}
return nReal;
}
-SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
+SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
{
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
const sal_uInt16 nTmpType = bBrowse ? 0x2084: 0x2004; //Row+Cell, Browse by Body.
if( !(GetType() & nTmpType) && HasFixSize() )
@@ -2363,20 +2363,20 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
OSL_ENSURE( nDist >= 0, "nDist < 0" );
SWRECTFN( this )
- SwTwips nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if ( nDist > nFrmHeight )
- nDist = nFrmHeight;
+ SwTwips nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if ( nDist > nFrameHeight )
+ nDist = nFrameHeight;
SwTwips nMin = 0;
bool bChgPos = IsVertical() && !IsReverse();
if ( Lower() )
{
- if( !Lower()->IsNeighbourFrm() )
- { const SwFrm *pFrm = Lower();
+ if( !Lower()->IsNeighbourFrame() )
+ { const SwFrame *pFrame = Lower();
const long nTmp = (Prt().*fnRect->fnGetHeight)();
- while( pFrm && nMin < nTmp )
- { nMin += (pFrm->Frm().*fnRect->fnGetHeight)();
- pFrm = pFrm->GetNext();
+ while( pFrame && nMin < nTmp )
+ { nMin += (pFrame->Frame().*fnRect->fnGetHeight)();
+ pFrame = pFrame->GetNext();
}
}
}
@@ -2387,62 +2387,62 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if( nReal <= 0 )
return nDist;
- SwRect aOldFrm( Frm() );
- bool bMoveAccFrm = false;
+ SwRect aOldFrame( Frame() );
+ bool bMoveAccFrame = false;
SwTwips nRealDist = nReal;
if ( !bTst )
{
- (Frm().*fnRect->fnSetHeight)( nFrmHeight - nReal );
+ (Frame().*fnRect->fnSetHeight)( nFrameHeight - nReal );
if( bChgPos && !IsVertLR() )
- Frm().Pos().X() += nReal;
- bMoveAccFrm = true;
+ Frame().Pos().X() += nReal;
+ bMoveAccFrame = true;
}
- sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFootnoteBossFrm() ?
- static_cast<SwFootnoteBossFrm*>(GetUpper())->NeighbourhoodAdjustment( this )
+ sal_uInt8 nAdjust = GetUpper() && GetUpper()->IsFootnoteBossFrame() ?
+ static_cast<SwFootnoteBossFrame*>(GetUpper())->NeighbourhoodAdjustment( this )
: NA_GROW_SHRINK;
// AdjustNeighbourhood also in columns (but not in frames)
if( NA_ONLY_ADJUST == nAdjust )
{
- if ( IsPageBodyFrm() && !bBrowse )
+ if ( IsPageBodyFrame() && !bBrowse )
nReal = nDist;
else
{ nReal = AdjustNeighbourhood( -nReal, bTst );
nReal *= -1;
- if ( !bTst && IsBodyFrm() && nReal < nRealDist )
+ if ( !bTst && IsBodyFrame() && nReal < nRealDist )
{
- (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)()
+ nRealDist - nReal );
if( bChgPos && !IsVertLR() )
- Frm().Pos().X() += nRealDist - nReal;
- OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
+ Frame().Pos().X() += nRealDist - nReal;
+ OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );
}
}
}
- else if( IsColumnFrm() || IsColBodyFrm() )
+ else if( IsColumnFrame() || IsColBodyFrame() )
{
SwTwips nTmp = GetUpper()->Shrink( nReal, bTst, bInfo );
if ( nTmp != nReal )
{
- (Frm().*fnRect->fnSetHeight)( (Frm().*fnRect->fnGetHeight)()
+ (Frame().*fnRect->fnSetHeight)( (Frame().*fnRect->fnGetHeight)()
+ nReal - nTmp );
if( bChgPos && !IsVertLR() )
- Frm().Pos().X() += nTmp - nReal;
- OSL_ENSURE( !IsAccessibleFrm(), "bMoveAccFrm has to be set!" );
+ Frame().Pos().X() += nTmp - nReal;
+ OSL_ENSURE( !IsAccessibleFrame(), "bMoveAccFrame has to be set!" );
nReal = nTmp;
}
}
else
{
SwTwips nShrink = nReal;
- SwFrm* pToShrink = GetUpper();
- const SwCellFrm* pThisCell = dynamic_cast<const SwCellFrm*>(this);
+ SwFrame* pToShrink = GetUpper();
+ const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this);
// NEW TABLES
if ( pThisCell && pThisCell->GetLayoutRowSpan() > 1 )
{
- SwCellFrm& rEndCell = const_cast<SwCellFrm&>(pThisCell->FindStartEndOfRowSpanCell( false, true ));
+ SwCellFrame& rEndCell = const_cast<SwCellFrame&>(pThisCell->FindStartEndOfRowSpanCell( false, true ));
pToShrink = rEndCell.GetUpper();
}
@@ -2452,38 +2452,38 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
AdjustNeighbourhood( nReal - nShrink );
}
- if( bMoveAccFrm && IsAccessibleFrm() )
+ if( bMoveAccFrame && IsAccessibleFrame() )
{
- SwRootFrm *pRootFrm = getRootFrm();
- if( pRootFrm && pRootFrm->IsAnyShellAccessible() &&
- pRootFrm->GetCurrShell() )
+ SwRootFrame *pRootFrame = getRootFrame();
+ if( pRootFrame && pRootFrame->IsAnyShellAccessible() &&
+ pRootFrame->GetCurrShell() )
{
- pRootFrm->GetCurrShell()->Imp()->MoveAccessibleFrm( this, aOldFrm );
+ pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame );
}
}
- if ( !bTst && (IsCellFrm() || IsColumnFrm() ? nReal : nRealDist) )
+ if ( !bTst && (IsCellFrame() || IsColumnFrame() ? nReal : nRealDist) )
{
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
{
GetNext()->_InvalidatePos();
- if ( GetNext()->IsContentFrm() )
+ if ( GetNext()->IsContentFrame() )
GetNext()->InvalidatePage( pPage );
- if ( IsTabFrm() )
- static_cast<SwTabFrm*>(this)->SetComplete();
+ if ( IsTabFrame() )
+ static_cast<SwTabFrame*>(this)->SetComplete();
}
else
- { if ( IsRetoucheFrm() )
+ { if ( IsRetoucheFrame() )
SetRetouche();
- if ( IsTabFrm() )
+ if ( IsTabFrame() )
{
- if( IsTabFrm() )
- static_cast<SwTabFrm*>(this)->SetComplete();
+ if( IsTabFrame() )
+ static_cast<SwTabFrame*>(this)->SetComplete();
if ( Lower() ) // Can also be in the Join and be empty!
InvalidateNextPos();
}
}
- if ( !IsBodyFrm() )
+ if ( !IsBodyFrame() )
{
_InvalidateAll();
InvalidatePage( pPage );
@@ -2503,20 +2503,20 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
if (!(GetType() & (FRM_ROW|FRM_TAB|FRM_FTNCONT|FRM_PAGE|FRM_ROOT)))
NotifyLowerObjs();
- if( IsCellFrm() )
+ if( IsCellFrame() )
InvaPercentLowers( nReal );
- SwContentFrm *pCnt;
- if( IsFootnoteFrm() && !static_cast<SwFootnoteFrm*>(this)->GetAttr()->GetFootnote().IsEndNote() &&
+ SwContentFrame *pCnt;
+ if( IsFootnoteFrame() && !static_cast<SwFootnoteFrame*>(this)->GetAttr()->GetFootnote().IsEndNote() &&
( GetFormat()->GetDoc()->GetFootnoteInfo().ePos != FTNPOS_CHAPTER ||
- ( IsInSct() && FindSctFrm()->IsFootnoteAtEnd() ) ) &&
- nullptr != (pCnt = static_cast<SwFootnoteFrm*>(this)->GetRefFromAttr() ) )
+ ( IsInSct() && FindSctFrame()->IsFootnoteAtEnd() ) ) &&
+ nullptr != (pCnt = static_cast<SwFootnoteFrame*>(this)->GetRefFromAttr() ) )
{
if ( pCnt->IsFollow() )
{ // If we are in an other column/page than the frame with the
// reference, we don't need to invalidate its master.
- SwFrm *pTmp = pCnt->FindFootnoteBossFrm(true) == FindFootnoteBossFrm(true)
- ? &pCnt->FindMaster()->GetFrm() : pCnt;
+ SwFrame *pTmp = pCnt->FindFootnoteBossFrame(true) == FindFootnoteBossFrame(true)
+ ? &pCnt->FindMaster()->GetFrame() : pCnt;
pTmp->Prepare( PREP_ADJUST_FRM );
pTmp->InvalidateSize();
}
@@ -2528,19 +2528,19 @@ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, bool bTst, bool bInfo )
}
/**
- * Changes the size of the directly subsidiary Frm's that have a fixed size, proportionally to the
- * size change of the PrtArea of the Frm's.
+ * Changes the size of the directly subsidiary Frame's that have a fixed size, proportionally to the
+ * size change of the PrtArea of the Frame's.
*
- * The variable Frms are also proportionally adapted; they will grow/shrink again by themselves.
+ * The variable Frames are also proportionally adapted; they will grow/shrink again by themselves.
*/
-void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
+void SwLayoutFrame::ChgLowersProp( const Size& rOldSize )
{
// no change of lower properties for root frame or if no lower exists.
- if ( IsRootFrm() || !Lower() )
+ if ( IsRootFrame() || !Lower() )
return;
- // declare and init <SwFrm* pLowerFrm> with first lower
- SwFrm *pLowerFrm = Lower();
+ // declare and init <SwFrame* pLowerFrame> with first lower
+ SwFrame *pLowerFrame = Lower();
// declare and init const booleans <bHeightChgd> and <bWidthChg>
const bool bHeightChgd = rOldSize.Height() != Prt().Height();
@@ -2553,60 +2553,60 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// are affected by the size change. Otherwise much more lower frames
// are invalidated.
if ( !( bVert ? bHeightChgd : bWidthChgd ) &&
- ! Lower()->IsColumnFrm() &&
- ( ( IsBodyFrm() && IsInDocBody() && ( !IsInSct() || !FindSctFrm()->IsColLocked() ) ) ||
+ ! Lower()->IsColumnFrame() &&
+ ( ( IsBodyFrame() && IsInDocBody() && ( !IsInSct() || !FindSctFrame()->IsColLocked() ) ) ||
// #i10826# Section frames without columns should not
// invalidate all lowers!
- IsSctFrm() ) )
+ IsSctFrame() ) )
{
// Determine page frame the body frame resp. the section frame belongs to.
- SwPageFrm *pPage = FindPageFrm();
+ SwPageFrame *pPage = FindPageFrame();
// Determine last lower by traveling through them using <GetNext()>.
// During travel check each section frame, if it will be sized to
// maximum. If Yes, invalidate size of section frame and set
// corresponding flags at the page.
do
{
- if( pLowerFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pLowerFrm)->_ToMaximize() )
+ if( pLowerFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pLowerFrame)->_ToMaximize() )
{
- pLowerFrm->_InvalidateSize();
- pLowerFrm->InvalidatePage( pPage );
+ pLowerFrame->_InvalidateSize();
+ pLowerFrame->InvalidatePage( pPage );
}
- if( pLowerFrm->GetNext() )
- pLowerFrm = pLowerFrm->GetNext();
+ if( pLowerFrame->GetNext() )
+ pLowerFrame = pLowerFrame->GetNext();
else
break;
} while( true );
// If found last lower is a section frame containing no section
// (section frame isn't valid and will be deleted in the future),
// travel backwards.
- while( pLowerFrm->IsSctFrm() && !static_cast<SwSectionFrm*>(pLowerFrm)->GetSection() &&
- pLowerFrm->GetPrev() )
- pLowerFrm = pLowerFrm->GetPrev();
- // If found last lower is a section frame, set <pLowerFrm> to its last
+ while( pLowerFrame->IsSctFrame() && !static_cast<SwSectionFrame*>(pLowerFrame)->GetSection() &&
+ pLowerFrame->GetPrev() )
+ pLowerFrame = pLowerFrame->GetPrev();
+ // If found last lower is a section frame, set <pLowerFrame> to its last
// content, if the section frame is valid and is not sized to maximum.
- // Otherwise set <pLowerFrm> to NULL - In this case body frame only
+ // Otherwise set <pLowerFrame> to NULL - In this case body frame only
// contains invalid section frames.
- if( pLowerFrm->IsSctFrm() )
- pLowerFrm = static_cast<SwSectionFrm*>(pLowerFrm)->GetSection() &&
- !static_cast<SwSectionFrm*>(pLowerFrm)->ToMaximize( false ) ?
- static_cast<SwSectionFrm*>(pLowerFrm)->FindLastContent() : nullptr;
+ if( pLowerFrame->IsSctFrame() )
+ pLowerFrame = static_cast<SwSectionFrame*>(pLowerFrame)->GetSection() &&
+ !static_cast<SwSectionFrame*>(pLowerFrame)->ToMaximize( false ) ?
+ static_cast<SwSectionFrame*>(pLowerFrame)->FindLastContent() : nullptr;
// continue with found last lower, probably the last content of a section
- if ( pLowerFrm )
+ if ( pLowerFrame )
{
- // If <pLowerFrm> is in a table frame, set <pLowerFrm> to this table
+ // If <pLowerFrame> is in a table frame, set <pLowerFrame> to this table
// frame and continue.
- if ( pLowerFrm->IsInTab() )
+ if ( pLowerFrame->IsInTab() )
{
- // OD 28.10.2002 #97265# - safeguard for setting <pLowerFrm> to
+ // OD 28.10.2002 #97265# - safeguard for setting <pLowerFrame> to
// its table frame - check, if the table frame is also a lower
- // of the body frame, in order to assure that <pLowerFrm> is not
+ // of the body frame, in order to assure that <pLowerFrame> is not
// set to a frame, which is an *upper* of the body frame.
- SwFrm* pTableFrm = pLowerFrm->FindTabFrm();
- if ( IsAnLower( pTableFrm ) )
+ SwFrame* pTableFrame = pLowerFrame->FindTabFrame();
+ if ( IsAnLower( pTableFrame ) )
{
- pLowerFrm = pTableFrm;
+ pLowerFrame = pTableFrame;
}
}
// Check, if variable size of body frame resp. section frame has grown
@@ -2616,13 +2616,13 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
{
// If variable size of body|section frame has grown, only found
// last lower and the position of the its next have to be invalidated.
- pLowerFrm->_InvalidateAll();
- pLowerFrm->InvalidatePage( pPage );
- if( !pLowerFrm->IsFlowFrm() ||
- !SwFlowFrm::CastFlowFrm( pLowerFrm )->HasFollow() )
- pLowerFrm->InvalidateNextPos( true );
- if ( pLowerFrm->IsTextFrm() )
- static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM );
+ pLowerFrame->_InvalidateAll();
+ pLowerFrame->InvalidatePage( pPage );
+ if( !pLowerFrame->IsFlowFrame() ||
+ !SwFlowFrame::CastFlowFrame( pLowerFrame )->HasFollow() )
+ pLowerFrame->InvalidateNextPos( true );
+ if ( pLowerFrame->IsTextFrame() )
+ static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
}
else
{
@@ -2631,44 +2631,44 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// and the dedicated new last lower.
if( bVert )
{
- SwTwips nBot = Frm().Left() + Prt().Left();
- while ( pLowerFrm && pLowerFrm->GetPrev() && pLowerFrm->Frm().Left() < nBot )
+ SwTwips nBot = Frame().Left() + Prt().Left();
+ while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Left() < nBot )
{
- pLowerFrm->_InvalidateAll();
- pLowerFrm->InvalidatePage( pPage );
- pLowerFrm = pLowerFrm->GetPrev();
+ pLowerFrame->_InvalidateAll();
+ pLowerFrame->InvalidatePage( pPage );
+ pLowerFrame = pLowerFrame->GetPrev();
}
}
else
{
- SwTwips nBot = Frm().Top() + Prt().Bottom();
- while ( pLowerFrm && pLowerFrm->GetPrev() && pLowerFrm->Frm().Top() > nBot )
+ SwTwips nBot = Frame().Top() + Prt().Bottom();
+ while ( pLowerFrame && pLowerFrame->GetPrev() && pLowerFrame->Frame().Top() > nBot )
{
- pLowerFrm->_InvalidateAll();
- pLowerFrm->InvalidatePage( pPage );
- pLowerFrm = pLowerFrm->GetPrev();
+ pLowerFrame->_InvalidateAll();
+ pLowerFrame->InvalidatePage( pPage );
+ pLowerFrame = pLowerFrame->GetPrev();
}
}
- if ( pLowerFrm )
+ if ( pLowerFrame )
{
- pLowerFrm->_InvalidateSize();
- pLowerFrm->InvalidatePage( pPage );
- if ( pLowerFrm->IsTextFrm() )
- static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM );
+ pLowerFrame->_InvalidateSize();
+ pLowerFrame->InvalidatePage( pPage );
+ if ( pLowerFrame->IsTextFrame() )
+ static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
}
}
// #i41694# - improvement by removing duplicates
- if ( pLowerFrm )
+ if ( pLowerFrame )
{
- if ( pLowerFrm->IsInSct() )
+ if ( pLowerFrame->IsInSct() )
{
// #i41694# - follow-up of issue #i10826#
// No invalidation of section frame, if it's the this.
- SwFrm* pSectFrm = pLowerFrm->FindSctFrm();
- if( pSectFrm != this && IsAnLower( pSectFrm ) )
+ SwFrame* pSectFrame = pLowerFrame->FindSctFrame();
+ if( pSectFrame != this && IsAnLower( pSectFrame ) )
{
- pSectFrm->_InvalidateSize();
- pSectFrm->InvalidatePage( pPage );
+ pSectFrame->_InvalidateSize();
+ pSectFrame->InvalidatePage( pPage );
}
}
}
@@ -2682,7 +2682,7 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// Declare booleans <bFixChgd> and <bVarChgd>, indicating for text frame
// adjustment, if fixed/variable size has changed.
bool bFixChgd, bVarChgd;
- if( bVert == pLowerFrm->IsNeighbourFrm() )
+ if( bVert == pLowerFrame->IsNeighbourFrame() )
{
bFixChgd = bWidthChgd;
bVarChgd = bHeightChgd;
@@ -2710,21 +2710,21 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
: FRM_NEIGHBOUR;
// Travel through all lowers using <GetNext()>
- while ( pLowerFrm )
+ while ( pLowerFrame )
{
- if ( pLowerFrm->IsTextFrm() )
+ if ( pLowerFrame->IsTextFrame() )
{
// Text frames will only be invalidated - prepare invalidation
if ( bFixChgd )
- static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_FIXSIZE_CHG );
+ static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_FIXSIZE_CHG );
if ( bVarChgd )
- static_cast<SwContentFrm*>(pLowerFrm)->Prepare( PREP_ADJUST_FRM );
+ static_cast<SwContentFrame*>(pLowerFrame)->Prepare( PREP_ADJUST_FRM );
}
else
{
// If lower isn't a table, row, cell or section frame, adjust its
// frame size.
- const sal_uInt16 nLowerType = pLowerFrm->GetType();
+ const sal_uInt16 nLowerType = pLowerFrame->GetType();
if ( !(nLowerType & (FRM_TAB|FRM_ROW|FRM_CELL|FRM_SECTION)) )
{
if ( bWidthChgd )
@@ -2737,9 +2737,9 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// In horizontal layout set width of header, footer,
// foot note container, foot note, body and no-text
// frames to its upper width.
- pLowerFrm->Frm().Width( Prt().Width() );
+ pLowerFrame->Frame().Width( Prt().Width() );
}
- else if( rOldSize.Width() && !pLowerFrm->IsFootnoteFrm() )
+ else if( rOldSize.Width() && !pLowerFrame->IsFootnoteFrame() )
{
// Adjust frame width proportional, if lower isn't a
// foot note frame and condition <nLowerType & nFixWidth>
@@ -2752,11 +2752,11 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// Perform <double> calculation of new width, if
// one of the coefficients is greater than 50000
SwTwips nNewWidth;
- if ( (pLowerFrm->Frm().Width() > 50000) ||
+ if ( (pLowerFrame->Frame().Width() > 50000) ||
(Prt().Width() > 50000) )
{
double nNewWidthTmp =
- ( double(pLowerFrm->Frm().Width())
+ ( double(pLowerFrame->Frame().Width())
* double(Prt().Width()) )
/ double(rOldSize.Width());
nNewWidth = SwTwips(nNewWidthTmp);
@@ -2764,9 +2764,9 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
else
{
nNewWidth =
- (pLowerFrm->Frm().Width() * Prt().Width()) / rOldSize.Width();
+ (pLowerFrame->Frame().Width() * Prt().Width()) / rOldSize.Width();
}
- pLowerFrm->Frm().Width( nNewWidth );
+ pLowerFrame->Frame().Width( nNewWidth );
}
}
if ( bHeightChgd )
@@ -2778,17 +2778,17 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// no-text frames to its upper height.
// In horizontal layout set height of column frames
// to its upper height.
- pLowerFrm->Frm().Height( Prt().Height() );
+ pLowerFrame->Frame().Height( Prt().Height() );
}
// OD 01.10.2002 #102211#
- // add conditions <!pLowerFrm->IsHeaderFrm()> and
- // <!pLowerFrm->IsFooterFrm()> in order to avoid that
+ // add conditions <!pLowerFrame->IsHeaderFrame()> and
+ // <!pLowerFrame->IsFooterFrame()> in order to avoid that
// the <Grow> of header or footer are overwritten.
// NOTE: Height of header/footer frame is determined by contents.
else if ( rOldSize.Height() &&
- !pLowerFrm->IsFootnoteFrm() &&
- !pLowerFrm->IsHeaderFrm() &&
- !pLowerFrm->IsFooterFrm()
+ !pLowerFrame->IsFootnoteFrame() &&
+ !pLowerFrame->IsHeaderFrame() &&
+ !pLowerFrame->IsFooterFrame()
)
{
// Adjust frame height proportional, if lower isn't a
@@ -2812,29 +2812,29 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// determined by its content.
// OD 31.03.2003 #108446# - apply special case for page
// lowers - see description above - also for section columns.
- if ( IsPageFrm() ||
- ( IsColumnFrm() && IsInSct() )
+ if ( IsPageFrame() ||
+ ( IsColumnFrame() && IsInSct() )
)
{
- OSL_ENSURE( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFootnoteContFrm(),
+ OSL_ENSURE( pLowerFrame->IsBodyFrame() || pLowerFrame->IsFootnoteContFrame(),
"ChgLowersProp - only for body or foot note container" );
- if ( pLowerFrm->IsBodyFrm() || pLowerFrm->IsFootnoteContFrm() )
+ if ( pLowerFrame->IsBodyFrame() || pLowerFrame->IsFootnoteContFrame() )
{
- if ( IsVertical() || pLowerFrm->IsBodyFrm() )
+ if ( IsVertical() || pLowerFrame->IsBodyFrame() )
{
SwTwips nNewHeight =
- pLowerFrm->Frm().Height() +
+ pLowerFrame->Frame().Height() +
( Prt().Height() - rOldSize.Height() );
if ( nNewHeight < 0)
{
// OD 01.04.2003 #108446# - adjust assertion condition and text
- OSL_ENSURE( !( IsPageFrm() &&
- (pLowerFrm->Frm().Height()>0) &&
- (pLowerFrm->IsValid()) ),
+ OSL_ENSURE( !( IsPageFrame() &&
+ (pLowerFrame->Frame().Height()>0) &&
+ (pLowerFrame->IsValid()) ),
"ChgLowersProg - negative height for lower.");
nNewHeight = 0;
}
- pLowerFrm->Frm().Height( nNewHeight );
+ pLowerFrame->Frame().Height( nNewHeight );
}
}
}
@@ -2844,75 +2844,75 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
// OD 24.10.2002 #97265# - <double> calculation
// Perform <double> calculation of new height, if
// one of the coefficients is greater than 50000
- if ( (pLowerFrm->Frm().Height() > 50000) ||
+ if ( (pLowerFrame->Frame().Height() > 50000) ||
(Prt().Height() > 50000) )
{
double nNewHeightTmp =
- ( double(pLowerFrm->Frm().Height())
+ ( double(pLowerFrame->Frame().Height())
* double(Prt().Height()) )
/ double(rOldSize.Height());
nNewHeight = SwTwips(nNewHeightTmp);
}
else
{
- nNewHeight = ( pLowerFrm->Frm().Height()
+ nNewHeight = ( pLowerFrame->Frame().Height()
* Prt().Height() ) / rOldSize.Height();
}
- if( !pLowerFrm->GetNext() )
+ if( !pLowerFrame->GetNext() )
{
SwTwips nSum = Prt().Height();
- SwFrm* pTmp = Lower();
+ SwFrame* pTmp = Lower();
while( pTmp->GetNext() )
{
- if( !pTmp->IsFootnoteContFrm() || !pTmp->IsVertical() )
- nSum -= pTmp->Frm().Height();
+ if( !pTmp->IsFootnoteContFrame() || !pTmp->IsVertical() )
+ nSum -= pTmp->Frame().Height();
pTmp = pTmp->GetNext();
}
if( nSum - nNewHeight == 1 &&
- nSum == pLowerFrm->Frm().Height() )
+ nSum == pLowerFrame->Frame().Height() )
nNewHeight = nSum;
}
- pLowerFrm->Frm().Height( nNewHeight );
+ pLowerFrame->Frame().Height( nNewHeight );
}
}
}
}
} // end of else { NOT text frame }
- pLowerFrm->_InvalidateAll();
- if ( bInvaPageForContent && pLowerFrm->IsContentFrm() )
+ pLowerFrame->_InvalidateAll();
+ if ( bInvaPageForContent && pLowerFrame->IsContentFrame() )
{
- pLowerFrm->InvalidatePage();
+ pLowerFrame->InvalidatePage();
bInvaPageForContent = false;
}
- if ( !pLowerFrm->GetNext() && pLowerFrm->IsRetoucheFrm() )
+ if ( !pLowerFrame->GetNext() && pLowerFrame->IsRetoucheFrame() )
{
//If a growth took place and the subordinate elements can retouch
//itself (currently Tabs, Sections and Content) we trigger it.
if ( rOldSize.Height() < Prt().SSize().Height() ||
rOldSize.Width() < Prt().SSize().Width() )
- pLowerFrm->SetRetouche();
+ pLowerFrame->SetRetouche();
}
- pLowerFrm = pLowerFrm->GetNext();
+ pLowerFrame = pLowerFrame->GetNext();
}
// Finally adjust the columns if width is set to auto
// Possible optimization: execute this code earlier in this function and
// return???
if ( ( (bVert && bHeightChgd) || (! bVert && bWidthChgd) ) &&
- Lower()->IsColumnFrm() )
+ Lower()->IsColumnFrame() )
{
// get column attribute
const SwFormatCol* pColAttr = nullptr;
- if ( IsPageBodyFrm() )
+ if ( IsPageBodyFrame() )
{
- OSL_ENSURE( GetUpper()->IsPageFrm(), "Upper is not page frame" );
+ OSL_ENSURE( GetUpper()->IsPageFrame(), "Upper is not page frame" );
pColAttr = &GetUpper()->GetFormat()->GetCol();
}
else
{
- OSL_ENSURE( IsFlyFrm() || IsSctFrm(), "Columns not in fly or section" );
+ OSL_ENSURE( IsFlyFrame() || IsSctFrame(), "Columns not in fly or section" );
pColAttr = &GetFormat()->GetCol();
}
@@ -2921,13 +2921,13 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize )
}
}
-/** "Formats" the Frame; Frm and PrtArea.
+/** "Formats" the Frame; Frame and PrtArea.
*
* The Fixsize is not set here.
*/
-void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
+void SwLayoutFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorderAttrs *pAttrs )
{
- OSL_ENSURE( pAttrs, "LayoutFrm::Format, pAttrs is 0." );
+ OSL_ENSURE( pAttrs, "LayoutFrame::Format, pAttrs is 0." );
if ( mbValidPrtArea && mbValidSize )
return;
@@ -2938,7 +2938,7 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
const sal_uInt16 nRight = (sal_uInt16)pAttrs->CalcRight(this);
const sal_uInt16 nLower = pAttrs->CalcBottom();
- const bool bVert = IsVertical() && !IsPageFrm();
+ const bool bVert = IsVertical() && !IsPageFrame();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
if ( !mbValidPrtArea )
{
@@ -2952,7 +2952,7 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
if ( !HasFixSize() )
{
const SwTwips nBorder = nUpper + nLower;
- const SwFormatFrmSize &rSz = GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ? rSz.GetHeight() : 0;
do
{ mbValidSize = true;
@@ -2960,22 +2960,22 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
//The size in VarSize is calculated using the content plus the
// borders.
SwTwips nRemaining = 0;
- SwFrm *pFrm = Lower();
- while ( pFrm )
- { nRemaining += (pFrm->Frm().*fnRect->fnGetHeight)();
- if( pFrm->IsTextFrm() && static_cast<SwTextFrm*>(pFrm)->IsUndersized() )
- // This TextFrm would like to be a bit bigger
- nRemaining += static_cast<SwTextFrm*>(pFrm)->GetParHeight()
- - (pFrm->Prt().*fnRect->fnGetHeight)();
- else if( pFrm->IsSctFrm() && static_cast<SwSectionFrm*>(pFrm)->IsUndersized() )
- nRemaining += static_cast<SwSectionFrm*>(pFrm)->Undersize();
- pFrm = pFrm->GetNext();
+ SwFrame *pFrame = Lower();
+ while ( pFrame )
+ { nRemaining += (pFrame->Frame().*fnRect->fnGetHeight)();
+ if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsUndersized() )
+ // This TextFrame would like to be a bit bigger
+ nRemaining += static_cast<SwTextFrame*>(pFrame)->GetParHeight()
+ - (pFrame->Prt().*fnRect->fnGetHeight)();
+ else if( pFrame->IsSctFrame() && static_cast<SwSectionFrame*>(pFrame)->IsUndersized() )
+ nRemaining += static_cast<SwSectionFrame*>(pFrame)->Undersize();
+ pFrame = pFrame->GetNext();
}
nRemaining += nBorder;
nRemaining = std::max( nRemaining, nMinHeight );
- const SwTwips nDiff = nRemaining-(Frm().*fnRect->fnGetHeight)();
- const long nOldLeft = (Frm().*fnRect->fnGetLeft)();
- const long nOldTop = (Frm().*fnRect->fnGetTop)();
+ const SwTwips nDiff = nRemaining-(Frame().*fnRect->fnGetHeight)();
+ const long nOldLeft = (Frame().*fnRect->fnGetLeft)();
+ const long nOldTop = (Frame().*fnRect->fnGetTop)();
if ( nDiff )
{
if ( nDiff > 0 )
@@ -2986,12 +2986,12 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
MakePos();
}
//Don't exceed the bottom edge of the Upper.
- if ( GetUpper() && (Frm().*fnRect->fnGetHeight)() )
+ if ( GetUpper() && (Frame().*fnRect->fnGetHeight)() )
{
const SwTwips nLimit = (GetUpper()->*fnRect->fnGetPrtBottom)();
if( (this->*fnRect->fnSetLimit)( nLimit ) &&
- nOldLeft == (Frm().*fnRect->fnGetLeft)() &&
- nOldTop == (Frm().*fnRect->fnGetTop)() )
+ nOldLeft == (Frame().*fnRect->fnGetLeft)() &&
+ nOldTop == (Frame().*fnRect->fnGetTop)() )
mbValidSize = mbValidPrtArea = true;
}
} while ( !mbValidSize );
@@ -2999,8 +2999,8 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
else if (GetType() & FRM_HEADFOOT)
{
do
- { if ( Frm().Height() != pAttrs->GetSize().Height() )
- ChgSize( Size( Frm().Width(), pAttrs->GetSize().Height()));
+ { if ( Frame().Height() != pAttrs->GetSize().Height() )
+ ChgSize( Size( Frame().Width(), pAttrs->GetSize().Height()));
mbValidSize = true;
MakePos();
} while ( !mbValidSize );
@@ -3018,30 +3018,30 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
}
}
-static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
+static void InvaPercentFlys( SwFrame *pFrame, SwTwips nDiff )
{
- OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" );
- for ( size_t i = 0; i < pFrm->GetDrawObjs()->size(); ++i )
+ OSL_ENSURE( pFrame->GetDrawObjs(), "Can't find any Objects" );
+ for ( size_t i = 0; i < pFrame->GetDrawObjs()->size(); ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- const SwFormatFrmSize &rSz = pFly->GetFormat()->GetFrmSize();
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ const SwFormatFrameSize &rSz = pFly->GetFormat()->GetFrameSize();
if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() )
{
bool bNotify = true;
// If we've a fly with more than 90% relative height...
- if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrm() &&
- rSz.GetHeightPercent() != SwFormatFrmSize::SYNCED && nDiff )
+ if( rSz.GetHeightPercent() > 90 && pFly->GetAnchorFrame() &&
+ rSz.GetHeightPercent() != SwFormatFrameSize::SYNCED && nDiff )
{
- const SwFrm *pRel = pFly->IsFlyLayFrm() ? pFly->GetAnchorFrm():
- pFly->GetAnchorFrm()->GetUpper();
+ const SwFrame *pRel = pFly->IsFlyLayFrame() ? pFly->GetAnchorFrame():
+ pFly->GetAnchorFrame()->GetUpper();
// ... and we have already more than 90% height and we
// not allow the text to go through...
// then a notifycation could cause an endless loop, e.g.
// 100% height and no text wrap inside a cell of a table.
- if( pFly->Frm().Height()*10 >
+ if( pFly->Frame().Height()*10 >
( nDiff + pRel->Prt().Height() )*9 &&
pFly->GetFormat()->GetSurround().GetSurround() !=
SURROUND_THROUGHT )
@@ -3054,47 +3054,47 @@ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff )
}
}
-void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff )
+void SwLayoutFrame::InvaPercentLowers( SwTwips nDiff )
{
if ( GetDrawObjs() )
::InvaPercentFlys( this, nDiff );
- SwFrm *pFrm = ContainsContent();
- if ( pFrm )
+ SwFrame *pFrame = ContainsContent();
+ if ( pFrame )
do
{
- if ( pFrm->IsInTab() && !IsTabFrm() )
+ if ( pFrame->IsInTab() && !IsTabFrame() )
{
- SwFrm *pTmp = pFrm->FindTabFrm();
- OSL_ENSURE( pTmp, "Where's my TabFrm?" );
+ SwFrame *pTmp = pFrame->FindTabFrame();
+ OSL_ENSURE( pTmp, "Where's my TabFrame?" );
if( IsAnLower( pTmp ) )
- pFrm = pTmp;
+ pFrame = pTmp;
}
- if ( pFrm->IsTabFrm() )
+ if ( pFrame->IsTabFrame() )
{
- const SwFormatFrmSize &rSz = static_cast<SwLayoutFrm*>(pFrm)->GetFormat()->GetFrmSize();
+ const SwFormatFrameSize &rSz = static_cast<SwLayoutFrame*>(pFrame)->GetFormat()->GetFrameSize();
if ( rSz.GetWidthPercent() || rSz.GetHeightPercent() )
- pFrm->InvalidatePrt();
+ pFrame->InvalidatePrt();
}
- else if ( pFrm->GetDrawObjs() )
- ::InvaPercentFlys( pFrm, nDiff );
- pFrm = pFrm->FindNextCnt();
- } while ( pFrm && IsAnLower( pFrm ) ) ;
+ else if ( pFrame->GetDrawObjs() )
+ ::InvaPercentFlys( pFrame, nDiff );
+ pFrame = pFrame->FindNextCnt();
+ } while ( pFrame && IsAnLower( pFrame ) ) ;
}
-long SwLayoutFrm::CalcRel( const SwFormatFrmSize &rSz, bool ) const
+long SwLayoutFrame::CalcRel( const SwFormatFrameSize &rSz, bool ) const
{
long nRet = rSz.GetWidth(),
nPercent = rSz.GetWidthPercent();
if ( nPercent )
{
- const SwFrm *pRel = GetUpper();
+ const SwFrame *pRel = GetUpper();
long nRel = LONG_MAX;
- const SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ const SwViewShell *pSh = getRootFrame()->GetCurrShell();
const bool bBrowseMode = pSh && pSh->GetViewOptions()->getBrowseMode();
- if( pRel->IsPageBodyFrm() && pSh && bBrowseMode && pSh->VisArea().Width() )
+ if( pRel->IsPageBodyFrame() && pSh && bBrowseMode && pSh->VisArea().Width() )
{
nRel = pSh->GetBrowseWidth();
long nDiff = nRel - pRel->Prt().Width();
@@ -3107,68 +3107,68 @@ long SwLayoutFrm::CalcRel( const SwFormatFrmSize &rSz, bool ) const
return nRet;
}
-// Local helpers for SwLayoutFrm::FormatWidthCols()
+// Local helpers for SwLayoutFrame::FormatWidthCols()
-static long lcl_CalcMinColDiff( SwLayoutFrm *pLayFrm )
+static long lcl_CalcMinColDiff( SwLayoutFrame *pLayFrame )
{
long nDiff = 0, nFirstDiff = 0;
- SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(pLayFrm->Lower());
+ SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(pLayFrame->Lower());
OSL_ENSURE( pCol, "Where's the columnframe?" );
- SwFrm *pFrm = pCol->Lower();
+ SwFrame *pFrame = pCol->Lower();
do
{
- if( pFrm && pFrm->IsBodyFrm() )
- pFrm = static_cast<SwBodyFrm*>(pFrm)->Lower();
- if ( pFrm && pFrm->IsTextFrm() )
+ if( pFrame && pFrame->IsBodyFrame() )
+ pFrame = static_cast<SwBodyFrame*>(pFrame)->Lower();
+ if ( pFrame && pFrame->IsTextFrame() )
{
- const long nTmp = static_cast<SwTextFrm*>(pFrm)->FirstLineHeight();
+ const long nTmp = static_cast<SwTextFrame*>(pFrame)->FirstLineHeight();
if ( nTmp != USHRT_MAX )
{
- if ( pCol == pLayFrm->Lower() )
+ if ( pCol == pLayFrame->Lower() )
nFirstDiff = nTmp;
else
nDiff = nDiff ? std::min( nDiff, nTmp ) : nTmp;
}
}
//Skip empty columns!
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
- while ( pCol && nullptr == (pFrm = pCol->Lower()) )
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
+ while ( pCol && nullptr == (pFrame = pCol->Lower()) )
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
- } while ( pFrm && pCol );
+ } while ( pFrame && pCol );
return nDiff ? nDiff : nFirstDiff ? nFirstDiff : 240;
}
-static bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay )
+static bool lcl_IsFlyHeightClipped( SwLayoutFrame *pLay )
{
- SwFrm *pFrm = pLay->ContainsContent();
- while ( pFrm )
+ SwFrame *pFrame = pLay->ContainsContent();
+ while ( pFrame )
{
- if ( pFrm->IsInTab() )
- pFrm = pFrm->FindTabFrm();
+ if ( pFrame->IsInTab() )
+ pFrame = pFrame->FindTabFrame();
- if ( pFrm->GetDrawObjs() )
+ if ( pFrame->GetDrawObjs() )
{
- const size_t nCnt = pFrm->GetDrawObjs()->size();
+ const size_t nCnt = pFrame->GetDrawObjs()->size();
for ( size_t i = 0; i < nCnt; ++i )
{
- SwAnchoredObject* pAnchoredObj = (*pFrm->GetDrawObjs())[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
if ( pFly->IsHeightClipped() &&
- ( !pFly->IsFlyFreeFrm() || pFly->GetPageFrm() ) )
+ ( !pFly->IsFlyFreeFrame() || pFly->GetPageFrame() ) )
return true;
}
}
}
- pFrm = pFrm->FindNextCnt();
+ pFrame = pFrame->FindNextCnt();
}
return false;
}
-void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
+void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
const SwTwips nBorder, const SwTwips nMinHeight )
{
//If there are columns involved, the size is adjusted using the last column.
@@ -3187,7 +3187,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
bool bEnd = false;
bool bBackLock = false;
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
SwViewShellImp *pImp = pSh ? pSh->Imp() : nullptr;
vcl::RenderContext* pRenderContext = pSh ? pSh->GetOut() : nullptr;
{
@@ -3223,10 +3223,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
long nMaximum;
bool bNoBalance = false;
SWRECTFN( this )
- if( IsSctFrm() )
+ if( IsSctFrame() )
{
- nMaximum = (Frm().*fnRect->fnGetHeight)() - nBorder +
- (Frm().*fnRect->fnBottomDist)(
+ nMaximum = (Frame().*fnRect->fnGetHeight)() - nBorder +
+ (Frame().*fnRect->fnBottomDist)(
(GetUpper()->*fnRect->fnGetPrtBottom)() );
nMaximum += GetUpper()->Grow( LONG_MAX, true );
if( nMaximum < nMinimum )
@@ -3239,31 +3239,31 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if( nMaximum > BROWSE_HEIGHT )
nMaximum = BROWSE_HEIGHT;
- bNoBalance = static_cast<SwSectionFrm*>(this)->GetSection()->GetFormat()->
+ bNoBalance = static_cast<SwSectionFrame*>(this)->GetSection()->GetFormat()->
GetBalancedColumns().GetValue();
- SwFrm* pAny = ContainsAny();
+ SwFrame* pAny = ContainsAny();
if( bNoBalance ||
- ( !(Frm().*fnRect->fnGetHeight)() && pAny ) )
+ ( !(Frame().*fnRect->fnGetHeight)() && pAny ) )
{
long nTop = (this->*fnRect->fnGetTopMargin)();
// #i23129# - correction
// to the calculated maximum height.
- (Frm().*fnRect->fnAddBottom)( nMaximum -
- (Frm().*fnRect->fnGetHeight)() );
+ (Frame().*fnRect->fnAddBottom)( nMaximum -
+ (Frame().*fnRect->fnGetHeight)() );
if( nTop > nMaximum )
nTop = nMaximum;
(this->*fnRect->fnSetYMargins)( nTop, 0 );
}
- if( !pAny && !static_cast<SwSectionFrm*>(this)->IsFootnoteLock() )
+ if( !pAny && !static_cast<SwSectionFrame*>(this)->IsFootnoteLock() )
{
- SwFootnoteContFrm* pFootnoteCont = static_cast<SwSectionFrm*>(this)->ContainsFootnoteCont();
+ SwFootnoteContFrame* pFootnoteCont = static_cast<SwSectionFrame*>(this)->ContainsFootnoteCont();
if( pFootnoteCont )
{
- SwFrm* pFootnoteAny = pFootnoteCont->ContainsAny();
+ SwFrame* pFootnoteAny = pFootnoteCont->ContainsAny();
if( pFootnoteAny && pFootnoteAny->IsValid() )
{
bBackLock = true;
- static_cast<SwSectionFrm*>(this)->SetFootnoteLock( true );
+ static_cast<SwSectionFrame*>(this)->SetFootnoteLock( true );
}
}
}
@@ -3273,15 +3273,15 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// #i3317# - reset temporarly consideration
// of wrapping style influence
- SwPageFrm* pPageFrm = FindPageFrm();
- SwSortedObjs* pObjs = pPageFrm ? pPageFrm->GetSortedObjs() : nullptr;
+ SwPageFrame* pPageFrame = FindPageFrame();
+ SwSortedObjs* pObjs = pPageFrame ? pPageFrame->GetSortedObjs() : nullptr;
if ( pObjs )
{
for ( size_t i = 0; i < pObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
- if ( IsAnLower( pAnchoredObj->GetAnchorFrm() ) )
+ if ( IsAnLower( pAnchoredObj->GetAnchorFrame() ) )
{
pAnchoredObj->SetTmpConsiderWrapInfluence( false );
}
@@ -3291,13 +3291,13 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
{
//Could take a while therefore check for Waitcrsr here.
if ( pImp )
- pImp->CheckWaitCrsr();
+ pImp->CheckWaitCursor();
mbValidSize = true;
//First format the column as this will relieve the stack a bit.
//Also set width and height of the column (if they are wrong)
//while we are at it.
- SwLayoutFrm *pCol = static_cast<SwLayoutFrm*>(Lower());
+ SwLayoutFrame *pCol = static_cast<SwLayoutFrame*>(Lower());
// #i27399#
// Simply setting the column width based on the values returned by
@@ -3307,16 +3307,16 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
for ( sal_uInt16 i = 0; i < nNumCols; ++i )
{
pCol->Calc(pRenderContext);
- // ColumnFrms have a BodyFrm now, which needs to be calculated
+ // ColumnFrames have a BodyFrame now, which needs to be calculated
pCol->Lower()->Calc(pRenderContext);
if( pCol->Lower()->GetNext() )
pCol->Lower()->GetNext()->Calc(pRenderContext); // SwFootnoteCont
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
}
::CalcContent( this );
- pCol = static_cast<SwLayoutFrm*>(Lower());
+ pCol = static_cast<SwLayoutFrame*>(Lower());
OSL_ENSURE( pCol && pCol->GetNext(), ":-( column making holidays?");
// set bMinDiff if no empty columns exist
bool bMinDiff = true;
@@ -3324,9 +3324,9 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
while ( bMinDiff && pCol )
{
bMinDiff = nullptr != pCol->ContainsContent();
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
}
- pCol = static_cast<SwLayoutFrm*>(Lower());
+ pCol = static_cast<SwLayoutFrame*>(Lower());
// OD 28.03.2003 #108446# - initialize local variable
SwTwips nDiff = 0;
SwTwips nMaxFree = 0;
@@ -3335,8 +3335,8 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
bool bFoundLower = false;
while( pCol )
{
- SwLayoutFrm* pLay = static_cast<SwLayoutFrm*>(pCol->Lower());
- SwTwips nInnerHeight = (pLay->Frm().*fnRect->fnGetHeight)() -
+ SwLayoutFrame* pLay = static_cast<SwLayoutFrame*>(pCol->Lower());
+ SwTwips nInnerHeight = (pLay->Frame().*fnRect->fnGetHeight)() -
(pLay->Prt().*fnRect->fnGetHeight)();
if( pLay->Lower() )
{
@@ -3349,10 +3349,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if( pLay->GetNext() )
{
bFoundLower = true;
- pLay = static_cast<SwLayoutFrm*>(pLay->GetNext());
- OSL_ENSURE( pLay->IsFootnoteContFrm(),"FootnoteContainer expected" );
+ pLay = static_cast<SwLayoutFrame*>(pLay->GetNext());
+ OSL_ENSURE( pLay->IsFootnoteContFrame(),"FootnoteContainer expected" );
nInnerHeight += pLay->InnerHeight();
- nInnerHeight += (pLay->Frm().*fnRect->fnGetHeight)() -
+ nInnerHeight += (pLay->Frame().*fnRect->fnGetHeight)() -
(pLay->Prt().*fnRect->fnGetHeight)();
}
nInnerHeight -= (pCol->Prt().*fnRect->fnGetHeight)();
@@ -3368,10 +3368,10 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if( nAllFree > -nInnerHeight )
nAllFree = -nInnerHeight;
}
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
}
- if ( bFoundLower || ( IsSctFrm() && static_cast<SwSectionFrm*>(this)->HasFollow() ) )
+ if ( bFoundLower || ( IsSctFrame() && static_cast<SwSectionFrame*>(this)->HasFollow() ) )
{
SwTwips nMinDiff = ::lcl_CalcMinColDiff( this );
// Here we decide if growing is needed - this is the case, if
@@ -3379,7 +3379,7 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// In sections with columns we take into account to set the size
// when having a non-empty Follow.
if ( nDiff || ::lcl_IsFlyHeightClipped( this ) ||
- ( IsSctFrm() && static_cast<SwSectionFrm*>(this)->CalcMinDiff( nMinDiff ) ) )
+ ( IsSctFrame() && static_cast<SwSectionFrame*>(this)->CalcMinDiff( nMinDiff ) ) )
{
long nPrtHeight = (Prt().*fnRect->fnGetHeight)();
// The minimum must not be smaller than our PrtHeight as
@@ -3400,11 +3400,11 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
if ( bMinDiff )
{ // If no empty column exists, we want to grow at least
// by nMinDiff. Special case: If we are smaller than the
- // minimal FrmHeight and PrtHeight is smaller than
+ // minimal FrameHeight and PrtHeight is smaller than
// nMindiff we grow in a way that PrtHeight is exactly
// nMinDiff afterwards.
- long nFrmHeight = (Frm().*fnRect->fnGetHeight)();
- if ( nFrmHeight > nMinHeight || nPrtHeight >= nMinDiff )
+ long nFrameHeight = (Frame().*fnRect->fnGetHeight)();
+ if ( nFrameHeight > nMinHeight || nPrtHeight >= nMinDiff )
nDiff = std::max( nDiff, nMinDiff );
else if( nDiff < nMinDiff )
nDiff = nMinDiff - nPrtHeight + 1;
@@ -3455,13 +3455,13 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
Size aOldSz( Prt().SSize() );
long nTop = (this->*fnRect->fnGetTopMargin)();
nDiff = (Prt().*fnRect->fnGetHeight)() + nDiff + nBorder -
- (Frm().*fnRect->fnGetHeight)();
- (Frm().*fnRect->fnAddBottom)( nDiff );
+ (Frame().*fnRect->fnGetHeight)();
+ (Frame().*fnRect->fnAddBottom)( nDiff );
// #i68520#
- SwFlyFrm *pFlyFrm = dynamic_cast<SwFlyFrm*>(this);
- if (pFlyFrm)
+ SwFlyFrame *pFlyFrame = dynamic_cast<SwFlyFrame*>(this);
+ if (pFlyFrame)
{
- pFlyFrm->InvalidateObjRectWithSpaces();
+ pFlyFrame->InvalidateObjRectWithSpaces();
}
(this->*fnRect->fnSetYMargins)( nTop, nBorder - nTop );
ChgLowersProp( aOldSz );
@@ -3469,37 +3469,37 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// #i3317# - reset temporarly consideration
// of wrapping style influence
- SwPageFrm* pTmpPageFrm = FindPageFrm();
- SwSortedObjs* pTmpObjs = pTmpPageFrm ? pTmpPageFrm->GetSortedObjs() : nullptr;
+ SwPageFrame* pTmpPageFrame = FindPageFrame();
+ SwSortedObjs* pTmpObjs = pTmpPageFrame ? pTmpPageFrame->GetSortedObjs() : nullptr;
if ( pTmpObjs )
{
for ( size_t i = 0; i < pTmpObjs->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pTmpObjs)[i];
- if ( IsAnLower( pAnchoredObj->GetAnchorFrm() ) )
+ if ( IsAnLower( pAnchoredObj->GetAnchorFrame() ) )
{
pAnchoredObj->SetTmpConsiderWrapInfluence( false );
}
}
}
- //Invalidate suitable to nicely balance the Frms.
+ //Invalidate suitable to nicely balance the Frames.
//- Every first one after the second column gets a
// InvalidatePos();
- pCol = static_cast<SwLayoutFrm*>(Lower()->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(Lower()->GetNext());
while ( pCol )
{
- SwFrm *pLow = pCol->Lower();
+ SwFrame *pLow = pCol->Lower();
if ( pLow )
pLow->_InvalidatePos();
- pCol = static_cast<SwLayoutFrm*>(pCol->GetNext());
+ pCol = static_cast<SwLayoutFrame*>(pCol->GetNext());
}
- if( IsSctFrm() && static_cast<SwSectionFrm*>(this)->HasFollow() )
+ if( IsSctFrame() && static_cast<SwSectionFrame*>(this)->HasFollow() )
{
// If we created a Follow, we need to give its content
// the opportunity to flow back inside the CalcContent
- SwContentFrm* pTmpContent =
- static_cast<SwSectionFrm*>(this)->GetFollow()->ContainsContent();
+ SwContentFrame* pTmpContent =
+ static_cast<SwSectionFrame*>(this)->GetFollow()->ContainsContent();
if( pTmpContent )
pTmpContent->_InvalidatePos();
}
@@ -3515,23 +3515,23 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs,
// OD 01.04.2003 #108446# - Don't collect endnotes for sections. Thus, set
// 2nd parameter to <true>.
::CalcContent( this, true );
- if( IsSctFrm() )
+ if( IsSctFrame() )
{
// OD 14.03.2003 #i11760# - adjust 2nd parameter - sal_True --> true
::CalcContent( this, true );
if( bBackLock )
- static_cast<SwSectionFrm*>(this)->SetFootnoteLock( false );
+ static_cast<SwSectionFrame*>(this)->SetFootnoteLock( false );
}
}
-static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
+static SwContentFrame* lcl_InvalidateSection( SwFrame *pCnt, sal_uInt8 nInv )
{
- SwSectionFrm* pSect = pCnt->FindSctFrm();
- // If our ContentFrm is placed inside a table or a footnote, only sections
+ SwSectionFrame* pSect = pCnt->FindSctFrame();
+ // If our ContentFrame is placed inside a table or a footnote, only sections
// which are also placed inside are meant.
// Exception: If a table is directly passed.
if( ( ( pCnt->IsInTab() && !pSect->IsInTab() ) ||
- ( pCnt->IsInFootnote() && !pSect->IsInFootnote() ) ) && !pCnt->IsTabFrm() )
+ ( pCnt->IsInFootnote() && !pSect->IsInFootnote() ) ) && !pCnt->IsTabFrame() )
return nullptr;
if( nInv & INV_SIZE )
pSect->_InvalidateSize();
@@ -3539,15 +3539,15 @@ static SwContentFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv )
pSect->_InvalidatePos();
if( nInv & INV_PRTAREA )
pSect->_InvalidatePrt();
- SwFlowFrm *pFoll = pSect->GetFollow();
+ SwFlowFrame *pFoll = pSect->GetFollow();
// Temporary separation from follow
pSect->SetFollow( nullptr );
- SwContentFrm* pRet = pSect->FindLastContent();
+ SwContentFrame* pRet = pSect->FindLastContent();
pSect->SetFollow( pFoll );
return pRet;
}
-static SwContentFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv )
+static SwContentFrame* lcl_InvalidateTable( SwTabFrame *pTable, sal_uInt8 nInv )
{
if( ( nInv & INV_SECTION ) && pTable->IsInSct() )
lcl_InvalidateSection( pTable, nInv );
@@ -3560,12 +3560,12 @@ static SwContentFrm* lcl_InvalidateTable( SwTabFrm *pTable, sal_uInt8 nInv )
return pTable->FindLastContent();
}
-static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv );
+static void lcl_InvalidateAllContent( SwContentFrame *pCnt, sal_uInt8 nInv );
-static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
+static void lcl_InvalidateContent( SwContentFrame *pCnt, sal_uInt8 nInv )
{
- SwContentFrm *pLastTabCnt = nullptr;
- SwContentFrm *pLastSctCnt = nullptr;
+ SwContentFrame *pLastTabCnt = nullptr;
+ SwContentFrame *pLastSctCnt = nullptr;
while ( pCnt )
{
if( nInv & INV_SECTION )
@@ -3587,8 +3587,8 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
{
if( pCnt->IsInTab() )
{
- // To not call FindTabFrm() for each ContentFrm of a table and
- // then invalidate the table, we remember the last ContentFrm of
+ // To not call FindTabFrame() for each ContentFrame of a table and
+ // then invalidate the table, we remember the last ContentFrame of
// the table and ignore IsInTab() until we are past it.
// When entering the table, LastSctCnt is set to null, so
// sections inside the table are correctly invalidated.
@@ -3596,7 +3596,7 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
// invalidation is done three times, which is acceptable.
if( !pLastTabCnt )
{
- pLastTabCnt = lcl_InvalidateTable( pCnt->FindTabFrm(), nInv );
+ pLastTabCnt = lcl_InvalidateTable( pCnt->FindTabFrame(), nInv );
pLastSctCnt = nullptr;
}
if( pLastTabCnt == pCnt )
@@ -3621,20 +3621,20 @@ static void lcl_InvalidateContent( SwContentFrm *pCnt, sal_uInt8 nInv )
pCnt->InvalidateLineNum();
if ( pCnt->GetDrawObjs() )
lcl_InvalidateAllContent( pCnt, nInv );
- pCnt = pCnt->GetNextContentFrm();
+ pCnt = pCnt->GetNextContentFrame();
}
}
-static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv )
+static void lcl_InvalidateAllContent( SwContentFrame *pCnt, sal_uInt8 nInv )
{
SwSortedObjs &rObjs = *pCnt->GetDrawObjs();
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
- if ( pFly->IsFlyInCntFrm() )
+ SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
+ if ( pFly->IsFlyInContentFrame() )
{
::lcl_InvalidateContent( pFly->ContainsContent(), nInv );
if( nInv & INV_DIRECTION )
@@ -3644,10 +3644,10 @@ static void lcl_InvalidateAllContent( SwContentFrm *pCnt, sal_uInt8 nInv )
}
}
-void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv )
+void SwRootFrame::InvalidateAllContent( sal_uInt8 nInv )
{
- // First process all page bound FlyFrms.
- SwPageFrm *pPage = static_cast<SwPageFrm*>(Lower());
+ // First process all page bound FlyFrames.
+ SwPageFrame *pPage = static_cast<SwPageFrame*>(Lower());
while( pPage )
{
pPage->InvalidateFlyLayout();
@@ -3663,9 +3663,9 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv )
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
- if ( dynamic_cast< const SwFlyFrm *>( pAnchoredObj ) != nullptr )
+ if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
- SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pAnchoredObj);
+ SwFlyFrame* pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
::lcl_InvalidateContent( pFly->ContainsContent(), nInv );
if ( nInv & INV_DIRECTION )
pFly->CheckDirChange();
@@ -3674,7 +3674,7 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv )
}
if( nInv & INV_DIRECTION )
pPage->CheckDirChange();
- pPage = static_cast<SwPageFrm*>(pPage->GetNext());
+ pPage = static_cast<SwPageFrame*>(pPage->GetNext());
}
//Invalidate the whole document content and the character bound Flys here.
@@ -3682,9 +3682,9 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv )
if( nInv & INV_PRTAREA )
{
- SwViewShell *pSh = getRootFrm()->GetCurrShell();
+ SwViewShell *pSh = getRootFrame()->GetCurrShell();
if( pSh )
- pSh->InvalidateWindows( Frm() );
+ pSh->InvalidateWindows( Frame() );
}
}
@@ -3692,16 +3692,16 @@ void SwRootFrm::InvalidateAllContent( sal_uInt8 nInv )
* Invalidate/re-calculate the position of all floating screen objects (Writer fly frames and
* drawing objects), that are anchored to paragraph or to character. (2004-03-16 #i11860#)
*/
-void SwRootFrm::InvalidateAllObjPos()
+void SwRootFrame::InvalidateAllObjPos()
{
- const SwPageFrm* pPageFrm = static_cast<const SwPageFrm*>(Lower());
- while( pPageFrm )
+ const SwPageFrame* pPageFrame = static_cast<const SwPageFrame*>(Lower());
+ while( pPageFrame )
{
- pPageFrm->InvalidateFlyLayout();
+ pPageFrame->InvalidateFlyLayout();
- if ( pPageFrm->GetSortedObjs() )
+ if ( pPageFrame->GetSortedObjs() )
{
- const SwSortedObjs& rObjs = *(pPageFrm->GetSortedObjs());
+ const SwSortedObjs& rObjs = *(pPageFrame->GetSortedObjs());
for ( size_t i = 0; i < rObjs.size(); ++i )
{
SwAnchoredObject* pAnchoredObj = rObjs[i];
@@ -3721,7 +3721,7 @@ void SwRootFrm::InvalidateAllObjPos()
}
}
- pPageFrm = static_cast<const SwPageFrm*>(pPageFrm->GetNext());
+ pPageFrame = static_cast<const SwPageFrame*>(pPageFrame->GetNext());
}
}