20#include <config_wasm_strip.h>
63 static sal_uInt16 s_nLevel;
65 FormatLevel() { ++s_nLevel; }
66 ~FormatLevel() { --s_nLevel; }
67 static sal_uInt16 GetLevel() {
return s_nLevel; }
68 static bool LastLevel() {
return 10 < s_nLevel; }
73sal_uInt16 FormatLevel::s_nLevel = 0;
105 pUp->
Calc(pRenderContext);
112 assert(
HasPara() &&
"ResetPreps(), missing ParaPortion, SwCache bug?");
131 pFrame->
Calc(pRenderContext);
134 const bool bOld =
static_cast<SwSectionFrame*
>(pFrame)->IsContentLocked();
136 pFrame->
Calc(pRenderContext);
156 OSL_ENSURE(
HasPara(),
"SwTextFrame::GetDropRect_: try again next year." );
161 rRect.
Top( aLine.
Y() );
182 OSL_ENSURE( HasFollow(),
"CalcFollow: missing Follow." );
194#if OSL_DEBUG_LEVEL > 0
203 bool bOldInvaContent =
true;
240 if( !FormatLevel::LastLevel() )
262 bool bIsFollowInColumn =
false;
264 while ( pFollowUpper )
268 bIsFollowInColumn =
true;
276 pFollowUpper = pFollowUpper->
GetUpper();
278 if ( bIsFollowInColumn )
284 pMyFollow->
Calc(pRenderContext);
286 OSL_ENSURE( !pMyFollow->
GetPrev(),
"SwTextFrame::CalcFollow: cheesy follow" );
290 pMyFollow->
Calc(pRenderContext);
291 OSL_ENSURE( !pMyFollow->
GetPrev(),
"SwTextFrame::CalcFollow: very cheesy follow" );
322 if ( pPage && !bOldInvaContent )
325#if OSL_DEBUG_LEVEL > 0
326 OSL_ENSURE( pOldUp ==
GetUpper(),
"SwTextFrame::CalcFollow: heavy follow" );
331 if ( nRemaining > 0 &&
332 nRemaining != ( aRectFnSet.
IsVert() ?
353 while (pMaster->IsFollow())
360 SwTextFrame* pFlyAnchor = pFly->FindAnchorCharFrame();
361 if (pFlyAnchor !=
this)
372 pFly->UnlockPosition();
391 && pRedln->
GetType() == RedlineType::Delete
407 SetUndersized( nChgHght == 0 || bHasToFit );
420 if( nChgHght && !bHasToFit )
425 if( nReal < nChgHght )
465 { pPre->
Calc(pRenderContext);
467 }
while ( pPre && pPre !=
this );
486 OSL_ENSURE( !
IsSwapped(),
"Swapped frame while calculating nRstHeight" );
512 OSL_ENSURE( nAdd >= 0,
"Ey" );
523 if( nRstHeight < nFrameHeight )
527 nRstHeight +=
GetUpper()->
Grow( nFrameHeight - nRstHeight );
531 if ( nRstHeight < nFrameHeight )
536 SetUndersized(
true );
540 SetUndersized(
false );
543 else if( nChgHeight )
545 if( nRstHeight - nFrameHeight < nChgHeight )
546 nChgHeight = nRstHeight - nFrameHeight;
563 CurrentPos -= aCharPos.
X();
574 css::style::TabStop ts;
580 case SvxTabAdjust::Left : ts.Alignment = css::style::TabAlign_LEFT;
break;
581 case SvxTabAdjust::Center : ts.Alignment = css::style::TabAlign_CENTER;
break;
582 case SvxTabAdjust::Right : ts.Alignment = css::style::TabAlign_RIGHT;
break;
583 case SvxTabAdjust::Decimal: ts.Alignment = css::style::TabAlign_DECIMAL;
break;
584 case SvxTabAdjust::Default: ts.Alignment = css::style::TabAlign_DEFAULT;
break;
605 if( HasFollow() && !(nMode & 1) && nOffset == nEnd )
612 SAL_INFO(
"sw.core",
"+SwTextFrame::JoinFrame: Follow is locked." );
674 OSL_ENSURE(
GetFollow(),
"+SwTextFrame::JoinFrame: no follow" );
692 if (pHt->GetFootnote().IsEndNote())
714 OSL_ENSURE( !pFoll->
HasFootnote(),
"Missing FootnoteFlag." );
725#if !ENABLE_WASM_STRIP_ACCESSIBILITY
728 if ( pViewShell && pViewShell->
GetLayout() &&
733 pNext ? pNext->DynCastTextFrame() :
nullptr,
763#if !ENABLE_WASM_STRIP_ACCESSIBILITY
766 if ( pViewShell && pViewShell->
GetLayout() &&
771 pNext ? pNext->DynCastTextFrame() :
nullptr,
790 if (pHt->GetFootnote().IsEndNote())
811 OSL_ENSURE( !
HasFootnote(),
"Missing FootnoteFlag." );
841 OSL_ENSURE( !
IsVertical() || !
IsSwapped(),
"SwTextFrame::CalcPreps with swapped frame" );
847 const bool bPrep = pPara->
IsPrep();
862 OSL_ENSURE(
GetFollow(),
"+SwTextFrame::CalcPreps: no credits" );
880 else if ( aRectFnSet.
IsVert() )
923 "+SwTextFrame::CalcPrep: want to shrink" );
932 if ( aRectFnSet.
IsVert() )
941 if( 0 >= rRepaint.
Width() )
946 else if ( bPrepAdjust )
980 while( !bBreak && aLine.
Next() )
1022 if( aRectFnSet.
IsVert() && nIs < nMust )
1032 SetUndersized(
true );
1034 else if ( ! aRectFnSet.
IsVert() && nIs > nMust )
1044 SetUndersized(
true );
1098 bool bOnlyContainsAsCharAnchoredObj =
1101 (*
GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR;
1105 bOnlyContainsAsCharAnchoredObj =
false;
1107 if ( nNew && bOnlyContainsAsCharAnchoredObj )
1126 bool bDelta = pPara->
GetDelta() != 0;
1136 if( !rFrameBreak.
FindBreak(
this, rLine, bHasToFit ) )
1149 if( nNew && nOld < nEnd )
1190 if (nNew && nOld < nEnd)
1212 bHasVisibleNumRule =
false;
1219 if ( !bOnlyContainsAsCharAnchoredObj &&
1221 bHasVisibleNumRule )
1230 if( bDummy && pBodyFrame &&
1245 if ( nChg < 0 && !bDelta && bOnlyContainsAsCharAnchoredObj )
1259 rRepaint.
Left( rRepaint.
Left() - nChg );
1276 "SwTextFrame::FormatLine( rLine, bPrev) with unswapped frame" );
1283 const bool bOldHyph = pOldCur->
IsEndHyph();
1292 "SwTextFrame::FormatLine: frame leaves orbit." );
1294 "SwTextFrame::FormatLine: line height is zero" );
1299 bool bUnChg = nOldLen == pNew->
GetLen() &&
1301 if ( bUnChg && !bPrev )
1304 ? nOldWidth - pNew->
Width()
1305 : pNew->
Width() - nOldWidth;
1309 bUnChg = nOldHeight == pNew->
Height() &&
1318 if( bUnChg && rRepaint.
Top() == rLine.
Y()
1319 && (bPrev || nNewStart <= pPara->GetReformat().
Start())
1322 rRepaint.
Top( nBottom );
1329 if( nOldTop < rRepaint.
Top() )
1330 rRepaint.
Top( nOldTop );
1333 rRepaint.
Bottom( nOldBottom - 1 );
1341 if( nTmpTop < rRepaint.
Top() )
1342 rRepaint.
Top( nTmpTop );
1345 rRepaint.
Bottom( nTmpBottom - 1 );
1353 rRepaint.
Bottom( nBottom - 1 );
1362 nRght += ( std::max( nOldAscent, pNew->
GetAscent() ) );
1364 nRght += ( std::max( nOldAscent, pNew->
GetAscent() ) / 4);
1371 const bool bHasUnderscore =
1380 const sal_Int32 nDiff = sal_Int32(pNew->
GetLen()) - sal_Int32(nOldLen);
1402 if( nNewStart <= nEnd )
1409 const bool bAdjust )
1416 const OUString & rString =
GetText();
1421 std::unique_ptr<SwRepaint> pFreeze;
1425 if( rReformat.
Len() > nStrLen )
1426 rReformat.
Len() = nStrLen;
1428 if( rReformat.
Start() + rReformat.
Len() > nStrLen )
1429 rReformat.
Len() = nStrLen - rReformat.
Start();
1435 nOldBottom = rLine.
Y();
1457 bool bPrev = rLine.
GetPrev() &&
1461 >= rReformat.
Start() ||
1465 while( rLine.
Prev() )
1476 if (
CH_BREAK == rString[sal_Int32(nNew)])
1483 rReformat.
Len() += rReformat.
Start() - nNew;
1484 rReformat.
Start() = nNew;
1492 rRepaint.
Top( rLine.
Y() );
1493 if( 0 >= rRepaint.
Width() )
1502 bool bFormat =
true;
1513 bool bPrevDone =
nullptr != rLine.
Prev();
1515 bPrevDone =
nullptr != rLine.
Prev();
1541 bool bJumpEndHyph =
false;
1542 bool bWatchEndHyph =
false;
1543 bool bJumpMidHyph =
false;
1544 bool bWatchMidHyph =
false;
1548 bool bMaxHyph = 0 != rInf.
MaxHyph();
1555 OSL_ENSURE( pMaster,
"SwTextFrame::Format: homeless follow" );
1561 SAL_WARN(
"sw",
"SwTextFrame::Format_: master not formatted!");
1568 pLine = aMasterLine.
GetCurr();
1619 if ( !bFormat && bMaxHyph &&
1620 (bWatchEndHyph || bJumpEndHyph || bWatchMidHyph || bJumpMidHyph) )
1624 if ( bWatchEndHyph )
1629 bFormat = bJumpEndHyph;
1630 bWatchEndHyph =
false;
1631 bJumpEndHyph =
false;
1635 if ( bWatchMidHyph && !bFormat )
1640 bFormat |= bJumpMidHyph;
1641 bWatchMidHyph =
false;
1642 bJumpMidHyph =
false;
1656 bWatchEndHyph = !bOldEndHyph;
1657 bJumpEndHyph = bOldEndHyph;
1661 bWatchMidHyph = !bOldMidHyph;
1662 bJumpMidHyph = bOldMidHyph;
1670 bFormat =
nullptr != rInf.
GetRest();
1673 if( !bFormat && ( !bMaxHyph || ( !bWatchEndHyph &&
1674 !bJumpEndHyph && !bWatchMidHyph && !bJumpMidHyph ) ) )
1678 while( rLine.
Next() )
1680 pFreeze.reset(
new SwRepaint( rRepaint ));
1691 rRepaint = *pFreeze;
1700 bool bTruncLines =
false;
1714 nLen += pLine->GetLen();
1716 bTruncLines = nLen > nStrLen;
1742 if( nNewBottom < nOldBottom )
1750 "A frame is not swapped in SwTextFrame::FormatOnceMore" );
1757 sal_uInt16 nOld =
static_cast<const SwTextMargin&
>(rLine).GetDropHeight();
1758 bool bShrink =
false;
1776 const sal_uInt16 nNew =
static_cast<const SwTextMargin&
>(rLine).GetDropHeight();
1786 if( bShrink == bGrow || 5 < nGo )
1810 std::vector<SwAnchoredObject *> & rIntersectingObjs)
1812 const bool bIsEmpty =
GetText().isEmpty();
1830 OSL_ENSURE( !
IsSwapped(),
"A frame is swapped before Format_" );
1852 rIntersectingObjs.push_back(pObj);
1860 OSL_ENSURE( !
IsSwapped(),
"A frame is swapped after Format_" );
1865 if( SvxAdjust::Left != aLine.
GetAdjust() &&
1905 if( nTop > nFrameHeight )
1932 if( 12 == FormatLevel::GetLevel() )
1974 SAL_WARN(
"sw",
"SwTextFrame::Format: failed to format master!");
1987 const bool bSetOffset =
2004 else if( bSetOffset && IsFollow() )
2007 OSL_ENSURE( pMaster,
"SwTextFrame::Format: homeless follow" );
2014 aRectFnSet.
SetLimit( *
this, nMaxY );
2028 const bool bOrphan =
IsWidow();
2038 ::std::vector<SwAnchoredObject *> intersectingObjs;
2039 ::std::vector<SwFrame const*> nexts;
2042 nexts.push_back(pNext);
2045 if( pFootnoteBoss && nFootnoteHeight )
2051 if( nNewHeight < nFootnoteHeight )
2053 nFootnoteHeight = nNewHeight;
2057 if (!intersectingObjs.empty())
2063 auto lastIter(nexts.end());
2066 SwFrame *
const pAnchor(pObj->AnchorFrame());
2068 if (pAnchorPage != pPage)
2070 auto const iter(::std::find(nexts.begin(), nexts.end(), pAnchor));
2071 if (iter != nexts.end())
2076 if (
static_cast<SwTextFrame const*
>(pAnchor)->IsJoinLocked()
2082 pLastMovedAnchor =
nullptr;
2087 if (!pLastMovedAnchor || iter < lastIter)
2089 pLastMovedAnchor =
static_cast<SwTextFrame *
>(pAnchor);
2096 if (pLastMovedAnchor)
2100 if (pObj->AnchorFrame() == pLastMovedAnchor)
2104 pObj->RegisterAtPage(*pAnchorPage);
2107 pObj->InvalidateObjPos();
2110 pObj->SetForceNotifyNewBackground(
true);
2125 }
while ( pFootnoteBoss );
2151 aRectFnSet.
SetTop(aPrt, 0);
2172 SAL_INFO(
"sw.core",
"Warn: Cell content has greater size than cell height!");
2195 "SwTextFrame::FormatQuick with swapped frame" );
2229 int nLoopProtection = 0;
2233 if (nNewStart == nStart)
2236 nLoopProtection = 0;
2238 const bool bWillEndlessInsert = nLoopProtection > 250;
2239 SAL_WARN_IF(bWillEndlessInsert,
"sw",
"loop detection triggered");
2240 if ((!bWillEndlessInsert)
2244 }
while( aLine.
Next() );
2252 if( !bForceQuickFormat && nNewHeight != nOldHeight && !IsUndersized() )
o3tl::strong_int< sal_Int32, struct Tag_TextFrameIndex > TextFrameIndex
Denotes a character index in a text frame at a layout level, after extent mapping from a text node at...
virtual const SwRedlineTable & GetRedlineTable() const =0
constexpr tools::Long Y() const
constexpr tools::Long X() const
sal_uInt8 & GetMaxHyphens()
sal_Unicode & GetDecimal()
SvxTabAdjust & GetAdjustment()
wrapper class for the positioning of Writer fly frames and drawing objects
const SvxFormatKeepItem & GetKeep(bool=true) const
const SvxHyphenZoneItem & GetHyphenZone(bool=true) const
const SwRegisterItem & GetRegister(bool=true) const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
virtual void Cut() override
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr) override
SwTextFrame * FindMaster() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
const SwRect & getFrameArea() const
bool isFrameAreaDefinitionValid() const
const SwRect & getFramePrintArea() const
bool isFramePrintAreaValid() const
bool isFrameAreaSizeValid() const
void setFrameAreaSizeValid(bool bNew)
Helper class which can be used instead of the macros if a function has too many returns.
Base class of the Writer layout elements.
SwTwips Grow(SwTwips, bool bTst=false, bool bInfo=false)
const SwBodyFrame * FindBodyFrame() const
SwFrame * GetIndPrev() const
SwTwips Shrink(SwTwips, bool bTst=false, bool bInfo=false)
SwSectionFrame * FindSctFrame()
SwTabFrame * FindTabFrame()
bool IsColumnFrame() const
bool IsInFootnote() const
virtual void Calc(vcl::RenderContext *pRenderContext) const
void InvalidateObjs(const bool _bNoInvaOfAsCharAnchoredObjs=true)
const SwSortedObjs * GetDrawObjs() const
virtual void MakePos()
Calculates the frame area position, in case it's invalid.
bool IsRightToLeft() const
virtual bool IsDeleteForbidden() const
const SwAttrSet * GetAttrSet() const
WARNING: this may not return correct RES_PAGEDESC/RES_BREAK items for SwTextFrame,...
bool IsMoveable(const SwLayoutFrame *_pLayoutFrame=nullptr) const
determine, if frame is moveable in given environment
SwLayoutFrame * GetUpper()
SwRootFrame * getRootFrame()
void SetCompletePaint() const
friend void ValidateText(SwFrame *pFrame)
SwContentFrame * FindNextCnt(const bool _bInSameFootnote=false)
SwPageFrame * FindPageFrame()
SwFootnoteFrame * FindFootnoteFrame()
SwFootnoteBossFrame * FindFootnoteBossFrame(bool bFootnotes=false)
sal_uInt16 GetPhyPageNum() const
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
tools::Long GetTopMargin() const
bool IsAnLower(const SwFrame *) const
const SwFrame * Lower() const
static void InsertMovedFwdFrame(const SwDoc &_rDoc, const SwTextFrame &_rMovedFwdFrameByObjPos, const sal_uInt32 _nToPageNum)
const SvxTabStop * GetTabStop(const SwTwips nSearchPos, SwTwips &nRight) const
#i24363# tab stops relative to indent
Collection of SwLinePortion instances, representing one line of text.
virtual void Height(const SwTwips nNew, const bool bText=true) override
SwTwips GetHangingMargin() const
bool HasUnderscore() const
Base class for anything that can be part of a line in the Writer layout.
TextFrameIndex GetLen() const
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
const SwPosition * GetMark() const
const SwPosition * End() const
const SwPosition * GetPoint() const
A page of the document layout.
void ValidateContent() const
sal_uInt16 GetPhyPageNum() const
const SwSortedObjs * GetSortedObjs() const
bool IsInvalidContent() const
bool IsInvalidFly() const
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
bool IsPrepMustFit() const
bool IsPrepWidows() const
bool IsPrepAdjust() const
SwCharRange & GetReformat()
void SetDelta(tools::Long nDelta)
bool IsFollowField() const
void SetPrepMustFit(const bool bNew)
tools::Long GetDelta() const
void MaybeNotifyRedlinePositionModification(tools::Long nTop)
RedlineType GetType(sal_uInt16 nPos=0) const
tools::Long GetHeight(const SwRect &rRect) const
tools::Long YInc(tools::Long n1, tools::Long n2) const
tools::Long GetTopMargin(const SwFrame &rFrame) const
tools::Long GetWidth(const SwRect &rRect) const
void SetYMargins(SwFrame &rFrame, tools::Long nTop, tools::Long nBottom) const
void SetHeight(SwRect &rRect, tools::Long nNew) const
tools::Long GetTop(const SwRect &rRect) const
void SetLimit(SwFrame &rFrame, tools::Long nNew) const
void AddBottom(SwRect &rRect, tools::Long nNew) const
bool OverStep(const SwRect &rRect, tools::Long nPos) const
tools::Long YDiff(tools::Long n1, tools::Long n2) const
tools::Long GetPrtTop(const SwFrame &rFrame) const
tools::Long GetBottom(const SwRect &rRect) const
tools::Long BottomDist(const SwRect &rRect, tools::Long nPos) const
void SetTop(SwRect &rRect, tools::Long nNew) const
tools::Long GetPrtBottom(const SwFrame &rFrame) const
Of course Writer needs its own rectangles.
void Chg(const Point &rNP, const Size &rNS)
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void SetTopAndHeight(tools::Long nTop, tools::Long nNew)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
void AddHeight(const tools::Long nAdd)
void AddWidth(const tools::Long nAdd)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
vector_type::size_type size_type
void SetRightOfst(const SwTwips nNew)
SwTwips GetOffset() const
SwTwips GetRightOfst() const
void SetOffset(const SwTwips nNew)
SwViewShell * GetCurrShell() const
bool IsAnyShellAccessible() const
const SwSectionFrame * GetFollow() const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
SwRect AnchoredObjToRect(const SwAnchoredObject *pAnchoredObj, const SwRect &rRect) const
Determines the demanded rectangle for an anchored object, considering its surround for text wrapping.
SwRect GetFrameArea() const
SwAnchoredObjList * GetAnchoredObjList() const
void CtorInitTextFormatInfo(OutputDevice *pRenderContext, SwTextFrame *pFrame, const bool bInterHyph=false, const bool bQuick=false, const bool bTst=false)
void SetRest(SwLinePortion *pNewRest)
SwLinePortion * GetRest()
TextFrameIndex GetUnderScorePos() const
bool IsFlyInCntBase() const
void SetUnclipped(bool bNew)
const sal_uInt8 & CntMidHyph() const
const sal_uInt8 & CntEndHyph() const
void SetOnceMore(bool bNew)
void MakeDummyLine()
This function creates a Line that reaches to the other Page Margin.
void SetTruncLines(bool bNew)
void CalcUnclipped(SwTwips &rTop, SwTwips &rBottom)
void CalcDropHeight(const sal_uInt16 nLines)
void CtorInitTextFormatter(SwTextFrame *pFrame, SwTextFormatInfo *pInf)
const SwFormatDrop * GetDropFormat() const
TextFrameIndex FormatQuoVadis(TextFrameIndex nStart)
SwLinePortion * MakeRestPortion(const SwLineLayout *pLine, TextFrameIndex nPos)
TextFrameIndex FormatLine(TextFrameIndex nStart)
SwTwips CalcBottomLine() const
SwTextFormatInfo & GetInfo()
void Insert(SwLineLayout *pLine)
bool IsBreakNow(SwTextMargin &rLine)
void SetRstHeight(const SwTextMargin &rLine)
void SetKeep(const bool bNew)
bool IsKeepAlways() const
bool IsInside(SwTextMargin const &rLine) const
BP 18.6.93: Widows.
Represents the visualization of a paragraph.
void FormatOnceMore(SwTextFormatter &rLine, SwTextFormatInfo &rInf)
SwTextFrame * GetFormatted(bool bForceQuickFormat=false)
In case the SwLineLayout was cleared out of the s_pTextCache, recreate it.
void SwitchVerticalToHorizontal(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from vertical to horizontal layout.
bool CalcPrepFootnoteAdjust()
bool FollowFormatAllowed() const
void SetOffset(TextFrameIndex nNewOfst)
SwTextFrame * GetFollow()
void CalcFootnoteFlag(TextFrameIndex nStop=TextFrameIndex(COMPLETE_STRING))
Does the Frame have a local footnote (in this Frame or Follow)?
void HideAndShowObjects()
Hides respectively shows objects, which are anchored at paragraph, at/as a character of the paragraph...
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 FormatAdjust(SwTextFormatter &rLine, WidowsAndOrphans &rFrameBreak, TextFrameIndex nStrLen, const bool bDummy)
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
bool FormatQuick(bool bForceQuickFormat)
void RemoveFootnote(TextFrameIndex nStart, TextFrameIndex nLen=TextFrameIndex(COMPLETE_STRING))
Footnote.
void HideHidden()
Removes Textfrm's attachments, when it's hidden.
void CalcBaseOfstForFly()
bool IsEmptyMasterWithSplitFly() const
This text frame has a follow and the text frame don't contain text.
void SetFootnote(const bool bNew)
Will be moved soon.
bool CalcFollow(TextFrameIndex nTextOfst)
bool IsEmptyMaster() const
If there's a Follow and we don't contain text ourselves.
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
Calculates the frame area size and the print area, in case they are invalid.
sw::MergedPara * GetMergedPara()
bool FormatLine(SwTextFormatter &rLine, const bool bPrev)
void AdjustFrame(const SwTwips nChgHeight, bool bHasToFit=false)
SwContentFrame * JoinFrame()
void SetWidow(const bool bNew)
void CalcHeightOfLastLine(const bool _bUseFont=false)
method to determine height of last line, needed for proportional line spacing
void CalcAdditionalFirstLineOffset()
Simulate format for a list item paragraph, whose list level attributes are in LABEL_ALIGNMENT mode,...
SwTwips GetParHeight() const
Returns the sum of line height in pLine.
SwParaPortion * GetPara()
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
bool IsFieldFollow() const
virtual void MakePos() override
Calculates the frame area position, in case it's invalid.
bool GetDropRect_(SwRect &rRect) const
void InvalidateRange_(const SwCharRange &, const tools::Long=0)
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout.
void SetFieldFollow(const bool bNew)
void FormatImpl(vcl::RenderContext *pRenderContext, SwParaPortion *pPara, ::std::vector< SwAnchoredObject * > &rIntersectingObjs)
static TextFrameIndex FindBrk(std::u16string_view aText, TextFrameIndex nStart, TextFrameIndex nEnd)
Returns the first possible break point in the current line.
bool IsHiddenNow() const
Hidden.
void SetJustWidow(const bool bNew)
bool HasNonLastSplitFlyDrawObj() const
This text frame may have a split fly frames anchored to it.
void Format_(SwTextFormatter &rLine, SwTextFormatInfo &rInf, const bool bAdjust=false)
void ChangeOffset(SwTextFrame *pFrame, TextFrameIndex nNew)
void AdjustFollow_(SwTextFormatter &rLine, TextFrameIndex nOffset, TextFrameIndex nStrEnd, const sal_uInt8 nMode)
void ForbidFollowFormat()
void MoveFlyInCnt(SwTextFrame *pNew, TextFrameIndex nStart, TextFrameIndex nEnd)
Rewires FlyInContentFrame, if nEnd > Index >= nStart.
SwTextNode * GetTextNodeFirst()
void SetOffset_(TextFrameIndex nNewOfst)
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!...
void ManipOfst(TextFrameIndex const nNewOfst)
css::uno::Sequence< css::style::TabStop > GetTabStopInfo(SwTwips CurrentPos) override
void SwapWidthAndHeight()
Swaps width and height of the text frame.
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
std::vector< SwFlyAtContentFrame * > GetSplitFlyDrawObjs() const
Like GetDrawObjs(), but limit to fly frames which are allowed to split.
SwTextNode const * GetTextNodeForParaProps() const
void SplitFrame(TextFrameIndex nTextPos)
Methods to manage the FollowFrame.
void SetEmpty(const bool bNew)
SwParaPortion * GetParaPortion()
TextFrameIndex GetLength() const
TextFrameIndex GetEnd() const
TextFrameIndex GetStart() const
void TruncLines(bool bNoteFollow=false)
SwTwips GetLineHeight() const
const SwLineLayout * Next()
SwTwips GetFirstPos() const
void CharToLine(TextFrameIndex)
const SwLineLayout * GetCurr() const
const SwLineLayout * Prev()
sal_Int32 GetLineNr() const
const SwLineInfo & GetLineInfo() const
const SwLineLayout * GetPrev()
SwParaPortion * GetPara()
sal_uInt16 GetDropLeft() const
sal_uInt16 GetDropLines() const
SwTwips GetLeftMargin() const
void SetDropLines(const sal_uInt16 nNew)
sal_uInt16 GetDropHeight() const
SvxAdjust GetAdjust() const
SwTwips GetLineStart() const
void Right(const SwTwips nNew)
SwTextNode is a paragraph in the document model.
virtual SwContentFrame * MakeFrame(SwFrame *) override
Virtual methods from ContentNode.
bool HasVisibleNumberingOrBullet() const
Returns if the paragraph has a visible numbering or bullet.
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
void SetPaintDrop(const bool bNew)
sal_Unicode GetChar(TextFrameIndex const nPos) const
const OUString & GetText() const
TextFrameIndex GetIdx() const
bool IsParagraph(bool bHard=false) const
bool IsLineBreak(bool bHard=false) const
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
SwRootFrame * GetLayout() const
void InvalidateAccessibleParaFlowRelation(const SwTextFrame *_pFromTextFrame, const SwTextFrame *_pToTextFrame)
invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
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 IsBreakNowWidAndOrp(SwTextMargin &rLine)
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
double getLength(const B2DPolygon &rCandidate)
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
const SwTwips WIDOW_MAGIC
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
const sal_Unicode CH_BREAK
constexpr sal_Int32 COMPLETE_STRING