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