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