20 #include <config_wasm_strip.h>
63 #include <lineinfo.hxx>
84 : m_pMerged(rFrame.GetMergedPara())
85 , m_pNode(m_pMerged ? nullptr : rFrame.GetTextNodeFirst())
95 while (m_CurrentExtent < m_pMerged->extents.size())
100 while (m_CurrentHint < pHints->
Count())
103 if (rExtent.
nEnd < pHint->GetStart()
105 || (rExtent.
nEnd == pHint->GetStart()
107 || *pHint->GetEnd() != pHint->GetStart())))
112 if (rExtent.
nStart <= pHint->GetStart())
116 *ppNode = rExtent.
pNode;
123 if (m_CurrentExtent < m_pMerged->extents.size() &&
136 if (m_CurrentHint < pHints->
Count())
152 : m_pNode(rFrame.GetMergedPara() ? nullptr : rFrame.GetTextNodeFirst())
161 m_Hints.emplace_back(pNode, pHint);
173 if (m_CurrentHint < pHints->
Count())
222 pHints->SortIfNeedBe();
241 if (pHint->GetAnyEnd() < rExtent.
nStart
244 && *pHint->GetEnd() != pHint->GetStart()
245 && *pHint->GetEnd() == rExtent.
nStart))
250 if (pHint->GetAnyEnd() <= rExtent.
nEnd)
254 *ppNode = rExtent.
pNode;
268 pHints->SortIfNeedBe();
294 SwTextFrame const& rTextFrame(static_cast<SwTextFrame const&>(rFrame));
297 SwNodeOffset const nFirst(pMerged->pFirstNode->GetIndex());
298 SwNodeOffset const nLast(pMerged->pLastNode->GetIndex());
299 return (nFirst <= nNodeIndex && nNodeIndex <= nLast);
320 if (pMerged && pMerged->pParaPropsNode != &rNode)
335 return static_cast<SwTextFrame*
>(pTextNode->getLayoutFrame(&rLayout))->GetMergedPara()->pParaPropsNode;
356 std::pair<SwTextNode *, SwTextNode *>
362 if (
SwTextFrame const*
const pFrame = static_cast<SwTextFrame*>(pTextNode->getLayoutFrame(&rLayout)))
366 return std::make_pair(pMerged->pFirstNode, const_cast<SwTextNode*>(pMerged->pLastNode));
370 return std::make_pair(pTextNode, pTextNode);
376 rNode.SwContentNode::GetAttr(rFormatSet);
380 if (
sw::MergedPara const*
const pMerged = pFrame ? pFrame->GetMergedPara() :
nullptr)
382 if (pMerged->pFirstNode != &rNode)
387 "first-node items must be adjacent");
389 pMerged->pFirstNode->SwContentNode::GetAttr(firstSet);
390 rFormatSet.
Put(firstSet);
393 if (pMerged->pParaPropsNode != &rNode)
409 propsSet(*rFormatSet.
GetPool());
410 pMerged->pParaPropsNode->SwContentNode::GetAttr(propsSet);
411 rFormatSet.
Put(propsSet);
412 return *pMerged->pParaPropsNode;
431 aPrt.
Pos().setX( aPrt.
Pos().Y() );
435 aPrt.
Pos().setY( nPrtOfstX );
445 aPrt.
Pos().setY( aPrt.
Pos().X() );
449 aPrt.
Pos().setX( nPrtOfstY );
466 aFrm.
Height( nFrameWidth );
526 rRect.
Width( nHeight );
541 "SwTextFrame::SwitchHorizontalToVertical, IsVertLRBT, not swapped");
542 Point aPoint(rPoint);
574 Point aTmp( 0, nLimit );
616 rRect.
Width( nWidth );
665 Point aTmp( nLimit, 0 );
671 : pFrame( pTextFrame ), bUndo(
false )
694 rRect.
Width( nWidth );
705 m_rOut( rOutp ), m_nOldLayoutMode( rOutp.GetLayoutMode() )
728 rOut( rOutp ), nOldLanguageType( rOutp.GetDigitLanguage() )
755 OSL_ENSURE( !
IsLocked(),
"+SwTextFrame::Init: this is locked." );
772 , mnFlyAnchorOfst( 0 )
773 , mnFlyAnchorOfstNoWrap( 0 )
774 , mnFlyAnchorVertOfstNoWrap( 0 )
775 , mnFootnoteLine( 0 )
776 , mnHeightOfLastLine( 0 )
777 , mnAdditionalFirstLineOffset( 0 )
779 , mnCacheIndex( USHRT_MAX )
782 , mbJustWidow(
false )
784 , mbInFootnoteConnect(
false )
785 , mbFootnote(
false )
787 , mbHasRotatedPortions(
false )
788 , mbFieldFollow(
false )
789 , mbHasAnimation(
false )
790 , mbIsSwapped(
false )
791 , mbFollowFormatAllowed( true )
809 std::vector<std::pair<sal_Int32, sal_Int32>>
const*
const pExtents)
811 if (pExtents && pExtents->empty())
818 rFootnoteIdxs.
SeekEntry( rTextNode, &nPos );
819 if (nPos < rFootnoteIdxs.
size())
821 while (nPos && &rTextNode == &(rFootnoteIdxs[ nPos ]->GetTextNode()))
823 if (nPos || &rTextNode != &(rFootnoteIdxs[ nPos ]->GetTextNode()))
827 for ( ; nPos < rFootnoteIdxs.
size(); ++nPos)
834 while ((*pExtents)[iter].second <= pTextFootnote->
GetStart())
837 if (iter == pExtents->size())
842 if (pTextFootnote->
GetStart() < (*pExtents)[iter].first)
866 if (e.pNode != pNode)
889 pView->GetEditWin().GetFrameControlsManager().RemoveControls(
this);
905 bool const isRealInsert,
906 SwTextNode const& rNode, sal_Int32
const nIndex, sal_Int32
const nLen)
908 assert(!isRealInsert || nLen);
909 assert(nIndex <= rNode.
Len());
910 assert(nIndex + nLen <= rNode.
Len());
917 sal_Int32 nTFIndex(0);
918 sal_Int32 nInserted(0);
919 bool bInserted(
false);
920 bool bFoundNode(
false);
921 auto itInsert(rMerged.
extents.end());
922 for (
auto it = rMerged.
extents.begin(); it != rMerged.
extents.end(); ++it)
924 if (it->pNode == &rNode)
929 if (it->nStart <= nIndex && nIndex <= it->nEnd)
931 text.insert(nTFIndex + (nIndex - it->nStart),
932 rNode.
GetText().subView(nIndex, nLen));
938 else if (nIndex < it->nStart)
940 if (itInsert == rMerged.
extents.end())
950 assert(it == rMerged.
extents.begin() || (it-1)->pNode != &rNode || (it-1)->nEnd < nIndex);
951 if (nIndex + nLen < it->nStart)
956 if (nIndex < it->nStart)
958 text.insert(nTFIndex,
959 rNode.
GetText().subView(nIndex, it->nStart - nIndex));
960 nInserted += it->nStart - nIndex;
964 assert(it->nStart <= nIndex);
965 if (nIndex <= it->nEnd)
967 nTFIndex += it->nEnd - it->nStart;
968 while (it->nEnd < nIndex + nLen)
971 (it+1) != rMerged.
extents.end() && (it+1)->pNode == it->pNode
974 if (pNext && pNext->nStart <= nIndex + nLen)
976 text.insert(nTFIndex,
977 rNode.
GetText().subView(it->nEnd, pNext->nStart - it->nEnd));
978 nTFIndex += pNext->nStart - it->nEnd;
979 nInserted += pNext->nStart - it->nEnd;
980 pNext->nStart = it->nStart;
981 it = rMerged.
extents.erase(it);
985 text.insert(nTFIndex,
986 rNode.
GetText().subView(it->nEnd, nIndex + nLen - it->nEnd));
987 nTFIndex += nIndex + nLen - it->nEnd;
988 nInserted += nIndex + nLen - it->nEnd;
989 it->nEnd = nIndex + nLen;
997 else if (rNode.
GetIndex() < it->pNode->GetIndex() || bFoundNode)
999 if (itInsert == rMerged.
extents.end())
1005 if (itInsert == rMerged.
extents.end())
1007 nTFIndex += it->nEnd - it->nStart;
1013 rMerged.
extents.emplace(itInsert, const_cast<SwTextNode*>(&rNode), nIndex, nIndex + nLen);
1014 text.insert(nTFIndex, rNode.
GetText().subView(nIndex, nLen));
1016 if (rMerged.
extents.size() == 1
1029 rMerged.
mergedText = text.makeStringAndClear();
1036 bool const isRealDelete,
1037 SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32
const nLen)
1039 assert(nIndex <= rNode.
Len());
1042 sal_Int32 nTFIndex(0);
1043 sal_Int32 nToDelete(nLen);
1044 sal_Int32 nDeleted(0);
1045 size_t nFoundNode(0);
1047 auto it = rMerged.
extents.begin();
1048 for (; it != rMerged.
extents.end(); )
1051 if (it->pNode == &rNode)
1054 if (nIndex + nToDelete < it->nStart)
1066 if (nIndex < it->nStart)
1069 nToDelete -= it->nStart - nIndex;
1070 nIndex = it->nStart;
1073 if (it->nStart <= nIndex && nIndex < it->nEnd)
1075 sal_Int32
const nDeleteHere(nIndex + nToDelete <= it->nEnd
1077 : it->nEnd - nIndex);
1078 text.remove(nTFIndex + (nIndex - it->nStart), nDeleteHere);
1079 bErase = nDeleteHere == it->nEnd - it->nStart;
1083 assert(it->nStart == nIndex);
1084 it = rMerged.
extents.erase(it);
1086 else if (isRealDelete)
1088 it->nStart -= (nLen - nToDelete);
1089 it->nEnd -= (nLen - nToDelete + nDeleteHere);
1090 if (it != rMerged.
extents.begin()
1091 && (it-1)->pNode == &rNode
1092 && (it-1)->nEnd == it->nStart)
1094 nTFIndex += it->nEnd - it->nStart;
1095 (it-1)->nEnd = it->nEnd;
1096 it = rMerged.
extents.erase(it);
1102 if (nIndex + nDeleteHere == it->nEnd)
1104 it->nEnd -= nDeleteHere;
1108 if (nIndex == it->nStart)
1110 it->nStart += nDeleteHere;
1114 sal_Int32
const nOldEnd(it->nEnd);
1116 it = rMerged.
extents.emplace(it+1,
1117 it->pNode, nIndex + nDeleteHere, nOldEnd);
1119 assert(nDeleteHere == nToDelete);
1122 nDeleted += nDeleteHere;
1123 nToDelete -= nDeleteHere;
1124 nIndex += nDeleteHere;
1125 if (!isRealDelete && nToDelete == 0)
1132 else if (nFoundNode != 0)
1138 nTFIndex += it->nEnd - it->nStart;
1143 assert(nIndex <= rNode.
Len() + nLen);
1148 if (nErased && nErased == nFoundNode)
1156 : rMerged.
extents.front().pNode;
1162 rMerged.
mergedText = text.makeStringAndClear();
1166 std::pair<SwTextNode*, sal_Int32>
1169 sal_Int32
nIndex(i_nIndex);
1171 for (
const auto& rExt : rMerged.
extents)
1174 if (nIndex < (pExtent->
nEnd - pExtent->
nStart))
1176 return std::make_pair(pExtent->
pNode, pExtent->
nStart + nIndex);
1178 nIndex = nIndex - (pExtent->
nEnd - pExtent->
nStart);
1180 assert(nIndex == 0 &&
"view index out of bounds");
1182 ? std::make_pair(pExtent->
pNode, pExtent->
nEnd)
1191 bool bFoundNode(
false);
1192 for (
auto const& e : rMerged.
extents)
1194 if (pNode->
GetIndex() < e.pNode->GetIndex())
1198 if (e.pNode == pNode)
1200 if (e.nStart <= nIndex && nIndex <= e.nEnd)
1204 else if (nIndex < e.nStart)
1211 else if (bFoundNode)
1215 nRet += e.nEnd - e.nStart;
1220 assert(nIndex <= pNode->Len());
1223 else if (rMerged.
extents.empty())
1225 assert(nIndex <= pNode->Len());
1233 std::pair<SwTextNode*, sal_Int32>
1244 return std::make_pair(static_cast<SwTextNode*>(const_cast<sw::BroadcastingModify*>(
1251 std::pair<SwTextNode*, sal_Int32>
const ret(
MapViewToModel(nIndex));
1265 assert(static_cast<SwTextNode*>(const_cast<sw::BroadcastingModify*>(
SwFrame::GetDep())) == pNode);
1324 return pMerged->
extents.empty()
1326 : pMerged->
extents.front().pNode;
1347 sal_uInt16
const nScript,
bool const bNoChar)
const
1351 return pos.first->GetLang(pos.second, bNoChar ? 0 : 1, nScript);
1359 pPara->ResetPreps();
1373 bool bHiddenCharsHidePara(
false);
1374 bool bHiddenParaField(
false);
1382 nHiddenStart, nHiddenEnd);
1389 nHiddenStart, nHiddenEnd);
1394 bHiddenCharsHidePara =
true;
1398 int nNewResultWeight = 0;
1406 if (nCurWeight > nNewResultWeight)
1408 nNewResultWeight = nCurWeight;
1411 else if (nCurWeight == nNewResultWeight && bHiddenParaField)
1428 if ( pVsh && ( bHiddenCharsHidePara || bHiddenParaField ) )
1432 ( bHiddenParaField &&
1435 ( bHiddenCharsHidePara &&
1449 "HideHidden on visible frame of hidden frame has follow" );
1474 pPage->
RemoveFootnote(
this, static_cast<const SwTextFootnote*>(pHt) );
1496 if (_eAnchorType == RndStdIds::FLY_AT_CHAR)
1508 const sal_Unicode cAnchorChar = nObjAnchorPos < rNode.Len()
1509 ? rNode.GetText()[nObjAnchorPos]
1518 static_cast<const SwTextFlyCnt*
>(pHint)->GetFlyCnt().GetFrameFormat();
1529 aRectFnSet.
SetWidth( aLastCharRect, 1 );
1565 if ((eAnchorType != RndStdIds::FLY_AT_CHAR) ||
1578 const bool bShouldBeHidden = !pVsh || !pVsh->
GetWin() ||
1591 if (eAnchorType == RndStdIds::FLY_AT_PARA)
1595 else if ((eAnchorType == RndStdIds::FLY_AT_CHAR) ||
1596 (eAnchorType == RndStdIds::FLY_AS_CHAR))
1598 sal_Int32 nHiddenStart;
1599 sal_Int32 nHiddenEnd;
1615 OSL_FAIL(
"<SwTextFrame::HideAndShowObjects()> - object not anchored at/inside paragraph!?" );
1624 OSL_ENSURE(pMaster,
"SwTextFrame without master");
1640 sal_Int32 nFound = sal_Int32(nStart);
1641 const sal_Int32 nEndLine =
std::min(sal_Int32(nEnd), rText.getLength() - 1);
1644 while( nFound <= nEndLine &&
' ' == rText[nFound] )
1653 while( nFound <= nEndLine &&
' ' != rText[nFound] )
1664 #if defined __GNUC__ && !defined __clang__
1665 #pragma GCC diagnostic push
1666 #pragma GCC diagnostic ignored "-Wstrict-overflow"
1669 #if defined __GNUC__ && !defined __clang__
1670 #pragma GCC diagnostic pop
1687 return pPara && ( nPos <= nMax + pPara->
GetLen() );
1717 if(aRange != rReformat) {
1721 rReformat += aRange;
1733 "SwTextFrame::CalcLineSpace with swapped frame!" );
1802 sal_Int32
const nPos, sal_Int32
const nCnt,
bool const bMove)
1832 const sal_Int32 nEnd = nPos + (nCnt > 0 ? nCnt : 1 );
1889 bool & o_rbRecalcFootnoteFlag,
1892 sal_Int32
const nDestStart,
1893 sal_Int32
const nSourceStart,
1894 sal_Int32
const nLen)
1896 std::vector<std::pair<sal_Int32, sal_Int32>> deleted;
1897 sal_Int32
const nSourceEnd(nSourceStart + nLen);
1898 sal_Int32 nLastEnd(0);
1899 for (
const auto& rExt : rMerged.
extents)
1901 if (rExt.pNode == &rNode)
1903 sal_Int32
const nStart(std::max(nLastEnd, nSourceStart));
1904 sal_Int32
const nEnd(
std::min(rExt.nStart, nSourceEnd));
1907 deleted.emplace_back(nStart, nEnd);
1909 nLastEnd = rExt.nEnd;
1910 if (nSourceEnd <= rExt.nEnd)
1915 else if (rNode.
GetIndex() < rExt.pNode->GetIndex())
1920 if (nLastEnd != rNode.
Len())
1922 if (nLastEnd < nSourceEnd)
1924 deleted.emplace_back(std::max(nLastEnd, nSourceStart), nSourceEnd);
1927 if (deleted.empty())
1930 o_rbRecalcFootnoteFlag =
true;
1931 for (
auto const& it : deleted)
1933 sal_Int32
const nStart(it.first - nSourceStart + nDestStart);
1935 rDestNode, nStart, it.second - it.first);
1941 lcl_SetWrong(rTextFrame, rDestNode, nStart, it.first - it.second,
false);
1943 lcl_ModifyOfst(rTextFrame, nIndex, nDeleted, &o3tl::operator-<sal_Int32, Tag_TextFrameIndex>);
1954 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1962 for( sal_uInt16 nWhich : rWhichFmtAttr )
1968 #endif // ENABLE_WASM_STRIP_ACCESSIBILITY
1984 sal_uInt16 nWhich = 0;
1985 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
1988 pOld = pHint->m_pOld;
1989 pNew = pHint->m_pNew;
1990 nWhich = pHint->GetWhich();
1992 else if (
auto const pHt = dynamic_cast<sw::MoveText const*>(&rHint))
1996 else if (
auto const pHynt = dynamic_cast<sw::RedlineDelText const*>(&rHint))
1998 pRedlineDelText = pHynt;
2000 else if (
auto const pHnt = dynamic_cast<sw::RedlineUnDelText const*>(&rHint))
2002 pRedlineUnDelText = pHnt;
2006 assert(!
"unexpected hint");
2014 SwTextNode const& rNode(static_cast<SwTextNode const&>(rModify));
2025 if (pAttrNode != &rModify)
2064 bool bSetFieldsDirty =
false;
2065 bool bRecalcFootnoteFlag =
false;
2067 if (pRedlineDelText)
2071 sal_Int32
const nNPos = pRedlineDelText->
nStart;
2072 sal_Int32
const nNLen = pRedlineDelText->
nLen;
2076 const sal_Int32
m = -nNLen;
2085 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2086 lcl_ModifyOfst(*
this, nPos, nLen, &o3tl::operator-<sal_Int32, Tag_TextFrameIndex>);
2090 else if (pRedlineUnDelText)
2094 sal_Int32
const nNPos = pRedlineUnDelText->
nStart;
2095 sal_Int32
const nNLen = pRedlineUnDelText->
nLen;
2113 bSetFieldsDirty =
true;
2114 lcl_ModifyOfst(*
this, nPos, nLen, &o3tl::operator+<sal_Int32, Tag_TextFrameIndex>);
2126 bRecalcFootnoteFlag,
2138 else switch (nWhich)
2148 sal_Int32
const nNPos =
static_cast<const SwInsText*
>(pNew)->nPos;
2149 sal_Int32
const nNLen =
static_cast<const SwInsText*
>(pNew)->nLen;
2152 bool isHidden(
false);
2156 isHidden =
static_cast<const SwInsText*
>(pNew)->isInsideFieldmarkResult;
2159 isHidden =
static_cast<const SwInsText*
>(pNew)->isInsideFieldmarkCommand;
2185 bSetFieldsDirty =
true;
2186 lcl_ModifyOfst(*
this, nPos, nLen, &o3tl::operator+<sal_Int32, Tag_TextFrameIndex>);
2193 sal_Int32
const nNPos =
static_cast<const SwDelChr*
>(pNew)->nPos;
2208 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2209 lcl_ModifyOfst(*
this, nPos, nLen, &o3tl::operator-<sal_Int32, Tag_TextFrameIndex>);
2215 sal_Int32
const nNPos =
static_cast<const SwDelText*
>(pNew)->nStart;
2216 sal_Int32
const nNLen =
static_cast<const SwDelText*
>(pNew)->nLen;
2226 const sal_Int32
m = -nNLen;
2238 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2239 lcl_ModifyOfst(*
this, nPos, nLen, &o3tl::operator-<sal_Int32, Tag_TextFrameIndex>);
2247 sal_Int32
const nNPos = pNewUpdate->
getStart();
2248 sal_Int32
const nNLen = pNewUpdate->
getEnd() - nNPos;
2267 lcl_SetWrong( *
this, rNode, nNPos, nNPos + nNLen,
false );
2272 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
2313 sal_Int32
const nNPos =
static_cast<const SwFormatField*
>(pNew)->GetTextField()->GetStart();
2327 bSetFieldsDirty =
true;
2340 assert(&rNode == &static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote()->GetTextNode());
2342 static_cast<const SwFormatFootnote*>(pNew)->GetTextFootnote()->GetStart());
2362 nPos =
MapModelToView(&rNode, pItem->GetTextFootnote()->GetStart());
2371 nPos =
MapModelToView(&rNode, pItem->GetTextField()->GetStart());
2376 if( pItem == pOldItem )
2387 bool bLineSpace = SfxItemState::SET == rNewSet.
GetItemState(
2391 if ( bLineSpace || bRegister )
2447 if( !pFly->IsFlyInContentFrame() )
2450 pFly->GetAttrSet()->GetBackground();
2462 pFly->SetCompletePaint();
2463 pFly->InvalidatePage();
2470 if ( SfxItemState::SET ==
2476 else if ( SfxItemState::SET ==
2478 SfxItemState::SET ==
2480 SfxItemState::SET ==
2483 else if ( SfxItemState::SET ==
2485 SfxItemState::SET ==
2487 SfxItemState::SET ==
2490 else if ( SfxItemState::SET ==
2513 SwAttrSetChg aOldSet( *static_cast<const SwAttrSetChg*>(pOld) );
2514 SwAttrSetChg aNewSet( *static_cast<const SwAttrSetChg*>(pNew) );
2550 if ( 0x04 & nClear )
2563 if ( 0x08 & nClear )
2577 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
2610 bSetFieldsDirty =
true;
2625 if (
nullptr != pNxt )
2631 if( bSetFieldsDirty )
2634 if ( bRecalcFootnoteFlag )
2666 OSL_ENSURE(
GetFollow() && nNeed,
"+SwTextFrame::Prepare: lost all friends");
2673 sal_uInt16 nHave = nNeed;
2740 #if defined __GNUC__ && !defined __clang__
2741 # pragma GCC diagnostic push
2742 # pragma GCC diagnostic ignored "-Wstrict-overflow"
2747 bool bParaPossiblyInvalid =
false;
2775 if( aTextFly.
IsOn() )
2792 return bParaPossiblyInvalid;
2802 OSL_ENSURE( !
IsLocked(),
"SwTextFrame::Prepare: three of a perfect pair" );
2807 return bParaPossiblyInvalid;
2849 return bParaPossiblyInvalid;
2851 PrepWidows( *static_cast<const sal_uInt16 *>(pVoid), bNotify );
2931 const sal_uInt16 nWhich = pHt->Which();
2957 bool bFormat = pPara->
HasFly();
2972 for (
size_t i = 0;
i < nCnt; ++
i )
2978 == RndStdIds::FLY_AT_CHAR )
2989 if( aTextFly.
IsOn() )
2992 const bool bRelaxed = aTextFly.
Relax();
3027 return bParaPossiblyInvalid;
3029 if (bParaPossiblyInvalid)
3045 bParaPossiblyInvalid =
true;
3051 if (
nullptr != pNxt )
3066 OSL_ENSURE(
GetFollow(),
"PrepareHint::FootnoteInvalidationGone may only be called by Follow" );
3073 return bParaPossiblyInvalid;
3090 return bParaPossiblyInvalid;
3121 return bParaPossiblyInvalid;
3129 return bParaPossiblyInvalid;
3131 #if defined __GNUC__ && !defined __clang__
3132 # pragma GCC diagnostic pop
3154 : pFrame( pTextFrame )
3167 aRectFnSet.
SetHeight( aFrm, nMaxHeight );
3189 aRectFnSet.
SetPosY(aPrt, nUpper );
3200 OSL_ENSURE( !
pFrame->
IsSwapped(),
"A frame is swapped before Format_" );
3213 OSL_ENSURE( !
pFrame->
IsSwapped(),
"A frame is swapped after Format_" );
3258 "SwTextFrame::WouldFit with swapped frame" );
3276 if( rMaxHeight < nHeight )
3280 rMaxHeight -= nHeight;
3287 OSL_ENSURE(
HasPara() ||
IsHiddenNow(),
"WouldFit: GetFormatted() and then !HasPara()" );
3336 bSplit = !aFrameBreak.
IsInside( aLine );
3346 }
while ( aLine.
Next() );
3355 "SwTextFrame::GetParHeight with swapped frame" );
3364 nRet = o3tl::narrowing<sal_uInt16>(
EmptyHeight());
3380 while ( pLineLayout && pLineLayout->
GetNext() )
3382 pLineLayout = pLineLayout->
GetNext();
3403 Calc(pRenderContext);
3410 if( bFormat && !
FormatQuick( bForceQuickFormat ) )
3439 aFrm.
Width( nPageWidth );
3444 aPrt.
Width( nPageWidth );
3451 aFrm.
Pos().AdjustX(nOldFrameWidth - nPageWidth );
3466 aFrm.
Width( nOldFrameWidth );
3471 aFrm.
Pos() = aOldFramePos;
3477 aPrt.
Width( nOldPrtWidth );
3515 pTextNode->
GetNumRule()->
Get( o3tl::narrowing<sal_uInt16>(nListLevel) );
3542 pPortion->InNumberGrp() && !pPortion->IsFootnoteNumPortion())
3544 nNumberPortionWidth += pPortion->
Width();
3545 pPortion = pPortion->GetNextPortion();
3555 else if ( rNumFormat.
GetNumAdjust() == SvxAdjust::Center )
3585 OSL_ENSURE( pVsh,
"<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" );
3601 OSL_ENSURE( pOut,
"<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
3625 assert(
pLastFont &&
"coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt");
3636 assert(
pLastFont &&
"coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt");
3653 bool bCalcHeightOfLastLine =
true;
3657 bCalcHeightOfLastLine =
false;
3660 if ( bCalcHeightOfLastLine )
3663 "<SwTextFrame::CalcHeightOfLastLine()> - missing paragraph portions." );
3665 while ( pLineLayout && pLineLayout->
GetNext() )
3668 pLineLayout = pLineLayout->
GetNext();
3672 SwTwips nAscent, nDescent, nDummy1, nDummy2;
3683 const SwTwips nNewHeightOfLastLine = nAscent + nDescent;
3687 if ( nNewHeightOfLastLine == 0 )
3724 case SvxInterLineSpaceRule::Prop:
3726 if ( _bNoPropLineSpace )
3745 case SvxInterLineSpaceRule::Fix:
3774 sal_uInt16 nRet = 0;
3789 }
while ( pFrame && pFrame->
GetOffset() <= nPos );
3796 sal_uInt32 nNew = 0;
3828 while( pNxt && pNxt->
IsInTab() )
3831 if(
nullptr != pNxt )
3865 else if ( bRestart &&
FindPageFrame()->FindFirstBodyContent() ==
this )
3886 if ( nOld == nNewNum )
3950 if ( 0 != aRectFnSet.
GetWidth(aRect) )
3955 aRectFnSet.
GetRight(aFlyRect) >= 0 )
3958 aFlyRect, aRectFnSet.
GetLeft(aRect) );
3959 nRet = aRectFnSet.
GetLeft(aRect);
3966 if ( aRectFnSet.
GetLeft(aFlyRect) -
3967 aRectFnSet.
GetLeft(aRect) >= 0 )
3970 aFlyRect, aRectFnSet.
GetRight(aRect) + 1 );
3980 while ( aRectFnSet.
GetWidth(aFlyRect) > 0 );
3988 "SwTextFrame::CalcBasePosForFly with swapped frame!" );
4000 SwTwips nFlyAnchorVertOfstNoWrap = 0;
4008 nFlyAnchorVertOfstNoWrap += pLay->
Height();
4013 nLineHeight = pLay->
Height();
4056 SwRect aRec( pFrame->GetPaintArea() );
4058 SwViewShell *pCurShell = pRootFrame ? pRootFrame->GetCurrShell() :
nullptr;
void HideHidden()
Removes Textfrm's attachments, when it's hidden.
void SetWordCountDirty(bool bNew) const
vcl::RenderContext * GetOut() const
void SetHasRotatedPortions(bool bHasRotatedPortions)
void CalcAdditionalFirstLineOffset()
Simulate format for a list item paragraph, whose list level attributes are in LABEL_ALIGNMENT mode...
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
virtual void Height(const SwTwips nNew, const bool bText=true) override
void Init()
This is public, as it needs to be called by some methods in order to save the Prepare USE WITH CAUTIO...
Base class of the Writer layout elements.
Represents the visualization of a paragraph.
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
void SwitchVerticalToHorizontal(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from vertical to horizontal layout...
LanguageType nOldLanguageType
tools::Long GetRight(const SwRect &rRect) const
SwTwips GetParHeight() const
Returns the sum of line height in pLine.
bool IsFootnoteNum() const
SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
void Right(const tools::Long nRight)
SwTextNode const *const m_pNode
void Add(SwClient *pDepend)
const SwSortedObjs * GetDrawObjs() const
sal_uInt16 GetPropLineSpace() const
void SetWrong(std::unique_ptr< SwWrongList > pNew)
void SetIgnoreCurrentFrame(bool bNew)
SwTwips EmptyHeight() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 GetLineNr() const
Marks a position in the document model.
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
SwContentFrame * GetNextContentFrame() const
static SwTwips lcl_CalcFlyBasePos(const SwTextFrame &rFrame, SwRect aFlyRect, SwTextFly const &rTextFly)
Helper function for SwTextFrame::CalcBasePosForFly()
SwContentNode * GetNode(SwPaM &rPam, bool &rbFirst, SwMoveFnCollection const &fnMove, bool const bInReadOnly, SwRootFrame const *const i_pLayout)
This function returns the next node in direction of search.
const SwPageFrame * GetOrigPage() const
bool IsInRange(const WhichRangesContainer &pRange, const sal_uInt16 nId)
check if ID is in range of attribute set IDs
void SetPosY(SwRect &rRect, tools::Long nNew) const
#define LANGUAGE_ARABIC_SAUDI_ARABIA
LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript, bool bNoChar=false) const
const SwTwips WIDOW_MAGIC
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
const OutputDevice & rOut
const SwLineNumberInfo & GetLineNumberInfo() const
#define LANGUAGE_ENGLISH_US
const OUString & GetText() const
bool IsOutline() const
Returns if this text node is an outline.
bool IsWrongDirty() const
const SwLineLayout * NextLine()
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(162)
SwpHints * GetpSwpHints()
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
void CalcBaseOfstForFly()
void InvalidateAccessibleParaAttrs(const SwTextFrame &rTextFrame)
invalidate attributes for paragraphs and paragraph's characters
void Move(sal_Int32 nPos, sal_Int32 nDiff)
Change all values after the given position.
void Left(const tools::Long nLeft)
void SetCompletePaint() const
SwParaPortion * GetPara()
bool IsInFootnote() const
void SwitchHorizontalToVertical(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from horizontal to vertical layout...
static void repaintTextFrames(const SwTextNode &rNode)
Repaint all text frames of the given text node.
bool FrameContainsNode(SwContentFrame const &rFrame, SwNodeOffset nNodeIndex)
void SetNeedGrammarCheck(bool bVal)
void setSwRect(const SwRect &rNew)
void SetDerivedR2L(bool bNew)
SwTwips CalcFitToContent()
Simulates a formatting as if there were not right margin or Flys or other obstacles and returns the w...
virtual sal_Int32 Len() const override
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
const SwRect & getFramePrintArea() 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! The void*...
virtual bool GetInfo(SfxPoolItem &) const override
void InvalidateLineNum_()
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
void SetInvalidityA(const TextFrameIndex nPos)
SwTextFrame(SwTextNode *const, SwFrame *, sw::FrameMode eMode)
static SwCache & GetCache()
SwTextNode const * GetTextNodeForFirstText() const
constexpr TypedWhichId< SwRegisterItem > RES_PARATR_REGISTER(71)
tools::Long CalcRight(const SwFrame *pCaller) const
sw::MergedPara * GetMergedPara()
The purpose of this class is to be the universal interface between formatting/text output and the pos...
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
constexpr sal_uInt16 RES_FRMATR_END(133)
constexpr sal_uInt8 MAXLEVEL
SwParaPortion * GetPara()
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
void SetIgnoreFly(const bool bNew)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
void CharToLine(TextFrameIndex)
void Format_(vcl::RenderContext *pRenderContext, SwParaPortion *pPara)
const SwLineLayout * Next()
bool IsSmartTagDirty() const
void HideAndShowObjects()
Hides respectively shows objects, which are anchored at paragraph, at/as a character of the paragraph...
void Pos(const Point &rNew)
constexpr TypedWhichId< SwInsText > RES_INS_TXT(164)
bool WouldFit(SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest)
Dialog to specify the properties of date form field.
virtual void Calc(vcl::RenderContext *pRenderContext) const
void MaxAscentDescent(SwTwips &_orAscent, SwTwips &_orDescent, SwTwips &_orObjAscent, SwTwips &_orObjDescent, const SwLinePortion *_pDontConsiderPortion=nullptr, const bool _bNoFlyCntPorAndLinePor=false) const
determine ascent and descent for positioning of as-character anchored object
bool IsKeepAlways() const
Of course Writer needs its own rectangles.
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
tools::Long GetWidth(const SwRect &rRect) const
SwNodeOffset abs(const SwNodeOffset &a)
bool IsShowHiddenPara() const
bool IsCountBlankLines() const
void SetGrammarCheckDirty(bool bNew) const
The root element of a Writer document layout.
WhichRangesContainer const aFrameFormatSetRange(svl::Items< RES_FRMATR_BEGIN, RES_FRMATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1, XATTR_FILL_FIRST, XATTR_FILL_LAST >)
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
sal_uInt16 GetOrphansLines() const
void SetPara(SwParaPortion *pNew, bool bDelete=true)
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
bool TestFormat(const SwFrame *pPrv, SwTwips &nMaxHeight, bool &bSplit)
The WouldFit equivalent for temporarily rewired TextFrames nMaxHeight returns the required size here ...
bool isFrameAreaDefinitionValid() const
void SetOutlineContentVisibilityButton(const SwContentFrame *pContentFrame)
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
void CalcFootnoteFlag(TextFrameIndex nStop=TextFrameIndex(COMPLETE_STRING))
Does the Frame have a local footnote (in this Frame or Follow)?
void CheckDirChange()
checks the layout direction and invalidates the lower frames recursively, if necessary.
virtual void Finish()=0
end of paragraph.
bool FormatQuick(bool bForceQuickFormat)
sal_uInt16 GetPhyPageNum() const
bool IsHiddenNow() const
Hidden.
tools::Long GetTop(const SwRect &rRect) const
Used by the UI to modify the document model.
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
#define CH_TXTATR_BREAKWORD
SwRect GetFrame(const SwRect &rPortion) const
const SwRegisterItem & GetRegister(bool=true) const
SwTwips CalcUpperSpace(const SwBorderAttrs *pAttrs=nullptr, const SwFrame *pPr=nullptr, const bool _bConsiderGrid=true) const
method to determine the upper space hold by the frame
IGrammarContact * getGrammarContact(const SwTextNode &rTextNode)
getGrammarContact() delivers the grammar contact of the document (for a given textnode) ...
void InvalidateNextPrtArea()
method to invalidate printing area of next frame #i11859#
wrapper class for the positioning of Writer fly frames and drawing objects
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
bool IsRestartEachPage() const
const SwScriptInfo * GetScriptInfo() const
Returns the script info stored at the paraportion.
SvxGraphicPosition GetGraphicPos() const
void RemoveFromListRLHidden()
const SwView & GetView() const
SwFrameControlsManager & GetFrameControlsManager()
void SortIfNeedBe() const
Trigger the sorting if necessary.
const SwPageFrame * GetPage() const
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
new delete redline is created
constexpr TypedWhichId< SwDocPosUpdate > RES_DOCPOS_UPDATE(169)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
const SwRect & getFrameArea() const
bool getBrowseMode() const
vcl::text::ComplexTextLayoutFlags m_nOldLayoutMode
const vcl::Font & GetFont() const
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
A wrapper around SfxPoolItem to store the start position of (usually) a text portion, with an optional end.
sal_uLong GetThisLines() const
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
void SetInfo(const SwPageFrame *pPg, const SwFrame *pF)
void SetDelta(tools::Long nDelta)
sal_uInt16 GetCacheIdx() const
sal_Int32 GetStart() const
void SetFntChg(const bool bNew)
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
void InitScriptInfo(const SwTextNode &rNode, sw::MergedPara const *pMerged, bool bRTL)
void Width(tools::Long nNew)
const SwTextFrame * pFrame
const OutputDevice & m_rOut
virtual ~SwTextFrame() override
virtual void LineBreak(sal_Int32 nWidth)=0
line break.
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
SwContentFrame * GetPrevContentFrame() const
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
tools::Long GetLeft(const SwRect &rRect) const
void SetWrongDirty(WrongState eNew) const
sal_Int32 getStart() const
static void lcl_ModifyOfst(SwTextFrame &rFrame, TextFrameIndex const nPos, TextFrameIndex const nLen, TextFrameIndex(*op)(TextFrameIndex const &, TextFrameIndex const &))
SwTextFrame * GetFollow()
TextFrameIndex GetOffset() const
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
void SetIgnoreObjsInHeaderFooter(const bool bNew)
std::vector< Extent > extents
bool IsFollowField() const
bool IsShowOutlineContentVisibilityButton() const
static bool isA11yRelevantAttribute(sal_uInt16 nWhich)
Related: fdo#56031 filter out attribute changes that don't matter for humans/a11y to stop flooding th...
void MoveGrammar(sal_Int32 nPos, sal_Int32 nDiff)
void PrepWidows(const sal_uInt16 nNeed, bool bNotify)
exports com.sun.star. text
const Color & GetColor() const
Describes a part of a single text node, which will be part of a text frame, even when redlines are hi...
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
SwTextNode * GetTextNodeFirst()
void SetInvalidVert(bool bNew)
SwTextNode const * GetTextNodeForParaProps() const
void InvalidateAutoCompleteWords() const
delete redline is removed
void SetIgnoreContour(bool bNew)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
bool IsFootnoteNumPortion() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SwTwips CalcFitToContent_()
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(167)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void InvalidateSpelling() const
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
void SetSmartTagDirty(bool bNew) const
Collection of SwLinePortion instances, representing one line of text.
SwTwips GetRealHeight() const
bool IsInside(SwTextMargin const &rLine) const
BP 18.6.93: Widows.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
SwIndex & Assign(SwIndexReg *, sal_Int32)
static SwSmartTagMgr & Get()
tools::Long CalcLeft(const SwFrame *pCaller) const
SwPageFrame * FindPageFrame()
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
sal_uLong GetAllLines() const
For displaying the line numbers.
Helper class which can be used instead of the macros if a function has too many returns.
SwCharRange & GetReformat()
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
void UpdateOutlineContentVisibilityButton(SwWrtShell *pWrtSh) const
void setSwRect(const SwRect &rNew)
SwContentFrame * FindNextCnt(const bool _bInSameFootnote=false)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
void ManipOfst(TextFrameIndex const nNewOfst)
SwContentNode * GetContentNode()
SwNodeOffset GetIndex() const
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
SwLinePortion * GetFirstPortion() const
tools::Long GetHeight(const SwRect &rRect) const
void InvalidateRange(const SwCharRange &, const tools::Long=0)
iterate SwTextAttr in potentially merged text frame
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
constexpr TypedWhichId< SwVirtPageNumInfo > RES_VIRTPAGENUM_INFO(180)
void SetAutoCompleteWordDirty(bool bNew) const
void SetRight(SwRect &rRect, tools::Long nNew) const
virtual const SwFlyFrame * DynCastFlyFrame() const
SwLayoutFrame * GetUpper()
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
bool Relax(const SwRect &rRect)
If there is no flying object frame standing in rRect (usually the current row), then we are turning o...
void SetOffset_(TextFrameIndex nNewOfst)
void InvalidateSmartTags() const
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(163)
bool isFramePrintAreaValid() const
SwGrammarMarkUp * GetGrammarCheck()
bool IsUndersized() const
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
virtual void HandlePortion(SwPortionHandler &rPH) const
virtual bool SetFieldsDirty(bool b, const SwNode *pChk, SwNodeOffset nLen)=0
void Invalidate(sal_Int32 nBegin, sal_Int32 nEnd)
Provides access to settings of a document.
bool IsNoTextNode() const
SvxInterLineSpaceRule GetInterLineSpaceRule() const
SwTextFrame * GetFormatted(bool bForceQuickFormat=false)
In case the SwLineLayout was cleared out of the s_pTextCache, recreate it.
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
void SetSmartTags(std::unique_ptr< SwWrongList > pNew)
void RemoveFootnotesForNode(SwRootFrame const &rLayout, SwTextNode const &rTextNode, std::vector< std::pair< sal_Int32, sal_Int32 >> const *const pExtents)
void Modify(bool bChgToRTL)
SwWrongList * GetSmartTags()
Marks a node in the document model.
void RemoveFromCache()
Removes this frame completely from the Cache.
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
text is moved into pDestNode
void TruncLines(bool bNoteFollow=false)
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
void SSize(const Size &rNew)
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
TextFrameIndex GetParLen() const
bool isFrameAreaSizeValid() const
static void lcl_SetScriptInval(SwTextFrame &rFrame, TextFrameIndex const nPos)
TextFrameIndex GetLen() const
void CalcHeightOfLastLine(const bool _bUseFont=false)
method to determine height of last line, needed for proportional line spacing
A page of the document layout.
SfxItemPool * GetPool() const
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(TextFrameIndex nIndex) const
map position in potentially merged text frame to SwPosition
void InvalidateWindows(const SwRect &rRect)
virtual void Format(vcl::RenderContext *pRenderContext, const SwBorderAttrs *pAttrs=nullptr) override
short GetInterLineSpace() const
< purpose of derivation from SwClient: character style for displaying the numbers.
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNodeIndex const &rNode)
bool isPARATR(const sal_uInt16 nWhich)
SwFieldType * GetTyp() const
SwSectionFrame * FindSctFrame()
const SwNodeIndex * GetContentIdx() const
MergedAttrIterByEnd(SwTextFrame const &rFrame)
constexpr TypedWhichId< SvxRsidItem > RES_CHRATR_RSID(39)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
Base class for anything that can be part of a line in the Writer layout.
const SwNumFormat & Get(sal_uInt16 i) const
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
void SetTopAndHeight(SwRect &rRect, tools::Long nTop, tools::Long nHeight) const
void SetPosX(SwRect &rRect, tools::Long nNew) const
bool IsLayoutFrame() const
bool IsPrepMustFit() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void Bottom(const tools::Long nBottom)
SwTextNode is a paragraph in the document model.
void Broadcast(const SfxHint &rHint)
sal_uInt16 GetLineCount(TextFrameIndex nPos)
Determines the line count.
void SetDevFont(const SwViewShell *pSh, OutputDevice &rOut)
bool IsBreakNow(SwTextMargin &rLine)
void SetWidth(SwRect &rRect, tools::Long nNew) const
An SwTextAttr container, stores all directly formatted text portions for a text node.
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(105)
tools::Long GetBottomMargin(const SwFrame &rFrame) const
SwTwips mnAdditionalFirstLineOffset
bool UpdateQuoVadis(std::u16string_view rQuo)
Is called in SwTextFrame::Prepare()
void SetOffset(TextFrameIndex nNewOfst)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
virtual SwFrameFormat & GetFrameFormat()=0
#define SAL_WARN_IF(condition, area, stream)
SwTextFrame * FindMaster() const
constexpr tools::Long Height() const
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
void ClearPara()
Removes the Line information from the Cache but retains the entry itself.
const SwViewOption * GetViewOptions() const
vcl::Window * GetWin() const
const SwFrame * ContainsAny(const bool _bInvestigateFootnoteForSections=false) const
Method doesn't investigate content of footnotes by default.
void SetFont(const vcl::Font &rNewFont)
tools::Long GetLineSpace(const bool _bNoPropLineSpacing=false) const
Returns the additional line spacing for the next paragraph.
SwTextNode const *const m_pNode
MergedAttrIterBase(SwTextFrame const &rFrame)
static TextFrameIndex UpdateMergedParaForInsert(MergedPara &rMerged, bool const isRealInsert, SwTextNode const &rNode, sal_Int32 const nIndex, sal_Int32 const nLen)
void SetFieldFollow(const bool bNew)
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
sal_Int32 GetIndex() const
bool IsCountedInList() const
void SetHeight(SwRect &rRect, tools::Long nNew) const
bool IsNoTextFrame() const
SwTwips GetHeightOfLastLine() const
void SetMergedPara(std::unique_ptr< sw::MergedPara > p)
void SwapWidthAndHeight()
Swaps width and height of the text frame.
LanguageType GetAppLanguage()
IDocumentSettingAccess const & getIDocumentSettingAccess() const
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
SwTwips mnFlyAnchorOfstNoWrap
bool IsRightToLeft() const
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
void Top(const tools::Long nTop)
bool FieldHidesPara(const SwField &rField) const
static TextFrameIndex FindBrk(const OUString &rText, TextFrameIndex nStart, TextFrameIndex nEnd)
Returns the first possible break point in the current line.
TextFrameIndex CalcFlyPos(SwFrameFormat const *pSearch)
Calculates the position of FlyInContentFrames.
virtual OutputDevice * getReferenceDevice(bool bCreate) const =0
Returns the current reference device.
MergedAttrIterReverse(SwTextFrame const &rFrame)
const SwLineLayout * PrevLine()
bool sw_HideObj(const SwTextFrame &_rFrame, const RndStdIds _eAnchorType, SwPosition const &rAnchorPos, SwAnchoredObject *_pAnchoredObj)
as-character anchored graphics, which are used for a graphic bullet list.
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
SwScriptInfo & GetScriptInfo()
double getLength(const B2DPolygon &rCandidate)
const std::vector< sal_uInt16 > & getFmtAttrs() const
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
virtual void Skip(TextFrameIndex nLength)=0
skip characters.
void SetWidow(const bool bNew)
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
static void lcl_SetWrong(SwTextFrame &rFrame, SwTextNode const &rNode, sal_Int32 const nPos, sal_Int32 const nCnt, bool const bMove)
bool IsFixLineHeight() const
static bool GetBoundsOfHiddenRange(const SwTextNode &rNode, sal_Int32 nPos, sal_Int32 &rnStartPos, sal_Int32 &rnEndPos, std::vector< sal_Int32 > *pList=nullptr)
Hidden text range information - static and non-version.
constexpr sal_Int32 COMPLETE_STRING
void SetPrepMustFit(const bool bNew)
static bool lcl_ErgoVadis(SwTextFrame *pFrame, TextFrameIndex &rPos, const PrepareHint ePrep)
void setHeight(tools::Long nHeight)
const SwLineLayout * GetCurr() const
SwTextNode const * pLastNode
mainly for sanity checks
tools::Long GetBottom(const SwRect &rRect) const
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
SwDocPosUpdate is sent to signal that only the frames from or to a specified document-global position...
virtual void DestroyImpl() override
SwFootnoteIdxs & GetFootnoteIdxs()
void ClearItem(sal_uInt16 nWhichL)
void SetLeft(SwRect &rRect, tools::Long nNew) const
SwTwips mnHeightOfLastLine
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst) override
nMaxHeight is the required height bSplit indicates, that the paragraph has to be split bTst indicates...
constexpr TypedWhichId< SwFormatLineNumber > RES_LINENUMBER(116)
tools::Long GetDelta() const
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLBACKGROUND)
bool HasMergedParas() const
static bool hasA11yRelevantAttribute(const std::vector< sal_uInt16 > &rWhichFmtAttr)
A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
bool IsShowHiddenChar(bool bHard=false) const
sal_uInt16 getWhichAttr() const
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
SwTwips GetLineHeight() const
constexpr TypedWhichId< SwDelChr > RES_DEL_CHR(165)
TextFrameIndex GetEnd() const
sal_uInt16 GetDropLines() const
sal_uInt16 FirstLineHeight() const
Returns the first line height.
void VisitPortions(SwPortionHandler &rPH) const
Visit all portions for Accessibility.
SwLinePortion * GetNextPortion() const
void InvalidateWordCount() const
SwViewShell * GetCurrShell() const
void InvalidateRange_(const SwCharRange &, const tools::Long=0)
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...
class for collecting anchored objects
void Height(tools::Long nNew)
constexpr TypedWhichId< SwDelText > RES_DEL_TXT(166)
SwPosition MapViewToModelPos(TextFrameIndex nIndex) const
SdrObjUserCall * GetUserCall() const
bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const
sw::MergedPara const *const m_pMerged
Merge GetRedlineMergeFlag() const
tools::Long GetHeight() const
const SwFootnoteInfo & GetFootnoteInfo() const
SwRootFrame * getRootFrame()
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
void SetInvalid(sal_Int32 nBegin, sal_Int32 nEnd)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_MSG_BEGIN)
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd)
virtual void SwClientNotify(SwModify const &rModify, SfxHint const &rHint) override
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNodeIndex const &rPos)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
virtual void DestroyImpl() override
bool isPARATR_LIST(const sal_uInt16 nWhich)
bool m_bDetectedRangeSegmentation false
#define PROTOCOL_ENTER(pFrame, nFunc, nAct, pPar)
SwTabFrame * FindTabFrame()
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
const SwFormatLineNumber & GetLineNumber(bool=true) const
SwLayoutModeModifier(const OutputDevice &rOutp)