tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / oox / inc / drawingml / chart / seriesmodel.hxx
blob4f48115676f03adc5087018e11c936e009c8b7dc
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 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX
21 #define INCLUDED_OOX_DRAWINGML_CHART_SERIESMODEL_HXX
23 #include <oox/drawingml/chart/datasourcemodel.hxx>
24 #include <drawingml/chart/titlemodel.hxx>
26 namespace oox::drawingml::chart {
28 struct DataLabelModelBase
30 typedef ModelRef< Shape > ShapeRef;
31 typedef ModelRef< TextBody > TextBodyRef;
33 ShapeRef mxShapeProp; /// Data label frame formatting.
34 TextBodyRef mxTextProp; /// Data label text formatting.
35 NumberFormat maNumberFormat; /// Number format for numeric data labels.
36 std::optional< OUString > moaSeparator;/// Separator between label components.
37 std::optional< sal_Int32 > monLabelPos; /// Data label position.
38 std::optional< bool > mobShowBubbleSize; /// True = show size of bubbles in bubble charts.
39 std::optional< bool > mobShowCatName; /// True = show category name of data points.
40 std::optional< bool > mobShowLegendKey; /// True = show legend key of data series.
41 std::optional< bool > mobShowPercent; /// True = show percentual value in pie/doughnut charts.
42 std::optional< bool > mobShowSerName; /// True = show series name.
43 std::optional< bool > mobShowVal; /// True = show data point value.
45 /// True = the value from the <c15:datalabelsRange> corresponding to the
46 /// index of this label is used as the label text.
47 std::optional< bool > mobShowDataLabelsRange;
48 bool mbDeleted; /// True = data label(s) deleted.
50 explicit DataLabelModelBase(bool bMSO2007Doc);
51 ~DataLabelModelBase();
54 struct DataLabelsModel;
56 struct DataLabelModel : public DataLabelModelBase
58 typedef ModelRef< LayoutModel > LayoutRef;
59 typedef ModelRef< TextModel > TextRef;
61 LayoutRef mxLayout; /// Layout/position of the data point label frame.
62 TextRef mxText; /// Manual or linked text for this data point label.
63 const DataLabelsModel& mrParent; /// Reference to the labels container.
64 sal_Int32 mnIndex; /// Data point index for this data label.
66 explicit DataLabelModel(const DataLabelsModel& rParent, bool bMSO2007Doc);
67 ~DataLabelModel();
70 struct DataLabelsModel : public DataLabelModelBase
72 typedef ModelVector< DataLabelModel > DataLabelVector;
73 typedef ModelRef< Shape > ShapeRef;
75 DataLabelVector maPointLabels; /// Settings for individual data point labels.
76 ShapeRef mxLeaderLines; /// Formatting of connector lines between data points and labels.
78 /// Labels source (owned by SeriesModel's DataSourceMap)
79 const DataSourceModel* mpLabelsSource;
80 bool mbShowLeaderLines; /// True = show connector lines between data points and labels.
82 explicit DataLabelsModel(bool bMSO2007Doc);
83 ~DataLabelsModel();
86 struct PictureOptionsModel
88 double mfStackUnit; /// Bitmap stacking unit.
89 sal_Int32 mnPictureFormat; /// Bitmap mode (stretch/tile).
90 bool mbApplyToFront; /// True = draw picture at front/back side of 3D data points.
91 bool mbApplyToSides; /// True = draw picture at left/right side of 3D data points.
92 bool mbApplyToEnd; /// True = draw picture at top/bottom side of 3D data points.
94 explicit PictureOptionsModel(bool bMSO2007Doc);
97 struct ErrorBarModel
99 enum SourceType
101 PLUS, /// Plus error bar values.
102 MINUS /// Minus error bar values.
105 typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
106 typedef ModelRef< Shape > ShapeRef;
108 DataSourceMap maSources; /// Source ranges for manual error bar values.
109 ShapeRef mxShapeProp; /// Error line formatting.
110 double mfValue; /// Fixed value for several error bar types.
111 sal_Int32 mnDirection; /// Direction of the error bars (x/y).
112 sal_Int32 mnTypeId; /// Type of the error bars (plus/minus/both).
113 sal_Int32 mnValueType; /// Type of the values.
114 bool mbNoEndCap; /// True = no end cap at error bar lines.
116 explicit ErrorBarModel(bool bMSO2007Doc);
117 ~ErrorBarModel();
120 struct TrendlineLabelModel
122 typedef ModelRef< Shape > ShapeRef;
123 typedef ModelRef< TextBody > TextBodyRef;
124 typedef ModelRef< LayoutModel > LayoutRef;
125 typedef ModelRef< TextModel > TextRef;
127 ShapeRef mxShapeProp; /// Label frame formatting.
128 TextBodyRef mxTextProp; /// Label text formatting.
129 LayoutRef mxLayout; /// Layout/position of the frame.
130 TextRef mxText; /// Text source of the label.
131 NumberFormat maNumberFormat; /// Number format for coefficients.
133 explicit TrendlineLabelModel();
134 ~TrendlineLabelModel();
137 struct TrendlineModel
139 typedef ModelRef< Shape > ShapeRef;
140 typedef ModelRef< TrendlineLabelModel > TrendlineLabelRef;
142 ShapeRef mxShapeProp; /// Trendline formatting.
143 TrendlineLabelRef mxLabel; /// Trendline label text object.
144 OUString maName; /// User-defined name of the trendline.
145 std::optional< double > mfBackward; /// Size of trendline before first data point.
146 std::optional< double > mfForward; /// Size of trendline behind last data point.
147 std::optional< double > mfIntercept; /// Crossing point with Y axis.
148 sal_Int32 mnOrder; /// Polynomial order in range [2, 6].
149 sal_Int32 mnPeriod; /// Moving average period in range [2, 255].
150 sal_Int32 mnTypeId; /// Type of the trendline.
151 bool mbDispEquation; /// True = show equation of the trendline.
152 bool mbDispRSquared; /// True = show R-squared of the trendline.
154 explicit TrendlineModel(bool bMSO2007Doc);
155 ~TrendlineModel();
158 struct DataPointModel
160 typedef ModelRef< Shape > ShapeRef;
161 typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
163 ShapeRef mxShapeProp; /// Data point formatting.
164 PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
165 ShapeRef mxMarkerProp; /// Data point marker formatting.
166 std::optional< sal_Int32 > monExplosion; /// Pie slice moved from pie center.
167 std::optional< sal_Int32 > monMarkerSize; /// Size of the series line marker (2...72).
168 std::optional< sal_Int32 > monMarkerSymbol; /// Series line marker symbol.
169 std::optional< bool > mobBubble3d; /// True = show bubbles with 3D shade.
170 sal_Int32 mnIndex; /// Unique data point index.
171 bool mbInvertNeg; /// True = invert negative data points (not derived from series!).
173 explicit DataPointModel(bool bMSO2007Doc);
174 ~DataPointModel();
177 struct SeriesModel
179 enum SourceType
181 CATEGORIES, /// Data point categories.
182 VALUES, /// Data point values.
183 POINTS, /// Data point size (e.g. bubble size in bubble charts).
184 DATALABELS, /// Data point labels.
187 typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
188 typedef ModelVector< ErrorBarModel > ErrorBarVector;
189 typedef ModelVector< TrendlineModel > TrendlineVector;
190 typedef ModelVector< DataPointModel > DataPointVector;
191 typedef ModelRef< Shape > ShapeRef;
192 typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
193 typedef ModelRef< TextModel > TextRef;
194 typedef ModelRef< DataLabelsModel > DataLabelsRef;
196 DataSourceMap maSources; /// Series source ranges.
197 ErrorBarVector maErrorBars; /// All error bars of this series.
198 TrendlineVector maTrendlines; /// All trendlines of this series.
199 DataPointVector maPoints; /// Explicit formatted data points.
200 ShapeRef mxShapeProp; /// Series formatting.
201 PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
202 ShapeRef mxMarkerProp; /// Data point marker formatting.
203 TextRef mxText; /// Series title source.
204 DataLabelsRef mxLabels; /// Data point label settings for all points.
205 std::optional< sal_Int32 > monShape; /// 3D bar shape type.
206 sal_Int32 mnExplosion; /// Pie slice moved from pie center.
207 sal_Int32 mnIndex; /// Series index used for automatic formatting.
208 sal_Int32 mnMarkerSize; /// Size of the series line marker (2...72).
209 sal_Int32 mnMarkerSymbol; /// Series line marker symbol.
210 sal_Int32 mnOrder; /// Series order.
211 bool mbBubble3d; /// True = show bubbles with 3D shade.
212 bool mbInvertNeg; /// True = invert negative data points.
213 bool mbSmooth; /// True = smooth series line.
215 explicit SeriesModel(bool bMSO2007Doc);
216 ~SeriesModel();
219 } // namespace oox::drawingml::chart
221 #endif
223 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */