xref: /aoo42x/main/sw/inc/txtftn.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _TXTFTN_HXX
24 #define _TXTFTN_HXX
25 
26 #include <txatbase.hxx>
27 
28 class SwNodeIndex;
29 class SwTxtNode;
30 class SwNodes;
31 class SwDoc;
32 class SwFrm;
33 
34 // ATT_FTN **********************************************************
35 
36 class SW_DLLPUBLIC SwTxtFtn : public SwTxtAttr
37 {
38     SwNodeIndex * m_pStartNode;
39     SwTxtNode * m_pTxtNode;
40     sal_uInt16 m_nSeqNo;
41 
42 public:
43     SwTxtFtn( SwFmtFtn& rAttr, xub_StrLen nStart );
44     virtual ~SwTxtFtn();
45 
GetStartNode() const46     inline SwNodeIndex *GetStartNode() const { return m_pStartNode; }
47 	void SetStartNode( const SwNodeIndex *pNode, sal_Bool bDelNodes = sal_True );
48 	void SetNumber( const sal_uInt16 nNumber, const String* = 0 );
49     void CopyFtn(SwTxtFtn & rDest, SwTxtNode & rDestNode) const;
50 
51     // get and set TxtNode pointer
52     inline const SwTxtNode& GetTxtNode() const;
ChgTxtNode(SwTxtNode * pNew)53     void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
54 
55 		// lege eine neue leere TextSection fuer diese Fussnote an
56 	void MakeNewTextSection( SwNodes& rNodes );
57 
58 		// loesche die FtnFrame aus der Seite
59 	void DelFrms( const SwFrm* );
60 		// bedingten Absatzvorlagen checken
61 	void CheckCondColl();
62 
63 		// fuer die Querverweise auf Fussnoten
64 	sal_uInt16 SetSeqRefNo();
SetSeqNo(sal_uInt16 n)65     void SetSeqNo( sal_uInt16 n )       { m_nSeqNo = n; }   // for Readers
GetSeqRefNo() const66     sal_uInt16 GetSeqRefNo() const      { return m_nSeqNo; }
67 
68 	static void SetUniqueSeqRefNo( SwDoc& rDoc );
69 };
70 
GetTxtNode() const71 inline const SwTxtNode& SwTxtFtn::GetTxtNode() const
72 {
73     ASSERT( m_pTxtNode, "SwTxtFtn: where is my TxtNode?" );
74     return *m_pTxtNode;
75 }
76 
77 #endif
78 
79