merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / fmtftn.hxx
blob4fe37c153afe4228c7597b5391b93fa6949e4b74
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmtftn.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _FMTFTN_HXX
31 #define _FMTFTN_HXX
33 #include <tools/string.hxx>
34 #include <svtools/poolitem.hxx>
35 #include "swdllapi.h"
37 class SwDoc;
38 class SwTxtFtn;
40 // ATT_FTN **********************************************************
42 class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
44 friend class SwTxtFtn;
45 SwTxtFtn* pTxtAttr; //mein TextAttribut
46 String aNumber; //Benutzerdefinierte 'Nummer'
47 USHORT nNumber; //Automatische Nummerierung
48 bool m_bEndNote; // is it an End note?
50 // geschuetzter CopyCtor
51 SwFmtFtn& operator=(const SwFmtFtn& rFtn);
52 SwFmtFtn( const SwFmtFtn& );
54 public:
55 SwFmtFtn( bool bEndNote = false );
56 virtual ~SwFmtFtn();
58 // "pure virtual Methoden" vom SfxPoolItem
59 virtual int operator==( const SfxPoolItem& ) const;
60 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
62 const String &GetNumStr() const { return aNumber; }
63 const USHORT &GetNumber() const { return nNumber; }
64 bool IsEndNote() const { return m_bEndNote;}
66 void SetNumStr( const String& rStr ) { aNumber = rStr; }
67 void SetNumber( USHORT nNo ) { nNumber = nNo; }
68 void SetEndNote( bool b );
70 void SetNumber( const SwFmtFtn& rFtn )
71 { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
73 const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; }
74 SwTxtFtn *GetTxtFtn() { return pTxtAttr; }
76 void GetFtnText( String& rStr ) const;
78 // returnt den anzuzeigenden String der Fuss-/Endnote
79 String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
83 #endif