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