31#include <osl/diagnose.h>
33#define LOOP_DETECT 250
65 OSL_ENSURE( pSct,
"CollectEndnotes: Which section?" );
90 pCnt->
Paste( pFootnote );
97 "Endnote without content?" );
111 if( pEndFootnote->GetAttr() == pFootnote->
GetAttr() )
133 "InsertEndnotes: Where's my column?" );
183#if OSL_DEBUG_LEVEL > 1
184 static bool bNoLouie =
false;
195 if (nNew < mnMaxPage && pPage->GetNext())
245 SAL_WARN(
"sw.layout",
"Looping Louie (Light): Fixating fractious frame");
265 assert(pDoc &&
"No doc, no fun");
277 ( pLayouter->
mpEndnoter->GetSect()->IsAnFollow( pSect ) ||
278 pSect->IsAnFollow( pLayouter->
mpEndnoter->GetSect() ) ) )
310 const sal_uInt32 _nToPageNum )
314 const_cast<SwDoc&
>(_rDoc).getIDocumentLayoutAccess().SetLayouter(
new SwLayouter() );
319 const_cast<SwDoc&
>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpMovedFwdFrames.reset(
340 sal_uInt32& _ornToPageNum )
394 const_cast<SwDoc&
>(_rDoc).getIDocumentLayoutAccess().SetLayouter(
new SwLayouter() );
399 const_cast<SwDoc&
>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->mpObjsTmpConsiderWrapInfl.reset(
427 const_cast<SwDoc&
>(rDoc).getIDocumentLayoutAccess().GetLayouter()->LoopingLouieLight( rDoc, rTextFrame );
434 const SwFlowFrame& p_rFlowFrame,
437 bool bMoveBwdSuppressed(
false );
441 const_cast<SwDoc&
>(p_rDoc).getIDocumentLayoutAccess().SetLayouter(
new SwLayouter() );
446 aMoveBwdLayoutInfo.
mnFrameId = p_rFlowFrame.GetFrame().GetFrameId();
453 while ( pLastLower && pLastLower->
GetNext() )
455 pLastLower = pLastLower->
GetNext();
463 const sal_uInt16 cMoveBwdCountSuppressThreshold = 20;
464 if ( ++
const_cast<SwDoc&
>(p_rDoc).getIDocumentLayoutAccess().GetLayouter()->
maMoveBwdLayoutInfo[ aMoveBwdLayoutInfo ] >
465 cMoveBwdCountSuppressThreshold )
467 bMoveBwdSuppressed =
true;
470 return bMoveBwdSuppressed;
476 const_cast<SwDoc&
>(_rDoc).getIDocumentLayoutAccess().GetLayouter()->maMoveBwdLayoutInfo.clear();
virtual void SetLayouter(SwLayouter *pNew)=0
virtual SwLayouter * GetLayouter()=0
wrapper class for the positioning of Writer fly frames and drawing objects
const SwDoc * GetDoc() const
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
void CollectEndnote(SwFootnoteFrame *pFootnote)
std::unique_ptr< SwFootnoteFrames > m_pEndArr
void CollectEndnotes(SwSectionFrame *pSct)
const SwSectionFrame * GetSect() const
SwEndnoter(SwLayouter *pLay)
const SwRect & getFrameArea() const
Base class of the Writer layout elements.
void ValidateThisAndAllLowers(const sal_uInt16 nStage)
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
SwLayoutFrame * GetUpper()
bool IsFootnoteBossFrame() const
SwPageFrame * FindPageFrame()
SwFootnoteBossFrame * FindFootnoteBossFrame(bool bFootnotes=false)
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
const SwFrame * ContainsAny(const bool _bInvestigateFootnoteForSections=false) const
Method <ContainsAny()> doesn't investigate content of footnotes by default.
const SwFrame * Lower() const
std::unordered_map< tMoveBwdLayoutInfoKey, sal_uInt16, fMoveBwdLayoutInfoKeyHash, fMoveBwdLayoutInfoKeyEq > maMoveBwdLayoutInfo
static bool DoesRowContainMovedFwdFrame(const SwDoc &_rDoc, const SwRowFrame &_rRowFrame)
void LoopingLouieLight(const SwDoc &rDoc, const SwTextFrame &rFrame)
static bool StartLoopControl(SwDoc *pDoc, SwPageFrame const *pPage)
static void InsertMovedFwdFrame(const SwDoc &_rDoc, const SwTextFrame &_rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum)
std::unique_ptr< SwObjsMarkedAsTmpConsiderWrapInfluence > mpObjsTmpConsiderWrapInfl
static void ClearMovedFwdFrames(const SwDoc &_rDoc)
static void ClearMoveBwdLayoutInfo(const SwDoc &p_rDoc)
void InsertEndnotes(SwSectionFrame const *pSect)
static bool FrameMovedFwdByObjPos(const SwDoc &_rDoc, const SwTextFrame &_rTextFrame, sal_uInt32 &_ornToPageNum)
static void RemoveObjForTmpConsiderWrapInfluence(const SwDoc &_rDoc, SwAnchoredObject &_rAnchoredObj)
bool StartLooping(SwPageFrame const *pPage)
static void ClearObjsTmpConsiderWrapInfluence(const SwDoc &_rDoc)
std::unique_ptr< SwLooping > mpLooping
static void RemoveMovedFwdFrame(const SwDoc &_rDoc, const SwTextFrame &_rTextFrame)
std::unique_ptr< SwEndnoter > mpEndnoter
static void InsertObjForTmpConsiderWrapInfluence(const SwDoc &_rDoc, SwAnchoredObject &_rAnchoredObj)
static bool Collecting(SwDoc *pDoc, SwSectionFrame const *pSect, SwFootnoteFrame *pFootnote)
std::unique_ptr< SwMovedFwdFramesByObjPos > mpMovedFwdFrames
static bool MoveBwdSuppressed(const SwDoc &p_rDoc, const SwFlowFrame &p_rFlowFrame, const SwLayoutFrame &p_rNewUpperFrame)
void LoopControl(SwPageFrame *pPage)
void CollectEndnotes_(SwSectionFrame *pSect)
void CollectEndnote(SwFootnoteFrame *pFootnote)
static void CollectEndnotes(SwDoc *pDoc, SwSectionFrame *pSect)
SwLooping(SwPageFrame const *pPage)
void Drastic(SwFrame *pFrame)
void Control(SwPageFrame *pPage)
bool IsLoopingLouieLight() const
sal_uInt16 mnLoopControlStage
A page of the document layout.
sal_uInt16 GetPhyPageNum() const
tools::Long GetHeight(const SwRect &rRect) const
tools::Long BottomDist(const SwRect &rRect, tools::Long nPos) const
tools::Long GetPrtBottom(const SwFrame &rFrame) const
void Height(tools::Long nNew)
void Pos(const Point &rNew)
void Width(tools::Long nNew)
SwRowFrame is one table row in the document layout.
void CollectEndnotes(SwLayouter *pLayouter)
SwContentFrame * FindLastContent(SwFindMode nMode=SwFindMode::None)
Represents the visualization of a paragraph.
std::vector< SwFootnoteFrame * > SwFootnoteFrames
void LOOPING_LOUIE_LIGHT(bool bCondition, const SwTextFrame &rTextFrame)
#define SAL_WARN(area, stream)
SwTwips mnFreeSpaceInNewUpper