1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART_AXIS_HXX
28 #define CHART_AXIS_HXX
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include "MutexContainer.hxx"
32 #include "OPropertySet.hxx"
33 #include <cppuhelper/implbase6.hxx>
34 #include <comphelper/uno3.hxx>
36 #include "ServiceMacros.hxx"
37 #include "ModifyListenerHelper.hxx"
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/chart2/XAxis.hpp>
40 #include <com/sun/star/chart2/XTitled.hpp>
41 #include <com/sun/star/util/XCloneable.hpp>
42 #include <com/sun/star/util/XModifyBroadcaster.hpp>
43 #include <com/sun/star/util/XModifyListener.hpp>
50 typedef ::cppu::WeakImplHelper6
<
51 ::com::sun::star::chart2::XAxis
,
52 ::com::sun::star::chart2::XTitled
,
53 ::com::sun::star::lang::XServiceInfo
,
54 ::com::sun::star::util::XCloneable
,
55 ::com::sun::star::util::XModifyBroadcaster
,
56 ::com::sun::star::util::XModifyListener
>
61 public MutexContainer
,
62 public impl::Axis_Base
,
63 public ::property::OPropertySet
66 Axis( ::com::sun::star::uno::Reference
<
67 ::com::sun::star::uno::XComponentContext
> const & xContext
);
70 /// establish methods for factory instatiation
71 APPHELPER_SERVICE_FACTORY_HELPER( Axis
)
72 /// XServiceInfo declarations
73 APPHELPER_XSERVICEINFO_DECL()
75 /// merge XInterface implementations
77 /// merge XTypeProvider implementations
78 DECLARE_XTYPEPROVIDER()
81 explicit Axis( const Axis
& rOther
);
83 // late initialization to call after copy-constructing
84 void Init( const Axis
& rOther
);
86 // ____ OPropertySet ____
87 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
88 throw(::com::sun::star::beans::UnknownPropertyException
);
90 // ____ OPropertySet ____
91 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
93 // ____ XPropertySet ____
94 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
96 throw (::com::sun::star::uno::RuntimeException
);
98 // virtual sal_Bool SAL_CALL convertFastPropertyValue
99 // ( ::com::sun::star::uno::Any & rConvertedValue,
100 // ::com::sun::star::uno::Any & rOldValue,
101 // sal_Int32 nHandle,
102 // const ::com::sun::star::uno::Any& rValue )
103 // throw (::com::sun::star::lang::IllegalArgumentException);
106 virtual void SAL_CALL
setScaleData( const ::com::sun::star::chart2::ScaleData
& rScaleData
)
107 throw (::com::sun::star::uno::RuntimeException
);
108 virtual ::com::sun::star::chart2::ScaleData SAL_CALL
getScaleData()
109 throw (::com::sun::star::uno::RuntimeException
);
110 virtual ::com::sun::star::uno::Reference
<
111 ::com::sun::star::beans::XPropertySet
> SAL_CALL
getGridProperties()
112 throw (::com::sun::star::uno::RuntimeException
);
113 virtual ::com::sun::star::uno::Sequence
<
114 ::com::sun::star::uno::Reference
<
115 ::com::sun::star::beans::XPropertySet
> > SAL_CALL
getSubGridProperties()
116 throw (::com::sun::star::uno::RuntimeException
);
117 virtual ::com::sun::star::uno::Sequence
<
118 ::com::sun::star::uno::Reference
<
119 ::com::sun::star::beans::XPropertySet
> > SAL_CALL
getSubTickProperties()
120 throw (::com::sun::star::uno::RuntimeException
);
123 virtual ::com::sun::star::uno::Reference
<
124 ::com::sun::star::chart2::XTitle
> SAL_CALL
getTitleObject()
125 throw (::com::sun::star::uno::RuntimeException
);
126 virtual void SAL_CALL
setTitleObject(
127 const ::com::sun::star::uno::Reference
<
128 ::com::sun::star::chart2::XTitle
>& Title
)
129 throw (::com::sun::star::uno::RuntimeException
);
131 // ____ XCloneable ____
132 // Note: the coordinate systems are not cloned!
133 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
134 throw (::com::sun::star::uno::RuntimeException
);
136 // ____ XModifyBroadcaster ____
137 virtual void SAL_CALL
addModifyListener(
138 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
139 throw (::com::sun::star::uno::RuntimeException
);
140 virtual void SAL_CALL
removeModifyListener(
141 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
142 throw (::com::sun::star::uno::RuntimeException
);
144 // ____ XModifyListener ____
145 virtual void SAL_CALL
modified(
146 const ::com::sun::star::lang::EventObject
& aEvent
)
147 throw (::com::sun::star::uno::RuntimeException
);
149 // ____ XEventListener (base of XModifyListener) ____
150 virtual void SAL_CALL
disposing(
151 const ::com::sun::star::lang::EventObject
& Source
)
152 throw (::com::sun::star::uno::RuntimeException
);
154 // ____ OPropertySet ____
155 virtual void firePropertyChangeEvent();
156 using OPropertySet::disposing
;
158 void fireModifyEvent();
161 void AllocateSubGrids();
165 ::com::sun::star::uno::Reference
<
166 ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
168 ::com::sun::star::chart2::ScaleData m_aScaleData
;
170 ::com::sun::star::uno::Reference
<
171 ::com::sun::star::beans::XPropertySet
> m_xGrid
;
173 ::com::sun::star::uno::Sequence
<
174 ::com::sun::star::uno::Reference
<
175 ::com::sun::star::beans::XPropertySet
> > m_aSubGridProperties
;
177 ::com::sun::star::uno::Reference
<
178 ::com::sun::star::chart2::XTitle
> m_xTitle
;