LibreOffice Module sw (master) 1
node.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SW_INC_NODE_HXX
21#define INCLUDED_SW_INC_NODE_HXX
22
23#include <sal/types.h>
24
25#include "swdllapi.h"
26#include "BorderCacheOwner.hxx"
27#include "ndarr.hxx"
28#include "ndtyp.hxx"
29#include "contentindex.hxx"
30#include "fmtcol.hxx"
31#include "nodeoffset.hxx"
32
33#include <memory>
34#include <vector>
35
36class SwContentFrame;
37class SwContentNode;
38class SwDoc;
39class SwEndNode;
40class SwFrame;
41class SwFrameFormat;
42class SwGrfNode;
43class SwNoTextNode;
44class SwNodeIndex;
45class SwOLENode;
46class SwRect;
47class SwSection;
48class SwSectionFormat;
49class SwTOXBase;
50class SwSectionNode;
51class SwStartNode;
52class SwTabFrame;
53class SwRootFrame;
54class SwTable;
55class SwTableNode;
56class SwTableBox;
57class SwTextNode;
58class SwPageDesc;
59class SwViewShell;
60struct SwPosition;
61class IStyleAccess;
71class Point;
72enum class SvxFrameDirection;
73typedef std::vector<SwOLENode*> SwOLENodes; // docary.hxx
74enum class SwCursorSkipMode;
75
77 class SdrAllFillAttributesHelper;
78 typedef std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
79}
80
83 : public sw::BorderCacheOwner, private BigPtrEntry
84{
85 friend class SwNodes;
86
88
92
93public:
95 enum class Merge { None, First, NonFirst, Hidden };
97 return m_eMerge == Merge::None || m_eMerge == Merge::First;
98 }
99 void SetRedlineMergeFlag(Merge const eMerge) { m_eMerge = eMerge; }
100 Merge GetRedlineMergeFlag() const { return m_eMerge; }
101private:
103
104#ifdef DBG_UTIL
107#endif
108
112 std::vector<SwFrameFormat*> m_aAnchoredFlys;
113
114protected:
116
118 SwNode();
119
120 SwNode( const SwNode& rWhere, const SwNodeType nNodeId );
121
123 SwNode( SwNodes& rNodes, SwNodeOffset nPos, const SwNodeType nNodeId );
124
125public:
128 virtual ~SwNode() override = 0;
129
130#ifdef DBG_UTIL
131 tools::Long GetSerial() const { return m_nSerial; }
132#endif
133
134 sal_uInt16 GetSectionLevel() const;
135
136 inline SwNodeOffset StartOfSectionIndex() const;
137 const SwStartNode* StartOfSectionNode() const { return m_pStartOfSection; }
138 SwStartNode* StartOfSectionNode() { return m_pStartOfSection; }
139
140 inline SwNodeOffset EndOfSectionIndex() const;
141 inline const SwEndNode* EndOfSectionNode() const;
142 inline SwEndNode* EndOfSectionNode();
143
144 sal_uInt8 GetAutoFormatLvl() const { return m_nAFormatNumLvl; }
145 void SetAutoFormatLvl( sal_uInt8 nVal ) { m_nAFormatNumLvl = nVal; }
146
147 bool IsIgnoreDontExpand() const { return m_bIgnoreDontExpand; }
148 void SetIgnoreDontExpand( bool bNew ) { m_bIgnoreDontExpand = bNew; }
149
150 SwNodeType GetNodeType() const { return m_nNodeType; }
151
152 inline SwStartNode *GetStartNode();
153 inline const SwStartNode *GetStartNode() const;
155 inline const SwContentNode *GetContentNode() const;
156 inline SwEndNode *GetEndNode();
157 inline const SwEndNode *GetEndNode() const;
158 inline SwTextNode *GetTextNode();
159 inline const SwTextNode *GetTextNode() const;
160 inline SwOLENode *GetOLENode();
161 inline const SwOLENode *GetOLENode() const;
162 inline SwNoTextNode *GetNoTextNode();
163 inline const SwNoTextNode *GetNoTextNode() const;
164 inline SwGrfNode *GetGrfNode();
165 inline const SwGrfNode *GetGrfNode() const;
166 inline SwTableNode *GetTableNode();
167 inline const SwTableNode *GetTableNode() const;
168 inline SwSectionNode *GetSectionNode();
169 inline const SwSectionNode *GetSectionNode() const;
170
171 inline bool IsStartNode() const;
172 inline bool IsContentNode() const;
173 inline bool IsEndNode() const;
174 inline bool IsTextNode() const;
175 inline bool IsTableNode() const;
176 inline bool IsSectionNode() const;
177 inline bool IsOLENode() const;
178 inline bool IsNoTextNode() const;
179 inline bool IsGrfNode() const;
180
187 bool IsInRedlines() const;
188
191 SwTableNode *FindTableNode();
192 inline const SwTableNode *FindTableNode() const;
193
196 SwSectionNode *FindSectionNode();
197 inline const SwSectionNode *FindSectionNode() const;
198
199 SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
200 inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
201
203 { return FindSttNodeByType( SwTableBoxStartNode ); }
205 { return FindSttNodeByType( SwFlyStartNode ); }
207 { return FindSttNodeByType( SwFootnoteStartNode ); }
209 { return FindSttNodeByType( SwHeaderStartNode ); }
211 { return FindSttNodeByType( SwFooterStartNode ); }
212
214 inline SwNodes& GetNodes();
215 inline const SwNodes& GetNodes() const;
216
218 {
219 return GetNodes().GetDoc();
220 }
221
222 const SwDoc& GetDoc() const
223 {
224 return GetNodes().GetDoc();
225 }
226
229 const IDocumentSettingAccess* getIDocumentSettingAccess() const;
230
233 const IDocumentDeviceAccess& getIDocumentDeviceAccess() const;
234
237 const IDocumentMarkAccess* getIDocumentMarkAccess() const;
238
241 const IDocumentRedlineAccess& getIDocumentRedlineAccess() const;
242
245 const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const;
246
249 const IDocumentDrawModelAccess& getIDocumentDrawModelAccess() const;
250
253 const IDocumentLayoutAccess& getIDocumentLayoutAccess() const;
254 IDocumentLayoutAccess& getIDocumentLayoutAccess();
255
258 const IDocumentLinksAdministration& getIDocumentLinksAdministration() const;
259 IDocumentLinksAdministration& getIDocumentLinksAdministration();
260
263 const IDocumentFieldsAccess& getIDocumentFieldsAccess() const;
264 IDocumentFieldsAccess& getIDocumentFieldsAccess();
265
268 IDocumentContentOperations& getIDocumentContentOperations();
269
272 IStyleAccess& getIDocumentStyleAccess();
273
275 IDocumentListItems& getIDocumentListItems();
276
278 bool IsInVisibleArea( SwViewShell const * pSh ) const;
280 bool IsInProtectSect() const;
283 bool IsProtect() const;
284
288 const SwPageDesc* FindPageDesc( SwNodeOffset* pPgDescNdIdx = nullptr ) const;
289
291 SwFrameFormat* GetFlyFormat() const;
292
294 SwTableBox* GetTableBox() const;
295
297
298 const SwTextNode* FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const* pLayout = nullptr) const;
299
300 sal_uInt8 HasPrevNextLayNode() const;
301
302 std::vector<SwFrameFormat *> const & GetAnchoredFlys() const { return m_aAnchoredFlys; }
303 void AddAnchoredFly(SwFrameFormat *);
304 void RemoveAnchoredFly(SwFrameFormat *);
305
309 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
310
311 bool operator==(const SwNode& rOther) const { return this == &rOther; }
312 bool operator!=(const SwNode& rOther) const { return this != &rOther; }
313 bool operator<(const SwNode& rOther) const { assert(&GetNodes() == &rOther.GetNodes()); return GetIndex() < rOther.GetIndex(); }
314 bool operator<=(const SwNode& rOther) const { assert(&GetNodes() == &rOther.GetNodes()); return GetIndex() <= rOther.GetIndex(); }
315 bool operator>(const SwNode& rOther) const { assert(&GetNodes() == &rOther.GetNodes()); return GetIndex() > rOther.GetIndex(); }
316 bool operator>=(const SwNode& rOther) const { assert(&GetNodes() == &rOther.GetNodes()); return GetIndex() >= rOther.GetIndex(); }
317
318private:
319 SwNode( const SwNode & rNodes ) = delete;
320 SwNode & operator= ( const SwNode & rNodes ) = delete;
321};
322
324class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode
325{
326 friend class SwNode;
327 friend class SwNodes;
328 friend class SwEndNode;
329
332
334 SwStartNode( SwNodes& rNodes, SwNodeOffset nPos );
335
336protected:
337 SwStartNode( const SwNode& rWhere,
338 const SwNodeType nNodeType = SwNodeType::Start,
340public:
341 SwStartNodeType GetStartNodeType() const { return m_eStartNodeType; }
342
344 void CheckSectionCondColl() const;
345
346 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
347
348private:
349 SwStartNode( const SwStartNode & rNode ) = delete;
350 SwStartNode & operator= ( const SwStartNode & rNode ) = delete;
351};
352
354class SwEndNode final : public SwNode
355{
356 friend class SwNodes;
357 friend class SwTableNode;
358 friend class SwSectionNode;
359
361 SwEndNode( SwNodes& rNodes, SwNodeOffset nPos, SwStartNode& rSttNd );
362
363 SwEndNode( const SwNode& rWhere, SwStartNode& rSttNd );
364
365 SwEndNode( const SwEndNode & rNode ) = delete;
366 SwEndNode & operator= ( const SwEndNode & rNode ) = delete;
367};
368
369// SwContentNode
370
372{
373
376 mutable bool mbSetModifyAtAttr;
377
378protected:
381
382 SwContentNode( const SwNode& rWhere, const SwNodeType nNodeType,
383 SwFormatColl *pFormatColl );
386 virtual ~SwContentNode() override = 0;
387
390 std::shared_ptr<const SfxItemSet> mpAttrSet;
391
393 virtual void NewAttrSet( SwAttrPool& ) = 0;
394
397 sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
398
399 virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) override;
400
401public:
402
405 virtual SwContentFrame *MakeFrame( SwFrame* pSib ) = 0;
406
407 virtual SwContentNode *JoinNext();
410 bool CanJoinNext( SwNodeIndex* pIdx = nullptr ) const;
411 bool CanJoinNext( SwPosition* pIdx ) const;
412 bool CanJoinPrev( SwNodeIndex* pIdx =nullptr ) const;
413
414 void MakeStartIndex( SwContentIndex * pIdx ) { pIdx->Assign( this, 0 ); }
415 void MakeEndIndex( SwContentIndex * pIdx ) { pIdx->Assign( this, Len() ); }
416
417 bool GoNext(SwContentIndex *, SwCursorSkipMode nMode ) const;
418 bool GoNext(SwPosition*, SwCursorSkipMode nMode ) const;
419 bool GoPrevious(SwContentIndex *, SwCursorSkipMode nMode ) const;
420
422 SwContentFrame *getLayoutFrame( const SwRootFrame*,
423 const SwPosition *pPos = nullptr,
424 std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr) const;
427 SwRect FindLayoutRect( const bool bPrtArea = false,
428 const Point* pPoint = nullptr ) const;
429 SwRect FindPageFrameRect() const;
430
433 void MakeFramesForAdjacentContentNode(SwContentNode& rNode);
434
438 void DelFrames(SwRootFrame const* pLayout);
439
442 virtual sal_Int32 Len() const;
443
444 virtual SwContentNode* MakeCopy(SwDoc&, SwNode& rWhere, bool bNewFrames) const = 0;
445
447 virtual bool GetInfo( SfxPoolItem& ) const override;
448
450
452 const SfxPoolItem& GetAttr( sal_uInt16 nWhich, bool bInParent=true ) const;
453 template<class T>
454 const T& GetAttr( TypedWhichId<T> nWhich, bool bInParent=true ) const
455 { return static_cast<const T&>(GetAttr(sal_uInt16(nWhich), bInParent)); }
456 bool GetAttr( SfxItemSet& rSet ) const;
458 virtual bool SetAttr( const SfxPoolItem& );
459 virtual bool SetAttr( const SfxItemSet& rSet );
460 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
461 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr );
462 virtual sal_uInt16 ResetAllAttr();
463
465 const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, bool bInParents ) const;
466 template<class T>
467 const T* GetNoCondAttr( TypedWhichId<T> nWhich, bool bInParents ) const
468 { return static_cast<const T*>(GetNoCondAttr(sal_uInt16(nWhich), bInParents)); }
469
472 inline const SwAttrSet &GetSwAttrSet() const;
473 const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
474 bool HasSwAttrSet() const { return mpAttrSet != nullptr; }
475
476 virtual SwFormatColl* ChgFormatColl( SwFormatColl* );
477 SwFormatColl* GetFormatColl() const { return const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn())); }
478
479 inline SwFormatColl& GetAnyFormatColl() const;
480 void SetCondFormatColl( SwFormatColl* );
481 inline SwFormatColl* GetCondFormatColl() const;
482
483 bool IsAnyCondition( SwCollCondition& rTmp ) const;
484 void ChkCondColl(const SwTextFormatColl* pColl = nullptr);
485
488 bool InvalidateNumRule();
489
492 SvxFrameDirection GetTextDirection( const SwPosition& rPos,
493 const Point* pPt ) const;
494
495 void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
496 bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
497
498 static std::unique_ptr<SwOLENodes> CreateOLENodesArray( const SwFormatColl& rColl, bool bOnlyWithInvalidSize );
499
500 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
501 virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
502
503 void UpdateAttr(const SwUpdateAttr&);
504
505private:
506 SwContentNode( const SwContentNode & rNode ) = delete;
507 SwContentNode & operator= ( const SwContentNode & rNode ) = delete;
508};
509
510// SwTableNode
511
513{
514 friend class SwNodes;
515 std::unique_ptr<SwTable> m_pTable;
516
517 virtual ~SwTableNode() override;
518
519public:
520 SwTableNode( const SwNode& );
521
522 const SwTable& GetTable() const { return *m_pTable; }
523 SwTable& GetTable() { return *m_pTable; }
524 SwTabFrame *MakeFrame( SwFrame* );
525
528 void MakeOwnFrames(SwNodeIndex* pIdxBehind = nullptr);
529
532 void DelFrames(SwRootFrame const* pLayout = nullptr);
533
536 void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
537
538 SwTableNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
539 void SetNewTable( std::unique_ptr<SwTable> , bool bNewFrames=true );
540
541 // Removes redline objects that relate to this table from the 'Extra Redlines' table
542 void RemoveRedlines();
543
544 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
545
546private:
547 SwTableNode( const SwTableNode & rNode ) = delete;
548 SwTableNode & operator= ( const SwTableNode & rNode ) = delete;
549};
550
551class SAL_DLLPUBLIC_RTTI SwSectionNode final
552 : public SwStartNode
553{
554 friend class SwNodes;
555
556private:
557 SwSectionNode(const SwSectionNode&) = delete;
559
560 std::unique_ptr<SwSection> const m_pSection;
561
562 virtual ~SwSectionNode() override;
563
564public:
565 SwSectionNode(const SwNode& rWhere,
566 SwSectionFormat & rFormat, SwTOXBase const*const pTOXBase);
567
568 const SwSection& GetSection() const { return *m_pSection; }
569 SwSection& GetSection() { return *m_pSection; }
570
571 SwFrame *MakeFrame( SwFrame* );
572
577 void MakeOwnFrames(SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr);
578
581 void DelFrames(SwRootFrame const* pLayout = nullptr, bool bForce = false);
582
585 void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
586
587 SwSectionNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
588
590 void NodesArrChgd();
591
594 bool IsContentHidden() const;
595
596 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
597
598};
599
605class SwPlaceholderNode final : private SwNode
606{
607private:
608 friend class SwNodes;
609 SwPlaceholderNode(const SwNode& rWhere);
610};
611
613{
614 return SwNodeType::End == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
615}
616inline const SwEndNode *SwNode::GetEndNode() const
617{
618 return SwNodeType::End == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
619}
621{
622 return SwNodeType::Start & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
623}
625{
626 return SwNodeType::Start & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
627}
629{
630 return SwNodeType::Table == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
631}
633{
634 return SwNodeType::Table == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
635}
637{
638 return SwNodeType::Section == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
639}
641{
642 return SwNodeType::Section == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
643}
645{
646 return SwNodeType::ContentMask & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
647}
649{
650 return SwNodeType::ContentMask & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
651}
652
653inline bool SwNode::IsStartNode() const
654{
655 return bool(SwNodeType::Start & m_nNodeType);
656}
657inline bool SwNode::IsContentNode() const
658{
660}
661inline bool SwNode::IsEndNode() const
662{
664}
665inline bool SwNode::IsTextNode() const
666{
668}
669inline bool SwNode::IsTableNode() const
670{
672}
673inline bool SwNode::IsSectionNode() const
674{
676}
677inline bool SwNode::IsNoTextNode() const
678{
679 return bool(SwNodeType::NoTextMask & m_nNodeType);
680}
681inline bool SwNode::IsOLENode() const
682{
684}
685inline bool SwNode::IsGrfNode() const
686{
688}
689
691{
692 return const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
693}
695{
696 return const_cast<SwNode*>(this)->FindTableNode();
697}
699{
700 return const_cast<SwNode*>(this)->FindSectionNode();
701}
703{
704 return m_pStartOfSection->GetIndex();
705}
707{
708 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
709 return pStNd->m_pEndOfSection->GetIndex();
710}
712{
713 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
714 return pStNd->m_pEndOfSection;
715}
717{
718 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
719 return pStNd->m_pEndOfSection;
720}
721
723{
724 return static_cast<SwNodes&>(GetArray());
725}
726inline const SwNodes& SwNode::GetNodes() const
727{
728 return static_cast<SwNodes&>(GetArray());
729}
730
732{
733 return m_pCondColl;
734}
735
737{
738 return m_pCondColl
739 ? *m_pCondColl
740 : *const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn()));
741}
742
744{
746}
747
748//FEATURE::CONDCOLL
749
750inline const SfxPoolItem& SwContentNode::GetAttr( sal_uInt16 nWhich,
751 bool bInParents ) const
752{
753 return GetSwAttrSet().Get( nWhich, bInParents );
754}
755
757 : SwNode(rWhere, SwNodeType::PlaceHolder)
758{
759}
760
762{
763 return static_cast<SwNode*>(BigPtrArray::operator[] ( sal_Int32(n) ));
764}
765
766#endif
767
768/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _xmlTextWriter * xmlTextWriterPtr
BigPtrEntry * operator[](sal_Int32) const
Definition: bparr.cxx:82
sal_Int32 GetPos() const
Definition: bparr.hxx:98
BigPtrArray & GetArray() const
Definition: bparr.hxx:104
Text operation/manipulation interface.
Provides access to the formatting devices of a document.
Document fields related interfaces.
Provides access to the layout of a document.
Document links administration interface.
Provides numbered items of a document.
Provides access to the marks of a document.
Provides access to settings of a document.
Access to the style pool.
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:164
SwContentFrame is the layout for content nodes: a common base class for text (paragraph) and non-text...
Definition: cntfrm.hxx:58
Helper base class for SwContentNode to manage the list of attached SwContentIndex.
Marks a character position inside a document model content node (SwContentNode)
SwContentIndex & Assign(const SwContentNode *, sal_Int32)
Definition: index.cxx:206
void MakeStartIndex(SwContentIndex *pIdx)
Definition: node.hxx:414
SwFormatColl * GetFormatColl() const
Definition: node.hxx:477
SwFormatColl * m_pCondColl
Definition: node.hxx:375
bool HasSwAttrSet() const
Definition: node.hxx:474
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e....
const T * GetNoCondAttr(TypedWhichId< T > nWhich, bool bInParents) const
Definition: node.hxx:467
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:750
void MakeEndIndex(SwContentIndex *pIdx)
Definition: node.hxx:415
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:743
bool mbSetModifyAtAttr
Definition: node.hxx:376
const T & GetAttr(TypedWhichId< T > nWhich, bool bInParent=true) const
Definition: node.hxx:454
bool GetModifyAtAttr() const
Definition: node.hxx:496
void SetModifyAtAttr(bool bSetModifyAtAttr) const
Definition: node.hxx:495
std::shared_ptr< const SfxItemSet > mpAttrSet
Attribute-set for all auto attributes of a ContentNode.
Definition: node.hxx:390
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:473
virtual SwContentNode * MakeCopy(SwDoc &, SwNode &rWhere, bool bNewFrames) const =0
SwContentNode(const SwContentNode &rNode)=delete
sw::WriterMultiListener m_aCondCollListener
Definition: node.hxx:374
SwFormatColl * GetCondFormatColl() const
Definition: node.hxx:731
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:736
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
Definition: doc.hxx:192
Ends a section of nodes in the document model.
Definition: node.hxx:355
SwEndNode(const SwEndNode &rNode)=delete
SwEndNode(SwNodes &rNodes, SwNodeOffset nPos, SwStartNode &rSttNd)
for the initial StartNode
Definition: node.cxx:1068
SwEndNode & operator=(const SwEndNode &rNode)=delete
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:136
Style of a layout element.
Definition: frmfmt.hxx:62
Base class of the Writer layout elements.
Definition: frame.hxx:315
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
Definition: ndnotxt.hxx:30
Marks a node in the document model.
Definition: ndindex.hxx:31
Base class of the Writer document model elements.
Definition: node.hxx:84
bool IsGrfNode() const
Definition: node.hxx:685
SwStartNode * GetStartNode()
Definition: node.hxx:620
bool IsIgnoreDontExpand() const
Definition: node.hxx:147
SwNode(const SwNode &rNodes)=delete
const SwDoc & GetDoc() const
Definition: node.hxx:222
sal_uInt8 GetAutoFormatLvl() const
Definition: node.hxx:144
SwSectionNode * GetSectionNode()
Definition: node.hxx:636
void SetIgnoreDontExpand(bool bNew)
Definition: node.hxx:148
SwNodeOffset GetIndex() const
Definition: node.hxx:296
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:202
bool operator!=(const SwNode &rOther) const
Definition: node.hxx:312
const SwStartNode * FindFooterStartNode() const
Definition: node.hxx:210
tools::Long m_nSerial
Definition: node.hxx:106
SwStartNode * m_pStartOfSection
Definition: node.hxx:115
bool IsNoTextNode() const
Definition: node.hxx:677
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:722
std::vector< SwFrameFormat * > m_aAnchoredFlys
all SwFrameFormat that are anchored at the node invariant: SwFrameFormat is in the list iff SwFrameFo...
Definition: node.hxx:112
bool IsContentNode() const
Definition: node.hxx:657
const SwStartNode * FindHeaderStartNode() const
Definition: node.hxx:208
SwDoc & GetDoc()
Definition: node.hxx:217
Merge
sw_redlinehide: redline node merge state
Definition: node.hxx:95
bool operator<(const SwNode &rOther) const
Definition: node.hxx:313
bool operator==(const SwNode &rOther) const
Definition: node.hxx:311
bool IsEndNode() const
Definition: node.hxx:661
bool IsStartNode() const
Definition: node.hxx:653
SwNodeOffset StartOfSectionIndex() const
Definition: node.hxx:702
const SwStartNode * FindFlyStartNode() const
Definition: node.hxx:204
void SetRedlineMergeFlag(Merge const eMerge)
Definition: node.hxx:99
bool IsSectionNode() const
Definition: node.hxx:673
bool IsTableNode() const
Definition: node.hxx:669
bool IsTextNode() const
Definition: node.hxx:665
const SwStartNode * FindFootnoteStartNode() const
Definition: node.hxx:206
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:370
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
Definition: node.cxx:776
bool operator>=(const SwNode &rOther) const
Definition: node.hxx:316
SwSectionNode * FindSectionNode()
Search section node, in which it is.
Definition: ndsect.cxx:981
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:137
SwNode & operator=(const SwNode &rNodes)=delete
SwStartNode * StartOfSectionNode()
Definition: node.hxx:138
Merge GetRedlineMergeFlag() const
Definition: node.hxx:100
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:706
SwNodeType m_nNodeType
Definition: node.hxx:87
Merge m_eMerge
Definition: node.hxx:102
bool IsCreateFrameWhenHidingRedlines() const
Definition: node.hxx:96
SwContentNode * GetContentNode()
Definition: node.hxx:644
tools::Long GetSerial() const
Definition: node.hxx:131
bool operator<=(const SwNode &rOther) const
Definition: node.hxx:314
SwTableNode * GetTableNode()
Definition: node.hxx:628
static tools::Long s_nSerial
Definition: node.hxx:105
void SetAutoFormatLvl(sal_uInt8 nVal)
Definition: node.hxx:145
SwNodeType GetNodeType() const
Definition: node.hxx:150
bool m_bIgnoreDontExpand
for Text Attributes - ignore the flag
Definition: node.hxx:91
std::vector< SwFrameFormat * > const & GetAnchoredFlys() const
Definition: node.hxx:302
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const
Dumps the node structure to the given destination (file nodes.xml in the current directory by default...
Definition: node.cxx:893
bool operator>(const SwNode &rOther) const
Definition: node.hxx:315
SwEndNode * GetEndNode()
Definition: node.hxx:612
bool IsOLENode() const
Definition: node.hxx:681
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:711
sal_uInt8 m_nAFormatNumLvl
For text nodes: level of auto format. Was put here because we had still free bits.
Definition: node.hxx:90
static sal_uInt16 GetSectionLevel(const SwNode &rIndex)
get section level at the given position
Definition: nodes.cxx:1268
SwNode * operator[](SwNodeOffset n) const
Definition: node.hxx:761
void dumpAsXml(xmlTextWriterPtr pWriter) const
Dumps the entire nodes structure to the given destination (file nodes.xml in the current directory by...
Definition: nodes.cxx:2536
friend class SwNode
Definition: ndarr.hxx:93
This class is internal, used only during DocumentContentOperationsManager::CopyWithFlyInFly(),...
Definition: node.hxx:606
SwPlaceholderNode(const SwNode &rWhere)
Definition: node.hxx:756
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
std::unique_ptr< SwSection > const m_pSection
Definition: node.hxx:560
SwSectionNode(const SwSectionNode &)=delete
const SwSection & GetSection() const
Definition: node.hxx:568
SwSectionNode & operator=(const SwSectionNode &)=delete
SwSection & GetSection()
Definition: node.hxx:569
Starts a section of nodes in the document model.
Definition: node.hxx:325
SwEndNode * m_pEndOfSection
Definition: node.hxx:330
SwStartNodeType m_eStartNodeType
Definition: node.hxx:331
SwStartNode(const SwStartNode &rNode)=delete
SwStartNodeType GetStartNodeType() const
Definition: node.hxx:341
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:47
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:419
const SwTable & GetTable() const
Definition: node.hxx:522
SwTable & GetTable()
Definition: node.hxx:523
std::unique_ptr< SwTable > m_pTable
Definition: node.hxx:515
SwTableNode(const SwTableNode &rNode)=delete
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:113
Represents the style of a paragraph.
Definition: fmtcol.hxx:59
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:89
Bookkeeping helper for SwCache caching writer borders.
BorderCacheOwner & operator=(const BorderCacheOwner &)
static SwNode * GetStartNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
Definition: docglbl.cxx:89
static SwNode * GetEndNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
Definition: docglbl.cxx:103
static SwContentNode * GetContentNode(SwDoc &rDoc, SwPosition &rPos, bool bNext)
Definition: fltshell.cxx:54
SvxFrameDirection
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
Definition: htmlcss1.cxx:1311
sal_Int64 n
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
None
long Long
SwStartNodeType
Definition: ndtyp.hxx:51
@ SwNormalStartNode
Definition: ndtyp.hxx:52
@ SwHeaderStartNode
Definition: ndtyp.hxx:56
@ SwFooterStartNode
Definition: ndtyp.hxx:57
@ SwFlyStartNode
Definition: ndtyp.hxx:54
@ SwTableBoxStartNode
Definition: ndtyp.hxx:53
@ SwFootnoteStartNode
Definition: ndtyp.hxx:55
SwNodeType
Definition: ndtyp.hxx:28
@ Table
SwTableNode is derived from SwStartNode.
@ Section
SwSectionNode is derived from SwStartNode.
std::vector< SwOLENode * > SwOLENodes
Definition: node.hxx:72
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
bool GoNext(SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
Definition: pam.cxx:380
bool GoPrevious(SwNode *pNd, SwContentIndex *pIdx, SwCursorSkipMode nMode)
Definition: pam.cxx:387
Marks a position in the document model.
Definition: pam.hxx:37
SwCursorSkipMode
Definition: swcrsr.hxx:65
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8