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 ************************************************************************/
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"
69 class ScAnnotationObj
;
71 class ScPrintFuncCache
;
72 class ScPrintSelectionStatus
;
73 class ScTableColumnObj
;
75 class ScTableSheetObj
;
79 class ScSheetSaveData
;
81 class SC_DLLPUBLIC ScModelObj
: public SfxBaseModel
,
82 public com::sun::star::sheet::XSpreadsheetDocument
,
83 public com::sun::star::document::XActionLockable
,
84 public com::sun::star::sheet::XCalculatable
,
85 public com::sun::star::util::XProtectable
,
86 public com::sun::star::drawing::XDrawPagesSupplier
,
87 public com::sun::star::sheet::XGoalSeek
,
88 public com::sun::star::sheet::XConsolidatable
,
89 public com::sun::star::sheet::XDocumentAuditing
,
90 public com::sun::star::style::XStyleFamiliesSupplier
,
91 public com::sun::star::view::XRenderable
,
92 public com::sun::star::document::XLinkTargetSupplier
,
93 public com::sun::star::beans::XPropertySet
,
94 public com::sun::star::document::XDocumentEventCompatibleHelper
,
95 public SvxFmMSFactory
, // derived from XMultiServiceFactory
96 public com::sun::star::lang::XServiceInfo
,
97 public ::com::sun::star::util::XChangesNotifier
100 SfxItemPropertySet aPropSet
;
101 ScDocShell
* pDocShell
;
102 ScPrintFuncCache
* pPrintFuncCache
;
103 com::sun::star::uno::Reference
<com::sun::star::uno::XAggregation
> xNumberAgg
;
104 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawGradTab
;
105 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawHatchTab
;
106 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawBitmapTab
;
107 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawTrGradTab
;
108 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawMarkerTab
;
109 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xDrawDashTab
;
110 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> xChartDataProv
;
112 ::cppu::OInterfaceContainerHelper maChangesListeners
;
114 BOOL
FillRenderMarkData( const com::sun::star::uno::Any
& aSelection
,
115 ScMarkData
& rMark
, ScPrintSelectionStatus
& rStatus
) const;
116 com::sun::star::uno::Reference
<com::sun::star::uno::XAggregation
> GetFormatter();
118 rtl::OUString maBuildId
;
119 sal_Int32 mnXlsWriteProtPass
;
121 const SfxItemPropertySet
& GetPropertySet() const { return aPropSet
; }
124 ScModelObj(ScDocShell
* pDocSh
);
125 virtual ~ScModelObj();
127 // create ScModelObj and set at pDocSh (SetBaseModel)
128 static void CreateAndSet(ScDocShell
* pDocSh
);
130 ScDocument
* GetDocument() const;
131 SfxObjectShell
* GetEmbeddedObject() const;
133 void UpdateAllRowHeights( const ScMarkData
* pTabMark
= NULL
);
135 void BeforeXMLLoading();
136 void AfterXMLLoading(sal_Bool bRet
);
137 ScSheetSaveData
* GetSheetSaveData();
139 bool HasChangesListeners() const;
141 void NotifyChanges( const ::rtl::OUString
& rOperation
, const ScRangeList
& rRanges
,
142 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rProperties
=
143 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>() );
145 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
146 const ::com::sun::star::uno::Type
& rType
)
147 throw(::com::sun::star::uno::RuntimeException
);
148 virtual void SAL_CALL
acquire() throw();
149 virtual void SAL_CALL
release() throw();
151 //? virtual UString getClassName(void);
153 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
155 // XSpreadsheetDocument
156 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XSpreadsheets
> SAL_CALL
157 getSheets() throw(::com::sun::star::uno::RuntimeException
);
159 // XStyleFamiliesSupplier
160 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
161 getStyleFamilies() throw(::com::sun::star::uno::RuntimeException
);
164 virtual sal_Int32 SAL_CALL
getRendererCount( const ::com::sun::star::uno::Any
& aSelection
,
165 const ::com::sun::star::uno::Sequence
<
166 ::com::sun::star::beans::PropertyValue
>& xOptions
)
167 throw (::com::sun::star::lang::IllegalArgumentException
,
168 ::com::sun::star::uno::RuntimeException
);
169 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
170 getRenderer( 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
);
175 virtual void SAL_CALL
render( sal_Int32 nRenderer
, const ::com::sun::star::uno::Any
& aSelection
,
176 const ::com::sun::star::uno::Sequence
<
177 ::com::sun::star::beans::PropertyValue
>& xOptions
)
178 throw (::com::sun::star::lang::IllegalArgumentException
,
179 ::com::sun::star::uno::RuntimeException
);
181 // XLinkTargetSupplier
182 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
183 getLinks() throw(::com::sun::star::uno::RuntimeException
);
186 virtual sal_Bool SAL_CALL
isActionLocked() throw(::com::sun::star::uno::RuntimeException
);
187 virtual void SAL_CALL
addActionLock() throw(::com::sun::star::uno::RuntimeException
);
188 virtual void SAL_CALL
removeActionLock() throw(::com::sun::star::uno::RuntimeException
);
189 virtual void SAL_CALL
setActionLocks( sal_Int16 nLock
)
190 throw(::com::sun::star::uno::RuntimeException
);
191 virtual sal_Int16 SAL_CALL
resetActionLocks() throw(::com::sun::star::uno::RuntimeException
);
193 virtual void SAL_CALL
lockControllers() throw (::com::sun::star::uno::RuntimeException
);
194 virtual void SAL_CALL
unlockControllers() throw (::com::sun::star::uno::RuntimeException
);
197 virtual void SAL_CALL
calculate() throw(::com::sun::star::uno::RuntimeException
);
198 virtual void SAL_CALL
calculateAll() throw(::com::sun::star::uno::RuntimeException
);
199 virtual sal_Bool SAL_CALL
isAutomaticCalculationEnabled()
200 throw(::com::sun::star::uno::RuntimeException
);
201 virtual void SAL_CALL
enableAutomaticCalculation( sal_Bool bEnabled
)
202 throw(::com::sun::star::uno::RuntimeException
);
205 virtual void SAL_CALL
protect( const ::rtl::OUString
& aPassword
)
206 throw(::com::sun::star::uno::RuntimeException
);
207 virtual void SAL_CALL
unprotect( const ::rtl::OUString
& aPassword
)
208 throw(::com::sun::star::lang::IllegalArgumentException
,
209 ::com::sun::star::uno::RuntimeException
);
210 virtual sal_Bool SAL_CALL
isProtected() throw(::com::sun::star::uno::RuntimeException
);
212 // XDrawPagesSupplier
213 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPages
> SAL_CALL
214 getDrawPages() throw(::com::sun::star::uno::RuntimeException
);
219 virtual ::com::sun::star::sheet::GoalResult SAL_CALL
seekGoal(
220 const ::com::sun::star::table::CellAddress
& aFormulaPosition
,
221 const ::com::sun::star::table::CellAddress
& aVariablePosition
,
222 const ::rtl::OUString
& aGoalValue
)
223 throw(::com::sun::star::uno::RuntimeException
);
226 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XConsolidationDescriptor
>
227 SAL_CALL
createConsolidationDescriptor( sal_Bool bEmpty
)
228 throw(::com::sun::star::uno::RuntimeException
);
229 virtual void SAL_CALL
consolidate( const ::com::sun::star::uno::Reference
<
230 ::com::sun::star::sheet::XConsolidationDescriptor
>& xDescriptor
)
231 throw(::com::sun::star::uno::RuntimeException
);
234 virtual void SAL_CALL
refreshArrows() throw(::com::sun::star::uno::RuntimeException
);
237 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
> SAL_CALL
getViewData( )
238 throw (::com::sun::star::uno::RuntimeException
);
241 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
242 SAL_CALL
getPropertySetInfo()
243 throw(::com::sun::star::uno::RuntimeException
);
244 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
245 const ::com::sun::star::uno::Any
& aValue
)
246 throw(::com::sun::star::beans::UnknownPropertyException
,
247 ::com::sun::star::beans::PropertyVetoException
,
248 ::com::sun::star::lang::IllegalArgumentException
,
249 ::com::sun::star::lang::WrappedTargetException
,
250 ::com::sun::star::uno::RuntimeException
);
251 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
252 const ::rtl::OUString
& PropertyName
)
253 throw(::com::sun::star::beans::UnknownPropertyException
,
254 ::com::sun::star::lang::WrappedTargetException
,
255 ::com::sun::star::uno::RuntimeException
);
256 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
257 const ::com::sun::star::uno::Reference
<
258 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
259 throw(::com::sun::star::beans::UnknownPropertyException
,
260 ::com::sun::star::lang::WrappedTargetException
,
261 ::com::sun::star::uno::RuntimeException
);
262 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
263 const ::com::sun::star::uno::Reference
<
264 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
265 throw(::com::sun::star::beans::UnknownPropertyException
,
266 ::com::sun::star::lang::WrappedTargetException
,
267 ::com::sun::star::uno::RuntimeException
);
268 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
269 const ::com::sun::star::uno::Reference
<
270 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
271 throw(::com::sun::star::beans::UnknownPropertyException
,
272 ::com::sun::star::lang::WrappedTargetException
,
273 ::com::sun::star::uno::RuntimeException
);
274 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
275 const ::com::sun::star::uno::Reference
<
276 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
277 throw(::com::sun::star::beans::UnknownPropertyException
,
278 ::com::sun::star::lang::WrappedTargetException
,
279 ::com::sun::star::uno::RuntimeException
);
281 // XMultiServiceFactory
282 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
283 createInstance( const ::rtl::OUString
& aServiceSpecifier
)
284 throw(::com::sun::star::uno::Exception
,
285 ::com::sun::star::uno::RuntimeException
);
286 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
287 createInstanceWithArguments( const ::rtl::OUString
& ServiceSpecifier
,
288 const ::com::sun::star::uno::Sequence
<
289 ::com::sun::star::uno::Any
>& Arguments
)
290 throw(::com::sun::star::uno::Exception
,
291 ::com::sun::star::uno::RuntimeException
);
292 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getAvailableServiceNames()
293 throw(::com::sun::star::uno::RuntimeException
);
296 virtual ::rtl::OUString SAL_CALL
getImplementationName()
297 throw(::com::sun::star::uno::RuntimeException
);
298 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
299 throw(::com::sun::star::uno::RuntimeException
);
300 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
301 throw(::com::sun::star::uno::RuntimeException
);
304 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
<
305 sal_Int8
>& aIdentifier
)
306 throw(::com::sun::star::uno::RuntimeException
);
308 static const com::sun::star::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
309 static ScModelObj
* getImplementation( const com::sun::star::uno::Reference
<
310 com::sun::star::uno::XInterface
> xObj
);
313 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes()
314 throw(::com::sun::star::uno::RuntimeException
);
315 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
316 throw(::com::sun::star::uno::RuntimeException
);
319 virtual void SAL_CALL
addChangesListener( const ::com::sun::star::uno::Reference
<
320 ::com::sun::star::util::XChangesListener
>& aListener
)
321 throw (::com::sun::star::uno::RuntimeException
);
322 virtual void SAL_CALL
removeChangesListener( const ::com::sun::star::uno::Reference
<
323 ::com::sun::star::util::XChangesListener
>& aListener
)
324 throw (::com::sun::star::uno::RuntimeException
);
326 virtual sal_Bool SAL_CALL
processCompatibleEvent( sal_Int16 nEventId
) throw (::com::sun::star::uno::RuntimeException
);
330 class ScDrawPagesObj
: public cppu::WeakImplHelper2
<
331 com::sun::star::drawing::XDrawPages
,
332 com::sun::star::lang::XServiceInfo
>,
336 ScDocShell
* pDocShell
;
338 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
>
339 GetObjectByIndex_Impl(INT32 nIndex
) const;
342 ScDrawPagesObj(ScDocShell
* pDocSh
);
343 virtual ~ScDrawPagesObj();
345 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
348 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
> SAL_CALL
349 insertNewByIndex( sal_Int32 nIndex
)
350 throw(::com::sun::star::uno::RuntimeException
);
351 virtual void SAL_CALL
remove( const ::com::sun::star::uno::Reference
<
352 ::com::sun::star::drawing::XDrawPage
>& xPage
)
353 throw(::com::sun::star::uno::RuntimeException
);
356 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
357 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
358 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
359 ::com::sun::star::lang::WrappedTargetException
,
360 ::com::sun::star::uno::RuntimeException
);
363 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
364 throw(::com::sun::star::uno::RuntimeException
);
365 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
368 virtual ::rtl::OUString SAL_CALL
getImplementationName()
369 throw(::com::sun::star::uno::RuntimeException
);
370 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
371 throw(::com::sun::star::uno::RuntimeException
);
372 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
373 throw(::com::sun::star::uno::RuntimeException
);
377 class ScTableSheetsObj
: public cppu::WeakImplHelper5
<
378 com::sun::star::sheet::XSpreadsheets
,
379 com::sun::star::sheet::XCellRangesAccess
,
380 com::sun::star::container::XEnumerationAccess
,
381 com::sun::star::container::XIndexAccess
,
382 com::sun::star::lang::XServiceInfo
>,
386 ScDocShell
* pDocShell
;
388 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
389 ScTableSheetObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
) const;
392 ScTableSheetsObj(ScDocShell
* pDocSh
);
393 virtual ~ScTableSheetsObj();
395 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
398 virtual void SAL_CALL
insertNewByName( const ::rtl::OUString
& aName
, sal_Int16 nPosition
)
399 throw(::com::sun::star::uno::RuntimeException
);
400 virtual void SAL_CALL
moveByName( const ::rtl::OUString
& aName
, sal_Int16 nDestination
)
401 throw(::com::sun::star::uno::RuntimeException
);
402 virtual void SAL_CALL
copyByName( const ::rtl::OUString
& aName
,
403 const ::rtl::OUString
& aCopy
, sal_Int16 nDestination
)
404 throw(::com::sun::star::uno::RuntimeException
);
408 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
>
409 SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
, sal_Int32 nSheet
)
410 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
412 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
>
413 SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
, sal_Int32 nSheet
)
414 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
416 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> >
417 SAL_CALL
getCellRangesByName( const ::rtl::OUString
& aRange
)
418 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
421 virtual void SAL_CALL
insertByName( const ::rtl::OUString
& aName
,
422 const ::com::sun::star::uno::Any
& aElement
)
423 throw(::com::sun::star::lang::IllegalArgumentException
,
424 ::com::sun::star::container::ElementExistException
,
425 ::com::sun::star::lang::WrappedTargetException
,
426 ::com::sun::star::uno::RuntimeException
);
427 virtual void SAL_CALL
removeByName( const ::rtl::OUString
& Name
)
428 throw(::com::sun::star::container::NoSuchElementException
,
429 ::com::sun::star::lang::WrappedTargetException
,
430 ::com::sun::star::uno::RuntimeException
);
433 virtual void SAL_CALL
replaceByName( const ::rtl::OUString
& aName
,
434 const ::com::sun::star::uno::Any
& aElement
)
435 throw(::com::sun::star::lang::IllegalArgumentException
,
436 ::com::sun::star::container::NoSuchElementException
,
437 ::com::sun::star::lang::WrappedTargetException
,
438 ::com::sun::star::uno::RuntimeException
);
440 // XEnumerationAccess
441 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
442 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
445 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
446 throw(::com::sun::star::uno::RuntimeException
);
447 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
450 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
451 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
452 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
453 ::com::sun::star::lang::WrappedTargetException
,
454 ::com::sun::star::uno::RuntimeException
);
457 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
458 throw(::com::sun::star::container::NoSuchElementException
,
459 ::com::sun::star::lang::WrappedTargetException
,
460 ::com::sun::star::uno::RuntimeException
);
461 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
462 throw(::com::sun::star::uno::RuntimeException
);
463 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
464 throw(::com::sun::star::uno::RuntimeException
);
467 virtual ::rtl::OUString SAL_CALL
getImplementationName()
468 throw(::com::sun::star::uno::RuntimeException
);
469 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
470 throw(::com::sun::star::uno::RuntimeException
);
471 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
472 throw(::com::sun::star::uno::RuntimeException
);
476 class ScTableColumnsObj
: public cppu::WeakImplHelper5
<
477 com::sun::star::table::XTableColumns
,
478 com::sun::star::container::XEnumerationAccess
,
479 com::sun::star::container::XNameAccess
,
480 com::sun::star::beans::XPropertySet
,
481 com::sun::star::lang::XServiceInfo
>,
485 ScDocShell
* pDocShell
;
490 ScTableColumnObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
491 ScTableColumnObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
) const;
494 ScTableColumnsObj(ScDocShell
* pDocSh
, SCTAB nT
,
495 SCCOL nSC
, SCCOL nEC
);
496 virtual ~ScTableColumnsObj();
498 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
501 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
502 throw(::com::sun::star::uno::RuntimeException
);
503 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
504 throw(::com::sun::star::uno::RuntimeException
);
507 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
508 throw(::com::sun::star::container::NoSuchElementException
,
509 ::com::sun::star::lang::WrappedTargetException
,
510 ::com::sun::star::uno::RuntimeException
);
511 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
512 throw(::com::sun::star::uno::RuntimeException
);
513 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
514 throw(::com::sun::star::uno::RuntimeException
);
517 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
518 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
519 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
520 ::com::sun::star::lang::WrappedTargetException
,
521 ::com::sun::star::uno::RuntimeException
);
523 // XEnumerationAccess
524 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
525 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
528 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
529 throw(::com::sun::star::uno::RuntimeException
);
530 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
533 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
534 SAL_CALL
getPropertySetInfo()
535 throw(::com::sun::star::uno::RuntimeException
);
536 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
537 const ::com::sun::star::uno::Any
& aValue
)
538 throw(::com::sun::star::beans::UnknownPropertyException
,
539 ::com::sun::star::beans::PropertyVetoException
,
540 ::com::sun::star::lang::IllegalArgumentException
,
541 ::com::sun::star::lang::WrappedTargetException
,
542 ::com::sun::star::uno::RuntimeException
);
543 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
544 const ::rtl::OUString
& PropertyName
)
545 throw(::com::sun::star::beans::UnknownPropertyException
,
546 ::com::sun::star::lang::WrappedTargetException
,
547 ::com::sun::star::uno::RuntimeException
);
548 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
549 const ::com::sun::star::uno::Reference
<
550 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
551 throw(::com::sun::star::beans::UnknownPropertyException
,
552 ::com::sun::star::lang::WrappedTargetException
,
553 ::com::sun::star::uno::RuntimeException
);
554 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
555 const ::com::sun::star::uno::Reference
<
556 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
557 throw(::com::sun::star::beans::UnknownPropertyException
,
558 ::com::sun::star::lang::WrappedTargetException
,
559 ::com::sun::star::uno::RuntimeException
);
560 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
561 const ::com::sun::star::uno::Reference
<
562 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
563 throw(::com::sun::star::beans::UnknownPropertyException
,
564 ::com::sun::star::lang::WrappedTargetException
,
565 ::com::sun::star::uno::RuntimeException
);
566 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
567 const ::com::sun::star::uno::Reference
<
568 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
569 throw(::com::sun::star::beans::UnknownPropertyException
,
570 ::com::sun::star::lang::WrappedTargetException
,
571 ::com::sun::star::uno::RuntimeException
);
574 virtual ::rtl::OUString SAL_CALL
getImplementationName()
575 throw(::com::sun::star::uno::RuntimeException
);
576 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
577 throw(::com::sun::star::uno::RuntimeException
);
578 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
579 throw(::com::sun::star::uno::RuntimeException
);
583 class ScTableRowsObj
: public cppu::WeakImplHelper4
<
584 com::sun::star::table::XTableRows
,
585 com::sun::star::container::XEnumerationAccess
,
586 com::sun::star::beans::XPropertySet
,
587 com::sun::star::lang::XServiceInfo
>,
591 ScDocShell
* pDocShell
;
596 ScTableRowObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
599 ScTableRowsObj(ScDocShell
* pDocSh
, SCTAB nT
,
600 SCROW nSR
, SCROW nER
);
601 virtual ~ScTableRowsObj();
603 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
606 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
607 throw(::com::sun::star::uno::RuntimeException
);
608 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
609 throw(::com::sun::star::uno::RuntimeException
);
612 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
613 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
614 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
615 ::com::sun::star::lang::WrappedTargetException
,
616 ::com::sun::star::uno::RuntimeException
);
618 // XEnumerationAccess
619 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
620 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
623 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
624 throw(::com::sun::star::uno::RuntimeException
);
625 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
628 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
629 SAL_CALL
getPropertySetInfo()
630 throw(::com::sun::star::uno::RuntimeException
);
631 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
632 const ::com::sun::star::uno::Any
& aValue
)
633 throw(::com::sun::star::beans::UnknownPropertyException
,
634 ::com::sun::star::beans::PropertyVetoException
,
635 ::com::sun::star::lang::IllegalArgumentException
,
636 ::com::sun::star::lang::WrappedTargetException
,
637 ::com::sun::star::uno::RuntimeException
);
638 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
639 const ::rtl::OUString
& PropertyName
)
640 throw(::com::sun::star::beans::UnknownPropertyException
,
641 ::com::sun::star::lang::WrappedTargetException
,
642 ::com::sun::star::uno::RuntimeException
);
643 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
644 const ::com::sun::star::uno::Reference
<
645 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
646 throw(::com::sun::star::beans::UnknownPropertyException
,
647 ::com::sun::star::lang::WrappedTargetException
,
648 ::com::sun::star::uno::RuntimeException
);
649 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
650 const ::com::sun::star::uno::Reference
<
651 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
652 throw(::com::sun::star::beans::UnknownPropertyException
,
653 ::com::sun::star::lang::WrappedTargetException
,
654 ::com::sun::star::uno::RuntimeException
);
655 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
656 const ::com::sun::star::uno::Reference
<
657 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
658 throw(::com::sun::star::beans::UnknownPropertyException
,
659 ::com::sun::star::lang::WrappedTargetException
,
660 ::com::sun::star::uno::RuntimeException
);
661 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
662 const ::com::sun::star::uno::Reference
<
663 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
664 throw(::com::sun::star::beans::UnknownPropertyException
,
665 ::com::sun::star::lang::WrappedTargetException
,
666 ::com::sun::star::uno::RuntimeException
);
669 virtual ::rtl::OUString SAL_CALL
getImplementationName()
670 throw(::com::sun::star::uno::RuntimeException
);
671 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
672 throw(::com::sun::star::uno::RuntimeException
);
673 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
674 throw(::com::sun::star::uno::RuntimeException
);
678 class ScSpreadsheetSettingsObj
: public cppu::WeakImplHelper2
<
679 com::sun::star::beans::XPropertySet
,
680 com::sun::star::lang::XServiceInfo
>,
684 ScDocShell
* pDocShell
;
687 //UNUSED2008-05 ScSpreadsheetSettingsObj(ScDocShell* pDocSh);
688 virtual ~ScSpreadsheetSettingsObj();
690 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
693 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
694 SAL_CALL
getPropertySetInfo()
695 throw(::com::sun::star::uno::RuntimeException
);
696 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
697 const ::com::sun::star::uno::Any
& aValue
)
698 throw(::com::sun::star::beans::UnknownPropertyException
,
699 ::com::sun::star::beans::PropertyVetoException
,
700 ::com::sun::star::lang::IllegalArgumentException
,
701 ::com::sun::star::lang::WrappedTargetException
,
702 ::com::sun::star::uno::RuntimeException
);
703 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
704 const ::rtl::OUString
& PropertyName
)
705 throw(::com::sun::star::beans::UnknownPropertyException
,
706 ::com::sun::star::lang::WrappedTargetException
,
707 ::com::sun::star::uno::RuntimeException
);
708 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
709 const ::com::sun::star::uno::Reference
<
710 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
711 throw(::com::sun::star::beans::UnknownPropertyException
,
712 ::com::sun::star::lang::WrappedTargetException
,
713 ::com::sun::star::uno::RuntimeException
);
714 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
715 const ::com::sun::star::uno::Reference
<
716 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
717 throw(::com::sun::star::beans::UnknownPropertyException
,
718 ::com::sun::star::lang::WrappedTargetException
,
719 ::com::sun::star::uno::RuntimeException
);
720 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
721 const ::com::sun::star::uno::Reference
<
722 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
723 throw(::com::sun::star::beans::UnknownPropertyException
,
724 ::com::sun::star::lang::WrappedTargetException
,
725 ::com::sun::star::uno::RuntimeException
);
726 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
727 const ::com::sun::star::uno::Reference
<
728 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
729 throw(::com::sun::star::beans::UnknownPropertyException
,
730 ::com::sun::star::lang::WrappedTargetException
,
731 ::com::sun::star::uno::RuntimeException
);
734 virtual ::rtl::OUString SAL_CALL
getImplementationName()
735 throw(::com::sun::star::uno::RuntimeException
);
736 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
737 throw(::com::sun::star::uno::RuntimeException
);
738 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
739 throw(::com::sun::star::uno::RuntimeException
);
743 class ScAnnotationsObj
: public cppu::WeakImplHelper3
<
744 com::sun::star::sheet::XSheetAnnotations
,
745 com::sun::star::container::XEnumerationAccess
,
746 com::sun::star::lang::XServiceInfo
>,
750 ScDocShell
* pDocShell
;
751 SCTAB nTab
; // Collection haengt am Sheet
753 bool GetAddressByIndex_Impl( sal_Int32 nIndex
, ScAddress
& rPos
) const;
754 ScAnnotationObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
757 ScAnnotationsObj(ScDocShell
* pDocSh
, SCTAB nT
);
758 virtual ~ScAnnotationsObj();
760 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
763 virtual void SAL_CALL
insertNew( const ::com::sun::star::table::CellAddress
& aPosition
,
764 const ::rtl::OUString
& aText
)
765 throw(::com::sun::star::uno::RuntimeException
);
766 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
)
767 throw(::com::sun::star::uno::RuntimeException
);
770 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
771 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
772 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
773 ::com::sun::star::lang::WrappedTargetException
,
774 ::com::sun::star::uno::RuntimeException
);
776 // XEnumerationAccess
777 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
778 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
781 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
782 throw(::com::sun::star::uno::RuntimeException
);
783 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
786 virtual ::rtl::OUString SAL_CALL
getImplementationName()
787 throw(::com::sun::star::uno::RuntimeException
);
788 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
789 throw(::com::sun::star::uno::RuntimeException
);
790 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
791 throw(::com::sun::star::uno::RuntimeException
);
795 class ScScenariosObj
: public cppu::WeakImplHelper4
<
796 com::sun::star::sheet::XScenarios
,
797 com::sun::star::container::XEnumerationAccess
,
798 com::sun::star::container::XIndexAccess
,
799 com::sun::star::lang::XServiceInfo
>,
803 ScDocShell
* pDocShell
;
806 BOOL
GetScenarioIndex_Impl( const ::rtl::OUString
& rName
, SCTAB
& rIndex
);
807 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
);
808 ScTableSheetObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
);
811 ScScenariosObj(ScDocShell
* pDocSh
, SCTAB nT
);
812 virtual ~ScScenariosObj();
814 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
817 virtual void SAL_CALL
addNewByName( const ::rtl::OUString
& aName
,
818 const ::com::sun::star::uno::Sequence
<
819 ::com::sun::star::table::CellRangeAddress
>& aRanges
,
820 const ::rtl::OUString
& aComment
)
821 throw(::com::sun::star::uno::RuntimeException
);
822 virtual void SAL_CALL
removeByName( const ::rtl::OUString
& aName
)
823 throw(::com::sun::star::uno::RuntimeException
);
826 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
827 throw(::com::sun::star::container::NoSuchElementException
,
828 ::com::sun::star::lang::WrappedTargetException
,
829 ::com::sun::star::uno::RuntimeException
);
830 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
831 throw(::com::sun::star::uno::RuntimeException
);
832 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
833 throw(::com::sun::star::uno::RuntimeException
);
836 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
837 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
838 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
839 ::com::sun::star::lang::WrappedTargetException
,
840 ::com::sun::star::uno::RuntimeException
);
842 // XEnumerationAccess
843 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
844 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
847 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
848 throw(::com::sun::star::uno::RuntimeException
);
849 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
852 virtual ::rtl::OUString SAL_CALL
getImplementationName()
853 throw(::com::sun::star::uno::RuntimeException
);
854 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
855 throw(::com::sun::star::uno::RuntimeException
);
856 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
857 throw(::com::sun::star::uno::RuntimeException
);