2022-02-22 18:52:50 -06:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "scdllapi.h"
|
|
|
|
#include "rangelst.hxx"
|
|
|
|
#include <memory>
|
2022-08-05 04:21:44 -05:00
|
|
|
#include <utility>
|
2022-02-22 18:52:50 -06:00
|
|
|
|
|
|
|
namespace sc
|
|
|
|
{
|
2022-03-09 23:05:41 -06:00
|
|
|
class SparklineGroup;
|
|
|
|
|
2022-02-22 18:52:50 -06:00
|
|
|
/** Sparkline data, used for rendering the content of a cell
|
|
|
|
*
|
|
|
|
* Contains the input range of the data that is being drawn and a reference
|
2022-03-08 22:38:05 -06:00
|
|
|
* to the SparklineGroup, which includes common properties of multiple
|
2022-02-22 18:52:50 -06:00
|
|
|
* sparklines.
|
|
|
|
*/
|
|
|
|
class SC_DLLPUBLIC Sparkline
|
|
|
|
{
|
2022-03-02 02:44:08 -06:00
|
|
|
SCCOL m_nColumn;
|
|
|
|
SCROW m_nRow;
|
|
|
|
|
2022-02-22 18:52:50 -06:00
|
|
|
ScRangeList m_aInputRange;
|
|
|
|
std::shared_ptr<SparklineGroup> m_pSparklineGroup;
|
|
|
|
|
|
|
|
public:
|
2022-08-05 04:21:44 -05:00
|
|
|
Sparkline(SCCOL nColumn, SCROW nRow, std::shared_ptr<SparklineGroup> pSparklineGroup)
|
2022-03-02 02:44:08 -06:00
|
|
|
: m_nColumn(nColumn)
|
|
|
|
, m_nRow(nRow)
|
2022-08-05 04:21:44 -05:00
|
|
|
, m_pSparklineGroup(std::move(pSparklineGroup))
|
2022-03-02 02:44:08 -06:00
|
|
|
{
|
|
|
|
}
|
2022-02-22 18:52:50 -06:00
|
|
|
|
|
|
|
Sparkline(const Sparkline&) = delete;
|
|
|
|
Sparkline& operator=(const Sparkline&) = delete;
|
|
|
|
|
|
|
|
void setInputRange(ScRangeList const& rInputRange) { m_aInputRange = rInputRange; }
|
2022-03-02 02:44:08 -06:00
|
|
|
|
2022-03-18 20:39:20 -05:00
|
|
|
ScRangeList const& getInputRange() const { return m_aInputRange; }
|
2022-02-22 18:52:50 -06:00
|
|
|
|
2022-03-18 20:39:20 -05:00
|
|
|
std::shared_ptr<SparklineGroup> const& getSparklineGroup() const { return m_pSparklineGroup; }
|
2022-03-02 02:44:08 -06:00
|
|
|
|
2022-03-18 20:39:20 -05:00
|
|
|
SCCOL getColumn() const { return m_nColumn; }
|
2022-03-02 02:44:08 -06:00
|
|
|
|
2022-03-18 20:39:20 -05:00
|
|
|
SCROW getRow() const { return m_nRow; }
|
2022-03-02 02:44:08 -06:00
|
|
|
};
|
|
|
|
|
2022-02-22 18:52:50 -06:00
|
|
|
} // end sc
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|