1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SOURCE_UIBASE_INC_UIITEMS_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_UIITEMS_HXX
23 #include <svl/poolitem.hxx>
25 #include <pagedesc.hxx>
31 // container for FootNote
32 class SW_DLLPUBLIC SwPageFootnoteInfoItem
: public SfxPoolItem
34 SwPageFootnoteInfo aFootnoteInfo
;
38 SwPageFootnoteInfoItem(SwPageFootnoteInfo
const & rInfo
);
39 virtual ~SwPageFootnoteInfoItem() override
;
41 SwPageFootnoteInfoItem(SwPageFootnoteInfoItem
const &) = default;
42 SwPageFootnoteInfoItem(SwPageFootnoteInfoItem
&&) = default;
43 SwPageFootnoteInfoItem
& operator =(SwPageFootnoteInfoItem
const &) = delete; // due to SfxPoolItem
44 SwPageFootnoteInfoItem
& operator =(SwPageFootnoteInfoItem
&&) = delete; // due to SfxPoolItem
46 virtual SwPageFootnoteInfoItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
47 virtual bool operator==( const SfxPoolItem
& ) const override
;
48 virtual bool GetPresentation( SfxItemPresentation ePres
,
52 const IntlWrapper
& rIntl
) const override
;
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
;
57 SwPageFootnoteInfo
& GetPageFootnoteInfo() { return aFootnoteInfo
; }
58 const SwPageFootnoteInfo
& GetPageFootnoteInfo() const { return aFootnoteInfo
; }
61 class SW_DLLPUBLIC SwPtrItem
: public SfxPoolItem
66 SwPtrItem( const sal_uInt16 nId
, void* pPtr
);
68 virtual SwPtrItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
69 virtual bool operator==( const SfxPoolItem
& ) const override
;
71 void* GetValue() const { return pMisc
; }
74 class SW_DLLPUBLIC SwUINumRuleItem
: public SfxPoolItem
76 std::unique_ptr
<SwNumRule
> pRule
;
79 SwUINumRuleItem( const SwNumRule
& rRule
);
80 SwUINumRuleItem( const SwUINumRuleItem
& rItem
);
81 virtual ~SwUINumRuleItem() override
;
83 virtual SwUINumRuleItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
84 virtual bool operator==( const SfxPoolItem
& ) const override
;
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
;
89 const SwNumRule
* GetNumRule() const { return pRule
.get(); }
90 SwNumRule
* GetNumRule() { return pRule
.get(); }
93 class SwPaMItem
: public SfxPoolItem
98 SwPaMItem( const sal_uInt16 nId
, SwPaM
* pPaM
);
100 virtual SwPaMItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
101 virtual bool operator==( const SfxPoolItem
& ) const override
;
103 SwPaM
* GetValue() const { return m_pPaM
; }
106 #endif // INCLUDED_SW_SOURCE_UIBASE_INC_UIITEMS_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */