LibreOffice Module oox (master)  1
axiscontext.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX
21 #define INCLUDED_OOX_DRAWINGML_CHART_AXISCONTEXT_HXX
22 
24 
25 namespace oox::drawingml::chart {
26 
27 
28 struct AxisDispUnitsModel;
29 
32 class AxisDispUnitsContext final : public ContextBase< AxisDispUnitsModel >
33 {
34 public:
36  virtual ~AxisDispUnitsContext() override;
37 
38  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
39 };
40 
41 
42 struct AxisModel;
43 
47 class AxisContextBase : public ContextBase< AxisModel >
48 {
49 public:
50  explicit AxisContextBase( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
51  virtual ~AxisContextBase() override;
52 
53  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
54 };
55 
56 
59 class CatAxisContext final : public AxisContextBase
60 {
61 public:
62  explicit CatAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
63  virtual ~CatAxisContext() override;
64 
65  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
66 };
67 
68 
71 class DateAxisContext final : public AxisContextBase
72 {
73 public:
74  explicit DateAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
75  virtual ~DateAxisContext() override;
76 
77  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
78 };
79 
80 
83 class SerAxisContext final : public AxisContextBase
84 {
85 public:
86  explicit SerAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
87  virtual ~SerAxisContext() override;
88 
89  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
90 };
91 
92 
95 class ValAxisContext final : public AxisContextBase
96 {
97 public:
98  explicit ValAxisContext( ::oox::core::ContextHandler2Helper& rParent, AxisModel& rModel );
99  virtual ~ValAxisContext() override;
100 
101  virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
102 };
103 
104 
105 } // namespace oox::drawingml::chart
106 
107 #endif
108 
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
Definition: axiscontext.cxx:89
Handler for a date axis context (c:dateAx element).
Definition: axiscontext.hxx:71
CatAxisContext(::oox::core::ContextHandler2Helper &rParent, AxisModel &rModel)
DateAxisContext(::oox::core::ContextHandler2Helper &rParent, AxisModel &rModel)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
Handler for a value axis display units context (c:dispUnits element).
Definition: axiscontext.hxx:32
Handler for a category axis context (c:catAx element).
Definition: axiscontext.hxx:59
ValAxisContext(::oox::core::ContextHandler2Helper &rParent, AxisModel &rModel)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
Definition: axiscontext.cxx:45
Provides access to attribute values of an element.
Base class for axis context handlers (c:catAx, c:dateAx, c:serAx, c:valAx elements).
Definition: axiscontext.hxx:47
AxisContextBase(::oox::core::ContextHandler2Helper &rParent, AxisModel &rModel)
Definition: axiscontext.cxx:80
AxisDispUnitsContext(::oox::core::ContextHandler2Helper &rParent, AxisDispUnitsModel &rModel)
Definition: axiscontext.cxx:36
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
Handler for a value axis context (c:valAx element).
Definition: axiscontext.hxx:95
::rtl::Reference< ContextHandler > ContextHandlerRef
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
Will be called to create a context handler for the passed element.
SerAxisContext(::oox::core::ContextHandler2Helper &rParent, AxisModel &rModel)
Helper class that provides a context stack.
Handler for a series axis context (c:serAx element).
Definition: axiscontext.hxx:83