update dev300-m57
[ooovba.git] / sc / inc / cellsuno.hxx
blob12c8104377dc60e0861596bbe91f2f7c441404a1
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: 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;
115 class SvxItemPropertySet;
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 const SfxItemPropertySet* pPropSet;
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 SfxItemPropertySimpleEntry* pEntry );
227 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
228 ::com::sun::star::uno::Any& )
229 throw(::com::sun::star::uno::RuntimeException);
230 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
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 const SfxItemPropertySet* pRangePropSet;
616 ScRange aRange;
618 protected:
619 const ScRange& GetRange() const { return aRange; }
620 virtual const SfxItemPropertyMap* GetItemPropertyMap();
621 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
622 ::com::sun::star::uno::Any& )
623 throw(::com::sun::star::uno::RuntimeException);
624 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
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& rFormula,
635 const rtl::OUString& rFormulaNmsp,
636 const formula::FormulaGrammar::Grammar eGrammar )
637 throw(::com::sun::star::uno::RuntimeException);
639 public:
640 ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR);
641 virtual ~ScCellRangeObj();
643 // uses ObjectShell from document, if set (returns NULL otherwise)
644 static com::sun::star::uno::Reference<com::sun::star::table::XCellRange>
645 CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR );
647 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
648 const ::com::sun::star::uno::Type & rType )
649 throw(::com::sun::star::uno::RuntimeException);
650 virtual void SAL_CALL acquire() throw();
651 virtual void SAL_CALL release() throw();
653 virtual void RefChanged();
655 // via getImplementation()
656 virtual void SetArrayFormulaWithGrammar( const ::rtl::OUString& rFormula,
657 const ::rtl::OUString& rFormulaNmsp,
658 const formula::FormulaGrammar::Grammar )
659 throw(::com::sun::star::uno::RuntimeException);
661 // XCellRange ist Basisklasse von XSheetCellRange und XSheetOperation
662 // operator XCellRangeRef() const { return (XSheetCellRange*)this; }
664 // XCellRangeAddressable
665 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getRangeAddress()
666 throw(::com::sun::star::uno::RuntimeException);
668 // XSheetCellRange
669 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
670 getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
672 // XArrayFormulaRange
673 virtual ::rtl::OUString SAL_CALL getArrayFormula() throw(::com::sun::star::uno::RuntimeException);
674 virtual void SAL_CALL setArrayFormula( const ::rtl::OUString& aFormula )
675 throw(::com::sun::star::uno::RuntimeException);
677 // XArrayFormulaTokens
678 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getArrayTokens()
679 throw (::com::sun::star::uno::RuntimeException);
680 virtual void SAL_CALL setArrayTokens( const ::com::sun::star::uno::Sequence<
681 ::com::sun::star::sheet::FormulaToken >& aTokens )
682 throw (::com::sun::star::uno::RuntimeException);
684 // XCellRangeData
685 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
686 ::com::sun::star::uno::Any > > SAL_CALL getDataArray()
687 throw(::com::sun::star::uno::RuntimeException);
688 virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence<
689 ::com::sun::star::uno::Sequence<
690 ::com::sun::star::uno::Any > >& aArray )
691 throw(::com::sun::star::uno::RuntimeException);
693 // XCellRangeFormula
694 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
695 ::rtl::OUString > > SAL_CALL getFormulaArray()
696 throw (::com::sun::star::uno::RuntimeException);
697 virtual void SAL_CALL setFormulaArray( const ::com::sun::star::uno::Sequence<
698 ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aArray )
699 throw (::com::sun::star::uno::RuntimeException);
701 // XMultipleOperation
702 virtual void SAL_CALL setTableOperation(
703 const ::com::sun::star::table::CellRangeAddress& aFormulaRange,
704 ::com::sun::star::sheet::TableOperationMode nMode,
705 const ::com::sun::star::table::CellAddress& aColumnCell,
706 const ::com::sun::star::table::CellAddress& aRowCell )
707 throw(::com::sun::star::uno::RuntimeException);
709 // XMergeable
710 virtual void SAL_CALL merge( sal_Bool bMerge ) throw(::com::sun::star::uno::RuntimeException);
711 virtual sal_Bool SAL_CALL getIsMerged() throw(::com::sun::star::uno::RuntimeException);
713 // XCellSeries
714 virtual void SAL_CALL fillSeries( ::com::sun::star::sheet::FillDirection nFillDirection,
715 ::com::sun::star::sheet::FillMode nFillMode,
716 ::com::sun::star::sheet::FillDateMode nFillDateMode,
717 double fStep, double fEndValue )
718 throw(::com::sun::star::uno::RuntimeException);
719 virtual void SAL_CALL fillAuto( ::com::sun::star::sheet::FillDirection nFillDirection,
720 sal_Int32 nSourceCount )
721 throw(::com::sun::star::uno::RuntimeException);
723 // XAutoFormattable
724 virtual void SAL_CALL autoFormat( const ::rtl::OUString& aName )
725 throw(::com::sun::star::lang::IllegalArgumentException,
726 ::com::sun::star::uno::RuntimeException);
728 // XSortable
729 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
730 createSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
731 virtual void SAL_CALL sort( const ::com::sun::star::uno::Sequence<
732 ::com::sun::star::beans::PropertyValue >& xDescriptor )
733 throw(::com::sun::star::uno::RuntimeException);
735 // XSheetFilterableEx
736 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
737 createFilterDescriptorByObject( const ::com::sun::star::uno::Reference<
738 ::com::sun::star::sheet::XSheetFilterable >& xObject )
739 throw(::com::sun::star::uno::RuntimeException);
741 // XSheetFilterable
742 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
743 createFilterDescriptor( sal_Bool bEmpty )
744 throw(::com::sun::star::uno::RuntimeException);
745 virtual void SAL_CALL filter( const ::com::sun::star::uno::Reference<
746 ::com::sun::star::sheet::XSheetFilterDescriptor >& xDescriptor )
747 throw(::com::sun::star::uno::RuntimeException);
749 // XSubTotalCalculatable
750 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
751 createSubTotalDescriptor( sal_Bool bEmpty )
752 throw(::com::sun::star::uno::RuntimeException);
753 virtual void SAL_CALL applySubTotals( const ::com::sun::star::uno::Reference<
754 ::com::sun::star::sheet::XSubTotalDescriptor >& xDescriptor,
755 sal_Bool bReplace ) throw(::com::sun::star::uno::RuntimeException);
756 virtual void SAL_CALL removeSubTotals() throw(::com::sun::star::uno::RuntimeException);
758 // XImportable
759 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
760 createImportDescriptor( sal_Bool bEmpty )
761 throw(::com::sun::star::uno::RuntimeException);
762 virtual void SAL_CALL doImport( const ::com::sun::star::uno::Sequence<
763 ::com::sun::star::beans::PropertyValue >& aDescriptor )
764 throw(::com::sun::star::uno::RuntimeException);
766 // XCellFormatRangesSupplier
767 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
768 getCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
770 // XUniqueCellFormatRangesSupplier
771 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
772 getUniqueCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
774 // XColumnRowRange
775 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL
776 getColumns() throw(::com::sun::star::uno::RuntimeException);
777 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL
778 getRows() throw(::com::sun::star::uno::RuntimeException);
780 // XCellRange
781 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
782 getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
783 throw(::com::sun::star::lang::IndexOutOfBoundsException,
784 ::com::sun::star::uno::RuntimeException);
785 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
786 getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
787 sal_Int32 nRight, sal_Int32 nBottom )
788 throw(::com::sun::star::lang::IndexOutOfBoundsException,
789 ::com::sun::star::uno::RuntimeException);
790 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
791 getCellRangeByName( const ::rtl::OUString& aRange )
792 throw(::com::sun::star::uno::RuntimeException);
793 ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
794 getCellRangeByName( const ::rtl::OUString& aRange, const ScAddress::Details& rDetails )
795 throw(::com::sun::star::uno::RuntimeException);
797 // XPropertySet ueberladen wegen Range-Properties
798 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
799 SAL_CALL getPropertySetInfo()
800 throw(::com::sun::star::uno::RuntimeException);
802 // XServiceInfo
803 virtual ::rtl::OUString SAL_CALL getImplementationName()
804 throw(::com::sun::star::uno::RuntimeException);
805 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
806 throw(::com::sun::star::uno::RuntimeException);
807 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
808 throw(::com::sun::star::uno::RuntimeException);
810 // XTypeProvider
811 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
812 throw(::com::sun::star::uno::RuntimeException);
813 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
814 throw(::com::sun::star::uno::RuntimeException);
818 //! really derive cell from range?
820 class ScCellObj : public ScCellRangeObj,
821 public com::sun::star::text::XText,
822 public com::sun::star::container::XEnumerationAccess,
823 public com::sun::star::table::XCell,
824 public com::sun::star::sheet::XFormulaTokens,
825 public com::sun::star::sheet::XCellAddressable,
826 public com::sun::star::sheet::XSheetAnnotationAnchor,
827 public com::sun::star::text::XTextFieldsSupplier,
828 public com::sun::star::document::XActionLockable
830 private:
831 SvxUnoText* pUnoText;
832 const SfxItemPropertySet* pCellPropSet;
833 ScAddress aCellPos;
834 sal_Int16 nActionLockCount;
836 private:
837 String GetInputString_Impl(BOOL bEnglish) const;
838 String GetOutputString_Impl() const;
839 void SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish);
840 double GetValue_Impl() const;
841 void SetValue_Impl(double fValue);
842 com::sun::star::table::CellContentType GetResultType_Impl();
844 protected:
845 virtual const SfxItemPropertyMap* GetItemPropertyMap();
846 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
847 ::com::sun::star::uno::Any& )
848 throw(::com::sun::star::uno::RuntimeException);
849 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
850 const ::com::sun::star::uno::Any& aValue )
851 throw(::com::sun::star::lang::IllegalArgumentException,
852 ::com::sun::star::uno::RuntimeException);
854 public:
855 static const SvxItemPropertySet* GetEditPropertySet();
856 static const SfxItemPropertyMap* GetCellPropertyMap();
858 ScCellObj(ScDocShell* pDocSh, const ScAddress& rP);
859 virtual ~ScCellObj();
861 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
862 const ::com::sun::star::uno::Type & rType )
863 throw(::com::sun::star::uno::RuntimeException);
864 virtual void SAL_CALL acquire() throw();
865 virtual void SAL_CALL release() throw();
867 virtual void RefChanged();
869 SvxUnoText& GetUnoText();
871 // XML import needs to set results at formula cells,
872 // not meant for any other purpose.
873 void SetFormulaResultString( const ::rtl::OUString& rResult );
874 void SetFormulaResultDouble( double fResult );
875 void SetFormulaWithGrammar( const ::rtl::OUString& rFormula,
876 const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar );
877 const ScAddress& GetPosition() const { return aCellPos; }
879 // XText
880 virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference<
881 ::com::sun::star::text::XTextRange >& xRange,
882 const ::com::sun::star::uno::Reference<
883 ::com::sun::star::text::XTextContent >& xContent,
884 sal_Bool bAbsorb )
885 throw(::com::sun::star::lang::IllegalArgumentException,
886 ::com::sun::star::uno::RuntimeException);
887 virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference<
888 ::com::sun::star::text::XTextContent >& xContent )
889 throw(::com::sun::star::container::NoSuchElementException,
890 ::com::sun::star::uno::RuntimeException);
892 // XSimpleText
893 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
894 createTextCursor() throw(::com::sun::star::uno::RuntimeException);
895 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
896 createTextCursorByRange( const ::com::sun::star::uno::Reference<
897 ::com::sun::star::text::XTextRange >& aTextPosition )
898 throw(::com::sun::star::uno::RuntimeException);
899 virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference<
900 ::com::sun::star::text::XTextRange >& xRange,
901 const ::rtl::OUString& aString, sal_Bool bAbsorb )
902 throw(::com::sun::star::uno::RuntimeException);
903 virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference<
904 ::com::sun::star::text::XTextRange >& xRange,
905 sal_Int16 nControlCharacter, sal_Bool bAbsorb )
906 throw(::com::sun::star::lang::IllegalArgumentException,
907 ::com::sun::star::uno::RuntimeException);
909 // XTextRange
910 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL
911 getText() throw(::com::sun::star::uno::RuntimeException);
912 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
913 getStart() throw(::com::sun::star::uno::RuntimeException);
914 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
915 getEnd() throw(::com::sun::star::uno::RuntimeException);
916 virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException);
917 virtual void SAL_CALL setString( const ::rtl::OUString& aString )
918 throw(::com::sun::star::uno::RuntimeException);
920 // XEnumerationAccess
921 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
922 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
924 // XElementAccess
925 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
926 throw(::com::sun::star::uno::RuntimeException);
927 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
929 // XCell
930 virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException);
931 virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula )
932 throw(::com::sun::star::uno::RuntimeException);
933 virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
934 virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
935 virtual ::com::sun::star::table::CellContentType SAL_CALL getType()
936 throw(::com::sun::star::uno::RuntimeException);
937 virtual sal_Int32 SAL_CALL getError() throw(::com::sun::star::uno::RuntimeException);
939 // XFormulaTokens
940 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens()
941 throw (::com::sun::star::uno::RuntimeException);
942 virtual void SAL_CALL setTokens( const ::com::sun::star::uno::Sequence<
943 ::com::sun::star::sheet::FormulaToken >& aTokens )
944 throw (::com::sun::star::uno::RuntimeException);
946 // XCellAddressable
947 virtual ::com::sun::star::table::CellAddress SAL_CALL getCellAddress()
948 throw(::com::sun::star::uno::RuntimeException);
950 // XSheetAnnotationAnchor
951 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotation > SAL_CALL
952 getAnnotation() throw(::com::sun::star::uno::RuntimeException);
954 // XTextFieldsSupplier
955 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL
956 getTextFields() throw(::com::sun::star::uno::RuntimeException);
957 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
958 getTextFieldMasters() throw(::com::sun::star::uno::RuntimeException);
960 // XPropertySet ueberladen wegen Zell-Properties
961 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
962 SAL_CALL getPropertySetInfo()
963 throw(::com::sun::star::uno::RuntimeException);
965 // XServiceInfo
966 virtual ::rtl::OUString SAL_CALL getImplementationName()
967 throw(::com::sun::star::uno::RuntimeException);
968 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
969 throw(::com::sun::star::uno::RuntimeException);
970 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
971 throw(::com::sun::star::uno::RuntimeException);
973 // XTypeProvider
974 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
975 throw(::com::sun::star::uno::RuntimeException);
976 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
977 throw(::com::sun::star::uno::RuntimeException);
979 // XActionLockable
980 virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
981 virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException);
982 virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException);
983 virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
984 throw(::com::sun::star::uno::RuntimeException);
985 virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
987 static String GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aPos);
990 * Gets phonetic text from a cell.
992 * @param pDoc A pointer of ScDocument.
993 * @param aPos A reference of ScAdress.
995 static String GetOutputPhoneticString_Impl(ScDocument* pDoc, const ScAddress& aPos);
999 class ScTableSheetObj : public ScCellRangeObj,
1000 public com::sun::star::sheet::XSpreadsheet,
1001 public com::sun::star::container::XNamed,
1002 public com::sun::star::sheet::XSheetPageBreak,
1003 public com::sun::star::sheet::XCellRangeMovement,
1004 public com::sun::star::table::XTableChartsSupplier,
1005 public com::sun::star::sheet::XDataPilotTablesSupplier,
1006 public com::sun::star::sheet::XScenariosSupplier,
1007 public com::sun::star::sheet::XSheetAnnotationsSupplier,
1008 public com::sun::star::drawing::XDrawPageSupplier,
1009 public com::sun::star::sheet::XPrintAreas,
1010 public com::sun::star::sheet::XSheetLinkable,
1011 public com::sun::star::sheet::XSheetAuditing,
1012 public com::sun::star::sheet::XSheetOutline,
1013 public com::sun::star::util::XProtectable,
1014 public com::sun::star::sheet::XScenario,
1015 public com::sun::star::sheet::XScenarioEnhanced,
1016 public com::sun::star::sheet::XExternalSheetName
1018 friend class ScTableSheetsObj; // fuer insertByName()
1020 private:
1021 const SfxItemPropertySet* pSheetPropSet;
1023 SCTAB GetTab_Impl() const;
1024 void PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges );
1026 protected:
1027 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1028 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1029 ::com::sun::star::uno::Any& )
1030 throw(::com::sun::star::uno::RuntimeException);
1031 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1032 const ::com::sun::star::uno::Any& aValue )
1033 throw(::com::sun::star::lang::IllegalArgumentException,
1034 ::com::sun::star::uno::RuntimeException);
1036 public:
1037 ScTableSheetObj(ScDocShell* pDocSh, SCTAB nTab);
1038 virtual ~ScTableSheetObj();
1040 void InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab);
1042 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1043 const ::com::sun::star::uno::Type & rType )
1044 throw(::com::sun::star::uno::RuntimeException);
1045 virtual void SAL_CALL acquire() throw();
1046 virtual void SAL_CALL release() throw();
1048 // XSpreadsheet
1049 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor >
1050 SAL_CALL createCursor() throw(::com::sun::star::uno::RuntimeException);
1051 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor > SAL_CALL
1052 createCursorByRange( const ::com::sun::star::uno::Reference<
1053 ::com::sun::star::sheet::XSheetCellRange >& aRange )
1054 throw(::com::sun::star::uno::RuntimeException);
1056 // XSheetCellRange
1057 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
1058 getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
1060 // XCellRange
1061 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
1062 getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
1063 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1064 ::com::sun::star::uno::RuntimeException);
1065 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1066 getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
1067 sal_Int32 nRight, sal_Int32 nBottom )
1068 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1069 ::com::sun::star::uno::RuntimeException);
1070 using ScCellRangeObj::getCellRangeByName;
1071 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1072 getCellRangeByName( const ::rtl::OUString& aRange )
1073 throw(::com::sun::star::uno::RuntimeException);
1075 // XNamed
1076 virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1077 virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1078 throw(::com::sun::star::uno::RuntimeException);
1080 // XSheetPageBreak
1081 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1082 getColumnPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1083 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1084 getRowPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1085 virtual void SAL_CALL removeAllManualPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1087 // XCellRangeMovement
1088 virtual void SAL_CALL insertCells( const ::com::sun::star::table::CellRangeAddress& aRange,
1089 ::com::sun::star::sheet::CellInsertMode nMode )
1090 throw(::com::sun::star::uno::RuntimeException);
1091 virtual void SAL_CALL removeRange( const ::com::sun::star::table::CellRangeAddress& aRange,
1092 ::com::sun::star::sheet::CellDeleteMode nMode )
1093 throw(::com::sun::star::uno::RuntimeException);
1094 virtual void SAL_CALL moveRange( const ::com::sun::star::table::CellAddress& aDestination,
1095 const ::com::sun::star::table::CellRangeAddress& aSource )
1096 throw(::com::sun::star::uno::RuntimeException);
1097 virtual void SAL_CALL copyRange( const ::com::sun::star::table::CellAddress& aDestination,
1098 const ::com::sun::star::table::CellRangeAddress& aSource )
1099 throw(::com::sun::star::uno::RuntimeException);
1101 // XTableChartsSupplier
1102 virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableCharts > SAL_CALL
1103 getCharts() throw(::com::sun::star::uno::RuntimeException);
1105 // XDataPilotTablesSupplier
1106 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotTables > SAL_CALL
1107 getDataPilotTables() throw(::com::sun::star::uno::RuntimeException);
1109 // XScenariosSupplier
1110 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XScenarios > SAL_CALL
1111 getScenarios() throw(::com::sun::star::uno::RuntimeException);
1113 // XSheetAnnotationsSupplier
1114 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotations > SAL_CALL
1115 getAnnotations() throw(::com::sun::star::uno::RuntimeException);
1117 // XDrawPageSupplier
1118 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
1119 getDrawPage() throw(::com::sun::star::uno::RuntimeException);
1121 // XPrintAreas
1122 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1123 getPrintAreas() throw(::com::sun::star::uno::RuntimeException);
1124 virtual void SAL_CALL setPrintAreas( const ::com::sun::star::uno::Sequence<
1125 ::com::sun::star::table::CellRangeAddress >& aPrintAreas )
1126 throw(::com::sun::star::uno::RuntimeException);
1127 virtual sal_Bool SAL_CALL getPrintTitleColumns() throw(::com::sun::star::uno::RuntimeException);
1128 virtual void SAL_CALL setPrintTitleColumns( sal_Bool bPrintTitleColumns )
1129 throw(::com::sun::star::uno::RuntimeException);
1130 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleColumns()
1131 throw(::com::sun::star::uno::RuntimeException);
1132 virtual void SAL_CALL setTitleColumns(
1133 const ::com::sun::star::table::CellRangeAddress& aTitleColumns )
1134 throw(::com::sun::star::uno::RuntimeException);
1135 virtual sal_Bool SAL_CALL getPrintTitleRows() throw(::com::sun::star::uno::RuntimeException);
1136 virtual void SAL_CALL setPrintTitleRows( sal_Bool bPrintTitleRows )
1137 throw(::com::sun::star::uno::RuntimeException);
1138 virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleRows()
1139 throw(::com::sun::star::uno::RuntimeException);
1140 virtual void SAL_CALL setTitleRows(
1141 const ::com::sun::star::table::CellRangeAddress& aTitleRows )
1142 throw(::com::sun::star::uno::RuntimeException);
1144 // XSheetLinkable
1145 virtual ::com::sun::star::sheet::SheetLinkMode SAL_CALL getLinkMode()
1146 throw(::com::sun::star::uno::RuntimeException);
1147 virtual void SAL_CALL setLinkMode( ::com::sun::star::sheet::SheetLinkMode nLinkMode )
1148 throw(::com::sun::star::uno::RuntimeException);
1149 virtual ::rtl::OUString SAL_CALL getLinkUrl() throw(::com::sun::star::uno::RuntimeException);
1150 virtual void SAL_CALL setLinkUrl( const ::rtl::OUString& aLinkUrl )
1151 throw(::com::sun::star::uno::RuntimeException);
1152 virtual ::rtl::OUString SAL_CALL getLinkSheetName() throw(::com::sun::star::uno::RuntimeException);
1153 virtual void SAL_CALL setLinkSheetName( const ::rtl::OUString& aLinkSheetName )
1154 throw(::com::sun::star::uno::RuntimeException);
1155 virtual void SAL_CALL link( const ::rtl::OUString& aUrl,
1156 const ::rtl::OUString& aSheetName,
1157 const ::rtl::OUString& aFilterName,
1158 const ::rtl::OUString& aFilterOptions,
1159 ::com::sun::star::sheet::SheetLinkMode nMode )
1160 throw(::com::sun::star::uno::RuntimeException);
1162 // XSheetAuditing
1163 virtual sal_Bool SAL_CALL hideDependents( const ::com::sun::star::table::CellAddress& aPosition )
1164 throw(::com::sun::star::uno::RuntimeException);
1165 virtual sal_Bool SAL_CALL hidePrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1166 throw(::com::sun::star::uno::RuntimeException);
1167 virtual sal_Bool SAL_CALL showDependents( const ::com::sun::star::table::CellAddress& aPosition )
1168 throw(::com::sun::star::uno::RuntimeException);
1169 virtual sal_Bool SAL_CALL showPrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1170 throw(::com::sun::star::uno::RuntimeException);
1171 virtual sal_Bool SAL_CALL showErrors( const ::com::sun::star::table::CellAddress& aPosition )
1172 throw(::com::sun::star::uno::RuntimeException);
1173 virtual sal_Bool SAL_CALL showInvalid() throw(::com::sun::star::uno::RuntimeException);
1174 virtual void SAL_CALL clearArrows() throw(::com::sun::star::uno::RuntimeException);
1176 // XSheetOutline
1177 virtual void SAL_CALL group( const ::com::sun::star::table::CellRangeAddress& aRange,
1178 ::com::sun::star::table::TableOrientation nOrientation )
1179 throw(::com::sun::star::uno::RuntimeException);
1180 virtual void SAL_CALL ungroup( const ::com::sun::star::table::CellRangeAddress& aRange,
1181 ::com::sun::star::table::TableOrientation nOrientation )
1182 throw(::com::sun::star::uno::RuntimeException);
1183 virtual void SAL_CALL autoOutline( const ::com::sun::star::table::CellRangeAddress& aRange )
1184 throw(::com::sun::star::uno::RuntimeException);
1185 virtual void SAL_CALL clearOutline() throw(::com::sun::star::uno::RuntimeException);
1186 virtual void SAL_CALL hideDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1187 throw(::com::sun::star::uno::RuntimeException);
1188 virtual void SAL_CALL showDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1189 throw(::com::sun::star::uno::RuntimeException);
1190 virtual void SAL_CALL showLevel( sal_Int16 nLevel,
1191 ::com::sun::star::table::TableOrientation nOrientation )
1192 throw(::com::sun::star::uno::RuntimeException);
1194 // XProtectable
1195 virtual void SAL_CALL protect( const ::rtl::OUString& aPassword )
1196 throw(::com::sun::star::uno::RuntimeException);
1197 virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword )
1198 throw(::com::sun::star::lang::IllegalArgumentException,
1199 ::com::sun::star::uno::RuntimeException);
1200 virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
1202 // XScenario
1203 virtual sal_Bool SAL_CALL getIsScenario() throw(::com::sun::star::uno::RuntimeException);
1204 virtual ::rtl::OUString SAL_CALL getScenarioComment() throw(::com::sun::star::uno::RuntimeException);
1205 virtual void SAL_CALL setScenarioComment( const ::rtl::OUString& aScenarioComment )
1206 throw(::com::sun::star::uno::RuntimeException);
1207 virtual void SAL_CALL addRanges( const ::com::sun::star::uno::Sequence<
1208 ::com::sun::star::table::CellRangeAddress >& aRanges )
1209 throw(::com::sun::star::uno::RuntimeException);
1210 virtual void SAL_CALL apply() throw(::com::sun::star::uno::RuntimeException);
1211 // XScenarioEnhanced
1212 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1213 getRanges( )
1214 throw(::com::sun::star::uno::RuntimeException);
1216 // XExternalSheetName
1217 virtual void SAL_CALL setExternalName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aSheetName )
1218 throw (::com::sun::star::container::ElementExistException,
1219 ::com::sun::star::uno::RuntimeException);
1221 // XPropertySet ueberladen wegen Sheet-Properties
1222 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1223 SAL_CALL getPropertySetInfo()
1224 throw(::com::sun::star::uno::RuntimeException);
1226 // XServiceInfo
1227 virtual ::rtl::OUString SAL_CALL getImplementationName()
1228 throw(::com::sun::star::uno::RuntimeException);
1229 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1230 throw(::com::sun::star::uno::RuntimeException);
1231 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1232 throw(::com::sun::star::uno::RuntimeException);
1234 // XUnoTunnel
1235 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
1236 sal_Int8 >& aIdentifier )
1237 throw(::com::sun::star::uno::RuntimeException);
1239 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
1240 static ScTableSheetObj* getImplementation( const com::sun::star::uno::Reference<
1241 com::sun::star::uno::XInterface> xObj );
1243 // XTypeProvider
1244 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1245 throw(::com::sun::star::uno::RuntimeException);
1246 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1247 throw(::com::sun::star::uno::RuntimeException);
1251 class ScTableColumnObj : public ScCellRangeObj,
1252 public com::sun::star::container::XNamed
1254 private:
1255 const SfxItemPropertySet* pColPropSet;
1257 protected:
1258 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1259 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1260 ::com::sun::star::uno::Any& )
1261 throw(::com::sun::star::uno::RuntimeException);
1262 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1263 const ::com::sun::star::uno::Any& aValue )
1264 throw(::com::sun::star::lang::IllegalArgumentException,
1265 ::com::sun::star::uno::RuntimeException);
1267 public:
1268 ScTableColumnObj(ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab);
1269 virtual ~ScTableColumnObj();
1271 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1272 const ::com::sun::star::uno::Type & rType )
1273 throw(::com::sun::star::uno::RuntimeException);
1274 virtual void SAL_CALL acquire() throw();
1275 virtual void SAL_CALL release() throw();
1277 // XNamed
1278 virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1279 virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1280 throw(::com::sun::star::uno::RuntimeException);
1282 // XPropertySet ueberladen wegen Spalten-Properties
1283 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1284 SAL_CALL getPropertySetInfo()
1285 throw(::com::sun::star::uno::RuntimeException);
1287 // XServiceInfo
1288 virtual ::rtl::OUString SAL_CALL getImplementationName()
1289 throw(::com::sun::star::uno::RuntimeException);
1290 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1291 throw(::com::sun::star::uno::RuntimeException);
1292 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1293 throw(::com::sun::star::uno::RuntimeException);
1295 // XTypeProvider
1296 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1297 throw(::com::sun::star::uno::RuntimeException);
1298 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1299 throw(::com::sun::star::uno::RuntimeException);
1303 class ScTableRowObj : public ScCellRangeObj
1305 private:
1306 const SfxItemPropertySet* pRowPropSet;
1308 protected:
1309 virtual const SfxItemPropertyMap* GetItemPropertyMap();
1310 virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1311 ::com::sun::star::uno::Any& )
1312 throw(::com::sun::star::uno::RuntimeException);
1313 virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1314 const ::com::sun::star::uno::Any& aValue )
1315 throw(::com::sun::star::lang::IllegalArgumentException,
1316 ::com::sun::star::uno::RuntimeException);
1318 public:
1319 ScTableRowObj(ScDocShell* pDocSh, SCROW nRow, SCTAB nTab);
1320 virtual ~ScTableRowObj();
1322 // XPropertySet ueberladen wegen Zeilen-Properties
1323 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1324 SAL_CALL getPropertySetInfo()
1325 throw(::com::sun::star::uno::RuntimeException);
1327 // XServiceInfo
1328 virtual ::rtl::OUString SAL_CALL getImplementationName()
1329 throw(::com::sun::star::uno::RuntimeException);
1330 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1331 throw(::com::sun::star::uno::RuntimeException);
1332 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1333 throw(::com::sun::star::uno::RuntimeException);
1337 class ScCellsObj : public cppu::WeakImplHelper2<
1338 com::sun::star::container::XEnumerationAccess,
1339 com::sun::star::lang::XServiceInfo >,
1340 public SfxListener
1342 private:
1343 ScDocShell* pDocShell;
1344 ScRangeList aRanges;
1346 public:
1347 ScCellsObj(ScDocShell* pDocSh, const ScRangeList& rR);
1348 virtual ~ScCellsObj();
1350 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1352 // XEnumerationAccess
1353 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1354 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1356 // XElementAccess
1357 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1358 throw(::com::sun::star::uno::RuntimeException);
1359 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1361 // XServiceInfo
1362 virtual ::rtl::OUString SAL_CALL getImplementationName()
1363 throw(::com::sun::star::uno::RuntimeException);
1364 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1365 throw(::com::sun::star::uno::RuntimeException);
1366 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1367 throw(::com::sun::star::uno::RuntimeException);
1371 class ScCellsEnumeration : public cppu::WeakImplHelper2<
1372 com::sun::star::container::XEnumeration,
1373 com::sun::star::lang::XServiceInfo >,
1374 public SfxListener
1376 private:
1377 ScDocShell* pDocShell;
1378 ScRangeList aRanges;
1379 ScAddress aPos;
1380 ScMarkData* pMark;
1381 BOOL bAtEnd;
1383 private:
1384 void Advance_Impl();
1385 void CheckPos_Impl();
1387 public:
1388 ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR);
1389 virtual ~ScCellsEnumeration();
1391 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1393 // XEnumeration
1394 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1395 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1396 throw(::com::sun::star::container::NoSuchElementException,
1397 ::com::sun::star::lang::WrappedTargetException,
1398 ::com::sun::star::uno::RuntimeException);
1400 // XServiceInfo
1401 virtual ::rtl::OUString SAL_CALL getImplementationName()
1402 throw(::com::sun::star::uno::RuntimeException);
1403 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1404 throw(::com::sun::star::uno::RuntimeException);
1405 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1406 throw(::com::sun::star::uno::RuntimeException);
1409 class ScCellFormatsObj : public cppu::WeakImplHelper3<
1410 com::sun::star::container::XIndexAccess,
1411 com::sun::star::container::XEnumerationAccess,
1412 com::sun::star::lang::XServiceInfo >,
1413 public SfxListener
1415 private:
1416 ScDocShell* pDocShell;
1417 ScRange aTotalRange;
1419 private:
1420 ScCellRangeObj* GetObjectByIndex_Impl(long nIndex) const;
1422 public:
1423 ScCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1424 virtual ~ScCellFormatsObj();
1426 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1428 // XIndexAccess
1429 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1430 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1431 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1432 ::com::sun::star::lang::WrappedTargetException,
1433 ::com::sun::star::uno::RuntimeException);
1435 // XEnumerationAccess
1436 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1437 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1439 // XElementAccess
1440 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1441 throw(::com::sun::star::uno::RuntimeException);
1442 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1444 // XServiceInfo
1445 virtual ::rtl::OUString SAL_CALL getImplementationName()
1446 throw(::com::sun::star::uno::RuntimeException);
1447 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1448 throw(::com::sun::star::uno::RuntimeException);
1449 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1450 throw(::com::sun::star::uno::RuntimeException);
1454 class ScCellFormatsEnumeration : public cppu::WeakImplHelper2<
1455 com::sun::star::container::XEnumeration,
1456 com::sun::star::lang::XServiceInfo >,
1457 public SfxListener
1459 private:
1460 ScDocShell* pDocShell;
1461 SCTAB nTab;
1462 ScAttrRectIterator* pIter;
1463 ScRange aNext;
1464 BOOL bAtEnd;
1465 BOOL bDirty;
1467 private:
1468 void Advance_Impl();
1469 ScCellRangeObj* NextObject_Impl();
1471 public:
1472 ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rR);
1473 virtual ~ScCellFormatsEnumeration();
1475 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1477 // XEnumeration
1478 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1479 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1480 throw(::com::sun::star::container::NoSuchElementException,
1481 ::com::sun::star::lang::WrappedTargetException,
1482 ::com::sun::star::uno::RuntimeException);
1484 // XServiceInfo
1485 virtual ::rtl::OUString SAL_CALL getImplementationName()
1486 throw(::com::sun::star::uno::RuntimeException);
1487 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1488 throw(::com::sun::star::uno::RuntimeException);
1489 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1490 throw(::com::sun::star::uno::RuntimeException);
1493 typedef std::vector< ScRangeList > ScMyRangeLists;
1495 class ScUniqueCellFormatsObj : public cppu::WeakImplHelper3<
1496 com::sun::star::container::XIndexAccess,
1497 com::sun::star::container::XEnumerationAccess,
1498 com::sun::star::lang::XServiceInfo >,
1499 public SfxListener
1501 private:
1502 ScDocShell* pDocShell;
1503 ScRange aTotalRange;
1504 ScMyRangeLists aRangeLists;
1506 private:
1507 void GetObjects_Impl();
1509 public:
1510 ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1511 virtual ~ScUniqueCellFormatsObj();
1513 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1515 // XIndexAccess
1516 virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1517 virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1518 throw(::com::sun::star::lang::IndexOutOfBoundsException,
1519 ::com::sun::star::lang::WrappedTargetException,
1520 ::com::sun::star::uno::RuntimeException);
1522 // XEnumerationAccess
1523 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1524 createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1526 // XElementAccess
1527 virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1528 throw(::com::sun::star::uno::RuntimeException);
1529 virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1531 // XServiceInfo
1532 virtual ::rtl::OUString SAL_CALL getImplementationName()
1533 throw(::com::sun::star::uno::RuntimeException);
1534 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1535 throw(::com::sun::star::uno::RuntimeException);
1536 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1537 throw(::com::sun::star::uno::RuntimeException);
1540 class ScUniqueCellFormatsEnumeration : public cppu::WeakImplHelper2<
1541 com::sun::star::container::XEnumeration,
1542 com::sun::star::lang::XServiceInfo >,
1543 public SfxListener
1545 private:
1546 ScMyRangeLists aRangeLists;
1547 ScDocShell* pDocShell;
1548 sal_Int32 nCurrentPosition;
1550 public:
1551 ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, const ScMyRangeLists& rRangeLists);
1552 virtual ~ScUniqueCellFormatsEnumeration();
1554 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1556 // XEnumeration
1557 virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1558 virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1559 throw(::com::sun::star::container::NoSuchElementException,
1560 ::com::sun::star::lang::WrappedTargetException,
1561 ::com::sun::star::uno::RuntimeException);
1563 // XServiceInfo
1564 virtual ::rtl::OUString SAL_CALL getImplementationName()
1565 throw(::com::sun::star::uno::RuntimeException);
1566 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1567 throw(::com::sun::star::uno::RuntimeException);
1568 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1569 throw(::com::sun::star::uno::RuntimeException);
1573 #endif