1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SC_INC_DATAUNO_HXX
21 #define INCLUDED_SC_INC_DATAUNO_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/implbase.hxx>
47 #include <svl/itemprop.hxx>
48 #include <svl/lstner.hxx>
55 class ScSubTotalFieldObj
;
56 class ScDatabaseRangeObj
;
57 class ScDataPilotDescriptorBase
;
61 class ScDataUnoConversion
64 static css::sheet::GeneralFunction
SubTotalToGeneral( ScSubTotalFunc eSubTotal
);
67 // ImportDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
69 class ScImportDescriptor
72 static void FillImportParam(
73 ScImportParam
& rParam
,
74 const css::uno::Sequence
<css::beans::PropertyValue
>& rSeq
);
75 static void FillProperties(
76 css::uno::Sequence
<css::beans::PropertyValue
>& rSeq
,
77 const ScImportParam
& rParam
);
78 static long GetPropertyCount() { return 4; }
81 // SortDescriptor is not available as Uno-Objekt any longer, only Property-Sequence
83 class ScSortDescriptor
86 static void FillSortParam(
88 const css::uno::Sequence
<css::beans::PropertyValue
>& rSeq
);
89 static void FillProperties(
90 css::uno::Sequence
<css::beans::PropertyValue
>& rSeq
,
91 const ScSortParam
& rParam
);
92 //! SortAscending muss aus der SheetSortDescriptor service-Beschreibung raus
93 static long GetPropertyCount()
95 return 9; // TableSortDescriptor and SheetSortDescriptor
100 // ScSubTotalDescriptorBase - base class for SubTotalDescriptor stand alone and in DB area (context?)
102 // to uno, both look the same
104 class ScSubTotalDescriptorBase
: public cppu::WeakImplHelper
<
105 css::sheet::XSubTotalDescriptor
,
106 css::container::XEnumerationAccess
,
107 css::container::XIndexAccess
,
108 css::beans::XPropertySet
,
109 css::lang::XUnoTunnel
,
110 css::lang::XServiceInfo
>
113 SfxItemPropertySet aPropSet
;
115 ScSubTotalFieldObj
* GetObjectByIndex_Impl(sal_uInt16 nIndex
);
118 ScSubTotalDescriptorBase();
119 virtual ~ScSubTotalDescriptorBase();
121 // in derived classes:
122 // (Fields are within the range)
123 virtual void GetData( ScSubTotalParam
& rParam
) const = 0;
124 virtual void PutData( const ScSubTotalParam
& rParam
) = 0;
126 // XSubTotalDescriptor
127 virtual void SAL_CALL
addNew( const css::uno::Sequence
< css::sheet::SubTotalColumn
>& aSubTotalColumns
,
128 sal_Int32 nGroupColumn
)
129 throw(css::uno::RuntimeException
, std::exception
) override
;
130 virtual void SAL_CALL
clear() throw(css::uno::RuntimeException
, std::exception
) override
;
133 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
134 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
135 throw(css::lang::IndexOutOfBoundsException
,
136 css::lang::WrappedTargetException
,
137 css::uno::RuntimeException
, std::exception
) override
;
139 // XEnumerationAccess
140 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
141 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
144 virtual css::uno::Type SAL_CALL
getElementType()
145 throw(css::uno::RuntimeException
, std::exception
) override
;
146 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
149 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
150 SAL_CALL
getPropertySetInfo()
151 throw(css::uno::RuntimeException
, std::exception
) override
;
152 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
153 const css::uno::Any
& aValue
)
154 throw(css::beans::UnknownPropertyException
,
155 css::beans::PropertyVetoException
,
156 css::lang::IllegalArgumentException
,
157 css::lang::WrappedTargetException
,
158 css::uno::RuntimeException
, std::exception
) override
;
159 virtual css::uno::Any SAL_CALL
getPropertyValue(
160 const OUString
& PropertyName
)
161 throw(css::beans::UnknownPropertyException
,
162 css::lang::WrappedTargetException
,
163 css::uno::RuntimeException
, std::exception
) override
;
164 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
165 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
166 throw(css::beans::UnknownPropertyException
,
167 css::lang::WrappedTargetException
,
168 css::uno::RuntimeException
, std::exception
) override
;
169 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
170 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
171 throw(css::beans::UnknownPropertyException
,
172 css::lang::WrappedTargetException
,
173 css::uno::RuntimeException
, std::exception
) override
;
174 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
175 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
176 throw(css::beans::UnknownPropertyException
,
177 css::lang::WrappedTargetException
,
178 css::uno::RuntimeException
, std::exception
) override
;
179 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
180 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
181 throw(css::beans::UnknownPropertyException
,
182 css::lang::WrappedTargetException
,
183 css::uno::RuntimeException
, std::exception
) override
;
186 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
)
187 throw(css::uno::RuntimeException
, std::exception
) override
;
189 static const css::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
190 static ScSubTotalDescriptorBase
* getImplementation(const css::uno::Reference
<css::sheet::XSubTotalDescriptor
>& rObj
);
193 virtual OUString SAL_CALL
getImplementationName()
194 throw(css::uno::RuntimeException
, std::exception
) override
;
195 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
196 throw(css::uno::RuntimeException
, std::exception
) override
;
197 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
198 throw(css::uno::RuntimeException
, std::exception
) override
;
201 // ScSubTotalDescriptor - dummy container to use with XImportTarget
203 class ScSubTotalDescriptor
: public ScSubTotalDescriptorBase
206 ScSubTotalParam aStoredParam
;
209 ScSubTotalDescriptor();
210 virtual ~ScSubTotalDescriptor();
212 // from ScSubTotalDescriptorBase:
213 virtual void GetData( ScSubTotalParam
& rParam
) const override
;
214 virtual void PutData( const ScSubTotalParam
& rParam
) override
;
217 void SetParam( const ScSubTotalParam
& rNew
);
220 // ScRangeSubTotalDescriptor - SubTotalDescriptor of a data base area
222 class ScRangeSubTotalDescriptor
: public ScSubTotalDescriptorBase
225 ScDatabaseRangeObj
* pParent
;
228 ScRangeSubTotalDescriptor(ScDatabaseRangeObj
* pPar
);
229 virtual ~ScRangeSubTotalDescriptor();
231 // from ScSubTotalDescriptorBase:
232 virtual void GetData( ScSubTotalParam
& rParam
) const override
;
233 virtual void PutData( const ScSubTotalParam
& rParam
) override
;
236 class ScSubTotalFieldObj
: public cppu::WeakImplHelper
<
237 css::sheet::XSubTotalField
,
238 css::lang::XServiceInfo
>
241 ScSubTotalDescriptorBase
& rParent
;
245 ScSubTotalFieldObj( ScSubTotalDescriptorBase
* pDesc
, sal_uInt16 nP
);
246 virtual ~ScSubTotalFieldObj();
249 virtual sal_Int32 SAL_CALL
getGroupColumn() throw(css::uno::RuntimeException
, std::exception
) override
;
250 virtual void SAL_CALL
setGroupColumn( sal_Int32 nGroupColumn
)
251 throw(css::uno::RuntimeException
, std::exception
) override
;
252 virtual css::uno::Sequence
< css::sheet::SubTotalColumn
> SAL_CALL
253 getSubTotalColumns() throw(css::uno::RuntimeException
, std::exception
) override
;
254 virtual void SAL_CALL
setSubTotalColumns( const css::uno::Sequence
<
255 css::sheet::SubTotalColumn
>& aSubTotalColumns
)
256 throw(css::uno::RuntimeException
, std::exception
) override
;
259 virtual OUString SAL_CALL
getImplementationName()
260 throw(css::uno::RuntimeException
, std::exception
) override
;
261 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
262 throw(css::uno::RuntimeException
, std::exception
) override
;
263 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
264 throw(css::uno::RuntimeException
, std::exception
) override
;
267 class ScConsolidationDescriptor
: public cppu::WeakImplHelper
<
268 css::sheet::XConsolidationDescriptor
,
269 css::lang::XServiceInfo
>
272 ScConsolidateParam aParam
;
275 ScConsolidationDescriptor();
276 virtual ~ScConsolidationDescriptor();
278 void SetParam( const ScConsolidateParam
& rNew
);
279 const ScConsolidateParam
& GetParam() const { return aParam
; }
281 // XConsolidationDescriptor
282 virtual css::sheet::GeneralFunction SAL_CALL
getFunction()
283 throw(css::uno::RuntimeException
, std::exception
) override
;
284 virtual void SAL_CALL
setFunction( css::sheet::GeneralFunction nFunction
)
285 throw(css::uno::RuntimeException
, std::exception
) override
;
286 virtual css::uno::Sequence
< css::table::CellRangeAddress
> SAL_CALL
287 getSources( ) throw(css::uno::RuntimeException
, std::exception
) override
;
288 virtual void SAL_CALL
setSources( const css::uno::Sequence
< css::table::CellRangeAddress
>& aSources
)
289 throw(css::uno::RuntimeException
, std::exception
) override
;
290 virtual css::table::CellAddress SAL_CALL
getStartOutputPosition()
291 throw(css::uno::RuntimeException
, std::exception
) override
;
292 virtual void SAL_CALL
setStartOutputPosition(
293 const css::table::CellAddress
& aStartOutputPosition
)
294 throw(css::uno::RuntimeException
, std::exception
) override
;
295 virtual sal_Bool SAL_CALL
getUseColumnHeaders() throw(css::uno::RuntimeException
, std::exception
) override
;
296 virtual void SAL_CALL
setUseColumnHeaders( sal_Bool bUseColumnHeaders
)
297 throw(css::uno::RuntimeException
, std::exception
) override
;
298 virtual sal_Bool SAL_CALL
getUseRowHeaders() throw(css::uno::RuntimeException
, std::exception
) override
;
299 virtual void SAL_CALL
setUseRowHeaders( sal_Bool bUseRowHeaders
)
300 throw(css::uno::RuntimeException
, std::exception
) override
;
301 virtual sal_Bool SAL_CALL
getInsertLinks() throw(css::uno::RuntimeException
, std::exception
) override
;
302 virtual void SAL_CALL
setInsertLinks( sal_Bool bInsertLinks
)
303 throw(css::uno::RuntimeException
, std::exception
) override
;
306 virtual OUString SAL_CALL
getImplementationName()
307 throw(css::uno::RuntimeException
, std::exception
) override
;
308 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
309 throw(css::uno::RuntimeException
, std::exception
) override
;
310 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
311 throw(css::uno::RuntimeException
, std::exception
) override
;
314 // ScFilterDescriptorBase - base class for FilterDescriptor
315 // stand alone, in a DB area (or context?) and in the DataPilot
317 // to uno, all three look the same
319 class ScFilterDescriptorBase
: public cppu::WeakImplHelper
<
320 css::sheet::XSheetFilterDescriptor
,
321 css::sheet::XSheetFilterDescriptor2
,
322 css::sheet::XSheetFilterDescriptor3
,
323 css::beans::XPropertySet
,
324 css::lang::XServiceInfo
>,
328 SfxItemPropertySet aPropSet
;
332 ScFilterDescriptorBase(ScDocShell
* pDocShell
);
333 virtual ~ScFilterDescriptorBase();
335 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
337 // in the derived classes(?):
338 // (nField[] here within the area)
339 virtual void GetData( ScQueryParam
& rParam
) const = 0;
340 virtual void PutData( const ScQueryParam
& rParam
) = 0;
342 // XSheetFilterDescriptor
343 virtual css::uno::Sequence
< css::sheet::TableFilterField
> SAL_CALL
344 getFilterFields() throw(css::uno::RuntimeException
, std::exception
) override
;
345 virtual void SAL_CALL
setFilterFields( const css::uno::Sequence
<
346 css::sheet::TableFilterField
>& aFilterFields
)
347 throw(css::uno::RuntimeException
, std::exception
) override
;
349 // XSheetFilterDescriptor2
350 virtual css::uno::Sequence
< css::sheet::TableFilterField2
> SAL_CALL
351 getFilterFields2() throw(css::uno::RuntimeException
, std::exception
) override
;
352 virtual void SAL_CALL
setFilterFields2( const css::uno::Sequence
<
353 css::sheet::TableFilterField2
>& aFilterFields
)
354 throw(css::uno::RuntimeException
, std::exception
) override
;
356 // XSheetFilterDescriptor3
357 virtual css::uno::Sequence
< css::sheet::TableFilterField3
> SAL_CALL
358 getFilterFields3() throw(css::uno::RuntimeException
, std::exception
) override
;
359 virtual void SAL_CALL
setFilterFields3( const css::uno::Sequence
<
360 css::sheet::TableFilterField3
>& aFilterFields
)
361 throw(css::uno::RuntimeException
, std::exception
) override
;
364 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
365 SAL_CALL
getPropertySetInfo()
366 throw(css::uno::RuntimeException
, std::exception
) override
;
367 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
368 const css::uno::Any
& aValue
)
369 throw(css::beans::UnknownPropertyException
,
370 css::beans::PropertyVetoException
,
371 css::lang::IllegalArgumentException
,
372 css::lang::WrappedTargetException
,
373 css::uno::RuntimeException
, std::exception
) override
;
374 virtual css::uno::Any SAL_CALL
getPropertyValue(
375 const OUString
& PropertyName
)
376 throw(css::beans::UnknownPropertyException
,
377 css::lang::WrappedTargetException
,
378 css::uno::RuntimeException
, std::exception
) override
;
379 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
380 const css::uno::Reference
<
381 css::beans::XPropertyChangeListener
>& xListener
)
382 throw(css::beans::UnknownPropertyException
,
383 css::lang::WrappedTargetException
,
384 css::uno::RuntimeException
, std::exception
) override
;
385 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
386 const css::uno::Reference
<
387 css::beans::XPropertyChangeListener
>& aListener
)
388 throw(css::beans::UnknownPropertyException
,
389 css::lang::WrappedTargetException
,
390 css::uno::RuntimeException
, std::exception
) override
;
391 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
392 const css::uno::Reference
<
393 css::beans::XVetoableChangeListener
>& aListener
)
394 throw(css::beans::UnknownPropertyException
,
395 css::lang::WrappedTargetException
,
396 css::uno::RuntimeException
, std::exception
) override
;
397 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
398 const css::uno::Reference
<
399 css::beans::XVetoableChangeListener
>& aListener
)
400 throw(css::beans::UnknownPropertyException
,
401 css::lang::WrappedTargetException
,
402 css::uno::RuntimeException
, std::exception
) override
;
405 virtual OUString SAL_CALL
getImplementationName()
406 throw(css::uno::RuntimeException
, std::exception
) override
;
407 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
408 throw(css::uno::RuntimeException
, std::exception
) override
;
409 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
410 throw(css::uno::RuntimeException
, std::exception
) override
;
413 // ScFilterDescriptor - dummy container to use with XFilterable
415 class ScFilterDescriptor
: public ScFilterDescriptorBase
418 ScQueryParam aStoredParam
; // nField[] here within the area
421 ScFilterDescriptor(ScDocShell
* pDocSh
);
422 virtual ~ScFilterDescriptor();
424 // from ScFilterDescriptorBase:
425 virtual void GetData( ScQueryParam
& rParam
) const override
;
426 virtual void PutData( const ScQueryParam
& rParam
) override
;
429 void SetParam( const ScQueryParam
& rNew
);
430 const ScQueryParam
& GetParam() const { return aStoredParam
; }
433 // ScRangeFilterDescriptor - FilterDescriptor of a data base area
435 class ScRangeFilterDescriptor
: public ScFilterDescriptorBase
438 ScDatabaseRangeObj
* pParent
;
441 ScRangeFilterDescriptor(ScDocShell
* pDocSh
, ScDatabaseRangeObj
* pPar
);
442 virtual ~ScRangeFilterDescriptor();
444 // from ScFilterDescriptorBase:
445 virtual void GetData( ScQueryParam
& rParam
) const override
;
446 virtual void PutData( const ScQueryParam
& rParam
) override
;
449 // ScDataPilotFilterDescriptor - FilterDescriptor of a DataPilotDescriptors
451 class ScDataPilotFilterDescriptor
: public ScFilterDescriptorBase
454 ScDataPilotDescriptorBase
* pParent
;
457 ScDataPilotFilterDescriptor(ScDocShell
* pDocSh
, ScDataPilotDescriptorBase
* pPar
);
458 virtual ~ScDataPilotFilterDescriptor();
460 // from ScFilterDescriptorBase:
461 virtual void GetData( ScQueryParam
& rParam
) const override
;
462 virtual void PutData( const ScQueryParam
& rParam
) override
;
465 class ScDatabaseRangeObj
: public cppu::WeakImplHelper
<
466 css::sheet::XDatabaseRange
,
467 css::util::XRefreshable
,
468 css::container::XNamed
,
469 css::sheet::XCellRangeReferrer
,
470 css::beans::XPropertySet
,
471 css::lang::XServiceInfo
>,
475 ScDocShell
* pDocShell
;
477 SfxItemPropertySet aPropSet
;
478 std::vector
< css::uno::Reference
< css::util::XRefreshListener
> >
484 ScDBData
* GetDBData_Impl() const;
485 void Refreshed_Impl();
488 ScDatabaseRangeObj(ScDocShell
* pDocSh
, const OUString
& rNm
);
489 SC_DLLPUBLIC
ScDatabaseRangeObj(ScDocShell
* pDocSh
, const SCTAB nTab
);
490 virtual ~ScDatabaseRangeObj();
492 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
494 // nField[] here within the area:
495 void GetQueryParam(ScQueryParam
& rQueryParam
) const;
496 void SetQueryParam(const ScQueryParam
& rQueryParam
);
497 void GetSubTotalParam(ScSubTotalParam
& rSubTotalParam
) const;
498 void SetSubTotalParam(const ScSubTotalParam
& rSubTotalParam
);
501 virtual OUString SAL_CALL
getName() throw(css::uno::RuntimeException
, std::exception
) override
;
502 virtual void SAL_CALL
setName( const OUString
& aName
)
503 throw(css::uno::RuntimeException
, std::exception
) override
;
506 virtual css::table::CellRangeAddress SAL_CALL
getDataArea()
507 throw(css::uno::RuntimeException
, std::exception
) override
;
508 virtual void SAL_CALL
setDataArea( const css::table::CellRangeAddress
& aDataArea
)
509 throw(css::uno::RuntimeException
, std::exception
) override
;
510 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
511 getSortDescriptor() throw(css::uno::RuntimeException
, std::exception
) override
;
512 virtual css::uno::Reference
< css::sheet::XSheetFilterDescriptor
> SAL_CALL
513 getFilterDescriptor() throw(css::uno::RuntimeException
, std::exception
) override
;
514 virtual css::uno::Reference
< css::sheet::XSubTotalDescriptor
> SAL_CALL
515 getSubTotalDescriptor() throw(css::uno::RuntimeException
, std::exception
) override
;
516 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
517 getImportDescriptor() throw(css::uno::RuntimeException
, std::exception
) override
;
520 virtual void SAL_CALL
refresh() throw(css::uno::RuntimeException
, std::exception
) override
;
521 virtual void SAL_CALL
addRefreshListener( const css::uno::Reference
<
522 css::util::XRefreshListener
>& l
)
523 throw(css::uno::RuntimeException
, std::exception
) override
;
524 virtual void SAL_CALL
removeRefreshListener( const css::uno::Reference
<
525 css::util::XRefreshListener
>& l
)
526 throw(css::uno::RuntimeException
, std::exception
) override
;
528 // XCellRangeReferrer
529 virtual css::uno::Reference
< css::table::XCellRange
> SAL_CALL
530 getReferredCells() throw(css::uno::RuntimeException
, std::exception
) override
;
533 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
534 SAL_CALL
getPropertySetInfo()
535 throw(css::uno::RuntimeException
, std::exception
) override
;
536 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
537 const css::uno::Any
& aValue
)
538 throw(css::beans::UnknownPropertyException
,
539 css::beans::PropertyVetoException
,
540 css::lang::IllegalArgumentException
,
541 css::lang::WrappedTargetException
,
542 css::uno::RuntimeException
, std::exception
) override
;
543 virtual css::uno::Any SAL_CALL
getPropertyValue(
544 const OUString
& PropertyName
)
545 throw(css::beans::UnknownPropertyException
,
546 css::lang::WrappedTargetException
,
547 css::uno::RuntimeException
, std::exception
) override
;
548 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
549 const css::uno::Reference
<
550 css::beans::XPropertyChangeListener
>& xListener
)
551 throw(css::beans::UnknownPropertyException
,
552 css::lang::WrappedTargetException
,
553 css::uno::RuntimeException
, std::exception
) override
;
554 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
555 const css::uno::Reference
<
556 css::beans::XPropertyChangeListener
>& aListener
)
557 throw(css::beans::UnknownPropertyException
,
558 css::lang::WrappedTargetException
,
559 css::uno::RuntimeException
, std::exception
) override
;
560 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
561 const css::uno::Reference
<
562 css::beans::XVetoableChangeListener
>& aListener
)
563 throw(css::beans::UnknownPropertyException
,
564 css::lang::WrappedTargetException
,
565 css::uno::RuntimeException
, std::exception
) override
;
566 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
567 const css::uno::Reference
<
568 css::beans::XVetoableChangeListener
>& aListener
)
569 throw(css::beans::UnknownPropertyException
,
570 css::lang::WrappedTargetException
,
571 css::uno::RuntimeException
, std::exception
) override
;
574 virtual OUString SAL_CALL
getImplementationName()
575 throw(css::uno::RuntimeException
, std::exception
) override
;
576 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
577 throw(css::uno::RuntimeException
, std::exception
) override
;
578 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
579 throw(css::uno::RuntimeException
, std::exception
) override
;
582 class ScDatabaseRangesObj
: public cppu::WeakImplHelper
<
583 css::sheet::XDatabaseRanges
,
584 css::container::XEnumerationAccess
,
585 css::container::XIndexAccess
,
586 css::lang::XServiceInfo
>,
590 ScDocShell
* pDocShell
;
592 ScDatabaseRangeObj
* GetObjectByIndex_Impl(size_t nIndex
);
593 ScDatabaseRangeObj
* GetObjectByName_Impl(const OUString
& aName
);
596 ScDatabaseRangesObj(ScDocShell
* pDocSh
);
597 virtual ~ScDatabaseRangesObj();
599 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
602 virtual void SAL_CALL
addNewByName( const OUString
& aName
,
603 const css::table::CellRangeAddress
& aRange
)
604 throw(css::uno::RuntimeException
, std::exception
) override
;
605 virtual void SAL_CALL
removeByName( const OUString
& aName
)
606 throw(css::uno::RuntimeException
, std::exception
) override
;
608 // XEnumerationAccess
609 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
610 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
613 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
614 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
615 throw(css::lang::IndexOutOfBoundsException
,
616 css::lang::WrappedTargetException
,
617 css::uno::RuntimeException
, std::exception
) override
;
620 virtual css::uno::Type SAL_CALL
getElementType()
621 throw(css::uno::RuntimeException
, std::exception
) override
;
622 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
625 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
)
626 throw(css::container::NoSuchElementException
,
627 css::lang::WrappedTargetException
,
628 css::uno::RuntimeException
, std::exception
) override
;
629 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames()
630 throw(css::uno::RuntimeException
, std::exception
) override
;
631 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
)
632 throw(css::uno::RuntimeException
, std::exception
) override
;
635 virtual OUString SAL_CALL
getImplementationName()
636 throw(css::uno::RuntimeException
, std::exception
) override
;
637 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
638 throw(css::uno::RuntimeException
, std::exception
) override
;
639 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
640 throw(css::uno::RuntimeException
, std::exception
) override
;
643 class ScUnnamedDatabaseRangesObj
: public cppu::WeakImplHelper
<
644 css::sheet::XUnnamedDatabaseRanges
>,
648 ScDocShell
* pDocShell
;
651 ScUnnamedDatabaseRangesObj(ScDocShell
* pDocSh
);
652 virtual ~ScUnnamedDatabaseRangesObj();
654 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
656 // XUnnamedDatabaseRanges
657 virtual void SAL_CALL
setByTable( const css::table::CellRangeAddress
& aRange
)
658 throw(css::uno::RuntimeException
,
659 css::lang::IndexOutOfBoundsException
, std::exception
) override
;
660 virtual css::uno::Any SAL_CALL
getByTable( sal_Int32 nTab
)
661 throw(css::uno::RuntimeException
,
662 css::lang::IndexOutOfBoundsException
,
663 css::container::NoSuchElementException
, std::exception
) override
;
664 virtual sal_Bool SAL_CALL
hasByTable( sal_Int32 nTab
)
665 throw (css::uno::RuntimeException
,
666 css::lang::IndexOutOfBoundsException
, std::exception
) override
;
671 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */