xref: /AOO41X/main/sc/inc/datauno.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef SC_DATAUNO_HXX
29*cdf0e10cSrcweir #define SC_DATAUNO_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "global.hxx"
32*cdf0e10cSrcweir #include "queryparam.hxx"
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir #include <com/sun/star/sheet/TableFilterField.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/sheet/GeneralFunction.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
37*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetFilterDescriptor.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/sheet/XConsolidationDescriptor.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/sheet/XDatabaseRanges.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/sheet/XDatabaseRange.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/sheet/XSubTotalField.hpp>
43*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
44*cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
45*cdf0e10cSrcweir #include <com/sun/star/container/XIndexAccess.hpp>
46*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
47*cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp>
48*cdf0e10cSrcweir #include <com/sun/star/container/XNamed.hpp>
49*cdf0e10cSrcweir #include <com/sun/star/util/XRefreshable.hpp>
50*cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp>
51*cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
52*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
53*cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
54*cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx>
55*cdf0e10cSrcweir #include <cppuhelper/implbase6.hxx>
56*cdf0e10cSrcweir #include "svl/itemprop.hxx"
57*cdf0e10cSrcweir #include "svl/lstner.hxx"
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir class ScDBData;
60*cdf0e10cSrcweir class ScDocShell;
61*cdf0e10cSrcweir 
62*cdf0e10cSrcweir class ScSubTotalFieldObj;
63*cdf0e10cSrcweir class ScDatabaseRangeObj;
64*cdf0e10cSrcweir class ScDataPilotDescriptorBase;
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir struct ScSortParam;
67*cdf0e10cSrcweir 
68*cdf0e10cSrcweir typedef ::com::sun::star::uno::Reference<
69*cdf0e10cSrcweir 			::com::sun::star::util::XRefreshListener >* XDBRefreshListenerPtr;
70*cdf0e10cSrcweir SV_DECL_PTRARR_DEL( XDBRefreshListenerArr_Impl, XDBRefreshListenerPtr, 4, 4 )
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir class ScDataUnoConversion
73*cdf0e10cSrcweir {
74*cdf0e10cSrcweir public:
75*cdf0e10cSrcweir 	static ScSubTotalFunc	GeneralToSubTotal( com::sun::star::sheet::GeneralFunction eSummary );
76*cdf0e10cSrcweir 	static com::sun::star::sheet::GeneralFunction SubTotalToGeneral( ScSubTotalFunc eSubTotal );
77*cdf0e10cSrcweir };
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir //	ImportDescriptor gibt's nicht mehr als Uno-Objekt, nur noch Property-Sequence
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir class ScImportDescriptor
83*cdf0e10cSrcweir {
84*cdf0e10cSrcweir public:
85*cdf0e10cSrcweir 	static void	FillImportParam(
86*cdf0e10cSrcweir 					ScImportParam& rParam,
87*cdf0e10cSrcweir 					const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
88*cdf0e10cSrcweir 	static void	FillProperties(
89*cdf0e10cSrcweir 					com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
90*cdf0e10cSrcweir 					const ScImportParam& rParam );
91*cdf0e10cSrcweir 	static long GetPropertyCount();
92*cdf0e10cSrcweir };
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir //	SortDescriptor gibt's nicht mehr als Uno-Objekt, nur noch Property-Sequence
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir class ScSortDescriptor
97*cdf0e10cSrcweir {
98*cdf0e10cSrcweir public:
99*cdf0e10cSrcweir 	static void	FillSortParam(
100*cdf0e10cSrcweir 					ScSortParam& rParam,
101*cdf0e10cSrcweir 					const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
102*cdf0e10cSrcweir 	static void	FillProperties(
103*cdf0e10cSrcweir 					com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
104*cdf0e10cSrcweir 					const ScSortParam& rParam );
105*cdf0e10cSrcweir 	static long GetPropertyCount();
106*cdf0e10cSrcweir };
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir 
109*cdf0e10cSrcweir //	ScSubTotalDescriptorBase - Basisklasse fuer SubTotalDescriptor alleine und im DB-Bereich
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir //	to uno, both look the same
112*cdf0e10cSrcweir 
113*cdf0e10cSrcweir class ScSubTotalDescriptorBase : public cppu::WeakImplHelper6<
114*cdf0e10cSrcweir 										com::sun::star::sheet::XSubTotalDescriptor,
115*cdf0e10cSrcweir 										com::sun::star::container::XEnumerationAccess,
116*cdf0e10cSrcweir 										com::sun::star::container::XIndexAccess,
117*cdf0e10cSrcweir 										com::sun::star::beans::XPropertySet,
118*cdf0e10cSrcweir 										com::sun::star::lang::XUnoTunnel,
119*cdf0e10cSrcweir 										com::sun::star::lang::XServiceInfo >
120*cdf0e10cSrcweir {
121*cdf0e10cSrcweir private:
122*cdf0e10cSrcweir 	SfxItemPropertySet		aPropSet;
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir 	ScSubTotalFieldObj*		GetObjectByIndex_Impl(sal_uInt16 nIndex);
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir public:
127*cdf0e10cSrcweir 							ScSubTotalDescriptorBase();
128*cdf0e10cSrcweir 	virtual					~ScSubTotalDescriptorBase();
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 							// in derived classes:
131*cdf0e10cSrcweir 							// (Fields are within the range)
132*cdf0e10cSrcweir 	virtual void			GetData( ScSubTotalParam& rParam ) const = 0;
133*cdf0e10cSrcweir 	virtual void			PutData( const ScSubTotalParam& rParam ) = 0;
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 							// XSubTotalDescriptor
136*cdf0e10cSrcweir 	virtual void SAL_CALL	addNew( const ::com::sun::star::uno::Sequence<
137*cdf0e10cSrcweir 									::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns,
138*cdf0e10cSrcweir 								sal_Int32 nGroupColumn )
139*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
140*cdf0e10cSrcweir 	virtual void SAL_CALL	clear() throw(::com::sun::star::uno::RuntimeException);
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir 							// XIndexAccess
143*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
144*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
145*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
146*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
147*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
148*cdf0e10cSrcweir 
149*cdf0e10cSrcweir 							// XEnumerationAccess
150*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
151*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir 							// XElementAccess
154*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
155*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
156*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
157*cdf0e10cSrcweir 
158*cdf0e10cSrcweir 							// XPropertySet
159*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
160*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
161*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
162*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
163*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
164*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
165*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
166*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
167*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
168*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
169*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
170*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
171*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
172*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
173*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
174*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
175*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
176*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
177*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
178*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
179*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
180*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
181*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
182*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
183*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
184*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
185*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
186*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
187*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
188*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
189*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
190*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
191*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
192*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
193*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
194*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
195*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
196*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
197*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 							// XUnoTunnel
200*cdf0e10cSrcweir 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
201*cdf0e10cSrcweir 									sal_Int8 >& aIdentifier )
202*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
205*cdf0e10cSrcweir 	static ScSubTotalDescriptorBase* getImplementation( const com::sun::star::uno::Reference<
206*cdf0e10cSrcweir 									com::sun::star::sheet::XSubTotalDescriptor> xObj );
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 							// XServiceInfo
209*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
210*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
211*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
212*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
213*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
214*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
215*cdf0e10cSrcweir };
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir //	ScSubTotalDescriptor - dummer Container zur Benutzung mit XImportTarget
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir class ScSubTotalDescriptor : public ScSubTotalDescriptorBase
221*cdf0e10cSrcweir {
222*cdf0e10cSrcweir private:
223*cdf0e10cSrcweir 	ScSubTotalParam			aStoredParam;
224*cdf0e10cSrcweir 
225*cdf0e10cSrcweir public:
226*cdf0e10cSrcweir 							ScSubTotalDescriptor();
227*cdf0e10cSrcweir 	virtual					~ScSubTotalDescriptor();
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir 							// von ScSubTotalDescriptorBase:
230*cdf0e10cSrcweir 	virtual void			GetData( ScSubTotalParam& rParam ) const;
231*cdf0e10cSrcweir 	virtual void			PutData( const ScSubTotalParam& rParam );
232*cdf0e10cSrcweir 
233*cdf0e10cSrcweir 							// Zugriff von aussen:
234*cdf0e10cSrcweir 	void					SetParam( const ScSubTotalParam& rNew );
235*cdf0e10cSrcweir //	const ScSubTotalParam&	GetParam() const	{ return aStoredParam; }
236*cdf0e10cSrcweir };
237*cdf0e10cSrcweir 
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir //	ScRangeSubTotalDescriptor - SubTotalDescriptor eines Datenbank-Bereichs
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir class ScRangeSubTotalDescriptor : public ScSubTotalDescriptorBase
242*cdf0e10cSrcweir {
243*cdf0e10cSrcweir private:
244*cdf0e10cSrcweir 	ScDatabaseRangeObj*		pParent;
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir public:
247*cdf0e10cSrcweir 							ScRangeSubTotalDescriptor(ScDatabaseRangeObj* pPar);
248*cdf0e10cSrcweir 	virtual					~ScRangeSubTotalDescriptor();
249*cdf0e10cSrcweir 
250*cdf0e10cSrcweir 							// von ScSubTotalDescriptorBase:
251*cdf0e10cSrcweir 	virtual void			GetData( ScSubTotalParam& rParam ) const;
252*cdf0e10cSrcweir 	virtual void			PutData( const ScSubTotalParam& rParam );
253*cdf0e10cSrcweir };
254*cdf0e10cSrcweir 
255*cdf0e10cSrcweir 
256*cdf0e10cSrcweir class ScSubTotalFieldObj : public cppu::WeakImplHelper2<
257*cdf0e10cSrcweir 								com::sun::star::sheet::XSubTotalField,
258*cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo >
259*cdf0e10cSrcweir {
260*cdf0e10cSrcweir private:
261*cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor> xRef;
262*cdf0e10cSrcweir 	ScSubTotalDescriptorBase&	rParent;
263*cdf0e10cSrcweir 	sal_uInt16						nPos;
264*cdf0e10cSrcweir 
265*cdf0e10cSrcweir public:
266*cdf0e10cSrcweir 							ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP );
267*cdf0e10cSrcweir 	virtual					~ScSubTotalFieldObj();
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir 							// XSubTotalField
270*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getGroupColumn() throw(::com::sun::star::uno::RuntimeException);
271*cdf0e10cSrcweir 	virtual void SAL_CALL	setGroupColumn( sal_Int32 nGroupColumn )
272*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
273*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::SubTotalColumn > SAL_CALL
274*cdf0e10cSrcweir 							getSubTotalColumns() throw(::com::sun::star::uno::RuntimeException);
275*cdf0e10cSrcweir 	virtual void SAL_CALL	setSubTotalColumns( const ::com::sun::star::uno::Sequence<
276*cdf0e10cSrcweir 								::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns )
277*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir 							// XServiceInfo
280*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
281*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
282*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
283*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
284*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
285*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
286*cdf0e10cSrcweir };
287*cdf0e10cSrcweir 
288*cdf0e10cSrcweir 
289*cdf0e10cSrcweir class ScConsolidationDescriptor : public cppu::WeakImplHelper2<
290*cdf0e10cSrcweir 										com::sun::star::sheet::XConsolidationDescriptor,
291*cdf0e10cSrcweir 										com::sun::star::lang::XServiceInfo >
292*cdf0e10cSrcweir {
293*cdf0e10cSrcweir private:
294*cdf0e10cSrcweir 	ScConsolidateParam		aParam;
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir public:
297*cdf0e10cSrcweir 							ScConsolidationDescriptor();
298*cdf0e10cSrcweir 	virtual					~ScConsolidationDescriptor();
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir 	void					SetParam( const ScConsolidateParam& rNew );
301*cdf0e10cSrcweir 	const ScConsolidateParam& GetParam() const	{ return aParam; }
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir 							// XConsolidationDescriptor
304*cdf0e10cSrcweir 	virtual ::com::sun::star::sheet::GeneralFunction SAL_CALL getFunction()
305*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
306*cdf0e10cSrcweir 	virtual void SAL_CALL	setFunction( ::com::sun::star::sheet::GeneralFunction nFunction )
307*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
308*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
309*cdf0e10cSrcweir 							getSources(  ) throw(::com::sun::star::uno::RuntimeException);
310*cdf0e10cSrcweir 	virtual void SAL_CALL	setSources( const ::com::sun::star::uno::Sequence<
311*cdf0e10cSrcweir 								::com::sun::star::table::CellRangeAddress >& aSources )
312*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
313*cdf0e10cSrcweir 	virtual ::com::sun::star::table::CellAddress SAL_CALL getStartOutputPosition()
314*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
315*cdf0e10cSrcweir 	virtual void SAL_CALL	setStartOutputPosition(
316*cdf0e10cSrcweir 								const ::com::sun::star::table::CellAddress& aStartOutputPosition )
317*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
318*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL getUseColumnHeaders() throw(::com::sun::star::uno::RuntimeException);
319*cdf0e10cSrcweir 	virtual void SAL_CALL	setUseColumnHeaders( sal_Bool bUseColumnHeaders )
320*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
321*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL getUseRowHeaders() throw(::com::sun::star::uno::RuntimeException);
322*cdf0e10cSrcweir 	virtual void SAL_CALL	setUseRowHeaders( sal_Bool bUseRowHeaders )
323*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
324*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL getInsertLinks() throw(::com::sun::star::uno::RuntimeException);
325*cdf0e10cSrcweir 	virtual void SAL_CALL	setInsertLinks( sal_Bool bInsertLinks )
326*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 							// XServiceInfo
329*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
330*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
331*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
332*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
333*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
334*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
335*cdf0e10cSrcweir };
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir //	ScFilterDescriptorBase - Basisklasse fuer FilterDescriptor
339*cdf0e10cSrcweir //							 alleine, im DB-Bereich und im DataPilot
340*cdf0e10cSrcweir 
341*cdf0e10cSrcweir //	to uno, all three look the same
342*cdf0e10cSrcweir 
343*cdf0e10cSrcweir class ScFilterDescriptorBase : public cppu::WeakImplHelper4<
344*cdf0e10cSrcweir 									com::sun::star::sheet::XSheetFilterDescriptor,
345*cdf0e10cSrcweir                                     com::sun::star::sheet::XSheetFilterDescriptor2,
346*cdf0e10cSrcweir 									com::sun::star::beans::XPropertySet,
347*cdf0e10cSrcweir 									com::sun::star::lang::XServiceInfo >,
348*cdf0e10cSrcweir 						       public SfxListener
349*cdf0e10cSrcweir {
350*cdf0e10cSrcweir private:
351*cdf0e10cSrcweir 	SfxItemPropertySet		aPropSet;
352*cdf0e10cSrcweir     ScDocShell*             pDocSh;
353*cdf0e10cSrcweir 
354*cdf0e10cSrcweir public:
355*cdf0e10cSrcweir 							ScFilterDescriptorBase(ScDocShell* pDocShell);
356*cdf0e10cSrcweir 	virtual					~ScFilterDescriptorBase();
357*cdf0e10cSrcweir 
358*cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir 							// in den Ableitungen:
361*cdf0e10cSrcweir 							// (nField[] hier innerhalb des Bereichs)
362*cdf0e10cSrcweir 	virtual void			GetData( ScQueryParam& rParam ) const = 0;
363*cdf0e10cSrcweir 	virtual void			PutData( const ScQueryParam& rParam ) = 0;
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 							// XSheetFilterDescriptor
366*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField > SAL_CALL
367*cdf0e10cSrcweir 							getFilterFields() throw(::com::sun::star::uno::RuntimeException);
368*cdf0e10cSrcweir 	virtual void SAL_CALL	setFilterFields( const ::com::sun::star::uno::Sequence<
369*cdf0e10cSrcweir 								::com::sun::star::sheet::TableFilterField >& aFilterFields )
370*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
371*cdf0e10cSrcweir 
372*cdf0e10cSrcweir                             // XSheetFilterDescriptor2
373*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField2 > SAL_CALL
374*cdf0e10cSrcweir                             getFilterFields2() throw(::com::sun::star::uno::RuntimeException);
375*cdf0e10cSrcweir     virtual void SAL_CALL	setFilterFields2( const ::com::sun::star::uno::Sequence<
376*cdf0e10cSrcweir                                 ::com::sun::star::sheet::TableFilterField2 >& aFilterFields )
377*cdf0e10cSrcweir                                     throw(::com::sun::star::uno::RuntimeException);
378*cdf0e10cSrcweir 
379*cdf0e10cSrcweir 							// XPropertySet
380*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
381*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
382*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
383*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
384*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
385*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
386*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
387*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
388*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
389*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
390*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
391*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
392*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
393*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
394*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
395*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
396*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
397*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
398*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
399*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
400*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
401*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
402*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
403*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
404*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
405*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
406*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
407*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
408*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
409*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
410*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
411*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
412*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
413*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
414*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
415*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
416*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
417*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
418*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
419*cdf0e10cSrcweir 
420*cdf0e10cSrcweir 							// XServiceInfo
421*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
422*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
423*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
424*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
425*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
426*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
427*cdf0e10cSrcweir };
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir 
430*cdf0e10cSrcweir //	ScFilterDescriptor - dummer Container zur Benutzung mit XFilterable
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir class ScFilterDescriptor : public ScFilterDescriptorBase
433*cdf0e10cSrcweir {
434*cdf0e10cSrcweir private:
435*cdf0e10cSrcweir 	ScQueryParam			aStoredParam;		// nField[] hier innerhalb des Bereichs
436*cdf0e10cSrcweir 
437*cdf0e10cSrcweir public:
438*cdf0e10cSrcweir 							ScFilterDescriptor(ScDocShell* pDocSh);
439*cdf0e10cSrcweir 	virtual					~ScFilterDescriptor();
440*cdf0e10cSrcweir 
441*cdf0e10cSrcweir 							// von ScFilterDescriptorBase:
442*cdf0e10cSrcweir 	virtual void			GetData( ScQueryParam& rParam ) const;
443*cdf0e10cSrcweir 	virtual void			PutData( const ScQueryParam& rParam );
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir 							// Zugriff von aussen:
446*cdf0e10cSrcweir 	void					SetParam( const ScQueryParam& rNew );
447*cdf0e10cSrcweir 	const ScQueryParam&		GetParam() const	{ return aStoredParam; }
448*cdf0e10cSrcweir };
449*cdf0e10cSrcweir 
450*cdf0e10cSrcweir 
451*cdf0e10cSrcweir //	ScRangeFilterDescriptor - FilterDescriptor eines Datenbank-Bereichs
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir class ScRangeFilterDescriptor : public ScFilterDescriptorBase
454*cdf0e10cSrcweir {
455*cdf0e10cSrcweir private:
456*cdf0e10cSrcweir 	ScDatabaseRangeObj*		pParent;
457*cdf0e10cSrcweir 
458*cdf0e10cSrcweir public:
459*cdf0e10cSrcweir 							ScRangeFilterDescriptor(ScDocShell* pDocSh, ScDatabaseRangeObj* pPar);
460*cdf0e10cSrcweir 	virtual					~ScRangeFilterDescriptor();
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir 							// von ScFilterDescriptorBase:
463*cdf0e10cSrcweir 	virtual void			GetData( ScQueryParam& rParam ) const;
464*cdf0e10cSrcweir 	virtual void			PutData( const ScQueryParam& rParam );
465*cdf0e10cSrcweir };
466*cdf0e10cSrcweir 
467*cdf0e10cSrcweir 
468*cdf0e10cSrcweir //	ScDataPilotFilterDescriptor - FilterDescriptor eines DataPilotDescriptors
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir class ScDataPilotFilterDescriptor : public ScFilterDescriptorBase
471*cdf0e10cSrcweir {
472*cdf0e10cSrcweir private:
473*cdf0e10cSrcweir 	ScDataPilotDescriptorBase*	pParent;
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir public:
476*cdf0e10cSrcweir 							ScDataPilotFilterDescriptor(ScDocShell* pDocSh, ScDataPilotDescriptorBase* pPar);
477*cdf0e10cSrcweir 	virtual					~ScDataPilotFilterDescriptor();
478*cdf0e10cSrcweir 
479*cdf0e10cSrcweir 							// von ScFilterDescriptorBase:
480*cdf0e10cSrcweir 	virtual void			GetData( ScQueryParam& rParam ) const;
481*cdf0e10cSrcweir 	virtual void			PutData( const ScQueryParam& rParam );
482*cdf0e10cSrcweir };
483*cdf0e10cSrcweir 
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir class ScDatabaseRangeObj : public cppu::WeakImplHelper6<
486*cdf0e10cSrcweir 								com::sun::star::sheet::XDatabaseRange,
487*cdf0e10cSrcweir     							com::sun::star::util::XRefreshable,
488*cdf0e10cSrcweir 								com::sun::star::container::XNamed,
489*cdf0e10cSrcweir 								com::sun::star::sheet::XCellRangeReferrer,
490*cdf0e10cSrcweir 								com::sun::star::beans::XPropertySet,
491*cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo >,
492*cdf0e10cSrcweir 						   public SfxListener
493*cdf0e10cSrcweir {
494*cdf0e10cSrcweir private:
495*cdf0e10cSrcweir 	ScDocShell*				pDocShell;
496*cdf0e10cSrcweir 	String					aName;
497*cdf0e10cSrcweir 	SfxItemPropertySet		aPropSet;
498*cdf0e10cSrcweir 	XDBRefreshListenerArr_Impl aRefreshListeners;
499*cdf0e10cSrcweir 
500*cdf0e10cSrcweir private:
501*cdf0e10cSrcweir 	ScDBData*				GetDBData_Impl() const;
502*cdf0e10cSrcweir 	void					Refreshed_Impl();
503*cdf0e10cSrcweir 
504*cdf0e10cSrcweir public:
505*cdf0e10cSrcweir 							ScDatabaseRangeObj(ScDocShell* pDocSh, const String& rNm);
506*cdf0e10cSrcweir 	virtual					~ScDatabaseRangeObj();
507*cdf0e10cSrcweir 
508*cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
509*cdf0e10cSrcweir 
510*cdf0e10cSrcweir 							// nField[] hier innerhalb des Bereichs:
511*cdf0e10cSrcweir 	void					GetQueryParam(ScQueryParam& rQueryParam) const;
512*cdf0e10cSrcweir 	void					SetQueryParam(const ScQueryParam& rQueryParam);
513*cdf0e10cSrcweir 	void					GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const;
514*cdf0e10cSrcweir 	void					SetSubTotalParam(const ScSubTotalParam& rSubTotalParam);
515*cdf0e10cSrcweir 
516*cdf0e10cSrcweir                             // XNamed
517*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
518*cdf0e10cSrcweir 	virtual void SAL_CALL	setName( const ::rtl::OUString& aName )
519*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
520*cdf0e10cSrcweir 
521*cdf0e10cSrcweir 							// XDatabaseRange
522*cdf0e10cSrcweir     virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getDataArea()
523*cdf0e10cSrcweir     							throw(::com::sun::star::uno::RuntimeException);
524*cdf0e10cSrcweir     virtual void SAL_CALL	setDataArea( const ::com::sun::star::table::CellRangeAddress& aDataArea )
525*cdf0e10cSrcweir     							throw(::com::sun::star::uno::RuntimeException);
526*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
527*cdf0e10cSrcweir     						getSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
528*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
529*cdf0e10cSrcweir     						getFilterDescriptor() throw(::com::sun::star::uno::RuntimeException);
530*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
531*cdf0e10cSrcweir     						getSubTotalDescriptor() throw(::com::sun::star::uno::RuntimeException);
532*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
533*cdf0e10cSrcweir     						getImportDescriptor() throw(::com::sun::star::uno::RuntimeException);
534*cdf0e10cSrcweir // implemented for the XRefreshable Interface
535*cdf0e10cSrcweir //    virtual void SAL_CALL	refresh() throw(::com::sun::star::uno::RuntimeException);
536*cdf0e10cSrcweir 
537*cdf0e10cSrcweir 							// XRefreshable
538*cdf0e10cSrcweir 	virtual void SAL_CALL	refresh() throw(::com::sun::star::uno::RuntimeException);
539*cdf0e10cSrcweir 	virtual void SAL_CALL	addRefreshListener( const ::com::sun::star::uno::Reference<
540*cdf0e10cSrcweir 									::com::sun::star::util::XRefreshListener >& l )
541*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
542*cdf0e10cSrcweir 	virtual void SAL_CALL	removeRefreshListener( const ::com::sun::star::uno::Reference<
543*cdf0e10cSrcweir 									::com::sun::star::util::XRefreshListener >& l )
544*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
545*cdf0e10cSrcweir 
546*cdf0e10cSrcweir 							// XCellRangeReferrer
547*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
548*cdf0e10cSrcweir 							getReferredCells() throw(::com::sun::star::uno::RuntimeException);
549*cdf0e10cSrcweir 
550*cdf0e10cSrcweir 							// XPropertySet
551*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
552*cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
553*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
554*cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
555*cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
556*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
557*cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
558*cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
559*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
560*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
561*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
562*cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
563*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
564*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
565*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
566*cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
567*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
568*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
569*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
570*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
571*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
572*cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
573*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
574*cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
575*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
576*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
577*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
578*cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
579*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
580*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
581*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
582*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
583*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
584*cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
585*cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
586*cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
587*cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
588*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
589*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
590*cdf0e10cSrcweir 
591*cdf0e10cSrcweir 							// XServiceInfo
592*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
593*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
594*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
595*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
596*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
597*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
598*cdf0e10cSrcweir };
599*cdf0e10cSrcweir 
600*cdf0e10cSrcweir 
601*cdf0e10cSrcweir class ScDatabaseRangesObj : public cppu::WeakImplHelper4<
602*cdf0e10cSrcweir 								com::sun::star::sheet::XDatabaseRanges,
603*cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
604*cdf0e10cSrcweir 								com::sun::star::container::XIndexAccess,
605*cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo >,
606*cdf0e10cSrcweir 						    public SfxListener
607*cdf0e10cSrcweir {
608*cdf0e10cSrcweir private:
609*cdf0e10cSrcweir 	ScDocShell*				pDocShell;
610*cdf0e10cSrcweir 
611*cdf0e10cSrcweir 	ScDatabaseRangeObj*		GetObjectByIndex_Impl(sal_uInt16 nIndex);
612*cdf0e10cSrcweir 	ScDatabaseRangeObj*		GetObjectByName_Impl(const ::rtl::OUString& aName);
613*cdf0e10cSrcweir 
614*cdf0e10cSrcweir public:
615*cdf0e10cSrcweir 							ScDatabaseRangesObj(ScDocShell* pDocSh);
616*cdf0e10cSrcweir 	virtual					~ScDatabaseRangesObj();
617*cdf0e10cSrcweir 
618*cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
619*cdf0e10cSrcweir 
620*cdf0e10cSrcweir 							// XDatabaseRanges
621*cdf0e10cSrcweir 	virtual void SAL_CALL	addNewByName( const ::rtl::OUString& aName,
622*cdf0e10cSrcweir 								const ::com::sun::star::table::CellRangeAddress& aRange )
623*cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
624*cdf0e10cSrcweir 	virtual void SAL_CALL	removeByName( const ::rtl::OUString& aName )
625*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
626*cdf0e10cSrcweir 
627*cdf0e10cSrcweir 							// XEnumerationAccess
628*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
629*cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
630*cdf0e10cSrcweir 
631*cdf0e10cSrcweir 							// XIndexAccess
632*cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
633*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
634*cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
635*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
636*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
637*cdf0e10cSrcweir 
638*cdf0e10cSrcweir 							// XElementAccess
639*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
640*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
641*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
642*cdf0e10cSrcweir 
643*cdf0e10cSrcweir 							// XNameAccess
644*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
645*cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
646*cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
647*cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
648*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
649*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
650*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
651*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
652*cdf0e10cSrcweir 
653*cdf0e10cSrcweir 							// XServiceInfo
654*cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
655*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
656*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
657*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
658*cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
659*cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
660*cdf0e10cSrcweir };
661*cdf0e10cSrcweir 
662*cdf0e10cSrcweir 
663*cdf0e10cSrcweir 
664*cdf0e10cSrcweir #endif
665*cdf0e10cSrcweir 
666