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
;
120 const SfxItemPropertySet
& GetPropertySet() const { return aPropSet
; }
123 ScModelObj(ScDocShell
* pDocSh
);
124 virtual ~ScModelObj();
126 // create ScModelObj and set at pDocSh (SetBaseModel)
127 static void CreateAndSet(ScDocShell
* pDocSh
);
129 ScDocument
* GetDocument() const;
130 SfxObjectShell
* GetEmbeddedObject() const;
132 void UpdateAllRowHeights( const ScMarkData
* pTabMark
= NULL
);
134 void BeforeXMLLoading();
135 void AfterXMLLoading(sal_Bool bRet
);
136 ScSheetSaveData
* GetSheetSaveData();
138 bool HasChangesListeners() const;
140 void NotifyChanges( const ::rtl::OUString
& rOperation
, const ScRangeList
& rRanges
,
141 const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rProperties
=
142 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>() );
144 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface(
145 const ::com::sun::star::uno::Type
& rType
)
146 throw(::com::sun::star::uno::RuntimeException
);
147 virtual void SAL_CALL
acquire() throw();
148 virtual void SAL_CALL
release() throw();
150 //? virtual UString getClassName(void);
152 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
154 // XSpreadsheetDocument
155 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XSpreadsheets
> SAL_CALL
156 getSheets() throw(::com::sun::star::uno::RuntimeException
);
158 // XStyleFamiliesSupplier
159 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
160 getStyleFamilies() throw(::com::sun::star::uno::RuntimeException
);
163 virtual sal_Int32 SAL_CALL
getRendererCount( const ::com::sun::star::uno::Any
& aSelection
,
164 const ::com::sun::star::uno::Sequence
<
165 ::com::sun::star::beans::PropertyValue
>& xOptions
)
166 throw (::com::sun::star::lang::IllegalArgumentException
,
167 ::com::sun::star::uno::RuntimeException
);
168 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> SAL_CALL
169 getRenderer( sal_Int32 nRenderer
, const ::com::sun::star::uno::Any
& aSelection
,
170 const ::com::sun::star::uno::Sequence
<
171 ::com::sun::star::beans::PropertyValue
>& xOptions
)
172 throw (::com::sun::star::lang::IllegalArgumentException
,
173 ::com::sun::star::uno::RuntimeException
);
174 virtual void SAL_CALL
render( sal_Int32 nRenderer
, const ::com::sun::star::uno::Any
& aSelection
,
175 const ::com::sun::star::uno::Sequence
<
176 ::com::sun::star::beans::PropertyValue
>& xOptions
)
177 throw (::com::sun::star::lang::IllegalArgumentException
,
178 ::com::sun::star::uno::RuntimeException
);
180 // XLinkTargetSupplier
181 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
182 getLinks() throw(::com::sun::star::uno::RuntimeException
);
185 virtual sal_Bool SAL_CALL
isActionLocked() throw(::com::sun::star::uno::RuntimeException
);
186 virtual void SAL_CALL
addActionLock() throw(::com::sun::star::uno::RuntimeException
);
187 virtual void SAL_CALL
removeActionLock() throw(::com::sun::star::uno::RuntimeException
);
188 virtual void SAL_CALL
setActionLocks( sal_Int16 nLock
)
189 throw(::com::sun::star::uno::RuntimeException
);
190 virtual sal_Int16 SAL_CALL
resetActionLocks() throw(::com::sun::star::uno::RuntimeException
);
192 virtual void SAL_CALL
lockControllers() throw (::com::sun::star::uno::RuntimeException
);
193 virtual void SAL_CALL
unlockControllers() throw (::com::sun::star::uno::RuntimeException
);
196 virtual void SAL_CALL
calculate() throw(::com::sun::star::uno::RuntimeException
);
197 virtual void SAL_CALL
calculateAll() throw(::com::sun::star::uno::RuntimeException
);
198 virtual sal_Bool SAL_CALL
isAutomaticCalculationEnabled()
199 throw(::com::sun::star::uno::RuntimeException
);
200 virtual void SAL_CALL
enableAutomaticCalculation( sal_Bool bEnabled
)
201 throw(::com::sun::star::uno::RuntimeException
);
204 virtual void SAL_CALL
protect( const ::rtl::OUString
& aPassword
)
205 throw(::com::sun::star::uno::RuntimeException
);
206 virtual void SAL_CALL
unprotect( const ::rtl::OUString
& aPassword
)
207 throw(::com::sun::star::lang::IllegalArgumentException
,
208 ::com::sun::star::uno::RuntimeException
);
209 virtual sal_Bool SAL_CALL
isProtected() throw(::com::sun::star::uno::RuntimeException
);
211 // XDrawPagesSupplier
212 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPages
> SAL_CALL
213 getDrawPages() throw(::com::sun::star::uno::RuntimeException
);
218 virtual ::com::sun::star::sheet::GoalResult SAL_CALL
seekGoal(
219 const ::com::sun::star::table::CellAddress
& aFormulaPosition
,
220 const ::com::sun::star::table::CellAddress
& aVariablePosition
,
221 const ::rtl::OUString
& aGoalValue
)
222 throw(::com::sun::star::uno::RuntimeException
);
225 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sheet::XConsolidationDescriptor
>
226 SAL_CALL
createConsolidationDescriptor( sal_Bool bEmpty
)
227 throw(::com::sun::star::uno::RuntimeException
);
228 virtual void SAL_CALL
consolidate( const ::com::sun::star::uno::Reference
<
229 ::com::sun::star::sheet::XConsolidationDescriptor
>& xDescriptor
)
230 throw(::com::sun::star::uno::RuntimeException
);
233 virtual void SAL_CALL
refreshArrows() throw(::com::sun::star::uno::RuntimeException
);
236 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XIndexAccess
> SAL_CALL
getViewData( )
237 throw (::com::sun::star::uno::RuntimeException
);
240 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
241 SAL_CALL
getPropertySetInfo()
242 throw(::com::sun::star::uno::RuntimeException
);
243 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
244 const ::com::sun::star::uno::Any
& aValue
)
245 throw(::com::sun::star::beans::UnknownPropertyException
,
246 ::com::sun::star::beans::PropertyVetoException
,
247 ::com::sun::star::lang::IllegalArgumentException
,
248 ::com::sun::star::lang::WrappedTargetException
,
249 ::com::sun::star::uno::RuntimeException
);
250 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
251 const ::rtl::OUString
& PropertyName
)
252 throw(::com::sun::star::beans::UnknownPropertyException
,
253 ::com::sun::star::lang::WrappedTargetException
,
254 ::com::sun::star::uno::RuntimeException
);
255 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
256 const ::com::sun::star::uno::Reference
<
257 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
258 throw(::com::sun::star::beans::UnknownPropertyException
,
259 ::com::sun::star::lang::WrappedTargetException
,
260 ::com::sun::star::uno::RuntimeException
);
261 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
262 const ::com::sun::star::uno::Reference
<
263 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
264 throw(::com::sun::star::beans::UnknownPropertyException
,
265 ::com::sun::star::lang::WrappedTargetException
,
266 ::com::sun::star::uno::RuntimeException
);
267 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
268 const ::com::sun::star::uno::Reference
<
269 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
270 throw(::com::sun::star::beans::UnknownPropertyException
,
271 ::com::sun::star::lang::WrappedTargetException
,
272 ::com::sun::star::uno::RuntimeException
);
273 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
274 const ::com::sun::star::uno::Reference
<
275 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
276 throw(::com::sun::star::beans::UnknownPropertyException
,
277 ::com::sun::star::lang::WrappedTargetException
,
278 ::com::sun::star::uno::RuntimeException
);
280 // XMultiServiceFactory
281 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
282 createInstance( const ::rtl::OUString
& aServiceSpecifier
)
283 throw(::com::sun::star::uno::Exception
,
284 ::com::sun::star::uno::RuntimeException
);
285 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
286 createInstanceWithArguments( const ::rtl::OUString
& ServiceSpecifier
,
287 const ::com::sun::star::uno::Sequence
<
288 ::com::sun::star::uno::Any
>& Arguments
)
289 throw(::com::sun::star::uno::Exception
,
290 ::com::sun::star::uno::RuntimeException
);
291 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getAvailableServiceNames()
292 throw(::com::sun::star::uno::RuntimeException
);
295 virtual ::rtl::OUString SAL_CALL
getImplementationName()
296 throw(::com::sun::star::uno::RuntimeException
);
297 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
298 throw(::com::sun::star::uno::RuntimeException
);
299 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
300 throw(::com::sun::star::uno::RuntimeException
);
303 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
<
304 sal_Int8
>& aIdentifier
)
305 throw(::com::sun::star::uno::RuntimeException
);
307 static const com::sun::star::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
308 static ScModelObj
* getImplementation( const com::sun::star::uno::Reference
<
309 com::sun::star::uno::XInterface
> xObj
);
312 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes()
313 throw(::com::sun::star::uno::RuntimeException
);
314 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
315 throw(::com::sun::star::uno::RuntimeException
);
318 virtual void SAL_CALL
addChangesListener( const ::com::sun::star::uno::Reference
<
319 ::com::sun::star::util::XChangesListener
>& aListener
)
320 throw (::com::sun::star::uno::RuntimeException
);
321 virtual void SAL_CALL
removeChangesListener( const ::com::sun::star::uno::Reference
<
322 ::com::sun::star::util::XChangesListener
>& aListener
)
323 throw (::com::sun::star::uno::RuntimeException
);
325 virtual sal_Bool SAL_CALL
processCompatibleEvent( sal_Int16 nEventId
) throw (::com::sun::star::uno::RuntimeException
);
329 class ScDrawPagesObj
: public cppu::WeakImplHelper2
<
330 com::sun::star::drawing::XDrawPages
,
331 com::sun::star::lang::XServiceInfo
>,
335 ScDocShell
* pDocShell
;
337 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
>
338 GetObjectByIndex_Impl(INT32 nIndex
) const;
341 ScDrawPagesObj(ScDocShell
* pDocSh
);
342 virtual ~ScDrawPagesObj();
344 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
347 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XDrawPage
> SAL_CALL
348 insertNewByIndex( sal_Int32 nIndex
)
349 throw(::com::sun::star::uno::RuntimeException
);
350 virtual void SAL_CALL
remove( const ::com::sun::star::uno::Reference
<
351 ::com::sun::star::drawing::XDrawPage
>& xPage
)
352 throw(::com::sun::star::uno::RuntimeException
);
355 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
356 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
357 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
358 ::com::sun::star::lang::WrappedTargetException
,
359 ::com::sun::star::uno::RuntimeException
);
362 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
363 throw(::com::sun::star::uno::RuntimeException
);
364 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
367 virtual ::rtl::OUString SAL_CALL
getImplementationName()
368 throw(::com::sun::star::uno::RuntimeException
);
369 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
370 throw(::com::sun::star::uno::RuntimeException
);
371 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
372 throw(::com::sun::star::uno::RuntimeException
);
376 class ScTableSheetsObj
: public cppu::WeakImplHelper5
<
377 com::sun::star::sheet::XSpreadsheets
,
378 com::sun::star::sheet::XCellRangesAccess
,
379 com::sun::star::container::XEnumerationAccess
,
380 com::sun::star::container::XIndexAccess
,
381 com::sun::star::lang::XServiceInfo
>,
385 ScDocShell
* pDocShell
;
387 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
388 ScTableSheetObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
) const;
391 ScTableSheetsObj(ScDocShell
* pDocSh
);
392 virtual ~ScTableSheetsObj();
394 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
397 virtual void SAL_CALL
insertNewByName( const ::rtl::OUString
& aName
, sal_Int16 nPosition
)
398 throw(::com::sun::star::uno::RuntimeException
);
399 virtual void SAL_CALL
moveByName( const ::rtl::OUString
& aName
, sal_Int16 nDestination
)
400 throw(::com::sun::star::uno::RuntimeException
);
401 virtual void SAL_CALL
copyByName( const ::rtl::OUString
& aName
,
402 const ::rtl::OUString
& aCopy
, sal_Int16 nDestination
)
403 throw(::com::sun::star::uno::RuntimeException
);
407 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCell
>
408 SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
, sal_Int32 nSheet
)
409 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
411 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
>
412 SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
, sal_Int32 nSheet
)
413 throw (::com::sun::star::lang::IndexOutOfBoundsException
, ::com::sun::star::uno::RuntimeException
);
415 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::table::XCellRange
> >
416 SAL_CALL
getCellRangesByName( const ::rtl::OUString
& aRange
)
417 throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
);
420 virtual void SAL_CALL
insertByName( const ::rtl::OUString
& aName
,
421 const ::com::sun::star::uno::Any
& aElement
)
422 throw(::com::sun::star::lang::IllegalArgumentException
,
423 ::com::sun::star::container::ElementExistException
,
424 ::com::sun::star::lang::WrappedTargetException
,
425 ::com::sun::star::uno::RuntimeException
);
426 virtual void SAL_CALL
removeByName( const ::rtl::OUString
& Name
)
427 throw(::com::sun::star::container::NoSuchElementException
,
428 ::com::sun::star::lang::WrappedTargetException
,
429 ::com::sun::star::uno::RuntimeException
);
432 virtual void SAL_CALL
replaceByName( const ::rtl::OUString
& aName
,
433 const ::com::sun::star::uno::Any
& aElement
)
434 throw(::com::sun::star::lang::IllegalArgumentException
,
435 ::com::sun::star::container::NoSuchElementException
,
436 ::com::sun::star::lang::WrappedTargetException
,
437 ::com::sun::star::uno::RuntimeException
);
439 // XEnumerationAccess
440 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
441 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
444 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
445 throw(::com::sun::star::uno::RuntimeException
);
446 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
449 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
450 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
451 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
452 ::com::sun::star::lang::WrappedTargetException
,
453 ::com::sun::star::uno::RuntimeException
);
456 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
457 throw(::com::sun::star::container::NoSuchElementException
,
458 ::com::sun::star::lang::WrappedTargetException
,
459 ::com::sun::star::uno::RuntimeException
);
460 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
461 throw(::com::sun::star::uno::RuntimeException
);
462 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
463 throw(::com::sun::star::uno::RuntimeException
);
466 virtual ::rtl::OUString SAL_CALL
getImplementationName()
467 throw(::com::sun::star::uno::RuntimeException
);
468 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
469 throw(::com::sun::star::uno::RuntimeException
);
470 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
471 throw(::com::sun::star::uno::RuntimeException
);
475 class ScTableColumnsObj
: public cppu::WeakImplHelper5
<
476 com::sun::star::table::XTableColumns
,
477 com::sun::star::container::XEnumerationAccess
,
478 com::sun::star::container::XNameAccess
,
479 com::sun::star::beans::XPropertySet
,
480 com::sun::star::lang::XServiceInfo
>,
484 ScDocShell
* pDocShell
;
489 ScTableColumnObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
490 ScTableColumnObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
) const;
493 ScTableColumnsObj(ScDocShell
* pDocSh
, SCTAB nT
,
494 SCCOL nSC
, SCCOL nEC
);
495 virtual ~ScTableColumnsObj();
497 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
500 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
501 throw(::com::sun::star::uno::RuntimeException
);
502 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
503 throw(::com::sun::star::uno::RuntimeException
);
506 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
507 throw(::com::sun::star::container::NoSuchElementException
,
508 ::com::sun::star::lang::WrappedTargetException
,
509 ::com::sun::star::uno::RuntimeException
);
510 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
511 throw(::com::sun::star::uno::RuntimeException
);
512 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
513 throw(::com::sun::star::uno::RuntimeException
);
516 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
517 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
518 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
519 ::com::sun::star::lang::WrappedTargetException
,
520 ::com::sun::star::uno::RuntimeException
);
522 // XEnumerationAccess
523 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
524 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
527 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
528 throw(::com::sun::star::uno::RuntimeException
);
529 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
532 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
533 SAL_CALL
getPropertySetInfo()
534 throw(::com::sun::star::uno::RuntimeException
);
535 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
536 const ::com::sun::star::uno::Any
& aValue
)
537 throw(::com::sun::star::beans::UnknownPropertyException
,
538 ::com::sun::star::beans::PropertyVetoException
,
539 ::com::sun::star::lang::IllegalArgumentException
,
540 ::com::sun::star::lang::WrappedTargetException
,
541 ::com::sun::star::uno::RuntimeException
);
542 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
543 const ::rtl::OUString
& PropertyName
)
544 throw(::com::sun::star::beans::UnknownPropertyException
,
545 ::com::sun::star::lang::WrappedTargetException
,
546 ::com::sun::star::uno::RuntimeException
);
547 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
548 const ::com::sun::star::uno::Reference
<
549 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
550 throw(::com::sun::star::beans::UnknownPropertyException
,
551 ::com::sun::star::lang::WrappedTargetException
,
552 ::com::sun::star::uno::RuntimeException
);
553 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
554 const ::com::sun::star::uno::Reference
<
555 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
556 throw(::com::sun::star::beans::UnknownPropertyException
,
557 ::com::sun::star::lang::WrappedTargetException
,
558 ::com::sun::star::uno::RuntimeException
);
559 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
560 const ::com::sun::star::uno::Reference
<
561 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
562 throw(::com::sun::star::beans::UnknownPropertyException
,
563 ::com::sun::star::lang::WrappedTargetException
,
564 ::com::sun::star::uno::RuntimeException
);
565 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
566 const ::com::sun::star::uno::Reference
<
567 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
568 throw(::com::sun::star::beans::UnknownPropertyException
,
569 ::com::sun::star::lang::WrappedTargetException
,
570 ::com::sun::star::uno::RuntimeException
);
573 virtual ::rtl::OUString SAL_CALL
getImplementationName()
574 throw(::com::sun::star::uno::RuntimeException
);
575 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
576 throw(::com::sun::star::uno::RuntimeException
);
577 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
578 throw(::com::sun::star::uno::RuntimeException
);
582 class ScTableRowsObj
: public cppu::WeakImplHelper4
<
583 com::sun::star::table::XTableRows
,
584 com::sun::star::container::XEnumerationAccess
,
585 com::sun::star::beans::XPropertySet
,
586 com::sun::star::lang::XServiceInfo
>,
590 ScDocShell
* pDocShell
;
595 ScTableRowObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
598 ScTableRowsObj(ScDocShell
* pDocSh
, SCTAB nT
,
599 SCROW nSR
, SCROW nER
);
600 virtual ~ScTableRowsObj();
602 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
605 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
606 throw(::com::sun::star::uno::RuntimeException
);
607 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
608 throw(::com::sun::star::uno::RuntimeException
);
611 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
612 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
613 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
614 ::com::sun::star::lang::WrappedTargetException
,
615 ::com::sun::star::uno::RuntimeException
);
617 // XEnumerationAccess
618 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
619 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
622 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
623 throw(::com::sun::star::uno::RuntimeException
);
624 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
627 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
628 SAL_CALL
getPropertySetInfo()
629 throw(::com::sun::star::uno::RuntimeException
);
630 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
631 const ::com::sun::star::uno::Any
& aValue
)
632 throw(::com::sun::star::beans::UnknownPropertyException
,
633 ::com::sun::star::beans::PropertyVetoException
,
634 ::com::sun::star::lang::IllegalArgumentException
,
635 ::com::sun::star::lang::WrappedTargetException
,
636 ::com::sun::star::uno::RuntimeException
);
637 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
638 const ::rtl::OUString
& PropertyName
)
639 throw(::com::sun::star::beans::UnknownPropertyException
,
640 ::com::sun::star::lang::WrappedTargetException
,
641 ::com::sun::star::uno::RuntimeException
);
642 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
643 const ::com::sun::star::uno::Reference
<
644 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
645 throw(::com::sun::star::beans::UnknownPropertyException
,
646 ::com::sun::star::lang::WrappedTargetException
,
647 ::com::sun::star::uno::RuntimeException
);
648 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
649 const ::com::sun::star::uno::Reference
<
650 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
651 throw(::com::sun::star::beans::UnknownPropertyException
,
652 ::com::sun::star::lang::WrappedTargetException
,
653 ::com::sun::star::uno::RuntimeException
);
654 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
655 const ::com::sun::star::uno::Reference
<
656 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
657 throw(::com::sun::star::beans::UnknownPropertyException
,
658 ::com::sun::star::lang::WrappedTargetException
,
659 ::com::sun::star::uno::RuntimeException
);
660 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
661 const ::com::sun::star::uno::Reference
<
662 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
663 throw(::com::sun::star::beans::UnknownPropertyException
,
664 ::com::sun::star::lang::WrappedTargetException
,
665 ::com::sun::star::uno::RuntimeException
);
668 virtual ::rtl::OUString SAL_CALL
getImplementationName()
669 throw(::com::sun::star::uno::RuntimeException
);
670 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
671 throw(::com::sun::star::uno::RuntimeException
);
672 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
673 throw(::com::sun::star::uno::RuntimeException
);
677 class ScSpreadsheetSettingsObj
: public cppu::WeakImplHelper2
<
678 com::sun::star::beans::XPropertySet
,
679 com::sun::star::lang::XServiceInfo
>,
683 ScDocShell
* pDocShell
;
686 //UNUSED2008-05 ScSpreadsheetSettingsObj(ScDocShell* pDocSh);
687 virtual ~ScSpreadsheetSettingsObj();
689 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
692 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
>
693 SAL_CALL
getPropertySetInfo()
694 throw(::com::sun::star::uno::RuntimeException
);
695 virtual void SAL_CALL
setPropertyValue( const ::rtl::OUString
& aPropertyName
,
696 const ::com::sun::star::uno::Any
& aValue
)
697 throw(::com::sun::star::beans::UnknownPropertyException
,
698 ::com::sun::star::beans::PropertyVetoException
,
699 ::com::sun::star::lang::IllegalArgumentException
,
700 ::com::sun::star::lang::WrappedTargetException
,
701 ::com::sun::star::uno::RuntimeException
);
702 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue(
703 const ::rtl::OUString
& PropertyName
)
704 throw(::com::sun::star::beans::UnknownPropertyException
,
705 ::com::sun::star::lang::WrappedTargetException
,
706 ::com::sun::star::uno::RuntimeException
);
707 virtual void SAL_CALL
addPropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
708 const ::com::sun::star::uno::Reference
<
709 ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
710 throw(::com::sun::star::beans::UnknownPropertyException
,
711 ::com::sun::star::lang::WrappedTargetException
,
712 ::com::sun::star::uno::RuntimeException
);
713 virtual void SAL_CALL
removePropertyChangeListener( const ::rtl::OUString
& aPropertyName
,
714 const ::com::sun::star::uno::Reference
<
715 ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
716 throw(::com::sun::star::beans::UnknownPropertyException
,
717 ::com::sun::star::lang::WrappedTargetException
,
718 ::com::sun::star::uno::RuntimeException
);
719 virtual void SAL_CALL
addVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
720 const ::com::sun::star::uno::Reference
<
721 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
722 throw(::com::sun::star::beans::UnknownPropertyException
,
723 ::com::sun::star::lang::WrappedTargetException
,
724 ::com::sun::star::uno::RuntimeException
);
725 virtual void SAL_CALL
removeVetoableChangeListener( const ::rtl::OUString
& PropertyName
,
726 const ::com::sun::star::uno::Reference
<
727 ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
728 throw(::com::sun::star::beans::UnknownPropertyException
,
729 ::com::sun::star::lang::WrappedTargetException
,
730 ::com::sun::star::uno::RuntimeException
);
733 virtual ::rtl::OUString SAL_CALL
getImplementationName()
734 throw(::com::sun::star::uno::RuntimeException
);
735 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
736 throw(::com::sun::star::uno::RuntimeException
);
737 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
738 throw(::com::sun::star::uno::RuntimeException
);
742 class ScAnnotationsObj
: public cppu::WeakImplHelper3
<
743 com::sun::star::sheet::XSheetAnnotations
,
744 com::sun::star::container::XEnumerationAccess
,
745 com::sun::star::lang::XServiceInfo
>,
749 ScDocShell
* pDocShell
;
750 SCTAB nTab
; // Collection haengt am Sheet
752 bool GetAddressByIndex_Impl( sal_Int32 nIndex
, ScAddress
& rPos
) const;
753 ScAnnotationObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
756 ScAnnotationsObj(ScDocShell
* pDocSh
, SCTAB nT
);
757 virtual ~ScAnnotationsObj();
759 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
762 virtual void SAL_CALL
insertNew( const ::com::sun::star::table::CellAddress
& aPosition
,
763 const ::rtl::OUString
& aText
)
764 throw(::com::sun::star::uno::RuntimeException
);
765 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
)
766 throw(::com::sun::star::uno::RuntimeException
);
769 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
770 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
771 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
772 ::com::sun::star::lang::WrappedTargetException
,
773 ::com::sun::star::uno::RuntimeException
);
775 // XEnumerationAccess
776 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
777 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
780 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
781 throw(::com::sun::star::uno::RuntimeException
);
782 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
785 virtual ::rtl::OUString SAL_CALL
getImplementationName()
786 throw(::com::sun::star::uno::RuntimeException
);
787 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
788 throw(::com::sun::star::uno::RuntimeException
);
789 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
790 throw(::com::sun::star::uno::RuntimeException
);
794 class ScScenariosObj
: public cppu::WeakImplHelper4
<
795 com::sun::star::sheet::XScenarios
,
796 com::sun::star::container::XEnumerationAccess
,
797 com::sun::star::container::XIndexAccess
,
798 com::sun::star::lang::XServiceInfo
>,
802 ScDocShell
* pDocShell
;
805 BOOL
GetScenarioIndex_Impl( const ::rtl::OUString
& rName
, SCTAB
& rIndex
);
806 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
);
807 ScTableSheetObj
* GetObjectByName_Impl(const ::rtl::OUString
& aName
);
810 ScScenariosObj(ScDocShell
* pDocSh
, SCTAB nT
);
811 virtual ~ScScenariosObj();
813 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
);
816 virtual void SAL_CALL
addNewByName( const ::rtl::OUString
& aName
,
817 const ::com::sun::star::uno::Sequence
<
818 ::com::sun::star::table::CellRangeAddress
>& aRanges
,
819 const ::rtl::OUString
& aComment
)
820 throw(::com::sun::star::uno::RuntimeException
);
821 virtual void SAL_CALL
removeByName( const ::rtl::OUString
& aName
)
822 throw(::com::sun::star::uno::RuntimeException
);
825 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
)
826 throw(::com::sun::star::container::NoSuchElementException
,
827 ::com::sun::star::lang::WrappedTargetException
,
828 ::com::sun::star::uno::RuntimeException
);
829 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames()
830 throw(::com::sun::star::uno::RuntimeException
);
831 virtual sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
)
832 throw(::com::sun::star::uno::RuntimeException
);
835 virtual sal_Int32 SAL_CALL
getCount() throw(::com::sun::star::uno::RuntimeException
);
836 virtual ::com::sun::star::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
837 throw(::com::sun::star::lang::IndexOutOfBoundsException
,
838 ::com::sun::star::lang::WrappedTargetException
,
839 ::com::sun::star::uno::RuntimeException
);
841 // XEnumerationAccess
842 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XEnumeration
> SAL_CALL
843 createEnumeration() throw(::com::sun::star::uno::RuntimeException
);
846 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType()
847 throw(::com::sun::star::uno::RuntimeException
);
848 virtual sal_Bool SAL_CALL
hasElements() throw(::com::sun::star::uno::RuntimeException
);
851 virtual ::rtl::OUString SAL_CALL
getImplementationName()
852 throw(::com::sun::star::uno::RuntimeException
);
853 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& ServiceName
)
854 throw(::com::sun::star::uno::RuntimeException
);
855 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
856 throw(::com::sun::star::uno::RuntimeException
);