1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <tools/string.hxx>
23 #include <svl/poolitem.hxx>
31 class SW_DLLPUBLIC SwFmtFtn
: public SfxPoolItem
33 friend class SwTxtFtn
;
34 SwTxtFtn
* pTxtAttr
; ///< My TextAttribute.
35 String aNumber
; ///< User-defined 'Number'.
36 sal_uInt16 nNumber
; ///< Automatische Nummerierung
37 bool m_bEndNote
; ///< Is it an End note?
39 /// Protected CopyCtor.
40 SwFmtFtn
& operator=(const SwFmtFtn
& rFtn
);
41 SwFmtFtn( const SwFmtFtn
& );
44 SwFmtFtn( bool bEndNote
= false );
47 /// "Pure virtual methods" of SfxPoolItem.
48 virtual int operator==( const SfxPoolItem
& ) const;
49 virtual SfxPoolItem
* Clone( SfxItemPool
* pPool
= 0 ) const;
51 const String
&GetNumStr() const { return aNumber
; }
52 const sal_uInt16
&GetNumber() const { return nNumber
; }
53 bool IsEndNote() const { return m_bEndNote
;}
55 void SetNumStr( const String
& rStr
) { aNumber
= rStr
; }
56 void SetNumber( sal_uInt16 nNo
) { nNumber
= nNo
; }
57 void SetEndNote( bool b
);
59 void SetNumber( const SwFmtFtn
& rFtn
)
60 { nNumber
= rFtn
.nNumber
; aNumber
= rFtn
.aNumber
; }
62 const SwTxtFtn
*GetTxtFtn() const { return pTxtAttr
; }
63 SwTxtFtn
*GetTxtFtn() { return pTxtAttr
; }
65 void GetFtnText( String
& rStr
) const;
67 /// Returns string to be displayed of footnote / endnote.
68 String
GetViewNumStr( const SwDoc
& rDoc
, sal_Bool bInclStrs
= sal_False
) const;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */