Branch data Line data Source code
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 : : #ifndef CHART_AXIS_HXX
20 : : #define CHART_AXIS_HXX
21 : :
22 : : #include <com/sun/star/uno/XComponentContext.hpp>
23 : : #include "MutexContainer.hxx"
24 : : #include "OPropertySet.hxx"
25 : : #include <cppuhelper/implbase6.hxx>
26 : : #include <comphelper/uno3.hxx>
27 : :
28 : : #include "ServiceMacros.hxx"
29 : : #include "ModifyListenerHelper.hxx"
30 : : #include <com/sun/star/lang/XServiceInfo.hpp>
31 : : #include <com/sun/star/chart2/XAxis.hpp>
32 : : #include <com/sun/star/chart2/XTitled.hpp>
33 : : #include <com/sun/star/util/XCloneable.hpp>
34 : : #include <com/sun/star/util/XModifyBroadcaster.hpp>
35 : : #include <com/sun/star/util/XModifyListener.hpp>
36 : :
37 : : namespace chart
38 : : {
39 : :
40 : : namespace impl
41 : : {
42 : : typedef ::cppu::WeakImplHelper6<
43 : : ::com::sun::star::chart2::XAxis,
44 : : ::com::sun::star::chart2::XTitled,
45 : : ::com::sun::star::lang::XServiceInfo,
46 : : ::com::sun::star::util::XCloneable,
47 : : ::com::sun::star::util::XModifyBroadcaster,
48 : : ::com::sun::star::util::XModifyListener >
49 : : Axis_Base;
50 : : }
51 : :
52 : : class Axis :
53 : : public MutexContainer,
54 : : public impl::Axis_Base,
55 : : public ::property::OPropertySet
56 : : {
57 : : public:
58 : : Axis( ::com::sun::star::uno::Reference<
59 : : ::com::sun::star::uno::XComponentContext > const & xContext );
60 : : virtual ~Axis();
61 : :
62 : : /// establish methods for factory instatiation
63 [ + - ][ + - ]: 16 : APPHELPER_SERVICE_FACTORY_HELPER( Axis )
64 : : /// XServiceInfo declarations
65 : : APPHELPER_XSERVICEINFO_DECL()
66 : :
67 : : /// merge XInterface implementations
68 : : DECLARE_XINTERFACE()
69 : : /// merge XTypeProvider implementations
70 : : DECLARE_XTYPEPROVIDER()
71 : :
72 : : protected:
73 : : explicit Axis( const Axis & rOther );
74 : :
75 : : // late initialization to call after copy-constructing
76 : : void Init( const Axis & rOther );
77 : :
78 : : // ____ OPropertySet ____
79 : : virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
80 : : throw(::com::sun::star::beans::UnknownPropertyException);
81 : :
82 : : // ____ OPropertySet ____
83 : : virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
84 : :
85 : : // ____ XPropertySet ____
86 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
87 : : getPropertySetInfo()
88 : : throw (::com::sun::star::uno::RuntimeException);
89 : :
90 : : // ____ XAxis ____
91 : : virtual void SAL_CALL setScaleData( const ::com::sun::star::chart2::ScaleData& rScaleData )
92 : : throw (::com::sun::star::uno::RuntimeException);
93 : : virtual ::com::sun::star::chart2::ScaleData SAL_CALL getScaleData()
94 : : throw (::com::sun::star::uno::RuntimeException);
95 : : virtual ::com::sun::star::uno::Reference<
96 : : ::com::sun::star::beans::XPropertySet > SAL_CALL getGridProperties()
97 : : throw (::com::sun::star::uno::RuntimeException);
98 : : virtual ::com::sun::star::uno::Sequence<
99 : : ::com::sun::star::uno::Reference<
100 : : ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubGridProperties()
101 : : throw (::com::sun::star::uno::RuntimeException);
102 : : virtual ::com::sun::star::uno::Sequence<
103 : : ::com::sun::star::uno::Reference<
104 : : ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubTickProperties()
105 : : throw (::com::sun::star::uno::RuntimeException);
106 : :
107 : : // ____ XTitled ____
108 : : virtual ::com::sun::star::uno::Reference<
109 : : ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
110 : : throw (::com::sun::star::uno::RuntimeException);
111 : : virtual void SAL_CALL setTitleObject(
112 : : const ::com::sun::star::uno::Reference<
113 : : ::com::sun::star::chart2::XTitle >& Title )
114 : : throw (::com::sun::star::uno::RuntimeException);
115 : :
116 : : // ____ XCloneable ____
117 : : // Note: the coordinate systems are not cloned!
118 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
119 : : throw (::com::sun::star::uno::RuntimeException);
120 : :
121 : : // ____ XModifyBroadcaster ____
122 : : virtual void SAL_CALL addModifyListener(
123 : : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
124 : : throw (::com::sun::star::uno::RuntimeException);
125 : : virtual void SAL_CALL removeModifyListener(
126 : : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
127 : : throw (::com::sun::star::uno::RuntimeException);
128 : :
129 : : // ____ XModifyListener ____
130 : : virtual void SAL_CALL modified(
131 : : const ::com::sun::star::lang::EventObject& aEvent )
132 : : throw (::com::sun::star::uno::RuntimeException);
133 : :
134 : : // ____ XEventListener (base of XModifyListener) ____
135 : : virtual void SAL_CALL disposing(
136 : : const ::com::sun::star::lang::EventObject& Source )
137 : : throw (::com::sun::star::uno::RuntimeException);
138 : :
139 : : // ____ OPropertySet ____
140 : : virtual void firePropertyChangeEvent();
141 : : using OPropertySet::disposing;
142 : :
143 : : void fireModifyEvent();
144 : :
145 : : private: //methods
146 : : void AllocateSubGrids();
147 : :
148 : : private: //member
149 : :
150 : : ::com::sun::star::uno::Reference<
151 : : ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
152 : :
153 : : ::com::sun::star::chart2::ScaleData m_aScaleData;
154 : :
155 : : ::com::sun::star::uno::Reference<
156 : : ::com::sun::star::beans::XPropertySet > m_xGrid;
157 : :
158 : : ::com::sun::star::uno::Sequence<
159 : : ::com::sun::star::uno::Reference<
160 : : ::com::sun::star::beans::XPropertySet > > m_aSubGridProperties;
161 : :
162 : : ::com::sun::star::uno::Reference<
163 : : ::com::sun::star::chart2::XTitle > m_xTitle;
164 : : };
165 : :
166 : : } // namespace chart
167 : :
168 : : // CHART_AXIS_HXX
169 : : #endif
170 : :
171 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|