1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_SERIESCONTEXT_HXX
21 #define INCLUDED_OOX_DRAWINGML_CHART_SERIESCONTEXT_HXX
23 #include <drawingml/chart/chartcontextbase.hxx>
25 namespace oox::drawingml::chart
{
28 struct DataLabelModel
;
30 /** Handler for a chart data point label context (c:dLbl element).
32 class DataLabelContext final
: public ContextBase
< DataLabelModel
>
35 explicit DataLabelContext( ::oox::core::ContextHandler2Helper
& rParent
, DataLabelModel
& rModel
);
36 virtual ~DataLabelContext() override
;
38 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
39 virtual void onCharacters( const OUString
& rChars
) override
;
43 struct DataLabelsModel
;
45 /** Handler for a chart data point label context (c:dLbls element).
47 class DataLabelsContext final
: public ContextBase
< DataLabelsModel
>
50 explicit DataLabelsContext( ::oox::core::ContextHandler2Helper
& rParent
, DataLabelsModel
& rModel
);
51 virtual ~DataLabelsContext() override
;
53 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
54 virtual void onCharacters( const OUString
& rChars
) override
;
58 struct PictureOptionsModel
;
60 /** Handler for fill bitmap settings (c:pictureOptions element).
62 class PictureOptionsContext final
: public ContextBase
< PictureOptionsModel
>
65 explicit PictureOptionsContext( ::oox::core::ContextHandler2Helper
& rParent
, PictureOptionsModel
& rModel
);
66 virtual ~PictureOptionsContext() override
;
68 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
74 /** Handler for a series error bar context (c:errBars element).
76 class ErrorBarContext final
: public ContextBase
< ErrorBarModel
>
79 explicit ErrorBarContext( ::oox::core::ContextHandler2Helper
& rParent
, ErrorBarModel
& rModel
);
80 virtual ~ErrorBarContext() override
;
82 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
86 struct TrendlineLabelModel
;
88 /** Handler for a series trendline label context (c:trendlineLbl element).
90 class TrendlineLabelContext final
: public ContextBase
< TrendlineLabelModel
>
93 explicit TrendlineLabelContext( ::oox::core::ContextHandler2Helper
& rParent
, TrendlineLabelModel
& rModel
);
94 virtual ~TrendlineLabelContext() override
;
96 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
100 struct TrendlineModel
;
102 /** Handler for a series trendline context (c:trendline element).
104 class TrendlineContext final
: public ContextBase
< TrendlineModel
>
107 explicit TrendlineContext( ::oox::core::ContextHandler2Helper
& rParent
, TrendlineModel
& rModel
);
108 virtual ~TrendlineContext() override
;
110 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
111 virtual void onCharacters( const OUString
& rChars
) override
;
115 struct DataPointModel
;
117 /** Handler for a chart data point context (c:dPt element).
119 class DataPointContext final
: public ContextBase
< DataPointModel
>
122 explicit DataPointContext( ::oox::core::ContextHandler2Helper
& rParent
, DataPointModel
& rModel
);
123 virtual ~DataPointContext() override
;
125 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
131 /** Handler base class for chart data series contexts (c:ser element).
133 class SeriesContextBase
: public ContextBase
< SeriesModel
>
136 explicit SeriesContextBase( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
137 virtual ~SeriesContextBase() override
;
139 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
143 /** Handler for a data series context for area chart types (c:ser element).
145 class AreaSeriesContext final
: public SeriesContextBase
148 explicit AreaSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
149 virtual ~AreaSeriesContext() override
;
151 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
155 /** Handler for a data series context for bar chart types (c:ser element).
157 class BarSeriesContext final
: public SeriesContextBase
160 explicit BarSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
161 virtual ~BarSeriesContext() override
;
163 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
167 /** Handler for a data series context for bubble chart types (c:ser element).
169 class BubbleSeriesContext final
: public SeriesContextBase
172 explicit BubbleSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
173 virtual ~BubbleSeriesContext() override
;
175 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
179 /** Handler for a data series context for line and stock chart types (c:ser
182 class LineSeriesContext final
: public SeriesContextBase
185 explicit LineSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
186 virtual ~LineSeriesContext() override
;
188 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
192 /** Handler for a data series context for pie and doughnut chart types (c:ser
195 class PieSeriesContext final
: public SeriesContextBase
198 explicit PieSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
199 virtual ~PieSeriesContext() override
;
201 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
205 /** Handler for a data series context for radar chart types (c:ser element).
207 class RadarSeriesContext final
: public SeriesContextBase
210 explicit RadarSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
211 virtual ~RadarSeriesContext() override
;
213 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
217 /** Handler for a data series context for scatter chart types (c:ser element).
219 class ScatterSeriesContext final
: public SeriesContextBase
222 explicit ScatterSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
223 virtual ~ScatterSeriesContext() override
;
225 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
229 /** Handler for a data series context for scatter chart types (c:ser element).
231 class SurfaceSeriesContext final
: public SeriesContextBase
234 explicit SurfaceSeriesContext( ::oox::core::ContextHandler2Helper
& rParent
, SeriesModel
& rModel
);
235 virtual ~SurfaceSeriesContext() override
;
237 virtual ::oox::core::ContextHandlerRef
onCreateContext( sal_Int32 nElement
, const AttributeList
& rAttribs
) override
;
241 } // namespace oox::drawingml::chart
245 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */