1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX
25 #define OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX
26 
27 #include "oox/drawingml/chart/chartcontextbase.hxx"
28 
29 namespace oox {
30 namespace drawingml {
31 namespace chart {
32 
33 // ============================================================================
34 
35 struct DataLabelModel;
36 
37 /** Handler for a chart data point label context (c:dLbl element).
38  */
39 class DataLabelContext : public ContextBase< DataLabelModel >
40 {
41 public:
42     explicit            DataLabelContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelModel& rModel );
43     virtual             ~DataLabelContext();
44 
45     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
46     virtual void        onCharacters( const ::rtl::OUString& rChars );
47 };
48 
49 // ============================================================================
50 
51 struct DataLabelsModel;
52 
53 /** Handler for a chart data point label context (c:dLbl element).
54  */
55 class DataLabelsContext : public ContextBase< DataLabelsModel >
56 {
57 public:
58     explicit            DataLabelsContext( ::oox::core::ContextHandler2Helper& rParent, DataLabelsModel& rModel );
59     virtual             ~DataLabelsContext();
60 
61     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
62     virtual void        onCharacters( const ::rtl::OUString& rChars );
63 };
64 
65 // ============================================================================
66 
67 struct PictureOptionsModel;
68 
69 /** Handler for fill bitmap settings (c:pictureOptions element).
70  */
71 class PictureOptionsContext : public ContextBase< PictureOptionsModel >
72 {
73 public:
74     explicit            PictureOptionsContext( ::oox::core::ContextHandler2Helper& rParent, PictureOptionsModel& rModel );
75     virtual             ~PictureOptionsContext();
76 
77     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
78 };
79 
80 // ============================================================================
81 
82 struct ErrorBarModel;
83 
84 /** Handler for a series error bar context (c:errBars element).
85  */
86 class ErrorBarContext : public ContextBase< ErrorBarModel >
87 {
88 public:
89     explicit            ErrorBarContext( ::oox::core::ContextHandler2Helper& rParent, ErrorBarModel& rModel );
90     virtual             ~ErrorBarContext();
91 
92     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
93 };
94 
95 // ============================================================================
96 
97 struct TrendlineLabelModel;
98 
99 /** Handler for a series trendline label context (c:trendlineLbl element).
100  */
101 class TrendlineLabelContext : public ContextBase< TrendlineLabelModel >
102 {
103 public:
104     explicit            TrendlineLabelContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineLabelModel& rModel );
105     virtual             ~TrendlineLabelContext();
106 
107     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
108 };
109 
110 // ============================================================================
111 
112 struct TrendlineModel;
113 
114 /** Handler for a series trendline context (c:trendline element).
115  */
116 class TrendlineContext : public ContextBase< TrendlineModel >
117 {
118 public:
119     explicit            TrendlineContext( ::oox::core::ContextHandler2Helper& rParent, TrendlineModel& rModel );
120     virtual             ~TrendlineContext();
121 
122     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
123     virtual void        onCharacters( const ::rtl::OUString& rChars );
124 };
125 
126 // ============================================================================
127 
128 struct DataPointModel;
129 
130 /** Handler for a chart data point context (c:dPt element).
131  */
132 class DataPointContext : public ContextBase< DataPointModel >
133 {
134 public:
135     explicit            DataPointContext( ::oox::core::ContextHandler2Helper& rParent, DataPointModel& rModel );
136     virtual             ~DataPointContext();
137 
138     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
139 };
140 
141 // ============================================================================
142 
143 struct SeriesModel;
144 
145 /** Handler base class for chart data series contexts (c:ser element).
146  */
147 class SeriesContextBase : public ContextBase< SeriesModel >
148 {
149 public:
150     explicit            SeriesContextBase( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
151     virtual             ~SeriesContextBase();
152 
153     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
154 };
155 
156 // ============================================================================
157 
158 /** Handler for a data series context for area chart types (c:ser element).
159  */
160 class AreaSeriesContext : public SeriesContextBase
161 {
162 public:
163     explicit            AreaSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
164     virtual             ~AreaSeriesContext();
165 
166     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
167 };
168 
169 // ============================================================================
170 
171 /** Handler for a data series context for bar chart types (c:ser element).
172  */
173 class BarSeriesContext : public SeriesContextBase
174 {
175 public:
176     explicit            BarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
177     virtual             ~BarSeriesContext();
178 
179     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
180 };
181 
182 // ============================================================================
183 
184 /** Handler for a data series context for bubble chart types (c:ser element).
185  */
186 class BubbleSeriesContext : public SeriesContextBase
187 {
188 public:
189     explicit            BubbleSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
190     virtual             ~BubbleSeriesContext();
191 
192     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
193 };
194 
195 // ============================================================================
196 
197 /** Handler for a data series context for line and stock chart types (c:ser
198     element).
199  */
200 class LineSeriesContext : public SeriesContextBase
201 {
202 public:
203     explicit            LineSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
204     virtual             ~LineSeriesContext();
205 
206     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
207 };
208 
209 // ============================================================================
210 
211 /** Handler for a data series context for pie and doughnut chart types (c:ser
212     element).
213  */
214 class PieSeriesContext : public SeriesContextBase
215 {
216 public:
217     explicit            PieSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
218     virtual             ~PieSeriesContext();
219 
220     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
221 };
222 
223 // ============================================================================
224 
225 /** Handler for a data series context for radar chart types (c:ser element).
226  */
227 class RadarSeriesContext : public SeriesContextBase
228 {
229 public:
230     explicit            RadarSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
231     virtual             ~RadarSeriesContext();
232 
233     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
234 };
235 
236 // ============================================================================
237 
238 /** Handler for a data series context for scatter chart types (c:ser element).
239  */
240 class ScatterSeriesContext : public SeriesContextBase
241 {
242 public:
243     explicit            ScatterSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
244     virtual             ~ScatterSeriesContext();
245 
246     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
247 };
248 
249 // ============================================================================
250 
251 /** Handler for a data series context for scatter chart types (c:ser element).
252  */
253 class SurfaceSeriesContext : public SeriesContextBase
254 {
255 public:
256     explicit            SurfaceSeriesContext( ::oox::core::ContextHandler2Helper& rParent, SeriesModel& rModel );
257     virtual             ~SurfaceSeriesContext();
258 
259     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
260 };
261 
262 // ============================================================================
263 
264 } // namespace chart
265 } // namespace drawingml
266 } // namespace oox
267 
268 #endif
269