Update ooo320-m1
[ooovba.git] / sw / inc / ftninfo.hxx
blobec66693082c40146b1e5a2d91cd06db6db3d0004
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: ftninfo.hxx,v $
10 * $Revision: 1.9 $
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 _FTNINFO_HXX
31 #define _FTNINFO_HXX
33 #include <tools/string.hxx>
34 #include "swdllapi.h"
35 //#ifndef _NUMRULE_HXX
36 //#include <numrule.hxx>
37 //#endif
38 #include <calbck.hxx>
39 #include <svx/numitem.hxx>
41 class SwTxtFmtColl;
42 class SwPageDesc;
43 class SwCharFmt;
44 class SwDoc;
46 class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
48 SwDepend aPageDescDep;
49 SwDepend aCharFmtDep, aAnchorCharFmtDep;
50 String sPrefix;
51 String sSuffix;
52 protected:
53 bool m_bEndNote;
54 public:
55 SvxNumberType aFmt;
56 USHORT nFtnOffset;
58 void ChgPageDesc( SwPageDesc *pDesc );
59 SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
60 SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
62 void SetFtnTxtColl(SwTxtFmtColl& rColl);
63 SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
65 SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
66 void SetCharFmt( SwCharFmt* );
67 SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
69 SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
70 void SetAnchorCharFmt( SwCharFmt* );
71 SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
73 virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
75 SwEndNoteInfo & operator=(const SwEndNoteInfo&);
76 BOOL operator==( const SwEndNoteInfo &rInf ) const;
78 SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
79 SwEndNoteInfo(const SwEndNoteInfo&);
81 const String& GetPrefix() const { return sPrefix; }
82 const String& GetSuffix() const { return sSuffix; }
84 void SetPrefix(const String& rSet) { sPrefix = rSet; }
85 void SetSuffix(const String& rSet) { sSuffix = rSet; }
88 enum SwFtnPos
90 //Derzeit nur PAGE und CHAPTER. CHAPTER == Dokumentendenoten.
91 FTNPOS_PAGE = 1,
92 FTNPOS_CHAPTER = 8
95 enum SwFtnNum
97 FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
100 class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
102 using SwEndNoteInfo::operator ==;
104 public:
105 String aQuoVadis;
106 String aErgoSum;
107 SwFtnPos ePos;
108 SwFtnNum eNum;
111 SwFtnInfo& operator=(const SwFtnInfo&);
113 BOOL operator==( const SwFtnInfo &rInf ) const;
115 SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
116 SwFtnInfo(const SwFtnInfo&);
120 #endif