LibreOffice Module sw (master) 1
uiitems.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_SOURCE_UIBASE_INC_UIITEMS_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_UIITEMS_HXX
21
22#include <memory>
23#include <svl/poolitem.hxx>
24#include <swdllapi.h>
25#include <pagedesc.hxx>
26
27class SwNumRule;
28class IntlWrapper;
29class SwPaM;
30
31// container for FootNote
33{
35
36public:
37
39 virtual ~SwPageFootnoteInfoItem() override;
40
43 SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem const &) = delete; // due to SfxPoolItem
44 SwPageFootnoteInfoItem & operator =(SwPageFootnoteInfoItem &&) = delete; // due to SfxPoolItem
45
46 virtual SwPageFootnoteInfoItem* Clone( SfxItemPool *pPool = nullptr ) const override;
47 virtual bool operator==( const SfxPoolItem& ) const override;
48 virtual bool GetPresentation( SfxItemPresentation ePres,
49 MapUnit eCoreMetric,
50 MapUnit ePresMetric,
51 OUString &rText,
52 const IntlWrapper& rIntl ) 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 SwPageFootnoteInfo& GetPageFootnoteInfo() { return m_aFootnoteInfo; }
58 const SwPageFootnoteInfo& GetPageFootnoteInfo() const { return m_aFootnoteInfo; }
59};
60
62{
63 void* m_pMisc;
64
65public:
66 SwPtrItem( const sal_uInt16 nId, void* pPtr);
67
68 virtual SwPtrItem* Clone( SfxItemPool *pPool = nullptr ) const override;
69 virtual bool operator==( const SfxPoolItem& ) const override;
70
71 void* GetValue() const { return m_pMisc; }
72};
73
75{
76 std::unique_ptr<SwNumRule> m_pRule;
77
78public:
79 SwUINumRuleItem( const SwNumRule& rRule );
80 SwUINumRuleItem( const SwUINumRuleItem& rItem );
81 virtual ~SwUINumRuleItem() override;
82
83 virtual SwUINumRuleItem* Clone( SfxItemPool *pPool = nullptr ) const override;
84 virtual bool operator==( const SfxPoolItem& ) const override;
85
86 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
87 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
88
89 const SwNumRule* GetNumRule() const { return m_pRule.get(); }
90 SwNumRule* GetNumRule() { return m_pRule.get(); }
91};
92
93class SwPaMItem final : public SfxPoolItem
94{
96
97public:
98 SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM);
99
100 virtual SwPaMItem* Clone( SfxItemPool *pPool = nullptr ) const override;
101 virtual bool operator==( const SfxPoolItem& ) const override;
102
103 SwPaM* GetValue() const { return m_pPaM; }
104};
105
106#endif // INCLUDED_SW_SOURCE_UIBASE_INC_UIITEMS_HXX
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
virtual bool operator==(const SfxPoolItem &) const=0
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
SfxPoolItem & operator=(const SfxPoolItem &)=delete
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
virtual SwPaMItem * Clone(SfxItemPool *pPool=nullptr) const override
Definition: uiitems.cxx:266
SwPaM * m_pPaM
Definition: uiitems.hxx:95
SwPaMItem(const sal_uInt16 nId, SwPaM *pPaM)
Definition: uiitems.cxx:260
SwPaM * GetValue() const
Definition: uiitems.hxx:103
virtual bool operator==(const SfxPoolItem &) const override
Definition: uiitems.cxx:271
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
SwPageFootnoteInfo & GetPageFootnoteInfo()
Definition: uiitems.hxx:57
SwPageFootnoteInfoItem(SwPageFootnoteInfoItem const &)=default
SwPageFootnoteInfoItem(SwPageFootnoteInfoItem &&)=default
SwPageFootnoteInfo m_aFootnoteInfo
Definition: uiitems.hxx:34
const SwPageFootnoteInfo & GetPageFootnoteInfo() const
Definition: uiitems.hxx:58
Footnote information.
Definition: pagedesc.hxx:49
void * GetValue() const
Definition: uiitems.hxx:71
void * m_pMisc
Definition: uiitems.hxx:63
const SwNumRule * GetNumRule() const
Definition: uiitems.hxx:89
SwNumRule * GetNumRule()
Definition: uiitems.hxx:90
std::unique_ptr< SwNumRule > m_pRule
Definition: uiitems.hxx:76
MapUnit
SfxItemPresentation
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
unsigned char sal_uInt8