xref: /aoo42x/main/sw/inc/node.hxx (revision 56b35d86)
11d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
31d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
41d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
51d2dbeb0SAndrew Rist  * distributed with this work for additional information
61d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
71d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
81d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
91d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
101d2dbeb0SAndrew Rist  *
111d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
121d2dbeb0SAndrew Rist  *
131d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
141d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
151d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
161d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
171d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
181d2dbeb0SAndrew Rist  * under the License.
191d2dbeb0SAndrew Rist  *
201d2dbeb0SAndrew Rist  *************************************************************/
211d2dbeb0SAndrew Rist 
221d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SW_NODE_HXX
25cdf0e10cSrcweir #define SW_NODE_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <vector>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <boost/utility.hpp>
30cdf0e10cSrcweir #include <boost/shared_ptr.hpp>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <tools/mempool.hxx>
33cdf0e10cSrcweir #include <tools/gen.hxx>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include "swdllapi.h"
36cdf0e10cSrcweir #include <ndarr.hxx>
37cdf0e10cSrcweir #include <ndtyp.hxx>
38cdf0e10cSrcweir #include <index.hxx>
39cdf0e10cSrcweir #include <fmtcol.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir // ---------------------
42cdf0e10cSrcweir // forward Deklarationen
43cdf0e10cSrcweir // ---------------------
44cdf0e10cSrcweir 
45cdf0e10cSrcweir class SvUShorts;
46cdf0e10cSrcweir class SwCntntFrm;
47cdf0e10cSrcweir class SwCntntNode;
48cdf0e10cSrcweir class SwDoc;
49cdf0e10cSrcweir class SwEndNode;
50cdf0e10cSrcweir class SwFrm;
51cdf0e10cSrcweir class SwFrmFmt;
52cdf0e10cSrcweir class SwGrfNode;
53cdf0e10cSrcweir class SwNoTxtNode;
54cdf0e10cSrcweir class SwNodeIndex;
55cdf0e10cSrcweir class SwOLENode;
56cdf0e10cSrcweir class SwRect;
57cdf0e10cSrcweir class SwSection;
58cdf0e10cSrcweir class SwSectionFmt;
59cdf0e10cSrcweir class SwTOXBase;
60cdf0e10cSrcweir class SwSectionNode;
61cdf0e10cSrcweir class SwStartNode;
62cdf0e10cSrcweir class SwTabFrm;
63cdf0e10cSrcweir class SwRootFrm;
64cdf0e10cSrcweir class SwTable;
65cdf0e10cSrcweir class SwTableNode;
66cdf0e10cSrcweir class SwTableBox;
67cdf0e10cSrcweir class SwTxtNode;
68cdf0e10cSrcweir class SwPageDesc;
69cdf0e10cSrcweir class ViewShell;
70cdf0e10cSrcweir struct SwPosition;
71cdf0e10cSrcweir class IStyleAccess;
72cdf0e10cSrcweir class IDocumentSettingAccess;
73cdf0e10cSrcweir class IDocumentDeviceAccess;
74cdf0e10cSrcweir class IDocumentMarkAccess;
75cdf0e10cSrcweir class IDocumentRedlineAccess;
76cdf0e10cSrcweir class IDocumentStylePoolAccess;
77cdf0e10cSrcweir class IDocumentLineNumberAccess;
78cdf0e10cSrcweir class IDocumentLinksAdministration;
79cdf0e10cSrcweir class IDocumentFieldsAccess;
80cdf0e10cSrcweir class IDocumentContentOperations;
81cdf0e10cSrcweir class IDocumentListItems;
82cdf0e10cSrcweir class SwOLENodes;
83cdf0e10cSrcweir 
84*56b35d86SArmin Le Grand //UUUU
85*56b35d86SArmin Le Grand namespace drawinglayer { namespace attribute {
86*56b35d86SArmin Le Grand     class SdrAllFillAttributesHelper;
87*56b35d86SArmin Le Grand     typedef boost::shared_ptr< SdrAllFillAttributesHelper > SdrAllFillAttributesHelperPtr;
88*56b35d86SArmin Le Grand }}
89*56b35d86SArmin Le Grand 
90cdf0e10cSrcweir // --------------------
91cdf0e10cSrcweir // class SwNode
92cdf0e10cSrcweir // --------------------
93cdf0e10cSrcweir class SW_DLLPUBLIC SwNode : private /* public*/ BigPtrEntry
94cdf0e10cSrcweir {
95cdf0e10cSrcweir 	friend class SwNodes;
96cdf0e10cSrcweir 
97cdf0e10cSrcweir #ifdef DBG_UTIL
98cdf0e10cSrcweir     static long nSerial;
99cdf0e10cSrcweir     long nMySerial;
100cdf0e10cSrcweir #endif
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	sal_uInt8 nNodeType;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 	// JP 28.03.96
105cdf0e10cSrcweir 	// fuer Textnodes: Stufungslevel der Autoformatierung. Ist erstmal hier
106cdf0e10cSrcweir 	//					gelandet, weil noch Bits frei sind
107cdf0e10cSrcweir 	sal_uInt8 nAFmtNumLvl : 3;
108cdf0e10cSrcweir 	sal_Bool bSetNumLSpace : 1;			// fuer Numerierung: sal_True Einzug setzen
109cdf0e10cSrcweir 	sal_Bool bIgnoreDontExpand : 1;		// for Text Attributes - ignore the flag
110cdf0e10cSrcweir 
111cdf0e10cSrcweir protected:
112cdf0e10cSrcweir 	SwStartNode* pStartOfSection;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 	SwNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeId );
115cdf0e10cSrcweir 
116cdf0e10cSrcweir 	// fuer den initialen StartNode
117cdf0e10cSrcweir 	SwNode( SwNodes& rNodes, sal_uLong nPos, const sal_uInt8 nNodeId );
118cdf0e10cSrcweir 
119cdf0e10cSrcweir public:
120cdf0e10cSrcweir 	virtual ~SwNode();
121cdf0e10cSrcweir 
122cdf0e10cSrcweir #ifdef DBG_UTIL
GetSerial() const123cdf0e10cSrcweir     long int GetSerial() const { return nMySerial; }
124cdf0e10cSrcweir #endif
125cdf0e10cSrcweir 
126cdf0e10cSrcweir 	sal_uInt16 GetSectionLevel() const;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir     inline sal_uLong StartOfSectionIndex() const;
StartOfSectionNode() const129cdf0e10cSrcweir     inline const SwStartNode* StartOfSectionNode() const { return pStartOfSection; }
StartOfSectionNode()130cdf0e10cSrcweir     inline       SwStartNode* StartOfSectionNode() { return pStartOfSection; }
131cdf0e10cSrcweir 
132cdf0e10cSrcweir     inline sal_uLong EndOfSectionIndex() const;
133cdf0e10cSrcweir     inline const SwEndNode* EndOfSectionNode() const;
134cdf0e10cSrcweir     inline         SwEndNode* EndOfSectionNode();
135cdf0e10cSrcweir 
GetAutoFmtLvl() const136cdf0e10cSrcweir     inline sal_uInt8 GetAutoFmtLvl() const     { return nAFmtNumLvl; }
SetAutoFmtLvl(sal_uInt8 nVal)137cdf0e10cSrcweir     inline void SetAutoFmtLvl( sal_uInt8 nVal )      { nAFmtNumLvl = nVal; }
138cdf0e10cSrcweir 
IsSetNumLSpace() const139cdf0e10cSrcweir     inline sal_Bool IsSetNumLSpace() const  { return bSetNumLSpace; }
SetNumLSpace(sal_Bool bFlag)140cdf0e10cSrcweir     inline void SetNumLSpace( sal_Bool bFlag )        { bSetNumLSpace = bFlag; }
141cdf0e10cSrcweir 
IsIgnoreDontExpand() const142cdf0e10cSrcweir     inline sal_Bool IsIgnoreDontExpand() const  { return bIgnoreDontExpand; }
SetIgnoreDontExpand(sal_Bool bNew)143cdf0e10cSrcweir     inline void SetIgnoreDontExpand( sal_Bool bNew )  { bIgnoreDontExpand = bNew; }
144cdf0e10cSrcweir 
GetNodeType() const145cdf0e10cSrcweir 	sal_uInt8 	GetNodeType() const { return nNodeType; }
146cdf0e10cSrcweir 
147cdf0e10cSrcweir     inline       SwStartNode *GetStartNode();
148cdf0e10cSrcweir     inline const SwStartNode *GetStartNode() const;
149cdf0e10cSrcweir     inline       SwCntntNode *GetCntntNode();
150cdf0e10cSrcweir     inline const SwCntntNode *GetCntntNode() const;
151cdf0e10cSrcweir     inline       SwEndNode   *GetEndNode();
152cdf0e10cSrcweir     inline const SwEndNode   *GetEndNode() const;
153cdf0e10cSrcweir #ifndef	 ICC
154cdf0e10cSrcweir   inline
155cdf0e10cSrcweir #endif
156cdf0e10cSrcweir 	SwTxtNode   *GetTxtNode();
157cdf0e10cSrcweir 
158cdf0e10cSrcweir #ifndef	 ICC
159cdf0e10cSrcweir   inline
160cdf0e10cSrcweir #endif
161cdf0e10cSrcweir 	const SwTxtNode   *GetTxtNode() const;
162cdf0e10cSrcweir     inline        SwOLENode   *GetOLENode();
163cdf0e10cSrcweir     inline  const SwOLENode   *GetOLENode() const;
164cdf0e10cSrcweir     inline        SwNoTxtNode *GetNoTxtNode();
165cdf0e10cSrcweir     inline  const SwNoTxtNode *GetNoTxtNode() const;
166cdf0e10cSrcweir     inline        SwGrfNode   *GetGrfNode();
167cdf0e10cSrcweir     inline  const SwGrfNode   *GetGrfNode() const;
168cdf0e10cSrcweir     inline       SwTableNode *GetTableNode();
169cdf0e10cSrcweir     inline const SwTableNode *GetTableNode() const;
170cdf0e10cSrcweir     inline       SwSectionNode *GetSectionNode();
171cdf0e10cSrcweir     inline const SwSectionNode *GetSectionNode() const;
172cdf0e10cSrcweir 
173cdf0e10cSrcweir     inline sal_Bool IsStartNode() const;
174cdf0e10cSrcweir     inline sal_Bool IsCntntNode() const;
175cdf0e10cSrcweir     inline sal_Bool IsEndNode() const;
176cdf0e10cSrcweir     inline sal_Bool IsTxtNode() const;
177cdf0e10cSrcweir     inline sal_Bool IsTableNode() const;
178cdf0e10cSrcweir     inline sal_Bool IsSectionNode() const;
179cdf0e10cSrcweir     inline sal_Bool IsOLENode() const;
180cdf0e10cSrcweir     inline sal_Bool IsNoTxtNode() const;
181cdf0e10cSrcweir     inline sal_Bool IsGrfNode() const;
182cdf0e10cSrcweir 
183cdf0e10cSrcweir     /**
184cdf0e10cSrcweir        Checks if this node is in redlines.
185cdf0e10cSrcweir 
186cdf0e10cSrcweir        @retval sal_True       this node is in redlines
187cdf0e10cSrcweir        @retval sal_False      else
188cdf0e10cSrcweir      */
189cdf0e10cSrcweir     sal_Bool IsInRedlines() const;
190cdf0e10cSrcweir 
191cdf0e10cSrcweir 	// suche den TabellenNode, in dem dieser steht. Wenn in keiner
192cdf0e10cSrcweir 	// Tabelle wird 0 returnt.
193cdf0e10cSrcweir 					SwTableNode *FindTableNode();
194cdf0e10cSrcweir     inline const  SwTableNode *FindTableNode() const;
195cdf0e10cSrcweir 
196cdf0e10cSrcweir 	// suche den SectionNode, in dem dieser steht. Wenn es in keiner
197cdf0e10cSrcweir 	// Section steht wird 0 returnt.
198cdf0e10cSrcweir 					SwSectionNode *FindSectionNode();
199cdf0e10cSrcweir     inline    const   SwSectionNode *FindSectionNode() const;
200cdf0e10cSrcweir 
201cdf0e10cSrcweir     SwStartNode* FindSttNodeByType( SwStartNodeType eTyp );
202cdf0e10cSrcweir     inline const SwStartNode* FindSttNodeByType( SwStartNodeType eTyp ) const;
203cdf0e10cSrcweir 
FindTableBoxStartNode() const204cdf0e10cSrcweir 	const SwStartNode* FindTableBoxStartNode() const
205cdf0e10cSrcweir 						{ return FindSttNodeByType( SwTableBoxStartNode ); }
FindFlyStartNode() const206cdf0e10cSrcweir 	const SwStartNode* FindFlyStartNode() const
207cdf0e10cSrcweir 						{ return FindSttNodeByType( SwFlyStartNode ); }
FindFootnoteStartNode() const208cdf0e10cSrcweir 	const SwStartNode* FindFootnoteStartNode() const
209cdf0e10cSrcweir 						{ return FindSttNodeByType( SwFootnoteStartNode ); }
FindHeaderStartNode() const210cdf0e10cSrcweir 	const SwStartNode* FindHeaderStartNode() const
211cdf0e10cSrcweir 						{ return FindSttNodeByType( SwHeaderStartNode ); }
FindFooterStartNode() const212cdf0e10cSrcweir 	const SwStartNode* FindFooterStartNode() const
213cdf0e10cSrcweir 						{ return FindSttNodeByType( SwFooterStartNode ); }
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 		// in welchem Nodes-Array/Doc steht der Node ?
216cdf0e10cSrcweir     inline          SwNodes& GetNodes();
217cdf0e10cSrcweir     inline const  SwNodes& GetNodes() const;
218cdf0e10cSrcweir     inline            SwDoc* GetDoc();
219cdf0e10cSrcweir     inline const  SwDoc* GetDoc() const;
220cdf0e10cSrcweir 
221cdf0e10cSrcweir     /** Provides access to the document setting interface
222cdf0e10cSrcweir      */
223cdf0e10cSrcweir     const IDocumentSettingAccess* getIDocumentSettingAccess() const;
224cdf0e10cSrcweir 
225cdf0e10cSrcweir     /** Provides access to the document device interface
226cdf0e10cSrcweir      */
227cdf0e10cSrcweir     const IDocumentDeviceAccess* getIDocumentDeviceAccess() const;
228cdf0e10cSrcweir 
229cdf0e10cSrcweir     /** Provides access to the document bookmark interface
230cdf0e10cSrcweir      */
231cdf0e10cSrcweir     const IDocumentMarkAccess* getIDocumentMarkAccess() const;
232cdf0e10cSrcweir 
233cdf0e10cSrcweir     /** Provides access to the document redline interface
234cdf0e10cSrcweir      */
235cdf0e10cSrcweir     const IDocumentRedlineAccess* getIDocumentRedlineAccess() const;
236cdf0e10cSrcweir 
237cdf0e10cSrcweir     /** Provides access to the document style pool interface
238cdf0e10cSrcweir      */
239cdf0e10cSrcweir     const IDocumentStylePoolAccess* getIDocumentStylePoolAccess() const;
240cdf0e10cSrcweir 
241cdf0e10cSrcweir     /** Provides access to the document line number information interface
242cdf0e10cSrcweir      */
243cdf0e10cSrcweir     const IDocumentLineNumberAccess* getIDocumentLineNumberAccess() const;
244cdf0e10cSrcweir 
245cdf0e10cSrcweir     /** Provides access to the document draw model interface
246cdf0e10cSrcweir      */
247cdf0e10cSrcweir     const IDocumentDrawModelAccess* getIDocumentDrawModelAccess() const;
248cdf0e10cSrcweir 
249cdf0e10cSrcweir     /** Provides access to the document layout interface
250cdf0e10cSrcweir      */
251cdf0e10cSrcweir     const IDocumentLayoutAccess* getIDocumentLayoutAccess() const;
252cdf0e10cSrcweir           IDocumentLayoutAccess* getIDocumentLayoutAccess();
253cdf0e10cSrcweir 
254cdf0e10cSrcweir     /** Provides access to the document links administration interface
255cdf0e10cSrcweir      */
256cdf0e10cSrcweir     const IDocumentLinksAdministration* getIDocumentLinksAdministration() const;
257cdf0e10cSrcweir           IDocumentLinksAdministration* getIDocumentLinksAdministration();
258cdf0e10cSrcweir 
259cdf0e10cSrcweir     /** Provides access to the document fields administration interface
260cdf0e10cSrcweir      */
261cdf0e10cSrcweir     const IDocumentFieldsAccess* getIDocumentFieldsAccess() const;
262cdf0e10cSrcweir           IDocumentFieldsAccess* getIDocumentFieldsAccess();
263cdf0e10cSrcweir 
264cdf0e10cSrcweir     /** Provides access to the document content operations interface
265cdf0e10cSrcweir      */
266cdf0e10cSrcweir           IDocumentContentOperations* getIDocumentContentOperations();
267cdf0e10cSrcweir 
268cdf0e10cSrcweir     /** Provides access to the document automatic styles interface
269cdf0e10cSrcweir      */
270cdf0e10cSrcweir           IStyleAccess& getIDocumentStyleAccess();
271cdf0e10cSrcweir 
272cdf0e10cSrcweir     /** Provides access to the document's numbered items interface
273cdf0e10cSrcweir 
274cdf0e10cSrcweir         OD 2007-10-31 #i83479#
275cdf0e10cSrcweir 
276cdf0e10cSrcweir         @author OD
277cdf0e10cSrcweir     */
278cdf0e10cSrcweir     IDocumentListItems& getIDocumentListItems();
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	// liegt der Node im Sichtbarenbereich der Shell ?
281cdf0e10cSrcweir     sal_Bool IsInVisibleArea( ViewShell* pSh = 0 ) const;
282cdf0e10cSrcweir 	// befindet sich der Node in einem geschuetzten Bereich?
283cdf0e10cSrcweir 	sal_Bool IsInProtectSect() const;
284cdf0e10cSrcweir 	// befindet sich der Node in irgendetwas geschuetzten ?
285cdf0e10cSrcweir 	// (Bereich/Rahmen/Tabellenzellen/... incl. des Ankers bei
286cdf0e10cSrcweir 	//	Rahmen/Fussnoten/..)
287cdf0e10cSrcweir 	sal_Bool IsProtect() const;
288cdf0e10cSrcweir 	// suche den PageDesc, mit dem dieser Node formatiert ist. Wenn das
289cdf0e10cSrcweir 	// Layout vorhanden ist wird ueber das gesucht, ansonsten gibt es nur
290cdf0e10cSrcweir 	// die harte Tour ueber die Nodes nach vorne suchen!!
291cdf0e10cSrcweir     // OD 18.03.2003 #106326#
292cdf0e10cSrcweir     const SwPageDesc* FindPageDesc( sal_Bool bCalcLay, sal_uInt32* pPgDescNdIdx = 0 ) const;
293cdf0e10cSrcweir 
294cdf0e10cSrcweir 	// falls der Node in einem Fly steht, dann wird das entsprechende Format
295cdf0e10cSrcweir 	// returnt
296cdf0e10cSrcweir 	SwFrmFmt* GetFlyFmt() const;
297cdf0e10cSrcweir 
298cdf0e10cSrcweir 	// falls der Node in einer Tabelle steht, dann wird die entsprechende
299cdf0e10cSrcweir 	// TabellenBox returnt
300cdf0e10cSrcweir 	SwTableBox* GetTblBox() const;
301cdf0e10cSrcweir 
GetIndex() const302cdf0e10cSrcweir     inline sal_uLong GetIndex() const { return GetPos(); }
303cdf0e10cSrcweir 
304cdf0e10cSrcweir 	const SwTxtNode* FindOutlineNodeOfLevel( sal_uInt8 nLvl ) const;
305cdf0e10cSrcweir 
306cdf0e10cSrcweir 	sal_uInt8 HasPrevNextLayNode() const;
307cdf0e10cSrcweir 
308cdf0e10cSrcweir private:
309cdf0e10cSrcweir 	// privater Constructor, weil nie kopiert werden darf !!
310cdf0e10cSrcweir 	SwNode( const SwNode & rNodes );
311cdf0e10cSrcweir 	SwNode & operator= ( const SwNode & rNodes );
312cdf0e10cSrcweir };
313cdf0e10cSrcweir 
314cdf0e10cSrcweir // --------------------
315cdf0e10cSrcweir // class SwStartNode
316cdf0e10cSrcweir // --------------------
317cdf0e10cSrcweir class SwStartNode: public SwNode
318cdf0e10cSrcweir {
319cdf0e10cSrcweir 	friend class SwNode;
320cdf0e10cSrcweir 	friend class SwNodes;
321cdf0e10cSrcweir 	friend class SwEndNode;		// um theEndOfSection zu setzen !!
322cdf0e10cSrcweir 
323cdf0e10cSrcweir 	SwEndNode* pEndOfSection;
324cdf0e10cSrcweir 	SwStartNodeType eSttNdTyp;
325cdf0e10cSrcweir 
326cdf0e10cSrcweir 	// fuer den initialen StartNode
327cdf0e10cSrcweir 	SwStartNode( SwNodes& rNodes, sal_uLong nPos );
328cdf0e10cSrcweir 
329cdf0e10cSrcweir protected:
330cdf0e10cSrcweir 	SwStartNode( const SwNodeIndex &rWhere,
331cdf0e10cSrcweir 				 const sal_uInt8 nNodeType = ND_STARTNODE,
332cdf0e10cSrcweir 				 SwStartNodeType = SwNormalStartNode );
333cdf0e10cSrcweir public:
DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)334cdf0e10cSrcweir 	DECL_FIXEDMEMPOOL_NEWDEL(SwStartNode)
335cdf0e10cSrcweir 
336cdf0e10cSrcweir 	SwStartNodeType GetStartNodeType() const 		{ return eSttNdTyp; }
337cdf0e10cSrcweir 
338cdf0e10cSrcweir 	// an alle ContentNodes der Section das ChkCondColl rufen
339cdf0e10cSrcweir 	void CheckSectionCondColl() const;
340cdf0e10cSrcweir 
341cdf0e10cSrcweir private:
342cdf0e10cSrcweir 	// privater Constructor, weil nie kopiert werden darf !!
343cdf0e10cSrcweir 	SwStartNode( const SwStartNode & rNode );
344cdf0e10cSrcweir 	SwStartNode & operator= ( const SwStartNode & rNode );
345cdf0e10cSrcweir };
346cdf0e10cSrcweir 
347cdf0e10cSrcweir 
348cdf0e10cSrcweir // --------------------
349cdf0e10cSrcweir // class SwEndNode
350cdf0e10cSrcweir // --------------------
351cdf0e10cSrcweir class SwEndNode : public SwNode
352cdf0e10cSrcweir {
353cdf0e10cSrcweir 	friend class SwNodes;
354cdf0e10cSrcweir 	friend class SwTableNode;		// um seinen EndNode anlegen zukoennen
355cdf0e10cSrcweir 	friend class SwSectionNode;		// um seinen EndNode anlegen zukoennen
356cdf0e10cSrcweir 
357cdf0e10cSrcweir 	// fuer den initialen StartNode
358cdf0e10cSrcweir 	SwEndNode( SwNodes& rNodes, sal_uLong nPos, SwStartNode& rSttNd );
359cdf0e10cSrcweir 
360cdf0e10cSrcweir protected:
361cdf0e10cSrcweir 	SwEndNode( const SwNodeIndex &rWhere, SwStartNode& rSttNd );
362cdf0e10cSrcweir 
363cdf0e10cSrcweir 	DECL_FIXEDMEMPOOL_NEWDEL(SwEndNode)
364cdf0e10cSrcweir 
365cdf0e10cSrcweir private:
366cdf0e10cSrcweir 	// privater Constructor, weil nie kopiert werden darf !!
367cdf0e10cSrcweir 	SwEndNode( const SwEndNode & rNode );
368cdf0e10cSrcweir 	SwEndNode & operator= ( const SwEndNode & rNode );
369cdf0e10cSrcweir };
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 
372cdf0e10cSrcweir // --------------------
373cdf0e10cSrcweir // SwCntntNode
374cdf0e10cSrcweir // --------------------
375cdf0e10cSrcweir class SW_DLLPUBLIC SwCntntNode: public SwModify, public SwNode, public SwIndexReg
376cdf0e10cSrcweir {
377cdf0e10cSrcweir 	// Der Reader darf NewAttrSet() aufrufen!
378cdf0e10cSrcweir //  friend class SwSwgReader;
379cdf0e10cSrcweir //  friend class Sw3IoImp;
380cdf0e10cSrcweir 
381cdf0e10cSrcweir //FEATURE::CONDCOLL
382cdf0e10cSrcweir 	SwDepend* pCondColl;
383cdf0e10cSrcweir //FEATURE::CONDCOLL
384cdf0e10cSrcweir     mutable bool mbSetModifyAtAttr;
385cdf0e10cSrcweir 
386cdf0e10cSrcweir protected:
387cdf0e10cSrcweir 	SwCntntNode( const SwNodeIndex &rWhere, const sal_uInt8 nNodeType,
388cdf0e10cSrcweir 				SwFmtColl *pFmtColl );
389cdf0e10cSrcweir 	virtual ~SwCntntNode();
390cdf0e10cSrcweir 
391cdf0e10cSrcweir 	// Attribut-Set fuer alle AUTO-Attribute eines CntntNodes
392cdf0e10cSrcweir 	//	( z.B: TxtNode oder NoTxtNode
393cdf0e10cSrcweir     boost::shared_ptr<const SfxItemSet> mpAttrSet;
394cdf0e10cSrcweir 
395cdf0e10cSrcweir 	// lasse von den entsprechenden Nodes die spz. AttrSets anlegen
396cdf0e10cSrcweir 	virtual void NewAttrSet( SwAttrPool& ) = 0;
397cdf0e10cSrcweir 
398cdf0e10cSrcweir     // There some functions that like to remove items from the internal
399cdf0e10cSrcweir     // SwAttrSet (handle):
400cdf0e10cSrcweir     sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
401cdf0e10cSrcweir 
402cdf0e10cSrcweir    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
403cdf0e10cSrcweir 
404cdf0e10cSrcweir public:
405cdf0e10cSrcweir 	TYPEINFO();		//Bereits in Basisklasse Client drin.
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     // MakeFrm will be called for a certain layout
408cdf0e10cSrcweir     // pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent)
409cdf0e10cSrcweir 	virtual SwCntntFrm *MakeFrm( SwFrm* pSib ) = 0;
410cdf0e10cSrcweir 
411cdf0e10cSrcweir     virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
412cdf0e10cSrcweir 
413cdf0e10cSrcweir 	virtual SwCntntNode *JoinNext();
414cdf0e10cSrcweir 	virtual SwCntntNode *JoinPrev();
415cdf0e10cSrcweir 	// koennen 2 Nodes zusammengefasst werden ?
416cdf0e10cSrcweir 	// in pIdx kann die 2. Position returnt werden.
417cdf0e10cSrcweir 	int CanJoinNext( SwNodeIndex* pIdx =0 ) const;
418cdf0e10cSrcweir 	int CanJoinPrev( SwNodeIndex* pIdx =0 ) const;
419cdf0e10cSrcweir 
MakeStartIndex(SwIndex * pIdx)420cdf0e10cSrcweir 	void MakeStartIndex( SwIndex * pIdx )	{ pIdx->Assign( this, 0 ); }
MakeEndIndex(SwIndex * pIdx)421cdf0e10cSrcweir 	void MakeEndIndex( SwIndex * pIdx )		{ pIdx->Assign( this, Len() ); }
422cdf0e10cSrcweir 
423cdf0e10cSrcweir 	sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
424cdf0e10cSrcweir 	sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
425cdf0e10cSrcweir 
426cdf0e10cSrcweir     // Replacement for good old GetFrm(..):
427cdf0e10cSrcweir 	SwCntntFrm *getLayoutFrm( const SwRootFrm*,
428cdf0e10cSrcweir                         const Point* pDocPos = 0,
429cdf0e10cSrcweir 						const SwPosition *pPos = 0,
430cdf0e10cSrcweir 						const sal_Bool bCalcFrm = sal_True ) const;
431cdf0e10cSrcweir 	// Gibt die tatsaechlcheGroesse des Frames zurueck bzw. ein leeres
432cdf0e10cSrcweir 	// Rechteck, wenn kein Layout existiert.
433cdf0e10cSrcweir 	// Wird fuer die Export Filter benoetigt.
434cdf0e10cSrcweir 	SwRect FindLayoutRect( const sal_Bool bPrtArea = sal_False,
435cdf0e10cSrcweir 							const Point* pPoint = 0,
436cdf0e10cSrcweir 							const sal_Bool bCalcFrm = sal_False  ) const;
437cdf0e10cSrcweir 	SwRect FindPageFrmRect( const sal_Bool bPrtArea = sal_False,
438cdf0e10cSrcweir 							const Point* pPoint = 0,
439cdf0e10cSrcweir 							const sal_Bool bCalcFrm = sal_False  ) const;
440cdf0e10cSrcweir 	/*
441cdf0e10cSrcweir 	 * Methode erzeugt fuer den angegebenen Node alle Ansichten vom
442cdf0e10cSrcweir 	 * Dokument. Die erzeugten Contentframes werden in das entsprechende
443cdf0e10cSrcweir 	 * Layout gehaengt.
444cdf0e10cSrcweir 	 */
445cdf0e10cSrcweir 	void MakeFrms( SwCntntNode& rNode );
446cdf0e10cSrcweir 	/*
447cdf0e10cSrcweir 	 * Methode loescht fuer den Node alle Ansichten vom
448cdf0e10cSrcweir 	 * Dokument. Die Contentframes werden aus dem entsprechenden
449cdf0e10cSrcweir 	 * Layout ausgehaengt.
450cdf0e10cSrcweir 	 */
451ca62e2c2SSteve Yin 	//Solution:Add an input param to identify if acc table should be disposed
452ca62e2c2SSteve Yin 	//void DelFrms();
453ca62e2c2SSteve Yin 	void DelFrms( sal_Bool bNeedDel = sal_False, sal_Bool bIsAccTableDispose = sal_True );
454ca62e2c2SSteve Yin 	//void DelFrms(sal_Bool bNeedDel = sal_False);//added by zlcdl for al
455cdf0e10cSrcweir 
456cdf0e10cSrcweir 	/*
457cdf0e10cSrcweir 	 * liefert die Anzahl der Elemente des Inhalts des Nodes;
458cdf0e10cSrcweir 	 * Default ist 1, Unterschiede gibt es beim TextNode und beim
459cdf0e10cSrcweir 	 * Formelnode.
460cdf0e10cSrcweir 	 */
461cdf0e10cSrcweir 	virtual xub_StrLen Len() const;
462cdf0e10cSrcweir 
463cdf0e10cSrcweir 	virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const = 0;
464cdf0e10cSrcweir 		// erfrage vom Client Informationen
465cdf0e10cSrcweir 	virtual sal_Bool GetInfo( SfxPoolItem& ) const;
466cdf0e10cSrcweir 
467cdf0e10cSrcweir 	// SS fuer die PoolItems: (Harte-(Fmt)Attrbutierung)
468cdf0e10cSrcweir 
469cdf0e10cSrcweir 	// Ist bInParent sal_False, wird nur in diesem Node nach dem Attribut gesucht.
470cdf0e10cSrcweir 	const SfxPoolItem& GetAttr( sal_uInt16 nWhich, sal_Bool bInParent=sal_True ) const;
471cdf0e10cSrcweir 	sal_Bool GetAttr( SfxItemSet& rSet, sal_Bool bInParent=sal_True ) const;
472cdf0e10cSrcweir     // --> OD 2008-03-13 #refactorlists#
473cdf0e10cSrcweir     // made virtual
474cdf0e10cSrcweir     virtual sal_Bool SetAttr( const SfxPoolItem& );
475cdf0e10cSrcweir     virtual sal_Bool SetAttr( const SfxItemSet& rSet );
476cdf0e10cSrcweir     virtual sal_Bool ResetAttr( sal_uInt16 nWhich1, sal_uInt16 nWhich2 = 0 );
477cdf0e10cSrcweir     virtual sal_Bool ResetAttr( const SvUShorts& rWhichArr );
478cdf0e10cSrcweir     virtual sal_uInt16 ResetAllAttr();
479cdf0e10cSrcweir     // <--
480cdf0e10cSrcweir 
481cdf0e10cSrcweir     // liefert das Attribut, das nicht ueber die bedingte Vorlage kommt!
482cdf0e10cSrcweir 	const SfxPoolItem* GetNoCondAttr( sal_uInt16 nWhich, sal_Bool bInParents ) const;
483cdf0e10cSrcweir 
484cdf0e10cSrcweir 	// hat der Node schon eigene Auto-Attribute ?
485cdf0e10cSrcweir 	// Zugriff auf SwAttrSet
486cdf0e10cSrcweir     inline const SwAttrSet &GetSwAttrSet() const;
GetpSwAttrSet() const487cdf0e10cSrcweir     inline const SwAttrSet *GetpSwAttrSet() const { return static_cast<const SwAttrSet*>(mpAttrSet.get()); }
HasSwAttrSet() const488cdf0e10cSrcweir     inline sal_Bool  HasSwAttrSet() const { return mpAttrSet ? sal_True : sal_False; }
489cdf0e10cSrcweir 
490cdf0e10cSrcweir 	virtual SwFmtColl* ChgFmtColl( SwFmtColl* );
GetFmtColl() const491cdf0e10cSrcweir 	SwFmtColl* GetFmtColl() const { return (SwFmtColl*)GetRegisteredIn(); }
492cdf0e10cSrcweir 
493cdf0e10cSrcweir //FEATURE::CONDCOLL
494cdf0e10cSrcweir     inline SwFmtColl& GetAnyFmtColl() const;
495cdf0e10cSrcweir 	void SetCondFmtColl( SwFmtColl* );
496cdf0e10cSrcweir     inline SwFmtColl* GetCondFmtColl() const;
497cdf0e10cSrcweir 
498cdf0e10cSrcweir 	sal_Bool IsAnyCondition( SwCollCondition& rTmp ) const;
499cdf0e10cSrcweir 	void ChkCondColl();
500cdf0e10cSrcweir //FEATURE::CONDCOLL
501cdf0e10cSrcweir 
502cdf0e10cSrcweir 	// invalidiert die am Node gesetzte NumRule. Diese wird
503cdf0e10cSrcweir 	// spaetestend in EndAction einer Shell geupdatet
504cdf0e10cSrcweir 	sal_Bool InvalidateNumRule();
505cdf0e10cSrcweir 
506cdf0e10cSrcweir     // --> OD 2005-02-21 #i42921# - determines the text direction for a certain
507cdf0e10cSrcweir     // position. Return -1, if text direction could *not* be determined.
508cdf0e10cSrcweir     short GetTextDirection( const SwPosition& rPos,
509cdf0e10cSrcweir                             const Point* pPt ) const;
510cdf0e10cSrcweir     // <--
511cdf0e10cSrcweir 
SetModifyAtAttr(bool bSetModifyAtAttr) const512cdf0e10cSrcweir     inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
GetModifyAtAttr() const513cdf0e10cSrcweir     inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
514cdf0e10cSrcweir 
515cdf0e10cSrcweir     static SwOLENodes* CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize );
516cdf0e10cSrcweir 
517*56b35d86SArmin Le Grand     //UUUU Access to DrawingLayer FillAttributes in a preprocessed form for primitive usage
518*56b35d86SArmin Le Grand     virtual drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
519*56b35d86SArmin Le Grand 
520cdf0e10cSrcweir private:
521cdf0e10cSrcweir 	// privater Constructor, weil nie kopiert werden darf !!
522cdf0e10cSrcweir 	SwCntntNode( const SwCntntNode & rNode );
523cdf0e10cSrcweir 	SwCntntNode & operator= ( const SwCntntNode & rNode );
524cdf0e10cSrcweir };
525cdf0e10cSrcweir 
526cdf0e10cSrcweir 
527cdf0e10cSrcweir 
528cdf0e10cSrcweir //---------
529cdf0e10cSrcweir // SwTableNode
530cdf0e10cSrcweir //---------
531cdf0e10cSrcweir class SW_DLLPUBLIC SwTableNode : public SwStartNode, public SwModify
532cdf0e10cSrcweir {
533cdf0e10cSrcweir 	friend class SwNodes;
534cdf0e10cSrcweir 	SwTable* pTable;
535cdf0e10cSrcweir protected:
536cdf0e10cSrcweir 	virtual ~SwTableNode();
537cdf0e10cSrcweir 
538cdf0e10cSrcweir public:
539cdf0e10cSrcweir 	SwTableNode( const SwNodeIndex & );
540cdf0e10cSrcweir 
GetTable() const541cdf0e10cSrcweir 	const SwTable& GetTable() const { return *pTable; }
GetTable()542cdf0e10cSrcweir 	SwTable& GetTable() { return *pTable; }
543cdf0e10cSrcweir 	SwTabFrm *MakeFrm( SwFrm* );
544cdf0e10cSrcweir 
545cdf0e10cSrcweir 	//Legt die Frms fuer den TableNode (also die TabFrms) an.
546cdf0e10cSrcweir 	void MakeFrms( SwNodeIndex* pIdxBehind );
547cdf0e10cSrcweir 
548cdf0e10cSrcweir 	//Methode loescht fuer den Node alle Ansichten vom
549cdf0e10cSrcweir 	//Dokument. Die Contentframes werden aus dem entsprechenden
550cdf0e10cSrcweir 	//Layout ausgehaengt.
551cdf0e10cSrcweir 	void DelFrms();
552cdf0e10cSrcweir 
553cdf0e10cSrcweir 	//Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
554cdf0e10cSrcweir 	//Dokument. Die erzeugten Contentframes werden in das entsprechende
555cdf0e10cSrcweir 	//Layout gehaengt.
556cdf0e10cSrcweir 	void MakeFrms( const SwNodeIndex & rIdx );
557cdf0e10cSrcweir 
558cdf0e10cSrcweir 	SwTableNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
559cdf0e10cSrcweir 	void SetNewTable( SwTable* , sal_Bool bNewFrames=sal_True );
560cdf0e10cSrcweir 
561cdf0e10cSrcweir private:
562cdf0e10cSrcweir 	// privater Constructor, weil nie kopiert werden darf !!
563cdf0e10cSrcweir 	SwTableNode( const SwTableNode & rNode );
564cdf0e10cSrcweir 	SwTableNode & operator= ( const SwTableNode & rNode );
565cdf0e10cSrcweir };
566cdf0e10cSrcweir 
567cdf0e10cSrcweir 
568cdf0e10cSrcweir //---------
569cdf0e10cSrcweir // SwSectionNode
570cdf0e10cSrcweir //---------
571cdf0e10cSrcweir class SwSectionNode
572cdf0e10cSrcweir     : public SwStartNode
573cdf0e10cSrcweir     , private ::boost::noncopyable
574cdf0e10cSrcweir {
575cdf0e10cSrcweir 	friend class SwNodes;
576cdf0e10cSrcweir 
577cdf0e10cSrcweir private:
578cdf0e10cSrcweir     ::std::auto_ptr<SwSection> const m_pSection;
579cdf0e10cSrcweir 
580cdf0e10cSrcweir protected:
581cdf0e10cSrcweir 	virtual ~SwSectionNode();
582cdf0e10cSrcweir 
583cdf0e10cSrcweir public:
584cdf0e10cSrcweir     SwSectionNode(SwNodeIndex const&,
585cdf0e10cSrcweir         SwSectionFmt & rFmt, SwTOXBase const*const pTOXBase);
586cdf0e10cSrcweir 
GetSection() const587cdf0e10cSrcweir     const SwSection& GetSection() const { return *m_pSection; }
GetSection()588cdf0e10cSrcweir           SwSection& GetSection()       { return *m_pSection; }
589cdf0e10cSrcweir 
590cdf0e10cSrcweir 	SwFrm *MakeFrm( SwFrm* );
591cdf0e10cSrcweir 
592cdf0e10cSrcweir 	//Legt die Frms fuer den SectionNode (also die SectionFrms) an.
593cdf0e10cSrcweir 	//Im Defaultfall wird bis die Frames bis zum Ende des Bereichs angelegt,
594cdf0e10cSrcweir 	//uebergibt man einen weiteren NodeIndex pEnd, so wird bis zu diesem
595cdf0e10cSrcweir 	//ein MakeFrms gerufen, genutzt wird dies von TableToText
596cdf0e10cSrcweir 	void MakeFrms( SwNodeIndex* pIdxBehind, SwNodeIndex* pEnd = NULL );
597cdf0e10cSrcweir 
598cdf0e10cSrcweir 	//Methode loescht fuer den Node alle Ansichten vom
599cdf0e10cSrcweir 	//Dokument. Die Contentframes werden aus dem entsprechenden
600cdf0e10cSrcweir 	//Layout ausgehaengt.
601cdf0e10cSrcweir 	void DelFrms();
602cdf0e10cSrcweir 
603cdf0e10cSrcweir 	//Methode erzeugt fuer den vorhergehenden Node alle Ansichten vom
604cdf0e10cSrcweir 	//Dokument. Die erzeugten Contentframes werden in das entsprechende
605cdf0e10cSrcweir 	//Layout gehaengt.
606cdf0e10cSrcweir 	void MakeFrms( const SwNodeIndex & rIdx );
607cdf0e10cSrcweir 
608cdf0e10cSrcweir 	SwSectionNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
609cdf0e10cSrcweir 
610cdf0e10cSrcweir 	// setze den Verweis im Format der Section auf sich selbst
611cdf0e10cSrcweir 	void NodesArrChgd();
612cdf0e10cSrcweir 
613cdf0e10cSrcweir 	// ueberprueft bei _nicht_ versteckten Bereichen, ob es Inhalt gibt, der
614cdf0e10cSrcweir 	// _nicht_ in einem versteckten (Unter-)Bereich liegt
615cdf0e10cSrcweir 	sal_Bool IsCntntHidden() const;
616cdf0e10cSrcweir 
617cdf0e10cSrcweir };
618cdf0e10cSrcweir 
619cdf0e10cSrcweir 
620cdf0e10cSrcweir 
621cdf0e10cSrcweir // ---------------------- einige inline Methoden ----------------------
GetEndNode()622cdf0e10cSrcweir inline       SwEndNode   *SwNode::GetEndNode()
623cdf0e10cSrcweir {
624cdf0e10cSrcweir 	 return ND_ENDNODE == nNodeType ? (SwEndNode*)this : 0;
625cdf0e10cSrcweir }
GetEndNode() const626cdf0e10cSrcweir inline const SwEndNode   *SwNode::GetEndNode() const
627cdf0e10cSrcweir {
628cdf0e10cSrcweir 	 return ND_ENDNODE == nNodeType ? (const SwEndNode*)this : 0;
629cdf0e10cSrcweir }
GetStartNode()630cdf0e10cSrcweir inline       SwStartNode *SwNode::GetStartNode()
631cdf0e10cSrcweir {
632cdf0e10cSrcweir 	 return ND_STARTNODE & nNodeType ? (SwStartNode*)this : 0;
633cdf0e10cSrcweir }
GetStartNode() const634cdf0e10cSrcweir inline const SwStartNode *SwNode::GetStartNode() const
635cdf0e10cSrcweir {
636cdf0e10cSrcweir 	 return ND_STARTNODE & nNodeType ? (const SwStartNode*)this : 0;
637cdf0e10cSrcweir }
GetTableNode()638cdf0e10cSrcweir inline       SwTableNode *SwNode::GetTableNode()
639cdf0e10cSrcweir {
640cdf0e10cSrcweir 	 return ND_TABLENODE == nNodeType ? (SwTableNode*)this : 0;
641cdf0e10cSrcweir }
GetTableNode() const642cdf0e10cSrcweir inline const SwTableNode *SwNode::GetTableNode() const
643cdf0e10cSrcweir {
644cdf0e10cSrcweir 	 return ND_TABLENODE == nNodeType ? (const SwTableNode*)this : 0;
645cdf0e10cSrcweir }
GetSectionNode()646cdf0e10cSrcweir inline       SwSectionNode *SwNode::GetSectionNode()
647cdf0e10cSrcweir {
648cdf0e10cSrcweir 	 return ND_SECTIONNODE == nNodeType ? (SwSectionNode*)this : 0;
649cdf0e10cSrcweir }
GetSectionNode() const650cdf0e10cSrcweir inline const SwSectionNode *SwNode::GetSectionNode() const
651cdf0e10cSrcweir {
652cdf0e10cSrcweir 	 return ND_SECTIONNODE == nNodeType ? (const SwSectionNode*)this : 0;
653cdf0e10cSrcweir }
GetCntntNode()654cdf0e10cSrcweir inline       SwCntntNode *SwNode::GetCntntNode()
655cdf0e10cSrcweir {
656cdf0e10cSrcweir 	 return ND_CONTENTNODE & nNodeType ? (SwCntntNode*)this : 0;
657cdf0e10cSrcweir }
GetCntntNode() const658cdf0e10cSrcweir inline const SwCntntNode *SwNode::GetCntntNode() const
659cdf0e10cSrcweir {
660cdf0e10cSrcweir 	 return ND_CONTENTNODE & nNodeType ? (const SwCntntNode*)this : 0;
661cdf0e10cSrcweir }
662cdf0e10cSrcweir 
663cdf0e10cSrcweir 
IsStartNode() const664cdf0e10cSrcweir inline sal_Bool SwNode::IsStartNode() const
665cdf0e10cSrcweir {
666cdf0e10cSrcweir 	return ND_STARTNODE & nNodeType  ? sal_True : sal_False;
667cdf0e10cSrcweir }
IsCntntNode() const668cdf0e10cSrcweir inline sal_Bool SwNode::IsCntntNode() const
669cdf0e10cSrcweir {
670cdf0e10cSrcweir 	return ND_CONTENTNODE & nNodeType  ? sal_True : sal_False;
671cdf0e10cSrcweir }
IsEndNode() const672cdf0e10cSrcweir inline sal_Bool SwNode::IsEndNode() const
673cdf0e10cSrcweir {
674cdf0e10cSrcweir 	return ND_ENDNODE == nNodeType  ? sal_True : sal_False;
675cdf0e10cSrcweir }
IsTxtNode() const676cdf0e10cSrcweir inline sal_Bool SwNode::IsTxtNode() const
677cdf0e10cSrcweir {
678cdf0e10cSrcweir 	return ND_TEXTNODE == nNodeType  ? sal_True : sal_False;
679cdf0e10cSrcweir }
IsTableNode() const680cdf0e10cSrcweir inline sal_Bool SwNode::IsTableNode() const
681cdf0e10cSrcweir {
682cdf0e10cSrcweir 	return ND_TABLENODE == nNodeType  ? sal_True : sal_False;
683cdf0e10cSrcweir }
IsSectionNode() const684cdf0e10cSrcweir inline sal_Bool SwNode::IsSectionNode() const
685cdf0e10cSrcweir {
686cdf0e10cSrcweir 	return ND_SECTIONNODE == nNodeType  ? sal_True : sal_False;
687cdf0e10cSrcweir }
IsNoTxtNode() const688cdf0e10cSrcweir inline sal_Bool SwNode::IsNoTxtNode() const
689cdf0e10cSrcweir {
690cdf0e10cSrcweir 	return ND_NOTXTNODE & nNodeType  ? sal_True : sal_False;
691cdf0e10cSrcweir }
IsOLENode() const692cdf0e10cSrcweir inline sal_Bool SwNode::IsOLENode() const
693cdf0e10cSrcweir {
694cdf0e10cSrcweir 	return ND_OLENODE == nNodeType  ? sal_True : sal_False;
695cdf0e10cSrcweir }
IsGrfNode() const696cdf0e10cSrcweir inline sal_Bool SwNode::IsGrfNode() const
697cdf0e10cSrcweir {
698cdf0e10cSrcweir 	return ND_GRFNODE == nNodeType  ? sal_True : sal_False;
699cdf0e10cSrcweir }
700cdf0e10cSrcweir 
FindSttNodeByType(SwStartNodeType eTyp) const701cdf0e10cSrcweir inline const SwStartNode* SwNode::FindSttNodeByType( SwStartNodeType eTyp ) const
702cdf0e10cSrcweir {
703cdf0e10cSrcweir 	return ((SwNode*)this)->FindSttNodeByType( eTyp );
704cdf0e10cSrcweir }
FindTableNode() const705cdf0e10cSrcweir inline const SwTableNode* SwNode::FindTableNode() const
706cdf0e10cSrcweir {
707cdf0e10cSrcweir 	return ((SwNode*)this)->FindTableNode();
708cdf0e10cSrcweir }
FindSectionNode() const709cdf0e10cSrcweir inline const SwSectionNode* SwNode::FindSectionNode() const
710cdf0e10cSrcweir {
711cdf0e10cSrcweir 	return ((SwNode*)this)->FindSectionNode();
712cdf0e10cSrcweir }
StartOfSectionIndex() const713cdf0e10cSrcweir inline sal_uLong SwNode::StartOfSectionIndex() const
714cdf0e10cSrcweir {
715cdf0e10cSrcweir     return pStartOfSection->GetIndex();
716cdf0e10cSrcweir }
EndOfSectionIndex() const717cdf0e10cSrcweir inline sal_uLong SwNode::EndOfSectionIndex() const
718cdf0e10cSrcweir {
719cdf0e10cSrcweir 	const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
720cdf0e10cSrcweir 	return pStNd->pEndOfSection->GetIndex();
721cdf0e10cSrcweir }
EndOfSectionNode() const722cdf0e10cSrcweir inline const SwEndNode* SwNode::EndOfSectionNode() const
723cdf0e10cSrcweir {
724cdf0e10cSrcweir 	const SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
725cdf0e10cSrcweir 	return pStNd->pEndOfSection;
726cdf0e10cSrcweir }
EndOfSectionNode()727cdf0e10cSrcweir inline SwEndNode* SwNode::EndOfSectionNode()
728cdf0e10cSrcweir {
729cdf0e10cSrcweir 	SwStartNode* pStNd = IsStartNode() ? (SwStartNode*)this : pStartOfSection;
730cdf0e10cSrcweir 	return pStNd->pEndOfSection;
731cdf0e10cSrcweir }
732cdf0e10cSrcweir 
GetNodes()733cdf0e10cSrcweir inline SwNodes& SwNode::GetNodes()
734cdf0e10cSrcweir {
735cdf0e10cSrcweir 	return (SwNodes&)GetArray();
736cdf0e10cSrcweir }
GetNodes() const737cdf0e10cSrcweir inline const SwNodes& SwNode::GetNodes() const
738cdf0e10cSrcweir {
739cdf0e10cSrcweir 	return (SwNodes&)GetArray();
740cdf0e10cSrcweir }
741cdf0e10cSrcweir 
GetDoc()742cdf0e10cSrcweir inline SwDoc* SwNode::GetDoc()
743cdf0e10cSrcweir {
744cdf0e10cSrcweir 	return GetNodes().GetDoc();
745cdf0e10cSrcweir }
GetDoc() const746cdf0e10cSrcweir inline const SwDoc* SwNode::GetDoc() const
747cdf0e10cSrcweir {
748cdf0e10cSrcweir 	return GetNodes().GetDoc();
749cdf0e10cSrcweir }
750cdf0e10cSrcweir 
GetCondFmtColl() const751cdf0e10cSrcweir inline SwFmtColl* SwCntntNode::GetCondFmtColl() const
752cdf0e10cSrcweir {
753cdf0e10cSrcweir 	return pCondColl ? (SwFmtColl*)pCondColl->GetRegisteredIn() : 0;
754cdf0e10cSrcweir }
755cdf0e10cSrcweir 
756cdf0e10cSrcweir 
GetAnyFmtColl() const757cdf0e10cSrcweir inline SwFmtColl& SwCntntNode::GetAnyFmtColl() const
758cdf0e10cSrcweir {
759cdf0e10cSrcweir 	return pCondColl && pCondColl->GetRegisteredIn()
760cdf0e10cSrcweir 				? *(SwFmtColl*)pCondColl->GetRegisteredIn()
761cdf0e10cSrcweir 				: *(SwFmtColl*)GetRegisteredIn();
762cdf0e10cSrcweir }
763cdf0e10cSrcweir 
GetSwAttrSet() const764cdf0e10cSrcweir inline const SwAttrSet& SwCntntNode::GetSwAttrSet() const
765cdf0e10cSrcweir {
766cdf0e10cSrcweir     return mpAttrSet ? *GetpSwAttrSet() : GetAnyFmtColl().GetAttrSet();
767cdf0e10cSrcweir }
768cdf0e10cSrcweir 
769cdf0e10cSrcweir //FEATURE::CONDCOLL
770cdf0e10cSrcweir 
GetAttr(sal_uInt16 nWhich,sal_Bool bInParents) const771cdf0e10cSrcweir inline const SfxPoolItem& SwCntntNode::GetAttr( sal_uInt16 nWhich,
772cdf0e10cSrcweir 												sal_Bool bInParents ) const
773cdf0e10cSrcweir {
774cdf0e10cSrcweir 	return GetSwAttrSet().Get( nWhich, bInParents );
775cdf0e10cSrcweir }
776cdf0e10cSrcweir #endif
777