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 
27 class SwNumRule;
28 class IntlWrapper;
29 class SwPaM;
30 
31 // container for FootNote
33 {
35 
36 public:
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 SfxPoolItem* 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 aFootnoteInfo; }
58  const SwPageFootnoteInfo& GetPageFootnoteInfo() const { return aFootnoteInfo; }
59 };
60 
62 {
63  void* const pMisc;
64 
65 public:
66  SwPtrItem( const sal_uInt16 nId, void* pPtr);
67 
68  virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
69  virtual bool operator==( const SfxPoolItem& ) const override;
70 
71  void* GetValue() const { return pMisc; }
72 };
73 
75 {
76  std::unique_ptr<SwNumRule> pRule;
77 
78 public:
79  SwUINumRuleItem( const SwNumRule& rRule );
80  SwUINumRuleItem( const SwUINumRuleItem& rItem );
81  virtual ~SwUINumRuleItem() override;
82 
83  virtual SfxPoolItem* 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 pRule.get(); }
90  SwNumRule* GetNumRule() { return pRule.get(); }
91 };
92 
94 {
95  SwPaM* const m_pPaM;
96 
97 public:
98  SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM);
99 
100  virtual SfxPoolItem* 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 operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
SfxPoolItem & operator=(const SfxPoolItem &)=delete
void *const pMisc
Definition: uiitems.hxx:63
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
const SwPageFootnoteInfo & GetPageFootnoteInfo() const
Definition: uiitems.hxx:58
SwPageFootnoteInfo aFootnoteInfo
Definition: uiitems.hxx:34
SfxItemPresentation
std::unique_ptr< SwNumRule > pRule
Definition: uiitems.hxx:76
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
Footnote information.
Definition: pagedesc.hxx:47
virtual bool GetPresentation(SfxItemPresentation ePresentation, MapUnit eCoreMetric, MapUnit ePresentationMetric, OUString &rText, const IntlWrapper &rIntlWrapper) const
unsigned char sal_uInt8
SwPaM *const m_pPaM
Definition: uiitems.hxx:95
SwPaM * GetValue() const
Definition: uiitems.hxx:103
MapUnit
void * GetValue() const
Definition: uiitems.hxx:71
SwNumRule * GetNumRule()
Definition: uiitems.hxx:90
SwPageFootnoteInfo & GetPageFootnoteInfo()
Definition: uiitems.hxx:57
const SwNumRule * GetNumRule() const
Definition: uiitems.hxx:89