bump product version to 4.1.6.2
[LibreOffice.git] / sw / inc / ftninfo.hxx
blobc88e0119b20dca1ce3ee50748f09fe7c71757022
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _FTNINFO_HXX
20 #define _FTNINFO_HXX
22 #include <tools/string.hxx>
23 #include "swdllapi.h"
24 #include <calbck.hxx>
25 #include <editeng/numitem.hxx>
27 class SwTxtFmtColl;
28 class SwPageDesc;
29 class SwCharFmt;
30 class SwDoc;
32 class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
34 SwDepend aPageDescDep;
35 SwDepend aCharFmtDep, aAnchorCharFmtDep;
36 OUString sPrefix;
37 OUString sSuffix;
38 protected:
39 bool m_bEndNote;
40 virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
42 public:
43 SvxNumberType aFmt;
44 sal_uInt16 nFtnOffset;
46 void ChgPageDesc( SwPageDesc *pDesc );
47 SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
48 bool KnowsPageDesc() const;
49 bool DependsOn( const SwPageDesc* ) const;
51 void SetFtnTxtColl(SwTxtFmtColl& rColl);
52 SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
54 SwCharFmt* GetCharFmt(SwDoc &rDoc) const;
55 void SetCharFmt( SwCharFmt* );
56 SwClient *GetCharFmtDep() const { return (SwClient*)&aCharFmtDep; }
58 SwCharFmt* GetAnchorCharFmt(SwDoc &rDoc) const;
59 void SetAnchorCharFmt( SwCharFmt* );
60 SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
62 SwEndNoteInfo & operator=(const SwEndNoteInfo&);
63 bool operator==( const SwEndNoteInfo &rInf ) const;
65 SwEndNoteInfo( SwTxtFmtColl *pTxtColl = 0);
66 SwEndNoteInfo(const SwEndNoteInfo&);
68 const OUString& GetPrefix() const { return sPrefix; }
69 const OUString& GetSuffix() const { return sSuffix; }
71 void SetPrefix(const OUString& rSet) { sPrefix = rSet; }
72 void SetSuffix(const OUString& rSet) { sSuffix = rSet; }
73 void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
76 enum SwFtnPos
78 // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
79 FTNPOS_PAGE = 1,
80 FTNPOS_CHAPTER = 8
83 enum SwFtnNum
85 FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
88 class SW_DLLPUBLIC SwFtnInfo: public SwEndNoteInfo
90 using SwEndNoteInfo::operator ==;
92 public:
93 String aQuoVadis;
94 String aErgoSum;
95 SwFtnPos ePos;
96 SwFtnNum eNum;
99 SwFtnInfo& operator=(const SwFtnInfo&);
101 bool operator==( const SwFtnInfo &rInf ) const;
103 SwFtnInfo(SwTxtFmtColl* pTxtColl = 0);
104 SwFtnInfo(const SwFtnInfo&);
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */