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
42class SW_DLLPUBLIC SwFormatFootnoteEndAtTextEnd : public SfxEnumItem<SwFootnoteEndPosEnum>
43{
44 OUString m_sPrefix;
45 OUString m_sSuffix;
47 sal_uInt16 m_nOffset;
48
49protected:
51 : SfxEnumItem( nWhichL, ePos ), m_nOffset( 0 )
52 {}
53
54public:
55 virtual sal_uInt16 GetValueCount() const override;
56
57 virtual bool operator==( const SfxPoolItem& ) const override;
58
59 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
60 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
61
62 virtual bool GetPresentation( SfxItemPresentation ePres,
63 MapUnit eCoreMetric,
64 MapUnit ePresMetric,
65 OUString &rText,
66 const IntlWrapper& rIntl ) const override;
67
68 bool IsAtEnd() const { return FTNEND_ATPGORDOCEND != GetValue(); }
69
72 // SfxPoolItem copy function dichotomy
73
74 SvxNumType GetNumType() const { return m_aFormat.GetNumberingType(); }
75 void SetNumType( SvxNumType eType ) { m_aFormat.SetNumberingType(eType); }
76
77 const SvxNumberType& GetSwNumType() const { return m_aFormat; }
78
79 sal_uInt16 GetOffset() const { return m_nOffset; }
80 void SetOffset( sal_uInt16 nOff ) { m_nOffset = nOff; }
81
82 const OUString& GetPrefix() const { return m_sPrefix; }
83 void SetPrefix(const OUString& rSet) { m_sPrefix = rSet; }
84
85 const OUString& GetSuffix() const { return m_sSuffix; }
86 void SetSuffix(const OUString& rSet) { m_sSuffix = rSet; }
87};
88
90{
91public:
94 {}
95
96 virtual SwFormatFootnoteAtTextEnd* Clone( SfxItemPool *pPool = nullptr ) const override;
97};
98
100{
101public:
104 {
105 SetNumType( SVX_NUM_ROMAN_LOWER );
106 }
107
108 virtual SwFormatEndAtTextEnd* Clone( SfxItemPool *pPool = nullptr ) const override;
109};
110
112 { return Get( RES_FTN_AT_TXTEND, bInP); }
114 { return Get( RES_END_AT_TXTEND, bInP); }
115
117 { return m_aSet.GetFootnoteAtTextEnd(bInP); }
119 { return m_aSet.GetEndAtTextEnd(bInP); }
120
121#endif
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::chart::ChartAxisLabelPosition ePos
virtual sal_uInt16 GetValueCount() const=0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8) override
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8=0) const override
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
EnumT GetValue() const
virtual bool operator==(SfxPoolItem const &other) const override
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
SfxPoolItem & operator=(const SfxPoolItem &)=delete
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
const SwFormatEndAtTextEnd & GetEndAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:113
const SwFormatFootnoteAtTextEnd & GetFootnoteAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:111
SwFormatEndAtTextEnd(SwFootnoteEndPosEnum ePos=FTNEND_ATPGORDOCEND)
Definition: fmtftntx.hxx:102
SwFormatFootnoteAtTextEnd(SwFootnoteEndPosEnum ePos=FTNEND_ATPGORDOCEND)
Definition: fmtftntx.hxx:92
SfxPoolItem subclass that is a wrapper around an SwFootnoteEndPosEnum, i.e.
Definition: fmtftntx.hxx:43
const SvxNumberType & GetSwNumType() const
Definition: fmtftntx.hxx:77
void SetNumType(SvxNumType eType)
Definition: fmtftntx.hxx:75
const OUString & GetPrefix() const
Definition: fmtftntx.hxx:82
SwFormatFootnoteEndAtTextEnd(sal_uInt16 nWhichL, SwFootnoteEndPosEnum ePos)
Definition: fmtftntx.hxx:50
void SetPrefix(const OUString &rSet)
Definition: fmtftntx.hxx:83
SwFormatFootnoteEndAtTextEnd(SwFormatFootnoteEndAtTextEnd const &)=default
SvxNumType GetNumType() const
Definition: fmtftntx.hxx:74
void SetSuffix(const OUString &rSet)
Definition: fmtftntx.hxx:86
void SetOffset(sal_uInt16 nOff)
Definition: fmtftntx.hxx:80
sal_uInt16 GetOffset() const
Definition: fmtftntx.hxx:79
const OUString & GetSuffix() const
Definition: fmtftntx.hxx:85
const SwFormatFootnoteAtTextEnd & GetFootnoteAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:116
const SwFormatEndAtTextEnd & GetEndAtTextEnd(bool=true) const
Definition: fmtftntx.hxx:118
SwAttrSet m_aSet
Definition: format.hxx:51
DocumentType eType
SwFootnoteEndPosEnum
Definition: fmtftntx.hxx:29
@ FTNEND_ATTXTEND
at end of the current text end
Definition: fmtftntx.hxx:31
@ FTNEND_ATTXTEND_END
Definition: fmtftntx.hxx:34
@ FTNEND_ATTXTEND_OWNNUMANDFMT
-""- and with own numberformat
Definition: fmtftntx.hxx:33
@ FTNEND_ATTXTEND_OWNNUMSEQ
-""- and with own number sequence
Definition: fmtftntx.hxx:32
@ FTNEND_ATPGORDOCEND
at page or document end
Definition: fmtftntx.hxx:30
constexpr TypedWhichId< SwFormatEndAtTextEnd > RES_END_AT_TXTEND(124)
constexpr TypedWhichId< SwFormatFootnoteAtTextEnd > RES_FTN_AT_TXTEND(123)
MapUnit
SfxItemPresentation
static SfxItemSet & rSet
SvxNumType
SVX_NUM_ROMAN_LOWER
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8