sync master with lastest vba changes
[ooovba.git] / sc / inc / docuno.hxx
blob89fcfa0744575621a0902ab8252b0fb910d8fee7
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;
118 public:
119 ScModelObj(ScDocShell* pDocSh);
120 virtual ~ScModelObj();
122 // create ScModelObj and set at pDocSh (SetBaseModel)
123 static void CreateAndSet(ScDocShell* pDocSh);
125 ScDocument* GetDocument() const;
126 SfxObjectShell* GetEmbeddedObject() const;
128 void UpdateAllRowHeights();
130 ScDrawLayer* MakeDrawLayer();
131 void BeforeXMLLoading();
132 void AfterXMLLoading(sal_Bool bRet);
134 bool HasChangesListeners() const;
136 void NotifyChanges( const ::rtl::OUString& rOperation, const ScRangeList& rRanges,
137 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties =
138 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
140 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
141 const ::com::sun::star::uno::Type & rType )
142 throw(::com::sun::star::uno::RuntimeException);
143 virtual void SAL_CALL acquire() throw();
144 virtual void SAL_CALL release() throw();
146 //? virtual UString getClassName(void);
148 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
150 // XSpreadsheetDocument
151 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheets > SAL_CALL
152 getSheets() throw(::com::sun::star::uno::RuntimeException);
154 // XStyleFamiliesSupplier
155 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
156 getStyleFamilies() throw(::com::sun::star::uno::RuntimeException);
158 // XRenderable
159 virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection,
160 const ::com::sun::star::uno::Sequence<
161 ::com::sun::star::beans::PropertyValue >& xOptions )
162 throw (::com::sun::star::lang::IllegalArgumentException,
163 ::com::sun::star::uno::RuntimeException);
164 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
165 getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
166 const ::com::sun::star::uno::Sequence<
167 ::com::sun::star::beans::PropertyValue >& xOptions )
168 throw (::com::sun::star::lang::IllegalArgumentException,
169 ::com::sun::star::uno::RuntimeException);
170 virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
171 const ::com::sun::star::uno::Sequence<
172 ::com::sun::star::beans::PropertyValue >& xOptions )
173 throw (::com::sun::star::lang::IllegalArgumentException,
174 ::com::sun::star::uno::RuntimeException);
176 // XLinkTargetSupplier
177 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
178 getLinks() throw(::com::sun::star::uno::RuntimeException);
180 // XActionLockable
181 virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
182 virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException);
183 virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException);
184 virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
185 throw(::com::sun::star::uno::RuntimeException);
186 virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
188 virtual void SAL_CALL lockControllers() throw (::com::sun::star::uno::RuntimeException);
189 virtual void SAL_CALL unlockControllers() throw (::com::sun::star::uno::RuntimeException);
191 // XCalculatable
192 virtual void SAL_CALL calculate() throw(::com::sun::star::uno::RuntimeException);
193 virtual void SAL_CALL calculateAll() throw(::com::sun::star::uno::RuntimeException);
194 virtual sal_Bool SAL_CALL isAutomaticCalculationEnabled()
195 throw(::com::sun::star::uno::RuntimeException);
196 virtual void SAL_CALL enableAutomaticCalculation( sal_Bool bEnabled )
197 throw(::com::sun::star::uno::RuntimeException);
199 // XProtectable
200 virtual void SAL_CALL protect( const ::rtl::OUString& aPassword )
201 throw(::com::sun::star::uno::RuntimeException);
202 virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword )
203 throw(::com::sun::star::lang::IllegalArgumentException,
204 ::com::sun::star::uno::RuntimeException);
205 virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
207 // XDrawPagesSupplier
208 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL
209 getDrawPages() throw(::com::sun::star::uno::RuntimeException);
211 //! XPrintable??
213 // XGoalSeek
214 virtual ::com::sun::star::sheet::GoalResult SAL_CALL seekGoal(
215 const ::com::sun::star::table::CellAddress& aFormulaPosition,
216 const ::com::sun::star::table::CellAddress& aVariablePosition,
217 const ::rtl::OUString& aGoalValue )
218 throw(::com::sun::star::uno::RuntimeException);
220 // XConsolidatable
221 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XConsolidationDescriptor >
222 SAL_CALL createConsolidationDescriptor( sal_Bool bEmpty )
223 throw(::com::sun::star::uno::RuntimeException);
224 virtual void SAL_CALL consolidate( const ::com::sun::star::uno::Reference<
225 ::com::sun::star::sheet::XConsolidationDescriptor >& xDescriptor )
226 throw(::com::sun::star::uno::RuntimeException);
228 // XDocumentAuditing
229 virtual void SAL_CALL refreshArrows() throw(::com::sun::star::uno::RuntimeException);
231 // XViewDataSupplier
232 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData( )
233 throw (::com::sun::star::uno::RuntimeException);
235 // XPropertySet
236 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
237 SAL_CALL getPropertySetInfo()
238 throw(::com::sun::star::uno::RuntimeException);
239 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
240 const ::com::sun::star::uno::Any& aValue )
241 throw(::com::sun::star::beans::UnknownPropertyException,
242 ::com::sun::star::beans::PropertyVetoException,
243 ::com::sun::star::lang::IllegalArgumentException,
244 ::com::sun::star::lang::WrappedTargetException,
245 ::com::sun::star::uno::RuntimeException);
246 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
247 const ::rtl::OUString& PropertyName )
248 throw(::com::sun::star::beans::UnknownPropertyException,
249 ::com::sun::star::lang::WrappedTargetException,
250 ::com::sun::star::uno::RuntimeException);
251 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
252 const ::com::sun::star::uno::Reference<
253 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
254 throw(::com::sun::star::beans::UnknownPropertyException,
255 ::com::sun::star::lang::WrappedTargetException,
256 ::com::sun::star::uno::RuntimeException);
257 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
258 const ::com::sun::star::uno::Reference<
259 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
260 throw(::com::sun::star::beans::UnknownPropertyException,
261 ::com::sun::star::lang::WrappedTargetException,
262 ::com::sun::star::uno::RuntimeException);
263 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
264 const ::com::sun::star::uno::Reference<
265 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
266 throw(::com::sun::star::beans::UnknownPropertyException,
267 ::com::sun::star::lang::WrappedTargetException,
268 ::com::sun::star::uno::RuntimeException);
269 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
270 const ::com::sun::star::uno::Reference<
271 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
272 throw(::com::sun::star::beans::UnknownPropertyException,
273 ::com::sun::star::lang::WrappedTargetException,
274 ::com::sun::star::uno::RuntimeException);
276 // XMultiServiceFactory
277 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
278 createInstance( const ::rtl::OUString& aServiceSpecifier )
279 throw(::com::sun::star::uno::Exception,
280 ::com::sun::star::uno::RuntimeException);
281 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
282 createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier,
283 const ::com::sun::star::uno::Sequence<
284 ::com::sun::star::uno::Any >& Arguments )
285 throw(::com::sun::star::uno::Exception,
286 ::com::sun::star::uno::RuntimeException);
287 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames()
288 throw(::com::sun::star::uno::RuntimeException);
290 // XServiceInfo
291 virtual ::rtl::OUString SAL_CALL getImplementationName()
292 throw(::com::sun::star::uno::RuntimeException);
293 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
294 throw(::com::sun::star::uno::RuntimeException);
295 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
296 throw(::com::sun::star::uno::RuntimeException);
298 // XUnoTunnel
299 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
300 sal_Int8 >& aIdentifier )
301 throw(::com::sun::star::uno::RuntimeException);
303 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
304 static ScModelObj* getImplementation( const com::sun::star::uno::Reference<
305 com::sun::star::uno::XInterface> xObj );
307 // XTypeProvider
308 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
309 throw(::com::sun::star::uno::RuntimeException);
310 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
311 throw(::com::sun::star::uno::RuntimeException);
313 // XChangesNotifier
314 virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference<
315 ::com::sun::star::util::XChangesListener >& aListener )
316 throw (::com::sun::star::uno::RuntimeException);
317 virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference<
318 ::com::sun::star::util::XChangesListener >& aListener )
319 throw (::com::sun::star::uno::RuntimeException);
320 // XVbaEventHelper
321 virtual sal_Bool SAL_CALL processCompatibleEvent( sal_Int16 nEventId ) throw (::com::sun::star::uno::RuntimeException);
325 class ScDrawPagesObj : public cppu::WeakImplHelper2<
326 com::sun::star::drawing::XDrawPages,
327 com::sun::star::lang::XServiceInfo>,
328 public SfxListener
330 private:
331 ScDocShell* pDocShell;
333 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
334 GetObjectByIndex_Impl(INT32 nIndex) const;
336 public:
337 ScDrawPagesObj(ScDocShell* pDocSh);
338 virtual ~ScDrawPagesObj();
340 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
342 // XDrawPages
343 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
344 insertNewByIndex( sal_Int32 nIndex )
345 throw(::com::sun::star::uno::RuntimeException);
346 virtual void SAL_CALL remove( const ::com::sun::star::uno::Reference<
347 ::com::sun::star::drawing::XDrawPage >& xPage )
348 throw(::com::sun::star::uno::RuntimeException);
350 // XIndexAccess
351 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
352 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
353 throw(::com::sun::star::lang::IndexOutOfBoundsException,
354 ::com::sun::star::lang::WrappedTargetException,
355 ::com::sun::star::uno::RuntimeException);
357 // XElementAccess
358 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
359 throw(::com::sun::star::uno::RuntimeException);
360 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
362 // XServiceInfo
363 virtual ::rtl::OUString SAL_CALL getImplementationName()
364 throw(::com::sun::star::uno::RuntimeException);
365 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
366 throw(::com::sun::star::uno::RuntimeException);
367 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
368 throw(::com::sun::star::uno::RuntimeException);
372 class ScTableSheetsObj : public cppu::WeakImplHelper5<
373 com::sun::star::sheet::XSpreadsheets,
374 com::sun::star::sheet::XCellRangesAccess,
375 com::sun::star::container::XEnumerationAccess,
376 com::sun::star::container::XIndexAccess,
377 com::sun::star::lang::XServiceInfo>,
378 public SfxListener
380 private:
381 ScDocShell* pDocShell;
383 ScTableSheetObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
384 ScTableSheetObj* GetObjectByName_Impl(const ::rtl::OUString& aName) const;
386 public:
387 ScTableSheetsObj(ScDocShell* pDocSh);
388 virtual ~ScTableSheetsObj();
390 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
392 // XSpreadsheets
393 virtual void SAL_CALL insertNewByName( const ::rtl::OUString& aName, sal_Int16 nPosition )
394 throw(::com::sun::star::uno::RuntimeException);
395 virtual void SAL_CALL moveByName( const ::rtl::OUString& aName, sal_Int16 nDestination )
396 throw(::com::sun::star::uno::RuntimeException);
397 virtual void SAL_CALL copyByName( const ::rtl::OUString& aName,
398 const ::rtl::OUString& aCopy, sal_Int16 nDestination )
399 throw(::com::sun::star::uno::RuntimeException);
401 // XCellRangesAccess
403 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell >
404 SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet )
405 throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
407 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
408 SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet )
409 throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
411 virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > >
412 SAL_CALL getCellRangesByName( const ::rtl::OUString& aRange )
413 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
415 // XNameContainer
416 virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
417 const ::com::sun::star::uno::Any& aElement )
418 throw(::com::sun::star::lang::IllegalArgumentException,
419 ::com::sun::star::container::ElementExistException,
420 ::com::sun::star::lang::WrappedTargetException,
421 ::com::sun::star::uno::RuntimeException);
422 virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
423 throw(::com::sun::star::container::NoSuchElementException,
424 ::com::sun::star::lang::WrappedTargetException,
425 ::com::sun::star::uno::RuntimeException);
427 // XNameReplace
428 virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
429 const ::com::sun::star::uno::Any& aElement )
430 throw(::com::sun::star::lang::IllegalArgumentException,
431 ::com::sun::star::container::NoSuchElementException,
432 ::com::sun::star::lang::WrappedTargetException,
433 ::com::sun::star::uno::RuntimeException);
435 // XEnumerationAccess
436 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
437 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
439 // XElementAccess
440 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
441 throw(::com::sun::star::uno::RuntimeException);
442 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
444 // XIndexAccess
445 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
446 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
447 throw(::com::sun::star::lang::IndexOutOfBoundsException,
448 ::com::sun::star::lang::WrappedTargetException,
449 ::com::sun::star::uno::RuntimeException);
451 // XNameAccess
452 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
453 throw(::com::sun::star::container::NoSuchElementException,
454 ::com::sun::star::lang::WrappedTargetException,
455 ::com::sun::star::uno::RuntimeException);
456 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
457 throw(::com::sun::star::uno::RuntimeException);
458 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
459 throw(::com::sun::star::uno::RuntimeException);
461 // XServiceInfo
462 virtual ::rtl::OUString SAL_CALL getImplementationName()
463 throw(::com::sun::star::uno::RuntimeException);
464 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
465 throw(::com::sun::star::uno::RuntimeException);
466 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
467 throw(::com::sun::star::uno::RuntimeException);
471 class ScTableColumnsObj : public cppu::WeakImplHelper5<
472 com::sun::star::table::XTableColumns,
473 com::sun::star::container::XEnumerationAccess,
474 com::sun::star::container::XNameAccess,
475 com::sun::star::beans::XPropertySet,
476 com::sun::star::lang::XServiceInfo>,
477 public SfxListener
479 private:
480 ScDocShell* pDocShell;
481 SCTAB nTab;
482 SCCOL nStartCol;
483 SCCOL nEndCol;
485 ScTableColumnObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
486 ScTableColumnObj* GetObjectByName_Impl(const ::rtl::OUString& aName) const;
488 public:
489 ScTableColumnsObj(ScDocShell* pDocSh, SCTAB nT,
490 SCCOL nSC, SCCOL nEC);
491 virtual ~ScTableColumnsObj();
493 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
495 // XTableColumns
496 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
497 throw(::com::sun::star::uno::RuntimeException);
498 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
499 throw(::com::sun::star::uno::RuntimeException);
501 // XNameAccess
502 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
503 throw(::com::sun::star::container::NoSuchElementException,
504 ::com::sun::star::lang::WrappedTargetException,
505 ::com::sun::star::uno::RuntimeException);
506 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
507 throw(::com::sun::star::uno::RuntimeException);
508 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
509 throw(::com::sun::star::uno::RuntimeException);
511 // XIndexAccess
512 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
513 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
514 throw(::com::sun::star::lang::IndexOutOfBoundsException,
515 ::com::sun::star::lang::WrappedTargetException,
516 ::com::sun::star::uno::RuntimeException);
518 // XEnumerationAccess
519 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
520 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
522 // XElementAccess
523 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
524 throw(::com::sun::star::uno::RuntimeException);
525 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
527 // XPropertySet
528 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
529 SAL_CALL getPropertySetInfo()
530 throw(::com::sun::star::uno::RuntimeException);
531 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
532 const ::com::sun::star::uno::Any& aValue )
533 throw(::com::sun::star::beans::UnknownPropertyException,
534 ::com::sun::star::beans::PropertyVetoException,
535 ::com::sun::star::lang::IllegalArgumentException,
536 ::com::sun::star::lang::WrappedTargetException,
537 ::com::sun::star::uno::RuntimeException);
538 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
539 const ::rtl::OUString& PropertyName )
540 throw(::com::sun::star::beans::UnknownPropertyException,
541 ::com::sun::star::lang::WrappedTargetException,
542 ::com::sun::star::uno::RuntimeException);
543 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
544 const ::com::sun::star::uno::Reference<
545 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
546 throw(::com::sun::star::beans::UnknownPropertyException,
547 ::com::sun::star::lang::WrappedTargetException,
548 ::com::sun::star::uno::RuntimeException);
549 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
550 const ::com::sun::star::uno::Reference<
551 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
552 throw(::com::sun::star::beans::UnknownPropertyException,
553 ::com::sun::star::lang::WrappedTargetException,
554 ::com::sun::star::uno::RuntimeException);
555 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
556 const ::com::sun::star::uno::Reference<
557 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
558 throw(::com::sun::star::beans::UnknownPropertyException,
559 ::com::sun::star::lang::WrappedTargetException,
560 ::com::sun::star::uno::RuntimeException);
561 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
562 const ::com::sun::star::uno::Reference<
563 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
564 throw(::com::sun::star::beans::UnknownPropertyException,
565 ::com::sun::star::lang::WrappedTargetException,
566 ::com::sun::star::uno::RuntimeException);
568 // XServiceInfo
569 virtual ::rtl::OUString SAL_CALL getImplementationName()
570 throw(::com::sun::star::uno::RuntimeException);
571 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
572 throw(::com::sun::star::uno::RuntimeException);
573 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
574 throw(::com::sun::star::uno::RuntimeException);
578 class ScTableRowsObj : public cppu::WeakImplHelper4<
579 com::sun::star::table::XTableRows,
580 com::sun::star::container::XEnumerationAccess,
581 com::sun::star::beans::XPropertySet,
582 com::sun::star::lang::XServiceInfo>,
583 public SfxListener
585 private:
586 ScDocShell* pDocShell;
587 SCTAB nTab;
588 SCROW nStartRow;
589 SCROW nEndRow;
591 ScTableRowObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
593 public:
594 ScTableRowsObj(ScDocShell* pDocSh, SCTAB nT,
595 SCROW nSR, SCROW nER);
596 virtual ~ScTableRowsObj();
598 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
600 // XTableRows
601 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
602 throw(::com::sun::star::uno::RuntimeException);
603 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
604 throw(::com::sun::star::uno::RuntimeException);
606 // XIndexAccess
607 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
608 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
609 throw(::com::sun::star::lang::IndexOutOfBoundsException,
610 ::com::sun::star::lang::WrappedTargetException,
611 ::com::sun::star::uno::RuntimeException);
613 // XEnumerationAccess
614 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
615 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
617 // XElementAccess
618 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
619 throw(::com::sun::star::uno::RuntimeException);
620 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
622 // XPropertySet
623 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
624 SAL_CALL getPropertySetInfo()
625 throw(::com::sun::star::uno::RuntimeException);
626 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
627 const ::com::sun::star::uno::Any& aValue )
628 throw(::com::sun::star::beans::UnknownPropertyException,
629 ::com::sun::star::beans::PropertyVetoException,
630 ::com::sun::star::lang::IllegalArgumentException,
631 ::com::sun::star::lang::WrappedTargetException,
632 ::com::sun::star::uno::RuntimeException);
633 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
634 const ::rtl::OUString& PropertyName )
635 throw(::com::sun::star::beans::UnknownPropertyException,
636 ::com::sun::star::lang::WrappedTargetException,
637 ::com::sun::star::uno::RuntimeException);
638 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
639 const ::com::sun::star::uno::Reference<
640 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
641 throw(::com::sun::star::beans::UnknownPropertyException,
642 ::com::sun::star::lang::WrappedTargetException,
643 ::com::sun::star::uno::RuntimeException);
644 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
645 const ::com::sun::star::uno::Reference<
646 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
647 throw(::com::sun::star::beans::UnknownPropertyException,
648 ::com::sun::star::lang::WrappedTargetException,
649 ::com::sun::star::uno::RuntimeException);
650 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
651 const ::com::sun::star::uno::Reference<
652 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
653 throw(::com::sun::star::beans::UnknownPropertyException,
654 ::com::sun::star::lang::WrappedTargetException,
655 ::com::sun::star::uno::RuntimeException);
656 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
657 const ::com::sun::star::uno::Reference<
658 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
659 throw(::com::sun::star::beans::UnknownPropertyException,
660 ::com::sun::star::lang::WrappedTargetException,
661 ::com::sun::star::uno::RuntimeException);
663 // XServiceInfo
664 virtual ::rtl::OUString SAL_CALL getImplementationName()
665 throw(::com::sun::star::uno::RuntimeException);
666 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
667 throw(::com::sun::star::uno::RuntimeException);
668 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
669 throw(::com::sun::star::uno::RuntimeException);
673 class ScSpreadsheetSettingsObj : public cppu::WeakImplHelper2<
674 com::sun::star::beans::XPropertySet,
675 com::sun::star::lang::XServiceInfo>,
676 public SfxListener
678 private:
679 ScDocShell* pDocShell;
681 public:
682 //UNUSED2008-05 ScSpreadsheetSettingsObj(ScDocShell* pDocSh);
683 virtual ~ScSpreadsheetSettingsObj();
685 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
687 // XPropertySet
688 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
689 SAL_CALL getPropertySetInfo()
690 throw(::com::sun::star::uno::RuntimeException);
691 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
692 const ::com::sun::star::uno::Any& aValue )
693 throw(::com::sun::star::beans::UnknownPropertyException,
694 ::com::sun::star::beans::PropertyVetoException,
695 ::com::sun::star::lang::IllegalArgumentException,
696 ::com::sun::star::lang::WrappedTargetException,
697 ::com::sun::star::uno::RuntimeException);
698 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
699 const ::rtl::OUString& PropertyName )
700 throw(::com::sun::star::beans::UnknownPropertyException,
701 ::com::sun::star::lang::WrappedTargetException,
702 ::com::sun::star::uno::RuntimeException);
703 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
704 const ::com::sun::star::uno::Reference<
705 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
706 throw(::com::sun::star::beans::UnknownPropertyException,
707 ::com::sun::star::lang::WrappedTargetException,
708 ::com::sun::star::uno::RuntimeException);
709 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
710 const ::com::sun::star::uno::Reference<
711 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
712 throw(::com::sun::star::beans::UnknownPropertyException,
713 ::com::sun::star::lang::WrappedTargetException,
714 ::com::sun::star::uno::RuntimeException);
715 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
716 const ::com::sun::star::uno::Reference<
717 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
718 throw(::com::sun::star::beans::UnknownPropertyException,
719 ::com::sun::star::lang::WrappedTargetException,
720 ::com::sun::star::uno::RuntimeException);
721 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
722 const ::com::sun::star::uno::Reference<
723 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
724 throw(::com::sun::star::beans::UnknownPropertyException,
725 ::com::sun::star::lang::WrappedTargetException,
726 ::com::sun::star::uno::RuntimeException);
728 // XServiceInfo
729 virtual ::rtl::OUString SAL_CALL getImplementationName()
730 throw(::com::sun::star::uno::RuntimeException);
731 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
732 throw(::com::sun::star::uno::RuntimeException);
733 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
734 throw(::com::sun::star::uno::RuntimeException);
738 class ScAnnotationsObj : public cppu::WeakImplHelper3<
739 com::sun::star::sheet::XSheetAnnotations,
740 com::sun::star::container::XEnumerationAccess,
741 com::sun::star::lang::XServiceInfo>,
742 public SfxListener
744 private:
745 ScDocShell* pDocShell;
746 SCTAB nTab; // Collection haengt am Sheet
748 bool GetAddressByIndex_Impl( sal_Int32 nIndex, ScAddress& rPos ) const;
749 ScAnnotationObj* GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
751 public:
752 ScAnnotationsObj(ScDocShell* pDocSh, SCTAB nT);
753 virtual ~ScAnnotationsObj();
755 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
757 // XSheetAnnotations
758 virtual void SAL_CALL insertNew( const ::com::sun::star::table::CellAddress& aPosition,
759 const ::rtl::OUString& aText )
760 throw(::com::sun::star::uno::RuntimeException);
761 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex )
762 throw(::com::sun::star::uno::RuntimeException);
764 // XIndexAccess
765 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
766 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
767 throw(::com::sun::star::lang::IndexOutOfBoundsException,
768 ::com::sun::star::lang::WrappedTargetException,
769 ::com::sun::star::uno::RuntimeException);
771 // XEnumerationAccess
772 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
773 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
775 // XElementAccess
776 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
777 throw(::com::sun::star::uno::RuntimeException);
778 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
780 // XServiceInfo
781 virtual ::rtl::OUString SAL_CALL getImplementationName()
782 throw(::com::sun::star::uno::RuntimeException);
783 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
784 throw(::com::sun::star::uno::RuntimeException);
785 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
786 throw(::com::sun::star::uno::RuntimeException);
790 class ScScenariosObj : public cppu::WeakImplHelper4<
791 com::sun::star::sheet::XScenarios,
792 com::sun::star::container::XEnumerationAccess,
793 com::sun::star::container::XIndexAccess,
794 com::sun::star::lang::XServiceInfo>,
795 public SfxListener
797 private:
798 ScDocShell* pDocShell;
799 SCTAB nTab;
801 BOOL GetScenarioIndex_Impl( const ::rtl::OUString& rName, SCTAB& rIndex );
802 ScTableSheetObj* GetObjectByIndex_Impl(sal_Int32 nIndex);
803 ScTableSheetObj* GetObjectByName_Impl(const ::rtl::OUString& aName);
805 public:
806 ScScenariosObj(ScDocShell* pDocSh, SCTAB nT);
807 virtual ~ScScenariosObj();
809 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
811 // XScenarios
812 virtual void SAL_CALL addNewByName( const ::rtl::OUString& aName,
813 const ::com::sun::star::uno::Sequence<
814 ::com::sun::star::table::CellRangeAddress >& aRanges,
815 const ::rtl::OUString& aComment )
816 throw(::com::sun::star::uno::RuntimeException);
817 virtual void SAL_CALL removeByName( const ::rtl::OUString& aName )
818 throw(::com::sun::star::uno::RuntimeException);
820 // XNameAccess
821 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
822 throw(::com::sun::star::container::NoSuchElementException,
823 ::com::sun::star::lang::WrappedTargetException,
824 ::com::sun::star::uno::RuntimeException);
825 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
826 throw(::com::sun::star::uno::RuntimeException);
827 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
828 throw(::com::sun::star::uno::RuntimeException);
830 // XIndexAccess
831 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
832 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
833 throw(::com::sun::star::lang::IndexOutOfBoundsException,
834 ::com::sun::star::lang::WrappedTargetException,
835 ::com::sun::star::uno::RuntimeException);
837 // XEnumerationAccess
838 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
839 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
841 // XElementAccess
842 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
843 throw(::com::sun::star::uno::RuntimeException);
844 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
846 // XServiceInfo
847 virtual ::rtl::OUString SAL_CALL getImplementationName()
848 throw(::com::sun::star::uno::RuntimeException);
849 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
850 throw(::com::sun::star::uno::RuntimeException);
851 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
852 throw(::com::sun::star::uno::RuntimeException);
858 #endif