22 #include <osl/diagnose.h>
24 #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
25 #include <com/sun/star/i18n/XBreakIterator.hpp>
39 #include <section.hxx>
104 static void SetParent( std::shared_ptr<const SfxItemSet>& rpAttrSet,
107 const SwFormat* pConditionalFormat )
110 OSL_ENSURE( pAttrSet,
"no SwAttrSet" );
111 OSL_ENSURE( pParentFormat || !pConditionalFormat,
"ConditionalFormat without ParentFormat?" );
115 if ( pParentSet == pAttrSet->
GetParent() )
128 aNewSet.
Put( aAnyFormatColl );
130 if ( pConditionalFormat != pParentFormat )
134 aNewSet.
Put( aFormatColl );
144 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
154 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
157 std::unique_ptr<SfxItemSet> pStyleNames;
161 pStyleNames->Put( aNewSet );
164 const bool bRet = aNewSet.
Put( rSet );
169 aNewSet.
Put( *pStyleNames );
178 static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
182 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
189 const bool bRet = aNewSet.
Put_BC( rAttr, pOld, pNew );
197 static bool Put_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
201 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
204 std::unique_ptr<SfxItemSet> pStyleNames;
208 pStyleNames->Put( aNewSet );
216 const bool bRet = aNewSet.
Put_BC( rSet, pOld, pNew );
221 aNewSet.
Put( *pStyleNames );
230 static sal_uInt16
ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
234 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
237 const sal_uInt16 nRet = aNewSet.
ClearItem_BC( nWhich, pOld, pNew );
243 static sal_uInt16
ClearItem_BC( std::shared_ptr<const SfxItemSet>& rpAttrSet,
245 sal_uInt16 nWhich1, sal_uInt16 nWhich2,
248 SwAttrSet aNewSet( static_cast<const SwAttrSet&>(*rpAttrSet) );
251 const sal_uInt16 nRet = aNewSet.
ClearItem_BC( nWhich1, nWhich2, pOld, pNew );
288 : m_nNodeType( nNdType )
289 , m_nAFormatNumLvl( 0 )
290 , m_bIgnoreDontExpand( false)
293 , m_nSerial( s_nSerial++)
295 , m_pStartOfSection( nullptr )
322 : m_nNodeType( nNdType )
323 , m_nAFormatNumLvl( 0 )
324 , m_bIgnoreDontExpand( false)
327 , m_nSerial( s_nSerial++)
329 , m_pStartOfSection( nullptr )
334 SwNode* pNd = rNodes[ nPos - 1 ];
428 if( pSttNd && static_cast<const SwSectionNode*>(pSttNd)->GetSection().IsProtectFlag() )
432 if(
nullptr != pSttNd )
455 return &rAnchorNd !=
this && rAnchorNd.
IsProtect();
459 if(
nullptr != pSttNd )
528 for(
size_t n = 0;
n < rFormats.
size(); ++
n )
535 pFormat = pFrameFormat;
543 if ((RndStdIds::FLY_AT_PAGE != pAnchor->
GetAnchorId()) &&
552 for( n = 0; n < rFormats.
size(); ++n )
557 if( pIdx && pFlyNd == &pIdx->
GetNode() )
559 if( pFormat == pFrameFormat )
566 if ((RndStdIds::FLY_AT_PAGE == pAnchor->
GetAnchorId()) ||
578 if( n >= rFormats.
size() )
580 OSL_ENSURE(
false,
"FlySection, but no Format found" );
620 int nStt = 0, nLast = 1;
621 if( !( eAskUse & rPgDsc.
ReadUseOn() )) ++nLast;
623 for( ; nStt < nLast; ++nStt, pFormat = &rPgDsc.
GetLeft() )
627 pFormat->GetFormatAttr(nId)).GetHeaderFormat()
629 pFormat->GetFormatAttr(nId)).GetFooterFormat();
635 static_cast<SwNode const *
>(pSttNd) )
653 for(
size_t n = 0;
n < rFootnoteArr.
size(); ++
n )
654 if(
nullptr != ( pTextFootnote = rFootnoteArr[
n ])->GetStartNode() &&
655 static_cast<SwNode const *
>(pSttNd) ==
667 "Where is this Node?" );
682 if( pPageDescItem && pPageDescItem->GetDefinedIn() )
685 if(
auto pContentNode = dynamic_cast<const SwContentNode*>( pMod) )
687 else if(
auto pFormat = dynamic_cast<const SwFormat*>( pMod) )
688 pFormat->GetInfo( aInfo );
696 pPgDesc = static_cast<const SwFormatPageDesc&>(pNd->
GetContentNode()->
700 GetFrameFormat()->GetPageDesc().GetPageDesc();
703 GetFormat()->GetPageDesc().GetPageDesc();
733 for(
size_t n = 0;
n < rFrameFormatTable.
size(); ++
n )
780 bool bCheckFirst =
false;
796 for (nPos = 0; nPos < rONds.
size(); ++nPos)
798 pRet = rONds[nPos]->GetTextNode();
804 if (nPos == rONds.
size())
812 std::pair<Point, bool>
const tmp(aPt,
false);
816 if( pPgFrame && pMyFrame &&
825 for ( ; 0 < nPos; --nPos)
827 SwTextNode const*
const pNode = rONds[nPos - 1]->GetTextNode();
881 const char*
pName =
"???";
899 xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
901 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
902 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(
GetNodeType())).getStr()));
903 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"), BAD_CAST(OString::number(
GetIndex()).getStr()));
909 auto pNoTextNode =
static_cast<const SwNoTextNode*
>(
this);
913 xmlTextWriterStartElement(pWriter, BAD_CAST(
"pContour"));
914 for (sal_uInt16
i = 0;
i < pContour->
Count(); ++
i)
916 xmlTextWriterStartElement(pWriter, BAD_CAST(
"polygon"));
917 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"),
918 BAD_CAST(OString::number(
i).getStr()));
920 for (sal_uInt16 j = 0; j < rPolygon.
GetSize(); ++j)
922 xmlTextWriterStartElement(pWriter, BAD_CAST(
"point"));
923 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"),
924 BAD_CAST(OString::number(j).getStr()));
926 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"x"),
927 BAD_CAST(OString::number(rPoint.X()).getStr()));
928 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"y"),
929 BAD_CAST(OString::number(rPoint.Y()).getStr()));
930 xmlTextWriterEndElement(pWriter);
932 xmlTextWriterEndElement(pWriter);
934 xmlTextWriterEndElement(pWriter);
942 xmlTextWriterEndElement(pWriter);
944 xmlTextWriterEndElement(pWriter);
949 :
SwNode( rWhere, nNdType ), m_eStartNodeType( eSttNd )
980 while(
nullptr != ( pCNd = rNds.
GoNext( &aIdx )) && pCNd->
GetIndex() < nEndIdx )
987 const char*
pName =
"???";
1021 xmlTextWriterStartElement(pWriter, BAD_CAST(pName));
1022 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST(
"ptr"),
"%p",
this);
1023 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"type"), BAD_CAST(OString::number(static_cast<sal_uInt8>(
GetNodeType())).getStr()));
1024 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"index"), BAD_CAST(OString::number(
GetIndex()).getStr()));
1028 xmlTextWriterStartElement(pWriter, BAD_CAST(
"attrset"));
1030 xmlTextWriterEndElement(pWriter);
1035 xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"rowspan"), BAD_CAST(OString::number(pBox->getRowSpan()).getStr()));
1036 xmlTextWriterStartElement(pWriter, BAD_CAST(
"attrset"));
1038 pBox->GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter);
1039 xmlTextWriterEndElement(pWriter);
1072 :
SwNode( rWhere, nNdType )
1073 , m_aCondCollListener( *this )
1074 , m_pCondColl( nullptr )
1075 , mbSetModifyAtAttr( false )
1101 static_cast<SwTextNode*>(
this)->SetCalcHiddenCharFlags();
1107 if (
auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint))
1109 const sal_uInt16 nWhich = pLegacyHint->GetWhich();
1111 bool bSetParent =
false;
1112 bool bCalcHidden =
false;
1118 SwFormat* pFormat = pLegacyHint->m_pNew
1141 && pLegacyHint->m_pNew
1142 && static_cast<const SwFormatChg*>(pLegacyHint->m_pNew)->pChangedFormat ==
GetRegisteredIn())
1152 && pLegacyHint->m_pOld
1153 && SfxItemState::SET == static_cast<const SwAttrSetChg*>(pLegacyHint->m_pOld)->GetChgSet()->GetItemState(
RES_CHRATR_HIDDEN,
false))
1164 if(pLegacyHint->m_pNew != pLegacyHint->m_pOld)
1166 auto pBT = sal::backtrace_get(20);
1167 SAL_WARN(
"sw.core",
"UpdateAttr not matching! " << sal::backtrace_to_string(pBT.get()));
1170 assert(pLegacyHint->m_pNew == pLegacyHint->m_pOld);
1171 assert(dynamic_cast<const SwUpdateAttr*>(pLegacyHint->m_pNew));
1173 const SwUpdateAttr& rUpdateAttr = pLegacyHint->m_pNew ? *
static_cast<const SwUpdateAttr*
>(pLegacyHint->m_pNew) : aFallbackHint;
1180 static_cast<SwTextNode*
>(
this)->SetCalcHiddenCharFlags();
1183 else if (
auto pModifyChangedHint = dynamic_cast<const sw::ModifyChangedHint*>(&rHint))
1187 else if(
auto pCondCollCondChgHint = dynamic_cast<const sw::CondCollCondChg*>(&rHint))
1199 !static_cast<const SwNumRuleItem*>(pItem)->
GetValue().isEmpty() &&
1200 nullptr != (pRule =
GetDoc().FindNumRulePtr(
1201 static_cast<const SwNumRuleItem*>(pItem)->
GetValue() ) ) )
1205 return nullptr != pRule;
1210 std::pair<Point, bool>
const*
const pViewPosAndCalcFrame)
const
1213 pPos, pViewPosAndCalcFrame));
1219 std::pair<Point, bool> tmp;
1222 tmp.first = *pPoint;
1226 FRM_CNTNT,
nullptr, pPoint ? &tmp :
nullptr) );
1236 if( pFrame &&
nullptr != ( pFrame = pFrame->
FindPageFrame() ))
1245 OSL_ENSURE( pNewColl,
"Collectionpointer is 0." );
1248 if( pNewColl != pOldColl )
1250 pNewColl->
Add(
this );
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 );
1391 if ( pViewShell && pViewShell->GetLayout() &&
1392 pViewShell->GetLayout()->IsAnyShellAccessible() )
1395 dynamic_cast<SwTextFrame*>(pNew->
FindNextCnt(
true )),
1396 dynamic_cast<SwTextFrame*>(pNew->
FindPrevCnt()) );
1418 if (pFrame->IsTextFrame())
1421 static_cast<SwTextFrame *>(pFrame)->GetMergedPara())
1423 if (
this != pMerged->pFirstNode)
1431 *static_cast<SwTextNode*>(
this), 0,
Len());
1432 if (
this == pMerged->pParaPropsNode)
1435 assert(
this == pMerged->pLastNode);
1436 assert(pMerged->extents.empty());
1437 for (
sal_uLong i = pMerged->pLastNode->GetIndex() - 1;;
1440 assert(pMerged->pFirstNode->GetIndex() <=
i);
1442 if (pNode->IsTextNode()
1445 pMerged->pParaPropsNode = pNode->GetTextNode();
1449 assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode));
1452 if (
this == pMerged->pLastNode)
1457 this == pMerged->pLastNode; --
i)
1466 SwStartNode const*
const pStart(pEnd->StartOfSectionNode());
1467 i = pStart->GetIndex();
1470 assert(pMerged->pFirstNode->GetIndex() <= pMerged->pLastNode->GetIndex());
1471 assert(pMerged->listener.IsListeningTo(pMerged->pLastNode));
1474 pMerged->listener.EndListening(
this);
1483 SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() );
1484 if ( pViewShell && pViewShell->GetLayout() &&
1485 pViewShell->GetLayout()->IsAnyShellAccessible() )
1488 dynamic_cast<SwTextFrame*>(pFrame->FindNextCnt(
true )),
1489 dynamic_cast<SwTextFrame*>(pFrame->FindPrevCnt()) );
1493 if( pFrame->IsFollow() )
1496 pMaster->
SetFollow( pFrame->GetFollow() );
1498 pFrame->SetFollow(
nullptr );
1506 if( pFrame->GetUpper() && pFrame->IsInFootnote() && !pFrame->GetIndNext() &&
1507 !pFrame->GetIndPrev() )
1510 OSL_ENSURE( pFootnote,
"You promised a FootnoteFrame?" );
1515 OSL_ENSURE( pCFrame->
IsTextFrame(),
"NoTextFrame has Footnote?" );
1532 switch( rInfo.
Which() )
1543 static_cast<SwFindNearestNode&>(rInfo).CheckNode( *
this );
1563 OSL_ENSURE(
GetpSwAttrSet(),
"Why did't we create an AttrSet?");
1600 OSL_ENSURE( rSet.
Count() == 1,
"SetAutoStyle mixed with other attributes?!" );
1605 bool bSetParent =
true;
1675 sal_uInt16 nDel = 0;
1676 if ( !nWhich2 || nWhich2 < nWhich1 )
1678 std::vector<sal_uInt16> aClearWhichIds;
1679 aClearWhichIds.push_back( nWhich1 );
1691 if( !nWhich2 || nWhich2 < nWhich1 )
1720 sal_uInt16 nDel = 0;
1730 for (
const auto& rWhich : rWhichArr )
1756 std::vector<sal_uInt16> aClearWhichIds;
1757 aClearWhichIds.push_back(0);
1774 return aNew.
Count();
1783 return rSet.
Set( rAttrSet );
1788 sal_uInt16 nRet = 0;
1789 if ( rWhichIds.empty() )
1794 for (
const auto& rWhichId : rWhichIds )
1796 nRet = nRet + aNewAttrSet.
ClearItem( rWhichId );
1805 bool bInParents )
const
1811 nWhich,
false, &pFnd ) && bInParents ))
1813 (
void)static_cast<const SwFormat*>(
GetRegisteredIn())->GetItemState( nWhich, bInParents, &pFnd );
1849 const SwNode* pNd =
this;
1850 while( aIdx < rNds.
Count()-1 &&
1872 const SwNode* pNd =
this;
1937 if( pTableNd &&
nullptr != ( pBox = pTableNd->
GetTable().
1949 const SwNode* pSrchNd = pSttNd;
1951 for(
size_t n = 0;
n < rFootnoteArr.
size(); ++
n )
1952 if(
nullptr != ( pTextFootnote = rFootnoteArr[
n ])->GetStartNode() &&
1981 if( !rOutlNds.
empty() )
1983 if( !rOutlNds.
Seek_Entry( const_cast<SwContentNode*>(
this), &nPos ) && nPos )
1985 if( nPos < rOutlNds.
size() &&
1986 rOutlNds[ nPos ]->GetIndex() <
GetIndex() )
1988 SwTextNode* pOutlNd = rOutlNds[ nPos ]->GetTextNode();
2006 SAL_WARN(
"sw.core",
"Wrong cond collection, skipping check of Cond Colls.");
2011 SAL_WARN(
"sw.core",
"Nodes amiss, skipping check of Cond Colls.");
2026 ->HasCondition( aTmp );
2042 static_cast<SwTextNode*>(
this)->GetActualListLevel() );
2044 HasCondition( aTmp );
2057 const Point* pPt )
const
2066 std::pair<Point, bool>
const tmp(aPt,
false);
2074 nRet = SvxFrameDirection::Vertical_LR_BT;
2076 nRet = SvxFrameDirection::Vertical_LR_TB;
2078 nRet = SvxFrameDirection::Vertical_RL_TB;
2083 nRet = SvxFrameDirection::Horizontal_RL_TB;
2085 nRet = SvxFrameDirection::Horizontal_LR_TB;
2094 std::unique_ptr<SwOLENodes> pNodes;
2103 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)
sal_uLong GetIndex() const
SwNode & GetEndOfAutotext() const
Section for all Flys/Header/Footers.
SwStartNode * m_pStartOfSection
void Add(SwClient *pDepend)
virtual const SwFlyFrameFormat * GetFormat() const override
const SwStartNode * FindHeaderStartNode() const
Represents the style of a paragraph.
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
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.
sal_uLong StartOfSectionIndex() const
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)
SwRect FindLayoutRect(const bool bPrtArea=false, const Point *pPoint=nullptr) const
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
SwFormatColl * GetCondFormatColl() 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
constexpr TypedWhichId< SwUpdateAttr > RES_UPDATE_ATTR(165)
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*...
const SwPageDesc * FindPageDesc(size_t *pPgDescNdIdx=nullptr) const
Search PageDesc with which this node is formatted.
static SwCache & GetCache()
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
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)
void SetInCache(bool bNew)
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
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.
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
void AddAnchoredFly(SwFrameFormat *)
static tools::Long s_nSerial
constexpr TypedWhichId< SwPtrMsgPoolItem > RES_CONTENT_VISIBLE(183)
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
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
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
static bool Put_BC(std::shared_ptr< const SfxItemSet > &rpAttrSet, const SwContentNode &rNode, const SfxPoolItem &rAttr, SwAttrSet *pOld, SwAttrSet *pNew)
bool GetModifyAtAttr() const
sal_uLong GetIndex() const
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
TextFrameIndex UpdateMergedParaForDelete(MergedPara &rMerged, bool isRealDelete, SwTextNode const &rNode, sal_Int32 nIndex, sal_Int32 nLen)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(161)
constexpr TypedWhichId< SwFormatChg > RES_FMT_CHG(160)
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...
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(182)
SwStartNode(SwNodes &rNodes, sal_uLong nPos)
for the initial StartNode
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
struct _xmlTextWriter * xmlTextWriterPtr
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)
const SfxPoolItem * GetNoCondAttr(sal_uInt16 nWhich, bool bInParents) const
Obtains attribute that is not delivered via conditional style!
const SfxItemSet * GetParent() const
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()
sal_uInt8 HasPrevNextLayNode() 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
size_t GetPageDescCnt() const
Marks a character position inside a document model node.
Provides access to settings of a document.
bool IsContentProtected() const
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 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
void Delete(const void *pOwner, sal_uInt16 nIndex)
Provides access to the formatting devices of a document.
void StartListening(SwModify *pDepend)
void UpdateAttr(const SwUpdateAttr &)
const sal_uInt16 CRSR_SKIP_CELLS
bool IsModifyLocked() const
const css::lang::Locale & GetLocale(const LanguageType aLang)
SwFrameFormat & GetMaster()
sal_uLong EndOfSectionIndex() const
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 InsertNode(const SwNodePtr pNode, const SwNodeIndex &rPos)
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.
std::unique_ptr< std::vector< SwFrameFormat * > > m_pAnchoredFlys
all SwFrameFormat that are anchored at the node invariant: SwFrameFormat is in the list iff SwFrameFo...
SwTableNode is derived from SwStartNode.
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(158)
constexpr TypedWhichId< SwAutoFormatGetDocNode > RES_AUTOFMT_DOCNODE(171)
bool IsParaPropsNode(SwRootFrame const &rLayout, SwTextNode const &rNode)
virtual SwContentNode * JoinNext()
const SwStartNode * FindTableBoxStartNode() const
constexpr TypedWhichId< SwFlyFrameFormat > RES_FLYFRMFMT(154)
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.
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
SwContentFrame * FindPrevCnt()
bool HasMergedParas() const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
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
bool IsOver(const SwRect &rRect) const
SwNode & GetEndOfExtras() const
This is the last EndNode of a special section.
IStyleAccess & GetIStyleAccess()
SwRootFrame * GetLayout() const
SwViewShell * GetCurrShell() const
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.
SwEndNode(SwNodes &rNodes, sal_uLong nPos, SwStartNode &rSttNd)
for the initial StartNode
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 sal_Int32 COMPLETE_STRING
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)
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
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.