LibreOffice Module sw (master)  1
fmtftntx.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_INC_FMTFTNTX_HXX
20 #define INCLUDED_SW_INC_FMTFTNTX_HXX
21 
22 #include <svl/eitem.hxx>
23 #include <editeng/numitem.hxx>
24 #include "hintids.hxx"
25 #include "format.hxx"
26 #include "swdllapi.h"
27 
29 {
35 };
36 
37 class SW_DLLPUBLIC SwFormatFootnoteEndAtTextEnd : public SfxEnumItem<SwFootnoteEndPosEnum>
38 {
39  OUString m_sPrefix;
40  OUString m_sSuffix;
42  sal_uInt16 m_nOffset;
43 
44 protected:
46  : SfxEnumItem( nWhichL, ePos ), m_nOffset( 0 )
47  {}
48 
49 public:
50  virtual sal_uInt16 GetValueCount() const override;
51 
52  virtual bool operator==( const SfxPoolItem& ) const override;
53 
54  virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
55  virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
56 
57  virtual bool GetPresentation( SfxItemPresentation ePres,
58  MapUnit eCoreMetric,
59  MapUnit ePresMetric,
60  OUString &rText,
61  const IntlWrapper& rIntl ) const override;
62 
63  bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
64 
67  // SfxPoolItem copy function dichotomy
68 
69  SvxNumType GetNumType() const { return m_aFormat.GetNumberingType(); }
70  void SetNumType( SvxNumType eType ) { m_aFormat.SetNumberingType(eType); }
71 
72  const SvxNumberType& GetSwNumType() const { return m_aFormat; }
73 
74  sal_uInt16 GetOffset() const { return m_nOffset; }
75  void SetOffset( sal_uInt16 nOff ) { m_nOffset = nOff; }
76 
77  const OUString& GetPrefix() const { return m_sPrefix; }
78  void SetPrefix(const OUString& rSet) { m_sPrefix = rSet; }
79 
80  const OUString& GetSuffix() const { return m_sSuffix; }
81  void SetSuffix(const OUString& rSet) { m_sSuffix = rSet; }
82 };
83 
85 {
86 public:
89  {}
90 
91  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
92 };
93 
95 {
96 public:
99  {
101  }
102 
103  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
104 };
105 
107  { return Get( RES_FTN_AT_TXTEND, bInP); }
108 inline const SwFormatEndAtTextEnd &SwAttrSet::GetEndAtTextEnd(bool bInP) const
109  { return Get( RES_END_AT_TXTEND, bInP); }
110 
112  { return m_aSet.GetFootnoteAtTextEnd(bInP); }
113 inline const SwFormatEndAtTextEnd &SwFormat::GetEndAtTextEnd(bool bInP) const
114  { return m_aSet.GetEndAtTextEnd(bInP); }
115 
116 #endif
117 
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvxNumType GetNumberingType() const
#define RES_FTN_AT_TXTEND
Definition: hintids.hxx:222
#define RES_END_AT_TXTEND
Definition: hintids.hxx:223
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8) override
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
-""- and with own numberformat
Definition: fmtftntx.hxx:33
const OUString & GetSuffix() const
Definition: fmtftntx.hxx:80
SfxPoolItem & operator=(const SfxPoolItem &)=delete
SwAttrSet m_aSet
Definition: format.hxx:48
sal_uInt16 GetOffset() const
Definition: fmtftntx.hxx:74
css::chart::ChartAxisLabelPosition ePos
SvxNumType
virtual bool operator==(SfxPoolItem const &other) const override
at page or document end
Definition: fmtftntx.hxx:30
const SwFormatFootnoteAtTextEnd & GetFootnoteAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:111
SVX_NUM_ROMAN_LOWER
const SvxNumberType & GetSwNumType() const
Definition: fmtftntx.hxx:72
SwFormatFootnoteAtTextEnd(SwFootnoteEndPosEnum ePos=FTNEND_ATPGORDOCEND)
Definition: fmtftntx.hxx:87
void SetSuffix(const OUString &rSet)
Definition: fmtftntx.hxx:81
SfxItemPresentation
void SetNumType(SvxNumType eType)
Definition: fmtftntx.hxx:70
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
SvxNumType GetNumType() const
Definition: fmtftntx.hxx:69
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
const SwFormatEndAtTextEnd & GetEndAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:113
const SwFormatEndAtTextEnd & GetEndAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:108
const SwFormatFootnoteAtTextEnd & GetFootnoteAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:106
at end of the current text end
Definition: fmtftntx.hxx:31
const OUString & GetPrefix() const
Definition: fmtftntx.hxx:77
void SetPrefix(const OUString &rSet)
Definition: fmtftntx.hxx:78
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8=0) const override
void SetOffset(sal_uInt16 nOff)
Definition: fmtftntx.hxx:75
SwFootnoteEndPosEnum
Definition: fmtftntx.hxx:28
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
unsigned char sal_uInt8
virtual sal_uInt16 GetValueCount() const =0
-""- and with own number sequence
Definition: fmtftntx.hxx:32
MapUnit
SwFormatFootnoteEndAtTextEnd(sal_uInt16 nWhichL, SwFootnoteEndPosEnum ePos)
Definition: fmtftntx.hxx:45
void SetNumberingType(SvxNumType nSet)
SwFormatEndAtTextEnd(SwFootnoteEndPosEnum ePos=FTNEND_ATPGORDOCEND)
Definition: fmtftntx.hxx:97
EnumT GetValue() const