Coverage Report

Created: 2025-12-31 10:39

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/svl/source/items/int64item.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
10
#include <svl/int64item.hxx>
11
12
SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ) :
13
0
    SfxPoolItem(nWhich), mnValue(nVal)
14
0
{
15
0
}
16
17
0
SfxInt64Item::~SfxInt64Item() {}
18
19
bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const
20
0
{
21
0
    return SfxPoolItem::operator==(rItem) && mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue;
22
0
}
23
24
bool SfxInt64Item::GetPresentation(
25
    SfxItemPresentation, MapUnit, MapUnit, OUString& rText,
26
    const IntlWrapper& /*rIntlWrapper*/ ) const
27
0
{
28
0
    rText = OUString::number(mnValue);
29
0
    return true;
30
0
}
31
32
bool SfxInt64Item::QueryValue(
33
    css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
34
0
{
35
0
    rVal <<= mnValue;
36
0
    return true;
37
0
}
38
39
bool SfxInt64Item::PutValue(
40
    const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
41
0
{
42
0
    sal_Int64 nVal;
43
44
0
    if (rVal >>= nVal)
45
0
    {
46
0
        mnValue = nVal;
47
0
        return true;
48
0
    }
49
50
0
    return false;
51
0
}
52
53
SfxInt64Item* SfxInt64Item::Clone( SfxItemPool* /*pOther*/ ) const
54
0
{
55
0
    return new SfxInt64Item(*this);
56
0
}
57
58
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */