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 "index.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
74
76 class SdrAllFillAttributesHelper;
77 typedef std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
78}
79
82 : public sw::BorderCacheOwner, private BigPtrEntry
83{
84 friend class SwNodes;
85
87
91
92public:
94 enum class Merge { None, First, NonFirst, Hidden };
96 return m_eMerge == Merge::None || m_eMerge == Merge::First;
97 }
98 void SetRedlineMergeFlag(Merge const eMerge) { m_eMerge = eMerge; }
99 Merge GetRedlineMergeFlag() const { return m_eMerge; }
100private:
102
103#ifdef DBG_UTIL
106#endif
107
111 std::vector<SwFrameFormat*> m_aAnchoredFlys;
112
113protected:
115
116 SwNode( const SwNodeIndex &rWhere, const SwNodeType nNodeId );
117
119 SwNode( SwNodes& rNodes, SwNodeOffset nPos, const SwNodeType nNodeId );
120
121public:
124 virtual ~SwNode() override = 0;
125
126#ifdef DBG_UTIL
127 tools::Long GetSerial() const { return m_nSerial; }
128#endif
129
130 sal_uInt16 GetSectionLevel() const;
131
132 inline SwNodeOffset StartOfSectionIndex() const;
133 const SwStartNode* StartOfSectionNode() const { return m_pStartOfSection; }
134 SwStartNode* StartOfSectionNode() { return m_pStartOfSection; }
135
136 inline SwNodeOffset EndOfSectionIndex() const;
137 inline const SwEndNode* EndOfSectionNode() const;
138 inline SwEndNode* EndOfSectionNode();
139
140 sal_uInt8 GetAutoFormatLvl() const { return m_nAFormatNumLvl; }
141 void SetAutoFormatLvl( sal_uInt8 nVal ) { m_nAFormatNumLvl = nVal; }
142
143 bool IsIgnoreDontExpand() const { return m_bIgnoreDontExpand; }
144 void SetIgnoreDontExpand( bool bNew ) { m_bIgnoreDontExpand = bNew; }
145
146 SwNodeType GetNodeType() const { return m_nNodeType; }
147
148 inline SwStartNode *GetStartNode();
149 inline const SwStartNode *GetStartNode() const;
151 inline const SwContentNode *GetContentNode() const;
152 inline SwEndNode *GetEndNode();
153 inline const SwEndNode *GetEndNode() const;
154 inline SwTextNode *GetTextNode();
155 inline const SwTextNode *GetTextNode() const;
156 inline SwOLENode *GetOLENode();
157 inline const SwOLENode *GetOLENode() const;
158 inline SwNoTextNode *GetNoTextNode();
159 inline const SwNoTextNode *GetNoTextNode() const;
160 inline SwGrfNode *GetGrfNode();
161 inline const SwGrfNode *GetGrfNode() const;
162 inline SwTableNode *GetTableNode();
163 inline const SwTableNode *GetTableNode() const;
164 inline SwSectionNode *GetSectionNode();
165 inline const SwSectionNode *GetSectionNode() const;
166
167 inline bool IsStartNode() const;
168 inline bool IsContentNode() const;
169 inline bool IsEndNode() const;
170 inline bool IsTextNode() const;
171 inline bool IsTableNode() const;
172 inline bool IsSectionNode() const;
173 inline bool IsOLENode() const;
174 inline bool IsNoTextNode() const;
175 inline bool IsGrfNode() const;
176
183 bool IsInRedlines() const;
184
187 SwTableNode *FindTableNode();
188 inline const SwTableNode *FindTableNode() const;
189
192 SwSectionNode *FindSectionNode();
193 inline const SwSectionNode *FindSectionNode() const;
194
195 SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
196 inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
197
199 { return FindSttNodeByType( SwTableBoxStartNode ); }
201 { return FindSttNodeByType( SwFlyStartNode ); }
203 { return FindSttNodeByType( SwFootnoteStartNode ); }
205 { return FindSttNodeByType( SwHeaderStartNode ); }
207 { return FindSttNodeByType( SwFooterStartNode ); }
208
210 inline SwNodes& GetNodes();
211 inline const SwNodes& GetNodes() const;
212
214 {
215 return GetNodes().GetDoc();
216 }
217
218 const SwDoc& GetDoc() const
219 {
220 return GetNodes().GetDoc();
221 }
222
225 const IDocumentSettingAccess* getIDocumentSettingAccess() const;
226
229 const IDocumentDeviceAccess& getIDocumentDeviceAccess() const;
230
233 const IDocumentMarkAccess* getIDocumentMarkAccess() const;
234
237 const IDocumentRedlineAccess& getIDocumentRedlineAccess() const;
238
241 const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const;
242
245 const IDocumentDrawModelAccess& getIDocumentDrawModelAccess() const;
246
249 const IDocumentLayoutAccess& getIDocumentLayoutAccess() const;
250 IDocumentLayoutAccess& getIDocumentLayoutAccess();
251
254 const IDocumentLinksAdministration& getIDocumentLinksAdministration() const;
255 IDocumentLinksAdministration& getIDocumentLinksAdministration();
256
259 const IDocumentFieldsAccess& getIDocumentFieldsAccess() const;
260 IDocumentFieldsAccess& getIDocumentFieldsAccess();
261
264 IDocumentContentOperations& getIDocumentContentOperations();
265
268 IStyleAccess& getIDocumentStyleAccess();
269
271 IDocumentListItems& getIDocumentListItems();
272
274 bool IsInVisibleArea( SwViewShell const * pSh ) const;
276 bool IsInProtectSect() const;
279 bool IsProtect() const;
280
284 const SwPageDesc* FindPageDesc( SwNodeOffset* pPgDescNdIdx = nullptr ) const;
285
287 SwFrameFormat* GetFlyFormat() const;
288
290 SwTableBox* GetTableBox() const;
291
293
294 const SwTextNode* FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const* pLayout = nullptr) const;
295
296 sal_uInt8 HasPrevNextLayNode() const;
297
298 std::vector<SwFrameFormat *> const & GetAnchoredFlys() const { return m_aAnchoredFlys; }
299 void AddAnchoredFly(SwFrameFormat *);
300 void RemoveAnchoredFly(SwFrameFormat *);
301
305 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
306
307private:
308 SwNode( const SwNode & rNodes ) = delete;
309 SwNode & operator= ( const SwNode & rNodes ) = delete;
310};
311
313class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode
314{
315 friend class SwNode;
316 friend class SwNodes;
317 friend class SwEndNode;
318
321
323 SwStartNode( SwNodes& rNodes, SwNodeOffset nPos );
324
325protected:
326 SwStartNode( const SwNodeIndex &rWhere,
327 const SwNodeType nNodeType = SwNodeType::Start,
329public:
330 SwStartNodeType GetStartNodeType() const { return m_eStartNodeType; }
331
333 void CheckSectionCondColl() const;
334
335 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
336
337private:
338 SwStartNode( const SwStartNode & rNode ) = delete;
339 SwStartNode & operator= ( const SwStartNode & rNode ) = delete;
340};
341
343class SwEndNode final : public SwNode
344{
345 friend class SwNodes;
346 friend class SwTableNode;
347 friend class SwSectionNode;
348
350 SwEndNode( SwNodes& rNodes, SwNodeOffset nPos, SwStartNode& rSttNd );
351
352 SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
353
354 SwEndNode( const SwEndNode & rNode ) = delete;
355 SwEndNode & operator= ( const SwEndNode & rNode ) = delete;
356};
357
358// SwContentNode
359
361{
362
365 mutable bool mbSetModifyAtAttr;
366
367protected:
368 SwContentNode( const SwNodeIndex &rWhere, const SwNodeType nNodeType,
369 SwFormatColl *pFormatColl );
372 virtual ~SwContentNode() override = 0;
373
376 std::shared_ptr<const SfxItemSet> mpAttrSet;
377
379 virtual void NewAttrSet( SwAttrPool& ) = 0;
380
383 sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
384
385 virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) override;
386
387public:
388
391 virtual SwContentFrame *MakeFrame( SwFrame* pSib ) = 0;
392
393 virtual SwContentNode *JoinNext();
396 bool CanJoinNext( SwNodeIndex* pIdx =nullptr ) const;
397 bool CanJoinPrev( SwNodeIndex* pIdx =nullptr ) const;
398
399 void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
400 void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
401
402 bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
403 bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
404
406 SwContentFrame *getLayoutFrame( const SwRootFrame*,
407 const SwPosition *pPos = nullptr,
408 std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr) const;
411 SwRect FindLayoutRect( const bool bPrtArea = false,
412 const Point* pPoint = nullptr ) const;
413 SwRect FindPageFrameRect() const;
414
417 void MakeFramesForAdjacentContentNode(SwContentNode& rNode);
418
422 void DelFrames(SwRootFrame const* pLayout);
423
426 virtual sal_Int32 Len() const;
427
428 virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const = 0;
429
431 virtual bool GetInfo( SfxPoolItem& ) const override;
432
434
436 const SfxPoolItem& GetAttr( sal_uInt16 nWhich, bool bInParent=true ) const;
437 template<class T>
438 const T& GetAttr( TypedWhichId<T> nWhich, bool bInParent=true ) const
439 { return static_cast<const T&>(GetAttr(sal_uInt16(nWhich), bInParent)); }
440 bool GetAttr( SfxItemSet& rSet ) const;
442 virtual bool SetAttr( const SfxPoolItem& );
443 virtual bool SetAttr( const SfxItemSet& rSet );
444 virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
445 virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr );
446 virtual sal_uInt16 ResetAllAttr();
447
449 const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, bool bInParents ) const;
450 template<class T>
451 const T* GetNoCondAttr( TypedWhichId<T> nWhich, bool bInParents ) const
452 { return static_cast<const T*>(GetNoCondAttr(sal_uInt16(nWhich), bInParents)); }
453
456 inline const SwAttrSet &GetSwAttrSet() const;
457 const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
458 bool HasSwAttrSet() const { return mpAttrSet != nullptr; }
459
460 virtual SwFormatColl* ChgFormatColl( SwFormatColl* );
461 SwFormatColl* GetFormatColl() const { return const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn())); }
462
463 inline SwFormatColl& GetAnyFormatColl() const;
464 void SetCondFormatColl( SwFormatColl* );
465 inline SwFormatColl* GetCondFormatColl() const;
466
467 bool IsAnyCondition( SwCollCondition& rTmp ) const;
468 void ChkCondColl(const SwTextFormatColl* pColl = nullptr);
469
472 bool InvalidateNumRule();
473
476 SvxFrameDirection GetTextDirection( const SwPosition& rPos,
477 const Point* pPt ) const;
478
479 void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
480 bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
481
482 static std::unique_ptr<SwOLENodes> CreateOLENodesArray( const SwFormatColl& rColl, bool bOnlyWithInvalidSize );
483
484 // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
485 virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
486
487 void UpdateAttr(const SwUpdateAttr&);
488
489private:
490 SwContentNode( const SwContentNode & rNode ) = delete;
491 SwContentNode & operator= ( const SwContentNode & rNode ) = delete;
492};
493
494// SwTableNode
495
497{
498 friend class SwNodes;
499 std::unique_ptr<SwTable> m_pTable;
500
501 virtual ~SwTableNode() override;
502
503public:
504 SwTableNode( const SwNodeIndex & );
505
506 const SwTable& GetTable() const { return *m_pTable; }
507 SwTable& GetTable() { return *m_pTable; }
508 SwTabFrame *MakeFrame( SwFrame* );
509
511 void MakeOwnFrames(SwNodeIndex* pIdxBehind);
512
515 void DelFrames(SwRootFrame const* pLayout = nullptr);
516
519 void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
520
521 SwTableNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
522 void SetNewTable( std::unique_ptr<SwTable> , bool bNewFrames=true );
523
524 // Removes redline objects that relate to this table from the 'Extra Redlines' table
525 void RemoveRedlines();
526
527 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
528
529private:
530 SwTableNode( const SwTableNode & rNode ) = delete;
531 SwTableNode & operator= ( const SwTableNode & rNode ) = delete;
532};
533
534class SAL_DLLPUBLIC_RTTI SwSectionNode final
535 : public SwStartNode
536{
537 friend class SwNodes;
538
539private:
540 SwSectionNode(const SwSectionNode&) = delete;
542
543 std::unique_ptr<SwSection> const m_pSection;
544
545 virtual ~SwSectionNode() override;
546
547public:
549 SwSectionFormat & rFormat, SwTOXBase const*const pTOXBase);
550
551 const SwSection& GetSection() const { return *m_pSection; }
552 SwSection& GetSection() { return *m_pSection; }
553
554 SwFrame *MakeFrame( SwFrame* );
555
560 void MakeOwnFrames(SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr);
561
564 void DelFrames(SwRootFrame const* pLayout = nullptr, bool bForce = false);
565
568 void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
569
570 SwSectionNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
571
573 void NodesArrChgd();
574
577 bool IsContentHidden() const;
578
579 void dumpAsXml(xmlTextWriterPtr pWriter) const override;
580
581};
582
588class SwPlaceholderNode final : private SwNode
589{
590private:
591 friend class SwNodes;
592 SwPlaceholderNode(const SwNodeIndex &rWhere);
593};
594
596{
597 return SwNodeType::End == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
598}
599inline const SwEndNode *SwNode::GetEndNode() const
600{
601 return SwNodeType::End == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
602}
604{
605 return SwNodeType::Start & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
606}
608{
609 return SwNodeType::Start & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
610}
612{
613 return SwNodeType::Table == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
614}
616{
617 return SwNodeType::Table == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
618}
620{
621 return SwNodeType::Section == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
622}
624{
625 return SwNodeType::Section == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
626}
628{
629 return SwNodeType::ContentMask & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
630}
632{
633 return SwNodeType::ContentMask & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
634}
635
636inline bool SwNode::IsStartNode() const
637{
638 return bool(SwNodeType::Start & m_nNodeType);
639}
640inline bool SwNode::IsContentNode() const
641{
643}
644inline bool SwNode::IsEndNode() const
645{
647}
648inline bool SwNode::IsTextNode() const
649{
651}
652inline bool SwNode::IsTableNode() const
653{
655}
656inline bool SwNode::IsSectionNode() const
657{
659}
660inline bool SwNode::IsNoTextNode() const
661{
662 return bool(SwNodeType::NoTextMask & m_nNodeType);
663}
664inline bool SwNode::IsOLENode() const
665{
667}
668inline bool SwNode::IsGrfNode() const
669{
671}
672
674{
675 return const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
676}
678{
679 return const_cast<SwNode*>(this)->FindTableNode();
680}
682{
683 return const_cast<SwNode*>(this)->FindSectionNode();
684}
686{
687 return m_pStartOfSection->GetIndex();
688}
690{
691 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
692 return pStNd->m_pEndOfSection->GetIndex();
693}
695{
696 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
697 return pStNd->m_pEndOfSection;
698}
700{
701 const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
702 return pStNd->m_pEndOfSection;
703}
704
706{
707 return static_cast<SwNodes&>(GetArray());
708}
709inline const SwNodes& SwNode::GetNodes() const
710{
711 return static_cast<SwNodes&>(GetArray());
712}
713
715{
716 return m_pCondColl;
717}
718
720{
721 return m_pCondColl
722 ? *m_pCondColl
723 : *const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn()));
724}
725
727{
729}
730
731//FEATURE::CONDCOLL
732
733inline const SfxPoolItem& SwContentNode::GetAttr( sal_uInt16 nWhich,
734 bool bInParents ) const
735{
736 return GetSwAttrSet().Get( nWhich, bInParents );
737}
738
740 : SwNode(rWhere, SwNodeType::PlaceHolder)
741{
742}
743
745{
746 return static_cast<SwNode*>(BigPtrArray::operator[] ( sal_Int32(n) ));
747}
748
749#endif
750
751/* 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
SwFormatColl * GetFormatColl() const
Definition: node.hxx:461
SwFormatColl * m_pCondColl
Definition: node.hxx:364
bool HasSwAttrSet() const
Definition: node.hxx:458
virtual SwContentFrame * MakeFrame(SwFrame *pSib)=0
MakeFrame will be called for a certain layout pSib is another SwFrame of the same layout (e....
void MakeStartIndex(SwIndex *pIdx)
Definition: node.hxx:399
const T * GetNoCondAttr(TypedWhichId< T > nWhich, bool bInParents) const
Definition: node.hxx:451
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:733
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:726
bool mbSetModifyAtAttr
Definition: node.hxx:365
const T & GetAttr(TypedWhichId< T > nWhich, bool bInParent=true) const
Definition: node.hxx:438
bool GetModifyAtAttr() const
Definition: node.hxx:480
void SetModifyAtAttr(bool bSetModifyAtAttr) const
Definition: node.hxx:479
std::shared_ptr< const SfxItemSet > mpAttrSet
Attribute-set for all auto attributes of a ContentNode.
Definition: node.hxx:376
void MakeEndIndex(SwIndex *pIdx)
Definition: node.hxx:400
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:457
virtual SwContentNode * MakeCopy(SwDoc &, const SwNodeIndex &, bool bNewFrames) const =0
SwContentNode(const SwContentNode &rNode)=delete
sw::WriterMultiListener m_aCondCollListener
Definition: node.hxx:363
SwFormatColl * GetCondFormatColl() const
Definition: node.hxx:714
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:719
virtual void NewAttrSet(SwAttrPool &)=0
Make respective nodes create the specific AttrSets.
Definition: doc.hxx:188
Ends a section of nodes in the document model.
Definition: node.hxx:344
SwEndNode(const SwEndNode &rNode)=delete
SwEndNode(SwNodes &rNodes, SwNodeOffset nPos, SwStartNode &rSttNd)
for the initial StartNode
Definition: node.cxx:1056
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:61
Base class of the Writer layout elements.
Definition: frame.hxx:315
Marks a character position inside a document model node.
Definition: index.hxx:34
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
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:83
bool IsGrfNode() const
Definition: node.hxx:668
SwStartNode * GetStartNode()
Definition: node.hxx:603
bool IsIgnoreDontExpand() const
Definition: node.hxx:143
SwNode(const SwNode &rNodes)=delete
const SwDoc & GetDoc() const
Definition: node.hxx:218
sal_uInt8 GetAutoFormatLvl() const
Definition: node.hxx:140
SwSectionNode * GetSectionNode()
Definition: node.hxx:619
void SetIgnoreDontExpand(bool bNew)
Definition: node.hxx:144
SwNodeOffset GetIndex() const
Definition: node.hxx:292
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:198
const SwStartNode * FindFooterStartNode() const
Definition: node.hxx:206
tools::Long m_nSerial
Definition: node.hxx:105
SwStartNode * m_pStartOfSection
Definition: node.hxx:114
bool IsNoTextNode() const
Definition: node.hxx:660
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:705
std::vector< SwFrameFormat * > m_aAnchoredFlys
all SwFrameFormat that are anchored at the node invariant: SwFrameFormat is in the list iff SwFrameFo...
Definition: node.hxx:111
bool IsContentNode() const
Definition: node.hxx:640
const SwStartNode * FindHeaderStartNode() const
Definition: node.hxx:204
SwDoc & GetDoc()
Definition: node.hxx:213
Merge
sw_redlinehide: redline node merge state
Definition: node.hxx:94
bool IsEndNode() const
Definition: node.hxx:644
bool IsStartNode() const
Definition: node.hxx:636
SwNodeOffset StartOfSectionIndex() const
Definition: node.hxx:685
const SwStartNode * FindFlyStartNode() const
Definition: node.hxx:200
void SetRedlineMergeFlag(Merge const eMerge)
Definition: node.hxx:98
bool IsSectionNode() const
Definition: node.hxx:656
bool IsTableNode() const
Definition: node.hxx:652
bool IsTextNode() const
Definition: node.hxx:648
const SwStartNode * FindFootnoteStartNode() const
Definition: node.hxx:202
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:358
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
Definition: node.cxx:764
SwSectionNode * FindSectionNode()
Search section node, in which it is.
Definition: ndsect.cxx:985
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:133
SwNode & operator=(const SwNode &rNodes)=delete
SwStartNode * StartOfSectionNode()
Definition: node.hxx:134
Merge GetRedlineMergeFlag() const
Definition: node.hxx:99
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:689
SwNodeType m_nNodeType
Definition: node.hxx:86
Merge m_eMerge
Definition: node.hxx:101
bool IsCreateFrameWhenHidingRedlines() const
Definition: node.hxx:95
SwContentNode * GetContentNode()
Definition: node.hxx:627
tools::Long GetSerial() const
Definition: node.hxx:127
SwTableNode * GetTableNode()
Definition: node.hxx:611
static tools::Long s_nSerial
Definition: node.hxx:104
void SetAutoFormatLvl(sal_uInt8 nVal)
Definition: node.hxx:141
SwNodeType GetNodeType() const
Definition: node.hxx:146
bool m_bIgnoreDontExpand
for Text Attributes - ignore the flag
Definition: node.hxx:90
std::vector< SwFrameFormat * > const & GetAnchoredFlys() const
Definition: node.hxx:298
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:881
SwEndNode * GetEndNode()
Definition: node.hxx:595
bool IsOLENode() const
Definition: node.hxx:664
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:694
sal_uInt8 m_nAFormatNumLvl
For text nodes: level of auto format. Was put here because we had still free bits.
Definition: node.hxx:89
SwNode * operator[](SwNodeOffset n) const
Definition: node.hxx:744
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:2384
static sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex)
get section level at the given position
Definition: nodes.cxx:1268
friend class SwNode
Definition: ndarr.hxx:92
This class is internal, used only during DocumentContentOperationsManager::CopyWithFlyInFly(),...
Definition: node.hxx:589
SwPlaceholderNode(const SwNodeIndex &rWhere)
Definition: node.hxx:739
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:543
SwSectionNode(const SwSectionNode &)=delete
const SwSection & GetSection() const
Definition: node.hxx:551
SwSectionNode & operator=(const SwSectionNode &)=delete
SwSection & GetSection()
Definition: node.hxx:552
Starts a section of nodes in the document model.
Definition: node.hxx:314
SwEndNode * m_pEndOfSection
Definition: node.hxx:319
SwStartNodeType m_eStartNodeType
Definition: node.hxx:320
SwStartNode(const SwStartNode &rNode)=delete
SwStartNodeType GetStartNodeType() const
Definition: node.hxx:330
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:506
SwTable & GetTable()
Definition: node.hxx:507
std::unique_ptr< SwTable > m_pTable
Definition: node.hxx:499
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:84
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, SwNodeIndex &rIdx, bool bNext)
Definition: fltshell.cxx:53
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 GoPrevious(SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
Definition: pam.cxx:297
bool GoNext(SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
Definition: pam.cxx:290
Marks a position in the document model.
Definition: pam.hxx:37
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8