merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / model / main / Axis.hxx
blob1a0a1d9a5fef196cbad7286a02903f63bf5a1b72
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Axis.hxx,v $
10 * $Revision: 1.9 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART_AXIS_HXX
31 #define CHART_AXIS_HXX
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include "MutexContainer.hxx"
35 #include "OPropertySet.hxx"
36 #include <cppuhelper/implbase6.hxx>
37 #include <comphelper/uno3.hxx>
39 #include "ServiceMacros.hxx"
40 #include "ModifyListenerHelper.hxx"
41 #include <com/sun/star/lang/XServiceInfo.hpp>
42 #include <com/sun/star/chart2/XAxis.hpp>
43 #include <com/sun/star/chart2/XTitled.hpp>
44 #include <com/sun/star/util/XCloneable.hpp>
45 #include <com/sun/star/util/XModifyBroadcaster.hpp>
46 #include <com/sun/star/util/XModifyListener.hpp>
48 namespace chart
51 namespace impl
53 typedef ::cppu::WeakImplHelper6<
54 ::com::sun::star::chart2::XAxis,
55 ::com::sun::star::chart2::XTitled,
56 ::com::sun::star::lang::XServiceInfo,
57 ::com::sun::star::util::XCloneable,
58 ::com::sun::star::util::XModifyBroadcaster,
59 ::com::sun::star::util::XModifyListener >
60 Axis_Base;
63 class Axis :
64 public MutexContainer,
65 public impl::Axis_Base,
66 public ::property::OPropertySet
68 public:
69 Axis( ::com::sun::star::uno::Reference<
70 ::com::sun::star::uno::XComponentContext > const & xContext );
71 virtual ~Axis();
73 /// establish methods for factory instatiation
74 APPHELPER_SERVICE_FACTORY_HELPER( Axis )
75 /// XServiceInfo declarations
76 APPHELPER_XSERVICEINFO_DECL()
78 /// merge XInterface implementations
79 DECLARE_XINTERFACE()
80 /// merge XTypeProvider implementations
81 DECLARE_XTYPEPROVIDER()
83 protected:
84 explicit Axis( const Axis & rOther );
86 // late initialization to call after copy-constructing
87 void Init( const Axis & rOther );
89 // ____ OPropertySet ____
90 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
91 throw(::com::sun::star::beans::UnknownPropertyException);
93 // ____ OPropertySet ____
94 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
96 // ____ XPropertySet ____
97 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
98 getPropertySetInfo()
99 throw (::com::sun::star::uno::RuntimeException);
101 // virtual sal_Bool SAL_CALL convertFastPropertyValue
102 // ( ::com::sun::star::uno::Any & rConvertedValue,
103 // ::com::sun::star::uno::Any & rOldValue,
104 // sal_Int32 nHandle,
105 // const ::com::sun::star::uno::Any& rValue )
106 // throw (::com::sun::star::lang::IllegalArgumentException);
108 // ____ XAxis ____
109 virtual void SAL_CALL setScaleData( const ::com::sun::star::chart2::ScaleData& rScaleData )
110 throw (::com::sun::star::uno::RuntimeException);
111 virtual ::com::sun::star::chart2::ScaleData SAL_CALL getScaleData()
112 throw (::com::sun::star::uno::RuntimeException);
113 virtual ::com::sun::star::uno::Reference<
114 ::com::sun::star::beans::XPropertySet > SAL_CALL getGridProperties()
115 throw (::com::sun::star::uno::RuntimeException);
116 virtual ::com::sun::star::uno::Sequence<
117 ::com::sun::star::uno::Reference<
118 ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubGridProperties()
119 throw (::com::sun::star::uno::RuntimeException);
120 virtual ::com::sun::star::uno::Sequence<
121 ::com::sun::star::uno::Reference<
122 ::com::sun::star::beans::XPropertySet > > SAL_CALL getSubTickProperties()
123 throw (::com::sun::star::uno::RuntimeException);
125 // ____ XTitled ____
126 virtual ::com::sun::star::uno::Reference<
127 ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
128 throw (::com::sun::star::uno::RuntimeException);
129 virtual void SAL_CALL setTitleObject(
130 const ::com::sun::star::uno::Reference<
131 ::com::sun::star::chart2::XTitle >& Title )
132 throw (::com::sun::star::uno::RuntimeException);
134 // ____ XCloneable ____
135 // Note: the coordinate systems are not cloned!
136 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
137 throw (::com::sun::star::uno::RuntimeException);
139 // ____ XModifyBroadcaster ____
140 virtual void SAL_CALL addModifyListener(
141 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
142 throw (::com::sun::star::uno::RuntimeException);
143 virtual void SAL_CALL removeModifyListener(
144 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
145 throw (::com::sun::star::uno::RuntimeException);
147 // ____ XModifyListener ____
148 virtual void SAL_CALL modified(
149 const ::com::sun::star::lang::EventObject& aEvent )
150 throw (::com::sun::star::uno::RuntimeException);
152 // ____ XEventListener (base of XModifyListener) ____
153 virtual void SAL_CALL disposing(
154 const ::com::sun::star::lang::EventObject& Source )
155 throw (::com::sun::star::uno::RuntimeException);
157 // ____ OPropertySet ____
158 virtual void firePropertyChangeEvent();
159 using OPropertySet::disposing;
161 void fireModifyEvent();
163 private: //methods
164 void AllocateSubGrids();
166 private: //member
168 ::com::sun::star::uno::Reference<
169 ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
171 ::com::sun::star::chart2::ScaleData m_aScaleData;
173 ::com::sun::star::uno::Reference<
174 ::com::sun::star::beans::XPropertySet > m_xGrid;
176 ::com::sun::star::uno::Sequence<
177 ::com::sun::star::uno::Reference<
178 ::com::sun::star::beans::XPropertySet > > m_aSubGridProperties;
180 ::com::sun::star::uno::Reference<
181 ::com::sun::star::chart2::XTitle > m_xTitle;
184 } // namespace chart
186 // CHART_AXIS_HXX
187 #endif