update dev300-m57
[ooovba.git] / sc / inc / docuno.hxx
blob5cd6146a2d3e643794b310a69b4fc35a8b929b98
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: docuno.hxx,v $
10 * $Revision: 1.27.128.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_DOCUNO_HXX
32 #define SC_DOCUNO_HXX
34 #include "address.hxx"
35 #include <sfx2/sfxbasemodel.hxx>
36 #include <svtools/lstner.hxx>
37 #include <svx/fmdmod.hxx>
38 #include <com/sun/star/view/XRenderable.hpp>
39 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
40 #include <com/sun/star/document/XActionLockable.hpp>
41 #include <com/sun/star/document/XLinkTargetSupplier.hpp>
42 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
43 #include <com/sun/star/drawing/XDrawPages.hpp>
44 #include <com/sun/star/sheet/XGoalSeek.hpp>
45 #include <com/sun/star/sheet/XCalculatable.hpp>
46 #include <com/sun/star/sheet/XScenarios.hpp>
47 #include <com/sun/star/sheet/XConsolidatable.hpp>
48 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
49 #include <com/sun/star/sheet/XDocumentAuditing.hpp>
50 #include <com/sun/star/lang/XServiceInfo.hpp>
51 #include <com/sun/star/util/XProtectable.hpp>
52 #include <com/sun/star/container/XEnumerationAccess.hpp>
53 #include <com/sun/star/table/XTableColumns.hpp>
54 #include <com/sun/star/table/XTableRows.hpp>
55 #include <com/sun/star/sheet/XSheetAnnotations.hpp>
56 #include <com/sun/star/beans/XPropertySet.hpp>
57 #include <com/sun/star/sheet/XCellRangesAccess.hpp>
58 #include <com/sun/star/util/XChangesNotifier.hpp>
59 #include <com/sun/star/document/XDocumentEventCompatibleHelper.hpp>
60 #include <cppuhelper/implbase2.hxx>
61 #include <cppuhelper/implbase3.hxx>
62 #include <cppuhelper/implbase4.hxx>
63 #include <cppuhelper/implbase5.hxx>
64 #include <cppuhelper/interfacecontainer.h>
65 #include <svtools/itemprop.hxx>
66 #include "drwlayer.hxx"
68 class ScDocShell;
69 class ScAnnotationObj;
70 class ScMarkData;
71 class ScPrintFuncCache;
72 class ScPrintSelectionStatus;
73 class ScTableColumnObj;
74 class ScTableRowObj;
75 class ScTableSheetObj;
76 class SvxFmDrawPage;
77 class SvxDrawPage;
78 class ScRangeList;
80 class SC_DLLPUBLIC ScModelObj : public SfxBaseModel,
81 public com::sun::star::sheet::XSpreadsheetDocument,
82 public com::sun::star::document::XActionLockable,
83 public com::sun::star::sheet::XCalculatable,
84 public com::sun::star::util::XProtectable,
85 public com::sun::star::drawing::XDrawPagesSupplier,
86 public com::sun::star::sheet::XGoalSeek,
87 public com::sun::star::sheet::XConsolidatable,
88 public com::sun::star::sheet::XDocumentAuditing,
89 public com::sun::star::style::XStyleFamiliesSupplier,
90 public com::sun::star::view::XRenderable,
91 public com::sun::star::document::XLinkTargetSupplier,
92 public com::sun::star::beans::XPropertySet,
93 public com::sun::star::document::XDocumentEventCompatibleHelper,
94 public SvxFmMSFactory, // derived from XMultiServiceFactory
95 public com::sun::star::lang::XServiceInfo,
96 public ::com::sun::star::util::XChangesNotifier
98 private:
99 SfxItemPropertySet aPropSet;
100 ScDocShell* pDocShell;
101 ScPrintFuncCache* pPrintFuncCache;
102 com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> xNumberAgg;
103 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawGradTab;
104 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawHatchTab;
105 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawBitmapTab;
106 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawTrGradTab;
107 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawMarkerTab;
108 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawDashTab;
109 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xChartDataProv;
111 ::cppu::OInterfaceContainerHelper maChangesListeners;
113 BOOL FillRenderMarkData( const com::sun::star::uno::Any& aSelection,
114 ScMarkData& rMark, ScPrintSelectionStatus& rStatus ) const;
116 rtl::OUString maBuildId;
117 protected:
118 const SfxItemPropertySet& GetPropertySet() const { return aPropSet; }
120 public:
121 ScModelObj(ScDocShell* pDocSh);
122 virtual ~ScModelObj();
124 // create ScModelObj and set at pDocSh (SetBaseModel)
125 static void CreateAndSet(ScDocShell* pDocSh);
127 ScDocument* GetDocument() const;
128 SfxObjectShell* GetEmbeddedObject() const;
130 void UpdateAllRowHeights( const ScMarkData* pTabMark = NULL );
132 void BeforeXMLLoading();
133 void AfterXMLLoading(sal_Bool bRet);
135 bool HasChangesListeners() const;
137 void NotifyChanges( const ::rtl::OUString& rOperation, const ScRangeList& rRanges,
138 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties =
139 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
141 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
142 const ::com::sun::star::uno::Type & rType )
143 throw(::com::sun::star::uno::RuntimeException);
144 virtual void SAL_CALL acquire() throw();
145 virtual void SAL_CALL release() throw();
147 //? virtual UString getClassName(void);
149 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
151 // XSpreadsheetDocument
152 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheets > SAL_CALL
153 getSheets() throw(::com::sun::star::uno::RuntimeException);
155 // XStyleFamiliesSupplier
156 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
157 getStyleFamilies() throw(::com::sun::star::uno::RuntimeException);
159 // XRenderable
160 virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection,
161 const ::com::sun::star::uno::Sequence<
162 ::com::sun::star::beans::PropertyValue >& xOptions )
163 throw (::com::sun::star::lang::IllegalArgumentException,
164 ::com::sun::star::uno::RuntimeException);
165 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
166 getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
167 const ::com::sun::star::uno::Sequence<
168 ::com::sun::star::beans::PropertyValue >& xOptions )
169 throw (::com::sun::star::lang::IllegalArgumentException,
170 ::com::sun::star::uno::RuntimeException);
171 virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
172 const ::com::sun::star::uno::Sequence<
173 ::com::sun::star::beans::PropertyValue >& xOptions )
174 throw (::com::sun::star::lang::IllegalArgumentException,
175 ::com::sun::star::uno::RuntimeException);
177 // XLinkTargetSupplier
178 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
179 getLinks() throw(::com::sun::star::uno::RuntimeException);
181 // XActionLockable
182 virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
183 virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException);
184 virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException);
185 virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
186 throw(::com::sun::star::uno::RuntimeException);
187 virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
189 virtual void SAL_CALL lockControllers() throw (::com::sun::star::uno::RuntimeException);
190 virtual void SAL_CALL unlockControllers() throw (::com::sun::star::uno::RuntimeException);
192 // XCalculatable
193 virtual void SAL_CALL calculate() throw(::com::sun::star::uno::RuntimeException);
194 virtual void SAL_CALL calculateAll() throw(::com::sun::star::uno::RuntimeException);
195 virtual sal_Bool SAL_CALL isAutomaticCalculationEnabled()
196 throw(::com::sun::star::uno::RuntimeException);
197 virtual void SAL_CALL enableAutomaticCalculation( sal_Bool bEnabled )
198 throw(::com::sun::star::uno::RuntimeException);
200 // XProtectable
201 virtual void SAL_CALL protect( const ::rtl::OUString& aPassword )
202 throw(::com::sun::star::uno::RuntimeException);
203 virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword )
204 throw(::com::sun::star::lang::IllegalArgumentException,
205 ::com::sun::star::uno::RuntimeException);
206 virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
208 // XDrawPagesSupplier
209 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL
210 getDrawPages() throw(::com::sun::star::uno::RuntimeException);
212 //! XPrintable??
214 // XGoalSeek
215 virtual ::com::sun::star::sheet::GoalResult SAL_CALL seekGoal(
216 const ::com::sun::star::table::CellAddress& aFormulaPosition,
217 const ::com::sun::star::table::CellAddress& aVariablePosition,
218 const ::rtl::OUString& aGoalValue )
219 throw(::com::sun::star::uno::RuntimeException);
221 // XConsolidatable
222 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XConsolidationDescriptor >
223 SAL_CALL createConsolidationDescriptor( sal_Bool bEmpty )
224 throw(::com::sun::star::uno::RuntimeException);
225 virtual void SAL_CALL consolidate( const ::com::sun::star::uno::Reference<
226 ::com::sun::star::sheet::XConsolidationDescriptor >& xDescriptor )
227 throw(::com::sun::star::uno::RuntimeException);
229 // XDocumentAuditing
230 virtual void SAL_CALL refreshArrows() throw(::com::sun::star::uno::RuntimeException);
232 // XViewDataSupplier
233 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData( )
234 throw (::com::sun::star::uno::RuntimeException);
236 // XPropertySet
237 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
238 SAL_CALL getPropertySetInfo()
239 throw(::com::sun::star::uno::RuntimeException);
240 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
241 const ::com::sun::star::uno::Any& aValue )
242 throw(::com::sun::star::beans::UnknownPropertyException,
243 ::com::sun::star::beans::PropertyVetoException,
244 ::com::sun::star::lang::IllegalArgumentException,
245 ::com::sun::star::lang::WrappedTargetException,
246 ::com::sun::star::uno::RuntimeException);
247 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
248 const ::rtl::OUString& PropertyName )
249 throw(::com::sun::star::beans::UnknownPropertyException,
250 ::com::sun::star::lang::WrappedTargetException,
251 ::com::sun::star::uno::RuntimeException);
252 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
253 const ::com::sun::star::uno::Reference<
254 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
255 throw(::com::sun::star::beans::UnknownPropertyException,
256 ::com::sun::star::lang::WrappedTargetException,
257 ::com::sun::star::uno::RuntimeException);
258 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
259 const ::com::sun::star::uno::Reference<
260 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
261 throw(::com::sun::star::beans::UnknownPropertyException,
262 ::com::sun::star::lang::WrappedTargetException,
263 ::com::sun::star::uno::RuntimeException);
264 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
265 const ::com::sun::star::uno::Reference<
266 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
267 throw(::com::sun::star::beans::UnknownPropertyException,
268 ::com::sun::star::lang::WrappedTargetException,
269 ::com::sun::star::uno::RuntimeException);
270 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
271 const ::com::sun::star::uno::Reference<
272 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
273 throw(::com::sun::star::beans::UnknownPropertyException,
274 ::com::sun::star::lang::WrappedTargetException,
275 ::com::sun::star::uno::RuntimeException);
277 // XMultiServiceFactory
278 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
279 createInstance( const ::rtl::OUString& aServiceSpecifier )
280 throw(::com::sun::star::uno::Exception,
281 ::com::sun::star::uno::RuntimeException);
282 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
283 createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier,
284 const ::com::sun::star::uno::Sequence<
285 ::com::sun::star::uno::Any >& Arguments )
286 throw(::com::sun::star::uno::Exception,
287 ::com::sun::star::uno::RuntimeException);
288 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames()
289 throw(::com::sun::star::uno::RuntimeException);
291 // XServiceInfo
292 virtual ::rtl::OUString SAL_CALL getImplementationName()
293 throw(::com::sun::star::uno::RuntimeException);
294 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
295 throw(::com::sun::star::uno::RuntimeException);
296 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
297 throw(::com::sun::star::uno::RuntimeException);
299 // XUnoTunnel
300 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
301 sal_Int8 >& aIdentifier )
302 throw(::com::sun::star::uno::RuntimeException);
304 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
305 static ScModelObj* getImplementation( const com::sun::star::uno::Reference<
306 com::sun::star::uno::XInterface> xObj );
308 // XTypeProvider
309 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
310 throw(::com::sun::star::uno::RuntimeException);
311 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
312 throw(::com::sun::star::uno::RuntimeException);
314 // XChangesNotifier
315 virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference<
316 ::com::sun::star::util::XChangesListener >& aListener )
317 throw (::com::sun::star::uno::RuntimeException);
318 virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference<
319 ::com::sun::star::util::XChangesListener >& aListener )
320 throw (::com::sun::star::uno::RuntimeException);
321 // XVbaEventHelper
322 virtual sal_Bool SAL_CALL processCompatibleEvent( sal_Int16 nEventId ) throw (::com::sun::star::uno::RuntimeException);
326 class ScDrawPagesObj : public cppu::WeakImplHelper2<
327 com::sun::star::drawing::XDrawPages,
328 com::sun::star::lang::XServiceInfo>,
329 public SfxListener
331 private:
332 ScDocShell* pDocShell;
334 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
335 GetObjectByIndex_Impl(INT32 nIndex) const;
337 public:
338 ScDrawPagesObj(ScDocShell* pDocSh);
339 virtual ~ScDrawPagesObj();
341 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
343 // XDrawPages
344 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
345 insertNewByIndex( sal_Int32 nIndex )
346 throw(::com::sun::star::uno::RuntimeException);
347 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference<
348 ::com::sun::star::drawing::XDrawPage >& xPage )
349 throw(::com::sun::star::uno::RuntimeException);
351 // XIndexAccess
352 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
353 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
354 throw(::com::sun::star::lang::IndexOutOfBoundsException,
355 ::com::sun::star::lang::WrappedTargetException,
356 ::com::sun::star::uno::RuntimeException);
358 // XElementAccess
359 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
360 throw(::com::sun::star::uno::RuntimeException);
361 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
363 // XServiceInfo
364 virtual ::rtl::OUString SAL_CALL getImplementationName()
365 throw(::com::sun::star::uno::RuntimeException);
366 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
367 throw(::com::sun::star::uno::RuntimeException);
368 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
369 throw(::com::sun::star::uno::RuntimeException);
373 class ScTableSheetsObj : public cppu::WeakImplHelper5<
374 com::sun::star::sheet::XSpreadsheets,
375 com::sun::star::sheet::XCellRangesAccess,
376 com::sun::star::container::XEnumerationAccess,
377 com::sun::star::container::XIndexAccess,
378 com::sun::star::lang::XServiceInfo>,
379 public SfxListener
381 private:
382 ScDocShell* pDocShell;
384 ScTableSheetObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
385 ScTableSheetObj* GetObjectByName_Impl(const ::rtl::OUString& aName) const;
387 public:
388 ScTableSheetsObj(ScDocShell* pDocSh);
389 virtual ~ScTableSheetsObj();
391 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
393 // XSpreadsheets
394 virtual void SAL_CALL insertNewByName( const ::rtl::OUString& aName, sal_Int16 nPosition )
395 throw(::com::sun::star::uno::RuntimeException);
396 virtual void SAL_CALL moveByName( const ::rtl::OUString& aName, sal_Int16 nDestination )
397 throw(::com::sun::star::uno::RuntimeException);
398 virtual void SAL_CALL copyByName( const ::rtl::OUString& aName,
399 const ::rtl::OUString& aCopy, sal_Int16 nDestination )
400 throw(::com::sun::star::uno::RuntimeException);
402 // XCellRangesAccess
404 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell >
405 SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet )
406 throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
408 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
409 SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet )
410 throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
412 virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > >
413 SAL_CALL getCellRangesByName( const ::rtl::OUString& aRange )
414 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
416 // XNameContainer
417 virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
418 const ::com::sun::star::uno::Any& aElement )
419 throw(::com::sun::star::lang::IllegalArgumentException,
420 ::com::sun::star::container::ElementExistException,
421 ::com::sun::star::lang::WrappedTargetException,
422 ::com::sun::star::uno::RuntimeException);
423 virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
424 throw(::com::sun::star::container::NoSuchElementException,
425 ::com::sun::star::lang::WrappedTargetException,
426 ::com::sun::star::uno::RuntimeException);
428 // XNameReplace
429 virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
430 const ::com::sun::star::uno::Any& aElement )
431 throw(::com::sun::star::lang::IllegalArgumentException,
432 ::com::sun::star::container::NoSuchElementException,
433 ::com::sun::star::lang::WrappedTargetException,
434 ::com::sun::star::uno::RuntimeException);
436 // XEnumerationAccess
437 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
438 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
440 // XElementAccess
441 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
442 throw(::com::sun::star::uno::RuntimeException);
443 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
445 // XIndexAccess
446 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
447 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
448 throw(::com::sun::star::lang::IndexOutOfBoundsException,
449 ::com::sun::star::lang::WrappedTargetException,
450 ::com::sun::star::uno::RuntimeException);
452 // XNameAccess
453 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
454 throw(::com::sun::star::container::NoSuchElementException,
455 ::com::sun::star::lang::WrappedTargetException,
456 ::com::sun::star::uno::RuntimeException);
457 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
458 throw(::com::sun::star::uno::RuntimeException);
459 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
460 throw(::com::sun::star::uno::RuntimeException);
462 // XServiceInfo
463 virtual ::rtl::OUString SAL_CALL getImplementationName()
464 throw(::com::sun::star::uno::RuntimeException);
465 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
466 throw(::com::sun::star::uno::RuntimeException);
467 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
468 throw(::com::sun::star::uno::RuntimeException);
472 class ScTableColumnsObj : public cppu::WeakImplHelper5<
473 com::sun::star::table::XTableColumns,
474 com::sun::star::container::XEnumerationAccess,
475 com::sun::star::container::XNameAccess,
476 com::sun::star::beans::XPropertySet,
477 com::sun::star::lang::XServiceInfo>,
478 public SfxListener
480 private:
481 ScDocShell* pDocShell;
482 SCTAB nTab;
483 SCCOL nStartCol;
484 SCCOL nEndCol;
486 ScTableColumnObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
487 ScTableColumnObj* GetObjectByName_Impl(const ::rtl::OUString& aName) const;
489 public:
490 ScTableColumnsObj(ScDocShell* pDocSh, SCTAB nT,
491 SCCOL nSC, SCCOL nEC);
492 virtual ~ScTableColumnsObj();
494 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
496 // XTableColumns
497 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
498 throw(::com::sun::star::uno::RuntimeException);
499 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
500 throw(::com::sun::star::uno::RuntimeException);
502 // XNameAccess
503 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
504 throw(::com::sun::star::container::NoSuchElementException,
505 ::com::sun::star::lang::WrappedTargetException,
506 ::com::sun::star::uno::RuntimeException);
507 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
508 throw(::com::sun::star::uno::RuntimeException);
509 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
510 throw(::com::sun::star::uno::RuntimeException);
512 // XIndexAccess
513 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
514 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
515 throw(::com::sun::star::lang::IndexOutOfBoundsException,
516 ::com::sun::star::lang::WrappedTargetException,
517 ::com::sun::star::uno::RuntimeException);
519 // XEnumerationAccess
520 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
521 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
523 // XElementAccess
524 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
525 throw(::com::sun::star::uno::RuntimeException);
526 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
528 // XPropertySet
529 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
530 SAL_CALL getPropertySetInfo()
531 throw(::com::sun::star::uno::RuntimeException);
532 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
533 const ::com::sun::star::uno::Any& aValue )
534 throw(::com::sun::star::beans::UnknownPropertyException,
535 ::com::sun::star::beans::PropertyVetoException,
536 ::com::sun::star::lang::IllegalArgumentException,
537 ::com::sun::star::lang::WrappedTargetException,
538 ::com::sun::star::uno::RuntimeException);
539 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
540 const ::rtl::OUString& PropertyName )
541 throw(::com::sun::star::beans::UnknownPropertyException,
542 ::com::sun::star::lang::WrappedTargetException,
543 ::com::sun::star::uno::RuntimeException);
544 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
545 const ::com::sun::star::uno::Reference<
546 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
547 throw(::com::sun::star::beans::UnknownPropertyException,
548 ::com::sun::star::lang::WrappedTargetException,
549 ::com::sun::star::uno::RuntimeException);
550 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
551 const ::com::sun::star::uno::Reference<
552 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
553 throw(::com::sun::star::beans::UnknownPropertyException,
554 ::com::sun::star::lang::WrappedTargetException,
555 ::com::sun::star::uno::RuntimeException);
556 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
557 const ::com::sun::star::uno::Reference<
558 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
559 throw(::com::sun::star::beans::UnknownPropertyException,
560 ::com::sun::star::lang::WrappedTargetException,
561 ::com::sun::star::uno::RuntimeException);
562 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
563 const ::com::sun::star::uno::Reference<
564 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
565 throw(::com::sun::star::beans::UnknownPropertyException,
566 ::com::sun::star::lang::WrappedTargetException,
567 ::com::sun::star::uno::RuntimeException);
569 // XServiceInfo
570 virtual ::rtl::OUString SAL_CALL getImplementationName()
571 throw(::com::sun::star::uno::RuntimeException);
572 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
573 throw(::com::sun::star::uno::RuntimeException);
574 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
575 throw(::com::sun::star::uno::RuntimeException);
579 class ScTableRowsObj : public cppu::WeakImplHelper4<
580 com::sun::star::table::XTableRows,
581 com::sun::star::container::XEnumerationAccess,
582 com::sun::star::beans::XPropertySet,
583 com::sun::star::lang::XServiceInfo>,
584 public SfxListener
586 private:
587 ScDocShell* pDocShell;
588 SCTAB nTab;
589 SCROW nStartRow;
590 SCROW nEndRow;
592 ScTableRowObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
594 public:
595 ScTableRowsObj(ScDocShell* pDocSh, SCTAB nT,
596 SCROW nSR, SCROW nER);
597 virtual ~ScTableRowsObj();
599 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
601 // XTableRows
602 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
603 throw(::com::sun::star::uno::RuntimeException);
604 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
605 throw(::com::sun::star::uno::RuntimeException);
607 // XIndexAccess
608 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
609 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
610 throw(::com::sun::star::lang::IndexOutOfBoundsException,
611 ::com::sun::star::lang::WrappedTargetException,
612 ::com::sun::star::uno::RuntimeException);
614 // XEnumerationAccess
615 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
616 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
618 // XElementAccess
619 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
620 throw(::com::sun::star::uno::RuntimeException);
621 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
623 // XPropertySet
624 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
625 SAL_CALL getPropertySetInfo()
626 throw(::com::sun::star::uno::RuntimeException);
627 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
628 const ::com::sun::star::uno::Any& aValue )
629 throw(::com::sun::star::beans::UnknownPropertyException,
630 ::com::sun::star::beans::PropertyVetoException,
631 ::com::sun::star::lang::IllegalArgumentException,
632 ::com::sun::star::lang::WrappedTargetException,
633 ::com::sun::star::uno::RuntimeException);
634 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
635 const ::rtl::OUString& PropertyName )
636 throw(::com::sun::star::beans::UnknownPropertyException,
637 ::com::sun::star::lang::WrappedTargetException,
638 ::com::sun::star::uno::RuntimeException);
639 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
640 const ::com::sun::star::uno::Reference<
641 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
642 throw(::com::sun::star::beans::UnknownPropertyException,
643 ::com::sun::star::lang::WrappedTargetException,
644 ::com::sun::star::uno::RuntimeException);
645 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
646 const ::com::sun::star::uno::Reference<
647 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
648 throw(::com::sun::star::beans::UnknownPropertyException,
649 ::com::sun::star::lang::WrappedTargetException,
650 ::com::sun::star::uno::RuntimeException);
651 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
652 const ::com::sun::star::uno::Reference<
653 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
654 throw(::com::sun::star::beans::UnknownPropertyException,
655 ::com::sun::star::lang::WrappedTargetException,
656 ::com::sun::star::uno::RuntimeException);
657 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
658 const ::com::sun::star::uno::Reference<
659 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
660 throw(::com::sun::star::beans::UnknownPropertyException,
661 ::com::sun::star::lang::WrappedTargetException,
662 ::com::sun::star::uno::RuntimeException);
664 // XServiceInfo
665 virtual ::rtl::OUString SAL_CALL getImplementationName()
666 throw(::com::sun::star::uno::RuntimeException);
667 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
668 throw(::com::sun::star::uno::RuntimeException);
669 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
670 throw(::com::sun::star::uno::RuntimeException);
674 class ScSpreadsheetSettingsObj : public cppu::WeakImplHelper2<
675 com::sun::star::beans::XPropertySet,
676 com::sun::star::lang::XServiceInfo>,
677 public SfxListener
679 private:
680 ScDocShell* pDocShell;
682 public:
683 //UNUSED2008-05 ScSpreadsheetSettingsObj(ScDocShell* pDocSh);
684 virtual ~ScSpreadsheetSettingsObj();
686 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
688 // XPropertySet
689 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
690 SAL_CALL getPropertySetInfo()
691 throw(::com::sun::star::uno::RuntimeException);
692 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
693 const ::com::sun::star::uno::Any& aValue )
694 throw(::com::sun::star::beans::UnknownPropertyException,
695 ::com::sun::star::beans::PropertyVetoException,
696 ::com::sun::star::lang::IllegalArgumentException,
697 ::com::sun::star::lang::WrappedTargetException,
698 ::com::sun::star::uno::RuntimeException);
699 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
700 const ::rtl::OUString& PropertyName )
701 throw(::com::sun::star::beans::UnknownPropertyException,
702 ::com::sun::star::lang::WrappedTargetException,
703 ::com::sun::star::uno::RuntimeException);
704 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
705 const ::com::sun::star::uno::Reference<
706 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
707 throw(::com::sun::star::beans::UnknownPropertyException,
708 ::com::sun::star::lang::WrappedTargetException,
709 ::com::sun::star::uno::RuntimeException);
710 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
711 const ::com::sun::star::uno::Reference<
712 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
713 throw(::com::sun::star::beans::UnknownPropertyException,
714 ::com::sun::star::lang::WrappedTargetException,
715 ::com::sun::star::uno::RuntimeException);
716 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
717 const ::com::sun::star::uno::Reference<
718 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
719 throw(::com::sun::star::beans::UnknownPropertyException,
720 ::com::sun::star::lang::WrappedTargetException,
721 ::com::sun::star::uno::RuntimeException);
722 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
723 const ::com::sun::star::uno::Reference<
724 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
725 throw(::com::sun::star::beans::UnknownPropertyException,
726 ::com::sun::star::lang::WrappedTargetException,
727 ::com::sun::star::uno::RuntimeException);
729 // XServiceInfo
730 virtual ::rtl::OUString SAL_CALL getImplementationName()
731 throw(::com::sun::star::uno::RuntimeException);
732 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
733 throw(::com::sun::star::uno::RuntimeException);
734 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
735 throw(::com::sun::star::uno::RuntimeException);
739 class ScAnnotationsObj : public cppu::WeakImplHelper3<
740 com::sun::star::sheet::XSheetAnnotations,
741 com::sun::star::container::XEnumerationAccess,
742 com::sun::star::lang::XServiceInfo>,
743 public SfxListener
745 private:
746 ScDocShell* pDocShell;
747 SCTAB nTab; // Collection haengt am Sheet
749 bool GetAddressByIndex_Impl( sal_Int32 nIndex, ScAddress& rPos ) const;
750 ScAnnotationObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
752 public:
753 ScAnnotationsObj(ScDocShell* pDocSh, SCTAB nT);
754 virtual ~ScAnnotationsObj();
756 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
758 // XSheetAnnotations
759 virtual void SAL_CALL insertNew( const ::com::sun::star::table::CellAddress& aPosition,
760 const ::rtl::OUString& aText )
761 throw(::com::sun::star::uno::RuntimeException);
762 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex )
763 throw(::com::sun::star::uno::RuntimeException);
765 // XIndexAccess
766 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
767 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
768 throw(::com::sun::star::lang::IndexOutOfBoundsException,
769 ::com::sun::star::lang::WrappedTargetException,
770 ::com::sun::star::uno::RuntimeException);
772 // XEnumerationAccess
773 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
774 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
776 // XElementAccess
777 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
778 throw(::com::sun::star::uno::RuntimeException);
779 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
781 // XServiceInfo
782 virtual ::rtl::OUString SAL_CALL getImplementationName()
783 throw(::com::sun::star::uno::RuntimeException);
784 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
785 throw(::com::sun::star::uno::RuntimeException);
786 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
787 throw(::com::sun::star::uno::RuntimeException);
791 class ScScenariosObj : public cppu::WeakImplHelper4<
792 com::sun::star::sheet::XScenarios,
793 com::sun::star::container::XEnumerationAccess,
794 com::sun::star::container::XIndexAccess,
795 com::sun::star::lang::XServiceInfo>,
796 public SfxListener
798 private:
799 ScDocShell* pDocShell;
800 SCTAB nTab;
802 BOOL GetScenarioIndex_Impl( const ::rtl::OUString& rName, SCTAB& rIndex );
803 ScTableSheetObj* GetObjectByIndex_Impl(sal_Int32 nIndex);
804 ScTableSheetObj* GetObjectByName_Impl(const ::rtl::OUString& aName);
806 public:
807 ScScenariosObj(ScDocShell* pDocSh, SCTAB nT);
808 virtual ~ScScenariosObj();
810 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
812 // XScenarios
813 virtual void SAL_CALL addNewByName( const ::rtl::OUString& aName,
814 const ::com::sun::star::uno::Sequence<
815 ::com::sun::star::table::CellRangeAddress >& aRanges,
816 const ::rtl::OUString& aComment )
817 throw(::com::sun::star::uno::RuntimeException);
818 virtual void SAL_CALL removeByName( const ::rtl::OUString& aName )
819 throw(::com::sun::star::uno::RuntimeException);
821 // XNameAccess
822 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
823 throw(::com::sun::star::container::NoSuchElementException,
824 ::com::sun::star::lang::WrappedTargetException,
825 ::com::sun::star::uno::RuntimeException);
826 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
827 throw(::com::sun::star::uno::RuntimeException);
828 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
829 throw(::com::sun::star::uno::RuntimeException);
831 // XIndexAccess
832 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
833 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
834 throw(::com::sun::star::lang::IndexOutOfBoundsException,
835 ::com::sun::star::lang::WrappedTargetException,
836 ::com::sun::star::uno::RuntimeException);
838 // XEnumerationAccess
839 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
840 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
842 // XElementAccess
843 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
844 throw(::com::sun::star::uno::RuntimeException);
845 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
847 // XServiceInfo
848 virtual ::rtl::OUString SAL_CALL getImplementationName()
849 throw(::com::sun::star::uno::RuntimeException);
850 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
851 throw(::com::sun::star::uno::RuntimeException);
852 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
853 throw(::com::sun::star::uno::RuntimeException);
859 #endif