Coverage Report

Created: 2026-08-14 10:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sc/inc/Sparkline.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
 */
10
11
#pragma once
12
13
#include "scdllapi.h"
14
#include "rangelst.hxx"
15
#include <memory>
16
#include <utility>
17
18
namespace sc
19
{
20
class SparklineGroup;
21
22
/** Sparkline data, used for rendering the content of a cell
23
 *
24
 * Contains the input range of the data that is being drawn and a reference
25
 * to the SparklineGroup, which includes common properties of multiple
26
 * sparklines.
27
 */
28
class SC_DLLPUBLIC Sparkline
29
{
30
    SCCOL m_nColumn;
31
    SCROW m_nRow;
32
33
    ScRangeList m_aInputRange;
34
    std::shared_ptr<SparklineGroup> m_pSparklineGroup;
35
36
public:
37
    Sparkline(SCCOL nColumn, SCROW nRow, std::shared_ptr<SparklineGroup> pSparklineGroup)
38
12
        : m_nColumn(nColumn)
39
12
        , m_nRow(nRow)
40
12
        , m_pSparklineGroup(std::move(pSparklineGroup))
41
12
    {
42
12
    }
43
44
    Sparkline(const Sparkline&) = delete;
45
    Sparkline& operator=(const Sparkline&) = delete;
46
47
12
    void setInputRange(ScRangeList const& rInputRange) { m_aInputRange = rInputRange; }
48
49
0
    ScRangeList const& getInputRange() const { return m_aInputRange; }
50
51
12
    std::shared_ptr<SparklineGroup> const& getSparklineGroup() const { return m_pSparklineGroup; }
52
53
0
    SCCOL getColumn() const { return m_nColumn; }
54
55
0
    SCROW getRow() const { return m_nRow; }
56
};
57
58
} // end sc
59
60
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */