Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SC_CELLSUNO_HXX
21 : #define SC_CELLSUNO_HXX
22 :
23 : #include "global.hxx" // ScRange, ScAddress
24 : #include "rangelst.hxx" // ScRangeList
25 :
26 : #include <editeng/unotext.hxx>
27 : #include <formula/grammar.hxx>
28 : #include <rtl/ref.hxx>
29 : #include <tools/link.hxx>
30 : #include <svl/lstner.hxx>
31 : #include <svl/listener.hxx>
32 : #include <svl/itemprop.hxx>
33 : #include <com/sun/star/table/XTableChartsSupplier.hpp>
34 : #include <com/sun/star/chart/XChartDataArray.hpp>
35 : #include <com/sun/star/text/XTextFieldsSupplier.hpp>
36 : #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
37 : #include <com/sun/star/sheet/XSheetCellRange.hpp>
38 : #include <com/sun/star/sheet/XFormulaQuery.hpp>
39 : #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
40 : #include <com/sun/star/sheet/XSheetOperation.hpp>
41 : #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
42 : #include <com/sun/star/sheet/XCellFormatRangesSupplier.hpp>
43 : #include <com/sun/star/sheet/XUniqueCellFormatRangesSupplier.hpp>
44 : #include <com/sun/star/sheet/XCellRangesQuery.hpp>
45 : #include <com/sun/star/sheet/XSheetFilterableEx.hpp>
46 : #include <com/sun/star/sheet/XSpreadsheet.hpp>
47 : #include <com/sun/star/sheet/XSheetPageBreak.hpp>
48 : #include <com/sun/star/sheet/XCellRangeMovement.hpp>
49 : #include <com/sun/star/text/XText.hpp>
50 : #include <com/sun/star/sheet/XPrintAreas.hpp>
51 : #include <com/sun/star/sheet/XSheetLinkable.hpp>
52 : #include <com/sun/star/sheet/XSubTotalCalculatable.hpp>
53 : #include <com/sun/star/sheet/XArrayFormulaRange.hpp>
54 : #include <com/sun/star/sheet/XCellRangeData.hpp>
55 : #include <com/sun/star/sheet/XCellRangeFormula.hpp>
56 : #include <com/sun/star/sheet/XCellSeries.hpp>
57 : #include <com/sun/star/sheet/XMultipleOperation.hpp>
58 : #include <com/sun/star/sheet/XFormulaTokens.hpp>
59 : #include <com/sun/star/sheet/XArrayFormulaTokens.hpp>
60 : #include <com/sun/star/sheet/XCellAddressable.hpp>
61 : #include <com/sun/star/util/XReplaceable.hpp>
62 : #include <com/sun/star/util/XIndent.hpp>
63 : #include <com/sun/star/lang/XServiceInfo.hpp>
64 : #include <com/sun/star/container/XNameContainer.hpp>
65 : #include <com/sun/star/util/XMergeable.hpp>
66 : #include <com/sun/star/table/XAutoFormattable.hpp>
67 : #include <com/sun/star/util/XSortable.hpp>
68 : #include <com/sun/star/util/XImportable.hpp>
69 : #include <com/sun/star/table/XColumnRowRange.hpp>
70 : #include <com/sun/star/table/XCell2.hpp>
71 : #include <com/sun/star/table/BorderLine2.hpp>
72 : #include <com/sun/star/table/TableBorder.hpp>
73 : #include <com/sun/star/table/TableBorder2.hpp>
74 : #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp>
75 : #include <com/sun/star/sheet/XSheetAnnotationAnchor.hpp>
76 : #include <com/sun/star/sheet/XScenariosSupplier.hpp>
77 : #include <com/sun/star/sheet/XSheetAnnotationsSupplier.hpp>
78 : #include <com/sun/star/sheet/XSheetAuditing.hpp>
79 : #include <com/sun/star/sheet/XSheetOutline.hpp>
80 : #include <com/sun/star/util/XProtectable.hpp>
81 : #include <com/sun/star/sheet/XScenario.hpp>
82 : #include <com/sun/star/sheet/XScenarioEnhanced.hpp>
83 : #include <com/sun/star/util/XModifyBroadcaster.hpp>
84 : #include <com/sun/star/beans/XPropertyState.hpp>
85 : #include <com/sun/star/beans/XMultiPropertySet.hpp>
86 : #include <com/sun/star/lang/XUnoTunnel.hpp>
87 : #include <com/sun/star/document/XActionLockable.hpp>
88 : #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
89 : #include <com/sun/star/sheet/XExternalSheetName.hpp>
90 : #include <com/sun/star/document/XEventsSupplier.hpp>
91 : #include <cppuhelper/implbase2.hxx>
92 : #include <cppuhelper/implbase3.hxx>
93 : #include <boost/ptr_container/ptr_vector.hpp>
94 : #include <boost/scoped_ptr.hpp>
95 :
96 : #include <vector>
97 :
98 : class ScDocShell;
99 : class ScMarkData;
100 : class ScMemChart;
101 : class ScPrintRangeSaver;
102 : class ScAttrRectIterator;
103 : class ScCellRangeObj;
104 : class ScLinkListener;
105 : class ScPatternAttr;
106 : class SvxBoxItem;
107 : class SvxBoxInfoItem;
108 : class SvxItemPropertySet;
109 :
110 : namespace editeng { class SvxBorderLine; }
111 :
112 : class ScLinkListener : public SvtListener
113 : {
114 : Link aLink;
115 : public:
116 86 : ScLinkListener(const Link& rL) : aLink(rL) {}
117 : virtual ~ScLinkListener();
118 : virtual void Notify( SvtBroadcaster& rBC, const SfxHint& rHint );
119 : };
120 :
121 : typedef ::com::sun::star::uno::Reference<
122 : ::com::sun::star::util::XModifyListener > XModifyListenerRef;
123 : typedef boost::ptr_vector<XModifyListenerRef> XModifyListenerArr_Impl;
124 :
125 :
126 : // ScCellRangesBase - base class for ScCellRangesObj (with access by index)
127 : // and ScCellRangeObj (without access by index)
128 :
129 : // XServiceInfo is implemented in derived classes
130 :
131 : class ScHelperFunctions
132 : {
133 : public:
134 : static const ::editeng::SvxBorderLine* GetBorderLine( ::editeng::SvxBorderLine& rLine, const com::sun::star::table::BorderLine& rStruct );
135 : static const ::editeng::SvxBorderLine* GetBorderLine( ::editeng::SvxBorderLine& rLine, const com::sun::star::table::BorderLine2& rStruct );
136 : static void FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const com::sun::star::table::TableBorder& rBorder );
137 : static void FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const com::sun::star::table::TableBorder2& rBorder );
138 : static void FillBorderLine( com::sun::star::table::BorderLine& rStruct, const ::editeng::SvxBorderLine* pLine );
139 : static void FillBorderLine( com::sun::star::table::BorderLine2& rStruct, const ::editeng::SvxBorderLine* pLine );
140 : static void AssignTableBorderToAny( com::sun::star::uno::Any& rAny,
141 : const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner, bool bInvalidateHorVerDist = false );
142 : static void AssignTableBorder2ToAny( com::sun::star::uno::Any& rAny,
143 : const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner, bool bInvalidateHorVerDist = false );
144 : static void ApplyBorder( ScDocShell* pDocShell, const ScRangeList& rRanges,
145 : const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner );
146 : };
147 :
148 : namespace ooo
149 : {
150 : namespace vba {
151 : namespace excel {
152 : class ScVbaCellRangeAccess; // Vba Helper class
153 : }
154 : }
155 : }
156 :
157 : class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet,
158 : public com::sun::star::beans::XMultiPropertySet,
159 : public com::sun::star::beans::XPropertyState,
160 : public com::sun::star::sheet::XSheetOperation,
161 : public com::sun::star::chart::XChartDataArray,
162 : public com::sun::star::util::XIndent,
163 : public com::sun::star::sheet::XCellRangesQuery,
164 : public com::sun::star::sheet::XFormulaQuery,
165 : public com::sun::star::util::XReplaceable,
166 : public com::sun::star::util::XModifyBroadcaster,
167 : public com::sun::star::lang::XServiceInfo,
168 : public com::sun::star::lang::XUnoTunnel,
169 : public com::sun::star::lang::XTypeProvider,
170 : public com::sun::star::beans::XTolerantMultiPropertySet,
171 : public cppu::OWeakObject,
172 : public SfxListener
173 : {
174 : friend class ScTabViewObj; // for select()
175 : friend class ScTableSheetObj; // for createCursorByRange()
176 : friend class ooo::vba::excel::ScVbaCellRangeAccess;
177 :
178 : private:
179 : const SfxItemPropertySet* pPropSet;
180 : ScDocShell* pDocShell;
181 : ScLinkListener* pValueListener;
182 : ScPatternAttr* pCurrentFlat;
183 : ScPatternAttr* pCurrentDeep;
184 : SfxItemSet* pCurrentDataSet;
185 : SfxItemSet* pNoDfltCurrentDataSet;
186 : ScMarkData* pMarkData;
187 : ScRangeList aRanges;
188 : sal_Int64 nObjectId;
189 : sal_Bool bChartColAsHdr;
190 : sal_Bool bChartRowAsHdr;
191 : sal_Bool bCursorOnly;
192 : sal_Bool bGotDataChangedHint;
193 : XModifyListenerArr_Impl aValueListeners;
194 :
195 : DECL_LINK( ValueListenerHdl, SfxHint* );
196 :
197 : private:
198 : void PaintRanges_Impl( sal_uInt16 nPart );
199 : ScRangeListRef GetLimitedChartRanges_Impl( long nDataColumns, long nDataRows ) const;
200 : void ForceChartListener_Impl();
201 : ScMemChart* CreateMemChart_Impl() const;
202 :
203 : const ScPatternAttr* GetCurrentAttrsFlat();
204 : const ScPatternAttr* GetCurrentAttrsDeep();
205 : SfxItemSet* GetCurrentDataSet(bool bNoDflt = false);
206 : void ForgetMarkData();
207 : void ForgetCurrentAttrs();
208 :
209 : com::sun::star::uno::Reference<com::sun::star::sheet::XSheetCellRanges>
210 : QueryDifferences_Impl(const com::sun::star::table::CellAddress& aCompare,
211 : sal_Bool bColumnDiff);
212 : com::sun::star::uno::Reference<com::sun::star::uno::XInterface>
213 : Find_Impl(const com::sun::star::uno::Reference<
214 : com::sun::star::util::XSearchDescriptor>& xDesc,
215 : const ScAddress* pLastPos);
216 :
217 : protected:
218 : const ScMarkData* GetMarkData();
219 :
220 : // GetItemPropertyMap for derived classes must contain all entries, including base class
221 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
222 : virtual ::com::sun::star::beans::PropertyState GetOnePropertyState(
223 : sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry );
224 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
225 : ::com::sun::star::uno::Any& )
226 : throw(::com::sun::star::uno::RuntimeException);
227 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
228 : const ::com::sun::star::uno::Any& aValue )
229 : throw(::com::sun::star::lang::IllegalArgumentException,
230 : ::com::sun::star::uno::RuntimeException);
231 :
232 : public:
233 : ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR);
234 : ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR);
235 : virtual ~ScCellRangesBase();
236 :
237 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
238 : const ::com::sun::star::uno::Type & rType )
239 : throw(::com::sun::star::uno::RuntimeException);
240 : virtual void SAL_CALL acquire() throw();
241 : virtual void SAL_CALL release() throw();
242 :
243 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
244 : virtual void RefChanged();
245 :
246 : // from derived classes and by getImplementation
247 3749 : ScDocShell* GetDocShell() const { return pDocShell; }
248 : ScDocument* GetDocument() const;
249 524 : const ScRangeList& GetRangeList() const { return aRanges; }
250 : void AddRange(const ScRange& rRange, const sal_Bool bMergeRanges);
251 :
252 : // arouse object created via service:
253 : void InitInsertRange(ScDocShell* pDocSh, const ScRange& rR);
254 :
255 : void SetNewRange(const ScRange& rNew); // for cursor
256 : void SetNewRanges(const ScRangeList& rNew);
257 :
258 : void SetCursorOnly(sal_Bool bSet);
259 0 : sal_Bool IsCursorOnly() const { return bCursorOnly; }
260 :
261 : // XSheetOperation
262 : virtual double SAL_CALL computeFunction( ::com::sun::star::sheet::GeneralFunction nFunction )
263 : throw(::com::sun::star::uno::Exception,
264 : ::com::sun::star::uno::RuntimeException);
265 : virtual void SAL_CALL clearContents( sal_Int32 nContentFlags )
266 : throw(::com::sun::star::uno::RuntimeException);
267 :
268 : // XPropertySet
269 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
270 : SAL_CALL getPropertySetInfo()
271 : throw(::com::sun::star::uno::RuntimeException);
272 : virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
273 : const ::com::sun::star::uno::Any& aValue )
274 : throw(::com::sun::star::beans::UnknownPropertyException,
275 : ::com::sun::star::beans::PropertyVetoException,
276 : ::com::sun::star::lang::IllegalArgumentException,
277 : ::com::sun::star::lang::WrappedTargetException,
278 : ::com::sun::star::uno::RuntimeException);
279 : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
280 : const ::rtl::OUString& PropertyName )
281 : throw(::com::sun::star::beans::UnknownPropertyException,
282 : ::com::sun::star::lang::WrappedTargetException,
283 : ::com::sun::star::uno::RuntimeException);
284 : virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
285 : const ::com::sun::star::uno::Reference<
286 : ::com::sun::star::beans::XPropertyChangeListener >& xListener )
287 : throw(::com::sun::star::beans::UnknownPropertyException,
288 : ::com::sun::star::lang::WrappedTargetException,
289 : ::com::sun::star::uno::RuntimeException);
290 : virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
291 : const ::com::sun::star::uno::Reference<
292 : ::com::sun::star::beans::XPropertyChangeListener >& aListener )
293 : throw(::com::sun::star::beans::UnknownPropertyException,
294 : ::com::sun::star::lang::WrappedTargetException,
295 : ::com::sun::star::uno::RuntimeException);
296 : virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
297 : const ::com::sun::star::uno::Reference<
298 : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
299 : throw(::com::sun::star::beans::UnknownPropertyException,
300 : ::com::sun::star::lang::WrappedTargetException,
301 : ::com::sun::star::uno::RuntimeException);
302 : virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
303 : const ::com::sun::star::uno::Reference<
304 : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
305 : throw(::com::sun::star::beans::UnknownPropertyException,
306 : ::com::sun::star::lang::WrappedTargetException,
307 : ::com::sun::star::uno::RuntimeException);
308 :
309 : // XMultiPropertySet
310 : virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
311 : const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
312 : throw (::com::sun::star::beans::PropertyVetoException,
313 : ::com::sun::star::lang::IllegalArgumentException,
314 : ::com::sun::star::lang::WrappedTargetException,
315 : ::com::sun::star::uno::RuntimeException);
316 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL
317 : getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
318 : throw (::com::sun::star::uno::RuntimeException);
319 : virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
320 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
321 : throw (::com::sun::star::uno::RuntimeException);
322 : virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
323 : throw (::com::sun::star::uno::RuntimeException);
324 : virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
325 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
326 : throw (::com::sun::star::uno::RuntimeException);
327 :
328 : // XTolerantMultiPropertySet
329 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::SetPropertyTolerantFailed > SAL_CALL
330 : setPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
331 : const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
332 : throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
333 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetPropertyTolerantResult > SAL_CALL
334 : getPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
335 : throw (::com::sun::star::uno::RuntimeException);
336 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::GetDirectPropertyTolerantResult > SAL_CALL
337 : getDirectPropertyValuesTolerant( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
338 : throw (::com::sun::star::uno::RuntimeException);
339 :
340 : // XPropertyState
341 : virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState(
342 : const ::rtl::OUString& PropertyName )
343 : throw(::com::sun::star::beans::UnknownPropertyException,
344 : ::com::sun::star::uno::RuntimeException);
345 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL
346 : getPropertyStates( const ::com::sun::star::uno::Sequence<
347 : ::rtl::OUString >& aPropertyName )
348 : throw(::com::sun::star::beans::UnknownPropertyException,
349 : ::com::sun::star::uno::RuntimeException);
350 : virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName )
351 : throw(::com::sun::star::beans::UnknownPropertyException,
352 : ::com::sun::star::uno::RuntimeException);
353 : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault(
354 : const ::rtl::OUString& aPropertyName )
355 : throw(::com::sun::star::beans::UnknownPropertyException,
356 : ::com::sun::star::lang::WrappedTargetException,
357 : ::com::sun::star::uno::RuntimeException);
358 :
359 : // XIndent
360 : virtual void SAL_CALL decrementIndent() throw(::com::sun::star::uno::RuntimeException);
361 : virtual void SAL_CALL incrementIndent() throw(::com::sun::star::uno::RuntimeException);
362 :
363 : // XChartData
364 : virtual void SAL_CALL addChartDataChangeEventListener(
365 : const ::com::sun::star::uno::Reference<
366 : ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
367 : throw(::com::sun::star::uno::RuntimeException);
368 : virtual void SAL_CALL removeChartDataChangeEventListener( const ::com::sun::star::uno::Reference<
369 : ::com::sun::star::chart::XChartDataChangeEventListener >& aListener )
370 : throw(::com::sun::star::uno::RuntimeException);
371 : virtual double SAL_CALL getNotANumber() throw(::com::sun::star::uno::RuntimeException);
372 : virtual sal_Bool SAL_CALL isNotANumber( double nNumber )
373 : throw(::com::sun::star::uno::RuntimeException);
374 :
375 : // XChartDataArray
376 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< double > > SAL_CALL
377 : getData() throw(::com::sun::star::uno::RuntimeException);
378 : virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence<
379 : ::com::sun::star::uno::Sequence< double > >& aData )
380 : throw(::com::sun::star::uno::RuntimeException);
381 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getRowDescriptions()
382 : throw(::com::sun::star::uno::RuntimeException);
383 : virtual void SAL_CALL setRowDescriptions( const ::com::sun::star::uno::Sequence<
384 : ::rtl::OUString >& aRowDescriptions )
385 : throw(::com::sun::star::uno::RuntimeException);
386 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getColumnDescriptions()
387 : throw(::com::sun::star::uno::RuntimeException);
388 : virtual void SAL_CALL setColumnDescriptions( const ::com::sun::star::uno::Sequence<
389 : ::rtl::OUString >& aColumnDescriptions )
390 : throw(::com::sun::star::uno::RuntimeException);
391 :
392 : // XCellRangesQuery
393 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
394 : queryVisibleCells() throw(::com::sun::star::uno::RuntimeException);
395 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
396 : queryEmptyCells() throw(::com::sun::star::uno::RuntimeException);
397 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
398 : queryContentCells( sal_Int16 nContentFlags )
399 : throw(::com::sun::star::uno::RuntimeException);
400 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
401 : queryFormulaCells( sal_Int32 nResultFlags )
402 : throw(::com::sun::star::uno::RuntimeException);
403 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
404 : queryColumnDifferences(
405 : const ::com::sun::star::table::CellAddress& aCompare )
406 : throw(::com::sun::star::uno::RuntimeException);
407 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
408 : queryRowDifferences(
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 : queryIntersection(
413 : const ::com::sun::star::table::CellRangeAddress& aRange )
414 : throw(::com::sun::star::uno::RuntimeException);
415 :
416 : // XFormulaQuery
417 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
418 : queryDependents( sal_Bool bRecursive )
419 : throw(::com::sun::star::uno::RuntimeException);
420 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellRanges > SAL_CALL
421 : queryPrecedents( sal_Bool bRecursive )
422 : throw(::com::sun::star::uno::RuntimeException);
423 :
424 : // XSearchable
425 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL
426 : createSearchDescriptor()
427 : throw(::com::sun::star::uno::RuntimeException);
428 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
429 : findAll( const ::com::sun::star::uno::Reference<
430 : ::com::sun::star::util::XSearchDescriptor >& xDesc )
431 : throw(::com::sun::star::uno::RuntimeException);
432 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
433 : findFirst( 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 : findNext( const ::com::sun::star::uno::Reference<
438 : ::com::sun::star::uno::XInterface >& xStartAt,
439 : const ::com::sun::star::uno::Reference<
440 : ::com::sun::star::util::XSearchDescriptor >& xDesc )
441 : throw(::com::sun::star::uno::RuntimeException);
442 :
443 : // XReplaceable
444 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL
445 : createReplaceDescriptor() throw(::com::sun::star::uno::RuntimeException);
446 : virtual sal_Int32 SAL_CALL replaceAll( const ::com::sun::star::uno::Reference<
447 : ::com::sun::star::util::XSearchDescriptor >& xDesc )
448 : throw(::com::sun::star::uno::RuntimeException);
449 :
450 : // XModifyBroadcaster
451 : virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference<
452 : ::com::sun::star::util::XModifyListener >& aListener )
453 : throw (::com::sun::star::uno::RuntimeException);
454 : virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference<
455 : ::com::sun::star::util::XModifyListener >& aListener )
456 : throw (::com::sun::star::uno::RuntimeException);
457 :
458 : // XServiceInfo
459 : virtual ::rtl::OUString SAL_CALL getImplementationName()
460 : throw(::com::sun::star::uno::RuntimeException);
461 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
462 : throw(::com::sun::star::uno::RuntimeException);
463 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
464 : throw(::com::sun::star::uno::RuntimeException);
465 :
466 : // XUnoTunnel
467 : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
468 : sal_Int8 >& aIdentifier )
469 : throw(::com::sun::star::uno::RuntimeException);
470 :
471 : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
472 : static ScCellRangesBase* getImplementation( const com::sun::star::uno::Reference<
473 : com::sun::star::uno::XInterface> xObj );
474 :
475 : // XTypeProvider
476 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
477 : throw(::com::sun::star::uno::RuntimeException);
478 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
479 : throw(::com::sun::star::uno::RuntimeException);
480 : };
481 :
482 :
483 : class SC_DLLPUBLIC ScCellRangesObj : public ScCellRangesBase,
484 : public com::sun::star::sheet::XSheetCellRangeContainer,
485 : public com::sun::star::container::XNameContainer,
486 : public com::sun::star::container::XEnumerationAccess
487 : {
488 : private:
489 : struct Impl;
490 : ::boost::scoped_ptr<Impl> m_pImpl;
491 :
492 : ScCellRangeObj* GetObjectByIndex_Impl(sal_Int32 nIndex) const;
493 :
494 : public:
495 : ScCellRangesObj(ScDocShell* pDocSh, const ScRangeList& rR);
496 : virtual ~ScCellRangesObj();
497 :
498 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
499 : const ::com::sun::star::uno::Type & rType )
500 : throw(::com::sun::star::uno::RuntimeException);
501 : virtual void SAL_CALL acquire() throw();
502 : virtual void SAL_CALL release() throw();
503 :
504 : virtual void RefChanged();
505 :
506 : // XSheetCellRanges
507 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL
508 : getCells() throw(::com::sun::star::uno::RuntimeException);
509 : virtual ::rtl::OUString SAL_CALL getRangeAddressesAsString()
510 : throw(::com::sun::star::uno::RuntimeException);
511 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
512 : getRangeAddresses() throw(::com::sun::star::uno::RuntimeException);
513 :
514 : // XSheetCellRangeContainer
515 : virtual void SAL_CALL addRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange,
516 : sal_Bool bMergeRanges )
517 : throw(::com::sun::star::uno::RuntimeException);
518 : virtual void SAL_CALL removeRangeAddress( const ::com::sun::star::table::CellRangeAddress& rRange )
519 : throw(::com::sun::star::container::NoSuchElementException,
520 : ::com::sun::star::uno::RuntimeException);
521 : virtual void SAL_CALL addRangeAddresses( const ::com::sun::star::uno::Sequence<
522 : ::com::sun::star::table::CellRangeAddress >& rRanges,
523 : sal_Bool bMergeRanges )
524 : throw(::com::sun::star::uno::RuntimeException);
525 : virtual void SAL_CALL removeRangeAddresses( const ::com::sun::star::uno::Sequence<
526 : ::com::sun::star::table::CellRangeAddress >& rRanges )
527 : throw(::com::sun::star::container::NoSuchElementException,
528 : ::com::sun::star::uno::RuntimeException);
529 :
530 : // XNameContainer
531 : virtual void SAL_CALL insertByName( const ::rtl::OUString& aName,
532 : const ::com::sun::star::uno::Any& aElement )
533 : throw(::com::sun::star::lang::IllegalArgumentException,
534 : ::com::sun::star::container::ElementExistException,
535 : ::com::sun::star::lang::WrappedTargetException,
536 : ::com::sun::star::uno::RuntimeException);
537 : virtual void SAL_CALL removeByName( const ::rtl::OUString& Name )
538 : throw(::com::sun::star::container::NoSuchElementException,
539 : ::com::sun::star::lang::WrappedTargetException,
540 : ::com::sun::star::uno::RuntimeException);
541 :
542 : // XNameReplace
543 : virtual void SAL_CALL replaceByName( const ::rtl::OUString& aName,
544 : const ::com::sun::star::uno::Any& aElement )
545 : throw(::com::sun::star::lang::IllegalArgumentException,
546 : ::com::sun::star::container::NoSuchElementException,
547 : ::com::sun::star::lang::WrappedTargetException,
548 : ::com::sun::star::uno::RuntimeException);
549 :
550 : // XNameAccess
551 : virtual ::com::sun::star::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
552 : throw(::com::sun::star::container::NoSuchElementException,
553 : ::com::sun::star::lang::WrappedTargetException,
554 : ::com::sun::star::uno::RuntimeException);
555 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames()
556 : throw(::com::sun::star::uno::RuntimeException);
557 : virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName )
558 : throw(::com::sun::star::uno::RuntimeException);
559 :
560 : // XIndexAccess
561 : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
562 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
563 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
564 : ::com::sun::star::lang::WrappedTargetException,
565 : ::com::sun::star::uno::RuntimeException);
566 :
567 : // XElementAccess
568 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
569 : throw(::com::sun::star::uno::RuntimeException);
570 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
571 :
572 : // XEnumerationAccess
573 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
574 : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
575 :
576 : // XServiceInfo
577 : virtual ::rtl::OUString SAL_CALL getImplementationName()
578 : throw(::com::sun::star::uno::RuntimeException);
579 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
580 : throw(::com::sun::star::uno::RuntimeException);
581 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
582 : throw(::com::sun::star::uno::RuntimeException);
583 :
584 : // XTypeProvider
585 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
586 : throw(::com::sun::star::uno::RuntimeException);
587 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
588 : throw(::com::sun::star::uno::RuntimeException);
589 : };
590 :
591 :
592 : class SC_DLLPUBLIC ScCellRangeObj : public ScCellRangesBase,
593 : public com::sun::star::sheet::XCellRangeAddressable,
594 : public com::sun::star::sheet::XSheetCellRange,
595 : public com::sun::star::sheet::XArrayFormulaRange,
596 : public com::sun::star::sheet::XArrayFormulaTokens,
597 : public com::sun::star::sheet::XCellRangeData,
598 : public com::sun::star::sheet::XCellRangeFormula,
599 : public com::sun::star::sheet::XMultipleOperation,
600 : public com::sun::star::util::XMergeable,
601 : public com::sun::star::sheet::XCellSeries,
602 : public com::sun::star::table::XAutoFormattable,
603 : public com::sun::star::util::XSortable,
604 : public com::sun::star::sheet::XSheetFilterableEx,
605 : public com::sun::star::sheet::XSubTotalCalculatable,
606 : public com::sun::star::util::XImportable,
607 : public com::sun::star::sheet::XCellFormatRangesSupplier,
608 : public com::sun::star::sheet::XUniqueCellFormatRangesSupplier,
609 : public com::sun::star::table::XColumnRowRange
610 : {
611 : private:
612 : const SfxItemPropertySet* pRangePropSet;
613 : ScRange aRange;
614 :
615 : protected:
616 12 : const ScRange& GetRange() const { return aRange; }
617 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
618 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
619 : ::com::sun::star::uno::Any& )
620 : throw(::com::sun::star::uno::RuntimeException);
621 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
622 : const ::com::sun::star::uno::Any& aValue )
623 : throw(::com::sun::star::lang::IllegalArgumentException,
624 : ::com::sun::star::uno::RuntimeException);
625 :
626 : ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell >
627 : GetCellByPosition_Impl( sal_Int32 nColumn, sal_Int32 nRow )
628 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
629 : ::com::sun::star::uno::RuntimeException);
630 :
631 : void SetArrayFormula_Impl( const rtl::OUString& rFormula,
632 : const rtl::OUString& rFormulaNmsp,
633 : const formula::FormulaGrammar::Grammar eGrammar )
634 : throw(::com::sun::star::uno::RuntimeException);
635 :
636 : public:
637 : ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR);
638 : virtual ~ScCellRangeObj();
639 :
640 : // uses ObjectShell from document, if set (returns NULL otherwise)
641 : static com::sun::star::uno::Reference<com::sun::star::table::XCellRange>
642 : CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR );
643 :
644 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
645 : const ::com::sun::star::uno::Type & rType )
646 : throw(::com::sun::star::uno::RuntimeException);
647 : virtual void SAL_CALL acquire() throw();
648 : virtual void SAL_CALL release() throw();
649 :
650 : virtual void RefChanged();
651 :
652 : // via getImplementation()
653 : virtual void SetArrayFormulaWithGrammar( const ::rtl::OUString& rFormula,
654 : const ::rtl::OUString& rFormulaNmsp,
655 : const formula::FormulaGrammar::Grammar )
656 : throw(::com::sun::star::uno::RuntimeException);
657 :
658 : // XCellRangeAddressable
659 : virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getRangeAddress()
660 : throw(::com::sun::star::uno::RuntimeException);
661 :
662 : // XSheetCellRange
663 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
664 : getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
665 :
666 : // XArrayFormulaRange
667 : virtual ::rtl::OUString SAL_CALL getArrayFormula() throw(::com::sun::star::uno::RuntimeException);
668 : virtual void SAL_CALL setArrayFormula( const ::rtl::OUString& aFormula )
669 : throw(::com::sun::star::uno::RuntimeException);
670 :
671 : // XArrayFormulaTokens
672 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getArrayTokens()
673 : throw (::com::sun::star::uno::RuntimeException);
674 : virtual void SAL_CALL setArrayTokens( const ::com::sun::star::uno::Sequence<
675 : ::com::sun::star::sheet::FormulaToken >& aTokens )
676 : throw (::com::sun::star::uno::RuntimeException);
677 :
678 : // XCellRangeData
679 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
680 : ::com::sun::star::uno::Any > > SAL_CALL getDataArray()
681 : throw(::com::sun::star::uno::RuntimeException);
682 : virtual void SAL_CALL setDataArray( const ::com::sun::star::uno::Sequence<
683 : ::com::sun::star::uno::Sequence<
684 : ::com::sun::star::uno::Any > >& aArray )
685 : throw(::com::sun::star::uno::RuntimeException);
686 :
687 : // XCellRangeFormula
688 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence<
689 : ::rtl::OUString > > SAL_CALL getFormulaArray()
690 : throw (::com::sun::star::uno::RuntimeException);
691 : virtual void SAL_CALL setFormulaArray( const ::com::sun::star::uno::Sequence<
692 : ::com::sun::star::uno::Sequence< ::rtl::OUString > >& aArray )
693 : throw (::com::sun::star::uno::RuntimeException);
694 :
695 : // XMultipleOperation
696 : virtual void SAL_CALL setTableOperation(
697 : const ::com::sun::star::table::CellRangeAddress& aFormulaRange,
698 : ::com::sun::star::sheet::TableOperationMode nMode,
699 : const ::com::sun::star::table::CellAddress& aColumnCell,
700 : const ::com::sun::star::table::CellAddress& aRowCell )
701 : throw(::com::sun::star::uno::RuntimeException);
702 :
703 : // XMergeable
704 : virtual void SAL_CALL merge( sal_Bool bMerge ) throw(::com::sun::star::uno::RuntimeException);
705 : virtual sal_Bool SAL_CALL getIsMerged() throw(::com::sun::star::uno::RuntimeException);
706 :
707 : // XCellSeries
708 : virtual void SAL_CALL fillSeries( ::com::sun::star::sheet::FillDirection nFillDirection,
709 : ::com::sun::star::sheet::FillMode nFillMode,
710 : ::com::sun::star::sheet::FillDateMode nFillDateMode,
711 : double fStep, double fEndValue )
712 : throw(::com::sun::star::uno::RuntimeException);
713 : virtual void SAL_CALL fillAuto( ::com::sun::star::sheet::FillDirection nFillDirection,
714 : sal_Int32 nSourceCount )
715 : throw(::com::sun::star::uno::RuntimeException);
716 :
717 : // XAutoFormattable
718 : virtual void SAL_CALL autoFormat( const ::rtl::OUString& aName )
719 : throw(::com::sun::star::lang::IllegalArgumentException,
720 : ::com::sun::star::uno::RuntimeException);
721 :
722 : // XSortable
723 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
724 : createSortDescriptor() throw(::com::sun::star::uno::RuntimeException);
725 : virtual void SAL_CALL sort( const ::com::sun::star::uno::Sequence<
726 : ::com::sun::star::beans::PropertyValue >& xDescriptor )
727 : throw(::com::sun::star::uno::RuntimeException);
728 :
729 : // XSheetFilterableEx
730 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
731 : createFilterDescriptorByObject( const ::com::sun::star::uno::Reference<
732 : ::com::sun::star::sheet::XSheetFilterable >& xObject )
733 : throw(::com::sun::star::uno::RuntimeException);
734 :
735 : // XSheetFilterable
736 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetFilterDescriptor > SAL_CALL
737 : createFilterDescriptor( sal_Bool bEmpty )
738 : throw(::com::sun::star::uno::RuntimeException);
739 : virtual void SAL_CALL filter( const ::com::sun::star::uno::Reference<
740 : ::com::sun::star::sheet::XSheetFilterDescriptor >& xDescriptor )
741 : throw(::com::sun::star::uno::RuntimeException);
742 :
743 : // XSubTotalCalculatable
744 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSubTotalDescriptor > SAL_CALL
745 : createSubTotalDescriptor( sal_Bool bEmpty )
746 : throw(::com::sun::star::uno::RuntimeException);
747 : virtual void SAL_CALL applySubTotals( const ::com::sun::star::uno::Reference<
748 : ::com::sun::star::sheet::XSubTotalDescriptor >& xDescriptor,
749 : sal_Bool bReplace ) throw(::com::sun::star::uno::RuntimeException);
750 : virtual void SAL_CALL removeSubTotals() throw(::com::sun::star::uno::RuntimeException);
751 :
752 : // XImportable
753 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL
754 : createImportDescriptor( sal_Bool bEmpty )
755 : throw(::com::sun::star::uno::RuntimeException);
756 : virtual void SAL_CALL doImport( const ::com::sun::star::uno::Sequence<
757 : ::com::sun::star::beans::PropertyValue >& aDescriptor )
758 : throw(::com::sun::star::uno::RuntimeException);
759 :
760 : // XCellFormatRangesSupplier
761 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
762 : getCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
763 :
764 : // XUniqueCellFormatRangesSupplier
765 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL
766 : getUniqueCellFormatRanges() throw(::com::sun::star::uno::RuntimeException);
767 :
768 : // XColumnRowRange
769 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableColumns > SAL_CALL
770 : getColumns() throw(::com::sun::star::uno::RuntimeException);
771 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableRows > SAL_CALL
772 : getRows() throw(::com::sun::star::uno::RuntimeException);
773 :
774 : // XCellRange
775 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
776 : getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
777 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
778 : ::com::sun::star::uno::RuntimeException);
779 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
780 : getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
781 : sal_Int32 nRight, sal_Int32 nBottom )
782 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
783 : ::com::sun::star::uno::RuntimeException);
784 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
785 : getCellRangeByName( const ::rtl::OUString& aRange )
786 : throw(::com::sun::star::uno::RuntimeException);
787 : ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange >
788 : getCellRangeByName( const ::rtl::OUString& aRange, const ScAddress::Details& rDetails )
789 : throw(::com::sun::star::uno::RuntimeException);
790 :
791 : // XPropertySet overloaded due to Range-Properties
792 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
793 : SAL_CALL getPropertySetInfo()
794 : throw(::com::sun::star::uno::RuntimeException);
795 :
796 : // XServiceInfo
797 : virtual ::rtl::OUString SAL_CALL getImplementationName()
798 : throw(::com::sun::star::uno::RuntimeException);
799 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
800 : throw(::com::sun::star::uno::RuntimeException);
801 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
802 : throw(::com::sun::star::uno::RuntimeException);
803 :
804 : // XTypeProvider
805 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
806 : throw(::com::sun::star::uno::RuntimeException);
807 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
808 : throw(::com::sun::star::uno::RuntimeException);
809 : };
810 :
811 :
812 : //! really derive cell from range?
813 :
814 : class SC_DLLPUBLIC ScCellObj : public ScCellRangeObj,
815 : public com::sun::star::text::XText,
816 : public com::sun::star::container::XEnumerationAccess,
817 : public com::sun::star::table::XCell2,
818 : public com::sun::star::sheet::XFormulaTokens,
819 : public com::sun::star::sheet::XCellAddressable,
820 : public com::sun::star::sheet::XSheetAnnotationAnchor,
821 : public com::sun::star::text::XTextFieldsSupplier,
822 : public com::sun::star::document::XActionLockable
823 : {
824 : private:
825 : rtl::Reference<SvxUnoText> mxUnoText;
826 : const SfxItemPropertySet* pCellPropSet;
827 : ScAddress aCellPos;
828 : sal_Int16 nActionLockCount;
829 :
830 : private:
831 : String GetInputString_Impl(sal_Bool bEnglish) const;
832 : String GetOutputString_Impl() const;
833 : void SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish);
834 : double GetValue_Impl() const;
835 : void SetValue_Impl(double fValue);
836 : com::sun::star::table::CellContentType GetResultType_Impl();
837 :
838 : protected:
839 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
840 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
841 : ::com::sun::star::uno::Any& )
842 : throw(::com::sun::star::uno::RuntimeException);
843 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
844 : const ::com::sun::star::uno::Any& aValue )
845 : throw(::com::sun::star::lang::IllegalArgumentException,
846 : ::com::sun::star::uno::RuntimeException);
847 :
848 : public:
849 : static const SvxItemPropertySet* GetEditPropertySet();
850 : static const SfxItemPropertyMap& GetCellPropertyMap();
851 :
852 : ScCellObj(ScDocShell* pDocSh, const ScAddress& rP);
853 : virtual ~ScCellObj();
854 :
855 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
856 : const ::com::sun::star::uno::Type & rType )
857 : throw(::com::sun::star::uno::RuntimeException);
858 : virtual void SAL_CALL acquire() throw();
859 : virtual void SAL_CALL release() throw();
860 :
861 : virtual void RefChanged();
862 :
863 : SvxUnoText& GetUnoText();
864 :
865 : // XML import needs to set results at formula cells,
866 : // not meant for any other purpose.
867 1 : const ScAddress& GetPosition() const { return aCellPos; }
868 :
869 : void InputEnglishString( const ::rtl::OUString& rText );
870 :
871 : // XText
872 : virtual void SAL_CALL insertTextContent( const ::com::sun::star::uno::Reference<
873 : ::com::sun::star::text::XTextRange >& xRange,
874 : const ::com::sun::star::uno::Reference<
875 : ::com::sun::star::text::XTextContent >& xContent,
876 : sal_Bool bAbsorb )
877 : throw(::com::sun::star::lang::IllegalArgumentException,
878 : ::com::sun::star::uno::RuntimeException);
879 : virtual void SAL_CALL removeTextContent( const ::com::sun::star::uno::Reference<
880 : ::com::sun::star::text::XTextContent >& xContent )
881 : throw(::com::sun::star::container::NoSuchElementException,
882 : ::com::sun::star::uno::RuntimeException);
883 :
884 : // XSimpleText
885 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
886 : createTextCursor() throw(::com::sun::star::uno::RuntimeException);
887 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > SAL_CALL
888 : createTextCursorByRange( const ::com::sun::star::uno::Reference<
889 : ::com::sun::star::text::XTextRange >& aTextPosition )
890 : throw(::com::sun::star::uno::RuntimeException);
891 : virtual void SAL_CALL insertString( const ::com::sun::star::uno::Reference<
892 : ::com::sun::star::text::XTextRange >& xRange,
893 : const ::rtl::OUString& aString, sal_Bool bAbsorb )
894 : throw(::com::sun::star::uno::RuntimeException);
895 : virtual void SAL_CALL insertControlCharacter( const ::com::sun::star::uno::Reference<
896 : ::com::sun::star::text::XTextRange >& xRange,
897 : sal_Int16 nControlCharacter, sal_Bool bAbsorb )
898 : throw(::com::sun::star::lang::IllegalArgumentException,
899 : ::com::sun::star::uno::RuntimeException);
900 :
901 : // XTextRange
902 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL
903 : getText() throw(::com::sun::star::uno::RuntimeException);
904 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
905 : getStart() throw(::com::sun::star::uno::RuntimeException);
906 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > SAL_CALL
907 : getEnd() throw(::com::sun::star::uno::RuntimeException);
908 : virtual ::rtl::OUString SAL_CALL getString() throw(::com::sun::star::uno::RuntimeException);
909 : virtual void SAL_CALL setString( const ::rtl::OUString& aString )
910 : throw(::com::sun::star::uno::RuntimeException);
911 :
912 : // XEnumerationAccess
913 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
914 : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
915 :
916 : // XElementAccess
917 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
918 : throw(::com::sun::star::uno::RuntimeException);
919 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
920 :
921 : // XCell
922 : virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException);
923 : virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula )
924 : throw(::com::sun::star::uno::RuntimeException);
925 : virtual void SAL_CALL setFormulaResult( double nValue )
926 : throw(::com::sun::star::uno::RuntimeException);
927 : virtual void SAL_CALL setFormulaString( const ::rtl::OUString& aFormula )
928 : throw(::com::sun::star::uno::RuntimeException);
929 : virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
930 : virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
931 : virtual ::com::sun::star::table::CellContentType SAL_CALL getType()
932 : throw(::com::sun::star::uno::RuntimeException);
933 : virtual sal_Int32 SAL_CALL getError() throw(::com::sun::star::uno::RuntimeException);
934 :
935 : // XFormulaTokens
936 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::FormulaToken > SAL_CALL getTokens()
937 : throw (::com::sun::star::uno::RuntimeException);
938 : virtual void SAL_CALL setTokens( const ::com::sun::star::uno::Sequence<
939 : ::com::sun::star::sheet::FormulaToken >& aTokens )
940 : throw (::com::sun::star::uno::RuntimeException);
941 :
942 : // XCellAddressable
943 : virtual ::com::sun::star::table::CellAddress SAL_CALL getCellAddress()
944 : throw(::com::sun::star::uno::RuntimeException);
945 :
946 : // XSheetAnnotationAnchor
947 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotation > SAL_CALL
948 : getAnnotation() throw(::com::sun::star::uno::RuntimeException);
949 :
950 : // XTextFieldsSupplier
951 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL
952 : getTextFields() throw(::com::sun::star::uno::RuntimeException);
953 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL
954 : getTextFieldMasters() throw(::com::sun::star::uno::RuntimeException);
955 :
956 : // XPropertySet overloaded due to cell properties
957 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
958 : SAL_CALL getPropertySetInfo()
959 : throw(::com::sun::star::uno::RuntimeException);
960 :
961 : // XServiceInfo
962 : virtual ::rtl::OUString SAL_CALL getImplementationName()
963 : throw(::com::sun::star::uno::RuntimeException);
964 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
965 : throw(::com::sun::star::uno::RuntimeException);
966 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
967 : throw(::com::sun::star::uno::RuntimeException);
968 :
969 : // XTypeProvider
970 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
971 : throw(::com::sun::star::uno::RuntimeException);
972 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
973 : throw(::com::sun::star::uno::RuntimeException);
974 :
975 : // XActionLockable
976 : virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException);
977 : virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException);
978 : virtual void SAL_CALL removeActionLock() throw(::com::sun::star::uno::RuntimeException);
979 : virtual void SAL_CALL setActionLocks( sal_Int16 nLock )
980 : throw(::com::sun::star::uno::RuntimeException);
981 : virtual sal_Int16 SAL_CALL resetActionLocks() throw(::com::sun::star::uno::RuntimeException);
982 :
983 : static String GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aPos);
984 : };
985 :
986 :
987 : class ScTableSheetObj : public ScCellRangeObj,
988 : public com::sun::star::sheet::XSpreadsheet,
989 : public com::sun::star::container::XNamed,
990 : public com::sun::star::sheet::XSheetPageBreak,
991 : public com::sun::star::sheet::XCellRangeMovement,
992 : public com::sun::star::table::XTableChartsSupplier,
993 : public com::sun::star::sheet::XDataPilotTablesSupplier,
994 : public com::sun::star::sheet::XScenariosSupplier,
995 : public com::sun::star::sheet::XSheetAnnotationsSupplier,
996 : public com::sun::star::drawing::XDrawPageSupplier,
997 : public com::sun::star::sheet::XPrintAreas,
998 : public com::sun::star::sheet::XSheetLinkable,
999 : public com::sun::star::sheet::XSheetAuditing,
1000 : public com::sun::star::sheet::XSheetOutline,
1001 : public com::sun::star::util::XProtectable,
1002 : public com::sun::star::sheet::XScenario,
1003 : public com::sun::star::sheet::XScenarioEnhanced,
1004 : public com::sun::star::sheet::XExternalSheetName,
1005 : public com::sun::star::document::XEventsSupplier
1006 : {
1007 : friend class ScTableSheetsObj; // for insertByName()
1008 :
1009 : private:
1010 : const SfxItemPropertySet* pSheetPropSet;
1011 :
1012 : SCTAB GetTab_Impl() const;
1013 : void PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges );
1014 :
1015 : protected:
1016 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
1017 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1018 : ::com::sun::star::uno::Any& )
1019 : throw(::com::sun::star::uno::RuntimeException);
1020 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1021 : const ::com::sun::star::uno::Any& aValue )
1022 : throw(::com::sun::star::lang::IllegalArgumentException,
1023 : ::com::sun::star::uno::RuntimeException);
1024 :
1025 : public:
1026 : ScTableSheetObj(ScDocShell* pDocSh, SCTAB nTab);
1027 : virtual ~ScTableSheetObj();
1028 :
1029 : void InitInsertSheet(ScDocShell* pDocSh, SCTAB nTab);
1030 :
1031 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1032 : const ::com::sun::star::uno::Type & rType )
1033 : throw(::com::sun::star::uno::RuntimeException);
1034 : virtual void SAL_CALL acquire() throw();
1035 : virtual void SAL_CALL release() throw();
1036 :
1037 : // XSpreadsheet
1038 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor >
1039 : SAL_CALL createCursor() throw(::com::sun::star::uno::RuntimeException);
1040 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetCellCursor > SAL_CALL
1041 : createCursorByRange( const ::com::sun::star::uno::Reference<
1042 : ::com::sun::star::sheet::XSheetCellRange >& aRange )
1043 : throw(::com::sun::star::uno::RuntimeException);
1044 :
1045 : // XSheetCellRange
1046 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet > SAL_CALL
1047 : getSpreadsheet() throw(::com::sun::star::uno::RuntimeException);
1048 :
1049 : // XCellRange
1050 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCell > SAL_CALL
1051 : getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow )
1052 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
1053 : ::com::sun::star::uno::RuntimeException);
1054 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1055 : getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop,
1056 : sal_Int32 nRight, sal_Int32 nBottom )
1057 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
1058 : ::com::sun::star::uno::RuntimeException);
1059 : using ScCellRangeObj::getCellRangeByName;
1060 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > SAL_CALL
1061 : getCellRangeByName( const ::rtl::OUString& aRange )
1062 : throw(::com::sun::star::uno::RuntimeException);
1063 :
1064 : // XNamed
1065 : virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1066 : virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1067 : throw(::com::sun::star::uno::RuntimeException);
1068 :
1069 : // XSheetPageBreak
1070 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1071 : getColumnPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1072 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::TablePageBreakData > SAL_CALL
1073 : getRowPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1074 : virtual void SAL_CALL removeAllManualPageBreaks() throw(::com::sun::star::uno::RuntimeException);
1075 :
1076 : // XCellRangeMovement
1077 : virtual void SAL_CALL insertCells( const ::com::sun::star::table::CellRangeAddress& aRange,
1078 : ::com::sun::star::sheet::CellInsertMode nMode )
1079 : throw(::com::sun::star::uno::RuntimeException);
1080 : virtual void SAL_CALL removeRange( const ::com::sun::star::table::CellRangeAddress& aRange,
1081 : ::com::sun::star::sheet::CellDeleteMode nMode )
1082 : throw(::com::sun::star::uno::RuntimeException);
1083 : virtual void SAL_CALL moveRange( const ::com::sun::star::table::CellAddress& aDestination,
1084 : const ::com::sun::star::table::CellRangeAddress& aSource )
1085 : throw(::com::sun::star::uno::RuntimeException);
1086 : virtual void SAL_CALL copyRange( const ::com::sun::star::table::CellAddress& aDestination,
1087 : const ::com::sun::star::table::CellRangeAddress& aSource )
1088 : throw(::com::sun::star::uno::RuntimeException);
1089 :
1090 : // XTableChartsSupplier
1091 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::table::XTableCharts > SAL_CALL
1092 : getCharts() throw(::com::sun::star::uno::RuntimeException);
1093 :
1094 : // XDataPilotTablesSupplier
1095 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XDataPilotTables > SAL_CALL
1096 : getDataPilotTables() throw(::com::sun::star::uno::RuntimeException);
1097 :
1098 : // XScenariosSupplier
1099 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XScenarios > SAL_CALL
1100 : getScenarios() throw(::com::sun::star::uno::RuntimeException);
1101 :
1102 : // XSheetAnnotationsSupplier
1103 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSheetAnnotations > SAL_CALL
1104 : getAnnotations() throw(::com::sun::star::uno::RuntimeException);
1105 :
1106 : // XDrawPageSupplier
1107 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
1108 : getDrawPage() throw(::com::sun::star::uno::RuntimeException);
1109 :
1110 : // XPrintAreas
1111 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1112 : getPrintAreas() throw(::com::sun::star::uno::RuntimeException);
1113 : virtual void SAL_CALL setPrintAreas( const ::com::sun::star::uno::Sequence<
1114 : ::com::sun::star::table::CellRangeAddress >& aPrintAreas )
1115 : throw(::com::sun::star::uno::RuntimeException);
1116 : virtual sal_Bool SAL_CALL getPrintTitleColumns() throw(::com::sun::star::uno::RuntimeException);
1117 : virtual void SAL_CALL setPrintTitleColumns( sal_Bool bPrintTitleColumns )
1118 : throw(::com::sun::star::uno::RuntimeException);
1119 : virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleColumns()
1120 : throw(::com::sun::star::uno::RuntimeException);
1121 : virtual void SAL_CALL setTitleColumns(
1122 : const ::com::sun::star::table::CellRangeAddress& aTitleColumns )
1123 : throw(::com::sun::star::uno::RuntimeException);
1124 : virtual sal_Bool SAL_CALL getPrintTitleRows() throw(::com::sun::star::uno::RuntimeException);
1125 : virtual void SAL_CALL setPrintTitleRows( sal_Bool bPrintTitleRows )
1126 : throw(::com::sun::star::uno::RuntimeException);
1127 : virtual ::com::sun::star::table::CellRangeAddress SAL_CALL getTitleRows()
1128 : throw(::com::sun::star::uno::RuntimeException);
1129 : virtual void SAL_CALL setTitleRows(
1130 : const ::com::sun::star::table::CellRangeAddress& aTitleRows )
1131 : throw(::com::sun::star::uno::RuntimeException);
1132 :
1133 : // XSheetLinkable
1134 : virtual ::com::sun::star::sheet::SheetLinkMode SAL_CALL getLinkMode()
1135 : throw(::com::sun::star::uno::RuntimeException);
1136 : virtual void SAL_CALL setLinkMode( ::com::sun::star::sheet::SheetLinkMode nLinkMode )
1137 : throw(::com::sun::star::uno::RuntimeException);
1138 : virtual ::rtl::OUString SAL_CALL getLinkUrl() throw(::com::sun::star::uno::RuntimeException);
1139 : virtual void SAL_CALL setLinkUrl( const ::rtl::OUString& aLinkUrl )
1140 : throw(::com::sun::star::uno::RuntimeException);
1141 : virtual ::rtl::OUString SAL_CALL getLinkSheetName() throw(::com::sun::star::uno::RuntimeException);
1142 : virtual void SAL_CALL setLinkSheetName( const ::rtl::OUString& aLinkSheetName )
1143 : throw(::com::sun::star::uno::RuntimeException);
1144 : virtual void SAL_CALL link( const ::rtl::OUString& aUrl,
1145 : const ::rtl::OUString& aSheetName,
1146 : const ::rtl::OUString& aFilterName,
1147 : const ::rtl::OUString& aFilterOptions,
1148 : ::com::sun::star::sheet::SheetLinkMode nMode )
1149 : throw(::com::sun::star::uno::RuntimeException);
1150 :
1151 : // XSheetAuditing
1152 : virtual sal_Bool SAL_CALL hideDependents( const ::com::sun::star::table::CellAddress& aPosition )
1153 : throw(::com::sun::star::uno::RuntimeException);
1154 : virtual sal_Bool SAL_CALL hidePrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1155 : throw(::com::sun::star::uno::RuntimeException);
1156 : virtual sal_Bool SAL_CALL showDependents( const ::com::sun::star::table::CellAddress& aPosition )
1157 : throw(::com::sun::star::uno::RuntimeException);
1158 : virtual sal_Bool SAL_CALL showPrecedents( const ::com::sun::star::table::CellAddress& aPosition )
1159 : throw(::com::sun::star::uno::RuntimeException);
1160 : virtual sal_Bool SAL_CALL showErrors( const ::com::sun::star::table::CellAddress& aPosition )
1161 : throw(::com::sun::star::uno::RuntimeException);
1162 : virtual sal_Bool SAL_CALL showInvalid() throw(::com::sun::star::uno::RuntimeException);
1163 : virtual void SAL_CALL clearArrows() throw(::com::sun::star::uno::RuntimeException);
1164 :
1165 : // XSheetOutline
1166 : virtual void SAL_CALL group( const ::com::sun::star::table::CellRangeAddress& aRange,
1167 : ::com::sun::star::table::TableOrientation nOrientation )
1168 : throw(::com::sun::star::uno::RuntimeException);
1169 : virtual void SAL_CALL ungroup( const ::com::sun::star::table::CellRangeAddress& aRange,
1170 : ::com::sun::star::table::TableOrientation nOrientation )
1171 : throw(::com::sun::star::uno::RuntimeException);
1172 : virtual void SAL_CALL autoOutline( const ::com::sun::star::table::CellRangeAddress& aRange )
1173 : throw(::com::sun::star::uno::RuntimeException);
1174 : virtual void SAL_CALL clearOutline() throw(::com::sun::star::uno::RuntimeException);
1175 : virtual void SAL_CALL hideDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1176 : throw(::com::sun::star::uno::RuntimeException);
1177 : virtual void SAL_CALL showDetail( const ::com::sun::star::table::CellRangeAddress& aRange )
1178 : throw(::com::sun::star::uno::RuntimeException);
1179 : virtual void SAL_CALL showLevel( sal_Int16 nLevel,
1180 : ::com::sun::star::table::TableOrientation nOrientation )
1181 : throw(::com::sun::star::uno::RuntimeException);
1182 :
1183 : // XProtectable
1184 : virtual void SAL_CALL protect( const ::rtl::OUString& aPassword )
1185 : throw(::com::sun::star::uno::RuntimeException);
1186 : virtual void SAL_CALL unprotect( const ::rtl::OUString& aPassword )
1187 : throw(::com::sun::star::lang::IllegalArgumentException,
1188 : ::com::sun::star::uno::RuntimeException);
1189 : virtual sal_Bool SAL_CALL isProtected() throw(::com::sun::star::uno::RuntimeException);
1190 :
1191 : // XScenario
1192 : virtual sal_Bool SAL_CALL getIsScenario() throw(::com::sun::star::uno::RuntimeException);
1193 : virtual ::rtl::OUString SAL_CALL getScenarioComment() throw(::com::sun::star::uno::RuntimeException);
1194 : virtual void SAL_CALL setScenarioComment( const ::rtl::OUString& aScenarioComment )
1195 : throw(::com::sun::star::uno::RuntimeException);
1196 : virtual void SAL_CALL addRanges( const ::com::sun::star::uno::Sequence<
1197 : ::com::sun::star::table::CellRangeAddress >& aRanges )
1198 : throw(::com::sun::star::uno::RuntimeException);
1199 : virtual void SAL_CALL apply() throw(::com::sun::star::uno::RuntimeException);
1200 : // XScenarioEnhanced
1201 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::table::CellRangeAddress > SAL_CALL
1202 : getRanges( )
1203 : throw(::com::sun::star::uno::RuntimeException);
1204 :
1205 : // XExternalSheetName
1206 : virtual void SAL_CALL setExternalName( const ::rtl::OUString& aUrl, const ::rtl::OUString& aSheetName )
1207 : throw (::com::sun::star::container::ElementExistException,
1208 : ::com::sun::star::uno::RuntimeException);
1209 :
1210 : // XEventsSupplier
1211 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents()
1212 : throw (::com::sun::star::uno::RuntimeException);
1213 :
1214 : // XPropertySet overloaded due to sheet properties
1215 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1216 : SAL_CALL getPropertySetInfo()
1217 : throw(::com::sun::star::uno::RuntimeException);
1218 :
1219 : // XServiceInfo
1220 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1221 : throw(::com::sun::star::uno::RuntimeException);
1222 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1223 : throw(::com::sun::star::uno::RuntimeException);
1224 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1225 : throw(::com::sun::star::uno::RuntimeException);
1226 :
1227 : // XUnoTunnel
1228 : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
1229 : sal_Int8 >& aIdentifier )
1230 : throw(::com::sun::star::uno::RuntimeException);
1231 :
1232 : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
1233 : static ScTableSheetObj* getImplementation( const com::sun::star::uno::Reference<
1234 : com::sun::star::uno::XInterface> xObj );
1235 :
1236 : // XTypeProvider
1237 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1238 : throw(::com::sun::star::uno::RuntimeException);
1239 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1240 : throw(::com::sun::star::uno::RuntimeException);
1241 : };
1242 :
1243 :
1244 : class ScTableColumnObj : public ScCellRangeObj,
1245 : public com::sun::star::container::XNamed
1246 : {
1247 : private:
1248 : const SfxItemPropertySet* pColPropSet;
1249 :
1250 : protected:
1251 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
1252 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1253 : ::com::sun::star::uno::Any& )
1254 : throw(::com::sun::star::uno::RuntimeException);
1255 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1256 : const ::com::sun::star::uno::Any& aValue )
1257 : throw(::com::sun::star::lang::IllegalArgumentException,
1258 : ::com::sun::star::uno::RuntimeException);
1259 :
1260 : public:
1261 : ScTableColumnObj(ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab);
1262 : virtual ~ScTableColumnObj();
1263 :
1264 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
1265 : const ::com::sun::star::uno::Type & rType )
1266 : throw(::com::sun::star::uno::RuntimeException);
1267 : virtual void SAL_CALL acquire() throw();
1268 : virtual void SAL_CALL release() throw();
1269 :
1270 : // XNamed
1271 : virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
1272 : virtual void SAL_CALL setName( const ::rtl::OUString& aName )
1273 : throw(::com::sun::star::uno::RuntimeException);
1274 :
1275 : // XPropertySet overloaded due to column properties
1276 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1277 : SAL_CALL getPropertySetInfo()
1278 : throw(::com::sun::star::uno::RuntimeException);
1279 :
1280 : // XServiceInfo
1281 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1282 : throw(::com::sun::star::uno::RuntimeException);
1283 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1284 : throw(::com::sun::star::uno::RuntimeException);
1285 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1286 : throw(::com::sun::star::uno::RuntimeException);
1287 :
1288 : // XTypeProvider
1289 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes()
1290 : throw(::com::sun::star::uno::RuntimeException);
1291 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
1292 : throw(::com::sun::star::uno::RuntimeException);
1293 : };
1294 :
1295 :
1296 : class ScTableRowObj : public ScCellRangeObj
1297 : {
1298 : private:
1299 : const SfxItemPropertySet* pRowPropSet;
1300 :
1301 : protected:
1302 : virtual const SfxItemPropertyMap& GetItemPropertyMap();
1303 : virtual void GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1304 : ::com::sun::star::uno::Any& )
1305 : throw(::com::sun::star::uno::RuntimeException);
1306 : virtual void SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry,
1307 : const ::com::sun::star::uno::Any& aValue )
1308 : throw(::com::sun::star::lang::IllegalArgumentException,
1309 : ::com::sun::star::uno::RuntimeException);
1310 :
1311 : public:
1312 : ScTableRowObj(ScDocShell* pDocSh, SCROW nRow, SCTAB nTab);
1313 : virtual ~ScTableRowObj();
1314 :
1315 : // XPropertySet overloaded due to row properties
1316 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
1317 : SAL_CALL getPropertySetInfo()
1318 : throw(::com::sun::star::uno::RuntimeException);
1319 :
1320 : // XServiceInfo
1321 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1322 : throw(::com::sun::star::uno::RuntimeException);
1323 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1324 : throw(::com::sun::star::uno::RuntimeException);
1325 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1326 : throw(::com::sun::star::uno::RuntimeException);
1327 : };
1328 :
1329 :
1330 : class ScCellsObj : public cppu::WeakImplHelper2<
1331 : com::sun::star::container::XEnumerationAccess,
1332 : com::sun::star::lang::XServiceInfo >,
1333 : public SfxListener
1334 : {
1335 : private:
1336 : ScDocShell* pDocShell;
1337 : ScRangeList aRanges;
1338 :
1339 : public:
1340 : ScCellsObj(ScDocShell* pDocSh, const ScRangeList& rR);
1341 : virtual ~ScCellsObj();
1342 :
1343 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1344 :
1345 : // XEnumerationAccess
1346 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1347 : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1348 :
1349 : // XElementAccess
1350 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1351 : throw(::com::sun::star::uno::RuntimeException);
1352 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1353 :
1354 : // XServiceInfo
1355 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1356 : throw(::com::sun::star::uno::RuntimeException);
1357 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1358 : throw(::com::sun::star::uno::RuntimeException);
1359 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1360 : throw(::com::sun::star::uno::RuntimeException);
1361 : };
1362 :
1363 :
1364 : class ScCellsEnumeration : public cppu::WeakImplHelper2<
1365 : com::sun::star::container::XEnumeration,
1366 : com::sun::star::lang::XServiceInfo >,
1367 : public SfxListener
1368 : {
1369 : private:
1370 : ScDocShell* pDocShell;
1371 : ScRangeList aRanges;
1372 : ScAddress aPos;
1373 : ScMarkData* pMark;
1374 : sal_Bool bAtEnd;
1375 :
1376 : private:
1377 : void Advance_Impl();
1378 : void CheckPos_Impl();
1379 :
1380 : public:
1381 : ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR);
1382 : virtual ~ScCellsEnumeration();
1383 :
1384 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1385 :
1386 : // XEnumeration
1387 : virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1388 : virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1389 : throw(::com::sun::star::container::NoSuchElementException,
1390 : ::com::sun::star::lang::WrappedTargetException,
1391 : ::com::sun::star::uno::RuntimeException);
1392 :
1393 : // XServiceInfo
1394 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1395 : throw(::com::sun::star::uno::RuntimeException);
1396 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1397 : throw(::com::sun::star::uno::RuntimeException);
1398 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1399 : throw(::com::sun::star::uno::RuntimeException);
1400 : };
1401 :
1402 : class ScCellFormatsObj : public cppu::WeakImplHelper3<
1403 : com::sun::star::container::XIndexAccess,
1404 : com::sun::star::container::XEnumerationAccess,
1405 : com::sun::star::lang::XServiceInfo >,
1406 : public SfxListener
1407 : {
1408 : private:
1409 : ScDocShell* pDocShell;
1410 : ScRange aTotalRange;
1411 :
1412 : private:
1413 : ScCellRangeObj* GetObjectByIndex_Impl(long nIndex) const;
1414 :
1415 : public:
1416 : ScCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1417 : virtual ~ScCellFormatsObj();
1418 :
1419 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1420 :
1421 : // XIndexAccess
1422 : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1423 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1424 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
1425 : ::com::sun::star::lang::WrappedTargetException,
1426 : ::com::sun::star::uno::RuntimeException);
1427 :
1428 : // XEnumerationAccess
1429 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1430 : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1431 :
1432 : // XElementAccess
1433 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1434 : throw(::com::sun::star::uno::RuntimeException);
1435 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1436 :
1437 : // XServiceInfo
1438 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1439 : throw(::com::sun::star::uno::RuntimeException);
1440 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1441 : throw(::com::sun::star::uno::RuntimeException);
1442 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1443 : throw(::com::sun::star::uno::RuntimeException);
1444 : };
1445 :
1446 :
1447 : class ScCellFormatsEnumeration : public cppu::WeakImplHelper2<
1448 : com::sun::star::container::XEnumeration,
1449 : com::sun::star::lang::XServiceInfo >,
1450 : public SfxListener
1451 : {
1452 : private:
1453 : ScDocShell* pDocShell;
1454 : SCTAB nTab;
1455 : ScAttrRectIterator* pIter;
1456 : ScRange aNext;
1457 : sal_Bool bAtEnd;
1458 : sal_Bool bDirty;
1459 :
1460 : private:
1461 : void Advance_Impl();
1462 : ScCellRangeObj* NextObject_Impl();
1463 :
1464 : public:
1465 : ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rR);
1466 : virtual ~ScCellFormatsEnumeration();
1467 :
1468 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1469 :
1470 : // XEnumeration
1471 : virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1472 : virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1473 : throw(::com::sun::star::container::NoSuchElementException,
1474 : ::com::sun::star::lang::WrappedTargetException,
1475 : ::com::sun::star::uno::RuntimeException);
1476 :
1477 : // XServiceInfo
1478 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1479 : throw(::com::sun::star::uno::RuntimeException);
1480 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1481 : throw(::com::sun::star::uno::RuntimeException);
1482 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1483 : throw(::com::sun::star::uno::RuntimeException);
1484 : };
1485 :
1486 : typedef std::vector< ScRangeList > ScMyRangeLists;
1487 :
1488 : class ScUniqueCellFormatsObj : public cppu::WeakImplHelper3<
1489 : com::sun::star::container::XIndexAccess,
1490 : com::sun::star::container::XEnumerationAccess,
1491 : com::sun::star::lang::XServiceInfo >,
1492 : public SfxListener
1493 : {
1494 : private:
1495 : ScDocShell* pDocShell;
1496 : ScRange aTotalRange;
1497 : ScMyRangeLists aRangeLists;
1498 :
1499 : private:
1500 : void GetObjects_Impl();
1501 :
1502 : public:
1503 : ScUniqueCellFormatsObj(ScDocShell* pDocSh, const ScRange& rR);
1504 : virtual ~ScUniqueCellFormatsObj();
1505 :
1506 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1507 :
1508 : // XIndexAccess
1509 : virtual sal_Int32 SAL_CALL getCount() throw(::com::sun::star::uno::RuntimeException);
1510 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
1511 : throw(::com::sun::star::lang::IndexOutOfBoundsException,
1512 : ::com::sun::star::lang::WrappedTargetException,
1513 : ::com::sun::star::uno::RuntimeException);
1514 :
1515 : // XEnumerationAccess
1516 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL
1517 : createEnumeration() throw(::com::sun::star::uno::RuntimeException);
1518 :
1519 : // XElementAccess
1520 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
1521 : throw(::com::sun::star::uno::RuntimeException);
1522 : virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
1523 :
1524 : // XServiceInfo
1525 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1526 : throw(::com::sun::star::uno::RuntimeException);
1527 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1528 : throw(::com::sun::star::uno::RuntimeException);
1529 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1530 : throw(::com::sun::star::uno::RuntimeException);
1531 : };
1532 :
1533 : class ScUniqueCellFormatsEnumeration : public cppu::WeakImplHelper2<
1534 : com::sun::star::container::XEnumeration,
1535 : com::sun::star::lang::XServiceInfo >,
1536 : public SfxListener
1537 : {
1538 : private:
1539 : ScMyRangeLists aRangeLists;
1540 : ScDocShell* pDocShell;
1541 : sal_Int32 nCurrentPosition;
1542 :
1543 : public:
1544 : ScUniqueCellFormatsEnumeration(ScDocShell* pDocShell, const ScMyRangeLists& rRangeLists);
1545 : virtual ~ScUniqueCellFormatsEnumeration();
1546 :
1547 : virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
1548 :
1549 : // XEnumeration
1550 : virtual sal_Bool SAL_CALL hasMoreElements() throw(::com::sun::star::uno::RuntimeException);
1551 : virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
1552 : throw(::com::sun::star::container::NoSuchElementException,
1553 : ::com::sun::star::lang::WrappedTargetException,
1554 : ::com::sun::star::uno::RuntimeException);
1555 :
1556 : // XServiceInfo
1557 : virtual ::rtl::OUString SAL_CALL getImplementationName()
1558 : throw(::com::sun::star::uno::RuntimeException);
1559 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
1560 : throw(::com::sun::star::uno::RuntimeException);
1561 : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
1562 : throw(::com::sun::star::uno::RuntimeException);
1563 : };
1564 :
1565 :
1566 : #endif
1567 :
1568 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|