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_AXISCONTEXT_HXX
25 #define OOX_DRAWINGML_CHART_AXISCONTEXT_HXX
26 
27 #include "oox/drawingml/chart/chartcontextbase.hxx"
28 
29 namespace oox {
30 namespace drawingml {
31 namespace chart {
32 
33 // ============================================================================
34 
35 struct AxisDispUnitsModel;
36 
37 /** Handler for a value axis display units context (c:dispUnits element).
38  */
39 class AxisDispUnitsContext : public ContextBase< AxisDispUnitsModel >
40 {
41 public:
42     explicit            AxisDispUnitsContext( ::oox::core::ContextHandler2Helper& rParent, AxisDispUnitsModel& rModel );
43     virtual             ~AxisDispUnitsContext();
44 
45     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
46 };
47 
48 // ============================================================================
49 
50 struct AxisModel;
51 
52 /** Base class for axis context handlers (c:catAx, c:dateAx, c:serAx, c:valAx
53     elements).
54  */
55 class AxisContextBase : public ContextBase< AxisModel >
56 {
57 public:
58     explicit            AxisContextBase( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
59     virtual             ~AxisContextBase();
60 
61     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
62 };
63 
64 // ============================================================================
65 
66 /** Handler for a category axis context (c:catAx element).
67  */
68 class CatAxisContext : public AxisContextBase
69 {
70 public:
71     explicit            CatAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
72     virtual             ~CatAxisContext();
73 
74     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
75 };
76 
77 // ============================================================================
78 
79 /** Handler for a date axis context (c:dateAx element).
80  */
81 class DateAxisContext : public AxisContextBase
82 {
83 public:
84     explicit            DateAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
85     virtual             ~DateAxisContext();
86 
87     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
88 };
89 
90 // ============================================================================
91 
92 /** Handler for a series axis context (c:serAx element).
93  */
94 class SerAxisContext : public AxisContextBase
95 {
96 public:
97     explicit            SerAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
98     virtual             ~SerAxisContext();
99 
100     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
101 };
102 
103 // ============================================================================
104 
105 /** Handler for a value axis context (c:valAx element).
106  */
107 class ValAxisContext : public AxisContextBase
108 {
109 public:
110     explicit            ValAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
111     virtual             ~ValAxisContext();
112 
113     virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
114 };
115 
116 // ============================================================================
117 
118 } // namespace chart
119 } // namespace drawingml
120 } // namespace oox
121 
122 #endif
123