tdf#132853 - UI: fix different sizes in Image tabs Type & Crop
[LibreOffice.git] / sw / inc / ftninfo.hxx
blobb7fd5c62998f8c5040d95eea1b81a61f5046bc2d
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 INCLUDED_SW_INC_FTNINFO_HXX
20 #define INCLUDED_SW_INC_FTNINFO_HXX
22 #include <rtl/ustring.hxx>
23 #include "swdllapi.h"
24 #include "calbck.hxx"
25 #include <editeng/numitem.hxx>
27 class SwTextFormatColl;
28 class SwPageDesc;
29 class SwCharFormat;
30 class SwDoc;
31 class SwSection;
33 class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
35 mutable sw::WriterMultiListener m_aDepends;
36 mutable SwTextFormatColl* m_pTextFormatColl;
37 mutable SwPageDesc* m_pPageDesc;
38 mutable std::unique_ptr<SwSection> m_pSwSection;
39 mutable SwCharFormat* m_pCharFormat;
40 mutable SwCharFormat* m_pAnchorFormat;
41 OUString m_sPrefix;
42 OUString m_sSuffix;
43 protected:
44 bool m_bEndNote;
45 virtual void SwClientNotify( const SwModify&, const SfxHint&) override;
47 public:
48 SvxNumberType m_aFormat;
49 sal_uInt16 m_nFootnoteOffset;
51 void ChgPageDesc(SwPageDesc* pDesc);
52 SwPageDesc* GetPageDesc(SwDoc& rDoc) const;
53 bool KnowsPageDesc() const;
54 bool DependsOn(const SwPageDesc*) const;
56 SwSection* GetSwSection(SwDoc& rDoc) const;
57 void ResetSwSection();
59 void SetFootnoteTextColl(SwTextFormatColl& rColl);
60 SwTextFormatColl* GetFootnoteTextColl() const { return m_pTextFormatColl; } // can be 0.
62 SwCharFormat* GetCharFormat(SwDoc &rDoc) const;
63 void SetCharFormat( SwCharFormat* );
65 SwCharFormat* GetAnchorCharFormat(SwDoc &rDoc) const;
66 void SetAnchorCharFormat(SwCharFormat*);
67 SwCharFormat* GetCurrentCharFormat(const bool bAnchor) const;
69 SwEndNoteInfo & operator=(const SwEndNoteInfo&);
70 bool operator==( const SwEndNoteInfo &rInf ) const;
72 SwEndNoteInfo();
73 SwEndNoteInfo(const SwEndNoteInfo&);
75 const OUString& GetPrefix() const { return m_sPrefix; }
76 const OUString& GetSuffix() const { return m_sSuffix; }
78 void SetPrefix(const OUString& rSet) { m_sPrefix = rSet; }
79 void SetSuffix(const OUString& rSet) { m_sSuffix = rSet; }
80 void UpdateFormatOrAttr();
83 enum SwFootnotePos
85 // Momentarily only PAGE and CHAPTER. CHAPTER == document-endnotes.
86 FTNPOS_PAGE = 1,
87 FTNPOS_CHAPTER = 8
90 enum SwFootnoteNum : unsigned
92 FTNNUM_PAGE, FTNNUM_CHAPTER, FTNNUM_DOC
95 class SW_DLLPUBLIC SwFootnoteInfo final : public SwEndNoteInfo
97 using SwEndNoteInfo::operator ==;
99 public:
100 OUString m_aQuoVadis;
101 OUString m_aErgoSum;
102 SwFootnotePos m_ePos;
103 SwFootnoteNum m_eNum;
105 SwFootnoteInfo& operator=(const SwFootnoteInfo&);
107 bool operator==( const SwFootnoteInfo &rInf ) const;
109 SwFootnoteInfo();
110 SwFootnoteInfo(const SwFootnoteInfo&);
112 ~SwFootnoteInfo() override;
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */