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