52 OSL_ENSURE( !pFrame->IsFollow() || !pFrame->
GetPrev() ||
54 "IsNastyFollow: What is going on here?" );
55 return pFrame->IsFollow() && pFrame->
GetPrev();
61 : m_nRstHeight(nRst), m_pFrame(pNewFrame)
132 SwTwips nDiff = nHeight - nLineHeight;
154 while (pContent->HasFollow())
161 ::std::set<SwContentFrame const*> nextFrames;
162 while (pBoss->IsAnLower(pContent))
164 nextFrames.insert(pContent);
169 pFootnote !=
nullptr;
173 if (nextFrames.find(pAnchor) != nextFrames.end())
175 nNextFootnotes += aRectFnSet.
GetHeight(pFootnote->getFrameArea());
178 bFit = 0 <= nDiff + nNextFootnotes;
179 SAL_INFO_IF(bFit,
"sw.core",
"no text frame break because ignoring "
180 << nNextFootnotes <<
" footnote height");
194 bFit = nHeight >= nLineHeight;
203 nHeight +=
m_pFrame->CalcAddLowerSpaceAsLastInTableCell();
204 bFit = nHeight >= nLineHeight;
217 bFit = nHeight >= nLineHeight;
262 if( !pTmp || !pTmp->
Lower() )
277 if ( aRectFnSet.
IsVert() )
314 if ( rOrph.GetValue() > 1 )
324 bool bResetFlags =
false;
326 bool bWordTableCell =
false;
345 if (
static_cast<const SwRowFrame*
>(pTmpFrame)->IsRowSplitAllowed() )
382 OSL_ENSURE(
m_pFrame == pFrame,
"<WidowsAndOrphans::FindBreak> - pFrame != pFrame" );
411 ( ( bHasToFit && bRet ) ||
IsBreakNow( rLine ) ) )
431 "WidowsAndOrphans::FindWidows with swapped frame" );
440 OSL_ENSURE(pMaster,
"+WidowsAndOrphans::FindWidows: Widows in a master?");
456 if ( aRectFnSet.
IsVert() )
464 const SwTwips nChg = aRectFnSet.
YDiff( nTmpY, nDocPrtTop + nOldHeight );
483 if ( nTmpRstHeight >=
538 if(nLines == 0 && pMaster->
HasPara())
541 if(pMasterPara && pMasterPara->
GetNext())
544 if( nLines <= nNeed )
560 if (nLines <=
static_cast<sal_Int32
>(rOrph.GetValue()))
582 OSL_ENSURE( !rLine.
GetNext(),
"WouldFit: aLine::Bottom missed!" );
587 if ( nLineCnt < nMinLines )
594 bool hasNonFly(!bMoveBwd);
595 while (nMinLines > rLine.
GetLineNr() || !hasNonFly)
608 switch (pPortion->GetWhichPor())
648 if( rMaxHeight >= nLineSum )
650 rMaxHeight -= nLineSum;
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
bool MaybeHasHints() const
const SvxFormatSplitItem & GetSplit(bool=true) const
const SvxWidowsItem & GetWidows(bool=true) const
const SvxFormatKeepItem & GetKeep(bool=true) const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
const SwContentFrame * GetFollow() const
SwContentFrame * GetNextContentFrame() const
SwTextFrame * FindMaster() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
IDocumentSettingAccess const & getIDocumentSettingAccess() const
const SwRect & getFrameArea() const
const SwRect & getFramePrintArea() const
Base class of the Writer layout elements.
SwFrame * GetIndPrev() const
SwSectionFrame * FindSctFrame()
bool IsColumnFrame() const
bool IsInFootnote() const
const SwRowFrame * IsInFollowFlowRow() const
bool IsMoveable(const SwLayoutFrame *_pLayoutFrame=nullptr) const
determine, if frame is moveable in given environment
SwLayoutFrame * GetNextCellLeaf()
SwLayoutFrame * GetUpper()
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
SwPageFrame * FindPageFrame()
SwFootnoteFrame * FindFootnoteFrame()
SwFootnoteBossFrame * FindFootnoteBossFrame(bool bFootnotes=false)
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
const SwFrame * Lower() const
SwLinePortion * GetFirstPortion() const
virtual void Height(const SwTwips nNew, const bool bText=true) override
Base class for anything that can be part of a line in the Writer layout.
SwLinePortion * GetNextPortion() const
A page of the document layout.
bool CheckPageHeightValidForHideWhitespace(SwTwips nDiff)
Is bottom-of-page-frame - bottom-of-text-frame difference valid in case whitespace is hidden?...
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
tools::Long GetHeight(const SwRect &rRect) const
tools::Long GetBottomMargin(const SwFrame &rFrame) const
tools::Long YDiff(tools::Long n1, tools::Long n2) const
tools::Long GetPrtTop(const SwFrame &rFrame) const
tools::Long BottomDist(const SwRect &rRect, tools::Long nPos) const
tools::Long GetPrtBottom(const SwFrame &rFrame) const
SwRowFrame is one table row in the document layout.
bool MoveAllowed(const SwFrame *) const
const SwFormatFootnote & GetFootnote() const
SwTextFrameBreak(SwTextFrame *pFrame, const SwTwips nRst=0)
bool IsBreakNow(SwTextMargin &rLine)
void SetRstHeight(const SwTextMargin &rLine)
bool IsInside(SwTextMargin const &rLine) const
BP 18.6.93: Widows.
Represents the visualization of a paragraph.
SwTextFrame * GetFollow()
bool IsEmptyWithSplitFly() const
This text frame is not split, doesn't fit the upper, has a single split fly anchored to it with a neg...
TextFrameIndex GetOffset() const
void RemoveFootnote(TextFrameIndex nStart, TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING))
Footnote.
SwParaPortion * GetPara()
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout.
void SetJustWidow(const bool bNew)
SwTwips GrowTst(const SwTwips nGrow)
Test grow.
sal_Int32 GetThisLines() const
virtual bool Prepare(const PrepareHint ePrep=PrepareHint::Clear, const void *pVoid=nullptr, bool bNotify=true) override
SwContentFrame: the shortcut for the Frames If the void* casts wrongly, it's its own fault!...
SwTwips GetFootnoteFrameHeight() const
SwTextNode const * GetTextNodeForParaProps() const
SwParaPortion * GetParaPortion()
const SwLineLayout * NextLine()
TextFrameIndex GetEnd() const
const SwLineLayout * GetNext() const
void TruncLines(bool bNoteFollow=false)
const SwLineLayout * PrevLine()
SwTwips GetLineHeight() const
const SwLineLayout * GetCurr() const
sal_Int32 GetLineNr() const
const SwLineLayout * GetPrev()
sal_uInt16 GetDropLines() const
SwTextSizeInfo & GetInfo()
sal_uInt16 GetOrphansLines() const
bool FindBreak(SwTextFrame *pFrame, SwTextMargin &rLine, bool bHasToFit)
The Find*-Methods do not only search, but adjust the SwTextMargin to the line where the paragraph sho...
bool FindWidows(SwTextFrame *pFrame, SwTextMargin &rLine)
FindWidows positions the SwTextMargin of the Master to the line where to break by examining and forma...
WidowsAndOrphans(SwTextFrame *pFrame, const SwTwips nRst=0, bool bCheckKeep=true)
bool IsBreakNowWidAndOrp(SwTextMargin &rLine)
bool WouldFit(SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest, bool bMoveBwd)
#define SAL_INFO_IF(condition, area, stream)
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
@ AdjustSizeWithoutFormatting