xref: /aoo41x/main/sc/inc/docuno.hxx (revision 38d50f7b)
1*38d50f7bSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*38d50f7bSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*38d50f7bSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*38d50f7bSAndrew Rist  * distributed with this work for additional information
6*38d50f7bSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*38d50f7bSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*38d50f7bSAndrew Rist  * "License"); you may not use this file except in compliance
9*38d50f7bSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*38d50f7bSAndrew Rist  *
11*38d50f7bSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*38d50f7bSAndrew Rist  *
13*38d50f7bSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*38d50f7bSAndrew Rist  * software distributed under the License is distributed on an
15*38d50f7bSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*38d50f7bSAndrew Rist  * KIND, either express or implied.  See the License for the
17*38d50f7bSAndrew Rist  * specific language governing permissions and limitations
18*38d50f7bSAndrew Rist  * under the License.
19*38d50f7bSAndrew Rist  *
20*38d50f7bSAndrew Rist  *************************************************************/
21*38d50f7bSAndrew Rist 
22*38d50f7bSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SC_DOCUNO_HXX
25cdf0e10cSrcweir #define SC_DOCUNO_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "address.hxx"
28cdf0e10cSrcweir #include <sfx2/sfxbasemodel.hxx>
29cdf0e10cSrcweir #include <svl/lstner.hxx>
30cdf0e10cSrcweir #include <svx/fmdmod.hxx>
31cdf0e10cSrcweir #include <com/sun/star/view/XRenderable.hpp>
32cdf0e10cSrcweir #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
33cdf0e10cSrcweir #include <com/sun/star/document/XActionLockable.hpp>
34cdf0e10cSrcweir #include <com/sun/star/document/XLinkTargetSupplier.hpp>
35cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
36cdf0e10cSrcweir #include <com/sun/star/drawing/XDrawPages.hpp>
37cdf0e10cSrcweir #include <com/sun/star/sheet/XGoalSeek.hpp>
38cdf0e10cSrcweir #include <com/sun/star/sheet/XCalculatable.hpp>
39cdf0e10cSrcweir #include <com/sun/star/sheet/XScenarios.hpp>
40cdf0e10cSrcweir #include <com/sun/star/sheet/XConsolidatable.hpp>
41cdf0e10cSrcweir #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
42cdf0e10cSrcweir #include <com/sun/star/sheet/XDocumentAuditing.hpp>
43cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
44cdf0e10cSrcweir #include <com/sun/star/util/XProtectable.hpp>
45cdf0e10cSrcweir #include <com/sun/star/container/XEnumerationAccess.hpp>
46cdf0e10cSrcweir #include <com/sun/star/table/XTableColumns.hpp>
47cdf0e10cSrcweir #include <com/sun/star/table/XTableRows.hpp>
48cdf0e10cSrcweir #include <com/sun/star/sheet/XSheetAnnotations.hpp>
49cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
50cdf0e10cSrcweir #include <com/sun/star/sheet/XCellRangesAccess.hpp>
51cdf0e10cSrcweir #include <com/sun/star/util/XChangesNotifier.hpp>
52cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
53cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
54cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx>
55cdf0e10cSrcweir #include <cppuhelper/implbase5.hxx>
56cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.h>
57cdf0e10cSrcweir #include <svl/itemprop.hxx>
58cdf0e10cSrcweir #include "drwlayer.hxx"
59cdf0e10cSrcweir 
60cdf0e10cSrcweir class ScDocShell;
61cdf0e10cSrcweir class ScAnnotationObj;
62cdf0e10cSrcweir class ScMarkData;
63cdf0e10cSrcweir class ScPrintFuncCache;
64cdf0e10cSrcweir class ScPrintSelectionStatus;
65cdf0e10cSrcweir class ScTableColumnObj;
66cdf0e10cSrcweir class ScTableRowObj;
67cdf0e10cSrcweir class ScTableSheetObj;
68cdf0e10cSrcweir class SvxFmDrawPage;
69cdf0e10cSrcweir class SvxDrawPage;
70cdf0e10cSrcweir class ScRangeList;
71cdf0e10cSrcweir class ScPrintUIOptions;
72cdf0e10cSrcweir class ScSheetSaveData;
73cdf0e10cSrcweir 
74cdf0e10cSrcweir class SC_DLLPUBLIC ScModelObj : public SfxBaseModel,
75cdf0e10cSrcweir 					public com::sun::star::sheet::XSpreadsheetDocument,
76cdf0e10cSrcweir 					public com::sun::star::document::XActionLockable,
77cdf0e10cSrcweir 					public com::sun::star::sheet::XCalculatable,
78cdf0e10cSrcweir 					public com::sun::star::util::XProtectable,
79cdf0e10cSrcweir 					public com::sun::star::drawing::XDrawPagesSupplier,
80cdf0e10cSrcweir 					public com::sun::star::sheet::XGoalSeek,
81cdf0e10cSrcweir 					public com::sun::star::sheet::XConsolidatable,
82cdf0e10cSrcweir 					public com::sun::star::sheet::XDocumentAuditing,
83cdf0e10cSrcweir 					public com::sun::star::style::XStyleFamiliesSupplier,
84cdf0e10cSrcweir 					public com::sun::star::view::XRenderable,
85cdf0e10cSrcweir 					public com::sun::star::document::XLinkTargetSupplier,
86cdf0e10cSrcweir 					public com::sun::star::beans::XPropertySet,
87cdf0e10cSrcweir 					public SvxFmMSFactory,	// derived from XMultiServiceFactory
88cdf0e10cSrcweir                     public com::sun::star::lang::XServiceInfo,
89cdf0e10cSrcweir                     public ::com::sun::star::util::XChangesNotifier
90cdf0e10cSrcweir {
91cdf0e10cSrcweir private:
92cdf0e10cSrcweir 	SfxItemPropertySet		aPropSet;
93cdf0e10cSrcweir 	ScDocShell*				pDocShell;
94cdf0e10cSrcweir 	ScPrintFuncCache*		pPrintFuncCache;
95cdf0e10cSrcweir     ScPrintUIOptions*       pPrinterOptions;
96cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> xNumberAgg;
97cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawGradTab;
98cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawHatchTab;
99cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawBitmapTab;
100cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawTrGradTab;
101cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawMarkerTab;
102cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawDashTab;
103cdf0e10cSrcweir     com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xChartDataProv;
104cdf0e10cSrcweir 	com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xObjProvider;
105cdf0e10cSrcweir 
106cdf0e10cSrcweir     ::cppu::OInterfaceContainerHelper maChangesListeners;
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 	sal_Bool					FillRenderMarkData( const com::sun::star::uno::Any& aSelection,
109cdf0e10cSrcweir                                                 const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rOptions,
110cdf0e10cSrcweir                                                 ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const;
111cdf0e10cSrcweir     com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> GetFormatter();
112cdf0e10cSrcweir     void                    HandleCalculateEvents();
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 	rtl::OUString			maBuildId;
115cdf0e10cSrcweir protected:
GetPropertySet() const116cdf0e10cSrcweir     const SfxItemPropertySet&   GetPropertySet() const { return aPropSet; }
117cdf0e10cSrcweir 
118cdf0e10cSrcweir public:
119cdf0e10cSrcweir 							ScModelObj(ScDocShell* pDocSh);
120cdf0e10cSrcweir 	virtual					~ScModelObj();
121cdf0e10cSrcweir 
122cdf0e10cSrcweir 	//	create ScModelObj and set at pDocSh (SetBaseModel)
123cdf0e10cSrcweir 	static void				CreateAndSet(ScDocShell* pDocSh);
124cdf0e10cSrcweir 
125cdf0e10cSrcweir 	ScDocument*				GetDocument() const;
126cdf0e10cSrcweir     SfxObjectShell*         GetEmbeddedObject() const;
127cdf0e10cSrcweir 
128cdf0e10cSrcweir     void                    UpdateAllRowHeights( const ScMarkData* pTabMark = NULL, bool bCalcOutputFactor = false );
129cdf0e10cSrcweir 
130cdf0e10cSrcweir     void                    BeforeXMLLoading();
131cdf0e10cSrcweir     void                    AfterXMLLoading(sal_Bool bRet);
132cdf0e10cSrcweir     ScSheetSaveData*        GetSheetSaveData();
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     void                    RepaintRange( const ScRange& rRange );
135cdf0e10cSrcweir 
136cdf0e10cSrcweir     bool                    HasChangesListeners() const;
137cdf0e10cSrcweir 
138cdf0e10cSrcweir     void                    NotifyChanges( const ::rtl::OUString& rOperation, const ScRangeList& rRanges,
139cdf0e10cSrcweir                                            const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties =
140cdf0e10cSrcweir                                                ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
141cdf0e10cSrcweir 
142cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
143cdf0e10cSrcweir 								const ::com::sun::star::uno::Type & rType )
144cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
145cdf0e10cSrcweir 	virtual void SAL_CALL	acquire() throw();
146cdf0e10cSrcweir 	virtual void SAL_CALL	release() throw();
147cdf0e10cSrcweir 
148cdf0e10cSrcweir //?	virtual UString			getClassName(void);
149cdf0e10cSrcweir 
150cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
151cdf0e10cSrcweir 
152cdf0e10cSrcweir 							// XSpreadsheetDocument
153cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheets > SAL_CALL
154cdf0e10cSrcweir 							getSheets() throw(::com::sun::star::uno::RuntimeException);
155cdf0e10cSrcweir 
156cdf0e10cSrcweir 								// XStyleFamiliesSupplier
157cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
158cdf0e10cSrcweir 							getStyleFamilies() throw(::com::sun::star::uno::RuntimeException);
159cdf0e10cSrcweir 
160cdf0e10cSrcweir 							// XRenderable
161cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection,
162cdf0e10cSrcweir 									const ::com::sun::star::uno::Sequence<
163cdf0e10cSrcweir 										::com::sun::star::beans::PropertyValue >& xOptions )
164cdf0e10cSrcweir 								throw (::com::sun::star::lang::IllegalArgumentException,
165cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
166cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
167cdf0e10cSrcweir 							getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
168cdf0e10cSrcweir 									const ::com::sun::star::uno::Sequence<
169cdf0e10cSrcweir 										::com::sun::star::beans::PropertyValue >& xOptions )
170cdf0e10cSrcweir 								throw (::com::sun::star::lang::IllegalArgumentException,
171cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
172cdf0e10cSrcweir 	virtual void SAL_CALL	render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection,
173cdf0e10cSrcweir 									const ::com::sun::star::uno::Sequence<
174cdf0e10cSrcweir 										::com::sun::star::beans::PropertyValue >& xOptions )
175cdf0e10cSrcweir 								throw (::com::sun::star::lang::IllegalArgumentException,
176cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
177cdf0e10cSrcweir 
178cdf0e10cSrcweir 							// XLinkTargetSupplier
179cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
180cdf0e10cSrcweir 							getLinks() throw(::com::sun::star::uno::RuntimeException);
181cdf0e10cSrcweir 
182cdf0e10cSrcweir 							// XActionLockable
183cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
184cdf0e10cSrcweir 	virtual void SAL_CALL	addActionLock() throw(::com::sun::star::uno::RuntimeException);
185cdf0e10cSrcweir 	virtual void SAL_CALL	removeActionLock() throw(::com::sun::star::uno::RuntimeException);
186cdf0e10cSrcweir 	virtual void SAL_CALL	setActionLocks( sal_Int16 nLock )
187cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
188cdf0e10cSrcweir 	virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
189cdf0e10cSrcweir 
190cdf0e10cSrcweir         virtual void SAL_CALL   lockControllers() throw (::com::sun::star::uno::RuntimeException);
191cdf0e10cSrcweir         virtual void SAL_CALL   unlockControllers() throw (::com::sun::star::uno::RuntimeException);
192cdf0e10cSrcweir 
193cdf0e10cSrcweir 								// XCalculatable
194cdf0e10cSrcweir 	virtual void SAL_CALL	calculate() throw(::com::sun::star::uno::RuntimeException);
195cdf0e10cSrcweir 	virtual void SAL_CALL	calculateAll() throw(::com::sun::star::uno::RuntimeException);
196cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL isAutomaticCalculationEnabled()
197cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
198cdf0e10cSrcweir 	virtual void SAL_CALL	enableAutomaticCalculation( sal_Bool bEnabled )
199cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
200cdf0e10cSrcweir 
201cdf0e10cSrcweir 							// XProtectable
202cdf0e10cSrcweir 	virtual void SAL_CALL	protect( const ::rtl::OUString& aPassword )
203cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
204cdf0e10cSrcweir 	virtual void SAL_CALL	unprotect( const ::rtl::OUString& aPassword )
205cdf0e10cSrcweir 								throw(::com::sun::star::lang::IllegalArgumentException,
206cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
207cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 							//	XDrawPagesSupplier
210cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > SAL_CALL
211cdf0e10cSrcweir 							getDrawPages() throw(::com::sun::star::uno::RuntimeException);
212cdf0e10cSrcweir 
213cdf0e10cSrcweir 	//!	XPrintable??
214cdf0e10cSrcweir 
215cdf0e10cSrcweir 							//	XGoalSeek
216cdf0e10cSrcweir 	virtual ::com::sun::star::sheet::GoalResult SAL_CALL seekGoal(
217cdf0e10cSrcweir 								const ::com::sun::star::table::CellAddress& aFormulaPosition,
218cdf0e10cSrcweir 								const ::com::sun::star::table::CellAddress& aVariablePosition,
219cdf0e10cSrcweir 								const ::rtl::OUString& aGoalValue )
220cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
221cdf0e10cSrcweir 
222cdf0e10cSrcweir 							//	XConsolidatable
223cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XConsolidationDescriptor >
224cdf0e10cSrcweir 							SAL_CALL createConsolidationDescriptor( sal_Bool bEmpty )
225cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
226cdf0e10cSrcweir 	virtual void SAL_CALL consolidate( const ::com::sun::star::uno::Reference<
227cdf0e10cSrcweir 								::com::sun::star::sheet::XConsolidationDescriptor >& xDescriptor )
228cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 							//	XDocumentAuditing
231cdf0e10cSrcweir 	virtual void SAL_CALL	refreshArrows() throw(::com::sun::star::uno::RuntimeException);
232cdf0e10cSrcweir 
233cdf0e10cSrcweir                             //  XViewDataSupplier
234cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getViewData(  )
235cdf0e10cSrcweir                                 throw (::com::sun::star::uno::RuntimeException);
236cdf0e10cSrcweir 
237cdf0e10cSrcweir                             // XPropertySet
238cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
239cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
240cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
241cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
242cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
243cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
244cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
245cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
246cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
247cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
248cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
249cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
250cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
251cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
252cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
253cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
254cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
255cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
256cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
257cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
258cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
259cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
260cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
261cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
262cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
263cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
264cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
265cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
266cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
267cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
268cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
269cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
270cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
271cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
272cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
273cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
274cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
275cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
276cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
277cdf0e10cSrcweir 
278cdf0e10cSrcweir 							// XMultiServiceFactory
279cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
280cdf0e10cSrcweir 							createInstance( const ::rtl::OUString& aServiceSpecifier )
281cdf0e10cSrcweir 								throw(::com::sun::star::uno::Exception,
282cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
283cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
284cdf0e10cSrcweir 							createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier,
285cdf0e10cSrcweir 								const ::com::sun::star::uno::Sequence<
286cdf0e10cSrcweir 									::com::sun::star::uno::Any >& Arguments )
287cdf0e10cSrcweir 								throw(::com::sun::star::uno::Exception,
288cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
289cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAvailableServiceNames()
290cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
291cdf0e10cSrcweir 
292cdf0e10cSrcweir 							// XServiceInfo
293cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
294cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
295cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
296cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
297cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
298cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
299cdf0e10cSrcweir 
300cdf0e10cSrcweir 							// XUnoTunnel
301cdf0e10cSrcweir 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
302cdf0e10cSrcweir 									sal_Int8 >& aIdentifier )
303cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
304cdf0e10cSrcweir 
305cdf0e10cSrcweir 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
306cdf0e10cSrcweir 	static ScModelObj* getImplementation( const com::sun::star::uno::Reference<
307cdf0e10cSrcweir 									com::sun::star::uno::XInterface> xObj );
308cdf0e10cSrcweir 
309cdf0e10cSrcweir 							// XTypeProvider
310cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
311cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
312cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
313cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
314cdf0e10cSrcweir 
315cdf0e10cSrcweir                             // XChangesNotifier
316cdf0e10cSrcweir     virtual void SAL_CALL addChangesListener( const ::com::sun::star::uno::Reference<
317cdf0e10cSrcweir                                     ::com::sun::star::util::XChangesListener >& aListener )
318cdf0e10cSrcweir                                 throw (::com::sun::star::uno::RuntimeException);
319cdf0e10cSrcweir     virtual void SAL_CALL removeChangesListener( const ::com::sun::star::uno::Reference<
320cdf0e10cSrcweir                                     ::com::sun::star::util::XChangesListener >& aListener )
321cdf0e10cSrcweir                                 throw (::com::sun::star::uno::RuntimeException);
322cdf0e10cSrcweir };
323cdf0e10cSrcweir 
324cdf0e10cSrcweir 
325cdf0e10cSrcweir class ScDrawPagesObj : public cppu::WeakImplHelper2<
326cdf0e10cSrcweir 								com::sun::star::drawing::XDrawPages,
327cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
328cdf0e10cSrcweir 						public SfxListener
329cdf0e10cSrcweir {
330cdf0e10cSrcweir private:
331cdf0e10cSrcweir 	ScDocShell*				pDocShell;
332cdf0e10cSrcweir 
333cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
334cdf0e10cSrcweir 							GetObjectByIndex_Impl(sal_Int32 nIndex) const;
335cdf0e10cSrcweir 
336cdf0e10cSrcweir public:
337cdf0e10cSrcweir 							ScDrawPagesObj(ScDocShell* pDocSh);
338cdf0e10cSrcweir 	virtual					~ScDrawPagesObj();
339cdf0e10cSrcweir 
340cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
341cdf0e10cSrcweir 
342cdf0e10cSrcweir 							// XDrawPages
343cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
344cdf0e10cSrcweir 							insertNewByIndex( sal_Int32 nIndex )
345cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
346cdf0e10cSrcweir 	virtual void SAL_CALL	remove( const ::com::sun::star::uno::Reference<
347cdf0e10cSrcweir 								::com::sun::star::drawing::XDrawPage >& xPage )
348cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
349cdf0e10cSrcweir 
350cdf0e10cSrcweir 							// XIndexAccess
351cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
352cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
353cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
354cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
355cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
356cdf0e10cSrcweir 
357cdf0e10cSrcweir 							// XElementAccess
358cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
359cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
360cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
361cdf0e10cSrcweir 
362cdf0e10cSrcweir 							// XServiceInfo
363cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
364cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
365cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
366cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
367cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
368cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
369cdf0e10cSrcweir };
370cdf0e10cSrcweir 
371cdf0e10cSrcweir 
372cdf0e10cSrcweir class ScTableSheetsObj : public cppu::WeakImplHelper5<
373cdf0e10cSrcweir 								com::sun::star::sheet::XSpreadsheets,
374cdf0e10cSrcweir                                 com::sun::star::sheet::XCellRangesAccess,
375cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
376cdf0e10cSrcweir 								com::sun::star::container::XIndexAccess,
377cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
378cdf0e10cSrcweir 						 public SfxListener
379cdf0e10cSrcweir {
380cdf0e10cSrcweir private:
381cdf0e10cSrcweir 	ScDocShell*				pDocShell;
382cdf0e10cSrcweir 
383cdf0e10cSrcweir 	ScTableSheetObj*		GetObjectByIndex_Impl(sal_Int32 nIndex) const;
384cdf0e10cSrcweir 	ScTableSheetObj*		GetObjectByName_Impl(const ::rtl::OUString& aName) const;
385cdf0e10cSrcweir 
386cdf0e10cSrcweir public:
387cdf0e10cSrcweir 							ScTableSheetsObj(ScDocShell* pDocSh);
388cdf0e10cSrcweir 	virtual					~ScTableSheetsObj();
389cdf0e10cSrcweir 
390cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
391cdf0e10cSrcweir 
392cdf0e10cSrcweir 							// XSpreadsheets
393cdf0e10cSrcweir 	virtual void SAL_CALL	insertNewByName( const ::rtl::OUString& aName, sal_Int16 nPosition )
394cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
395cdf0e10cSrcweir 	virtual void SAL_CALL	moveByName( const ::rtl::OUString& aName, sal_Int16 nDestination )
396cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
397cdf0e10cSrcweir 	virtual void SAL_CALL	copyByName( const ::rtl::OUString& aName,
398cdf0e10cSrcweir 								const ::rtl::OUString& aCopy, sal_Int16 nDestination )
399cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
400cdf0e10cSrcweir 
401cdf0e10cSrcweir                             // XCellRangesAccess
402cdf0e10cSrcweir 
403cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell >
404cdf0e10cSrcweir         SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet )
405cdf0e10cSrcweir         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
406cdf0e10cSrcweir 
407cdf0e10cSrcweir     virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
408cdf0e10cSrcweir         SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet )
409cdf0e10cSrcweir         throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
410cdf0e10cSrcweir 
411cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence < ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > >
412cdf0e10cSrcweir         SAL_CALL getCellRangesByName( const ::rtl::OUString& aRange )
413cdf0e10cSrcweir         throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
414cdf0e10cSrcweir 
415cdf0e10cSrcweir 							// XNameContainer
416cdf0e10cSrcweir 	virtual void SAL_CALL	insertByName( const ::rtl::OUString& aName,
417cdf0e10cSrcweir 								const ::com::sun::star::uno::Any& aElement )
418cdf0e10cSrcweir 									throw(::com::sun::star::lang::IllegalArgumentException,
419cdf0e10cSrcweir 										::com::sun::star::container::ElementExistException,
420cdf0e10cSrcweir 										::com::sun::star::lang::WrappedTargetException,
421cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
422cdf0e10cSrcweir 	virtual void SAL_CALL	removeByName( const ::rtl::OUString& Name )
423cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
424cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
425cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
426cdf0e10cSrcweir 
427cdf0e10cSrcweir 							// XNameReplace
428cdf0e10cSrcweir 	virtual void SAL_CALL	replaceByName( const ::rtl::OUString& aName,
429cdf0e10cSrcweir 								const ::com::sun::star::uno::Any& aElement )
430cdf0e10cSrcweir 									throw(::com::sun::star::lang::IllegalArgumentException,
431cdf0e10cSrcweir 										::com::sun::star::container::NoSuchElementException,
432cdf0e10cSrcweir 										::com::sun::star::lang::WrappedTargetException,
433cdf0e10cSrcweir 										::com::sun::star::uno::RuntimeException);
434cdf0e10cSrcweir 
435cdf0e10cSrcweir 							// XEnumerationAccess
436cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
437cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
438cdf0e10cSrcweir 
439cdf0e10cSrcweir 							// XElementAccess
440cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
441cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
442cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
443cdf0e10cSrcweir 
444cdf0e10cSrcweir 							// XIndexAccess
445cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
446cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
447cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
448cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
449cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
450cdf0e10cSrcweir 
451cdf0e10cSrcweir 							// XNameAccess
452cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
453cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
454cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
455cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
456cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
457cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
458cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
459cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
460cdf0e10cSrcweir 
461cdf0e10cSrcweir 							// XServiceInfo
462cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
463cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
464cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
465cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
466cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
467cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
468cdf0e10cSrcweir };
469cdf0e10cSrcweir 
470cdf0e10cSrcweir 
471cdf0e10cSrcweir class ScTableColumnsObj : public cppu::WeakImplHelper5<
472cdf0e10cSrcweir 								com::sun::star::table::XTableColumns,
473cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
474cdf0e10cSrcweir 								com::sun::star::container::XNameAccess,
475cdf0e10cSrcweir 								com::sun::star::beans::XPropertySet,
476cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
477cdf0e10cSrcweir 						  public SfxListener
478cdf0e10cSrcweir {
479cdf0e10cSrcweir private:
480cdf0e10cSrcweir 	ScDocShell*				pDocShell;
481cdf0e10cSrcweir 	SCTAB					nTab;
482cdf0e10cSrcweir 	SCCOL					nStartCol;
483cdf0e10cSrcweir 	SCCOL					nEndCol;
484cdf0e10cSrcweir 
485cdf0e10cSrcweir 	ScTableColumnObj*		GetObjectByIndex_Impl(sal_Int32 nIndex) const;
486cdf0e10cSrcweir 	ScTableColumnObj*		GetObjectByName_Impl(const ::rtl::OUString& aName) const;
487cdf0e10cSrcweir 
488cdf0e10cSrcweir public:
489cdf0e10cSrcweir 							ScTableColumnsObj(ScDocShell* pDocSh, SCTAB nT,
490cdf0e10cSrcweir 												SCCOL nSC, SCCOL nEC);
491cdf0e10cSrcweir 	virtual					~ScTableColumnsObj();
492cdf0e10cSrcweir 
493cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
494cdf0e10cSrcweir 
495cdf0e10cSrcweir 							// XTableColumns
496cdf0e10cSrcweir 	virtual void SAL_CALL	insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
497cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
498cdf0e10cSrcweir 	virtual void SAL_CALL	removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
499cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
500cdf0e10cSrcweir 
501cdf0e10cSrcweir 							// XNameAccess
502cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
503cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
504cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
505cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
506cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
507cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
508cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
509cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
510cdf0e10cSrcweir 
511cdf0e10cSrcweir 							// XIndexAccess
512cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
513cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
514cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
515cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
516cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
517cdf0e10cSrcweir 
518cdf0e10cSrcweir 							// XEnumerationAccess
519cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
520cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
521cdf0e10cSrcweir 
522cdf0e10cSrcweir 							// XElementAccess
523cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
524cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
525cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
526cdf0e10cSrcweir 
527cdf0e10cSrcweir 							// XPropertySet
528cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
529cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
530cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
531cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
532cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
533cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
534cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
535cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
536cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
537cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
538cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
539cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
540cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
541cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
542cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
543cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
544cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
545cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
546cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
547cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
548cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
549cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
550cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
551cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
552cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
553cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
554cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
555cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
556cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
557cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
558cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
559cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
560cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
561cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
562cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
563cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
564cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
565cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
566cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
567cdf0e10cSrcweir 
568cdf0e10cSrcweir 							// XServiceInfo
569cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
570cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
571cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
572cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
573cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
574cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
575cdf0e10cSrcweir };
576cdf0e10cSrcweir 
577cdf0e10cSrcweir 
578cdf0e10cSrcweir class ScTableRowsObj : public cppu::WeakImplHelper4<
579cdf0e10cSrcweir 								com::sun::star::table::XTableRows,
580cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
581cdf0e10cSrcweir 								com::sun::star::beans::XPropertySet,
582cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
583cdf0e10cSrcweir 						  public SfxListener
584cdf0e10cSrcweir {
585cdf0e10cSrcweir private:
586cdf0e10cSrcweir 	ScDocShell*				pDocShell;
587cdf0e10cSrcweir 	SCTAB					nTab;
588cdf0e10cSrcweir 	SCROW					nStartRow;
589cdf0e10cSrcweir 	SCROW					nEndRow;
590cdf0e10cSrcweir 
591cdf0e10cSrcweir 	ScTableRowObj*			GetObjectByIndex_Impl(sal_Int32 nIndex) const;
592cdf0e10cSrcweir 
593cdf0e10cSrcweir public:
594cdf0e10cSrcweir 							ScTableRowsObj(ScDocShell* pDocSh, SCTAB nT,
595cdf0e10cSrcweir 												SCROW nSR, SCROW nER);
596cdf0e10cSrcweir 	virtual					~ScTableRowsObj();
597cdf0e10cSrcweir 
598cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
599cdf0e10cSrcweir 
600cdf0e10cSrcweir 							// XTableRows
601cdf0e10cSrcweir 	virtual void SAL_CALL	insertByIndex( sal_Int32 nIndex, sal_Int32 nCount )
602cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
603cdf0e10cSrcweir 	virtual void SAL_CALL	removeByIndex( sal_Int32 nIndex, sal_Int32 nCount )
604cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
605cdf0e10cSrcweir 
606cdf0e10cSrcweir 							// XIndexAccess
607cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
608cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
609cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
610cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
611cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
612cdf0e10cSrcweir 
613cdf0e10cSrcweir 							// XEnumerationAccess
614cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
615cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
616cdf0e10cSrcweir 
617cdf0e10cSrcweir 							// XElementAccess
618cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
619cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
620cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
621cdf0e10cSrcweir 
622cdf0e10cSrcweir 							// XPropertySet
623cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
624cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
625cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
626cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
627cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
628cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
629cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
630cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
631cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
632cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
633cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
634cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
635cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
636cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
637cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
638cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
639cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
640cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
641cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
642cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
643cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
644cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
645cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
646cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
647cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
648cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
649cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
650cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
651cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
652cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
653cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
654cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
655cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
656cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
657cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
658cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
659cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
660cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
661cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
662cdf0e10cSrcweir 
663cdf0e10cSrcweir 							// XServiceInfo
664cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
665cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
666cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
667cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
668cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
669cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
670cdf0e10cSrcweir };
671cdf0e10cSrcweir 
672cdf0e10cSrcweir 
673cdf0e10cSrcweir class ScSpreadsheetSettingsObj : public cppu::WeakImplHelper2<
674cdf0e10cSrcweir 									com::sun::star::beans::XPropertySet,
675cdf0e10cSrcweir 									com::sun::star::lang::XServiceInfo>,
676cdf0e10cSrcweir 								 public SfxListener
677cdf0e10cSrcweir {
678cdf0e10cSrcweir private:
679cdf0e10cSrcweir 	ScDocShell*				pDocShell;
680cdf0e10cSrcweir 
681cdf0e10cSrcweir public:
682cdf0e10cSrcweir //UNUSED2008-05             ScSpreadsheetSettingsObj(ScDocShell* pDocSh);
683cdf0e10cSrcweir 	virtual					~ScSpreadsheetSettingsObj();
684cdf0e10cSrcweir 
685cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
686cdf0e10cSrcweir 
687cdf0e10cSrcweir 							// XPropertySet
688cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
689cdf0e10cSrcweir 							SAL_CALL getPropertySetInfo()
690cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
691cdf0e10cSrcweir 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
692cdf0e10cSrcweir 									const ::com::sun::star::uno::Any& aValue )
693cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
694cdf0e10cSrcweir 									::com::sun::star::beans::PropertyVetoException,
695cdf0e10cSrcweir 									::com::sun::star::lang::IllegalArgumentException,
696cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
697cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
698cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
699cdf0e10cSrcweir 									const ::rtl::OUString& PropertyName )
700cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
701cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
702cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
703cdf0e10cSrcweir 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
704cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
705cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
706cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
707cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
708cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
709cdf0e10cSrcweir 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
710cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
711cdf0e10cSrcweir 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
712cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
713cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
714cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
715cdf0e10cSrcweir 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
716cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
717cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
718cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
719cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
720cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
721cdf0e10cSrcweir 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
722cdf0e10cSrcweir 									const ::com::sun::star::uno::Reference<
723cdf0e10cSrcweir 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
724cdf0e10cSrcweir 								throw(::com::sun::star::beans::UnknownPropertyException,
725cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
726cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
727cdf0e10cSrcweir 
728cdf0e10cSrcweir 							// XServiceInfo
729cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
730cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
731cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
732cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
733cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
734cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
735cdf0e10cSrcweir };
736cdf0e10cSrcweir 
737cdf0e10cSrcweir 
738cdf0e10cSrcweir class ScAnnotationsObj : public cppu::WeakImplHelper3<
739cdf0e10cSrcweir 								com::sun::star::sheet::XSheetAnnotations,
740cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
741cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
742cdf0e10cSrcweir 						  public SfxListener
743cdf0e10cSrcweir {
744cdf0e10cSrcweir private:
745cdf0e10cSrcweir 	ScDocShell*				pDocShell;
746cdf0e10cSrcweir 	SCTAB					nTab;			// Collection haengt am Sheet
747cdf0e10cSrcweir 
748cdf0e10cSrcweir 	bool					GetAddressByIndex_Impl( sal_Int32 nIndex, ScAddress& rPos ) const;
749cdf0e10cSrcweir 	ScAnnotationObj*		GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
750cdf0e10cSrcweir 
751cdf0e10cSrcweir public:
752cdf0e10cSrcweir 							ScAnnotationsObj(ScDocShell* pDocSh, SCTAB nT);
753cdf0e10cSrcweir 	virtual					~ScAnnotationsObj();
754cdf0e10cSrcweir 
755cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
756cdf0e10cSrcweir 
757cdf0e10cSrcweir 							// XSheetAnnotations
758cdf0e10cSrcweir 	virtual void SAL_CALL	insertNew( const ::com::sun::star::table::CellAddress& aPosition,
759cdf0e10cSrcweir 								const ::rtl::OUString& aText )
760cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
761cdf0e10cSrcweir 	virtual void SAL_CALL	removeByIndex( sal_Int32 nIndex )
762cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
763cdf0e10cSrcweir 
764cdf0e10cSrcweir 							// XIndexAccess
765cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
766cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
767cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
768cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
769cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
770cdf0e10cSrcweir 
771cdf0e10cSrcweir 							// XEnumerationAccess
772cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
773cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
774cdf0e10cSrcweir 
775cdf0e10cSrcweir 							// XElementAccess
776cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
777cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
778cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
779cdf0e10cSrcweir 
780cdf0e10cSrcweir 							// XServiceInfo
781cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
782cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
783cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
784cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
785cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
786cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
787cdf0e10cSrcweir };
788cdf0e10cSrcweir 
789cdf0e10cSrcweir 
790cdf0e10cSrcweir class ScScenariosObj : public cppu::WeakImplHelper4<
791cdf0e10cSrcweir 								com::sun::star::sheet::XScenarios,
792cdf0e10cSrcweir 								com::sun::star::container::XEnumerationAccess,
793cdf0e10cSrcweir 								com::sun::star::container::XIndexAccess,
794cdf0e10cSrcweir 								com::sun::star::lang::XServiceInfo>,
795cdf0e10cSrcweir 						  public SfxListener
796cdf0e10cSrcweir {
797cdf0e10cSrcweir private:
798cdf0e10cSrcweir 	ScDocShell*				pDocShell;
799cdf0e10cSrcweir 	SCTAB					nTab;
800cdf0e10cSrcweir 
801cdf0e10cSrcweir 	sal_Bool					GetScenarioIndex_Impl( const ::rtl::OUString& rName, SCTAB& rIndex );
802cdf0e10cSrcweir 	ScTableSheetObj*		GetObjectByIndex_Impl(sal_Int32 nIndex);
803cdf0e10cSrcweir 	ScTableSheetObj*		GetObjectByName_Impl(const ::rtl::OUString& aName);
804cdf0e10cSrcweir 
805cdf0e10cSrcweir public:
806cdf0e10cSrcweir 							ScScenariosObj(ScDocShell* pDocSh, SCTAB nT);
807cdf0e10cSrcweir 	virtual					~ScScenariosObj();
808cdf0e10cSrcweir 
809cdf0e10cSrcweir 	virtual void			Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
810cdf0e10cSrcweir 
811cdf0e10cSrcweir 							// XScenarios
812cdf0e10cSrcweir 	virtual void SAL_CALL	addNewByName( const ::rtl::OUString& aName,
813cdf0e10cSrcweir 								const ::com::sun::star::uno::Sequence<
814cdf0e10cSrcweir 									::com::sun::star::table::CellRangeAddress >& aRanges,
815cdf0e10cSrcweir 								const ::rtl::OUString& aComment )
816cdf0e10cSrcweir 									throw(::com::sun::star::uno::RuntimeException);
817cdf0e10cSrcweir 	virtual void SAL_CALL	removeByName( const ::rtl::OUString& aName )
818cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
819cdf0e10cSrcweir 
820cdf0e10cSrcweir 							// XNameAccess
821cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
822cdf0e10cSrcweir 								throw(::com::sun::star::container::NoSuchElementException,
823cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
824cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
825cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
826cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
827cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
828cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
829cdf0e10cSrcweir 
830cdf0e10cSrcweir 							// XIndexAccess
831cdf0e10cSrcweir 	virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
832cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
833cdf0e10cSrcweir 								throw(::com::sun::star::lang::IndexOutOfBoundsException,
834cdf0e10cSrcweir 									::com::sun::star::lang::WrappedTargetException,
835cdf0e10cSrcweir 									::com::sun::star::uno::RuntimeException);
836cdf0e10cSrcweir 
837cdf0e10cSrcweir 							// XEnumerationAccess
838cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
839cdf0e10cSrcweir 							createEnumeration() throw(::com::sun::star::uno::RuntimeException);
840cdf0e10cSrcweir 
841cdf0e10cSrcweir 							// XElementAccess
842cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
843cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
844cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
845cdf0e10cSrcweir 
846cdf0e10cSrcweir 							// XServiceInfo
847cdf0e10cSrcweir 	virtual ::rtl::OUString SAL_CALL getImplementationName()
848cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
849cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
850cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
851cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
852cdf0e10cSrcweir 								throw(::com::sun::star::uno::RuntimeException);
853cdf0e10cSrcweir };
854cdf0e10cSrcweir 
855cdf0e10cSrcweir 
856cdf0e10cSrcweir 
857cdf0e10cSrcweir 
858cdf0e10cSrcweir #endif
859cdf0e10cSrcweir 
860