1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SC_INC_DOCUNO_HXX
21 #define INCLUDED_SC_INC_DOCUNO_HXX
23 #include "address.hxx"
24 #include <sfx2/sfxbasemodel.hxx>
25 #include <svl/lstner.hxx>
26 #include <svx/fmdmod.hxx>
27 #include <com/sun/star/view/XRenderable.hpp>
28 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
29 #include <com/sun/star/document/XActionLockable.hpp>
30 #include <com/sun/star/document/XLinkTargetSupplier.hpp>
31 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
32 #include <com/sun/star/drawing/XDrawPages.hpp>
33 #include <com/sun/star/sheet/XGoalSeek.hpp>
34 #include <com/sun/star/sheet/XCalculatable.hpp>
35 #include <com/sun/star/sheet/XScenarios.hpp>
36 #include <com/sun/star/sheet/XConsolidatable.hpp>
37 #include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
38 #include <com/sun/star/sheet/XSpreadsheets2.hpp>
39 #include <com/sun/star/sheet/XDocumentAuditing.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/util/XProtectable.hpp>
42 #include <com/sun/star/container/XEnumerationAccess.hpp>
43 #include <com/sun/star/table/XTableColumns.hpp>
44 #include <com/sun/star/table/XTableRows.hpp>
45 #include <com/sun/star/sheet/XSheetAnnotations.hpp>
46 #include <com/sun/star/beans/XPropertySet.hpp>
47 #include <com/sun/star/sheet/XCellRangesAccess.hpp>
48 #include <com/sun/star/sheet/opencl/XOpenCLSelection.hpp>
49 #include <com/sun/star/sheet/opencl/OpenCLPlatform.hpp>
50 #include <com/sun/star/util/XChangesNotifier.hpp>
51 #include <cppuhelper/implbase.hxx>
52 #include <comphelper/interfacecontainer2.hxx>
53 #include <svl/itemprop.hxx>
54 #include <vcl/event.hxx>
55 #include <vcl/ITiledRenderable.hxx>
56 #include "drwlayer.hxx"
59 class ScAnnotationObj
;
61 class ScPrintFuncCache
;
62 class ScPrintSelectionStatus
;
63 class ScTableColumnObj
;
65 class ScTableSheetObj
;
67 class ScPrintUIOptions
;
68 class ScSheetSaveData
;
70 class SC_DLLPUBLIC ScModelObj
: public SfxBaseModel
,
71 public vcl::ITiledRenderable
,
72 public css::sheet::XSpreadsheetDocument
,
73 public css::document::XActionLockable
,
74 public css::sheet::XCalculatable
,
75 public css::util::XProtectable
,
76 public css::drawing::XDrawPagesSupplier
,
77 public css::sheet::XGoalSeek
,
78 public css::sheet::XConsolidatable
,
79 public css::sheet::XDocumentAuditing
,
80 public css::style::XStyleFamiliesSupplier
,
81 public css::view::XRenderable
,
82 public css::document::XLinkTargetSupplier
,
83 public css::beans::XPropertySet
,
84 public SvxFmMSFactory
, ///< derived from XMultiServiceFactory
85 public css::lang::XServiceInfo
,
86 public css::util::XChangesNotifier
,
87 public css::sheet::opencl::XOpenCLSelection
90 SfxItemPropertySet aPropSet
;
91 ScDocShell
* pDocShell
;
92 ScPrintFuncCache
* pPrintFuncCache
;
93 ScPrintUIOptions
* pPrinterOptions
;
94 css::uno::Reference
<css::uno::XAggregation
> xNumberAgg
;
95 css::uno::Reference
<css::uno::XInterface
> xDrawGradTab
;
96 css::uno::Reference
<css::uno::XInterface
> xDrawHatchTab
;
97 css::uno::Reference
<css::uno::XInterface
> xDrawBitmapTab
;
98 css::uno::Reference
<css::uno::XInterface
> xDrawTrGradTab
;
99 css::uno::Reference
<css::uno::XInterface
> xDrawMarkerTab
;
100 css::uno::Reference
<css::uno::XInterface
> xDrawDashTab
;
101 css::uno::Reference
<css::uno::XInterface
> xChartDataProv
;
102 css::uno::Reference
<css::uno::XInterface
> xObjProvider
;
104 ::comphelper::OInterfaceContainerHelper2 maChangesListeners
;
106 bool FillRenderMarkData( const css::uno::Any
& aSelection
,
107 const css::uno::Sequence
< css::beans::PropertyValue
>& rOptions
,
108 ScMarkData
& rMark
, ScPrintSelectionStatus
& rStatus
, OUString
& rPagesStr
) const;
109 css::uno::Reference
<css::uno::XAggregation
> GetFormatter();
110 void HandleCalculateEvents();
112 css::uno::Reference
<css::uno::XInterface
> create(
113 OUString
const & aServiceSpecifier
,
114 css::uno::Sequence
<css::uno::Any
> const * arguments
);
118 const SfxItemPropertySet
& GetPropertySet() const { return aPropSet
; }
121 ScModelObj(ScDocShell
* pDocSh
);
122 virtual ~ScModelObj();
124 /// create ScModelObj and set at pDocSh (SetBaseModel)
125 static void CreateAndSet(ScDocShell
* pDocSh
);
127 ScDocument
* GetDocument() const;
128 SfxObjectShell
* GetEmbeddedObject() const;
130 void UpdateAllRowHeights();
132 void BeforeXMLLoading();
133 void AfterXMLLoading();
134 ScSheetSaveData
* GetSheetSaveData();
136 void RepaintRange( const ScRange
& rRange
);
137 void RepaintRange( const ScRangeList
& rRange
);
139 bool HasChangesListeners() const;
141 void NotifyChanges( const OUString
& rOperation
, const ScRangeList
& rRanges
,
142 const css::uno::Sequence
< css::beans::PropertyValue
>& rProperties
=
143 css::uno::Sequence
< css::beans::PropertyValue
>() );
145 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
)
146 throw(css::uno::RuntimeException
, std::exception
) override
;
147 virtual void SAL_CALL
acquire() throw() override
;
148 virtual void SAL_CALL
release() throw() override
;
150 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
152 /// XSpreadsheetDocument
153 virtual css::uno::Reference
< css::sheet::XSpreadsheets
> SAL_CALL
154 getSheets() throw(css::uno::RuntimeException
, std::exception
) override
;
156 /// XStyleFamiliesSupplier
157 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
158 getStyleFamilies() throw(css::uno::RuntimeException
, std::exception
) override
;
161 virtual sal_Int32 SAL_CALL
getRendererCount( const css::uno::Any
& aSelection
,
162 const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
)
163 throw (css::lang::IllegalArgumentException
,
164 css::uno::RuntimeException
,
165 std::exception
) override
;
166 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
167 getRenderer( sal_Int32 nRenderer
, const css::uno::Any
& aSelection
,
168 const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
)
169 throw (css::lang::IllegalArgumentException
,
170 css::uno::RuntimeException
,
171 std::exception
) override
;
172 virtual void SAL_CALL
render( sal_Int32 nRenderer
, const css::uno::Any
& aSelection
,
173 const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
)
174 throw (css::lang::IllegalArgumentException
,
175 css::uno::RuntimeException
,
176 std::exception
) override
;
178 /// XLinkTargetSupplier
179 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
180 getLinks() throw(css::uno::RuntimeException
, std::exception
) override
;
183 virtual sal_Bool SAL_CALL
isActionLocked() throw(css::uno::RuntimeException
, std::exception
) override
;
184 virtual void SAL_CALL
addActionLock() throw(css::uno::RuntimeException
, std::exception
) override
;
185 virtual void SAL_CALL
removeActionLock() throw(css::uno::RuntimeException
, std::exception
) override
;
186 virtual void SAL_CALL
setActionLocks( sal_Int16 nLock
)
187 throw(css::uno::RuntimeException
, std::exception
) override
;
188 virtual sal_Int16 SAL_CALL
resetActionLocks() throw(css::uno::RuntimeException
, std::exception
) override
;
190 virtual void SAL_CALL
lockControllers() throw (css::uno::RuntimeException
, std::exception
) override
;
191 virtual void SAL_CALL
unlockControllers() throw (css::uno::RuntimeException
, std::exception
) override
;
194 virtual void SAL_CALL
calculate() throw(css::uno::RuntimeException
, std::exception
) override
;
195 virtual void SAL_CALL
calculateAll() throw(css::uno::RuntimeException
, std::exception
) override
;
196 virtual sal_Bool SAL_CALL
isAutomaticCalculationEnabled()
197 throw(css::uno::RuntimeException
, std::exception
) override
;
198 virtual void SAL_CALL
enableAutomaticCalculation( sal_Bool bEnabled
)
199 throw(css::uno::RuntimeException
, std::exception
) override
;
202 virtual void SAL_CALL
protect( const OUString
& aPassword
)
203 throw(css::uno::RuntimeException
, std::exception
) override
;
204 virtual void SAL_CALL
unprotect( const OUString
& aPassword
)
205 throw(css::lang::IllegalArgumentException
,
206 css::uno::RuntimeException
, std::exception
) override
;
207 virtual sal_Bool SAL_CALL
isProtected() throw(css::uno::RuntimeException
, std::exception
) override
;
209 /// XDrawPagesSupplier
210 virtual css::uno::Reference
< css::drawing::XDrawPages
> SAL_CALL
211 getDrawPages() throw(css::uno::RuntimeException
, std::exception
) override
;
214 virtual css::sheet::GoalResult SAL_CALL
seekGoal(
215 const css::table::CellAddress
& aFormulaPosition
,
216 const css::table::CellAddress
& aVariablePosition
,
217 const OUString
& aGoalValue
)
218 throw (css::uno::RuntimeException
,
219 std::exception
) override
;
222 virtual css::uno::Reference
< css::sheet::XConsolidationDescriptor
>
223 SAL_CALL
createConsolidationDescriptor( sal_Bool bEmpty
)
224 throw(css::uno::RuntimeException
, std::exception
) override
;
225 virtual void SAL_CALL
consolidate( const css::uno::Reference
< css::sheet::XConsolidationDescriptor
>& xDescriptor
)
226 throw (css::uno::RuntimeException
,
227 std::exception
) override
;
229 /// XDocumentAuditing
230 virtual void SAL_CALL
refreshArrows() throw(css::uno::RuntimeException
, std::exception
) override
;
232 /// XViewDataSupplier
233 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getViewData( )
234 throw (css::uno::RuntimeException
, std::exception
) override
;
237 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
238 SAL_CALL
getPropertySetInfo()
239 throw(css::uno::RuntimeException
, std::exception
) override
;
240 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
241 const css::uno::Any
& aValue
)
242 throw(css::beans::UnknownPropertyException
,
243 css::beans::PropertyVetoException
,
244 css::lang::IllegalArgumentException
,
245 css::lang::WrappedTargetException
,
246 css::uno::RuntimeException
,
247 std::exception
) override
;
248 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
)
249 throw(css::beans::UnknownPropertyException
,
250 css::lang::WrappedTargetException
,
251 css::uno::RuntimeException
, std::exception
) override
;
252 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
253 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
254 throw(css::beans::UnknownPropertyException
,
255 css::lang::WrappedTargetException
,
256 css::uno::RuntimeException
, std::exception
) override
;
257 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
258 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
259 throw(css::beans::UnknownPropertyException
,
260 css::lang::WrappedTargetException
,
261 css::uno::RuntimeException
, std::exception
) override
;
262 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
263 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
264 throw(css::beans::UnknownPropertyException
,
265 css::lang::WrappedTargetException
,
266 css::uno::RuntimeException
, std::exception
) override
;
267 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
268 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
269 throw(css::beans::UnknownPropertyException
,
270 css::lang::WrappedTargetException
,
271 css::uno::RuntimeException
, std::exception
) override
;
273 /// XMultiServiceFactory
274 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
275 createInstance( const OUString
& aServiceSpecifier
)
276 throw(css::uno::Exception
,
277 css::uno::RuntimeException
, std::exception
) override
;
278 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
279 createInstanceWithArguments( const OUString
& ServiceSpecifier
,
280 const css::uno::Sequence
< css::uno::Any
>& Arguments
)
281 throw(css::uno::Exception
,
282 css::uno::RuntimeException
, std::exception
) override
;
283 virtual css::uno::Sequence
< OUString
> SAL_CALL
getAvailableServiceNames()
284 throw(css::uno::RuntimeException
, std::exception
) override
;
287 virtual OUString SAL_CALL
getImplementationName()
288 throw(css::uno::RuntimeException
, std::exception
) override
;
289 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
290 throw(css::uno::RuntimeException
, std::exception
) override
;
291 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
292 throw(css::uno::RuntimeException
, std::exception
) override
;
295 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
)
296 throw(css::uno::RuntimeException
, std::exception
) override
;
298 static const css::uno::Sequence
<sal_Int8
>& getUnoTunnelId();
299 static ScModelObj
* getImplementation(const css::uno::Reference
<css::uno::XInterface
>& rObj
);
302 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes()
303 throw(css::uno::RuntimeException
, std::exception
) override
;
304 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
305 throw(css::uno::RuntimeException
, std::exception
) override
;
308 virtual void SAL_CALL
addChangesListener( const css::uno::Reference
< css::util::XChangesListener
>& aListener
)
309 throw (css::uno::RuntimeException
, std::exception
) override
;
310 virtual void SAL_CALL
removeChangesListener( const css::uno::Reference
< css::util::XChangesListener
>& aListener
)
311 throw (css::uno::RuntimeException
, std::exception
) override
;
314 virtual sal_Bool SAL_CALL
isOpenCLEnabled()
315 throw(css::uno::RuntimeException
, std::exception
) override
;
317 virtual void SAL_CALL
enableOpenCL(sal_Bool bEnable
)
318 throw(css::uno::RuntimeException
, std::exception
) override
;
320 virtual void SAL_CALL
enableAutomaticDeviceSelection(sal_Bool bForce
)
321 throw(css::uno::RuntimeException
, std::exception
) override
;
323 virtual void SAL_CALL
disableAutomaticDeviceSelection()
324 throw(css::uno::RuntimeException
, std::exception
) override
;
326 virtual void SAL_CALL
selectOpenCLDevice( sal_Int32 platform
, sal_Int32 device
)
327 throw(css::uno::RuntimeException
, std::exception
) override
;
329 virtual sal_Int32 SAL_CALL
getPlatformID()
330 throw(css::uno::RuntimeException
, std::exception
) override
;
332 virtual sal_Int32 SAL_CALL
getDeviceID()
333 throw(css::uno::RuntimeException
, std::exception
) override
;
335 virtual css::uno::Sequence
< css::sheet::opencl::OpenCLPlatform
>
336 SAL_CALL
getOpenCLPlatforms()
337 throw(css::uno::RuntimeException
, std::exception
) override
;
339 virtual void SAL_CALL
enableOpcodeSubsetTest()
340 throw (css::uno::RuntimeException
, std::exception
) override
;
342 virtual void SAL_CALL
disableOpcodeSubsetTest()
343 throw (css::uno::RuntimeException
, std::exception
) override
;
345 virtual sal_Bool SAL_CALL
isOpcodeSubsetTested()
346 throw (css::uno::RuntimeException
, std::exception
) override
;
348 virtual void SAL_CALL
setFormulaCellNumberLimit( sal_Int32 number
)
349 throw (css::uno::RuntimeException
, std::exception
) override
;
351 virtual sal_Int32 SAL_CALL
getFormulaCellNumberLimit()
352 throw (css::uno::RuntimeException
, std::exception
) override
;
354 /// @see vcl::ITiledRenderable::paintTile().
355 virtual void paintTile( VirtualDevice
& rDevice
,
361 long nTileHeight
) override
;
363 /// @see vcl::ITiledRenderable::getDocumentSize().
364 virtual Size
getDocumentSize() override
;
366 /// @see vcl::ITiledRenderable::setPart().
367 virtual void setPart(int nPart
) override
;
369 /// @see vcl::ITiledRenderable::getPart().
370 virtual int getPart() override
;
372 /// @see vcl::ITiledRenderable::getParts().
373 virtual int getParts() override
;
375 /// @see vcl::ITiledRenderable::getPartName().
376 virtual OUString
getPartName(int nPart
) override
;
378 /// @see vcl::ITiledRenderable::getPartHash().
379 virtual OUString
getPartHash( int nPart
) override
;
381 /// @see vcl::ITiledRenderable::initializeForTiledRendering().
382 virtual void initializeForTiledRendering(const css::uno::Sequence
<css::beans::PropertyValue
>& rArguments
) override
;
384 /// @see vcl::ITiledRenderable::registerCallback().
385 virtual void registerCallback(LibreOfficeKitCallback pCallback
, void* pData
) override
;
387 /// @see vcl::ITiledRenderable::postKeyEvent().
388 virtual void postKeyEvent(int nType
, int nCharCode
, int nKeyCode
) override
;
390 /// @see vcl::ITiledRenderable::postMouseEvent().
391 virtual void postMouseEvent(int nType
, int nX
, int nY
, int nCount
, int nButtons
= MOUSE_LEFT
, int nModifier
= 0) override
;
393 /// @see vcl::ITiledRenderable::setTextSelection().
394 virtual void setTextSelection(int nType
, int nX
, int nY
) override
;
396 /// @see vcl::ITiledRenderable::getTextSelection().
397 virtual OString
getTextSelection(const char* pMimeType
, OString
& rUsedMimeType
) override
;
399 /// @see vcl::ITiledRenderable::setGraphicSelection().
400 virtual void setGraphicSelection(int nType
, int nX
, int nY
) override
;
402 /// @see lok::Document::resetSelection().
403 virtual void resetSelection() override
;
405 /// @see vcl::ITiledRenderable::setClipboard().
406 virtual void setClipboard(const css::uno::Reference
<css::datatransfer::clipboard::XClipboard
>& xClipboard
) override
;
408 /// @see vcl::ITiledRenderable::isMimeTypeSupported().
409 virtual bool isMimeTypeSupported() override
;
411 /// @see vcl::ITiledRenderable::setClientZoom().
412 virtual void setClientZoom(int nTilePixelWidth
, int nTilePixelHeight
, int nTileTwipWidth
, int nTileTwipHeight
) override
;
414 /// @see vcl::ITiledRenderable::getRowColumnHeaders().
415 virtual OUString
getRowColumnHeaders(const Rectangle
& rRectangle
) override
;
417 /// @see vcl::ITiledRenderable::getCellCursor().
418 virtual OString
getCellCursor( int nOutputWidth
,
421 long nTileHeight
) override
;
423 /// @see vcl::ITiledRenderable::getPointer().
424 virtual Pointer
getPointer() override
;
427 class ScDrawPagesObj
: public cppu::WeakImplHelper
<
428 css::drawing::XDrawPages
,
429 css::lang::XServiceInfo
>,
433 ScDocShell
* pDocShell
;
435 css::uno::Reference
< css::drawing::XDrawPage
>
436 GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
439 ScDrawPagesObj(ScDocShell
* pDocSh
);
440 virtual ~ScDrawPagesObj();
442 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
445 virtual css::uno::Reference
< css::drawing::XDrawPage
> SAL_CALL
446 insertNewByIndex( sal_Int32 nIndex
)
447 throw(css::uno::RuntimeException
, std::exception
) override
;
448 virtual void SAL_CALL
remove( const css::uno::Reference
< css::drawing::XDrawPage
>& xPage
)
449 throw(css::uno::RuntimeException
, std::exception
) override
;
452 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
453 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
454 throw(css::lang::IndexOutOfBoundsException
,
455 css::lang::WrappedTargetException
,
456 css::uno::RuntimeException
, std::exception
) override
;
459 virtual css::uno::Type SAL_CALL
getElementType()
460 throw(css::uno::RuntimeException
, std::exception
) override
;
461 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
464 virtual OUString SAL_CALL
getImplementationName()
465 throw(css::uno::RuntimeException
, std::exception
) override
;
466 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
467 throw(css::uno::RuntimeException
, std::exception
) override
;
468 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
469 throw(css::uno::RuntimeException
, std::exception
) override
;
472 class ScTableSheetsObj
: public cppu::WeakImplHelper
<
473 css::sheet::XSpreadsheets2
,
474 css::sheet::XCellRangesAccess
,
475 css::container::XEnumerationAccess
,
476 css::container::XIndexAccess
,
477 css::lang::XServiceInfo
>,
481 ScDocShell
* pDocShell
;
483 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
484 ScTableSheetObj
* GetObjectByName_Impl(const OUString
& aName
) const;
487 ScTableSheetsObj(ScDocShell
* pDocSh
);
488 virtual ~ScTableSheetsObj();
490 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
493 virtual void SAL_CALL
insertNewByName( const OUString
& aName
, sal_Int16 nPosition
)
494 throw(css::uno::RuntimeException
, std::exception
) override
;
495 virtual void SAL_CALL
moveByName( const OUString
& aName
, sal_Int16 nDestination
)
496 throw(css::uno::RuntimeException
,
497 std::exception
) override
;
498 virtual void SAL_CALL
copyByName( const OUString
& aName
,
499 const OUString
& aCopy
, sal_Int16 nDestination
)
500 throw(css::uno::RuntimeException
,
501 std::exception
) override
;
504 virtual sal_Int32 SAL_CALL
importSheet(
505 const css::uno::Reference
< css::sheet::XSpreadsheetDocument
> & xDocSrc
,
506 const OUString
& srcName
,
507 sal_Int32 nDestPosition
)
508 throw(css::lang::IllegalArgumentException
,
509 css::lang::IndexOutOfBoundsException
,
510 css::uno::RuntimeException
, std::exception
) override
;
512 /// XCellRangesAccess
514 virtual css::uno::Reference
< css::table::XCell
>
515 SAL_CALL
getCellByPosition( sal_Int32 nColumn
, sal_Int32 nRow
, sal_Int32 nSheet
)
516 throw (css::lang::IndexOutOfBoundsException
, css::uno::RuntimeException
, std::exception
) override
;
518 virtual css::uno::Reference
< css::table::XCellRange
>
519 SAL_CALL
getCellRangeByPosition( sal_Int32 nLeft
, sal_Int32 nTop
, sal_Int32 nRight
, sal_Int32 nBottom
, sal_Int32 nSheet
)
520 throw (css::lang::IndexOutOfBoundsException
, css::uno::RuntimeException
, std::exception
) override
;
522 virtual css::uno::Sequence
< css::uno::Reference
< css::table::XCellRange
> >
523 SAL_CALL
getCellRangesByName( const OUString
& aRange
)
524 throw (css::lang::IllegalArgumentException
, css::uno::RuntimeException
, std::exception
) override
;
527 virtual void SAL_CALL
insertByName( const OUString
& aName
,
528 const css::uno::Any
& aElement
)
529 throw(css::lang::IllegalArgumentException
,
530 css::container::ElementExistException
,
531 css::lang::WrappedTargetException
,
532 css::uno::RuntimeException
, std::exception
) override
;
533 virtual void SAL_CALL
removeByName( const OUString
& Name
)
534 throw(css::container::NoSuchElementException
,
535 css::lang::WrappedTargetException
,
536 css::uno::RuntimeException
, std::exception
) override
;
539 virtual void SAL_CALL
replaceByName( const OUString
& aName
,
540 const css::uno::Any
& aElement
)
541 throw(css::lang::IllegalArgumentException
,
542 css::container::NoSuchElementException
,
543 css::lang::WrappedTargetException
,
544 css::uno::RuntimeException
, std::exception
) override
;
546 /// XEnumerationAccess
547 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
548 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
551 virtual css::uno::Type SAL_CALL
getElementType()
552 throw(css::uno::RuntimeException
, std::exception
) override
;
553 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
556 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
557 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
558 throw(css::lang::IndexOutOfBoundsException
,
559 css::lang::WrappedTargetException
,
560 css::uno::RuntimeException
, std::exception
) override
;
563 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
)
564 throw(css::container::NoSuchElementException
,
565 css::lang::WrappedTargetException
,
566 css::uno::RuntimeException
, std::exception
) override
;
567 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames()
568 throw(css::uno::RuntimeException
, std::exception
) override
;
569 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
)
570 throw(css::uno::RuntimeException
, std::exception
) override
;
573 virtual OUString SAL_CALL
getImplementationName()
574 throw(css::uno::RuntimeException
, std::exception
) override
;
575 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
576 throw(css::uno::RuntimeException
, std::exception
) override
;
577 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
578 throw(css::uno::RuntimeException
, std::exception
) override
;
581 class ScTableColumnsObj
: public cppu::WeakImplHelper
<
582 css::table::XTableColumns
,
583 css::container::XEnumerationAccess
,
584 css::container::XNameAccess
,
585 css::beans::XPropertySet
,
586 css::lang::XServiceInfo
>,
590 ScDocShell
* pDocShell
;
595 ScTableColumnObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
596 ScTableColumnObj
* GetObjectByName_Impl(const OUString
& aName
) const;
599 ScTableColumnsObj(ScDocShell
* pDocSh
, SCTAB nT
,
600 SCCOL nSC
, SCCOL nEC
);
601 virtual ~ScTableColumnsObj();
603 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
606 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
607 throw(css::uno::RuntimeException
, std::exception
) override
;
608 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
609 throw(css::uno::RuntimeException
, std::exception
) override
;
612 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
)
613 throw(css::container::NoSuchElementException
,
614 css::lang::WrappedTargetException
,
615 css::uno::RuntimeException
, std::exception
) override
;
616 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames()
617 throw(css::uno::RuntimeException
, std::exception
) override
;
618 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
)
619 throw(css::uno::RuntimeException
, std::exception
) override
;
622 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
623 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
624 throw(css::lang::IndexOutOfBoundsException
,
625 css::lang::WrappedTargetException
,
626 css::uno::RuntimeException
, std::exception
) override
;
628 /// XEnumerationAccess
629 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
630 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
633 virtual css::uno::Type SAL_CALL
getElementType()
634 throw(css::uno::RuntimeException
, std::exception
) override
;
635 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
638 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
639 SAL_CALL
getPropertySetInfo()
640 throw(css::uno::RuntimeException
, std::exception
) override
;
641 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
642 const css::uno::Any
& aValue
)
643 throw(css::beans::UnknownPropertyException
,
644 css::beans::PropertyVetoException
,
645 css::lang::IllegalArgumentException
,
646 css::lang::WrappedTargetException
,
647 css::uno::RuntimeException
, std::exception
) override
;
648 virtual css::uno::Any SAL_CALL
getPropertyValue(
649 const OUString
& PropertyName
)
650 throw(css::beans::UnknownPropertyException
,
651 css::lang::WrappedTargetException
,
652 css::uno::RuntimeException
,
653 std::exception
) override
;
654 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
655 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
656 throw(css::beans::UnknownPropertyException
,
657 css::lang::WrappedTargetException
,
658 css::uno::RuntimeException
, std::exception
) override
;
659 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
660 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
661 throw(css::beans::UnknownPropertyException
,
662 css::lang::WrappedTargetException
,
663 css::uno::RuntimeException
, std::exception
) override
;
664 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
665 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
666 throw(css::beans::UnknownPropertyException
,
667 css::lang::WrappedTargetException
,
668 css::uno::RuntimeException
, std::exception
) override
;
669 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
670 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
671 throw(css::beans::UnknownPropertyException
,
672 css::lang::WrappedTargetException
,
673 css::uno::RuntimeException
, std::exception
) override
;
676 virtual OUString SAL_CALL
getImplementationName()
677 throw(css::uno::RuntimeException
, std::exception
) override
;
678 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
679 throw(css::uno::RuntimeException
, std::exception
) override
;
680 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
681 throw(css::uno::RuntimeException
, std::exception
) override
;
684 class ScTableRowsObj
: public cppu::WeakImplHelper
<
685 css::table::XTableRows
,
686 css::container::XEnumerationAccess
,
687 css::beans::XPropertySet
,
688 css::lang::XServiceInfo
>,
692 ScDocShell
* pDocShell
;
697 ScTableRowObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
) const;
700 ScTableRowsObj(ScDocShell
* pDocSh
, SCTAB nT
,
701 SCROW nSR
, SCROW nER
);
702 virtual ~ScTableRowsObj();
704 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
707 virtual void SAL_CALL
insertByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
708 throw(css::uno::RuntimeException
, std::exception
) override
;
709 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
, sal_Int32 nCount
)
710 throw(css::uno::RuntimeException
, std::exception
) override
;
713 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
714 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
715 throw(css::lang::IndexOutOfBoundsException
,
716 css::lang::WrappedTargetException
,
717 css::uno::RuntimeException
, std::exception
) override
;
719 /// XEnumerationAccess
720 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
721 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
724 virtual css::uno::Type SAL_CALL
getElementType()
725 throw(css::uno::RuntimeException
, std::exception
) override
;
726 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
729 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
730 SAL_CALL
getPropertySetInfo()
731 throw(css::uno::RuntimeException
, std::exception
) override
;
732 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
733 const css::uno::Any
& aValue
)
734 throw(css::beans::UnknownPropertyException
,
735 css::beans::PropertyVetoException
,
736 css::lang::IllegalArgumentException
,
737 css::lang::WrappedTargetException
,
738 css::uno::RuntimeException
, std::exception
) override
;
739 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
)
740 throw(css::beans::UnknownPropertyException
,
741 css::lang::WrappedTargetException
,
742 css::uno::RuntimeException
,
743 std::exception
) override
;
744 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
745 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
746 throw(css::beans::UnknownPropertyException
,
747 css::lang::WrappedTargetException
,
748 css::uno::RuntimeException
, std::exception
) override
;
749 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
750 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
751 throw(css::beans::UnknownPropertyException
,
752 css::lang::WrappedTargetException
,
753 css::uno::RuntimeException
, std::exception
) override
;
754 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
755 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
756 throw(css::beans::UnknownPropertyException
,
757 css::lang::WrappedTargetException
,
758 css::uno::RuntimeException
, std::exception
) override
;
759 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
760 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
761 throw(css::beans::UnknownPropertyException
,
762 css::lang::WrappedTargetException
,
763 css::uno::RuntimeException
, std::exception
) override
;
766 virtual OUString SAL_CALL
getImplementationName()
767 throw(css::uno::RuntimeException
, std::exception
) override
;
768 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
769 throw(css::uno::RuntimeException
, std::exception
) override
;
770 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
771 throw(css::uno::RuntimeException
, std::exception
) override
;
774 class ScSpreadsheetSettingsObj
: public cppu::WeakImplHelper
<
775 css::beans::XPropertySet
,
776 css::lang::XServiceInfo
>,
780 ScDocShell
* pDocShell
;
783 virtual ~ScSpreadsheetSettingsObj();
785 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
788 virtual css::uno::Reference
< css::beans::XPropertySetInfo
>
789 SAL_CALL
getPropertySetInfo()
790 throw(css::uno::RuntimeException
, std::exception
) override
;
791 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
,
792 const css::uno::Any
& aValue
)
793 throw(css::beans::UnknownPropertyException
,
794 css::beans::PropertyVetoException
,
795 css::lang::IllegalArgumentException
,
796 css::lang::WrappedTargetException
,
797 css::uno::RuntimeException
, std::exception
) override
;
798 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
)
799 throw(css::beans::UnknownPropertyException
,
800 css::lang::WrappedTargetException
,
801 css::uno::RuntimeException
, std::exception
) override
;
802 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
,
803 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
)
804 throw(css::beans::UnknownPropertyException
,
805 css::lang::WrappedTargetException
,
806 css::uno::RuntimeException
, std::exception
) override
;
807 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
,
808 const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
)
809 throw(css::beans::UnknownPropertyException
,
810 css::lang::WrappedTargetException
,
811 css::uno::RuntimeException
, std::exception
) override
;
812 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
,
813 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
814 throw(css::beans::UnknownPropertyException
,
815 css::lang::WrappedTargetException
,
816 css::uno::RuntimeException
, std::exception
) override
;
817 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
,
818 const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
)
819 throw(css::beans::UnknownPropertyException
,
820 css::lang::WrappedTargetException
,
821 css::uno::RuntimeException
, std::exception
) override
;
824 virtual OUString SAL_CALL
getImplementationName()
825 throw(css::uno::RuntimeException
, std::exception
) override
;
826 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
827 throw(css::uno::RuntimeException
, std::exception
) override
;
828 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
829 throw(css::uno::RuntimeException
, std::exception
) override
;
832 class ScAnnotationsObj
: public cppu::WeakImplHelper
<
833 css::sheet::XSheetAnnotations
,
834 css::container::XEnumerationAccess
,
835 css::lang::XServiceInfo
>,
839 ScDocShell
* pDocShell
;
840 SCTAB nTab
; ///< Collection belongs to the sheet
842 bool GetAddressByIndex_Impl( sal_Int32 nIndex
, ScAddress
& rPos
) const;
843 ScAnnotationObj
* GetObjectByIndex_Impl( sal_Int32 nIndex
) const;
846 ScAnnotationsObj(ScDocShell
* pDocSh
, SCTAB nT
);
847 virtual ~ScAnnotationsObj();
849 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
851 /// XSheetAnnotations
852 virtual void SAL_CALL
insertNew( const css::table::CellAddress
& aPosition
,
853 const OUString
& aText
)
854 throw(css::uno::RuntimeException
, std::exception
) override
;
855 virtual void SAL_CALL
removeByIndex( sal_Int32 nIndex
)
856 throw(css::uno::RuntimeException
, std::exception
) override
;
859 virtual sal_Int32 SAL_CALL
getCount()
860 throw(css::uno::RuntimeException
,
861 std::exception
) override
;
862 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
863 throw(css::lang::IndexOutOfBoundsException
,
864 css::lang::WrappedTargetException
,
865 css::uno::RuntimeException
, std::exception
) override
;
867 /// XEnumerationAccess
868 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
869 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
872 virtual css::uno::Type SAL_CALL
getElementType()
873 throw(css::uno::RuntimeException
, std::exception
) override
;
874 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
877 virtual OUString SAL_CALL
getImplementationName()
878 throw(css::uno::RuntimeException
, std::exception
) override
;
879 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
880 throw(css::uno::RuntimeException
, std::exception
) override
;
881 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
882 throw(css::uno::RuntimeException
, std::exception
) override
;
885 class ScScenariosObj
: public cppu::WeakImplHelper
<
886 css::sheet::XScenarios
,
887 css::container::XEnumerationAccess
,
888 css::container::XIndexAccess
,
889 css::lang::XServiceInfo
>,
893 ScDocShell
* pDocShell
;
896 bool GetScenarioIndex_Impl( const OUString
& rName
, SCTAB
& rIndex
);
897 ScTableSheetObj
* GetObjectByIndex_Impl(sal_Int32 nIndex
);
898 ScTableSheetObj
* GetObjectByName_Impl(const OUString
& aName
);
901 ScScenariosObj(ScDocShell
* pDocSh
, SCTAB nT
);
902 virtual ~ScScenariosObj();
904 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
907 virtual void SAL_CALL
addNewByName( const OUString
& aName
,
908 const css::uno::Sequence
< css::table::CellRangeAddress
>& aRanges
,
909 const OUString
& aComment
)
910 throw(css::uno::RuntimeException
, std::exception
) override
;
911 virtual void SAL_CALL
removeByName( const OUString
& aName
)
912 throw(css::uno::RuntimeException
, std::exception
) override
;
915 virtual css::uno::Any SAL_CALL
getByName( const OUString
& aName
)
916 throw(css::container::NoSuchElementException
,
917 css::lang::WrappedTargetException
,
918 css::uno::RuntimeException
, std::exception
) override
;
919 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames()
920 throw(css::uno::RuntimeException
, std::exception
) override
;
921 virtual sal_Bool SAL_CALL
hasByName( const OUString
& aName
)
922 throw(css::uno::RuntimeException
, std::exception
) override
;
925 virtual sal_Int32 SAL_CALL
getCount() throw(css::uno::RuntimeException
, std::exception
) override
;
926 virtual css::uno::Any SAL_CALL
getByIndex( sal_Int32 Index
)
927 throw(css::lang::IndexOutOfBoundsException
,
928 css::lang::WrappedTargetException
,
929 css::uno::RuntimeException
, std::exception
) override
;
931 /// XEnumerationAccess
932 virtual css::uno::Reference
< css::container::XEnumeration
> SAL_CALL
933 createEnumeration() throw(css::uno::RuntimeException
, std::exception
) override
;
936 virtual css::uno::Type SAL_CALL
getElementType()
937 throw(css::uno::RuntimeException
, std::exception
) override
;
938 virtual sal_Bool SAL_CALL
hasElements() throw(css::uno::RuntimeException
, std::exception
) override
;
941 virtual OUString SAL_CALL
getImplementationName()
942 throw(css::uno::RuntimeException
, std::exception
) override
;
943 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
944 throw(css::uno::RuntimeException
, std::exception
) override
;
945 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
946 throw(css::uno::RuntimeException
, std::exception
) override
;
951 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */