20 #include <config_wasm_strip.h>
24 #include <osl/diagnose.h>
26 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
27 #include <com/sun/star/i18n/XBreakIterator.hpp>
40 #include <section.hxx>
105 static void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
108 const SwFormat* pConditionalFormat )
111 OSL_ENSURE( pAttrSet,
"no SwAttrSet" );
112 OSL_ENSURE( pParentFormat || !pConditionalFormat,
"ConditionalFormat without ParentFormat?" );
116 if ( pParentSet == pAttrSet->
GetParent() )
129 aNewSet.
Put( aAnyFormatColl );
131 if ( pConditionalFormat != pParentFormat )
135 aNewSet.
Put( aFormatColl );
145 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
155 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
158 std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
161 pStyleNames.emplace( *aNewSet.
GetPool() );
162 pStyleNames->Put( aNewSet );
165 const bool bRet = aNewSet.
Put( rSet );
170 aNewSet.
Put( *pStyleNames );
179 static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
183 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
190 const bool bRet = aNewSet.
Put_BC( rAttr, pOld, pNew );
198 static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
202 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
205 std::optional<SfxItemSetFixed<RES_FRMATR_STYLE_NAME, RES_FRMATR_CONDITIONAL_STYLE_NAME>> pStyleNames;
208 pStyleNames.emplace( *aNewSet.
GetPool() );
209 pStyleNames->Put( aNewSet );
217 const bool bRet = aNewSet.
Put_BC( rSet, pOld, pNew );
222 aNewSet.
Put( *pStyleNames );
231 static sal_uInt16
ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
235 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
238 const sal_uInt16 nRet = aNewSet.
ClearItem_BC( nWhich, pOld, pNew );
244 static sal_uInt16
ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
246 sal_uInt16 nWhich1, sal_uInt16 nWhich2,
249 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
252 const sal_uInt16 nRet = aNewSet.
ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
289 : m_nNodeType( nNdType )
290 , m_nAFormatNumLvl( 0 )
291 , m_bIgnoreDontExpand(
false)
294 , m_nSerial( s_nSerial++)
296 , m_pStartOfSection( nullptr )
323 : m_nNodeType( nNdType )
324 , m_nAFormatNumLvl( 0 )
325 , m_bIgnoreDontExpand(
false)
328 , m_nSerial( s_nSerial++)
330 , m_pStartOfSection( nullptr )
335 SwNode* pNd = rNodes[ nPos - 1 ];
431 if( pSttNd && static_cast<const SwSectionNode*>(pSttNd)->GetSection().IsProtectFlag() )
435 if(
nullptr != pSttNd )
458 return &rAnchorNd !=
this && rAnchorNd.
IsProtect();
462 if(
nullptr != pSttNd )
531 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
538 pFormat = pFrameFormat;
546 if ((RndStdIds::FLY_AT_PAGE != pAnchor->
GetAnchorId()) &&
555 for( n = 0; n < rFormats.
size(); ++n )
560 if( pIdx && pFlyNd == &pIdx->
GetNode() )
562 if( pFormat == pFrameFormat )
569 if ((RndStdIds::FLY_AT_PAGE == pAnchor->
GetAnchorId()) ||
581 if( n >= rFormats.
size() )
583 OSL_ENSURE(
false,
"FlySection, but no Format found" );
623 int nStt = 0, nLast = 1;
624 if( !( eAskUse & rPgDsc.
ReadUseOn() )) ++nLast;
626 for( ; nStt < nLast; ++nStt, pFormat = &rPgDsc.
GetLeft() )
630 pFormat->GetFormatAttr(nId)).GetHeaderFormat()
632 pFormat->GetFormatAttr(nId)).GetFooterFormat();
638 static_cast<SwNode const *
>(pSttNd) )
656 for(
size_t n = 0;
n < rFootnoteArr.
size(); ++
n )
657 if(
nullptr != ( pTextFootnote = rFootnoteArr[
n ])->GetStartNode() &&
658 static_cast<SwNode const *
>(pSttNd) ==
670 "Where is this Node?" );
685 if( pPageDescItem && pPageDescItem->GetDefinedIn() )
688 if(
auto pContentNode = dynamic_cast<const SwContentNode*>( pMod) )
690 else if(
auto pFormat = dynamic_cast<const SwFormat*>( pMod) )
691 pFormat->GetInfo( aInfo );
702 GetFrameFormat()->GetPageDesc().GetPageDesc();
705 GetFormat()->GetPageDesc().GetPageDesc();
735 for(
size_t n = 0;
n < rFrameFormatTable.
size(); ++
n )
782 bool bCheckFirst =
false;
798 for (nPos = 0; nPos < rONds.
size(); ++nPos)
800 pRet = rONds[nPos]->GetTextNode();
806 if (nPos == rONds.
size())
814 std::pair<Point, bool>
const tmp(aPt,
false);
818 if( pPgFrame && pMyFrame &&
827 for ( ; 0 < nPos; --nPos)
829 SwTextNode const*
const pNode = rONds[nPos - 1]->GetTextNode();
883 const char*
pName =
"???";
901 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
903 (
void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
904 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(
GetNodeType())).getStr()));
905 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"), BAD_CAST(OString::number(sal_Int32(
GetIndex())).getStr()));
911 auto pNoTextNode =
static_cast<const SwNoTextNode*
>(
this);
915 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"pContour"));
916 for (sal_uInt16
i = 0;
i < pContour->
Count(); ++
i)
918 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"polygon"));
919 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"),
920 BAD_CAST(OString::number(
i).getStr()));
922 for (sal_uInt16 j = 0; j < rPolygon.
GetSize(); ++j)
924 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"point"));
925 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"),
926 BAD_CAST(OString::number(j).getStr()));
928 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"x"),
929 BAD_CAST(OString::number(rPoint.X()).getStr()));
930 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"y"),
931 BAD_CAST(OString::number(rPoint.Y()).getStr()));
932 (
void)xmlTextWriterEndElement(pWriter);
934 (
void)xmlTextWriterEndElement(pWriter);
936 (
void)xmlTextWriterEndElement(pWriter);
944 (
void)xmlTextWriterEndElement(pWriter);
946 (
void)xmlTextWriterEndElement(pWriter);
951 :
SwNode( rWhere, nNdType ), m_eStartNodeType( eSttNd )
982 while(
nullptr != ( pCNd = rNds.
GoNext( &aIdx )) && pCNd->
GetIndex() < nEndIdx )
989 const char*
pName =
"???";
1020 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
1021 (
void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
1022 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(
GetNodeType())).getStr()));
1023 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"), BAD_CAST(OString::number(sal_Int32(
GetIndex())).getStr()));
1027 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"attrset"));
1029 (
void)xmlTextWriterEndElement(pWriter);
1034 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"rowspan"), BAD_CAST(OString::number(pBox->getRowSpan()).getStr()));
1035 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"attrset"));
1037 pBox->GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter);
1038 (
void)xmlTextWriterEndElement(pWriter);
1071 :
SwNode( rWhere, nNdType )
1072 , m_aCondCollListener( *this )
1073 , m_pCondColl( nullptr )
1074 , mbSetModifyAtAttr(
false )
1101 static_cast<SwTextNode*>(
this)->SetCalcHiddenCharFlags();
1107 if (rHint.
GetId() == SfxHintId::SwLegacyModify)
1110 const sal_uInt16 nWhich = pLegacyHint->
GetWhich();
1113 bool bSetParent =
false;
1114 bool bCalcHidden =
false;
1120 SwFormat* pFormat = pLegacyHint->m_pNew
1143 && pLegacyHint->m_pNew
1144 && static_cast<const SwFormatChg*>(pLegacyHint->m_pNew)->pChangedFormat ==
GetRegisteredIn())
1154 && pLegacyHint->m_pOld
1166 if(pLegacyHint->m_pNew != pLegacyHint->m_pOld)
1168 auto pBT = sal::backtrace_get(20);
1169 SAL_WARN(
"sw.core",
"UpdateAttr not matching! " << sal::backtrace_to_string(pBT.get()));
1172 assert(pLegacyHint->m_pNew == pLegacyHint->m_pOld);
1173 assert(dynamic_cast<const SwUpdateAttr*>(pLegacyHint->m_pNew));
1175 const SwUpdateAttr& rUpdateAttr = pLegacyHint->m_pNew ? *
static_cast<const SwUpdateAttr*
>(pLegacyHint->m_pNew) : aFallbackHint;
1182 static_cast<SwTextNode*
>(
this)->SetCalcHiddenCharFlags();
1185 else if (
auto pModifyChangedHint = dynamic_cast<const sw::ModifyChangedHint*>(&rHint))
1189 else if(
auto pCondCollCondChgHint = dynamic_cast<const sw::CondCollCondChg*>(&rHint))
1201 !static_cast<const SwNumRuleItem*>(pItem)->
GetValue().isEmpty() &&
1202 nullptr != (pRule =
GetDoc().FindNumRulePtr(
1203 static_cast<const SwNumRuleItem*>(pItem)->
GetValue() ) ) )
1207 return nullptr != pRule;
1212 std::pair<Point, bool>
const*
const pViewPosAndCalcFrame)
const
1215 pPos, pViewPosAndCalcFrame));
1221 std::pair<Point, bool> tmp;
1224 tmp.first = *pPoint;
1228 FRM_CNTNT,
nullptr, pPoint ? &tmp :
nullptr) );
1238 if( pFrame &&
nullptr != ( pFrame = pFrame->
FindPageFrame() ))
1247 OSL_ENSURE( pNewColl,
"Collectionpointer is 0." );
1250 if( pNewColl != pOldColl )
1252 pNewColl->
Add(
this );
1262 assert(dynamic_cast<SwTextFormatColl*>(pNewColl));
1263 ChkCondColl(static_cast<SwTextFormatColl*>(pNewColl));
1285 sal_Int32 nDone = 0;
1287 CharacterIteratorMode::SKIPCELL :
1288 CharacterIteratorMode::SKIPCONTROLCHARACTER;
1291 nItrMode, 1, nDone );
1296 sal_Int32 nHiddenStart;
1297 sal_Int32 nHiddenEnd;
1326 sal_Int32 nDone = 0;
1328 CharacterIteratorMode::SKIPCELL :
1329 CharacterIteratorMode::SKIPCONTROLCHARACTER;
1332 nItrMode, 1, nDone );
1337 sal_Int32 nHiddenStart;
1338 sal_Int32 nHiddenEnd;
1341 nPos = nHiddenStart;
1361 OSL_ENSURE( &rNode !=
this,
1362 "No ContentNode or CopyNode and new Node identical." );
1374 while(
nullptr != (pUpper = aNode2Layout.UpperFrame( pFrame, rNode )) )
1382 pNew->
Paste( pUpper, pFrame );
1388 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1392 if ( pViewShell && pViewShell->GetLayout() &&
1393 pViewShell->GetLayout()->IsAnyShellAccessible() )
1397 pViewShell->InvalidateAccessibleParaFlowRelation(
1398 pNext ? pNext->DynCastTextFrame() :
nullptr,
1399 pPrev ? pPrev->DynCastTextFrame() : nullptr );
1422 if (pFrame->IsTextFrame())
1425 static_cast<SwTextFrame *>(pFrame)->GetMergedPara())
1427 if (
this != pMerged->pFirstNode)
1435 *static_cast<SwTextNode*>(
this), 0,
Len());
1436 if (
this == pMerged->pParaPropsNode)
1439 assert(
this == pMerged->pLastNode);
1440 assert(pMerged->extents.empty());
1444 assert(pMerged->pFirstNode->GetIndex() <=
i);
1446 if (pNode->IsTextNode()
1449 pMerged->pParaPropsNode = pNode->GetTextNode();
1452 else if (pMerged->pFirstNode->GetIndex() ==
i)
1455 pMerged->pParaPropsNode = pMerged->pFirstNode;
1459 assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode));
1461 assert(
GetIndex() <= pMerged->pLastNode->GetIndex());
1462 if (
this == pMerged->pLastNode)
1467 this == pMerged->pLastNode; --
i)
1476 SwStartNode const*
const pStart(pEnd->StartOfSectionNode());
1477 i = pStart->GetIndex();
1480 assert(pMerged->pFirstNode->GetIndex() <= pMerged->pLastNode->GetIndex());
1481 assert(pMerged->listener.IsListeningTo(pMerged->pLastNode));
1484 pMerged->listener.EndListening(
this);
1493 #if !ENABLE_WASM_STRIP_ACCESSIBILITY
1494 SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
1495 if ( pViewShell && pViewShell->GetLayout() &&
1496 pViewShell->GetLayout()->IsAnyShellAccessible() )
1498 auto pNext = pFrame->FindNextCnt(
true );
1499 auto pPrev = pFrame->FindPrevCnt();
1501 pNext ? pNext->DynCastTextFrame() :
nullptr,
1502 pPrev ? pPrev->DynCastTextFrame() : nullptr );
1507 if( pFrame->IsFollow() )
1510 pMaster->
SetFollow( pFrame->GetFollow() );
1512 pFrame->SetFollow(
nullptr );
1520 if( pFrame->GetUpper() && pFrame->IsInFootnote() && !pFrame->GetIndNext() &&
1521 !pFrame->GetIndPrev() )
1524 OSL_ENSURE( pFootnote,
"You promised a FootnoteFrame?" );
1529 OSL_ENSURE( pCFrame->
IsTextFrame(),
"NoTextFrame has Footnote?" );
1546 switch( rInfo.
Which() )
1557 static_cast<SwFindNearestNode&>(rInfo).CheckNode( *
this );
1577 OSL_ENSURE(
GetpSwAttrSet(),
"Why did't we create an AttrSet?");
1605 OSL_ENSURE( rSet.
Count() == 1,
"SetAutoStyle mixed with other attributes?!" );
1609 bool bSetParent =
true;
1675 sal_uInt16 nDel = 0;
1676 if ( !nWhich2 || nWhich2 < nWhich1 )
1689 if( !nWhich2 || nWhich2 < nWhich1 )
1713 sal_uInt16 nDel = 0;
1723 for (
const auto& rWhich : rWhichArr )
1760 return aNew.
Count();
1769 return rSet.
Set( rAttrSet );
1774 sal_uInt16 nRet = 0;
1775 if ( rWhichIds.empty() )
1780 for (
const auto& rWhichId : rWhichIds )
1782 nRet = nRet + aNewAttrSet.
ClearItem( rWhichId );
1791 bool bInParents )
const
1797 nWhich,
false, &pFnd ) && bInParents ))
1799 (
void)static_cast<const SwFormat*>(
GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
1835 const SwNode* pNd =
this;
1836 while( aIdx < rNds.
Count()-1 &&
1858 const SwNode* pNd =
this;
1919 if( pTableNd &&
nullptr != ( pBox = pTableNd->
GetTable().
1931 const SwNode* pSrchNd = pSttNd;
1933 for(
size_t n = 0;
n < rFootnoteArr.
size(); ++
n )
1934 if(
nullptr != ( pTextFootnote = rFootnoteArr[
n ])->GetStartNode() &&
1963 if( !rOutlNds.
empty() )
1965 if( !rOutlNds.
Seek_Entry( const_cast<SwContentNode*>(
this), &nPos ) && nPos )
1967 if( nPos < rOutlNds.
size() &&
1968 rOutlNds[ nPos ]->GetIndex() <
GetIndex() )
1970 SwTextNode* pOutlNd = rOutlNds[ nPos ]->GetTextNode();
1988 SAL_WARN(
"sw.core",
"Wrong cond collection, skipping check of Cond Colls.");
1993 SAL_WARN(
"sw.core",
"Nodes amiss, skipping check of Cond Colls.");
2008 ->HasCondition( aTmp );
2024 static_cast<SwTextNode*>(
this)->GetActualListLevel() );
2026 HasCondition( aTmp );
2039 const Point* pPt )
const
2048 std::pair<Point, bool>
const tmp(aPt,
false);
2056 nRet = SvxFrameDirection::Vertical_LR_BT;
2058 nRet = SvxFrameDirection::Vertical_LR_TB;
2060 nRet = SvxFrameDirection::Vertical_RL_TB;
2065 nRet = SvxFrameDirection::Horizontal_RL_TB;
2067 nRet = SvxFrameDirection::Horizontal_LR_TB;
2076 std::unique_ptr<SwOLENodes> pNodes;
2085 pNodes->push_back( pONd );
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
SwSectionNode * FindSectionNode()
Search section node, in which it is.
const SwEndNode * EndOfSectionNode() const
Starts a section of nodes in the document model.
Base class of the Writer layout elements.
virtual std::shared_ptr< SfxItemSet > getAutomaticStyle(const SfxItemSet &rSet, SwAutoStyleFamily eFamily, const OUString *pParentName=nullptr)=0
virtual sal_Int32 Len() const
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
void SetCondFormatColl(SwFormatColl *)
static std::unique_ptr< SwOLENodes > CreateOLENodesArray(const SwFormatColl &rColl, bool bOnlyWithInvalidSize)
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
SwStartNode * m_pStartOfSection
void Add(SwClient *pDepend)
virtual const SwFlyFrameFormat * GetFormat() const override
SwNodeOffset EndOfSectionIndex() const
const SwStartNode * FindHeaderStartNode() const
Represents the style of a paragraph.
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
bool GetRanges(std::vector< std::shared_ptr< SwUnoCursor >> &rRanges, SwDoc &rDoc, SwPaM const &rDelPam)
Marks a position in the document model.
void dumpAsXml(xmlTextWriterPtr pWriter) const
const IDocumentStylePoolAccess & getIDocumentStylePoolAccess() const
Provides access to the document style pool interface.
bool IsSectionNode() const
sal_uInt16 GetWhich() 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.
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
SwFrameFormat & GetLeft()
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
bool GoNext(SwIndex *, sal_uInt16 nMode) const
virtual bool IsInRedlines(const SwNode &rNode) const =0
bool Set(const SfxItemSet &, bool bDeep=true)
const OUString & GetText() const
const SwStartNode * FindFooterStartNode() const
virtual const SwRootFrame * GetCurrentLayout() const =0
bool IsOutline() const
Returns if this text node is an outline.
constexpr TypedWhichId< SwFormatHeader > RES_HEADER(96)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(162)
SwRect FindLayoutRect(const bool bPrtArea=false, const Point *pPoint=nullptr) const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
SwFormatColl * GetCondFormatColl() const
SwNodeOffset StartOfSectionIndex() const
SwDoc & GetDoc()
Which Doc contains the nodes-array?
static const SfxPoolItem * Put(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, const SfxPoolItem &rAttr)
sal_Int32 GetSpaceLeft() const
SwFormatColl * m_pCondColl
virtual sal_Int32 Len() const override
constexpr TypedWhichId< SwNumRuleItem > RES_PARATR_NUMRULE(72)
Provides numbered items of a document.
const SwRect & getFramePrintArea() const
const SwNode * GetFoundNode() 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*...
SwContentFrame * getLayoutFrame(const SwRootFrame *, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr) const
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e...
IDocumentListItems & getIDocumentListItems()
Provides access to the document's numbered items interface.
Provides access to the marks of a document.
constexpr TypedWhichId< SfxStringItem > RES_FRMATR_CONDITIONAL_STYLE_NAME(128)
SwNode(const SwNodeIndex &rWhere, const SwNodeType nNodeId)
Master_CollCondition
Conditional styles.
IDocumentLinksAdministration const & getIDocumentLinksAdministration() const
constexpr sal_uInt8 MAXLEVEL
sal_uInt16 ClearItemsFromAttrSet(const std::vector< sal_uInt16 > &rWhichIds)
There some functions that like to remove items from the internal SwAttrSet (handle): ...
SwSectionNode is derived from SwStartNode.
constexpr TypedWhichId< SwFormatAutoFormat > RES_AUTO_STYLE(126)
static SwContentNode * GoPrevious(SwNodeIndex *)
Content, content of frame (header, footer, fly).
static void DestroyFrame(SwFrame *const pFrame)
this is the only way to delete a SwFrame instance
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
IDocumentMarkAccess * getIDocumentMarkAccess()
bool IsInHeadline(const SwTable *pTable) const
Of course Writer needs its own rectangles.
void CheckSectionCondColl() const
Call ChkCondcoll to all ContentNodes of section.
IDocumentContentOperations const & getIDocumentContentOperations() const
bool HasWriterListeners() const
EmbeddedObjectRef * pObject
The root element of a Writer document layout.
virtual bool GetInfo(SfxPoolItem &) const override
SwTextFormatColl * GetTextFormatColl() const
bool CanJoinNext(SwNodeIndex *pIdx=nullptr) const
Is it possible to join two nodes? In pIdx the second position can be returned.
SwTableFormat * GetFrameFormat()
const SwFrameFormats * GetSpzFrameFormats() const
bool isFrameAreaDefinitionValid() const
int GetAttrOutlineLevel() const
Returns outline level of this text node.
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(156)
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void AddAnchoredFly(SwFrameFormat *)
static tools::Long s_nSerial
const SwSection & GetSection() const
const IDocumentMarkAccess * getIDocumentMarkAccess() const
Provides access to the document bookmark interface.
void MakeFramesForAdjacentContentNode(SwContentNode &rNode)
Method creates all views of document for given node.
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
void InsertNode(SwNode *pNode, const SwNodeIndex &rPos)
bool IsInRedlines() const
Checks if this node is in redlines.
SwTableNode * GetTableNode()
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Dumps the node structure to the given destination (file nodes.xml in the current directory by default...
SwNodeType GetNodeType() const
void SetModifyAtAttr(bool bSetModifyAtAttr) const
bool Put_BC(const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
const SwRect & getFrameArea() const
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
SwEndNode(SwNodes &rNodes, SwNodeOffset nPos, SwStartNode &rSttNd)
for the initial StartNode
static bool Put_BC(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
bool GetModifyAtAttr() const
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
const SwTable & GetTable() const
bool IsProtectFlag() const
Describes parts of multiple text nodes, which will form a text frame, even when redlines are hidden a...
SwNodeOffset GetIndex() const
SwFlyFrame * FindFlyFrame()
void ChkCondColl(const SwTextFormatColl *pColl=nullptr)
const IDocumentDeviceAccess & getIDocumentDeviceAccess() const
Provides access to the document device interface.
const IDocumentDrawModelAccess & getIDocumentDrawModelAccess() const
Provides access to the document draw model interface.
SwAttrPool * GetPool() const
sw::WriterMultiListener m_aCondCollListener
constexpr TypedWhichId< SwFindNearestNode > RES_FINDNEARESTNODE(184)
const IDocumentFieldsAccess & getIDocumentFieldsAccess() const
Provides access to the document fields administration interface.
SwFormatColl & GetAnyFormatColl() const
const IDocumentLinksAdministration & getIDocumentLinksAdministration() const
Provides access to the document links administration interface.
void ClientNotifyAttrChg(SwModify &rModify, const SwAttrSet &aSet, SwAttrSet &aOld, SwAttrSet &aNew)
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
SwFootnoteFrame * FindFootnoteFrame()
bool IsContentNode() const
const SwAttrSet * GetpSwAttrSet() const
virtual bool GetInfo(SfxPoolItem &) const override
Get information from Client.
std::shared_ptr< const SfxItemSet > mpAttrSet
Attribute-set for all auto attributes of a ContentNode.
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
Merge
sw_redlinehide: redline node merge state
static sal_uInt16 ClearItem_BC(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset)
const SfxPoolItem * GetNoCondAttr(sal_uInt16 nWhich, bool bInParents) const
Obtains attribute that is not delivered via conditional style!
const SfxItemSet * GetParent() const
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(167)
std::vector< SwOLENode * > SwOLENodes
const sal_uInt8 ND_HAS_PREV_LAYNODE
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const IDocumentRedlineAccess & getIDocumentRedlineAccess() const
Provides access to the document redline interface.
const SwRect & VisArea() const
const SwStartNode * StartOfSectionNode() const
void SetCondition(Master_CollCondition nCond, sal_uLong nSubCond)
constexpr TypedWhichId< SfxStringItem > RES_FRMATR_STYLE_NAME(127)
bool CanJoinPrev(SwNodeIndex *pIdx=nullptr) const
Can we join two Nodes? We can return the 2nd position in pIdx.
const SwPageDesc & GetPageDesc(const size_t i) const
IDocumentContentOperations & getIDocumentContentOperations()
Provides access to the document content operations interface.
SwPageFrame * FindPageFrame()
Document fields related interfaces.
SwContentFrame * FindNextCnt(const bool _bInSameFootnote=false)
SwPageDesc * GetPageDesc()
SwContentNode * GetContentNode()
SwNodeOffset GetIndex() const
sal_uInt8 HasPrevNextLayNode() const
const OUString & GetValue() const
void SetFollow(SwFlowFrame *const pFollow)
const sal_uInt16 CRSR_SKIP_HIDDEN
void DelFrames(SwRootFrame const *pLayout)
Method deletes all views of document for the node.
UseOnPage ReadUseOn() const
void InvalidateInSwCache(const sal_uInt16)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(163)
size_t GetPageDescCnt() const
Marks a character position inside a document model node.
Provides access to settings of a document.
constexpr TypedWhichId< SwAutoFormatGetDocNode > RES_AUTOFMT_DOCNODE(173)
bool IsContentProtected() const
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
void CheckNode(const SwNode &rNd)
Marks a node in the document model.
SwFrameFormat * GetFrameFormat()
const IDocumentSettingAccess * getIDocumentSettingAccess() const
Provides access to the document setting interface.
const SwOutlineNodes & GetOutLineNds() const
Array of all OutlineNodes.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
virtual sal_uInt16 ResetAllAttr()
Document links administration interface.
Text operation/manipulation interface.
SwStartNodeType GetStartNodeType() const
virtual SwFormatColl * ChgFormatColl(SwFormatColl *)
SwStartNode * GetStartNode()
bool IsProtect() const
Is node in something that is protected (range, frame, table cells ...
A page of the document layout.
const SwFormatFootnote & GetFootnote() const
static void SetParent(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, const SwFormat *pParentFormat, const SwFormat *pConditionalFormat)
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
bool IsInProtectSect() const
Is node in a protected area?
constexpr TypedWhichId< SvxCharHiddenItem > RES_CHRATR_HIDDEN(37)
const SwNodeIndex * GetContentIdx() const
bool IsInVisibleArea(SwViewShell const *pSh) const
Is node in the visible area of the Shell?
SvxFrameDirection GetTextDirection(const SwPosition &rPos, const Point *pPt) const
determines the text direction for a certain position.
const IDocumentLayoutAccess & getIDocumentLayoutAccess() const
Provides access to the document layout interface.
void SetParent(const SfxItemSet *pNew)
void InvalidateAccessibleParaFlowRelation(const SwTextFrame *_pFromTextFrame, const SwTextFrame *_pToTextFrame)
invalidate CONTENT_FLOWS_FROM/_TO relation for paragraphs
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIter() const
Provides access to the formatting devices of a document.
void StartListening(SwModify *pDepend)
const SwPageDesc * FindPageDesc(SwNodeOffset *pPgDescNdIdx=nullptr) const
Search PageDesc with which this node is formatted.
void UpdateAttr(const SwUpdateAttr &)
const sal_uInt16 CRSR_SKIP_CELLS
bool IsModifyLocked() const
const css::lang::Locale & GetLocale(const LanguageType aLang)
SwFrameFormat & GetMaster()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SwTextNode is a paragraph in the document model.
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
const SwTextNode * FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const *pLayout=nullptr) const
void SetInvalidRule(bool bFlag)
virtual bool SetAttr(const SfxPoolItem &)
made virtual
static bool IsValidNextPrevNd(const SwNode &rNd)
SwTextFrame * FindMaster() const
virtual const SwViewShell * GetCurrentViewShell() const =0
Returns the layout set at the document.
const SwNodes & GetNodes() const
SwEndNode * m_pEndOfSection
sal_Int32 GetIndex() const
IDocumentListItems const & getIDocumentListItems() const
SwContentNode(const SwNodeIndex &rWhere, const SwNodeType nNodeType, SwFormatColl *pFormatColl)
bool SetModifyAtAttr(const sw::BroadcastingModify *pModify)
special treatment for some attributes
static void FillProgName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
void RemoveAnchoredFly(SwFrameFormat *)
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
bool IsRightToLeft() const
::sw::DocumentSettingManager & GetDocumentSettingManager()
void Top(const tools::Long nTop)
LanguageType GetLang(const sal_Int32 nBegin, const sal_Int32 nLen=0, sal_uInt16 nScript=0) const
const SwModify * GetRegisteredIn() const
SwTableBox is one table cell in the document model.
SwTableNode is derived from SwStartNode.
std::vector< SwFrameFormat * > m_aAnchoredFlys
all SwFrameFormat that are anchored at the node invariant: SwFrameFormat is in the list iff SwFrameFo...
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
virtual SwContentNode * JoinNext()
const SwStartNode * FindTableBoxStartNode() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
virtual void CallSwClientNotify(const SfxHint &rHint) const override
bool InvalidateNumRule()
Invalidates NumRule at the node.
SwTableNode * FindTableNode()
Search table node, in which it is.
virtual ~SwNode() override=0
the = 0 forces the class to be an abstract base class, but the dtor can be still called from subclass...
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
SwNodeOffset Count() const
bool IsOLESizeInvalid() const
const SwStartNode * FindFlyStartNode() const
virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const
Provides access to the layout of a document.
constexpr TypedWhichId< SwFormatFooter > RES_FOOTER(97)
SwFootnoteIdxs & GetFootnoteIdxs()
Access to the style pool.
#define SAL_WARN(area, stream)
SwFormatColl * GetFormatColl() const
struct _xmlTextWriter * xmlTextWriterPtr
SwContentFrame * FindPrevCnt()
bool HasMergedParas() const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
SwStartNode(SwNodes &rNodes, SwNodeOffset nPos)
for the initial StartNode
SwSectionNode * GetSectionNode()
Ends a section of nodes in the document model.
sal_uInt16 getWhichAttr() const
bool Seek_Entry(SwNode *rP, size_type *pnPos) const
sal_uInt16 GetSectionLevel() const
Returns the section level at the position given by aIndex.
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override
Dumps the node structure to the given destination (file nodes.xml in the current directory by default...
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
std::vector< SwNode * >::size_type size_type
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
IStyleAccess & GetIStyleAccess()
SwRootFrame * GetLayout() const
SwViewShell * GetCurrShell() const
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_CONTENT_VISIBLE(185)
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
determines the list style, which directly set at the given paragraph style
virtual ~SwContentNode() override=0
the = 0 forces the class to be an abstract base class, but the dtor can be still called from subclass...
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
bool Overlaps(const SwRect &rRect) const
SwContentNode * GoNext(SwNodeIndex *) const
const sal_uInt8 ND_HAS_NEXT_LAYNODE
sal_uInt16 ClearItem_BC(sal_uInt16 nWhich, SwAttrSet *pOld, SwAttrSet *pNew)
SwRect FindPageFrameRect() const
IStyleAccess & getIDocumentStyleAccess()
Provides access to the document automatic styles interface.
const SwStartNode * FindFootnoteStartNode() const
SwRootFrame * getRootFrame()
bool GoPrevious(SwIndex *, sal_uInt16 nMode) const
bool IsAnyCondition(SwCollCondition &rTmp) const
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_OBJECTDYING(RES_MSG_BEGIN)
const SwAttrPool & GetAttrPool() const
static void GetNewAutoStyle(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, SwAttrSet const &rNewAttrSet)
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
bool IsCreateFrameWhenHidingRedlines() const
static bool lcl_CheckMaxLength(SwNode const &rPrev, SwNode const &rNext)
bool m_bDetectedRangeSegmentation false
bool IsProtected() const
Is the Frame or rather the Section in which it lies protected?
SwTabFrame * FindTabFrame()
Base class of the Writer document model elements.