Coverage Report

Created: 2026-05-16 09:25

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/svl/source/items/sitem.cxx
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
20
#include <sal/config.h>
21
22
#include <rtl/ustring.hxx>
23
#include <svl/itemset.hxx>
24
#include <svl/setitem.hxx>
25
#include <svl/poolitem.hxx>
26
27
SfxSetItem::SfxSetItem( sal_uInt16 which, const SfxItemSet &rSet) :
28
463k
    SfxPoolItem(which),
29
463k
    maSet(rSet)
30
463k
{
31
463k
    assert(!dynamic_cast<const SfxAllItemSet*>(&rSet) && "cannot handle SfxAllItemSet here");
32
463k
    setIsSetItem();
33
463k
}
34
35
36
SfxSetItem::SfxSetItem( sal_uInt16 which, SfxItemSet &&pS) :
37
272k
    SfxPoolItem(which),
38
272k
    maSet(pS)
39
272k
{
40
272k
    assert(!dynamic_cast<SfxAllItemSet*>(&pS) && "cannot handle SfxAllItemSet here");
41
272k
    setIsSetItem();
42
272k
}
43
44
45
SfxSetItem::SfxSetItem( const SfxSetItem& rCopy, SfxItemPool *pPool ) :
46
1.13M
    SfxPoolItem(rCopy),
47
1.13M
    maSet(rCopy.maSet.CloneAsValue(true, pPool))
48
1.13M
{
49
1.13M
    assert(!dynamic_cast<const SfxAllItemSet*>(&rCopy.maSet) && "cannot handle SfxAllItemSet here");
50
1.13M
    setIsSetItem();
51
1.13M
}
52
53
54
bool SfxSetItem::operator==( const SfxPoolItem& rCmp) const
55
3.43M
{
56
3.43M
    assert(SfxPoolItem::operator==(rCmp));
57
3.43M
    return maSet == static_cast<const SfxSetItem &>(rCmp).maSet;
58
3.43M
}
59
60
61
bool SfxSetItem::GetPresentation
62
(
63
    SfxItemPresentation    /*ePresentation*/,
64
    MapUnit                /*eCoreMetric*/,
65
    MapUnit                /*ePresentationMetric*/,
66
    OUString&              /*rText*/,
67
    const IntlWrapper&
68
)   const
69
0
{
70
0
    return false;
71
0
}
72
73
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */