merged tag ooo/OOO330_m14
[LibreOffice.git] / sw / inc / fmtftn.hxx
blob381703302585884206602030a69e6e6848f6b39a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef _FMTFTN_HXX
28 #define _FMTFTN_HXX
30 #include <tools/string.hxx>
31 #include <svl/poolitem.hxx>
32 #include "swdllapi.h"
34 class SwDoc;
35 class SwTxtFtn;
37 // ATT_FTN **********************************************************
39 class SW_DLLPUBLIC SwFmtFtn: public SfxPoolItem
41 friend class SwTxtFtn;
42 SwTxtFtn* pTxtAttr; //mein TextAttribut
43 String aNumber; //Benutzerdefinierte 'Nummer'
44 USHORT nNumber; //Automatische Nummerierung
45 bool m_bEndNote; // is it an End note?
47 // geschuetzter CopyCtor
48 SwFmtFtn& operator=(const SwFmtFtn& rFtn);
49 SwFmtFtn( const SwFmtFtn& );
51 public:
52 SwFmtFtn( bool bEndNote = false );
53 virtual ~SwFmtFtn();
55 // "pure virtual Methoden" vom SfxPoolItem
56 virtual int operator==( const SfxPoolItem& ) const;
57 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
59 const String &GetNumStr() const { return aNumber; }
60 const USHORT &GetNumber() const { return nNumber; }
61 bool IsEndNote() const { return m_bEndNote;}
63 void SetNumStr( const String& rStr ) { aNumber = rStr; }
64 void SetNumber( USHORT nNo ) { nNumber = nNo; }
65 void SetEndNote( bool b );
67 void SetNumber( const SwFmtFtn& rFtn )
68 { nNumber = rFtn.nNumber; aNumber = rFtn.aNumber; }
70 const SwTxtFtn *GetTxtFtn() const { return pTxtAttr; }
71 SwTxtFtn *GetTxtFtn() { return pTxtAttr; }
73 void GetFtnText( String& rStr ) const;
75 // returnt den anzuzeigenden String der Fuss-/Endnote
76 String GetViewNumStr( const SwDoc& rDoc, BOOL bInclStrs = FALSE ) const;
80 #endif