Avoid potential negative array index access to cached text.
[LibreOffice.git] / sc / inc / SparklineGroup.hxx
blobc79067c1250cafc3bb8484fefe499af1ff7f1158
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 "SparklineAttributes.hxx"
15 #include <tools/color.hxx>
16 #include <tools/Guid.hxx>
17 #include <optional>
19 namespace sc
21 /** Common properties for a group of sparklines */
22 class SC_DLLPUBLIC SparklineGroup
24 private:
25 SparklineAttributes m_aAttributes;
26 tools::Guid m_aGUID;
28 public:
29 SparklineAttributes& getAttributes() { return m_aAttributes; }
30 SparklineAttributes const& getAttributes() const { return m_aAttributes; }
32 void setAttributes(SparklineAttributes const& rAttributes) { m_aAttributes = rAttributes; };
34 tools::Guid& getID() { return m_aGUID; }
36 void setID(tools::Guid const& rGuid) { m_aGUID = rGuid; }
38 SparklineGroup();
39 SparklineGroup(SparklineGroup const& pOtherSparkline);
40 SparklineGroup(SparklineAttributes aSparklineAttributes);
42 SparklineGroup& operator=(const SparklineGroup&) = delete;
45 } // end sc
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */