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_TYPEGROUPCONTEXT_HXX
25 #define OOX_DRAWINGML_CHART_TYPEGROUPCONTEXT_HXX
26 
27 #include "oox/drawingml/chart/chartcontextbase.hxx"
28 
29 namespace oox {
30 namespace drawingml {
31 namespace chart {
32 
33 // ============================================================================
34 
35 struct UpDownBarsModel;
36 
37 /** Handler for an up/down bars context (c:upDownBars element).
38  */
39 class UpDownBarsContext : public ContextBase< UpDownBarsModel >
40 {
41 public:
42     explicit            UpDownBarsContext( ::oox::core::ContextHandler2Helper& rParent, UpDownBarsModel& rModel );
43     virtual             ~UpDownBarsContext();
44 
45     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
46 };
47 
48 // ============================================================================
49 
50 struct TypeGroupModel;
51 typedef ContextBase< TypeGroupModel > TypeGroupContextBase;
52 
53 // ============================================================================
54 
55 /** Handler for area type group contexts (c:area3DChart, c:areaChart elements).
56  */
57 class AreaTypeGroupContext : public TypeGroupContextBase
58 {
59 public:
60     explicit            AreaTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
61     virtual             ~AreaTypeGroupContext();
62 
63     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
64 };
65 
66 // ============================================================================
67 
68 /** Handler for bar type group contexts (c:bar3DChart, c:barChart elements).
69  */
70 class BarTypeGroupContext : public TypeGroupContextBase
71 {
72 public:
73     explicit            BarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
74     virtual             ~BarTypeGroupContext();
75 
76     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
77 };
78 
79 // ============================================================================
80 
81 /** Handler for bubble type group context (c:bubbleChart element).
82  */
83 class BubbleTypeGroupContext : public TypeGroupContextBase
84 {
85 public:
86     explicit            BubbleTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
87     virtual             ~BubbleTypeGroupContext();
88 
89     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
90 };
91 
92 // ============================================================================
93 
94 /** Handler for line type group contexts (c:line3DChart, c:lineChart,
95     c:stockChart elements).
96  */
97 class LineTypeGroupContext : public TypeGroupContextBase
98 {
99 public:
100     explicit            LineTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
101     virtual             ~LineTypeGroupContext();
102 
103     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
104 };
105 
106 // ============================================================================
107 
108 /** Handler for pie type group contexts (c:doughnutChart, c:ofPieChart,
109     c:pie3DChart, c:pieChart elements).
110  */
111 class PieTypeGroupContext : public TypeGroupContextBase
112 {
113 public:
114     explicit            PieTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
115     virtual             ~PieTypeGroupContext();
116 
117     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
118 };
119 
120 // ============================================================================
121 
122 /** Handler for radar type group context (c:radarChart element).
123  */
124 class RadarTypeGroupContext : public TypeGroupContextBase
125 {
126 public:
127     explicit            RadarTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
128     virtual             ~RadarTypeGroupContext();
129 
130     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
131 };
132 
133 // ============================================================================
134 
135 /** Handler for scatter type group context (c:scatterChart element).
136  */
137 class ScatterTypeGroupContext : public TypeGroupContextBase
138 {
139 public:
140     explicit            ScatterTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
141     virtual             ~ScatterTypeGroupContext();
142 
143     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
144 };
145 
146 // ============================================================================
147 
148 /** Handler for surface type group contexts (c:surface3DChart, c:surfaceChart
149     elements).
150  */
151 class SurfaceTypeGroupContext : public TypeGroupContextBase
152 {
153 public:
154     explicit            SurfaceTypeGroupContext( ::oox::core::ContextHandler2Helper& rParent, TypeGroupModel& rModel );
155     virtual             ~SurfaceTypeGroupContext();
156 
157     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
158 };
159 
160 // ============================================================================
161 
162 } // namespace chart
163 } // namespace drawingml
164 } // namespace oox
165 
166 #endif
167