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)
367 pFly->UnlockPosition();
385 && pRedln->
GetType() == RedlineType::Delete
401 SetUndersized( nChgHght == 0 || bHasToFit );
414 if( nChgHght && !bHasToFit )
419 if( nReal < nChgHght )
459 { pPre->
Calc(pRenderContext);
461 }
while ( pPre && pPre !=
this );
480 OSL_ENSURE( !
IsSwapped(),
"Swapped frame while calculating nRstHeight" );
506 OSL_ENSURE( nAdd >= 0,
"Ey" );
517 if( nRstHeight < nFrameHeight )
521 nRstHeight +=
GetUpper()->
Grow( nFrameHeight - nRstHeight );
525 if ( nRstHeight < nFrameHeight )
530 SetUndersized(
true );
534 SetUndersized(
false );
537 else if( nChgHeight )
539 if( nRstHeight - nFrameHeight < nChgHeight )
540 nChgHeight = nRstHeight - nFrameHeight;
557 CurrentPos -= aCharPos.X();
568 css::style::TabStop ts;
574 case SvxTabAdjust::Left : ts.Alignment = css::style::TabAlign_LEFT;
break;
575 case SvxTabAdjust::Center : ts.Alignment = css::style::TabAlign_CENTER;
break;
576 case SvxTabAdjust::Right : ts.Alignment = css::style::TabAlign_RIGHT;
break;
577 case SvxTabAdjust::Decimal: ts.Alignment = css::style::TabAlign_DECIMAL;
break;
578 case SvxTabAdjust::Default: ts.Alignment = css::style::TabAlign_DEFAULT;
break;
599 if( HasFollow() && !(nMode & 1) && nOffset == nEnd )
606 SAL_INFO(
"sw.core",
"+SwTextFrame::JoinFrame: Follow is locked." );
662 OSL_ENSURE(
GetFollow(),
"+SwTextFrame::JoinFrame: no follow" );
680 if (pHt->GetFootnote().IsEndNote())
702 OSL_ENSURE( !pFoll->
HasFootnote(),
"Missing FootnoteFlag." );
713#if !ENABLE_WASM_STRIP_ACCESSIBILITY
716 if ( pViewShell && pViewShell->
GetLayout() &&
721 pNext ? pNext->DynCastTextFrame() :
nullptr,
751#if !ENABLE_WASM_STRIP_ACCESSIBILITY
754 if ( pViewShell && pViewShell->
GetLayout() &&
759 pNext ? pNext->DynCastTextFrame() :
nullptr,
778 if (pHt->GetFootnote().IsEndNote())
799 OSL_ENSURE( !
HasFootnote(),
"Missing FootnoteFlag." );
829 OSL_ENSURE( !
IsVertical() || !
IsSwapped(),
"SwTextFrame::CalcPreps with swapped frame" );
835 const bool bPrep = pPara->
IsPrep();
850 OSL_ENSURE(
GetFollow(),
"+SwTextFrame::CalcPreps: no credits" );
868 else if ( aRectFnSet.
IsVert() )
911 "+SwTextFrame::CalcPrep: want to shrink" );
920 if ( aRectFnSet.
IsVert() )
929 if( 0 >= rRepaint.
Width() )
934 else if ( bPrepAdjust )
968 while( !bBreak && aLine.
Next() )
1010 if( aRectFnSet.
IsVert() && nIs < nMust )
1020 SetUndersized(
true );
1022 else if ( ! aRectFnSet.
IsVert() && nIs > nMust )
1032 SetUndersized(
true );
1077 bool bOnlyContainsAsCharAnchoredObj =
1080 (*
GetDrawObjs())[0]->GetFrameFormat().GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR;
1084 bOnlyContainsAsCharAnchoredObj =
false;
1086 if ( nNew && bOnlyContainsAsCharAnchoredObj )
1105 bool bDelta = pPara->
GetDelta() != 0;
1115 if( !rFrameBreak.
FindBreak(
this, rLine, bHasToFit ) )
1128 if( nNew && nOld < nEnd )
1169 if (nNew && nOld < nEnd)
1183 bHasVisibleNumRule =
false;
1190 if ( !bOnlyContainsAsCharAnchoredObj &&
1192 bHasVisibleNumRule )
1201 if( bDummy && pBodyFrame &&
1216 if ( nChg < 0 && !bDelta && bOnlyContainsAsCharAnchoredObj )
1230 rRepaint.
Left( rRepaint.
Left() - nChg );
1247 "SwTextFrame::FormatLine( rLine, bPrev) with unswapped frame" );
1254 const bool bOldHyph = pOldCur->
IsEndHyph();
1263 "SwTextFrame::FormatLine: frame leaves orbit." );
1265 "SwTextFrame::FormatLine: line height is zero" );
1270 bool bUnChg = nOldLen == pNew->
GetLen() &&
1272 if ( bUnChg && !bPrev )
1275 ? nOldWidth - pNew->
Width()
1276 : pNew->
Width() - nOldWidth;
1280 bUnChg = nOldHeight == pNew->
Height() &&
1289 if( bUnChg && rRepaint.
Top() == rLine.
Y()
1290 && (bPrev || nNewStart <= pPara->GetReformat().
Start())
1293 rRepaint.
Top( nBottom );
1300 if( nOldTop < rRepaint.
Top() )
1301 rRepaint.
Top( nOldTop );
1304 rRepaint.
Bottom( nOldBottom - 1 );
1312 if( nTmpTop < rRepaint.
Top() )
1313 rRepaint.
Top( nTmpTop );
1316 rRepaint.
Bottom( nTmpBottom - 1 );
1324 rRepaint.
Bottom( nBottom - 1 );
1333 nRght += ( std::max( nOldAscent, pNew->
GetAscent() ) );
1335 nRght += ( std::max( nOldAscent, pNew->
GetAscent() ) / 4);
1342 const bool bHasUnderscore =
1351 const sal_Int32 nDiff = sal_Int32(pNew->
GetLen()) - sal_Int32(nOldLen);
1373 if( nNewStart <= nEnd )
1380 const bool bAdjust )
1387 const OUString & rString =
GetText();
1392 std::unique_ptr<SwRepaint> pFreeze;
1396 if( rReformat.
Len() > nStrLen )
1397 rReformat.
Len() = nStrLen;
1399 if( rReformat.
Start() + rReformat.
Len() > nStrLen )
1400 rReformat.
Len() = nStrLen - rReformat.
Start();
1406 nOldBottom = rLine.
Y();
1428 bool bPrev = rLine.
GetPrev() &&
1432 >= rReformat.
Start() ||
1436 while( rLine.
Prev() )
1447 if (
CH_BREAK == rString[sal_Int32(nNew)])
1454 rReformat.
Len() += rReformat.
Start() - nNew;
1455 rReformat.
Start() = nNew;
1463 rRepaint.
Top( rLine.
Y() );
1464 if( 0 >= rRepaint.
Width() )
1473 bool bFormat =
true;
1484 bool bPrevDone =
nullptr != rLine.
Prev();
1486 bPrevDone =
nullptr != rLine.
Prev();
1512 bool bJumpEndHyph =
false;
1513 bool bWatchEndHyph =
false;
1514 bool bJumpMidHyph =
false;
1515 bool bWatchMidHyph =
false;
1519 bool bMaxHyph = 0 != rInf.
MaxHyph();
1526 OSL_ENSURE( pMaster,
"SwTextFrame::Format: homeless follow" );
1532 SAL_WARN(
"sw",
"SwTextFrame::Format_: master not formatted!");
1539 pLine = aMasterLine.
GetCurr();
1590 if ( !bFormat && bMaxHyph &&
1591 (bWatchEndHyph || bJumpEndHyph || bWatchMidHyph || bJumpMidHyph) )
1595 if ( bWatchEndHyph )
1600 bFormat = bJumpEndHyph;
1601 bWatchEndHyph =
false;
1602 bJumpEndHyph =
false;
1606 if ( bWatchMidHyph && !bFormat )
1611 bFormat |= bJumpMidHyph;
1612 bWatchMidHyph =
false;
1613 bJumpMidHyph =
false;
1627 bWatchEndHyph = !bOldEndHyph;
1628 bJumpEndHyph = bOldEndHyph;
1632 bWatchMidHyph = !bOldMidHyph;
1633 bJumpMidHyph = bOldMidHyph;
1641 bFormat =
nullptr != rInf.
GetRest();
1644 if( !bFormat && ( !bMaxHyph || ( !bWatchEndHyph &&
1645 !bJumpEndHyph && !bWatchMidHyph && !bJumpMidHyph ) ) )
1649 while( rLine.
Next() )
1651 pFreeze.reset(
new SwRepaint( rRepaint ));
1662 rRepaint = *pFreeze;
1671 bool bTruncLines =
false;
1685 nLen += pLine->GetLen();
1687 bTruncLines = nLen > nStrLen;
1713 if( nNewBottom < nOldBottom )
1721 "A frame is not swapped in SwTextFrame::FormatOnceMore" );
1728 sal_uInt16 nOld =
static_cast<const SwTextMargin&
>(rLine).GetDropHeight();
1729 bool bShrink =
false;
1747 const sal_uInt16 nNew =
static_cast<const SwTextMargin&
>(rLine).GetDropHeight();
1757 if( bShrink == bGrow || 5 < nGo )
1781 std::vector<SwAnchoredObject *> & rIntersectingObjs)
1783 const bool bIsEmpty =
GetText().isEmpty();
1801 OSL_ENSURE( !
IsSwapped(),
"A frame is swapped before Format_" );
1823 rIntersectingObjs.push_back(pObj);
1831 OSL_ENSURE( !
IsSwapped(),
"A frame is swapped after Format_" );
1836 if( SvxAdjust::Left != aLine.
GetAdjust() &&
1876 if( nTop > nFrameHeight )
1903 if( 12 == FormatLevel::GetLevel() )
1945 SAL_WARN(
"sw",
"SwTextFrame::Format: failed to format master!");
1958 const bool bSetOffset =
1975 else if( bSetOffset && IsFollow() )
1978 OSL_ENSURE( pMaster,
"SwTextFrame::Format: homeless follow" );
1985 aRectFnSet.
SetLimit( *
this, nMaxY );
1999 const bool bOrphan =
IsWidow();
2009 ::std::vector<SwAnchoredObject *> intersectingObjs;
2010 ::std::vector<SwFrame const*> nexts;
2013 nexts.push_back(pNext);
2016 if( pFootnoteBoss && nFootnoteHeight )
2022 if( nNewHeight < nFootnoteHeight )
2024 nFootnoteHeight = nNewHeight;
2028 if (!intersectingObjs.empty())
2034 auto lastIter(nexts.end());
2037 SwFrame *
const pAnchor(pObj->AnchorFrame());
2039 if (pAnchorPage != pPage)
2041 auto const iter(::std::find(nexts.begin(), nexts.end(), pAnchor));
2042 if (iter != nexts.end())
2047 if (
static_cast<SwTextFrame const*
>(pAnchor)->IsJoinLocked()
2053 pLastMovedAnchor =
nullptr;
2058 if (!pLastMovedAnchor || iter < lastIter)
2060 pLastMovedAnchor =
static_cast<SwTextFrame *
>(pAnchor);
2067 if (pLastMovedAnchor)
2071 if (pObj->AnchorFrame() == pLastMovedAnchor)
2075 pObj->RegisterAtPage(*pAnchorPage);
2078 pObj->InvalidateObjPos();
2081 pObj->SetForceNotifyNewBackground(
true);
2096 }
while ( pFootnoteBoss );
2131 SAL_INFO(
"sw.core",
"Warn: Cell content has greater size than cell height!");
2154 "SwTextFrame::FormatQuick with swapped frame" );
2188 int nLoopProtection = 0;
2192 if (nNewStart == nStart)
2195 nLoopProtection = 0;
2197 const bool bWillEndlessInsert = nLoopProtection > 250;
2198 SAL_WARN_IF(bWillEndlessInsert,
"sw",
"loop detection triggered");
2199 if ((!bWillEndlessInsert)
2203 }
while( aLine.
Next() );
2211 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
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
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...
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()
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_uInt16 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