Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / datauno.hxx
blob84ed68e60e1952732cfa3bc20d20735c8d90c854
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef SC_DATAUNO_HXX
21 #define SC_DATAUNO_HXX
23 #include "global.hxx"
24 #include "queryparam.hxx"
25 #include "subtotalparam.hxx"
27 #include <com/sun/star/sheet/TableFilterField.hpp>
28 #include <com/sun/star/sheet/GeneralFunction.hpp>
29 #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
30 #include <com/sun/star/sheet/XSheetFilterDescriptor.hpp>
31 #include <com/sun/star/sheet/XSheetFilterDescriptor2.hpp>
32 #include <com/sun/star/sheet/XSheetFilterDescriptor3.hpp>
33 #include <com/sun/star/sheet/XConsolidationDescriptor.hpp>
34 #include <com/sun/star/sheet/XDatabaseRanges.hpp>
35 #include <com/sun/star/sheet/XDatabaseRange.hpp>
36 #include <com/sun/star/sheet/XUnnamedDatabaseRanges.hpp>
37 #include <com/sun/star/sheet/XSubTotalDescriptor.hpp>
38 #include <com/sun/star/sheet/XSubTotalField.hpp>
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #include <com/sun/star/container/XEnumerationAccess.hpp>
41 #include <com/sun/star/container/XIndexAccess.hpp>
42 #include <com/sun/star/beans/XPropertySet.hpp>
43 #include <com/sun/star/lang/XUnoTunnel.hpp>
44 #include <com/sun/star/container/XNamed.hpp>
45 #include <com/sun/star/util/XRefreshable.hpp>
46 #include <cppuhelper/implbase2.hxx>
47 #include <cppuhelper/implbase3.hxx>
48 #include <cppuhelper/implbase4.hxx>
49 #include <cppuhelper/implbase5.hxx>
50 #include <cppuhelper/implbase6.hxx>
51 #include "svl/itemprop.hxx"
52 #include "svl/lstner.hxx"
53 #include <boost/ptr_container/ptr_vector.hpp>
55 class ScDBData;
56 class ScDocShell;
58 class ScSubTotalFieldObj;
59 class ScDatabaseRangeObj;
60 class ScDataPilotDescriptorBase;
62 struct ScSortParam;
64 typedef ::com::sun::star::uno::Reference<
65 ::com::sun::star::util::XRefreshListener > XDBRefreshListenerRef;
66 typedef boost::ptr_vector<XDBRefreshListenerRef> XDBRefreshListenerArr_Impl;
68 class ScDataUnoConversion
70 public:
71 static com::sun::star::sheet::GeneralFunction SubTotalToGeneral( ScSubTotalFunc eSubTotal );
75 // ImportDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
77 class ScImportDescriptor
79 public:
80 static void FillImportParam(
81 ScImportParam& rParam,
82 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
83 static void FillProperties(
84 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
85 const ScImportParam& rParam );
86 static long GetPropertyCount();
89 // SortDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
91 class ScSortDescriptor
93 public:
94 static void FillSortParam(
95 ScSortParam& rParam,
96 const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq );
97 static void FillProperties(
98 com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rSeq,
99 const ScSortParam& rParam );
100 static long GetPropertyCount();
104 // ScSubTotalDescriptorBase - base class for SubTotalDescriptor stand alone and in DB area (context?)
106 // to uno, both look the same
108 class ScSubTotalDescriptorBase : public cppu::WeakImplHelper6<
109 com::sun::star::sheet::XSubTotalDescriptor,
110 com::sun::star::container::XEnumerationAccess,
111 com::sun::star::container::XIndexAccess,
112 com::sun::star::beans::XPropertySet,
113 com::sun::star::lang::XUnoTunnel,
114 com::sun::star::lang::XServiceInfo >
116 private:
117 SfxItemPropertySet aPropSet;
119 ScSubTotalFieldObj* GetObjectByIndex_Impl(sal_uInt16 nIndex);
121 public:
122 ScSubTotalDescriptorBase();
123 virtual ~ScSubTotalDescriptorBase();
125 // in derived classes:
126 // (Fields are within the range)
127 virtual void GetData( ScSubTotalParam& rParam ) const = 0;
128 virtual void PutData( const ScSubTotalParam& rParam ) = 0;
130 // XSubTotalDescriptor
131 virtual void SAL_CALL addNew( const ::com::sun::star::uno::Sequence<
132 ::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns,
133 sal_Int32 nGroupColumn )
134 throw(::com::sun::star::uno::RuntimeException);
135 virtual void SAL_CALL clear() throw(::com::sun::star::uno::RuntimeException);
137 // XIndexAccess
138 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
139 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
140 throw(::com::sun::star::lang::IndexOutOfBoundsException,
141 ::com::sun::star::lang::WrappedTargetException,
142 ::com::sun::star::uno::RuntimeException);
144 // XEnumerationAccess
145 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
146 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
148 // XElementAccess
149 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
150 throw(::com::sun::star::uno::RuntimeException);
151 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
153 // XPropertySet
154 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
155 SAL_CALL getPropertySetInfo()
156 throw(::com::sun::star::uno::RuntimeException);
157 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
158 const ::com::sun::star::uno::Any& aValue )
159 throw(::com::sun::star::beans::UnknownPropertyException,
160 ::com::sun::star::beans::PropertyVetoException,
161 ::com::sun::star::lang::IllegalArgumentException,
162 ::com::sun::star::lang::WrappedTargetException,
163 ::com::sun::star::uno::RuntimeException);
164 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
165 const OUString& PropertyName )
166 throw(::com::sun::star::beans::UnknownPropertyException,
167 ::com::sun::star::lang::WrappedTargetException,
168 ::com::sun::star::uno::RuntimeException);
169 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
170 const ::com::sun::star::uno::Reference<
171 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
172 throw(::com::sun::star::beans::UnknownPropertyException,
173 ::com::sun::star::lang::WrappedTargetException,
174 ::com::sun::star::uno::RuntimeException);
175 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
176 const ::com::sun::star::uno::Reference<
177 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
178 throw(::com::sun::star::beans::UnknownPropertyException,
179 ::com::sun::star::lang::WrappedTargetException,
180 ::com::sun::star::uno::RuntimeException);
181 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
182 const ::com::sun::star::uno::Reference<
183 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
184 throw(::com::sun::star::beans::UnknownPropertyException,
185 ::com::sun::star::lang::WrappedTargetException,
186 ::com::sun::star::uno::RuntimeException);
187 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
188 const ::com::sun::star::uno::Reference<
189 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
190 throw(::com::sun::star::beans::UnknownPropertyException,
191 ::com::sun::star::lang::WrappedTargetException,
192 ::com::sun::star::uno::RuntimeException);
194 // XUnoTunnel
195 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
196 sal_Int8 >& aIdentifier )
197 throw(::com::sun::star::uno::RuntimeException);
199 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
200 static ScSubTotalDescriptorBase* getImplementation( const com::sun::star::uno::Reference<
201 com::sun::star::sheet::XSubTotalDescriptor> xObj );
203 // XServiceInfo
204 virtual OUString SAL_CALL getImplementationName()
205 throw(::com::sun::star::uno::RuntimeException);
206 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
207 throw(::com::sun::star::uno::RuntimeException);
208 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
209 throw(::com::sun::star::uno::RuntimeException);
213 // ScSubTotalDescriptor - dummy container to use with XImportTarget
215 class ScSubTotalDescriptor : public ScSubTotalDescriptorBase
217 private:
218 ScSubTotalParam aStoredParam;
220 public:
221 ScSubTotalDescriptor();
222 virtual ~ScSubTotalDescriptor();
224 // from ScSubTotalDescriptorBase:
225 virtual void GetData( ScSubTotalParam& rParam ) const;
226 virtual void PutData( const ScSubTotalParam& rParam );
228 // external access:
229 void SetParam( const ScSubTotalParam& rNew );
233 // ScRangeSubTotalDescriptor - SubTotalDescriptor of a data base area
235 class ScRangeSubTotalDescriptor : public ScSubTotalDescriptorBase
237 private:
238 ScDatabaseRangeObj* pParent;
240 public:
241 ScRangeSubTotalDescriptor(ScDatabaseRangeObj* pPar);
242 virtual ~ScRangeSubTotalDescriptor();
244 // from ScSubTotalDescriptorBase:
245 virtual void GetData( ScSubTotalParam& rParam ) const;
246 virtual void PutData( const ScSubTotalParam& rParam );
250 class ScSubTotalFieldObj : public cppu::WeakImplHelper2<
251 com::sun::star::sheet::XSubTotalField,
252 com::sun::star::lang::XServiceInfo >
254 private:
255 com::sun::star::uno::Reference<com::sun::star::sheet::XSubTotalDescriptor> xRef;
256 ScSubTotalDescriptorBase& rParent;
257 sal_uInt16 nPos;
259 public:
260 ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP );
261 virtual ~ScSubTotalFieldObj();
263 // XSubTotalField
264 virtual sal_Int32 SAL_CALL getGroupColumn() throw(::com::sun::star::uno::RuntimeException);
265 virtual void SAL_CALL setGroupColumn( sal_Int32 nGroupColumn )
266 throw(::com::sun::star::uno::RuntimeException);
267 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::SubTotalColumn > SAL_CALL
268 getSubTotalColumns() throw(::com::sun::star::uno::RuntimeException);
269 virtual void SAL_CALL setSubTotalColumns( const ::com::sun::star::uno::Sequence<
270 ::com::sun::star::sheet::SubTotalColumn >& aSubTotalColumns )
271 throw(::com::sun::star::uno::RuntimeException);
273 // XServiceInfo
274 virtual OUString SAL_CALL getImplementationName()
275 throw(::com::sun::star::uno::RuntimeException);
276 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
277 throw(::com::sun::star::uno::RuntimeException);
278 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
279 throw(::com::sun::star::uno::RuntimeException);
283 class ScConsolidationDescriptor : public cppu::WeakImplHelper2<
284 com::sun::star::sheet::XConsolidationDescriptor,
285 com::sun::star::lang::XServiceInfo >
287 private:
288 ScConsolidateParam aParam;
290 public:
291 ScConsolidationDescriptor();
292 virtual ~ScConsolidationDescriptor();
294 void SetParam( const ScConsolidateParam& rNew );
295 const ScConsolidateParam& GetParam() const { return aParam; }
297 // XConsolidationDescriptor
298 virtual ::com::sun::star::sheet::GeneralFunction SAL_CALL getFunction()
299 throw(::com::sun::star::uno::RuntimeException);
300 virtual void SAL_CALL setFunction( ::com::sun::star::sheet::GeneralFunction nFunction )
301 throw(::com::sun::star::uno::RuntimeException);
302 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
303 getSources( ) throw(::com::sun::star::uno::RuntimeException);
304 virtual void SAL_CALL setSources( const ::com::sun::star::uno::Sequence<
305 ::com::sun::star::table::CellRangeAddress >& aSources )
306 throw(::com::sun::star::uno::RuntimeException);
307 virtual ::com::sun::star::table::CellAddress SAL_CALL getStartOutputPosition()
308 throw(::com::sun::star::uno::RuntimeException);
309 virtual void SAL_CALL setStartOutputPosition(
310 const ::com::sun::star::table::CellAddress& aStartOutputPosition )
311 throw(::com::sun::star::uno::RuntimeException);
312 virtual sal_Bool SAL_CALL getUseColumnHeaders() throw(::com::sun::star::uno::RuntimeException);
313 virtual void SAL_CALL setUseColumnHeaders( sal_Bool bUseColumnHeaders )
314 throw(::com::sun::star::uno::RuntimeException);
315 virtual sal_Bool SAL_CALL getUseRowHeaders() throw(::com::sun::star::uno::RuntimeException);
316 virtual void SAL_CALL setUseRowHeaders( sal_Bool bUseRowHeaders )
317 throw(::com::sun::star::uno::RuntimeException);
318 virtual sal_Bool SAL_CALL getInsertLinks() throw(::com::sun::star::uno::RuntimeException);
319 virtual void SAL_CALL setInsertLinks( sal_Bool bInsertLinks )
320 throw(::com::sun::star::uno::RuntimeException);
322 // XServiceInfo
323 virtual OUString SAL_CALL getImplementationName()
324 throw(::com::sun::star::uno::RuntimeException);
325 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
326 throw(::com::sun::star::uno::RuntimeException);
327 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
328 throw(::com::sun::star::uno::RuntimeException);
332 // ScFilterDescriptorBase - base class for FilterDescriptor
333 // stand alone, in a DB area (or context?) and in the DataPilot
335 // to uno, all three look the same
337 class ScFilterDescriptorBase : public cppu::WeakImplHelper5<
338 com::sun::star::sheet::XSheetFilterDescriptor,
339 com::sun::star::sheet::XSheetFilterDescriptor2,
340 com::sun::star::sheet::XSheetFilterDescriptor3,
341 com::sun::star::beans::XPropertySet,
342 com::sun::star::lang::XServiceInfo >,
343 public SfxListener
345 private:
346 SfxItemPropertySet aPropSet;
347 ScDocShell* pDocSh;
349 public:
350 ScFilterDescriptorBase(ScDocShell* pDocShell);
351 virtual ~ScFilterDescriptorBase();
353 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
355 // in the derived classes(?):
356 // (nField[] here within the area)
357 virtual void GetData( ScQueryParam& rParam ) const = 0;
358 virtual void PutData( const ScQueryParam& rParam ) = 0;
360 // XSheetFilterDescriptor
361 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField > SAL_CALL
362 getFilterFields() throw(::com::sun::star::uno::RuntimeException);
363 virtual void SAL_CALL setFilterFields( const ::com::sun::star::uno::Sequence<
364 ::com::sun::star::sheet::TableFilterField >& aFilterFields )
365 throw(::com::sun::star::uno::RuntimeException);
367 // XSheetFilterDescriptor2
368 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField2 > SAL_CALL
369 getFilterFields2() throw(::com::sun::star::uno::RuntimeException);
370 virtual void SAL_CALL setFilterFields2( const ::com::sun::star::uno::Sequence<
371 ::com::sun::star::sheet::TableFilterField2 >& aFilterFields )
372 throw(::com::sun::star::uno::RuntimeException);
374 // XSheetFilterDescriptor3
375 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TableFilterField3 > SAL_CALL
376 getFilterFields3() throw(::com::sun::star::uno::RuntimeException);
377 virtual void SAL_CALL setFilterFields3( const ::com::sun::star::uno::Sequence<
378 ::com::sun::star::sheet::TableFilterField3 >& aFilterFields )
379 throw(::com::sun::star::uno::RuntimeException);
381 // XPropertySet
382 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
383 SAL_CALL getPropertySetInfo()
384 throw(::com::sun::star::uno::RuntimeException);
385 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
386 const ::com::sun::star::uno::Any& aValue )
387 throw(::com::sun::star::beans::UnknownPropertyException,
388 ::com::sun::star::beans::PropertyVetoException,
389 ::com::sun::star::lang::IllegalArgumentException,
390 ::com::sun::star::lang::WrappedTargetException,
391 ::com::sun::star::uno::RuntimeException);
392 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
393 const OUString& PropertyName )
394 throw(::com::sun::star::beans::UnknownPropertyException,
395 ::com::sun::star::lang::WrappedTargetException,
396 ::com::sun::star::uno::RuntimeException);
397 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
398 const ::com::sun::star::uno::Reference<
399 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
400 throw(::com::sun::star::beans::UnknownPropertyException,
401 ::com::sun::star::lang::WrappedTargetException,
402 ::com::sun::star::uno::RuntimeException);
403 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
404 const ::com::sun::star::uno::Reference<
405 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
406 throw(::com::sun::star::beans::UnknownPropertyException,
407 ::com::sun::star::lang::WrappedTargetException,
408 ::com::sun::star::uno::RuntimeException);
409 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
410 const ::com::sun::star::uno::Reference<
411 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
412 throw(::com::sun::star::beans::UnknownPropertyException,
413 ::com::sun::star::lang::WrappedTargetException,
414 ::com::sun::star::uno::RuntimeException);
415 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
416 const ::com::sun::star::uno::Reference<
417 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
418 throw(::com::sun::star::beans::UnknownPropertyException,
419 ::com::sun::star::lang::WrappedTargetException,
420 ::com::sun::star::uno::RuntimeException);
422 // XServiceInfo
423 virtual OUString SAL_CALL getImplementationName()
424 throw(::com::sun::star::uno::RuntimeException);
425 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
426 throw(::com::sun::star::uno::RuntimeException);
427 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
428 throw(::com::sun::star::uno::RuntimeException);
432 // ScFilterDescriptor - dummy container to use with XFilterable
434 class ScFilterDescriptor : public ScFilterDescriptorBase
436 private:
437 ScQueryParam aStoredParam; // nField[] here within the area
439 public:
440 ScFilterDescriptor(ScDocShell* pDocSh);
441 virtual ~ScFilterDescriptor();
443 // from ScFilterDescriptorBase:
444 virtual void GetData( ScQueryParam& rParam ) const;
445 virtual void PutData( const ScQueryParam& rParam );
447 // external access:
448 void SetParam( const ScQueryParam& rNew );
449 const ScQueryParam& GetParam() const { return aStoredParam; }
453 // ScRangeFilterDescriptor - FilterDescriptor of a data base area
455 class ScRangeFilterDescriptor : public ScFilterDescriptorBase
457 private:
458 ScDatabaseRangeObj* pParent;
460 public:
461 ScRangeFilterDescriptor(ScDocShell* pDocSh, ScDatabaseRangeObj* pPar);
462 virtual ~ScRangeFilterDescriptor();
464 // from ScFilterDescriptorBase:
465 virtual void GetData( ScQueryParam& rParam ) const;
466 virtual void PutData( const ScQueryParam& rParam );
470 // ScDataPilotFilterDescriptor - FilterDescriptor of a DataPilotDescriptors
472 class ScDataPilotFilterDescriptor : public ScFilterDescriptorBase
474 private:
475 ScDataPilotDescriptorBase* pParent;
477 public:
478 ScDataPilotFilterDescriptor(ScDocShell* pDocSh, ScDataPilotDescriptorBase* pPar);
479 virtual ~ScDataPilotFilterDescriptor();
481 // from ScFilterDescriptorBase:
482 virtual void GetData( ScQueryParam& rParam ) const;
483 virtual void PutData( const ScQueryParam& rParam );
487 class ScDatabaseRangeObj : public cppu::WeakImplHelper6<
488 com::sun::star::sheet::XDatabaseRange,
489 com::sun::star::util::XRefreshable,
490 com::sun::star::container::XNamed,
491 com::sun::star::sheet::XCellRangeReferrer,
492 com::sun::star::beans::XPropertySet,
493 com::sun::star::lang::XServiceInfo >,
494 public SfxListener
496 private:
497 ScDocShell* pDocShell;
498 OUString aName;
499 SfxItemPropertySet aPropSet;
500 XDBRefreshListenerArr_Impl aRefreshListeners;
501 bool bIsUnnamed;
502 SCTAB aTab;
504 private:
505 ScDBData* GetDBData_Impl() const;
506 void Refreshed_Impl();
508 public:
509 ScDatabaseRangeObj(ScDocShell* pDocSh, const OUString& rNm);
510 SC_DLLPUBLIC ScDatabaseRangeObj(ScDocShell* pDocSh, const SCTAB nTab);
511 virtual ~ScDatabaseRangeObj();
513 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
515 // nField[] here within the area:
516 void GetQueryParam(ScQueryParam& rQueryParam) const;
517 void SetQueryParam(const ScQueryParam& rQueryParam);
518 void GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const;
519 void SetSubTotalParam(const ScSubTotalParam& rSubTotalParam);
521 // XNamed
522 virtual OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
523 virtual void SAL_CALL setName( const OUString& aName )
524 throw(::com::sun::star::uno::RuntimeException);
526 // XDatabaseRange
527 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getDataArea()
528 throw(::com::sun::star::uno::RuntimeException);
529 virtual void SAL_CALL setDataArea( const ::com::sun::star::table::CellRangeAddress& aDataArea )
530 throw(::com::sun::star::uno::RuntimeException);
531 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
532 getSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
533 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
534 getFilterDescriptor() throw(::com::sun::star::uno::RuntimeException);
535 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
536 getSubTotalDescriptor() throw(::com::sun::star::uno::RuntimeException);
537 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
538 getImportDescriptor() throw(::com::sun::star::uno::RuntimeException);
540 // XRefreshable
541 virtual void SAL_CALL refresh() throw(::com::sun::star::uno::RuntimeException);
542 virtual void SAL_CALL addRefreshListener( const ::com::sun::star::uno::Reference<
543 ::com::sun::star::util::XRefreshListener >& l )
544 throw(::com::sun::star::uno::RuntimeException);
545 virtual void SAL_CALL removeRefreshListener( const ::com::sun::star::uno::Reference<
546 ::com::sun::star::util::XRefreshListener >& l )
547 throw(::com::sun::star::uno::RuntimeException);
549 // XCellRangeReferrer
550 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
551 getReferredCells() throw(::com::sun::star::uno::RuntimeException);
553 // XPropertySet
554 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
555 SAL_CALL getPropertySetInfo()
556 throw(::com::sun::star::uno::RuntimeException);
557 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
558 const ::com::sun::star::uno::Any& aValue )
559 throw(::com::sun::star::beans::UnknownPropertyException,
560 ::com::sun::star::beans::PropertyVetoException,
561 ::com::sun::star::lang::IllegalArgumentException,
562 ::com::sun::star::lang::WrappedTargetException,
563 ::com::sun::star::uno::RuntimeException);
564 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
565 const OUString& PropertyName )
566 throw(::com::sun::star::beans::UnknownPropertyException,
567 ::com::sun::star::lang::WrappedTargetException,
568 ::com::sun::star::uno::RuntimeException);
569 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
570 const ::com::sun::star::uno::Reference<
571 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
572 throw(::com::sun::star::beans::UnknownPropertyException,
573 ::com::sun::star::lang::WrappedTargetException,
574 ::com::sun::star::uno::RuntimeException);
575 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
576 const ::com::sun::star::uno::Reference<
577 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
578 throw(::com::sun::star::beans::UnknownPropertyException,
579 ::com::sun::star::lang::WrappedTargetException,
580 ::com::sun::star::uno::RuntimeException);
581 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
582 const ::com::sun::star::uno::Reference<
583 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
584 throw(::com::sun::star::beans::UnknownPropertyException,
585 ::com::sun::star::lang::WrappedTargetException,
586 ::com::sun::star::uno::RuntimeException);
587 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
588 const ::com::sun::star::uno::Reference<
589 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
590 throw(::com::sun::star::beans::UnknownPropertyException,
591 ::com::sun::star::lang::WrappedTargetException,
592 ::com::sun::star::uno::RuntimeException);
594 // XServiceInfo
595 virtual OUString SAL_CALL getImplementationName()
596 throw(::com::sun::star::uno::RuntimeException);
597 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
598 throw(::com::sun::star::uno::RuntimeException);
599 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
600 throw(::com::sun::star::uno::RuntimeException);
604 class ScDatabaseRangesObj : public cppu::WeakImplHelper4<
605 com::sun::star::sheet::XDatabaseRanges,
606 com::sun::star::container::XEnumerationAccess,
607 com::sun::star::container::XIndexAccess,
608 com::sun::star::lang::XServiceInfo >,
609 public SfxListener
611 private:
612 ScDocShell* pDocShell;
614 ScDatabaseRangeObj* GetObjectByIndex_Impl(size_t nIndex);
615 ScDatabaseRangeObj* GetObjectByName_Impl(const OUString& aName);
617 public:
618 ScDatabaseRangesObj(ScDocShell* pDocSh);
619 virtual ~ScDatabaseRangesObj();
621 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
623 // XDatabaseRanges
624 virtual void SAL_CALL addNewByName( const OUString& aName,
625 const ::com::sun::star::table::CellRangeAddress& aRange )
626 throw(::com::sun::star::uno::RuntimeException);
627 virtual void SAL_CALL removeByName( const OUString& aName )
628 throw(::com::sun::star::uno::RuntimeException);
630 // XEnumerationAccess
631 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
632 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
634 // XIndexAccess
635 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
636 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
637 throw(::com::sun::star::lang::IndexOutOfBoundsException,
638 ::com::sun::star::lang::WrappedTargetException,
639 ::com::sun::star::uno::RuntimeException);
641 // XElementAccess
642 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
643 throw(::com::sun::star::uno::RuntimeException);
644 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
646 // XNameAccess
647 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const OUString& aName )
648 throw(::com::sun::star::container::NoSuchElementException,
649 ::com::sun::star::lang::WrappedTargetException,
650 ::com::sun::star::uno::RuntimeException);
651 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getElementNames()
652 throw(::com::sun::star::uno::RuntimeException);
653 virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
654 throw(::com::sun::star::uno::RuntimeException);
656 // XServiceInfo
657 virtual OUString SAL_CALL getImplementationName()
658 throw(::com::sun::star::uno::RuntimeException);
659 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
660 throw(::com::sun::star::uno::RuntimeException);
661 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
662 throw(::com::sun::star::uno::RuntimeException);
665 class ScUnnamedDatabaseRangesObj : public cppu::WeakImplHelper1<
666 com::sun::star::sheet::XUnnamedDatabaseRanges>,
667 public SfxListener
669 private:
670 ScDocShell* pDocShell;
672 public:
673 ScUnnamedDatabaseRangesObj(ScDocShell* pDocSh);
674 virtual ~ScUnnamedDatabaseRangesObj();
676 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
678 // XUnnamedDatabaseRanges
679 virtual void SAL_CALL setByTable( const ::com::sun::star::table::CellRangeAddress& aRange )
680 throw(::com::sun::star::uno::RuntimeException,
681 ::com::sun::star::lang::IndexOutOfBoundsException );
682 virtual com::sun::star::uno::Any SAL_CALL getByTable( sal_Int32 nTab )
683 throw(::com::sun::star::uno::RuntimeException,
684 ::com::sun::star::lang::IndexOutOfBoundsException,
685 ::com::sun::star::container::NoSuchElementException );
686 virtual sal_Bool SAL_CALL hasByTable( sal_Int32 nTab )
687 throw (::com::sun::star::uno::RuntimeException,
688 ::com::sun::star::lang::IndexOutOfBoundsException);
693 #endif
695 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */