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())
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();
254 *ppNode = rExtent.
pNode;
297 SwNodeOffset const nFirst(pMerged->pFirstNode->GetIndex());
298 SwNodeOffset const nLast(pMerged->pLastNode->GetIndex());
299 return (nFirst <= nNodeIndex && nNodeIndex <= nLast);
353 std::pair<SwTextNode *, SwTextNode *>
363 return std::make_pair(pMerged->pFirstNode,
const_cast<SwTextNode*
>(pMerged->pLastNode));
367 return std::make_pair(pTextNode, pTextNode);
373 rNode.SwContentNode::GetAttr(rFormatSet);
377 if (
sw::MergedPara const*
const pMerged = pFrame ? pFrame->GetMergedPara() :
nullptr)
379 if (pMerged->pFirstNode != &rNode)
384 "first-node items must be adjacent");
386 pMerged->pFirstNode->SwContentNode::GetAttr(firstSet);
387 rFormatSet.
Put(firstSet);
390 if (pMerged->pParaPropsNode != &rNode)
406 propsSet(*rFormatSet.
GetPool());
407 pMerged->pParaPropsNode->SwContentNode::GetAttr(propsSet);
408 rFormatSet.
Put(propsSet);
409 return *pMerged->pParaPropsNode;
428 aPrt.
Pos().setX( aPrt.
Pos().Y() );
432 aPrt.
Pos().setY( nPrtOfstX );
442 aPrt.
Pos().setY( aPrt.
Pos().X() );
446 aPrt.
Pos().setX( nPrtOfstY );
463 aFrm.
Height( nFrameWidth );
523 rRect.
Width( nHeight );
538 "SwTextFrame::SwitchHorizontalToVertical, IsVertLRBT, not swapped");
539 Point aPoint(rPoint);
571 Point aTmp( 0, nLimit );
613 rRect.
Width( nWidth );
662 Point aTmp( nLimit, 0 );
668 : pFrame( pTextFrame ), bUndo( false )
691 rRect.
Width( nWidth );
702 m_rOut( rOutp ), m_nOldLayoutMode( rOutp.GetLayoutMode() )
725 rOut( rOutp ), nOldLanguageType( rOutp.GetDigitLanguage() )
752 OSL_ENSURE( !
IsLocked(),
"+SwTextFrame::Init: this is locked." );
769 , mnFlyAnchorOfst( 0 )
770 , mnFlyAnchorOfstNoWrap( 0 )
771 , mnFlyAnchorVertOfstNoWrap( 0 )
772 , mnFootnoteLine( 0 )
773 , mnHeightOfLastLine( 0 )
774 , mnAdditionalFirstLineOffset( 0 )
776 , mnCacheIndex( USHRT_MAX )
779 , mbJustWidow( false )
781 , mbInFootnoteConnect( false )
782 , mbFootnote( false )
784 , mbHasRotatedPortions( false )
785 , mbFieldFollow( false )
786 , mbHasAnimation( false )
787 , mbIsSwapped( false )
788 , mbFollowFormatAllowed( true )
798 (void)xmlTextWriterStartElement(writer,
reinterpret_cast<const xmlChar*
>(
"txt"));
803 (void)xmlTextWriterStartElement( writer, BAD_CAST(
"merged" ) );
804 (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST(
"paraPropsNodeIndex" ),
"%" SAL_PRIdINT32, sal_Int32(pMerged->
pParaPropsNode->
GetIndex()) );
805 for (
auto const& e : pMerged->
extents)
807 (void)xmlTextWriterStartElement( writer, BAD_CAST(
"extent" ) );
808 (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST(
"txtNodeIndex" ),
"%" SAL_PRIdINT32, sal_Int32(e.pNode->GetIndex()) );
809 (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST(
"start" ),
"%" SAL_PRIdINT32, e.nStart );
810 (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST(
"end" ),
"%" SAL_PRIdINT32, e.nEnd );
811 (void)xmlTextWriterEndElement( writer );
813 (void)xmlTextWriterEndElement( writer );
816 (void)xmlTextWriterStartElement(writer, BAD_CAST(
"infos"));
818 (void)xmlTextWriterEndElement(writer);
822 if ( pAnchored && pAnchored->
size() > 0 )
824 (void)xmlTextWriterStartElement( writer, BAD_CAST(
"anchored" ) );
831 (void)xmlTextWriterEndElement( writer );
836 for (
int i = 0;
i < 32;
i++ )
838 aText = aText.replace(
i,
'*' );
840 auto nTextOffset =
static_cast<sal_Int32
>(
GetOffset());
841 sal_Int32 nTextLength = aText.getLength() - nTextOffset;
844 nTextLength =
static_cast<sal_Int32
>(pTextFrameFollow->GetOffset() -
GetOffset());
849 =
OUStringToOString(aText.subView(nTextOffset, nTextLength), RTL_TEXTENCODING_UTF8);
850 (void)xmlTextWriterWriteString( writer,
851 reinterpret_cast<const xmlChar *
>(aText8.getStr( )) );
855 (void)xmlTextWriterStartElement(writer, BAD_CAST(
"SwParaPortion"));
857 const OUString& rText =
GetText();
858 (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST(
"ptr"),
"%p", pPara);
866 (void)xmlTextWriterStartElement(writer, BAD_CAST(
"SwLineLayout"));
874 (void)xmlTextWriterEndElement(writer);
877 (void)xmlTextWriterEndElement(writer);
880 (void)xmlTextWriterEndElement(writer);
893 std::vector<std::pair<sal_Int32, sal_Int32>>
const*
const pExtents)
895 if (pExtents && pExtents->empty())
905 while (
nPos && rTextNode == (rFootnoteIdxs[
nPos ]->GetTextNode()))
907 if (
nPos || rTextNode != (rFootnoteIdxs[
nPos ]->GetTextNode()))
918 while ((*pExtents)[iter].second <= pTextFootnote->GetStart())
921 if (iter == pExtents->size())
926 if (pTextFootnote->
GetStart() < (*pExtents)[iter].first)
950 if (e.pNode != pNode)
973 pView->GetEditWin().GetFrameControlsManager().RemoveControls(
this);
989 bool const isRealInsert,
990 SwTextNode const& rNode, sal_Int32
const nIndex, sal_Int32
const nLen)
992 assert(!isRealInsert || nLen);
1001 sal_Int32 nTFIndex(0);
1002 sal_Int32 nInserted(0);
1003 bool bInserted(
false);
1004 bool bFoundNode(
false);
1005 auto itInsert(rMerged.
extents.end());
1006 for (
auto it = rMerged.
extents.begin(); it != rMerged.
extents.end(); ++it)
1008 if (it->pNode == &rNode)
1013 if (it->nStart <=
nIndex && nIndex <= it->nEnd)
1015 text.insert(nTFIndex + (
nIndex - it->nStart),
1022 else if (nIndex < it->nStart)
1024 if (itInsert == rMerged.
extents.end())
1034 assert(it == rMerged.
extents.begin() || (it-1)->pNode != &rNode || (it-1)->nEnd <
nIndex);
1035 if (
nIndex + nLen < it->nStart)
1040 if (nIndex < it->nStart)
1042 text.insert(nTFIndex,
1044 nInserted += it->nStart -
nIndex;
1048 assert(it->nStart <=
nIndex);
1049 if (nIndex <= it->nEnd)
1051 nTFIndex += it->nEnd - it->nStart;
1052 while (it->nEnd <
nIndex + nLen)
1055 (it+1) != rMerged.
extents.end() && (it+1)->pNode == it->pNode
1058 if (pNext && pNext->nStart <=
nIndex + nLen)
1060 text.insert(nTFIndex,
1061 rNode.
GetText().subView(it->nEnd, pNext->nStart - it->nEnd));
1062 nTFIndex += pNext->nStart - it->nEnd;
1063 nInserted += pNext->nStart - it->nEnd;
1064 pNext->nStart = it->nStart;
1065 it = rMerged.
extents.erase(it);
1069 text.insert(nTFIndex,
1070 rNode.
GetText().subView(it->nEnd,
nIndex + nLen - it->nEnd));
1071 nTFIndex +=
nIndex + nLen - it->nEnd;
1072 nInserted +=
nIndex + nLen - it->nEnd;
1073 it->nEnd =
nIndex + nLen;
1081 else if (rNode.
GetIndex() < it->pNode->GetIndex() || bFoundNode)
1083 if (itInsert == rMerged.
extents.end())
1089 if (itInsert == rMerged.
extents.end())
1091 nTFIndex += it->nEnd - it->nStart;
1100 if (rMerged.
extents.size() == 1
1120 bool const isRealDelete,
1121 SwTextNode const& rNode, sal_Int32 nIndex, sal_Int32
const nLen)
1126 sal_Int32 nTFIndex(0);
1127 sal_Int32 nToDelete(nLen);
1128 sal_Int32 nDeleted(0);
1129 size_t nFoundNode(0);
1131 auto it = rMerged.
extents.begin();
1132 for (; it != rMerged.
extents.end(); )
1135 if (it->pNode == &rNode)
1138 if (
nIndex + nToDelete < it->nStart)
1150 if (nIndex < it->nStart)
1153 nToDelete -= it->nStart -
nIndex;
1157 if (it->nStart <=
nIndex && nIndex < it->nEnd)
1159 sal_Int32
const nDeleteHere(
nIndex + nToDelete <= it->nEnd
1162 text.remove(nTFIndex + (
nIndex - it->nStart), nDeleteHere);
1163 bErase = nDeleteHere == it->nEnd - it->nStart;
1167 assert(it->nStart ==
nIndex);
1168 it = rMerged.
extents.erase(it);
1170 else if (isRealDelete)
1172 it->nStart -= (nLen - nToDelete);
1173 it->nEnd -= (nLen - nToDelete + nDeleteHere);
1174 if (it != rMerged.
extents.begin()
1175 && (it-1)->pNode == &rNode
1176 && (it-1)->nEnd == it->nStart)
1178 nTFIndex += it->nEnd - it->nStart;
1179 (it-1)->nEnd = it->nEnd;
1180 it = rMerged.
extents.erase(it);
1186 if (
nIndex + nDeleteHere == it->nEnd)
1188 it->nEnd -= nDeleteHere;
1192 if (
nIndex == it->nStart)
1194 it->nStart += nDeleteHere;
1198 sal_Int32
const nOldEnd(it->nEnd);
1200 it = rMerged.
extents.emplace(it+1,
1201 it->pNode,
nIndex + nDeleteHere, nOldEnd);
1203 assert(nDeleteHere == nToDelete);
1206 nDeleted += nDeleteHere;
1207 nToDelete -= nDeleteHere;
1209 if (!isRealDelete && nToDelete == 0)
1216 else if (nFoundNode != 0)
1222 nTFIndex += it->nEnd - it->nStart;
1232 if (nErased && nErased == nFoundNode)
1240 : rMerged.
extents.front().pNode;
1250std::pair<SwTextNode*, sal_Int32>
1253 sal_Int32
nIndex(i_nIndex);
1255 for (
const auto& rExt : rMerged.
extents)
1264 assert(
nIndex == 0 &&
"view index out of bounds");
1266 ? std::make_pair(pExtent->
pNode, pExtent->
nEnd)
1275 bool bFoundNode(
false);
1276 for (
auto const& e : rMerged.
extents)
1278 if (pNode->
GetIndex() < e.pNode->GetIndex())
1282 if (e.pNode == pNode)
1288 else if (
nIndex < e.nStart)
1295 else if (bFoundNode)
1299 nRet += e.nEnd - e.nStart;
1304 assert(nIndex <= pNode->Len());
1307 else if (rMerged.
extents.empty())
1309 assert(nIndex <= pNode->Len());
1317std::pair<SwTextNode*, sal_Int32>
1328 return std::make_pair(
static_cast<SwTextNode*
>(
const_cast<sw::BroadcastingModify*
>(
1408 return pMerged->
extents.empty()
1410 : pMerged->
extents.front().pNode;
1431 sal_uInt16
const nScript,
bool const bNoChar)
const
1435 return pos.first->GetLang(
pos.second, bNoChar ? 0 : 1, nScript);
1443 pPara->ResetPreps();
1457 bool bHiddenCharsHidePara(
false);
1458 bool bHiddenParaField(
false);
1466 nHiddenStart, nHiddenEnd);
1473 nHiddenStart, nHiddenEnd);
1478 bHiddenCharsHidePara =
true;
1482 int nNewResultWeight = 0;
1490 if (nCurWeight > nNewResultWeight)
1492 nNewResultWeight = nCurWeight;
1495 else if (nCurWeight == nNewResultWeight && bHiddenParaField)
1512 if ( pVsh && ( bHiddenCharsHidePara || bHiddenParaField ) )
1516 ( bHiddenParaField &&
1519 ( bHiddenCharsHidePara &&
1526 bool isAllHidden(
true);
1528 pNext !=
nullptr; pNext = pNext->
FindNextCnt(
true))
1530 if (!pNext->IsTextFrame()
1533 isAllHidden =
false;
1539 SAL_INFO(
"sw.core",
"unhiding one body paragraph");
1554 "HideHidden on visible frame of hidden frame has follow" );
1601 if (_eAnchorType == RndStdIds::FLY_AT_CHAR)
1614 ? rNode.
GetText()[nObjAnchorPos]
1623 static_cast<const SwTextFlyCnt*
>(pHint)->GetFlyCnt().GetFrameFormat();
1634 aRectFnSet.
SetWidth( aLastCharRect, 1 );
1670 if ((eAnchorType != RndStdIds::FLY_AT_CHAR) ||
1683 const bool bShouldBeHidden = !pVsh || !pVsh->
GetWin() ||
1696 if (eAnchorType == RndStdIds::FLY_AT_PARA)
1700 else if ((eAnchorType == RndStdIds::FLY_AT_CHAR) ||
1701 (eAnchorType == RndStdIds::FLY_AS_CHAR))
1703 sal_Int32 nHiddenStart;
1704 sal_Int32 nHiddenEnd;
1720 OSL_FAIL(
"<SwTextFrame::HideAndShowObjects()> - object not anchored at/inside paragraph!?" );
1729 OSL_ENSURE(pMaster,
"SwTextFrame without master");
1745 sal_Int32 nFound = sal_Int32(nStart);
1746 const sal_Int32 nEndLine =
std::min(sal_Int32(nEnd), sal_Int32(aText.size()) - 1);
1749 while( nFound <= nEndLine &&
' ' == aText[nFound] )
1758 while( nFound <= nEndLine &&
' ' != aText[nFound] )
1771#if defined __GNUC__ && !defined __clang__
1772#pragma GCC diagnostic push
1773#pragma GCC diagnostic ignored "-Wstrict-overflow"
1776#if defined __GNUC__ && !defined __clang__
1777#pragma GCC diagnostic pop
1794 return pPara && (
nPos <= nMax + pPara->
GetLen() );
1824 if(aRange != rReformat) {
1828 rReformat += aRange;
1840 "SwTextFrame::CalcLineSpace with swapped frame!" );
1909 sal_Int32
const nPos, sal_Int32
const nCnt,
bool const bMove)
1911 if ( !rFrame.IsFollow() )
1939 const sal_Int32 nEnd =
nPos + (nCnt > 0 ? nCnt : 1 );
1996 bool & o_rbRecalcFootnoteFlag,
1999 sal_Int32
const nDestStart,
2000 sal_Int32
const nSourceStart,
2001 sal_Int32
const nLen)
2003 std::vector<std::pair<sal_Int32, sal_Int32>> deleted;
2004 sal_Int32
const nSourceEnd(nSourceStart + nLen);
2005 sal_Int32 nLastEnd(0);
2006 for (
const auto& rExt : rMerged.
extents)
2008 if (rExt.pNode == &rNode)
2010 sal_Int32
const nStart(std::max(nLastEnd, nSourceStart));
2011 sal_Int32
const nEnd(
std::min(rExt.nStart, nSourceEnd));
2014 deleted.emplace_back(nStart, nEnd);
2016 nLastEnd = rExt.nEnd;
2017 if (nSourceEnd <= rExt.nEnd)
2022 else if (rNode.
GetIndex() < rExt.pNode->GetIndex())
2027 if (nLastEnd != rNode.
Len())
2029 if (nLastEnd < nSourceEnd)
2031 deleted.emplace_back(std::max(nLastEnd, nSourceStart), nSourceEnd);
2034 if (deleted.empty())
2037 o_rbRecalcFootnoteFlag =
true;
2038 for (
auto const& it : deleted)
2040 sal_Int32
const nStart(it.first - nSourceStart + nDestStart);
2042 rDestNode, nStart, it.second - it.first);
2048 lcl_SetWrong(rTextFrame, rDestNode, nStart, it.first - it.second,
false);
2050 lcl_ModifyOfst(rTextFrame, nIndex, nDeleted, &o3tl::operator-<sal_Int32, Tag_TextFrameIndex>);
2061#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2069 for( sal_uInt16 nWhich : rWhichFmtAttr )
2094 sal_uInt16 nWhich = 0;
2095 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
2098 pOld = pHint->m_pOld;
2099 pNew = pHint->m_pNew;
2100 nWhich = pHint->GetWhich();
2102 else if (rHint.
GetId() == SfxHintId::SwInsertText)
2106 else if (rHint.
GetId() == SfxHintId::SwDeleteText)
2110 else if (rHint.
GetId() == SfxHintId::SwDeleteChar)
2114 else if (rHint.
GetId() == SfxHintId::SwDocPosUpdateAtIndex)
2123 &pDocPosAt->m_rNode,
2124 pDocPosAt->m_nIndex));
2128 else if (
auto const pHt =
dynamic_cast<sw::MoveText const*
>(&rHint))
2134 pRedlineDelText = pHynt;
2138 pRedlineUnDelText = pHnt;
2142 assert(!
"unexpected hint");
2161 if (pAttrNode != &rModify)
2200 bool bSetFieldsDirty =
false;
2201 bool bRecalcFootnoteFlag =
false;
2203 if (pRedlineDelText)
2207 sal_Int32
const nNPos = pRedlineDelText->
nStart;
2208 sal_Int32
const nNLen = pRedlineDelText->
nLen;
2212 const sal_Int32
m = -nNLen;
2221 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2226 else if (pRedlineUnDelText)
2230 sal_Int32
const nNPos = pRedlineUnDelText->
nStart;
2231 sal_Int32
const nNLen = pRedlineUnDelText->
nLen;
2249 bSetFieldsDirty =
true;
2262 bRecalcFootnoteFlag,
2274 else if (pInsertText)
2278 bool isHidden(
false);
2311 bSetFieldsDirty =
true;
2316 else if (pDeleteText)
2327 const sal_Int32
m = -pDeleteText->
nLen;
2339 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2343 else if (pDeleteChar)
2359 bSetFieldsDirty = bRecalcFootnoteFlag =
true;
2363 else switch (nWhich)
2375 sal_Int32
const nNPos = pNewUpdate->
getStart();
2376 sal_Int32
const nNLen = pNewUpdate->
getEnd() - nNPos;
2395 lcl_SetWrong( *
this, rNode, nNPos, nNPos + nNLen,
false );
2400#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2441 sal_Int32
const nNPos =
static_cast<const SwFormatField*
>(pNew)->GetTextField()->GetStart();
2455 bSetFieldsDirty =
true;
2468 assert(rNode ==
static_cast<const SwFormatFootnote*
>(pNew)->GetTextFootnote()->GetTextNode());
2470 static_cast<const SwFormatFootnote*
>(pNew)->GetTextFootnote()->GetStart());
2504 if( pItem == pOldItem )
2515 bool bLineSpace = SfxItemState::SET == rNewSet.
GetItemState(
2519 if ( bLineSpace || bRegister )
2575 if( !pFly->IsFlyInContentFrame() )
2578 pFly->GetAttrSet()->GetBackground();
2590 pFly->SetCompletePaint();
2591 pFly->InvalidatePage();
2598 if ( SfxItemState::SET ==
2604 else if ( SfxItemState::SET ==
2606 SfxItemState::SET ==
2608 SfxItemState::SET ==
2611 else if ( SfxItemState::SET ==
2613 SfxItemState::SET ==
2615 SfxItemState::SET ==
2618 else if ( SfxItemState::SET ==
2678 if ( 0x04 & nClear )
2691 if ( 0x08 & nClear )
2705#if !ENABLE_WASM_STRIP_ACCESSIBILITY
2721 bSetFieldsDirty =
true;
2736 if (
nullptr != pNxt )
2742 if( bSetFieldsDirty )
2745 if ( bRecalcFootnoteFlag )
2755 return pPage->UpdateVirtPageNumInfo(rInfo,
this);
2762 OSL_ENSURE(
GetFollow() && nNeed,
"+SwTextFrame::Prepare: lost all friends");
2769 sal_uInt16 nHave = nNeed;
2825 if( pFrame->HasFollow() )
2836#if defined __GNUC__ && !defined __clang__
2837# pragma GCC diagnostic push
2838# pragma GCC diagnostic ignored "-Wstrict-overflow"
2843 bool bParaPossiblyInvalid =
false;
2871 if( aTextFly.
IsOn() )
2874 if ( aTextFly.
Relax() || IsUndersized() )
2888 return bParaPossiblyInvalid;
2903 OSL_ENSURE( !
IsLocked(),
"SwTextFrame::Prepare: three of a perfect pair" );
2908 return bParaPossiblyInvalid;
2950 return bParaPossiblyInvalid;
2952 PrepWidows( *
static_cast<const sal_uInt16 *
>(pVoid), bNotify );
3032 const sal_uInt16 nWhich = pHt->Which();
3039 if( IsUndersized() )
3058 bool bFormat = pPara->
HasFly();
3073 for (
size_t i = 0;
i < nCnt; ++
i )
3079 == RndStdIds::FLY_AT_CHAR )
3090 if( aTextFly.
IsOn() )
3093 const bool bRelaxed = aTextFly.
Relax();
3094 bFormat = bRelaxed || IsUndersized();
3128 return bParaPossiblyInvalid;
3130 if (bParaPossiblyInvalid)
3146 bParaPossiblyInvalid =
true;
3152 if (
nullptr != pNxt )
3167 OSL_ENSURE(
GetFollow(),
"PrepareHint::FootnoteInvalidationGone may only be called by Follow" );
3174 return bParaPossiblyInvalid;
3191 return bParaPossiblyInvalid;
3222 return bParaPossiblyInvalid;
3230 return bParaPossiblyInvalid;
3232#if defined __GNUC__ && !defined __clang__
3233# pragma GCC diagnostic pop
3255 : pFrame( pTextFrame )
3268 aRectFnSet.
SetHeight( aFrm, nMaxHeight );
3290 aRectFnSet.
SetPosY(aPrt, nUpper );
3301 OSL_ENSURE( !
pFrame->
IsSwapped(),
"A frame is swapped before Format_" );
3314 OSL_ENSURE( !
pFrame->
IsSwapped(),
"A frame is swapped after Format_" );
3359 "SwTextFrame::WouldFit with swapped frame" );
3377 if( rMaxHeight < nHeight )
3381 rMaxHeight -= nHeight;
3388 OSL_ENSURE(
HasPara() ||
IsHiddenNow(),
"WouldFit: GetFormatted() and then !HasPara()" );
3437 bSplit = !aFrameBreak.
IsInside( aLine );
3447 }
while ( aLine.
Next() );
3456 "SwTextFrame::GetParHeight with swapped frame" );
3462 if( IsUndersized() )
3465 nRet = o3tl::narrowing<sal_uInt16>(
EmptyHeight());
3481 while ( pLineLayout && pLineLayout->
GetNext() )
3483 pLineLayout = pLineLayout->
GetNext();
3504 Calc(pRenderContext);
3511 if( bFormat && !
FormatQuick( bForceQuickFormat ) )
3540 aFrm.
Width( nPageWidth );
3545 aPrt.
Width( nPageWidth );
3552 aFrm.
Pos().AdjustX(nOldFrameWidth - nPageWidth );
3567 aFrm.
Width( nOldFrameWidth );
3572 aFrm.
Pos() = aOldFramePos;
3578 aPrt.
Width( nOldPrtWidth );
3616 pTextNode->
GetNumRule()->
Get( o3tl::narrowing<sal_uInt16>(nListLevel) );
3645 nNumberPortionWidth += pPortion->
Width();
3656 else if ( rNumFormat.
GetNumAdjust() == SvxAdjust::Center )
3686 OSL_ENSURE( pVsh,
"<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no SwViewShell" );
3702 OSL_ENSURE(
pOut,
"<SwTextFrame::_GetHeightOfLastLineForPropLineSpacing()> - no OutputDevice" );
3726 assert(
pLastFont &&
"coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt");
3737 assert(
pLastFont &&
"coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt");
3740 pOut->SetFont( aOldFont );
3748 if ( IsUndersized() )
3754 bool bCalcHeightOfLastLine =
true;
3758 bCalcHeightOfLastLine =
false;
3761 if ( bCalcHeightOfLastLine )
3764 "<SwTextFrame::CalcHeightOfLastLine()> - missing paragraph portions." );
3766 while ( pLineLayout && pLineLayout->
GetNext() )
3769 pLineLayout = pLineLayout->
GetNext();
3773 SwTwips nAscent, nDescent, nDummy1, nDummy2;
3784 const SwTwips nNewHeightOfLastLine = nAscent + nDescent;
3788 if ( nNewHeightOfLastLine == 0 )
3825 case SvxInterLineSpaceRule::Prop:
3827 if ( _bNoPropLineSpace )
3846 case SvxInterLineSpaceRule::Fix:
3875 sal_uInt16 nHeight(0);
3878 nHeight += pLine->Height();
3879 bool hasNonFly(
false);
3880 for (
SwLinePortion const* pPortion = pLine->GetFirstPortion();
3883 switch (pPortion->GetWhichPor())
3964 while( pNxt && pNxt->
IsInTab() )
3967 if(
nullptr != pNxt )
4001 else if ( bRestart &&
FindPageFrame()->FindFirstBodyContent() ==
this )
4022 if ( nOld == nNewNum )
4086 if ( 0 != aRectFnSet.
GetWidth(aRect) )
4091 aRectFnSet.
GetRight(aFlyRect) >= 0 )
4094aFlyRect, aRectFnSet.
GetLeft(aRect) );
4095 nRet = aRectFnSet.
GetLeft(aRect);
4102 if ( aRectFnSet.
GetLeft(aFlyRect) -
4103 aRectFnSet.
GetLeft(aRect) >= 0 )
4106aFlyRect, aRectFnSet.
GetRight(aRect) + 1 );
4116 while ( aRectFnSet.
GetWidth(aFlyRect) > 0 );
4124 "SwTextFrame::CalcBasePosForFly with swapped frame!" );
4136 SwTwips nFlyAnchorVertOfstNoWrap = 0;
4144 nFlyAnchorVertOfstNoWrap += pLay->
Height();
4149 nLineHeight = pLay->
Height();
4192 SwRect aRec( pFrame->GetPaintArea() );
@ CONSIDER_WRAP_ON_OBJECT_POSITION
@ USE_FORMER_TEXT_WRAPPING
@ ADD_VERTICAL_FLY_OFFSETS
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 OutputDevice * getReferenceDevice(bool bCreate) const =0
Returns the current reference device.
virtual bool SetFieldsDirty(bool b, const SwNode *pChk, SwNodeOffset nLen)=0
Provides access to settings of a document.
virtual bool get(DocumentSettingId id) const =0
Return the specified document setting.
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long X() const
SdrObjUserCall * GetUserCall() const
void Broadcast(const SfxHint &rHint)
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
constexpr tools::Long Height() const
void setHeight(tools::Long nHeight)
static TextNumerals GetCTLTextNumerals()
const Color & GetColor() const
SvxGraphicPosition GetGraphicPos() const
sal_uInt16 GetPropLineSpace() const
SvxInterLineSpaceRule GetInterLineSpaceRule() const
short GetInterLineSpace() const
wrapper class for the positioning of Writer fly frames and drawing objects
virtual SwFrameFormat & GetFrameFormat()=0
virtual const SwFlyFrame * DynCastFlyFrame() const
void ClearItem(sal_uInt16 nWhichL)
const SwFormatLineNumber & GetLineNumber(bool=true) const
const SvxLineSpacingItem & GetLineSpacing(bool=true) const
tools::Long CalcLeft(const SwFrame *pCaller) const
tools::Long CalcRight(const SwFrame *pCaller) const
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
SwContentFrame * GetPrevContentFrame() const
virtual void DestroyImpl() override
SwContentFrame * GetNextContentFrame() const
SwTextFrame * FindMaster() const
virtual void SwClientNotify(const SwModify &, const SfxHint &) override
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
LanguageType nOldLanguageType
SwDigitModeModifier(const OutputDevice &rOutp, LanguageType eCurLang)
const OutputDevice & rOut
const SwFootnoteInfo & GetFootnoteInfo() const
bool FieldHidesPara(const SwField &rField) const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
const SwLineNumberInfo & GetLineNumberInfo() const
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
SwFootnoteIdxs & GetFootnoteIdxs()
IDocumentSettingAccess const & getIDocumentSettingAccess() const
int FieldCanHideParaWeight(SwFieldIds eFieldId) const
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
SwFrameControlsManager & GetFrameControlsManager()
SwFieldType * GetTyp() const
void SetDevFont(const SwViewShell *pSh, OutputDevice &rOut)
To take Asian or other languages into consideration, an SwFont object consists of 3 SwSubFonts (Latin...
void SetFntChg(const bool bNew)
void ChgPhysFnt(SwViewShell const *pSh, OutputDevice &rOut)
tools::Long GetHeight() const
const SwNodeIndex * GetContentIdx() const
void setSwRect(const SwRect &rNew)
void setSwRect(const SwRect &rNew)
const SwRect & getFrameArea() const
bool isFrameAreaDefinitionValid() const
const SwRect & getFramePrintArea() const
bool isFramePrintAreaValid() const
bool isFrameAreaSizeValid() const
A container for the Header/Footer, PageBreak, and Outline Content Visibility controls.
void SetOutlineContentVisibilityButton(const SwContentFrame *pContentFrame)
Helper class which can be used instead of the macros if a function has too many returns.
SwFrameSwapper(const SwTextFrame *pFrame, bool bSwapIfNotSwapped)
const SwTextFrame * pFrame
Base class of the Writer layout elements.
void InvalidateLineNum_()
void SetDerivedR2L(bool bNew)
void CheckDirChange()
checks the layout direction and invalidates the lower frames recursively, if necessary.
SwSectionFrame * FindSctFrame()
SwContentFrame * FindPrevCnt()
SwTabFrame * FindTabFrame()
bool IsInFootnote() const
virtual void Calc(vcl::RenderContext *pRenderContext) const
const SwSortedObjs * GetDrawObjs() const
static SwCache & GetCache()
bool IsRightToLeft() const
void InvalidateNextPrtArea()
method to invalidate printing area of next frame #i11859#
void dumpInfosAsXml(xmlTextWriterPtr writer) const
SwLayoutFrame * GetUpper()
void InvalidatePage(const SwPageFrame *pPage=nullptr) const
Invalidates the page in which the Frame is currently placed.
SwRootFrame * getRootFrame()
bool IsNoTextFrame() const
void SetCompletePaint() const
SwContentFrame * FindNextCnt(const bool _bInSameFootnote=false)
void SetInvalidVert(bool bNew)
SwPageFrame * FindPageFrame()
sw::BroadcastingModify * GetDep()
use these so we can grep for SwFrame's GetRegisteredIn accesses beware that SwTextFrame may return sw...
bool IsLayoutFrame() const
void MoveGrammar(sal_Int32 nPos, sal_Int32 nDiff)
const SwFrame * ContainsAny(const bool _bInvestigateFootnoteForSections=false) const
Method <ContainsAny()> doesn't investigate content of footnotes by default.
const OutputDevice & m_rOut
SwLayoutModeModifier(const OutputDevice &rOutp)
void Modify(bool bChgToRTL)
vcl::text::ComplexTextLayoutFlags m_nOldLayoutMode
Collection of SwLinePortion instances, representing one line of text.
SwLinePortion * GetFirstPortion() const
virtual void Height(const SwTwips nNew, const bool bText=true) override
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
SwTwips GetRealHeight() const
< purpose of derivation from SwClient: character style for displaying the numbers.
bool IsRestartEachPage() const
bool IsCountBlankLines() const
Base class for anything that can be part of a line in the Writer layout.
void dumpAsXmlAttributes(xmlTextWriterPtr writer, std::u16string_view rText, TextFrameIndex nOffset) const
SwLinePortion * GetNextPortion() const
TextFrameIndex GetLen() const
virtual void dumpAsXml(xmlTextWriterPtr pWriter, const OUString &rText, TextFrameIndex &rOffset) const
virtual void HandlePortion(SwPortionHandler &rPH) const
bool IsFootnoteNumPortion() const
Marks a node in the document model.
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
bool IsNoTextNode() const
Merge GetRedlineMergeFlag() const
const SwNumFormat & Get(sal_uInt16 i) const
A page of the document layout.
void InvalidateWordCount() const
void InvalidateAutoCompleteWords() const
void InvalidateSmartTags() const
void InvalidateSpelling() const
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
bool IsPrepMustFit() const
TextFrameIndex GetParLen() const
SwCharRange & GetReformat()
void SetDelta(tools::Long nDelta)
bool IsFollowField() const
void SetPrepMustFit(const bool bNew)
bool IsFootnoteNum() const
bool IsFixLineHeight() const
bool UpdateQuoVadis(std::u16string_view rQuo)
Is called in SwTextFrame::Prepare()
tools::Long GetDelta() const
SwScriptInfo & GetScriptInfo()
The SwPortionHandler interface implements a visitor for the layout engine's text portions.
virtual void LineBreak()=0
line break.
virtual void Skip(TextFrameIndex nLength)=0
skip characters.
virtual void Finish()=0
end of paragraph.
tools::Long GetHeight(const SwRect &rRect) const
void SetWidth(SwRect &rRect, tools::Long nNew) const
void SetPosX(SwRect &rRect, tools::Long nNew) const
void SetRight(SwRect &rRect, tools::Long nNew) const
tools::Long GetWidth(const SwRect &rRect) const
void SetHeight(SwRect &rRect, tools::Long nNew) const
tools::Long GetTop(const SwRect &rRect) const
void SetPosY(SwRect &rRect, tools::Long nNew) const
void SetTopAndHeight(SwRect &rRect, tools::Long nTop, tools::Long nHeight) const
tools::Long GetBottomMargin(const SwFrame &rFrame) const
tools::Long GetLeft(const SwRect &rRect) const
tools::Long GetBottom(const SwRect &rRect) const
tools::Long GetRight(const SwRect &rRect) const
void SetLeft(SwRect &rRect, tools::Long nNew) const
Of course Writer needs its own rectangles.
void Height(tools::Long nNew)
void Top(const tools::Long nTop)
void Right(const tools::Long nRight)
void Bottom(const tools::Long nBottom)
void Pos(const Point &rNew)
void SSize(const Size &rNew)
void Left(const tools::Long nLeft)
void Width(tools::Long nNew)
The root element of a Writer document layout.
SwViewShell * GetCurrShell() const
bool HasMergedParas() const
void SetNeedGrammarCheck(bool bVal)
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.
void InitScriptInfo(const SwTextNode &rNode, sw::MergedPara const *pMerged, bool bRTL)
void SetInvalidityA(const TextFrameIndex nPos)
static SwSmartTagMgr & Get()
class for collecting anchored objects
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetAnyEnd() const
end (if available), else start
virtual const sal_Int32 * GetEnd() const
end position
sal_Int32 GetStart() const
The purpose of this class is to be the universal interface between formatting/text output and the pos...
void SetIgnoreObjsInHeaderFooter(const bool bNew)
void SetIgnoreContour(bool bNew)
void SetIgnoreCurrentFrame(bool bNew)
bool Relax(const SwRect &rRect)
If there is no flying object frame standing in rRect (usually the current row), then we are turning o...
SwRect GetFrame(const SwRect &rPortion) const
void SetIgnoreFly(const bool bNew)
SwTwips CalcFitToContent_()
bool IsBreakNow(SwTextMargin &rLine)
bool IsKeepAlways() const
bool IsInside(SwTextMargin const &rLine) const
BP 18.6.93: Widows.
Represents the visualization of a paragraph.
void Init()
This is public, as it needs to be called by some methods in order to save the Prepare USE WITH CAUTIO...
TextFrameIndex CalcFlyPos(SwFrameFormat const *pSearch)
Calculates the position of FlyInContentFrames.
SwTextFrame * GetFormatted(bool bForceQuickFormat=false)
In case the SwLineLayout was cleared out of the s_pTextCache, recreate it.
bool IsFootnoteNumFrame() const
Am I a FootnoteFrame, with a number at the start of the paragraph?
void SwitchVerticalToHorizontal(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from vertical to horizontal layout.
bool TestFormat(const SwFrame *pPrv, SwTwips &nMaxHeight, bool &bSplit)
The WouldFit equivalent for temporarily rewired TextFrames nMaxHeight returns the required size here ...
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...
SwPosition MapViewToModelPos(TextFrameIndex nIndex) const
LanguageType GetLangOfChar(TextFrameIndex nIndex, sal_uInt16 nScript, bool bNoChar=false) const
TextFrameIndex GetOffset() const
void UpdateOutlineContentVisibilityButton(SwWrtShell *pWrtSh) const
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(TextFrameIndex nIndex) const
map position in potentially merged text frame to SwPosition
void InvalidateRange(const SwCharRange &, const tools::Long=0)
void SwitchLTRtoRTL(SwRect &rRect) const
Calculates the coordinates of a rectangle when switching from LTR to RTL layout.
void SetMergedPara(std::unique_ptr< sw::MergedPara > p)
bool FormatQuick(bool bForceQuickFormat)
SwTwips GetBaseVertOffsetForFly(bool bIgnoreFlysAnchoredAtThisFrame) const
void HideHidden()
Removes Textfrm's attachments, when it's hidden.
void CalcBaseOfstForFly()
SwTextNode const * GetTextNodeForFirstText() const
SwTwips mnHeightOfLastLine
virtual bool WouldFit(SwTwips &nMaxHeight, bool &bSplit, bool bTst, bool bMoveBwd) override
nMaxHeight is the required height bSplit indicates, that the paragraph has to be split bTst indicates...
bool IsIdxInside(TextFrameIndex nPos, TextFrameIndex nLen) const
sal_Int32 GetAllLines() const
For displaying the line numbers.
void ClearPara()
Removes the Line information from the Cache but retains the entry itself.
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override
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.
void PrepWidows(const sal_uInt16 nNeed, bool bNotify)
sw::MergedPara * GetMergedPara()
void SetWidow(const bool bNew)
void SetPara(SwParaPortion *pNew, bool bDelete=true)
void CalcHeightOfLastLine(const bool _bUseFont=false)
method to determine height of last line, needed for proportional line spacing
static void repaintTextFrames(const SwTextNode &rNode)
Repaint all text frames of the given text node.
SwTwips EmptyHeight() const
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()
void dumpAsXml(xmlTextWriterPtr writer=nullptr) const override
TextFrameIndex MapModelToView(SwTextNode const *pNode, sal_Int32 nIndex) const
virtual bool GetInfo(SfxPoolItem &) const override
void SetHasRotatedPortions(bool bHasRotatedPortions)
SwTwips mnFlyAnchorOfstNoWrap
SwTwips CalcFitToContent()
Simulates a formatting as if there were not right margin or Flys or other obstacles and returns the w...
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 VisitPortions(SwPortionHandler &rPH) const
Visit all portions for Accessibility.
std::unique_ptr< sw::MergedPara > m_pMergedPara
redline merge data
tools::Long GetLineSpace(const bool _bNoPropLineSpacing=false) const
Returns the additional line spacing for the next paragraph.
void SetFieldFollow(const bool bNew)
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd)
SwTextFrame(SwTextNode *const, SwFrame *, sw::FrameMode eMode)
TextFrameIndex MapModelToViewPos(SwPosition const &rPos) const
SwTwips mnFlyAnchorVertOfstNoWrap
The y position for wrap-through flys anchored at this paragraph.
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 Format_(SwTextFormatter &rLine, SwTextFormatInfo &rInf, const bool bAdjust=false)
sal_Int32 GetLineCount(TextFrameIndex nPos)
Determines the line count.
sal_Int32 GetThisLines() const
const SwScriptInfo * GetScriptInfo() const
Returns the script info stored at the paraportion.
sal_uInt16 GetCacheIdx() const
SwTextNode * GetTextNodeFirst()
void RemoveFromCache()
Removes this frame completely from the Cache.
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!...
virtual ~SwTextFrame() override
SwTwips GetHeightOfLastLine() const
void ManipOfst(TextFrameIndex const nNewOfst)
void SwapWidthAndHeight()
Swaps width and height of the text frame.
sal_uInt16 FirstLineHeight() const
Returns the first line height.
const OUString & GetText() const
Returns the text portion we want to edit (for inline see underneath)
SwTwips mnAdditionalFirstLineOffset
SwTextNode const * GetTextNodeForParaProps() const
virtual void SwClientNotify(SwModify const &rModify, SfxHint const &rHint) override
virtual void DestroyImpl() override
const SwLineLayout * NextLine()
TextFrameIndex GetEnd() const
void TruncLines(bool bNoteFollow=false)
const SwLineLayout * PrevLine()
SwTwips GetLineHeight() const
const SwLineLayout * Next()
void CharToLine(TextFrameIndex)
const SwLineLayout * GetCurr() const
sal_Int32 GetLineNr() const
SwParaPortion * GetPara()
sal_uInt16 GetDropLines() const
SwTextNode is a paragraph in the document model.
void SetWrongDirty(sw::WrongState eNew) const
virtual sal_Int32 Len() const override
bool IsSmartTagDirty() const
SwWrongList * GetSmartTags()
void SetWordCountDirty(bool bNew) const
void SetGrammarCheckDirty(bool bNew) const
void SetSmartTags(std::unique_ptr< SwWrongList > pNew)
void SetSmartTagDirty(bool bNew) const
void SetAutoCompleteWordDirty(bool bNew) const
bool IsCountedInList() const
SwNumRule * GetNumRule(bool bInParent=true) const
Returns numbering rule of this text node.
int GetActualListLevel(SwListRedlineType eRedline=SwListRedlineType::SHOW) const
Returns the actual list level of this text node, when it is a list item.
bool IsNumbered(SwRootFrame const *pLayout=nullptr) const
Returns is this text node is numbered.
SwGrammarMarkUp * GetGrammarCheck()
bool IsWrongDirty() const
SwpHints * GetpSwpHints()
void SetWrong(std::unique_ptr< SwWrongList > pNew)
const OUString & GetText() const
void RemoveFromListRLHidden()
SwTextAttr * GetTextAttrForCharAt(const sal_Int32 nIndex, const sal_uInt16 nWhich=RES_TXTATR_END) const
get the text attribute at position nIndex which owns the dummy character CH_TXTATR_* at that position...
const std::vector< sal_uInt16 > & getFmtAttrs() const
sal_uInt16 getWhichAttr() const
sal_Int32 getStart() const
bool IsShowOutlineContentVisibilityButton() const
bool IsShowHiddenPara() const
bool getBrowseMode() const
bool IsShowHiddenChar(bool bHard=false) const
vcl::RenderContext * GetOut() const
const SwViewOption * GetViewOptions() const
void InvalidateAccessibleParaAttrs(const SwTextFrame &rTextFrame)
invalidate attributes for paragraphs and paragraph's characters
vcl::Window * GetWin() const
void InvalidateWindows(const SwRect &rRect)
void Invalidate(sal_Int32 nBegin, sal_Int32 nEnd)
void SetInvalid(sal_Int32 nBegin, sal_Int32 nEnd)
void Move(sal_Int32 nPos, sal_Int32 nDiff)
Change all values after the given position.
Used by the UI to modify the document model.
const SwView & GetView() const
An SwTextAttr container, stores all directly formatted text portions for a text node.
SwTextAttr * Get(size_t nPos) const
void SortIfNeedBe() const
Trigger the sorting if necessary.
SwTextAttr * GetSortedByEnd(size_t nPos) const
sal_uInt16 GetOrphansLines() const
bool WouldFit(SwTextMargin &rLine, SwTwips &rMaxHeight, bool bTest, bool bMoveBwd)
const bool isInsideFieldmarkResult
const bool isInsideFieldmarkCommand
iterate SwTextAttr in potentially merged text frame
sw::MergedPara const *const m_pMerged
MergedAttrIterBase(SwTextFrame const &rFrame)
SwTextNode const *const m_pNode
SwTextAttr const * NextAttr(SwTextNode const *&rpNode)
SwTextNode const *const m_pNode
MergedAttrIterByEnd(SwTextFrame const &rFrame)
std::vector< std::pair< SwTextNode const *, SwTextAttr const * > > m_Hints
SwTextAttr const * PrevAttr(SwTextNode const **ppNode=nullptr)
MergedAttrIterReverse(SwTextFrame const &rFrame)
SwTextAttr const * NextAttr(SwTextNode const **ppNode=nullptr)
text is moved into pDestNode
new delete redline is created
delete redline is removed
constexpr ::Color COL_TRANSPARENT(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define PROTOCOL_ENTER(pFrame, nFunc, nAct, pPar)
struct _xmlTextWriter * xmlTextWriterPtr
EmbeddedObjectRef * pObject
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(126)
constexpr TypedWhichId< SwVirtPageNumInfo > RES_VIRTPAGENUM_INFO(180)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SwFormatFootnote > RES_TXTATR_FTN(59)
bool isPARATR_LIST(const sal_uInt16 nWhich)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CTL_LANGUAGE(29)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr sal_uInt16 RES_FRMATR_END(141)
constexpr TypedWhichId< SwFormatINetFormat > RES_TXTATR_INETFMT(51)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SvxBrushItem > RES_BACKGROUND(111)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_CJK_LANGUAGE(24)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(169)
constexpr TypedWhichId< SvxLineSpacingItem > RES_PARATR_LINESPACING(RES_PARATR_BEGIN)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_ANNOTATION(60)
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(162)
constexpr TypedWhichId< SwFormatLineNumber > RES_LINENUMBER(122)
constexpr TypedWhichId< SwFormatField > RES_TXTATR_FIELD(RES_TXTATR_NOEND_BEGIN)
constexpr TypedWhichId< SwFormatCharFormat > RES_TXTATR_CHARFMT(52)
constexpr TypedWhichId< SwFormatFlyCnt > RES_TXTATR_FLYCNT(58)
constexpr TypedWhichId< SvxRsidItem > RES_CHRATR_RSID(39)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(170)
constexpr TypedWhichId< SvxFormatSplitItem > RES_PARATR_SPLIT(65)
constexpr TypedWhichId< SwRegisterItem > RES_PARATR_REGISTER(71)
bool isPARATR(const sal_uInt16 nWhich)
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_FORMAT_MSG_BEGIN)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(168)
#define CH_TXTATR_BREAKWORD
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 >)
LanguageType GetAppLanguage()
#define LANGUAGE_ARABIC_SAUDI_ARABIA
#define LANGUAGE_ENGLISH_US
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
double getLength(const B2DPolygon &rCandidate)
void swap(cow_wrapper< T, P > &a, cow_wrapper< T, P > &b)
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
Dialog to specify the properties of date form field.
sw::GrammarContact * getGrammarContactFor(const SwTextNode &rTextNode)
getGrammarContact() delivers the grammar contact of the document (for a given textnode)
SwPosition GetParaPropsPos(SwRootFrame const &rLayout, SwPosition const &rPos)
void RemoveFootnotesForNode(SwRootFrame const &rLayout, SwTextNode const &rTextNode, std::vector< std::pair< sal_Int32, sal_Int32 > > const *const pExtents)
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
bool FrameContainsNode(SwContentFrame const &rFrame, SwNodeOffset nNodeIndex)
SwTextFrame * MakeTextFrame(SwTextNode &rNode, SwFrame *, sw::FrameMode eMode)
TextFrameIndex MapModelToView(MergedPara const &, SwTextNode const *pNode, sal_Int32 nIndex)
const SwTwips WIDOW_MAGIC
std::pair< SwTextNode *, SwTextNode * > GetFirstAndLastNode(SwRootFrame const &rLayout, SwNode const &rPos)
SwTextNode const & GetAttrMerged(SfxItemSet &rFormatSet, SwTextNode const &rNode, SwRootFrame const *pLayout)
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
std::pair< SwTextNode *, sal_Int32 > MapViewToModel(MergedPara const &, TextFrameIndex nIndex)
SwTextNode * GetParaPropsNode(SwRootFrame const &rLayout, SwNode const &rNode)
std::unique_ptr< sw::MergedPara > CheckParaRedlineMerge(SwTextFrame &rFrame, SwTextNode &rTextNode, FrameMode eMode)
static TextFrameIndex UpdateMergedParaForInsert(MergedPara &rMerged, bool const isRealInsert, SwTextNode const &rNode, sal_Int32 const nIndex, sal_Int32 const nLen)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
SwNodeOffset abs(const SwNodeOffset &a)
SwTextGridItem const * GetGridItem(SwPageFrame const *const)
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.
Marks a position in the document model.
sal_Int32 GetContentIndex() const
Describes a part of a single text node, which will be part of a text frame, even when redlines are hi...
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
OUString mergedText
note: cannot be const currently to avoid UB because SwTextGuess::Guess const_casts it and modifies it...
SwTextNode *const pFirstNode
except break attributes, those are taken from the first node
SwTextNode * pParaPropsNode
most paragraph properties are taken from the first non-empty node
SwTextNode const * pLastNode
mainly for sanity checks
std::vector< Extent > extents
bool IsInRange(const WhichRangesContainer &pRange, const sal_uInt16 nId)
check if ID is in range of attribute set IDs
constexpr sal_Int32 COMPLETE_STRING
@ FlyFrameAttributesChanged
@ FootnoteInvalidationGone
@ AdjustSizeWithoutFormatting
constexpr sal_uInt8 MAXLEVEL
static bool isA11yRelevantAttribute(sal_uInt16 nWhich)
Related: fdo#56031 filter out attribute changes that don't matter for humans/a11y to stop flooding th...
static bool lcl_ErgoVadis(SwTextFrame *pFrame, TextFrameIndex &rPos, const PrepareHint ePrep)
bool sw_HideObj(const SwTextFrame &_rFrame, const RndStdIds _eAnchorType, SwFormatAnchor const &rFormatAnchor, SwAnchoredObject *_pAnchoredObj)
as-character anchored graphics, which are used for a graphic bullet list.
static SwTwips lcl_CalcFlyBasePos(const SwTextFrame &rFrame, SwRect aFlyRect, SwTextFly const &rTextFly)
Helper function for SwTextFrame::CalcBasePosForFly()
static void lcl_ModifyOfst(SwTextFrame &rFrame, TextFrameIndex const nPos, TextFrameIndex const nLen, TextFrameIndex(*op)(TextFrameIndex const &, TextFrameIndex const &))
static void lcl_SetWrong(SwTextFrame &rFrame, SwTextNode const &rNode, sal_Int32 const nPos, sal_Int32 const nCnt, bool const bMove)
static void lcl_SetScriptInval(SwTextFrame &rFrame, TextFrameIndex const nPos)
static bool hasA11yRelevantAttribute(const std::vector< sal_uInt16 > &rWhichFmtAttr)
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
constexpr sal_uInt16 XATTR_FILL_LAST(XATTR_FILLUSESLIDEBACKGROUND)