Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/vcl/source/treelist/viewdataentry.cxx
Line
Count
Source (jump to first uncovered line)
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 <vcl/toolkit/viewdataentry.hxx>
21
22
SvViewDataEntry::SvViewDataEntry() :
23
0
    nVisPos(0),
24
0
    mbSelected(false),
25
0
    mbHighlighted(false),
26
0
    mbExpanded(false),
27
0
    mbFocused(false),
28
0
    mbSelectable(true),
29
0
    mbDragTarget(false)
30
0
{
31
0
}
32
33
SvViewDataEntry::SvViewDataEntry( const SvViewDataEntry& rData ) :
34
0
    nVisPos(rData.nVisPos),
35
0
    mbSelected(false),
36
0
    mbHighlighted(false),
37
0
    mbExpanded(rData.mbExpanded),
38
0
    mbFocused(false),
39
0
    mbSelectable(rData.mbSelectable),
40
0
    mbDragTarget(false)
41
0
{
42
0
}
43
44
SvViewDataEntry::~SvViewDataEntry()
45
0
{
46
#ifdef DBG_UTIL
47
    nVisPos = 0x12345678;
48
#endif
49
0
}
50
51
void SvViewDataEntry::SetFocus( bool bFocus )
52
0
{
53
0
    mbFocused = bFocus;
54
0
}
55
56
void SvViewDataEntry::SetSelected( bool bSelected )
57
0
{
58
0
    mbSelected = bSelected;
59
0
    mbHighlighted = bSelected;
60
0
}
61
62
void SvViewDataEntry::SetExpanded( bool bExpanded )
63
0
{
64
0
    mbExpanded = bExpanded;
65
0
}
66
67
void SvViewDataEntry::SetSelectable( bool bSelectable )
68
0
{
69
0
    mbSelectable = bSelectable;
70
0
}
71
72
void SvViewDataEntry::Init(size_t nSize)
73
0
{
74
0
    maItems.resize(nSize);
75
0
}
76
77
const SvViewDataItem& SvViewDataEntry::GetItem(size_t nPos) const
78
0
{
79
0
    return maItems[nPos];
80
0
}
81
82
SvViewDataItem& SvViewDataEntry::GetItem(size_t nPos)
83
0
{
84
0
    return maItems[nPos];
85
0
}
86
87
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */