LibreOffice Module sc (master) 1
SparklineAttributes.hxx
Go to the documentation of this file.
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 <sal/types.h>
15#include <tools/color.hxx>
16#include <optional>
17#include <o3tl/cow_wrapper.hxx>
18
19namespace sc
20{
22enum class SparklineType
23{
24 Line,
25 Column,
27};
28
30enum class AxisType
31{
32 Individual, // calculate the min/max of a sparkline
33 Group, // calculate the min or max of the whole sparkline group
34 Custom // user defined
35};
36
39{
40 Span,
41 Gap,
42 Zero // empty cell equals zero
43};
44
47{
48private:
49 class Implementation;
51
52public:
59
60 bool operator==(const SparklineAttributes& rOther) const;
61 bool operator!=(const SparklineAttributes& rOther) const
62 {
63 return !(SparklineAttributes::operator==(rOther));
64 }
65
66 Color getColorSeries() const;
67 void setColorSeries(Color aColorSeries);
68
69 Color getColorNegative() const;
70 void setColorNegative(Color aColorSeries);
71
72 Color getColorAxis() const;
73 void setColorAxis(Color aColorSeries);
74
75 Color getColorMarkers() const;
76 void setColorMarkers(Color aColorSeries);
77
78 Color getColorFirst() const;
79 void setColorFirst(Color aColorSeries);
80
81 Color getColorLast() const;
82 void setColorLast(Color aColorSeries);
83
84 Color getColorHigh() const;
85 void setColorHigh(Color aColorSeries);
86
87 Color getColorLow() const;
88 void setColorLow(Color aColorSeries);
89
90 AxisType getMinAxisType() const;
91 void setMinAxisType(AxisType eAxisType);
92
93 AxisType getMaxAxisType() const;
94 void setMaxAxisType(AxisType eAxisType);
95
97 double getLineWeight() const;
98 void setLineWeight(double nWeight);
99
100 SparklineType getType() const;
101 void setType(SparklineType eType);
102
103 bool isDateAxis() const;
104 void setDateAxis(bool bValue);
105
106 DisplayEmptyCellsAs getDisplayEmptyCellsAs() const;
107 void setDisplayEmptyCellsAs(DisplayEmptyCellsAs eValue);
108
109 bool isMarkers() const;
110 void setMarkers(bool bValue);
111
112 bool isHigh() const;
113 void setHigh(bool bValue);
114
115 bool isLow() const;
116 void setLow(bool bValue);
117
118 bool isFirst() const;
119 void setFirst(bool bValue);
120
121 bool isLast() const;
122 void setLast(bool bValue);
123
124 bool isNegative() const;
125 void setNegative(bool bValue);
126
127 bool shouldDisplayXAxis() const;
128 void setDisplayXAxis(bool bValue);
129
130 bool shouldDisplayHidden() const;
131 void setDisplayHidden(bool bValue);
132
133 bool isRightToLeft() const;
134 void setRightToLeft(bool bValue);
135
136 std::optional<double> getManualMax() const;
137 void setManualMax(std::optional<double> aValue);
138
139 std::optional<double> getManualMin() const;
140 void setManualMin(std::optional<double> aValue);
141};
142
143} // end sc
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOGroup Group
struct _ADOColumn Column
Common properties for a group of sparklines.
SparklineAttributes(SparklineAttributes &&rOther)
bool operator==(const SparklineAttributes &rOther) const
SparklineAttributes & operator=(const SparklineAttributes &rOther)
SparklineAttributes(const SparklineAttributes &rOther)
SparklineAttributes & operator=(SparklineAttributes &&rOther)
o3tl::cow_wrapper< Implementation > m_aImplementation
bool operator!=(const SparklineAttributes &rOther) const
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
SparklineType
Supported sparkline types.
DisplayEmptyCellsAs
Determines how to display the empty cells.
AxisType
The method of calculating the axis min or max value.
bool getType(BSTR name, Type &type)
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518