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 
32 #include <memory>
33 #include <vector>
34 
35 class SwContentFrame;
36 class SwContentNode;
37 class SwDoc;
38 class SwEndNode;
39 class SwFrame;
40 class SwFrameFormat;
41 class SwGrfNode;
42 class SwNoTextNode;
43 class SwNodeIndex;
44 class SwOLENode;
45 class SwRect;
46 class SwSection;
47 class SwSectionFormat;
48 class SwTOXBase;
49 class SwSectionNode;
50 class SwStartNode;
51 class SwTabFrame;
52 class SwRootFrame;
53 class SwTable;
54 class SwTableNode;
55 class SwTableBox;
56 class SwTextNode;
57 class SwPageDesc;
58 class SwViewShell;
59 struct SwPosition;
60 class IStyleAccess;
69 class IDocumentListItems;
70 class Point;
71 enum class SvxFrameDirection;
72 typedef std::vector<SwOLENode*> SwOLENodes; // docary.hxx
73 
74 namespace drawinglayer::attribute {
75  class SdrAllFillAttributesHelper;
76  typedef std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
77 }
78 
81  : public sw::BorderCacheOwner, private BigPtrEntry
82 {
83  friend class SwNodes;
84 
86 
88  sal_uInt8 m_nAFormatNumLvl : 3;
89  bool m_bIgnoreDontExpand : 1;
90 
91 public:
93  enum class Merge { None, First, NonFirst, Hidden };
95  return m_eMerge == Merge::None || m_eMerge == Merge::First;
96  }
97  void SetRedlineMergeFlag(Merge const eMerge) { m_eMerge = eMerge; }
98  Merge GetRedlineMergeFlag() const { return m_eMerge; }
99 private:
101 
102 #ifdef DBG_UTIL
105 #endif
106 
110  std::unique_ptr<std::vector<SwFrameFormat*>> m_pAnchoredFlys;
111 
112 protected:
114 
115  SwNode( const SwNodeIndex &rWhere, const SwNodeType nNodeId );
116 
118  SwNode( SwNodes& rNodes, sal_uLong nPos, const SwNodeType nNodeId );
119 
120 public:
123  virtual ~SwNode() override = 0;
124 
125 #ifdef DBG_UTIL
126  tools::Long GetSerial() const { return m_nSerial; }
127 #endif
128 
129  sal_uInt16 GetSectionLevel() const;
130 
131  inline sal_uLong StartOfSectionIndex() const;
132  const SwStartNode* StartOfSectionNode() const { return m_pStartOfSection; }
133  SwStartNode* StartOfSectionNode() { return m_pStartOfSection; }
134 
135  inline sal_uLong EndOfSectionIndex() const;
136  inline const SwEndNode* EndOfSectionNode() const;
137  inline SwEndNode* EndOfSectionNode();
138 
139  sal_uInt8 GetAutoFormatLvl() const { return m_nAFormatNumLvl; }
140  void SetAutoFormatLvl( sal_uInt8 nVal ) { m_nAFormatNumLvl = nVal; }
141 
142  bool IsIgnoreDontExpand() const { return m_bIgnoreDontExpand; }
143  void SetIgnoreDontExpand( bool bNew ) { m_bIgnoreDontExpand = bNew; }
144 
145  SwNodeType GetNodeType() const { return m_nNodeType; }
146 
147  inline SwStartNode *GetStartNode();
148  inline const SwStartNode *GetStartNode() const;
149  inline SwContentNode *GetContentNode();
150  inline const SwContentNode *GetContentNode() const;
151  inline SwEndNode *GetEndNode();
152  inline const SwEndNode *GetEndNode() const;
153  inline SwTextNode *GetTextNode();
154  inline const SwTextNode *GetTextNode() const;
155  inline SwOLENode *GetOLENode();
156  inline const SwOLENode *GetOLENode() const;
157  inline SwNoTextNode *GetNoTextNode();
158  inline const SwNoTextNode *GetNoTextNode() const;
159  inline SwGrfNode *GetGrfNode();
160  inline const SwGrfNode *GetGrfNode() const;
161  inline SwTableNode *GetTableNode();
162  inline const SwTableNode *GetTableNode() const;
163  inline SwSectionNode *GetSectionNode();
164  inline const SwSectionNode *GetSectionNode() const;
165 
166  inline bool IsStartNode() const;
167  inline bool IsContentNode() const;
168  inline bool IsEndNode() const;
169  inline bool IsTextNode() const;
170  inline bool IsTableNode() const;
171  inline bool IsSectionNode() const;
172  inline bool IsOLENode() const;
173  inline bool IsNoTextNode() const;
174  inline bool IsGrfNode() const;
175 
182  bool IsInRedlines() const;
183 
186  SwTableNode *FindTableNode();
187  inline const SwTableNode *FindTableNode() const;
188 
191  SwSectionNode *FindSectionNode();
192  inline const SwSectionNode *FindSectionNode() const;
193 
194  SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
195  inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
196 
198  { return FindSttNodeByType( SwTableBoxStartNode ); }
200  { return FindSttNodeByType( SwFlyStartNode ); }
202  { return FindSttNodeByType( SwFootnoteStartNode ); }
204  { return FindSttNodeByType( SwHeaderStartNode ); }
206  { return FindSttNodeByType( SwFooterStartNode ); }
207 
209  inline SwNodes& GetNodes();
210  inline const SwNodes& GetNodes() const;
211 
213  {
214  return GetNodes().GetDoc();
215  }
216 
217  const SwDoc& GetDoc() const
218  {
219  return GetNodes().GetDoc();
220  }
221 
224  const IDocumentSettingAccess* getIDocumentSettingAccess() const;
225 
228  const IDocumentDeviceAccess& getIDocumentDeviceAccess() const;
229 
232  const IDocumentMarkAccess* getIDocumentMarkAccess() const;
233 
236  const IDocumentRedlineAccess& getIDocumentRedlineAccess() const;
237 
240  const IDocumentStylePoolAccess& getIDocumentStylePoolAccess() const;
241 
244  const IDocumentDrawModelAccess& getIDocumentDrawModelAccess() const;
245 
248  const IDocumentLayoutAccess& getIDocumentLayoutAccess() const;
249  IDocumentLayoutAccess& getIDocumentLayoutAccess();
250 
253  const IDocumentLinksAdministration& getIDocumentLinksAdministration() const;
254  IDocumentLinksAdministration& getIDocumentLinksAdministration();
255 
258  const IDocumentFieldsAccess& getIDocumentFieldsAccess() const;
259  IDocumentFieldsAccess& getIDocumentFieldsAccess();
260 
263  IDocumentContentOperations& getIDocumentContentOperations();
264 
267  IStyleAccess& getIDocumentStyleAccess();
268 
270  IDocumentListItems& getIDocumentListItems();
271 
273  bool IsInVisibleArea( SwViewShell const * pSh ) const;
275  bool IsInProtectSect() const;
278  bool IsProtect() const;
279 
283  const SwPageDesc* FindPageDesc( size_t* pPgDescNdIdx = nullptr ) const;
284 
286  SwFrameFormat* GetFlyFormat() const;
287 
289  SwTableBox* GetTableBox() const;
290 
291  sal_uLong GetIndex() const { return GetPos(); }
292 
293  const SwTextNode* FindOutlineNodeOfLevel(sal_uInt8 nLvl, SwRootFrame const* pLayout = nullptr) const;
294 
295  sal_uInt8 HasPrevNextLayNode() const;
296 
297  std::vector<SwFrameFormat *> const* GetAnchoredFlys() const { return m_pAnchoredFlys.get(); }
298  void AddAnchoredFly(SwFrameFormat *);
299  void RemoveAnchoredFly(SwFrameFormat *);
300 
304  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
305 
306 private:
307  SwNode( const SwNode & rNodes ) = delete;
308  SwNode & operator= ( const SwNode & rNodes ) = delete;
309 };
310 
312 class SAL_DLLPUBLIC_RTTI SwStartNode: public SwNode
313 {
314  friend class SwNode;
315  friend class SwNodes;
316  friend class SwEndNode;
317 
320 
322  SwStartNode( SwNodes& rNodes, sal_uLong nPos );
323 
324 protected:
325  SwStartNode( const SwNodeIndex &rWhere,
326  const SwNodeType nNodeType = SwNodeType::Start,
328 public:
329  SwStartNodeType GetStartNodeType() const { return m_eStartNodeType; }
330 
332  void CheckSectionCondColl() const;
333 
334  virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
335 
336 private:
337  SwStartNode( const SwStartNode & rNode ) = delete;
338  SwStartNode & operator= ( const SwStartNode & rNode ) = delete;
339 };
340 
342 class SwEndNode : public SwNode
343 {
344  friend class SwNodes;
345  friend class SwTableNode;
346  friend class SwSectionNode;
347 
349  SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
350 
351 protected:
352  SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
353 
354 private:
355  SwEndNode( const SwEndNode & rNode ) = delete;
356  SwEndNode & operator= ( const SwEndNode & rNode ) = delete;
357 };
358 
359 // SwContentNode
360 
362 {
363 
366  mutable bool mbSetModifyAtAttr;
367 
368 protected:
369  SwContentNode( const SwNodeIndex &rWhere, const SwNodeType nNodeType,
370  SwFormatColl *pFormatColl );
373  virtual ~SwContentNode() override = 0;
374 
377  std::shared_ptr<const SfxItemSet> mpAttrSet;
378 
380  virtual void NewAttrSet( SwAttrPool& ) = 0;
381 
384  sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
385 
386  virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) override;
387 
388 public:
389 
392  virtual SwContentFrame *MakeFrame( SwFrame* pSib ) = 0;
393 
394  virtual SwContentNode *JoinNext();
397  bool CanJoinNext( SwNodeIndex* pIdx =nullptr ) const;
398  bool CanJoinPrev( SwNodeIndex* pIdx =nullptr ) const;
399 
400  void MakeStartIndex( SwIndex * pIdx ) { pIdx->Assign( this, 0 ); }
401  void MakeEndIndex( SwIndex * pIdx ) { pIdx->Assign( this, Len() ); }
402 
403  bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
404  bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
405 
407  SwContentFrame *getLayoutFrame( const SwRootFrame*,
408  const SwPosition *pPos = nullptr,
409  std::pair<Point, bool> const* pViewPosAndCalcFrame = nullptr) const;
412  SwRect FindLayoutRect( const bool bPrtArea = false,
413  const Point* pPoint = nullptr ) const;
414  SwRect FindPageFrameRect() const;
415 
418  void MakeFramesForAdjacentContentNode(SwContentNode& rNode);
419 
423  void DelFrames(SwRootFrame const* pLayout);
424 
427  virtual sal_Int32 Len() const;
428 
429  virtual SwContentNode* MakeCopy(SwDoc&, const SwNodeIndex&, bool bNewFrames) const = 0;
430 
432  virtual bool GetInfo( SfxPoolItem& ) const override;
433 
435 
437  const SfxPoolItem& GetAttr( sal_uInt16 nWhich, bool bInParent=true ) const;
438  bool GetAttr( SfxItemSet& rSet ) const;
440  virtual bool SetAttr( const SfxPoolItem& );
441  virtual bool SetAttr( const SfxItemSet& rSet );
442  virtual bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
443  virtual bool ResetAttr( const std::vector<sal_uInt16>& rWhichArr );
444  virtual sal_uInt16 ResetAllAttr();
445 
447  const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, bool bInParents ) const;
448 
451  inline const SwAttrSet &GetSwAttrSet() const;
452  const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
453  bool HasSwAttrSet() const { return mpAttrSet != nullptr; }
454 
455  virtual SwFormatColl* ChgFormatColl( SwFormatColl* );
456  SwFormatColl* GetFormatColl() const { return const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn())); }
457 
458  inline SwFormatColl& GetAnyFormatColl() const;
459  void SetCondFormatColl( SwFormatColl* );
460  inline SwFormatColl* GetCondFormatColl() const;
461 
462  bool IsAnyCondition( SwCollCondition& rTmp ) const;
463  void ChkCondColl(const SwTextFormatColl* pColl = nullptr);
464 
467  bool InvalidateNumRule();
468 
471  SvxFrameDirection GetTextDirection( const SwPosition& rPos,
472  const Point* pPt ) const;
473 
474  void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
475  bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
476 
477  static std::unique_ptr<SwOLENodes> CreateOLENodesArray( const SwFormatColl& rColl, bool bOnlyWithInvalidSize );
478 
479  // Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
480  virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
481 
482  void UpdateAttr(const SwUpdateAttr&);
483 
484 private:
485  SwContentNode( const SwContentNode & rNode ) = delete;
486  SwContentNode & operator= ( const SwContentNode & rNode ) = delete;
487 };
488 
489 // SwTableNode
490 
492 {
493  friend class SwNodes;
494  std::unique_ptr<SwTable> m_pTable;
495 protected:
496  virtual ~SwTableNode() override;
497 
498 public:
499  SwTableNode( const SwNodeIndex & );
500 
501  const SwTable& GetTable() const { return *m_pTable; }
502  SwTable& GetTable() { return *m_pTable; }
503  SwTabFrame *MakeFrame( SwFrame* );
504 
506  void MakeOwnFrames(SwNodeIndex* pIdxBehind);
507 
510  void DelFrames(SwRootFrame const* pLayout = nullptr);
511 
514  void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
515 
516  SwTableNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
517  void SetNewTable( std::unique_ptr<SwTable> , bool bNewFrames=true );
518 
519  // Removes redline objects that relate to this table from the 'Extra Redlines' table
520  void RemoveRedlines();
521 
522 private:
523  SwTableNode( const SwTableNode & rNode ) = delete;
524  SwTableNode & operator= ( const SwTableNode & rNode ) = delete;
525 };
526 
527 class SAL_DLLPUBLIC_RTTI SwSectionNode
528  : public SwStartNode
529 {
530  friend class SwNodes;
531 
532 private:
533  SwSectionNode(const SwSectionNode&) = delete;
534  SwSectionNode& operator=(const SwSectionNode&) = delete;
535 
536  std::unique_ptr<SwSection> const m_pSection;
537 
538 protected:
539  virtual ~SwSectionNode() override;
540 
541 public:
542  SwSectionNode(SwNodeIndex const&,
543  SwSectionFormat & rFormat, SwTOXBase const*const pTOXBase);
544 
545  const SwSection& GetSection() const { return *m_pSection; }
546  SwSection& GetSection() { return *m_pSection; }
547 
548  SwFrame *MakeFrame( SwFrame* );
549 
554  void MakeOwnFrames(SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = nullptr);
555 
558  void DelFrames(SwRootFrame const* pLayout = nullptr, bool bForce = false);
559 
562  void MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx);
563 
564  SwSectionNode* MakeCopy( SwDoc&, const SwNodeIndex& ) const;
565 
567  void NodesArrChgd();
568 
571  bool IsContentHidden() const;
572 
573 };
574 
580 class SwPlaceholderNode final : private SwNode
581 {
582 private:
583  friend class SwNodes;
584  SwPlaceholderNode(const SwNodeIndex &rWhere);
585 };
586 
588 {
589  return SwNodeType::End == m_nNodeType ? static_cast<SwEndNode*>(this) : nullptr;
590 }
591 inline const SwEndNode *SwNode::GetEndNode() const
592 {
593  return SwNodeType::End == m_nNodeType ? static_cast<const SwEndNode*>(this) : nullptr;
594 }
596 {
597  return SwNodeType::Start & m_nNodeType ? static_cast<SwStartNode*>(this) : nullptr;
598 }
599 inline const SwStartNode *SwNode::GetStartNode() const
600 {
601  return SwNodeType::Start & m_nNodeType ? static_cast<const SwStartNode*>(this) : nullptr;
602 }
604 {
605  return SwNodeType::Table == m_nNodeType ? static_cast<SwTableNode*>(this) : nullptr;
606 }
607 inline const SwTableNode *SwNode::GetTableNode() const
608 {
609  return SwNodeType::Table == m_nNodeType ? static_cast<const SwTableNode*>(this) : nullptr;
610 }
612 {
613  return SwNodeType::Section == m_nNodeType ? static_cast<SwSectionNode*>(this) : nullptr;
614 }
616 {
617  return SwNodeType::Section == m_nNodeType ? static_cast<const SwSectionNode*>(this) : nullptr;
618 }
620 {
621  return SwNodeType::ContentMask & m_nNodeType ? static_cast<SwContentNode*>(this) : nullptr;
622 }
624 {
625  return SwNodeType::ContentMask & m_nNodeType ? static_cast<const SwContentNode*>(this) : nullptr;
626 }
627 
628 inline bool SwNode::IsStartNode() const
629 {
630  return bool(SwNodeType::Start & m_nNodeType);
631 }
632 inline bool SwNode::IsContentNode() const
633 {
634  return bool(SwNodeType::ContentMask & m_nNodeType);
635 }
636 inline bool SwNode::IsEndNode() const
637 {
638  return SwNodeType::End == m_nNodeType;
639 }
640 inline bool SwNode::IsTextNode() const
641 {
642  return SwNodeType::Text == m_nNodeType;
643 }
644 inline bool SwNode::IsTableNode() const
645 {
646  return SwNodeType::Table == m_nNodeType;
647 }
648 inline bool SwNode::IsSectionNode() const
649 {
651 }
652 inline bool SwNode::IsNoTextNode() const
653 {
654  return bool(SwNodeType::NoTextMask & m_nNodeType);
655 }
656 inline bool SwNode::IsOLENode() const
657 {
658  return SwNodeType::Ole == m_nNodeType;
659 }
660 inline bool SwNode::IsGrfNode() const
661 {
662  return SwNodeType::Grf == m_nNodeType;
663 }
664 
666 {
667  return const_cast<SwNode*>(this)->FindSttNodeByType( eTyp );
668 }
669 inline const SwTableNode* SwNode::FindTableNode() const
670 {
671  return const_cast<SwNode*>(this)->FindTableNode();
672 }
674 {
675  return const_cast<SwNode*>(this)->FindSectionNode();
676 }
678 {
679  return m_pStartOfSection->GetIndex();
680 }
682 {
683  const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
684  return pStNd->m_pEndOfSection->GetIndex();
685 }
686 inline const SwEndNode* SwNode::EndOfSectionNode() const
687 {
688  const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
689  return pStNd->m_pEndOfSection;
690 }
692 {
693  const SwStartNode* pStNd = IsStartNode() ? static_cast<const SwStartNode*>(this) : m_pStartOfSection;
694  return pStNd->m_pEndOfSection;
695 }
696 
698 {
699  return static_cast<SwNodes&>(GetArray());
700 }
701 inline const SwNodes& SwNode::GetNodes() const
702 {
703  return static_cast<SwNodes&>(GetArray());
704 }
705 
707 {
708  return m_pCondColl;
709 }
710 
712 {
713  return m_pCondColl
714  ? *m_pCondColl
715  : *const_cast<SwFormatColl*>(static_cast<const SwFormatColl*>(GetRegisteredIn()));
716 }
717 
719 {
721 }
722 
723 //FEATURE::CONDCOLL
724 
725 inline const SfxPoolItem& SwContentNode::GetAttr( sal_uInt16 nWhich,
726  bool bInParents ) const
727 {
728  return GetSwAttrSet().Get( nWhich, bInParents );
729 }
730 
732  : SwNode(rWhere, SwNodeType::PlaceHolder)
733 {
734 }
735 
737 {
738  return static_cast<SwNodePtr>(BigPtrArray::operator[] ( n ));
739 }
740 
741 #endif
742 
743 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
Definition: node.cxx:764
SwSectionNode * FindSectionNode()
Search section node, in which it is.
Definition: ndsect.cxx:983
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:686
Starts a section of nodes in the document model.
Definition: node.hxx:312
Base class of the Writer layout elements.
Definition: frame.hxx:313
sal_uLong GetIndex() const
Definition: node.hxx:291
SwEndNode & operator=(const SwEndNode &rNode)=delete
SwStartNode * m_pStartOfSection
Definition: node.hxx:113
const SwStartNode * FindHeaderStartNode() const
Definition: node.hxx:203
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
Marks a position in the document model.
Definition: pam.hxx:35
SwSection & GetSection()
Definition: node.hxx:546
bool IsSectionNode() const
Definition: node.hxx:648
bool IsGrfNode() const
Definition: node.hxx:660
sal_uLong StartOfSectionIndex() const
Definition: node.hxx:677
const SwStartNode * FindFooterStartNode() const
Definition: node.hxx:205
static SwContentNode * GetContentNode(SwDoc &rDoc, SwNodeIndex &rIdx, bool bNext)
Definition: fltshell.cxx:53
SwFormatColl * GetCondFormatColl() const
Definition: node.hxx:706
SwFormatColl * m_pCondColl
Definition: node.hxx:365
sal_uIntPtr sal_uLong
long Long
Provides numbered items of a document.
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:30
Provides access to the marks of a document.
Definition: doc.hxx:187
SwSectionNode is derived from SwStartNode.
SwNodePtr operator[](sal_uLong n) const
Definition: node.hxx:736
SvxFrameDirection
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
The root element of a Writer document layout.
Definition: rootfrm.hxx:82
virtual bool GetInfo(SfxPoolItem &) const override
Definition: calbck.cxx:160
None
bool mbSetModifyAtAttr
Definition: node.hxx:366
std::unique_ptr< SwTable > m_pTable
Definition: node.hxx:494
static tools::Long s_nSerial
Definition: node.hxx:103
const SwSection & GetSection() const
Definition: node.hxx:545
SwTableNode * GetTableNode()
Definition: node.hxx:603
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
tools::Long m_nSerial
Definition: node.hxx:104
SwNodeType GetNodeType() const
Definition: node.hxx:145
void SetModifyAtAttr(bool bSetModifyAtAttr) const
Definition: node.hxx:474
bool GetModifyAtAttr() const
Definition: node.hxx:475
std::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr
Definition: format.hxx:41
bool IsStartNode() const
Definition: node.hxx:628
SwStartNodeType m_eStartNodeType
Definition: node.hxx:319
std::vector< SwFrameFormat * > const * GetAnchoredFlys() const
Definition: node.hxx:297
sal_uInt8 GetAutoFormatLvl() const
Definition: node.hxx:139
const SwTable & GetTable() const
Definition: node.hxx:501
void SetAutoFormatLvl(sal_uInt8 nVal)
Definition: node.hxx:140
sw::WriterMultiListener m_aCondCollListener
Definition: node.hxx:364
bool IsOLENode() const
Definition: node.hxx:656
SwFormatColl & GetAnyFormatColl() const
Definition: node.hxx:711
bool IsContentNode() const
Definition: node.hxx:632
void SetIgnoreDontExpand(bool bNew)
Definition: node.hxx:143
struct _xmlTextWriter * xmlTextWriterPtr
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:452
static SwNodePtr GetStartNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
Definition: docglbl.cxx:89
std::shared_ptr< const SfxItemSet > mpAttrSet
Attribute-set for all auto attributes of a ContentNode.
Definition: node.hxx:377
Merge
sw_redlinehide: redline node merge state
Definition: node.hxx:93
Style of a layout element.
Definition: frmfmt.hxx:58
bool GoNext(SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
Definition: pam.cxx:291
SwNodeType
Definition: ndtyp.hxx:28
SwEndNode * GetEndNode()
Definition: node.hxx:587
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:132
SwDoc & GetDoc()
Definition: node.hxx:212
SwIndex & Assign(SwIndexReg *, sal_Int32)
Definition: index.cxx:206
Document fields related interfaces.
SwContentNode * GetContentNode()
Definition: node.hxx:619
void MakeStartIndex(SwIndex *pIdx)
Definition: node.hxx:400
Marks a character position inside a document model node.
Definition: index.hxx:33
SwNode & operator=(const SwNode &rNodes)=delete
Provides access to settings of a document.
bool IsNoTextNode() const
Definition: node.hxx:652
Marks a node in the document model.
Definition: ndindex.hxx:31
bool IsEndNode() const
Definition: node.hxx:636
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:697
bool IsIgnoreDontExpand() const
Definition: node.hxx:142
Bookkeeping helper for SwCache caching writer borders.
bool HasSwAttrSet() const
Definition: node.hxx:453
Document links administration interface.
Text operation/manipulation interface.
SwStartNodeType GetStartNodeType() const
Definition: node.hxx:329
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
SwStartNode * GetStartNode()
Definition: node.hxx:595
std::unique_ptr< SwSection > const m_pSection
Definition: node.hxx:536
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:111
SwNodeType m_nNodeType
Definition: node.hxx:85
Provides access to the formatting devices of a document.
sal_uLong EndOfSectionIndex() const
Definition: node.hxx:681
BigPtrEntry * operator[](sal_uLong) const
Definition: bparr.cxx:82
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SwStartNode & operator=(const SwStartNode &rNode)=delete
unsigned char sal_uInt8
const SwDoc & GetDoc() const
Definition: node.hxx:217
sal_uLong GetPos() const
Definition: bparr.hxx:99
SwEndNode * m_pEndOfSection
Definition: node.hxx:318
BigPtrArray & GetArray() const
Definition: bparr.hxx:105
SwTable & GetTable()
Definition: node.hxx:502
const SwModify * GetRegisteredIn() const
Definition: calbck.hxx:159
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:392
std::unique_ptr< std::vector< SwFrameFormat * > > m_pAnchoredFlys
all SwFrameFormat that are anchored at the node invariant: SwFrameFormat is in the list iff SwFrameFo...
Definition: node.hxx:110
SwTableNode is derived from SwStartNode.
SwPlaceholderNode(const SwNodeIndex &rWhere)
Definition: node.hxx:731
SwStartNodeType
Definition: ndtyp.hxx:50
const SwStartNode * FindTableBoxStartNode() const
Definition: node.hxx:197
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
Definition: node.hxx:718
SwTableNode * FindTableNode()
Search table node, in which it is.
Definition: node.cxx:357
const SwStartNode * FindFlyStartNode() const
Definition: node.hxx:199
static SwNodePtr GetEndNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
Definition: docglbl.cxx:103
Provides access to the layout of a document.
Access to the style pool.
bool IsTableNode() const
Definition: node.hxx:644
SwFormatColl * GetFormatColl() const
Definition: node.hxx:456
virtual void SwClientNotify(const SwModify &, const SfxHint &rHint) override
Definition: calbck.cxx:302
SwSectionNode * GetSectionNode()
Definition: node.hxx:611
Ends a section of nodes in the document model.
Definition: node.hxx:342
const SwAttrSet & GetAttrSet() const
For querying the attribute array.
Definition: format.hxx:120
BigPtrEntry & operator=(BigPtrEntry const &)=default
Merge m_eMerge
Definition: node.hxx:100
const SfxPoolItem & GetAttr(sal_uInt16 nWhich, bool bInParent=true) const
SS for PoolItems: hard attributation.
Definition: node.hxx:725
tools::Long GetSerial() const
Definition: node.hxx:126
void SetRedlineMergeFlag(Merge const eMerge)
Definition: node.hxx:97
This class is internal, used only during DocumentContentOperationsManager::CopyWithFlyInFly(), and for undo.
Definition: node.hxx:580
bool IsTextNode() const
Definition: node.hxx:640
bool GoPrevious(SwNode *pNd, SwIndex *pIdx, sal_uInt16 nMode)
Definition: pam.cxx:298
Merge GetRedlineMergeFlag() const
Definition: node.hxx:98
SwEndNode(SwNodes &rNodes, sal_uLong nPos, SwStartNode &rSttNd)
for the initial StartNode
Definition: node.cxx:1065
std::vector< SwOLENode * > SwOLENodes
Definition: node.hxx:71
void MakeEndIndex(SwIndex *pIdx)
Definition: node.hxx:401
SwStartNode * StartOfSectionNode()
Definition: node.hxx:133
const SwStartNode * FindFootnoteStartNode() const
Definition: node.hxx:201
static SwPageDesc * FindPageDesc(SwDoc *pDoc, sal_uInt16 nPoolId)
Definition: htmlcss1.cxx:1327
bool IsCreateFrameWhenHidingRedlines() const
Definition: node.hxx:94
Base class of the Writer document model elements.
Definition: node.hxx:80