update ooo310-m15
[ooovba.git] / sc / inc / cellsuno.hxx
blobabe836aa09c9f9a34b4d9900cd7efbe95a465727
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cellsuno.hxx,v $
10 * $Revision: 1.33 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_CELLSUNO_HXX
32 #define SC_CELLSUNO_HXX
34 #include "global.hxx" // ScRange, ScAddress
35 #include "rangelst.hxx" // ScRangeList
37 #include "formula/grammar.hxx"
38 #include <svtools/lstner.hxx>
39 #include <svtools/listener.hxx>
40 #include <svtools/itemprop.hxx>
41 #include <com/sun/star/table/XTableChartsSupplier.hpp>
42 #include <com/sun/star/chart/XChartDataArray.hpp>
43 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
44 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
45 #include <com/sun/star/sheet/XSheetCellRange.hpp>
46 #include <com/sun/star/sheet/XFormulaQuery.hpp>
47 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
48 #include <com/sun/star/sheet/XSheetOperation.hpp>
49 #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
50 #include <com/sun/star/sheet/XCellFormatRangesSupplier.hpp>
51 #include <com/sun/star/sheet/XUniqueCellFormatRangesSupplier.hpp>
52 #include <com/sun/star/sheet/XCellRangesQuery.hpp>
53 #include <com/sun/star/sheet/XSheetFilterableEx.hpp>
54 #include <com/sun/star/sheet/XSpreadsheet.hpp>
55 #include <com/sun/star/sheet/XSheetPageBreak.hpp>
56 #include <com/sun/star/sheet/XCellRangeMovement.hpp>
57 #include <com/sun/star/text/XText.hpp>
58 #include <com/sun/star/sheet/XPrintAreas.hpp>
59 #include <com/sun/star/sheet/XSheetLinkable.hpp>
60 #include <com/sun/star/sheet/XSubTotalCalculatable.hpp>
61 #include <com/sun/star/sheet/XArrayFormulaRange.hpp>
62 #include <com/sun/star/sheet/XCellRangeData.hpp>
63 #include <com/sun/star/sheet/XCellRangeFormula.hpp>
64 #include <com/sun/star/sheet/XCellSeries.hpp>
65 #include <com/sun/star/sheet/XMultipleOperation.hpp>
66 #include <com/sun/star/sheet/XFormulaTokens.hpp>
67 #include <com/sun/star/sheet/XArrayFormulaTokens.hpp>
68 #include <com/sun/star/sheet/XCellAddressable.hpp>
69 #include <com/sun/star/util/XReplaceable.hpp>
70 #include <com/sun/star/util/XIndent.hpp>
71 #include <com/sun/star/lang/XServiceInfo.hpp>
72 #include <com/sun/star/container/XNameContainer.hpp>
73 #include <com/sun/star/util/XMergeable.hpp>
74 #include <com/sun/star/table/XAutoFormattable.hpp>
75 #include <com/sun/star/util/XSortable.hpp>
76 #include <com/sun/star/util/XImportable.hpp>
77 #include <com/sun/star/table/XColumnRowRange.hpp>
78 #include <com/sun/star/table/BorderLine.hpp>
79 #include <com/sun/star/table/TableBorder.hpp>
80 #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
81 #include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
82 #include <com/sun/star/sheet/XScenariosSupplier.hpp>
83 #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
84 #include <com/sun/star/sheet/XSheetAuditing.hpp>
85 #include <com/sun/star/sheet/XSheetOutline.hpp>
86 #include <com/sun/star/util/XProtectable.hpp>
87 #include <com/sun/star/sheet/XScenario.hpp>
88 #include <com/sun/star/sheet/XScenarioEnhanced.hpp>
89 #include <com/sun/star/util/XModifyBroadcaster.hpp>
90 #include <com/sun/star/beans/XPropertyState.hpp>
91 #include <com/sun/star/beans/XMultiPropertySet.hpp>
92 #include <com/sun/star/lang/XUnoTunnel.hpp>
93 #include <com/sun/star/document/XActionLockable.hpp>
94 #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
95 #include <com/sun/star/sheet/XExternalSheetName.hpp>
96 #include <cppuhelper/implbase2.hxx>
97 #include <cppuhelper/implbase3.hxx>
99 #ifndef __SGI_STL_VECTOR
100 #include <vector>
101 #endif
103 class ScDocShell;
104 class ScMarkData;
105 class ScMemChart;
106 class ScPrintRangeSaver;
107 class ScAttrRectIterator;
108 class ScCellRangeObj;
109 class SvxUnoText;
110 class ScLinkListener;
111 class ScPatternAttr;
112 class SvxBorderLine;
113 class SvxBoxItem;
114 class SvxBoxInfoItem;
117 class ScLinkListener : public SvtListener
119 Link aLink;
120 public:
121 ScLinkListener(const Link& rL) : aLink(rL) {}
122 virtual ~ScLinkListener();
123 virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
126 typedef ::com::sun::star::uno::Reference<
127 ::com::sun::star::util::XModifyListener >* XModifyListenerPtr;
128 SV_DECL_PTRARR_DEL( XModifyListenerArr_Impl, XModifyListenerPtr, 4, 4 )
130 class ScNamedEntry;
131 typedef ScNamedEntry* ScNamedEntryPtr;
132 SV_DECL_PTRARR_DEL( ScNamedEntryArr_Impl, ScNamedEntryPtr, 4, 4 )
135 // ScCellRangesBase - Basisklasse fuer ScCellRangesObj (mit Index-Access)
136 // und ScCellRangeObj (ohne Index-Access)
138 // XServiceInfo ist in den Ableitungen implementiert
140 class ScHelperFunctions
142 public:
143 static const SvxBorderLine* GetBorderLine( SvxBorderLine& rLine, const com::sun::star::table::BorderLine& rStruct );
144 static void FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const com::sun::star::table::TableBorder& rBorder );
145 static void FillBorderLine( com::sun::star::table::BorderLine& rStruct, const SvxBorderLine* pLine );
146 static void FillTableBorder( com::sun::star::table::TableBorder& rBorder,
147 const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner );
148 static void ApplyBorder( ScDocShell* pDocShell, const ScRangeList& rRanges,
149 const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner );
152 namespace ooo
154 namespace vba {
155 namespace excel {
156 class ScVbaCellRangeAccess; // Vba Helper class
161 class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet,
162 public com::sun::star::beans::XMultiPropertySet,
163 public com::sun::star::beans::XPropertyState,
164 public com::sun::star::sheet::XSheetOperation,
165 public com::sun::star::chart::XChartDataArray,
166 public com::sun::star::util::XIndent,
167 public com::sun::star::sheet::XCellRangesQuery,
168 public com::sun::star::sheet::XFormulaQuery,
169 public com::sun::star::util::XReplaceable,
170 public com::sun::star::util::XModifyBroadcaster,
171 public com::sun::star::lang::XServiceInfo,
172 public com::sun::star::lang::XUnoTunnel,
173 public com::sun::star::lang::XTypeProvider,
174 public com::sun::star::beans::XTolerantMultiPropertySet,
175 public cppu::OWeakObject,
176 public SfxListener
178 friend class ScTabViewObj; // fuer select()
179 friend class ScTableSheetObj; // fuer createCursorByRange()
180 friend class ooo::vba::excel::ScVbaCellRangeAccess;
182 private:
183 SfxItemPropertySet aPropSet;
184 ScDocShell* pDocShell;
185 ScLinkListener* pValueListener;
186 ScPatternAttr* pCurrentFlat;
187 ScPatternAttr* pCurrentDeep;
188 SfxItemSet* pCurrentDataSet;
189 SfxItemSet* pNoDfltCurrentDataSet;
190 ScMarkData* pMarkData;
191 ScRangeList aRanges;
192 sal_Int64 nObjectId;
193 BOOL bChartColAsHdr;
194 BOOL bChartRowAsHdr;
195 BOOL bCursorOnly;
196 BOOL bGotDataChangedHint;
197 XModifyListenerArr_Impl aValueListeners;
199 DECL_LINK( ValueListenerHdl, SfxHint* );
201 private:
202 void PaintRanges_Impl( USHORT nPart );
203 ScRangeListRef GetLimitedChartRanges_Impl( long nDataColumns, long nDataRows ) const;
204 void ForceChartListener_Impl();
205 ScMemChart* CreateMemChart_Impl() const;
207 const ScPatternAttr* GetCurrentAttrsFlat();
208 const ScPatternAttr* GetCurrentAttrsDeep();
209 SfxItemSet* GetCurrentDataSet(bool bNoDflt = false);
210 const ScMarkData* GetMarkData();
211 void ForgetMarkData();
212 void ForgetCurrentAttrs();
214 com::sun::star::uno::Reference<com::sun::star::sheet::XSheetCellRanges>
215 QueryDifferences_Impl(const com::sun::star::table::CellAddress& aCompare,
216 BOOL bColumnDiff);
217 com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
218 Find_Impl(const com::sun::star::uno::Reference<
219 com::sun::star::util::XSearchDescriptor>& xDesc,
220 const ScAddress* pLastPos);
222 protected:
223 // GetItemPropertyMap for derived classes must contain all entries, including base class
224 virtual const SfxItemPropertyMap* GetItemPropertyMap();
225 virtual ::com::sun::star::beans::PropertyState GetOnePropertyState(
226 USHORT nItemWhich, const SfxItemPropertyMap* pMap );
227 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
228 ::com::sun::star::uno::Any& )
229 throw(::com::sun::star::uno::RuntimeException);
230 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
231 const ::com::sun::star::uno::Any& aValue )
232 throw(::com::sun::star::lang::IllegalArgumentException,
233 ::com::sun::star::uno::RuntimeException);
235 public:
236 ScCellRangesBase(); // fuer SMART_REFLECTION Krempel
237 ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR);
238 ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR);
239 virtual ~ScCellRangesBase();
241 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
242 const ::com::sun::star::uno::Type & rType )
243 throw(::com::sun::star::uno::RuntimeException);
244 virtual void SAL_CALL acquire() throw();
245 virtual void SAL_CALL release() throw();
247 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
248 virtual void RefChanged();
250 // aus Ableitungen, aber auch per getImplementation
251 ScDocShell* GetDocShell() const { return pDocShell; }
252 ScDocument* GetDocument() const;
253 const ScRangeList& GetRangeList() const { return aRanges; }
254 void AddRange(const ScRange& rRange, const sal_Bool bMergeRanges);
256 // per Service erzeugtes Objekt zum Leben erwecken:
257 void InitInsertRange(ScDocShell* pDocSh, const ScRange& rR);
259 void SetNewRange(const ScRange& rNew); // fuer Cursor
260 void SetNewRanges(const ScRangeList& rNew);
262 void SetCursorOnly(BOOL bSet);
263 BOOL IsCursorOnly() const { return bCursorOnly; }
265 // XSheetOperation
266 virtual double SAL_CALL computeFunction( ::com::sun::star::sheet::GeneralFunction nFunction )
267 throw(::com::sun::star::uno::Exception,
268 ::com::sun::star::uno::RuntimeException);
269 virtual void SAL_CALL clearContents( sal_Int32 nContentFlags )
270 throw(::com::sun::star::uno::RuntimeException);
272 // XPropertySet
273 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
274 SAL_CALL getPropertySetInfo()
275 throw(::com::sun::star::uno::RuntimeException);
276 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
277 const ::com::sun::star::uno::Any& aValue )
278 throw(::com::sun::star::beans::UnknownPropertyException,
279 ::com::sun::star::beans::PropertyVetoException,
280 ::com::sun::star::lang::IllegalArgumentException,
281 ::com::sun::star::lang::WrappedTargetException,
282 ::com::sun::star::uno::RuntimeException);
283 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
284 const ::rtl::OUString& PropertyName )
285 throw(::com::sun::star::beans::UnknownPropertyException,
286 ::com::sun::star::lang::WrappedTargetException,
287 ::com::sun::star::uno::RuntimeException);
288 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
289 const ::com::sun::star::uno::Reference<
290 ::com::sun::star::beans::XPropertyChangeListener >& xListener )
291 throw(::com::sun::star::beans::UnknownPropertyException,
292 ::com::sun::star::lang::WrappedTargetException,
293 ::com::sun::star::uno::RuntimeException);
294 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
295 const ::com::sun::star::uno::Reference<
296 ::com::sun::star::beans::XPropertyChangeListener >& aListener )
297 throw(::com::sun::star::beans::UnknownPropertyException,
298 ::com::sun::star::lang::WrappedTargetException,
299 ::com::sun::star::uno::RuntimeException);
300 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
301 const ::com::sun::star::uno::Reference<
302 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
303 throw(::com::sun::star::beans::UnknownPropertyException,
304 ::com::sun::star::lang::WrappedTargetException,
305 ::com::sun::star::uno::RuntimeException);
306 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
307 const ::com::sun::star::uno::Reference<
308 ::com::sun::star::beans::XVetoableChangeListener >& aListener )
309 throw(::com::sun::star::beans::UnknownPropertyException,
310 ::com::sun::star::lang::WrappedTargetException,
311 ::com::sun::star::uno::RuntimeException);
313 // XMultiPropertySet
314 virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
315 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
316 throw (::com::sun::star::beans::PropertyVetoException,
317 ::com::sun::star::lang::IllegalArgumentException,
318 ::com::sun::star::lang::WrappedTargetException,
319 ::com::sun::star::uno::RuntimeException);
320 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL
321 getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
322 throw (::com::sun::star::uno::RuntimeException);
323 virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
324 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
325 throw (::com::sun::star::uno::RuntimeException);
326 virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
327 throw (::com::sun::star::uno::RuntimeException);
328 virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
329 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
330 throw (::com::sun::star::uno::RuntimeException);
332 // XTolerantMultiPropertySet
333 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL
334 setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
335 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
336 throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
337 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL
338 getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
339 throw (::com::sun::star::uno::RuntimeException);
340 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL
341 getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
342 throw (::com::sun::star::uno::RuntimeException);
344 // XPropertyState
345 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
346 const ::rtl::OUString& PropertyName )
347 throw(::com::sun::star::beans::UnknownPropertyException,
348 ::com::sun::star::uno::RuntimeException);
349 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL
350 getPropertyStates( const ::com::sun::star::uno::Sequence<
351 ::rtl::OUString >& aPropertyName )
352 throw(::com::sun::star::beans::UnknownPropertyException,
353 ::com::sun::star::uno::RuntimeException);
354 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName )
355 throw(::com::sun::star::beans::UnknownPropertyException,
356 ::com::sun::star::uno::RuntimeException);
357 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
358 const ::rtl::OUString& aPropertyName )
359 throw(::com::sun::star::beans::UnknownPropertyException,
360 ::com::sun::star::lang::WrappedTargetException,
361 ::com::sun::star::uno::RuntimeException);
363 // XIndent
364 virtual void SAL_CALL decrementIndent() throw(::com::sun::star::uno::RuntimeException);
365 virtual void SAL_CALL incrementIndent() throw(::com::sun::star::uno::RuntimeException);
367 // XChartData
368 virtual void SAL_CALL addChartDataChangeEventListener(
369 const ::com::sun::star::uno::Reference<
370 ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
371 throw(::com::sun::star::uno::RuntimeException);
372 virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference<
373 ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
374 throw(::com::sun::star::uno::RuntimeException);
375 virtual double SAL_CALL getNotANumber() throw(::com::sun::star::uno::RuntimeException);
376 virtual sal_Bool SAL_CALL isNotANumber( double nNumber )
377 throw(::com::sun::star::uno::RuntimeException);
379 // XChartDataArray
380 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL
381 getData() throw(::com::sun::star::uno::RuntimeException);
382 virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence<
383 ::com::sun::star::uno::Sequence< double > >& aData )
384 throw(::com::sun::star::uno::RuntimeException);
385 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions()
386 throw(::com::sun::star::uno::RuntimeException);
387 virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence<
388 ::rtl::OUString >& aRowDescriptions )
389 throw(::com::sun::star::uno::RuntimeException);
390 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions()
391 throw(::com::sun::star::uno::RuntimeException);
392 virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence<
393 ::rtl::OUString >& aColumnDescriptions )
394 throw(::com::sun::star::uno::RuntimeException);
396 // XCellRangesQuery
397 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
398 queryVisibleCells() throw(::com::sun::star::uno::RuntimeException);
399 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
400 queryEmptyCells() throw(::com::sun::star::uno::RuntimeException);
401 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
402 queryContentCells( sal_Int16 nContentFlags )
403 throw(::com::sun::star::uno::RuntimeException);
404 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
405 queryFormulaCells( sal_Int32 nResultFlags )
406 throw(::com::sun::star::uno::RuntimeException);
407 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
408 queryColumnDifferences(
409 const ::com::sun::star::table::CellAddress& aCompare )
410 throw(::com::sun::star::uno::RuntimeException);
411 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
412 queryRowDifferences(
413 const ::com::sun::star::table::CellAddress& aCompare )
414 throw(::com::sun::star::uno::RuntimeException);
415 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
416 queryIntersection(
417 const ::com::sun::star::table::CellRangeAddress& aRange )
418 throw(::com::sun::star::uno::RuntimeException);
420 // XFormulaQuery
421 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
422 queryDependents( sal_Bool bRecursive )
423 throw(::com::sun::star::uno::RuntimeException);
424 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
425 queryPrecedents( sal_Bool bRecursive )
426 throw(::com::sun::star::uno::RuntimeException);
428 // XSearchable
429 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL
430 createSearchDescriptor()
431 throw(::com::sun::star::uno::RuntimeException);
432 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
433 findAll( const ::com::sun::star::uno::Reference<
434 ::com::sun::star::util::XSearchDescriptor >& xDesc )
435 throw(::com::sun::star::uno::RuntimeException);
436 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
437 findFirst( const ::com::sun::star::uno::Reference<
438 ::com::sun::star::util::XSearchDescriptor >& xDesc )
439 throw(::com::sun::star::uno::RuntimeException);
440 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
441 findNext( const ::com::sun::star::uno::Reference<
442 ::com::sun::star::uno::XInterface >& xStartAt,
443 const ::com::sun::star::uno::Reference<
444 ::com::sun::star::util::XSearchDescriptor >& xDesc )
445 throw(::com::sun::star::uno::RuntimeException);
447 // XReplaceable
448 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL
449 createReplaceDescriptor() throw(::com::sun::star::uno::RuntimeException);
450 virtual sal_Int32 SAL_CALL replaceAll( const ::com::sun::star::uno::Reference<
451 ::com::sun::star::util::XSearchDescriptor >& xDesc )
452 throw(::com::sun::star::uno::RuntimeException);
454 // XModifyBroadcaster
455 virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference<
456 ::com::sun::star::util::XModifyListener >& aListener )
457 throw (::com::sun::star::uno::RuntimeException);
458 virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference<
459 ::com::sun::star::util::XModifyListener >& aListener )
460 throw (::com::sun::star::uno::RuntimeException);
462 // XServiceInfo
463 virtual ::rtl::OUString SAL_CALL getImplementationName()
464 throw(::com::sun::star::uno::RuntimeException);
465 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
466 throw(::com::sun::star::uno::RuntimeException);
467 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
468 throw(::com::sun::star::uno::RuntimeException);
470 // XUnoTunnel
471 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
472 sal_Int8 >& aIdentifier )
473 throw(::com::sun::star::uno::RuntimeException);
475 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
476 static ScCellRangesBase* getImplementation( const com::sun::star::uno::Reference<
477 com::sun::star::uno::XInterface> xObj );
479 // XTypeProvider
480 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
481 throw(::com::sun::star::uno::RuntimeException);
482 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
483 throw(::com::sun::star::uno::RuntimeException);
487 class SC_DLLPUBLIC ScCellRangesObj : public ScCellRangesBase,
488 public com::sun::star::sheet::XSheetCellRangeContainer,
489 public com::sun::star::container::XNameContainer,
490 public com::sun::star::container::XEnumerationAccess
492 private:
493 ScNamedEntryArr_Impl aNamedEntries;
495 ScCellRangeObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
497 public:
498 ScCellRangesObj(ScDocShell* pDocSh, const ScRangeList& rR);
499 virtual ~ScCellRangesObj();
501 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
502 const ::com::sun::star::uno::Type & rType )
503 throw(::com::sun::star::uno::RuntimeException);
504 virtual void SAL_CALL acquire() throw();
505 virtual void SAL_CALL release() throw();
507 virtual void RefChanged();
509 // XSheetCellRanges
510 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL
511 getCells() throw(::com::sun::star::uno::RuntimeException);
512 virtual ::rtl::OUString SAL_CALL getRangeAddressesAsString()
513 throw(::com::sun::star::uno::RuntimeException);
514 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
515 getRangeAddresses() throw(::com::sun::star::uno::RuntimeException);
517 // XSheetCellRangeContainer
518 virtual void SAL_CALL addRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange,
519 sal_Bool bMergeRanges )
520 throw(::com::sun::star::uno::RuntimeException);
521 virtual void SAL_CALL removeRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange )
522 throw(::com::sun::star::container::NoSuchElementException,
523 ::com::sun::star::uno::RuntimeException);
524 virtual void SAL_CALL addRangeAddresses( const ::com::sun::star::uno::Sequence<
525 ::com::sun::star::table::CellRangeAddress >& rRanges,
526 sal_Bool bMergeRanges )
527 throw(::com::sun::star::uno::RuntimeException);
528 virtual void SAL_CALL removeRangeAddresses( const ::com::sun::star::uno::Sequence<
529 ::com::sun::star::table::CellRangeAddress >& rRanges )
530 throw(::com::sun::star::container::NoSuchElementException,
531 ::com::sun::star::uno::RuntimeException);
533 // XNameContainer
534 virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
535 const ::com::sun::star::uno::Any& aElement )
536 throw(::com::sun::star::lang::IllegalArgumentException,
537 ::com::sun::star::container::ElementExistException,
538 ::com::sun::star::lang::WrappedTargetException,
539 ::com::sun::star::uno::RuntimeException);
540 virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
541 throw(::com::sun::star::container::NoSuchElementException,
542 ::com::sun::star::lang::WrappedTargetException,
543 ::com::sun::star::uno::RuntimeException);
545 // XNameReplace
546 virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
547 const ::com::sun::star::uno::Any& aElement )
548 throw(::com::sun::star::lang::IllegalArgumentException,
549 ::com::sun::star::container::NoSuchElementException,
550 ::com::sun::star::lang::WrappedTargetException,
551 ::com::sun::star::uno::RuntimeException);
553 // XNameAccess
554 virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
555 throw(::com::sun::star::container::NoSuchElementException,
556 ::com::sun::star::lang::WrappedTargetException,
557 ::com::sun::star::uno::RuntimeException);
558 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
559 throw(::com::sun::star::uno::RuntimeException);
560 virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
561 throw(::com::sun::star::uno::RuntimeException);
563 // XIndexAccess
564 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
565 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
566 throw(::com::sun::star::lang::IndexOutOfBoundsException,
567 ::com::sun::star::lang::WrappedTargetException,
568 ::com::sun::star::uno::RuntimeException);
570 // XElementAccess
571 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
572 throw(::com::sun::star::uno::RuntimeException);
573 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
575 // XEnumerationAccess
576 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
577 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
579 // XServiceInfo
580 virtual ::rtl::OUString SAL_CALL getImplementationName()
581 throw(::com::sun::star::uno::RuntimeException);
582 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
583 throw(::com::sun::star::uno::RuntimeException);
584 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
585 throw(::com::sun::star::uno::RuntimeException);
587 // XTypeProvider
588 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
589 throw(::com::sun::star::uno::RuntimeException);
590 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
591 throw(::com::sun::star::uno::RuntimeException);
595 class SC_DLLPUBLIC ScCellRangeObj : public ScCellRangesBase,
596 public com::sun::star::sheet::XCellRangeAddressable,
597 public com::sun::star::sheet::XSheetCellRange,
598 public com::sun::star::sheet::XArrayFormulaRange,
599 public com::sun::star::sheet::XArrayFormulaTokens,
600 public com::sun::star::sheet::XCellRangeData,
601 public com::sun::star::sheet::XCellRangeFormula,
602 public com::sun::star::sheet::XMultipleOperation,
603 public com::sun::star::util::XMergeable,
604 public com::sun::star::sheet::XCellSeries,
605 public com::sun::star::table::XAutoFormattable,
606 public com::sun::star::util::XSortable,
607 public com::sun::star::sheet::XSheetFilterableEx,
608 public com::sun::star::sheet::XSubTotalCalculatable,
609 public com::sun::star::util::XImportable,
610 public com::sun::star::sheet::XCellFormatRangesSupplier,
611 public com::sun::star::sheet::XUniqueCellFormatRangesSupplier,
612 public com::sun::star::table::XColumnRowRange
614 private:
615 SfxItemPropertySet aRangePropSet;
616 ScRange aRange;
618 protected:
619 const ScRange& GetRange() const { return aRange; }
620 virtual const SfxItemPropertyMap* GetItemPropertyMap();
621 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
622 ::com::sun::star::uno::Any& )
623 throw(::com::sun::star::uno::RuntimeException);
624 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
625 const ::com::sun::star::uno::Any& aValue )
626 throw(::com::sun::star::lang::IllegalArgumentException,
627 ::com::sun::star::uno::RuntimeException);
629 ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell >
630 GetCellByPosition_Impl( sal_Int32 nColumn, sal_Int32 nRow )
631 throw(::com::sun::star::lang::IndexOutOfBoundsException,
632 ::com::sun::star::uno::RuntimeException);
634 void SetArrayFormula_Impl( const rtl::OUString& aFormula,
635 const formula::FormulaGrammar::Grammar eGrammar )
636 throw(::com::sun::star::uno::RuntimeException);
638 public:
639 ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR);
640 virtual ~ScCellRangeObj();
642 // uses ObjectShell from document, if set (returns NULL otherwise)
643 static com::sun::star::uno::Reference<com::sun::star::table::XCellRange>
644 CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR );
646 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
647 const ::com::sun::star::uno::Type & rType )
648 throw(::com::sun::star::uno::RuntimeException);
649 virtual void SAL_CALL acquire() throw();
650 virtual void SAL_CALL release() throw();
652 virtual void RefChanged();
654 // via getImplementation()
655 virtual void SetArrayFormulaWithGrammar( const ::rtl::OUString& aFormula,
656 const formula::FormulaGrammar::Grammar )
657 throw(::com::sun::star::uno::RuntimeException);
659 // XCellRange ist Basisklasse von XSheetCellRange und XSheetOperation
660 // operator XCellRangeRef() const { return (XSheetCellRange*)this; }
662 // XCellRangeAddressable
663 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getRangeAddress()
664 throw(::com::sun::star::uno::RuntimeException);
666 // XSheetCellRange
667 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
668 getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
670 // XArrayFormulaRange
671 virtual ::rtl::OUString SAL_CALL getArrayFormula() throw(::com::sun::star::uno::RuntimeException);
672 virtual void SAL_CALL setArrayFormula( const ::rtl::OUString& aFormula )
673 throw(::com::sun::star::uno::RuntimeException);
675 // XArrayFormulaTokens
676 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getArrayTokens()
677 throw (::com::sun::star::uno::RuntimeException);
678 virtual void SAL_CALL setArrayTokens( const ::com::sun::star::uno::Sequence<
679 ::com::sun::star::sheet::FormulaToken >& aTokens )
680 throw (::com::sun::star::uno::RuntimeException);
682 // XCellRangeData
683 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
684 ::com::sun::star::uno::Any > > SAL_CALL getDataArray()
685 throw(::com::sun::star::uno::RuntimeException);
686 virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence<
687 ::com::sun::star::uno::Sequence<
688 ::com::sun::star::uno::Any > >& aArray )
689 throw(::com::sun::star::uno::RuntimeException);
691 // XCellRangeFormula
692 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
693 ::rtl::OUString > > SAL_CALL getFormulaArray()
694 throw (::com::sun::star::uno::RuntimeException);
695 virtual void SAL_CALL setFormulaArray( const ::com::sun::star::uno::Sequence<
696 ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aArray )
697 throw (::com::sun::star::uno::RuntimeException);
699 // XMultipleOperation
700 virtual void SAL_CALL setTableOperation(
701 const ::com::sun::star::table::CellRangeAddress& aFormulaRange,
702 ::com::sun::star::sheet::TableOperationMode nMode,
703 const ::com::sun::star::table::CellAddress& aColumnCell,
704 const ::com::sun::star::table::CellAddress& aRowCell )
705 throw(::com::sun::star::uno::RuntimeException);
707 // XMergeable
708 virtual void SAL_CALL merge( sal_Bool bMerge ) throw(::com::sun::star::uno::RuntimeException);
709 virtual sal_Bool SAL_CALL getIsMerged() throw(::com::sun::star::uno::RuntimeException);
711 // XCellSeries
712 virtual void SAL_CALL fillSeries( ::com::sun::star::sheet::FillDirection nFillDirection,
713 ::com::sun::star::sheet::FillMode nFillMode,
714 ::com::sun::star::sheet::FillDateMode nFillDateMode,
715 double fStep, double fEndValue )
716 throw(::com::sun::star::uno::RuntimeException);
717 virtual void SAL_CALL fillAuto( ::com::sun::star::sheet::FillDirection nFillDirection,
718 sal_Int32 nSourceCount )
719 throw(::com::sun::star::uno::RuntimeException);
721 // XAutoFormattable
722 virtual void SAL_CALL autoFormat( const ::rtl::OUString& aName )
723 throw(::com::sun::star::lang::IllegalArgumentException,
724 ::com::sun::star::uno::RuntimeException);
726 // XSortable
727 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
728 createSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
729 virtual void SAL_CALL sort( const ::com::sun::star::uno::Sequence<
730 ::com::sun::star::beans::PropertyValue >& xDescriptor )
731 throw(::com::sun::star::uno::RuntimeException);
733 // XSheetFilterableEx
734 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
735 createFilterDescriptorByObject( const ::com::sun::star::uno::Reference<
736 ::com::sun::star::sheet::XSheetFilterable >& xObject )
737 throw(::com::sun::star::uno::RuntimeException);
739 // XSheetFilterable
740 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
741 createFilterDescriptor( sal_Bool bEmpty )
742 throw(::com::sun::star::uno::RuntimeException);
743 virtual void SAL_CALL filter( const ::com::sun::star::uno::Reference<
744 ::com::sun::star::sheet::XSheetFilterDescriptor >& xDescriptor )
745 throw(::com::sun::star::uno::RuntimeException);
747 // XSubTotalCalculatable
748 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
749 createSubTotalDescriptor( sal_Bool bEmpty )
750 throw(::com::sun::star::uno::RuntimeException);
751 virtual void SAL_CALL applySubTotals( const ::com::sun::star::uno::Reference<
752 ::com::sun::star::sheet::XSubTotalDescriptor >& xDescriptor,
753 sal_Bool bReplace ) throw(::com::sun::star::uno::RuntimeException);
754 virtual void SAL_CALL removeSubTotals() throw(::com::sun::star::uno::RuntimeException);
756 // XImportable
757 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
758 createImportDescriptor( sal_Bool bEmpty )
759 throw(::com::sun::star::uno::RuntimeException);
760 virtual void SAL_CALL doImport( const ::com::sun::star::uno::Sequence<
761 ::com::sun::star::beans::PropertyValue >& aDescriptor )
762 throw(::com::sun::star::uno::RuntimeException);
764 // XCellFormatRangesSupplier
765 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
766 getCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
768 // XUniqueCellFormatRangesSupplier
769 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
770 getUniqueCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
772 // XColumnRowRange
773 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL
774 getColumns() throw(::com::sun::star::uno::RuntimeException);
775 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL
776 getRows() throw(::com::sun::star::uno::RuntimeException);
778 // XCellRange
779 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
780 getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
781 throw(::com::sun::star::lang::IndexOutOfBoundsException,
782 ::com::sun::star::uno::RuntimeException);
783 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
784 getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
785 sal_Int32 nRight, sal_Int32 nBottom )
786 throw(::com::sun::star::lang::IndexOutOfBoundsException,
787 ::com::sun::star::uno::RuntimeException);
788 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
789 getCellRangeByName( const ::rtl::OUString& aRange )
790 throw(::com::sun::star::uno::RuntimeException);
791 ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
792 getCellRangeByName( const ::rtl::OUString& aRange, const ScAddress::Details& rDetails )
793 throw(::com::sun::star::uno::RuntimeException);
795 // XPropertySet ueberladen wegen Range-Properties
796 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
797 SAL_CALL getPropertySetInfo()
798 throw(::com::sun::star::uno::RuntimeException);
800 // XServiceInfo
801 virtual ::rtl::OUString SAL_CALL getImplementationName()
802 throw(::com::sun::star::uno::RuntimeException);
803 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
804 throw(::com::sun::star::uno::RuntimeException);
805 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
806 throw(::com::sun::star::uno::RuntimeException);
808 // XTypeProvider
809 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
810 throw(::com::sun::star::uno::RuntimeException);
811 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
812 throw(::com::sun::star::uno::RuntimeException);
816 //! really derive cell from range?
818 class ScCellObj : public ScCellRangeObj,
819 public com::sun::star::text::XText,
820 public com::sun::star::container::XEnumerationAccess,
821 public com::sun::star::table::XCell,
822 public com::sun::star::sheet::XFormulaTokens,
823 public com::sun::star::sheet::XCellAddressable,
824 public com::sun::star::sheet::XSheetAnnotationAnchor,
825 public com::sun::star::text::XTextFieldsSupplier,
826 public com::sun::star::document::XActionLockable
828 private:
829 SvxUnoText* pUnoText;
830 SfxItemPropertySet aCellPropSet;
831 ScAddress aCellPos;
832 sal_Int16 nActionLockCount;
834 private:
835 String GetInputString_Impl(BOOL bEnglish) const;
836 String GetOutputString_Impl() const;
837 void SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish);
838 double GetValue_Impl() const;
839 void SetValue_Impl(double fValue);
840 com::sun::star::table::CellContentType GetResultType_Impl();
842 protected:
843 virtual const SfxItemPropertyMap* GetItemPropertyMap();
844 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
845 ::com::sun::star::uno::Any& )
846 throw(::com::sun::star::uno::RuntimeException);
847 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
848 const ::com::sun::star::uno::Any& aValue )
849 throw(::com::sun::star::lang::IllegalArgumentException,
850 ::com::sun::star::uno::RuntimeException);
852 public:
853 static const SfxItemPropertyMap* GetEditPropertyMap();
854 static const SfxItemPropertyMap* GetCellPropertyMap();
856 ScCellObj(ScDocShell* pDocSh, const ScAddress& rP);
857 virtual ~ScCellObj();
859 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
860 const ::com::sun::star::uno::Type & rType )
861 throw(::com::sun::star::uno::RuntimeException);
862 virtual void SAL_CALL acquire() throw();
863 virtual void SAL_CALL release() throw();
865 virtual void RefChanged();
867 SvxUnoText& GetUnoText();
869 // XML import needs to set results at formula cells,
870 // not meant for any other purpose.
871 void SetFormulaResultString( const ::rtl::OUString& rResult );
872 void SetFormulaResultDouble( double fResult );
873 void SetFormulaWithGrammar( const ::rtl::OUString& rFormula,
874 const formula::FormulaGrammar::Grammar );
875 const ScAddress& GetPosition() const { return aCellPos; }
877 // XText
878 virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference<
879 ::com::sun::star::text::XTextRange >& xRange,
880 const ::com::sun::star::uno::Reference<
881 ::com::sun::star::text::XTextContent >& xContent,
882 sal_Bool bAbsorb )
883 throw(::com::sun::star::lang::IllegalArgumentException,
884 ::com::sun::star::uno::RuntimeException);
885 virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference<
886 ::com::sun::star::text::XTextContent >& xContent )
887 throw(::com::sun::star::container::NoSuchElementException,
888 ::com::sun::star::uno::RuntimeException);
890 // XSimpleText
891 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
892 createTextCursor() throw(::com::sun::star::uno::RuntimeException);
893 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
894 createTextCursorByRange( const ::com::sun::star::uno::Reference<
895 ::com::sun::star::text::XTextRange >& aTextPosition )
896 throw(::com::sun::star::uno::RuntimeException);
897 virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference<
898 ::com::sun::star::text::XTextRange >& xRange,
899 const ::rtl::OUString& aString, sal_Bool bAbsorb )
900 throw(::com::sun::star::uno::RuntimeException);
901 virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference<
902 ::com::sun::star::text::XTextRange >& xRange,
903 sal_Int16 nControlCharacter, sal_Bool bAbsorb )
904 throw(::com::sun::star::lang::IllegalArgumentException,
905 ::com::sun::star::uno::RuntimeException);
907 // XTextRange
908 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL
909 getText() throw(::com::sun::star::uno::RuntimeException);
910 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
911 getStart() throw(::com::sun::star::uno::RuntimeException);
912 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
913 getEnd() throw(::com::sun::star::uno::RuntimeException);
914 virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException);
915 virtual void SAL_CALL setString( const ::rtl::OUString& aString )
916 throw(::com::sun::star::uno::RuntimeException);
918 // XEnumerationAccess
919 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
920 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
922 // XElementAccess
923 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
924 throw(::com::sun::star::uno::RuntimeException);
925 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
927 // XCell
928 virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException);
929 virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula )
930 throw(::com::sun::star::uno::RuntimeException);
931 virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
932 virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
933 virtual ::com::sun::star::table::CellContentType SAL_CALL getType()
934 throw(::com::sun::star::uno::RuntimeException);
935 virtual sal_Int32 SAL_CALL getError() throw(::com::sun::star::uno::RuntimeException);
937 // XFormulaTokens
938 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens()
939 throw (::com::sun::star::uno::RuntimeException);
940 virtual void SAL_CALL setTokens( const ::com::sun::star::uno::Sequence<
941 ::com::sun::star::sheet::FormulaToken >& aTokens )
942 throw (::com::sun::star::uno::RuntimeException);
944 // XCellAddressable
945 virtual ::com::sun::star::table::CellAddress SAL_CALL getCellAddress()
946 throw(::com::sun::star::uno::RuntimeException);
948 // XSheetAnnotationAnchor
949 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotation > SAL_CALL
950 getAnnotation() throw(::com::sun::star::uno::RuntimeException);
952 // XTextFieldsSupplier
953 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL
954 getTextFields() throw(::com::sun::star::uno::RuntimeException);
955 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
956 getTextFieldMasters() throw(::com::sun::star::uno::RuntimeException);
958 // XPropertySet ueberladen wegen Zell-Properties
959 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
960 SAL_CALL getPropertySetInfo()
961 throw(::com::sun::star::uno::RuntimeException);
963 // XServiceInfo
964 virtual ::rtl::OUString SAL_CALL getImplementationName()
965 throw(::com::sun::star::uno::RuntimeException);
966 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
967 throw(::com::sun::star::uno::RuntimeException);
968 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
969 throw(::com::sun::star::uno::RuntimeException);
971 // XTypeProvider
972 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
973 throw(::com::sun::star::uno::RuntimeException);
974 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
975 throw(::com::sun::star::uno::RuntimeException);
977 // XActionLockable
978 virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
979 virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException);
980 virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException);
981 virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
982 throw(::com::sun::star::uno::RuntimeException);
983 virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
985 static String GetInputString_Impl(ScDocument* pDoc, const ScAddress& aPos, BOOL bEnglish);
986 static String GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aPos);
989 * Gets phonetic text from a cell.
991 * @param pDoc A pointer of ScDocument.
992 * @param aPos A reference of ScAdress.
994 static String GetOutputPhoneticString_Impl(ScDocument* pDoc, const ScAddress& aPos);
998 class ScTableSheetObj : public ScCellRangeObj,
999 public com::sun::star::sheet::XSpreadsheet,
1000 public com::sun::star::container::XNamed,
1001 public com::sun::star::sheet::XSheetPageBreak,
1002 public com::sun::star::sheet::XCellRangeMovement,
1003 public com::sun::star::table::XTableChartsSupplier,
1004 public com::sun::star::sheet::XDataPilotTablesSupplier,
1005 public com::sun::star::sheet::XScenariosSupplier,
1006 public com::sun::star::sheet::XSheetAnnotationsSupplier,
1007 public com::sun::star::drawing::XDrawPageSupplier,
1008 public com::sun::star::sheet::XPrintAreas,
1009 public com::sun::star::sheet::XSheetLinkable,
1010 public com::sun::star::sheet::XSheetAuditing,
1011 public com::sun::star::sheet::XSheetOutline,
1012 public com::sun::star::util::XProtectable,
1013 public com::sun::star::sheet::XScenario,
1014 public com::sun::star::sheet::XScenarioEnhanced,
1015 public com::sun::star::sheet::XExternalSheetName
1017 friend class ScTableSheetsObj; // fuer insertByName()
1019 private:
1020 SfxItemPropertySet aSheetPropSet;
1022 SCTAB GetTab_Impl() const;
1023 void PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges );
1025 protected:
1026 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1027 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
1028 ::com::sun::star::uno::Any& )
1029 throw(::com::sun::star::uno::RuntimeException);
1030 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
1031 const ::com::sun::star::uno::Any& aValue )
1032 throw(::com::sun::star::lang::IllegalArgumentException,
1033 ::com::sun::star::uno::RuntimeException);
1035 public:
1036 ScTableSheetObj(ScDocShell* pDocSh, SCTAB nTab);
1037 virtual ~ScTableSheetObj();
1039 void InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab);
1041 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1042 const ::com::sun::star::uno::Type & rType )
1043 throw(::com::sun::star::uno::RuntimeException);
1044 virtual void SAL_CALL acquire() throw();
1045 virtual void SAL_CALL release() throw();
1047 // XSpreadsheet
1048 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor >
1049 SAL_CALL createCursor() throw(::com::sun::star::uno::RuntimeException);
1050 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor > SAL_CALL
1051 createCursorByRange( const ::com::sun::star::uno::Reference<
1052 ::com::sun::star::sheet::XSheetCellRange >& aRange )
1053 throw(::com::sun::star::uno::RuntimeException);
1055 // XSheetCellRange
1056 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
1057 getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
1059 // XCellRange
1060 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
1061 getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
1062 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1063 ::com::sun::star::uno::RuntimeException);
1064 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1065 getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
1066 sal_Int32 nRight, sal_Int32 nBottom )
1067 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1068 ::com::sun::star::uno::RuntimeException);
1069 using ScCellRangeObj::getCellRangeByName;
1070 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1071 getCellRangeByName( const ::rtl::OUString& aRange )
1072 throw(::com::sun::star::uno::RuntimeException);
1074 // XNamed
1075 virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1076 virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1077 throw(::com::sun::star::uno::RuntimeException);
1079 // XSheetPageBreak
1080 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1081 getColumnPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1082 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1083 getRowPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1084 virtual void SAL_CALL removeAllManualPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1086 // XCellRangeMovement
1087 virtual void SAL_CALL insertCells( const ::com::sun::star::table::CellRangeAddress& aRange,
1088 ::com::sun::star::sheet::CellInsertMode nMode )
1089 throw(::com::sun::star::uno::RuntimeException);
1090 virtual void SAL_CALL removeRange( const ::com::sun::star::table::CellRangeAddress& aRange,
1091 ::com::sun::star::sheet::CellDeleteMode nMode )
1092 throw(::com::sun::star::uno::RuntimeException);
1093 virtual void SAL_CALL moveRange( const ::com::sun::star::table::CellAddress& aDestination,
1094 const ::com::sun::star::table::CellRangeAddress& aSource )
1095 throw(::com::sun::star::uno::RuntimeException);
1096 virtual void SAL_CALL copyRange( const ::com::sun::star::table::CellAddress& aDestination,
1097 const ::com::sun::star::table::CellRangeAddress& aSource )
1098 throw(::com::sun::star::uno::RuntimeException);
1100 // XTableChartsSupplier
1101 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableCharts > SAL_CALL
1102 getCharts() throw(::com::sun::star::uno::RuntimeException);
1104 // XDataPilotTablesSupplier
1105 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotTables > SAL_CALL
1106 getDataPilotTables() throw(::com::sun::star::uno::RuntimeException);
1108 // XScenariosSupplier
1109 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XScenarios > SAL_CALL
1110 getScenarios() throw(::com::sun::star::uno::RuntimeException);
1112 // XSheetAnnotationsSupplier
1113 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotations > SAL_CALL
1114 getAnnotations() throw(::com::sun::star::uno::RuntimeException);
1116 // XDrawPageSupplier
1117 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
1118 getDrawPage() throw(::com::sun::star::uno::RuntimeException);
1120 // XPrintAreas
1121 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1122 getPrintAreas() throw(::com::sun::star::uno::RuntimeException);
1123 virtual void SAL_CALL setPrintAreas( const ::com::sun::star::uno::Sequence<
1124 ::com::sun::star::table::CellRangeAddress >& aPrintAreas )
1125 throw(::com::sun::star::uno::RuntimeException);
1126 virtual sal_Bool SAL_CALL getPrintTitleColumns() throw(::com::sun::star::uno::RuntimeException);
1127 virtual void SAL_CALL setPrintTitleColumns( sal_Bool bPrintTitleColumns )
1128 throw(::com::sun::star::uno::RuntimeException);
1129 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleColumns()
1130 throw(::com::sun::star::uno::RuntimeException);
1131 virtual void SAL_CALL setTitleColumns(
1132 const ::com::sun::star::table::CellRangeAddress& aTitleColumns )
1133 throw(::com::sun::star::uno::RuntimeException);
1134 virtual sal_Bool SAL_CALL getPrintTitleRows() throw(::com::sun::star::uno::RuntimeException);
1135 virtual void SAL_CALL setPrintTitleRows( sal_Bool bPrintTitleRows )
1136 throw(::com::sun::star::uno::RuntimeException);
1137 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleRows()
1138 throw(::com::sun::star::uno::RuntimeException);
1139 virtual void SAL_CALL setTitleRows(
1140 const ::com::sun::star::table::CellRangeAddress& aTitleRows )
1141 throw(::com::sun::star::uno::RuntimeException);
1143 // XSheetLinkable
1144 virtual ::com::sun::star::sheet::SheetLinkMode SAL_CALL getLinkMode()
1145 throw(::com::sun::star::uno::RuntimeException);
1146 virtual void SAL_CALL setLinkMode( ::com::sun::star::sheet::SheetLinkMode nLinkMode )
1147 throw(::com::sun::star::uno::RuntimeException);
1148 virtual ::rtl::OUString SAL_CALL getLinkUrl() throw(::com::sun::star::uno::RuntimeException);
1149 virtual void SAL_CALL setLinkUrl( const ::rtl::OUString& aLinkUrl )
1150 throw(::com::sun::star::uno::RuntimeException);
1151 virtual ::rtl::OUString SAL_CALL getLinkSheetName() throw(::com::sun::star::uno::RuntimeException);
1152 virtual void SAL_CALL setLinkSheetName( const ::rtl::OUString& aLinkSheetName )
1153 throw(::com::sun::star::uno::RuntimeException);
1154 virtual void SAL_CALL link( const ::rtl::OUString& aUrl,
1155 const ::rtl::OUString& aSheetName,
1156 const ::rtl::OUString& aFilterName,
1157 const ::rtl::OUString& aFilterOptions,
1158 ::com::sun::star::sheet::SheetLinkMode nMode )
1159 throw(::com::sun::star::uno::RuntimeException);
1161 // XSheetAuditing
1162 virtual sal_Bool SAL_CALL hideDependents( const ::com::sun::star::table::CellAddress& aPosition )
1163 throw(::com::sun::star::uno::RuntimeException);
1164 virtual sal_Bool SAL_CALL hidePrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1165 throw(::com::sun::star::uno::RuntimeException);
1166 virtual sal_Bool SAL_CALL showDependents( const ::com::sun::star::table::CellAddress& aPosition )
1167 throw(::com::sun::star::uno::RuntimeException);
1168 virtual sal_Bool SAL_CALL showPrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1169 throw(::com::sun::star::uno::RuntimeException);
1170 virtual sal_Bool SAL_CALL showErrors( const ::com::sun::star::table::CellAddress& aPosition )
1171 throw(::com::sun::star::uno::RuntimeException);
1172 virtual sal_Bool SAL_CALL showInvalid() throw(::com::sun::star::uno::RuntimeException);
1173 virtual void SAL_CALL clearArrows() throw(::com::sun::star::uno::RuntimeException);
1175 // XSheetOutline
1176 virtual void SAL_CALL group( const ::com::sun::star::table::CellRangeAddress& aRange,
1177 ::com::sun::star::table::TableOrientation nOrientation )
1178 throw(::com::sun::star::uno::RuntimeException);
1179 virtual void SAL_CALL ungroup( const ::com::sun::star::table::CellRangeAddress& aRange,
1180 ::com::sun::star::table::TableOrientation nOrientation )
1181 throw(::com::sun::star::uno::RuntimeException);
1182 virtual void SAL_CALL autoOutline( const ::com::sun::star::table::CellRangeAddress& aRange )
1183 throw(::com::sun::star::uno::RuntimeException);
1184 virtual void SAL_CALL clearOutline() throw(::com::sun::star::uno::RuntimeException);
1185 virtual void SAL_CALL hideDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1186 throw(::com::sun::star::uno::RuntimeException);
1187 virtual void SAL_CALL showDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1188 throw(::com::sun::star::uno::RuntimeException);
1189 virtual void SAL_CALL showLevel( sal_Int16 nLevel,
1190 ::com::sun::star::table::TableOrientation nOrientation )
1191 throw(::com::sun::star::uno::RuntimeException);
1193 // XProtectable
1194 virtual void SAL_CALL protect( const ::rtl::OUString& aPassword )
1195 throw(::com::sun::star::uno::RuntimeException);
1196 virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword )
1197 throw(::com::sun::star::lang::IllegalArgumentException,
1198 ::com::sun::star::uno::RuntimeException);
1199 virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
1201 // XScenario
1202 virtual sal_Bool SAL_CALL getIsScenario() throw(::com::sun::star::uno::RuntimeException);
1203 virtual ::rtl::OUString SAL_CALL getScenarioComment() throw(::com::sun::star::uno::RuntimeException);
1204 virtual void SAL_CALL setScenarioComment( const ::rtl::OUString& aScenarioComment )
1205 throw(::com::sun::star::uno::RuntimeException);
1206 virtual void SAL_CALL addRanges( const ::com::sun::star::uno::Sequence<
1207 ::com::sun::star::table::CellRangeAddress >& aRanges )
1208 throw(::com::sun::star::uno::RuntimeException);
1209 virtual void SAL_CALL apply() throw(::com::sun::star::uno::RuntimeException);
1210 // XScenarioEnhanced
1211 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1212 getRanges( )
1213 throw(::com::sun::star::uno::RuntimeException);
1215 // XExternalSheetName
1216 virtual void SAL_CALL setExternalName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aSheetName )
1217 throw (::com::sun::star::container::ElementExistException,
1218 ::com::sun::star::uno::RuntimeException);
1220 // XPropertySet ueberladen wegen Sheet-Properties
1221 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1222 SAL_CALL getPropertySetInfo()
1223 throw(::com::sun::star::uno::RuntimeException);
1225 // XServiceInfo
1226 virtual ::rtl::OUString SAL_CALL getImplementationName()
1227 throw(::com::sun::star::uno::RuntimeException);
1228 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1229 throw(::com::sun::star::uno::RuntimeException);
1230 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1231 throw(::com::sun::star::uno::RuntimeException);
1233 // XUnoTunnel
1234 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
1235 sal_Int8 >& aIdentifier )
1236 throw(::com::sun::star::uno::RuntimeException);
1238 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
1239 static ScTableSheetObj* getImplementation( const com::sun::star::uno::Reference<
1240 com::sun::star::uno::XInterface> xObj );
1242 // XTypeProvider
1243 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1244 throw(::com::sun::star::uno::RuntimeException);
1245 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1246 throw(::com::sun::star::uno::RuntimeException);
1250 class ScTableColumnObj : public ScCellRangeObj,
1251 public com::sun::star::container::XNamed
1253 private:
1254 SfxItemPropertySet aColPropSet;
1256 protected:
1257 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1258 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
1259 ::com::sun::star::uno::Any& )
1260 throw(::com::sun::star::uno::RuntimeException);
1261 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
1262 const ::com::sun::star::uno::Any& aValue )
1263 throw(::com::sun::star::lang::IllegalArgumentException,
1264 ::com::sun::star::uno::RuntimeException);
1266 public:
1267 ScTableColumnObj(ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab);
1268 virtual ~ScTableColumnObj();
1270 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1271 const ::com::sun::star::uno::Type & rType )
1272 throw(::com::sun::star::uno::RuntimeException);
1273 virtual void SAL_CALL acquire() throw();
1274 virtual void SAL_CALL release() throw();
1276 // XNamed
1277 virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1278 virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1279 throw(::com::sun::star::uno::RuntimeException);
1281 // XPropertySet ueberladen wegen Spalten-Properties
1282 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1283 SAL_CALL getPropertySetInfo()
1284 throw(::com::sun::star::uno::RuntimeException);
1286 // XServiceInfo
1287 virtual ::rtl::OUString SAL_CALL getImplementationName()
1288 throw(::com::sun::star::uno::RuntimeException);
1289 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1290 throw(::com::sun::star::uno::RuntimeException);
1291 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1292 throw(::com::sun::star::uno::RuntimeException);
1294 // XTypeProvider
1295 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1296 throw(::com::sun::star::uno::RuntimeException);
1297 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1298 throw(::com::sun::star::uno::RuntimeException);
1302 class ScTableRowObj : public ScCellRangeObj
1304 private:
1305 SfxItemPropertySet aRowPropSet;
1307 protected:
1308 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1309 virtual void GetOnePropertyValue( const SfxItemPropertyMap* pMap,
1310 ::com::sun::star::uno::Any& )
1311 throw(::com::sun::star::uno::RuntimeException);
1312 virtual void SetOnePropertyValue( const SfxItemPropertyMap* pMap,
1313 const ::com::sun::star::uno::Any& aValue )
1314 throw(::com::sun::star::lang::IllegalArgumentException,
1315 ::com::sun::star::uno::RuntimeException);
1317 public:
1318 ScTableRowObj(ScDocShell* pDocSh, SCROW nRow, SCTAB nTab);
1319 virtual ~ScTableRowObj();
1321 // XPropertySet ueberladen wegen Zeilen-Properties
1322 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1323 SAL_CALL getPropertySetInfo()
1324 throw(::com::sun::star::uno::RuntimeException);
1326 // XServiceInfo
1327 virtual ::rtl::OUString SAL_CALL getImplementationName()
1328 throw(::com::sun::star::uno::RuntimeException);
1329 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1330 throw(::com::sun::star::uno::RuntimeException);
1331 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1332 throw(::com::sun::star::uno::RuntimeException);
1336 class ScCellsObj : public cppu::WeakImplHelper2<
1337 com::sun::star::container::XEnumerationAccess,
1338 com::sun::star::lang::XServiceInfo >,
1339 public SfxListener
1341 private:
1342 ScDocShell* pDocShell;
1343 ScRangeList aRanges;
1345 public:
1346 ScCellsObj(ScDocShell* pDocSh, const ScRangeList& rR);
1347 virtual ~ScCellsObj();
1349 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1351 // XEnumerationAccess
1352 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1353 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1355 // XElementAccess
1356 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1357 throw(::com::sun::star::uno::RuntimeException);
1358 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1360 // XServiceInfo
1361 virtual ::rtl::OUString SAL_CALL getImplementationName()
1362 throw(::com::sun::star::uno::RuntimeException);
1363 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1364 throw(::com::sun::star::uno::RuntimeException);
1365 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1366 throw(::com::sun::star::uno::RuntimeException);
1370 class ScCellsEnumeration : public cppu::WeakImplHelper2<
1371 com::sun::star::container::XEnumeration,
1372 com::sun::star::lang::XServiceInfo >,
1373 public SfxListener
1375 private:
1376 ScDocShell* pDocShell;
1377 ScRangeList aRanges;
1378 ScAddress aPos;
1379 ScMarkData* pMark;
1380 BOOL bAtEnd;
1382 private:
1383 void Advance_Impl();
1384 void CheckPos_Impl();
1386 public:
1387 ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR);
1388 virtual ~ScCellsEnumeration();
1390 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1392 // XEnumeration
1393 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1394 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1395 throw(::com::sun::star::container::NoSuchElementException,
1396 ::com::sun::star::lang::WrappedTargetException,
1397 ::com::sun::star::uno::RuntimeException);
1399 // XServiceInfo
1400 virtual ::rtl::OUString SAL_CALL getImplementationName()
1401 throw(::com::sun::star::uno::RuntimeException);
1402 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1403 throw(::com::sun::star::uno::RuntimeException);
1404 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1405 throw(::com::sun::star::uno::RuntimeException);
1408 class ScCellFormatsObj : public cppu::WeakImplHelper3<
1409 com::sun::star::container::XIndexAccess,
1410 com::sun::star::container::XEnumerationAccess,
1411 com::sun::star::lang::XServiceInfo >,
1412 public SfxListener
1414 private:
1415 ScDocShell* pDocShell;
1416 ScRange aTotalRange;
1418 private:
1419 ScCellRangeObj* GetObjectByIndex_Impl(long nIndex) const;
1421 public:
1422 ScCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1423 virtual ~ScCellFormatsObj();
1425 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1427 // XIndexAccess
1428 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1429 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1430 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1431 ::com::sun::star::lang::WrappedTargetException,
1432 ::com::sun::star::uno::RuntimeException);
1434 // XEnumerationAccess
1435 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1436 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1438 // XElementAccess
1439 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1440 throw(::com::sun::star::uno::RuntimeException);
1441 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1443 // XServiceInfo
1444 virtual ::rtl::OUString SAL_CALL getImplementationName()
1445 throw(::com::sun::star::uno::RuntimeException);
1446 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1447 throw(::com::sun::star::uno::RuntimeException);
1448 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1449 throw(::com::sun::star::uno::RuntimeException);
1453 class ScCellFormatsEnumeration : public cppu::WeakImplHelper2<
1454 com::sun::star::container::XEnumeration,
1455 com::sun::star::lang::XServiceInfo >,
1456 public SfxListener
1458 private:
1459 ScDocShell* pDocShell;
1460 SCTAB nTab;
1461 ScAttrRectIterator* pIter;
1462 ScRange aNext;
1463 BOOL bAtEnd;
1464 BOOL bDirty;
1466 private:
1467 void Advance_Impl();
1468 ScCellRangeObj* NextObject_Impl();
1470 public:
1471 ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rR);
1472 virtual ~ScCellFormatsEnumeration();
1474 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1476 // XEnumeration
1477 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1478 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1479 throw(::com::sun::star::container::NoSuchElementException,
1480 ::com::sun::star::lang::WrappedTargetException,
1481 ::com::sun::star::uno::RuntimeException);
1483 // XServiceInfo
1484 virtual ::rtl::OUString SAL_CALL getImplementationName()
1485 throw(::com::sun::star::uno::RuntimeException);
1486 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1487 throw(::com::sun::star::uno::RuntimeException);
1488 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1489 throw(::com::sun::star::uno::RuntimeException);
1492 typedef std::vector< ScRangeList > ScMyRangeLists;
1494 class ScUniqueCellFormatsObj : public cppu::WeakImplHelper3<
1495 com::sun::star::container::XIndexAccess,
1496 com::sun::star::container::XEnumerationAccess,
1497 com::sun::star::lang::XServiceInfo >,
1498 public SfxListener
1500 private:
1501 ScDocShell* pDocShell;
1502 ScRange aTotalRange;
1503 ScMyRangeLists aRangeLists;
1505 private:
1506 void GetObjects_Impl();
1508 public:
1509 ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1510 virtual ~ScUniqueCellFormatsObj();
1512 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1514 // XIndexAccess
1515 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1516 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1517 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1518 ::com::sun::star::lang::WrappedTargetException,
1519 ::com::sun::star::uno::RuntimeException);
1521 // XEnumerationAccess
1522 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1523 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1525 // XElementAccess
1526 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1527 throw(::com::sun::star::uno::RuntimeException);
1528 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1530 // XServiceInfo
1531 virtual ::rtl::OUString SAL_CALL getImplementationName()
1532 throw(::com::sun::star::uno::RuntimeException);
1533 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1534 throw(::com::sun::star::uno::RuntimeException);
1535 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1536 throw(::com::sun::star::uno::RuntimeException);
1539 class ScUniqueCellFormatsEnumeration : public cppu::WeakImplHelper2<
1540 com::sun::star::container::XEnumeration,
1541 com::sun::star::lang::XServiceInfo >,
1542 public SfxListener
1544 private:
1545 ScMyRangeLists aRangeLists;
1546 ScDocShell* pDocShell;
1547 sal_Int32 nCurrentPosition;
1549 public:
1550 ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, const ScMyRangeLists& rRangeLists);
1551 virtual ~ScUniqueCellFormatsEnumeration();
1553 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1555 // XEnumeration
1556 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1557 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1558 throw(::com::sun::star::container::NoSuchElementException,
1559 ::com::sun::star::lang::WrappedTargetException,
1560 ::com::sun::star::uno::RuntimeException);
1562 // XServiceInfo
1563 virtual ::rtl::OUString SAL_CALL getImplementationName()
1564 throw(::com::sun::star::uno::RuntimeException);
1565 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1566 throw(::com::sun::star::uno::RuntimeException);
1567 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1568 throw(::com::sun::star::uno::RuntimeException);
1572 #endif