1*de7b3f82SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*de7b3f82SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*de7b3f82SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*de7b3f82SAndrew Rist  * distributed with this work for additional information
6*de7b3f82SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*de7b3f82SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*de7b3f82SAndrew Rist  * "License"); you may not use this file except in compliance
9*de7b3f82SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*de7b3f82SAndrew Rist  *
11*de7b3f82SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*de7b3f82SAndrew Rist  *
13*de7b3f82SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*de7b3f82SAndrew Rist  * software distributed under the License is distributed on an
15*de7b3f82SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*de7b3f82SAndrew Rist  * KIND, either express or implied.  See the License for the
17*de7b3f82SAndrew Rist  * specific language governing permissions and limitations
18*de7b3f82SAndrew Rist  * under the License.
19*de7b3f82SAndrew Rist  *
20*de7b3f82SAndrew Rist  *************************************************************/
21*de7b3f82SAndrew Rist 
22*de7b3f82SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SAMPLEADDIN_HXX_
25cdf0e10cSrcweir #define _SAMPLEADDIN_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <cppuhelper/implbase9.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
30cdf0e10cSrcweir #include <com/sun/star/chart/XDiagram.hpp>
31cdf0e10cSrcweir #include <com/sun/star/chart/XAxisXSupplier.hpp>
32cdf0e10cSrcweir #include <com/sun/star/chart/XAxisYSupplier.hpp>
33cdf0e10cSrcweir #include <com/sun/star/chart/XStatisticDisplay.hpp>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include <com/sun/star/lang/XServiceName.hpp>
36cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
37cdf0e10cSrcweir #include <com/sun/star/util/XRefreshable.hpp>
38cdf0e10cSrcweir #include <com/sun/star/lang/XLocalizable.hpp>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #include <com/sun/star/chart/XChartDocument.hpp>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
43cdf0e10cSrcweir 	SampleAddIn_CreateInstance(
44cdf0e10cSrcweir 		const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& );
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class SampleAddIn : public cppu::WeakImplHelper9<
47cdf0e10cSrcweir 	com::sun::star::lang::XInitialization,
48cdf0e10cSrcweir 	com::sun::star::chart::XDiagram,
49cdf0e10cSrcweir 	com::sun::star::chart::XAxisXSupplier,
50cdf0e10cSrcweir 	com::sun::star::chart::XAxisYSupplier,
51cdf0e10cSrcweir 	com::sun::star::chart::XStatisticDisplay,
52cdf0e10cSrcweir 	com::sun::star::lang::XServiceName,
53cdf0e10cSrcweir 	com::sun::star::lang::XServiceInfo,
54cdf0e10cSrcweir 	com::sun::star::util::XRefreshable,
55cdf0e10cSrcweir 	com::sun::star::lang::XLocalizable  >
56cdf0e10cSrcweir {
57cdf0e10cSrcweir private:
58cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartDocument > mxChartDoc;
59cdf0e10cSrcweir 	::com::sun::star::lang::Locale maLocale;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxMyRedLine;
62cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxMyText;
63cdf0e10cSrcweir 
64cdf0e10cSrcweir public:
65cdf0e10cSrcweir 	SampleAddIn();
66cdf0e10cSrcweir 	virtual ~SampleAddIn();
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 	// class specific code
69cdf0e10cSrcweir 	static ::rtl::OUString	getImplementationName_Static();
70cdf0e10cSrcweir 	static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static();
71cdf0e10cSrcweir 
72cdf0e10cSrcweir 	sal_Bool getLogicalPosition( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xAxis,
73cdf0e10cSrcweir 								 double fValue,
74cdf0e10cSrcweir 								 sal_Bool bVertical,
75cdf0e10cSrcweir 								 ::com::sun::star::awt::Point& aOutPosition );
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	// XInitialization
78cdf0e10cSrcweir 	virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
79cdf0e10cSrcweir 		throw( ::com::sun::star::uno::Exception,
80cdf0e10cSrcweir 			   ::com::sun::star::uno::RuntimeException );
81cdf0e10cSrcweir 
82cdf0e10cSrcweir 	// XDiagram
83cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getDiagramType() throw( ::com::sun::star::uno::RuntimeException );
84cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getDataRowProperties( sal_Int32 nRow )
85cdf0e10cSrcweir 		throw( ::com::sun::star::lang::IndexOutOfBoundsException,
86cdf0e10cSrcweir 			   ::com::sun::star::uno::RuntimeException );
87cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getDataPointProperties( sal_Int32 nCol, sal_Int32 nRow )
88cdf0e10cSrcweir 		throw( ::com::sun::star::lang::IndexOutOfBoundsException,
89cdf0e10cSrcweir 			   ::com::sun::star::uno::RuntimeException );
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 	// XShape ( ::XDiagram )
92cdf0e10cSrcweir 	virtual ::com::sun::star::awt::Size SAL_CALL getSize()
93cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
94cdf0e10cSrcweir 	virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& )
95cdf0e10cSrcweir 		throw( ::com::sun::star::beans::PropertyVetoException,
96cdf0e10cSrcweir 		       ::com::sun::star::uno::RuntimeException );
97cdf0e10cSrcweir 	virtual ::com::sun::star::awt::Point SAL_CALL getPosition()
98cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
99cdf0e10cSrcweir 	virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& )
100cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
101cdf0e10cSrcweir 
102cdf0e10cSrcweir 	// XShapeDescriptor ( ::XShape ::XDiagram )
103cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL getShapeType() throw( com::sun::star::uno::RuntimeException );
104cdf0e10cSrcweir 
105cdf0e10cSrcweir 	// XAxisXSupplier
106cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > SAL_CALL getXAxisTitle()
107cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
108cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getXAxis()
109cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
110cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getXMainGrid()
111cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
112cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getXHelpGrid()
113cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
114cdf0e10cSrcweir 
115cdf0e10cSrcweir 	// XAxisYSupplier
116cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > SAL_CALL getYAxisTitle()
117cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
118cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getYAxis()
119cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
120cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getYHelpGrid()
121cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
122cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getYMainGrid()
123cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	// XStatisticDisplay
126cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getUpBar()
127cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
128cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getDownBar()
129cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
130cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getMinMaxLine()
131cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
132cdf0e10cSrcweir 
133cdf0e10cSrcweir 	// XServiceName
134cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getServiceName() throw( ::com::sun::star::uno::RuntimeException );
135cdf0e10cSrcweir 
136cdf0e10cSrcweir 	// XServiceInfo
137cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
138cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
139cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
140cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
141cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
142cdf0e10cSrcweir 
143cdf0e10cSrcweir 	// XRefreshable
144cdf0e10cSrcweir 	virtual void SAL_CALL refresh() throw( ::com::sun::star::uno::RuntimeException );
145cdf0e10cSrcweir     virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l )
146cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
147cdf0e10cSrcweir     virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener >& l )
148cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
149cdf0e10cSrcweir 
150cdf0e10cSrcweir 	// XLocalizable
151cdf0e10cSrcweir 	virtual void SAL_CALL setLocale( const ::com::sun::star::lang::Locale& eLocale )
152cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
153cdf0e10cSrcweir     virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
154cdf0e10cSrcweir 		throw( ::com::sun::star::uno::RuntimeException );
155cdf0e10cSrcweir };
156cdf0e10cSrcweir 
157cdf0e10cSrcweir #endif	// _SAMPLEADDIN_HXX_
158