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>
25 #include <editeng/numitem.hxx>
32 class SW_DLLPUBLIC SwEndNoteInfo
: public SwClient
34 SwDepend aPageDescDep
;
35 SwDepend aCharFmtDep
, aAnchorCharFmtDep
;
40 virtual void Modify( const SfxPoolItem
* pOld
, const SfxPoolItem
* pNew
);
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 ); }
78 // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
85 FTNNUM_PAGE
, FTNNUM_CHAPTER
, FTNNUM_DOC
88 class SW_DLLPUBLIC SwFtnInfo
: public SwEndNoteInfo
90 using SwEndNoteInfo::operator ==;
99 SwFtnInfo
& operator=(const SwFtnInfo
&);
101 bool operator==( const SwFtnInfo
&rInf
) const;
103 SwFtnInfo(SwTxtFmtColl
* pTxtColl
= 0);
104 SwFtnInfo(const SwFtnInfo
&);
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */