Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sw/source/uibase/inc/uiitems.hxx
Line
Count
Source
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 SwPaM;
29
30
// container for FootNote
31
class SW_DLLPUBLIC SwPageFootnoteInfoItem final : public SfxPoolItem
32
{
33
    SwPageFootnoteInfo m_aFootnoteInfo;
34
35
public:
36
37
    DECLARE_ITEM_TYPE_FUNCTION(SwPageFootnoteInfoItem)
38
    SwPageFootnoteInfoItem(SwPageFootnoteInfo const & rInfo);
39
    virtual ~SwPageFootnoteInfoItem() override;
40
41
489k
    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
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
0
    SwPageFootnoteInfo& GetPageFootnoteInfo()             { return m_aFootnoteInfo; }
58
96.9k
    const SwPageFootnoteInfo& GetPageFootnoteInfo() const { return m_aFootnoteInfo; }
59
};
60
61
class SW_DLLPUBLIC SwPtrItem final : public SfxPoolItem
62
{
63
    void* m_pMisc;
64
65
public:
66
    DECLARE_ITEM_TYPE_FUNCTION(SwPtrItem)
67
    SwPtrItem( const sal_uInt16 nId, void* pPtr);
68
69
    virtual SwPtrItem*      Clone( SfxItemPool *pPool = nullptr ) const override;
70
    virtual bool            operator==( const SfxPoolItem& ) const override;
71
72
0
    void*   GetValue() const        { return m_pMisc; }
73
};
74
75
class SW_DLLPUBLIC SwUINumRuleItem final : public SfxPoolItem
76
{
77
    std::unique_ptr<SwNumRule> m_pRule;
78
79
public:
80
    DECLARE_ITEM_TYPE_FUNCTION(SwUINumRuleItem)
81
    SwUINumRuleItem( const SwNumRule& rRule );
82
    SwUINumRuleItem( const SwUINumRuleItem& rItem );
83
    virtual ~SwUINumRuleItem() override;
84
85
    virtual SwUINumRuleItem* Clone( SfxItemPool *pPool = nullptr ) const override;
86
    virtual bool            operator==( const SfxPoolItem& ) const override;
87
88
    virtual bool             QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
89
    virtual bool             PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
90
91
0
    const SwNumRule* GetNumRule() const         { return m_pRule.get(); }
92
0
          SwNumRule* GetNumRule()               { return m_pRule.get(); }
93
};
94
95
class SwPaMItem final : public SfxPoolItem
96
{
97
    SwPaM* m_pPaM;
98
99
public:
100
    DECLARE_ITEM_TYPE_FUNCTION(SwPaMItem)
101
    SwPaMItem( const sal_uInt16 nId, SwPaM* pPaM);
102
103
    virtual SwPaMItem*      Clone( SfxItemPool *pPool = nullptr ) const override;
104
    virtual bool            operator==( const SfxPoolItem& ) const override;
105
106
0
    SwPaM*   GetValue() const        { return m_pPaM; }
107
};
108
109
#endif // INCLUDED_SW_SOURCE_UIBASE_INC_UIITEMS_HXX
110
111
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */