LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / Sparkline.hxx
blob77f249428288f59076661bd8718b7291a936afcd
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 */
11 #pragma once
13 #include "scdllapi.h"
14 #include "rangelst.hxx"
15 #include <memory>
17 namespace sc
19 class SparklineGroup;
21 /** Sparkline data, used for rendering the content of a cell
23 * Contains the input range of the data that is being drawn and a reference
24 * to the SparklineGroup, which includes common properties of multiple
25 * sparklines.
27 class SC_DLLPUBLIC Sparkline
29 SCCOL m_nColumn;
30 SCROW m_nRow;
32 ScRangeList m_aInputRange;
33 std::shared_ptr<SparklineGroup> m_pSparklineGroup;
35 public:
36 Sparkline(SCCOL nColumn, SCROW nRow, std::shared_ptr<SparklineGroup> const& pSparklineGroup)
37 : m_nColumn(nColumn)
38 , m_nRow(nRow)
39 , m_pSparklineGroup(pSparklineGroup)
43 Sparkline(const Sparkline&) = delete;
44 Sparkline& operator=(const Sparkline&) = delete;
46 void setInputRange(ScRangeList const& rInputRange) { m_aInputRange = rInputRange; }
48 ScRangeList const& getInputRange() const { return m_aInputRange; }
50 std::shared_ptr<SparklineGroup> const& getSparklineGroup() const { return m_pSparklineGroup; }
52 SCCOL getColumn() const { return m_nColumn; }
54 SCROW getRow() const { return m_nRow; }
57 } // end sc
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */