bump product version to 6.3.0.0.beta1
[LibreOffice.git] / oox / inc / drawingml / chart / seriesmodel.hxx
blobd2fa53a5e50c26dd31001e87fe15501753a1a2d9
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 {
27 namespace drawingml {
28 namespace chart {
30 struct DataLabelModelBase
32 typedef ModelRef< Shape > ShapeRef;
33 typedef ModelRef< TextBody > TextBodyRef;
35 ShapeRef mxShapeProp; /// Data label frame formatting.
36 TextBodyRef mxTextProp; /// Data label text formatting.
37 NumberFormat maNumberFormat; /// Number format for numeric data labels.
38 OptValue< OUString > moaSeparator;/// Separator between label components.
39 OptValue< sal_Int32 > monLabelPos; /// Data label position.
40 OptValue< bool > mobShowBubbleSize; /// True = show size of bubbles in bubble charts.
41 OptValue< bool > mobShowCatName; /// True = show category name of data points.
42 OptValue< bool > mobShowLegendKey; /// True = show legend key of data series.
43 OptValue< bool > mobShowPercent; /// True = show percentual value in pie/doughnut charts.
44 OptValue< bool > mobShowSerName; /// True = show series name.
45 OptValue< bool > mobShowVal; /// True = show data point value.
46 bool mbDeleted; /// True = data label(s) deleted.
48 explicit DataLabelModelBase(bool bMSO2007Doc);
49 ~DataLabelModelBase();
52 struct DataLabelModel : public DataLabelModelBase
54 typedef ModelRef< LayoutModel > LayoutRef;
55 typedef ModelRef< TextModel > TextRef;
57 LayoutRef mxLayout; /// Layout/position of the data point label frame.
58 TextRef mxText; /// Manual or linked text for this data point label.
59 sal_Int32 mnIndex; /// Data point index for this data label.
61 explicit DataLabelModel(bool bMSO2007Doc);
62 ~DataLabelModel();
65 struct DataLabelsModel : public DataLabelModelBase
67 typedef ModelVector< DataLabelModel > DataLabelVector;
68 typedef ModelRef< Shape > ShapeRef;
70 DataLabelVector maPointLabels; /// Settings for individual data point labels.
71 ShapeRef mxLeaderLines; /// Formatting of connector lines between data points and labels.
72 bool mbShowLeaderLines; /// True = show connector lines between data points and labels.
74 explicit DataLabelsModel(bool bMSO2007Doc);
75 ~DataLabelsModel();
78 struct PictureOptionsModel
80 double mfStackUnit; /// Bitmap stacking unit.
81 sal_Int32 mnPictureFormat; /// Bitmap mode (stretch/tile).
82 bool mbApplyToFront; /// True = draw picture at front/back side of 3D data points.
83 bool mbApplyToSides; /// True = draw picture at left/right side of 3D data points.
84 bool mbApplyToEnd; /// True = draw picture at top/bottom side of 3D data points.
86 explicit PictureOptionsModel(bool bMSO2007Doc);
87 ~PictureOptionsModel();
90 struct ErrorBarModel
92 enum SourceType
94 PLUS, /// Plus error bar values.
95 MINUS /// Minus error bar values.
98 typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
99 typedef ModelRef< Shape > ShapeRef;
101 DataSourceMap maSources; /// Source ranges for manual error bar values.
102 ShapeRef mxShapeProp; /// Error line formatting.
103 double mfValue; /// Fixed value for several error bar types.
104 sal_Int32 mnDirection; /// Direction of the error bars (x/y).
105 sal_Int32 mnTypeId; /// Type of the error bars (plus/minus/both).
106 sal_Int32 mnValueType; /// Type of the values.
107 bool mbNoEndCap; /// True = no end cap at error bar lines.
109 explicit ErrorBarModel(bool bMSO2007Doc);
110 ~ErrorBarModel();
113 struct TrendlineLabelModel
115 typedef ModelRef< Shape > ShapeRef;
116 typedef ModelRef< TextBody > TextBodyRef;
117 typedef ModelRef< LayoutModel > LayoutRef;
118 typedef ModelRef< TextModel > TextRef;
120 ShapeRef mxShapeProp; /// Label frame formatting.
121 TextBodyRef mxTextProp; /// Label text formatting.
122 LayoutRef mxLayout; /// Layout/position of the frame.
123 TextRef mxText; /// Text source of the label.
124 NumberFormat maNumberFormat; /// Number format for coefficients.
126 explicit TrendlineLabelModel();
127 ~TrendlineLabelModel();
130 struct TrendlineModel
132 typedef ModelRef< Shape > ShapeRef;
133 typedef ModelRef< TrendlineLabelModel > TrendlineLabelRef;
135 ShapeRef mxShapeProp; /// Trendline formatting.
136 TrendlineLabelRef mxLabel; /// Trendline label text object.
137 OUString maName; /// User-defined name of the trendline.
138 OptValue< double > mfBackward; /// Size of trendline before first data point.
139 OptValue< double > mfForward; /// Size of trendline behind last data point.
140 OptValue< double > mfIntercept; /// Crossing point with Y axis.
141 sal_Int32 mnOrder; /// Polynomial order in range [2, 6].
142 sal_Int32 mnPeriod; /// Moving average period in range [2, 255].
143 sal_Int32 mnTypeId; /// Type of the trendline.
144 bool mbDispEquation; /// True = show equation of the trendline.
145 bool mbDispRSquared; /// True = show R-squared of the trendline.
147 explicit TrendlineModel(bool bMSO2007Doc);
148 ~TrendlineModel();
151 struct DataPointModel
153 typedef ModelRef< Shape > ShapeRef;
154 typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
156 ShapeRef mxShapeProp; /// Data point formatting.
157 PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
158 ShapeRef mxMarkerProp; /// Data point marker formatting.
159 OptValue< sal_Int32 > monExplosion; /// Pie slice moved from pie center.
160 OptValue< sal_Int32 > monMarkerSize; /// Size of the series line marker (2...72).
161 OptValue< sal_Int32 > monMarkerSymbol; /// Series line marker symbol.
162 OptValue< bool > mobBubble3d; /// True = show bubbles with 3D shade.
163 sal_Int32 mnIndex; /// Unique data point index.
164 bool mbInvertNeg; /// True = invert negative data points (not derived from series!).
166 explicit DataPointModel(bool bMSO2007Doc);
167 ~DataPointModel();
170 struct SeriesModel
172 enum SourceType
174 CATEGORIES, /// Data point categories.
175 VALUES, /// Data point values.
176 POINTS /// Data point size (e.g. bubble size in bubble charts).
179 typedef ModelMap< SourceType, DataSourceModel > DataSourceMap;
180 typedef ModelVector< ErrorBarModel > ErrorBarVector;
181 typedef ModelVector< TrendlineModel > TrendlineVector;
182 typedef ModelVector< DataPointModel > DataPointVector;
183 typedef ModelRef< Shape > ShapeRef;
184 typedef ModelRef< PictureOptionsModel > PictureOptionsRef;
185 typedef ModelRef< TextModel > TextRef;
186 typedef ModelRef< DataLabelsModel > DataLabelsRef;
188 DataSourceMap maSources; /// Series source ranges.
189 ErrorBarVector maErrorBars; /// All error bars of this series.
190 TrendlineVector maTrendlines; /// All trendlines of this series.
191 DataPointVector maPoints; /// Explicit formatted data points.
192 ShapeRef mxShapeProp; /// Series formatting.
193 PictureOptionsRef mxPicOptions; /// Fill bitmap settings.
194 ShapeRef mxMarkerProp; /// Data point marker formatting.
195 TextRef mxText; /// Series title source.
196 DataLabelsRef mxLabels; /// Data point label settings for all points.
197 OptValue< sal_Int32 > monShape; /// 3D bar shape type.
198 sal_Int32 mnExplosion; /// Pie slice moved from pie center.
199 sal_Int32 mnIndex; /// Series index used for automatic formatting.
200 sal_Int32 mnMarkerSize; /// Size of the series line marker (2...72).
201 sal_Int32 mnMarkerSymbol; /// Series line marker symbol.
202 sal_Int32 mnOrder; /// Series order.
203 bool mbBubble3d; /// True = show bubbles with 3D shade.
204 bool mbInvertNeg; /// True = invert negative data points.
205 bool mbSmooth; /// True = smooth series line.
207 explicit SeriesModel(bool bMSO2007Doc);
208 ~SeriesModel();
211 } // namespace chart
212 } // namespace drawingml
213 } // namespace oox
215 #endif
217 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */