xref: /trunk/main/sw/inc/txtftn.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _TXTFTN_HXX
28 #define _TXTFTN_HXX
29 
30 #include <txatbase.hxx>
31 
32 class SwNodeIndex;
33 class SwTxtNode;
34 class SwNodes;
35 class SwDoc;
36 class SwFrm;
37 
38 // ATT_FTN **********************************************************
39 
40 class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
41 {
42     SwNodeIndex * m_pStartNode;
43     SwTxtNode * m_pTxtNode;
44     sal_uInt16 m_nSeqNo;
45 
46 public:
47     SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
48     virtual ~SwTxtFtn();
49 
50     inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
51 	void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True );
52 	void SetNumber( const sal_uInt16 nNumber, const String* = 0 );
53     void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
54 
55     // get and set TxtNode pointer
56     inline const SwTxtNode& GetTxtNode() const;
57     void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
58 
59 		// lege eine neue leere TextSection fuer diese Fussnote an
60 	void MakeNewTextSection( SwNodes& rNodes );
61 
62 		// loesche die FtnFrame aus der Seite
63 	void DelFrms( const SwFrm* );
64 		// bedingten Absatzvorlagen checken
65 	void CheckCondColl();
66 
67 		// fuer die Querverweise auf Fussnoten
68 	sal_uInt16 SetSeqRefNo();
69     void SetSeqNo( sal_uInt16 n )       { m_nSeqNo = n; }   // for Readers
70     sal_uInt16 GetSeqRefNo() const      { return m_nSeqNo; }
71 
72 	static void SetUniqueSeqRefNo( SwDoc& rDoc );
73 };
74 
75 inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
76 {
77     ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
78     return *m_pTxtNode;
79 }
80 
81 #endif
82 
83