xref: /trunk/main/sw/inc/fmtftn.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 _FMTFTN_HXX
24 #define _FMTFTN_HXX
25 
26 #include <tools/string.hxx>
27 #include <svl/poolitem.hxx>
28 #include "swdllapi.h"
29 
30 class SwDoc;
31 class SwTxtFtn;
32 
33 // ATT_FTN **********************************************************
34 
35 class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
36 {
37 	friend class SwTxtFtn;
38 	SwTxtFtn* pTxtAttr;		//mein TextAttribut
39 	String  aNumber;		//Benutzerdefinierte 'Nummer'
40 	sal_uInt16  nNumber;		//Automatische Nummerierung
41     bool    m_bEndNote;     // is it an End note?
42 
43 	// geschuetzter CopyCtor
44 	SwFmtFtn& operator=(const SwFmtFtn& rFtn);
45 	SwFmtFtn( const SwFmtFtn& );
46 
47 public:
48 	SwFmtFtn( bool bEndNote = false );
49 	virtual ~SwFmtFtn();
50 
51 	// "pure virtual Methoden" vom SfxPoolItem
52 	virtual int             operator==( const SfxPoolItem& ) const;
53 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
54 
GetNumStr() const55 	const String &GetNumStr() const { return aNumber; }
GetNumber() const56 	const sal_uInt16 &GetNumber() const { return nNumber; }
IsEndNote() const57           bool    IsEndNote() const { return m_bEndNote;}
58 
SetNumStr(const String & rStr)59 	void SetNumStr( const String& rStr )	{ aNumber = rStr; }
SetNumber(sal_uInt16 nNo)60 	void SetNumber( sal_uInt16 nNo ) 			{ nNumber = nNo; }
61     void SetEndNote( bool b );
62 
SetNumber(const SwFmtFtn & rFtn)63 	void SetNumber( const SwFmtFtn& rFtn )
64 		{ nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
65 
GetTxtFtn() const66 	const SwTxtFtn *GetTxtFtn() const   { return pTxtAttr; }
GetTxtFtn()67 		  SwTxtFtn *GetTxtFtn()	  		{ return pTxtAttr; }
68 
69 	void GetFtnText( String& rStr ) const;
70 
71 	// returnt den anzuzeigenden String der Fuss-/Endnote
72 	String GetViewNumStr( const SwDoc& rDoc, sal_Bool bInclStrs = sal_False ) const;
73 };
74 
75 
76 #endif
77 
78