LibreOffice Module sc (master) 1
docuno.hxx
Go to the documentation of this file.
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#pragma once
21
22#include "address.hxx"
23
24#include <sal/types.h>
25#include <sfx2/sfxbasemodel.hxx>
26#include <svl/lstner.hxx>
27#include <svx/fmdmod.hxx>
28#include <com/sun/star/view/XRenderable.hpp>
29#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
30#include <com/sun/star/document/XActionLockable.hpp>
31#include <com/sun/star/document/XLinkTargetSupplier.hpp>
32#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
33#include <com/sun/star/drawing/XDrawPages.hpp>
34#include <com/sun/star/sheet/XGoalSeek.hpp>
35#include <com/sun/star/sheet/XCalculatable.hpp>
36#include <com/sun/star/sheet/XScenarios.hpp>
37#include <com/sun/star/sheet/XConsolidatable.hpp>
38#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
39#include <com/sun/star/sheet/XSpreadsheets2.hpp>
40#include <com/sun/star/sheet/XDocumentAuditing.hpp>
41#include <com/sun/star/chart2/XDataProviderAccess.hpp>
42#include <com/sun/star/lang/XServiceInfo.hpp>
43#include <com/sun/star/util/XProtectable.hpp>
44#include <com/sun/star/container/XEnumerationAccess.hpp>
45#include <com/sun/star/table/XTableColumns.hpp>
46#include <com/sun/star/table/XTableRows.hpp>
47#include <com/sun/star/sheet/XSheetAnnotations.hpp>
48#include <com/sun/star/beans/XPropertySet.hpp>
49#include <com/sun/star/sheet/XCellRangesAccess.hpp>
50#include <com/sun/star/sheet/opencl/XOpenCLSelection.hpp>
51#include <com/sun/star/util/XChangesNotifier.hpp>
52#include <com/sun/star/uno/XAggregation.hpp>
55#include <svl/itemprop.hxx>
57
58namespace com::sun::star::chart2::data { class XDataProvider; }
59namespace com::sun::star::sheet::opencl { struct OpenCLPlatform; }
60
61class ScDocShell;
62class ScAnnotationObj;
63class ScMarkData;
65struct ScPrintState;
68class ScTableRowObj;
69class ScTableSheetObj;
70class ScRangeList;
72class ScSheetSaveData;
73struct ScFormatSaveData;
74
76 public vcl::ITiledRenderable,
77 public css::sheet::XSpreadsheetDocument,
78 public css::document::XActionLockable,
79 public css::sheet::XCalculatable,
80 public css::util::XProtectable,
81 public css::drawing::XDrawPagesSupplier,
82 public css::sheet::XGoalSeek,
83 public css::sheet::XConsolidatable,
84 public css::sheet::XDocumentAuditing,
85 public css::style::XStyleFamiliesSupplier,
86 public css::view::XRenderable,
87 public css::document::XLinkTargetSupplier,
88 public css::beans::XPropertySet,
89 public SvxFmMSFactory,
90 public css::lang::XServiceInfo,
91 public css::util::XChangesNotifier,
92 public css::chart2::XDataProviderAccess,
93 public css::sheet::opencl::XOpenCLSelection
94{
95private:
98 std::unique_ptr<ScPrintFuncCache> pPrintFuncCache;
99 std::unique_ptr<ScPrintUIOptions> pPrinterOptions;
100 std::unique_ptr<ScPrintState> m_pPrintState;
101 css::uno::Reference<css::uno::XAggregation> xNumberAgg;
102 css::uno::Reference<css::uno::XInterface> xDrawGradTab;
103 css::uno::Reference<css::uno::XInterface> xDrawHatchTab;
104 css::uno::Reference<css::uno::XInterface> xDrawBitmapTab;
105 css::uno::Reference<css::uno::XInterface> xDrawTrGradTab;
106 css::uno::Reference<css::uno::XInterface> xDrawMarkerTab;
107 css::uno::Reference<css::uno::XInterface> xDrawDashTab;
108 css::uno::Reference<css::uno::XInterface> xChartDataProv;
109 css::uno::Reference<css::uno::XInterface> xObjProvider;
110
112
113 bool FillRenderMarkData( const css::uno::Any& aSelection,
114 const css::uno::Sequence< css::beans::PropertyValue >& rOptions,
115 ScMarkData& rMark, ScPrintSelectionStatus& rStatus, OUString& rPagesStr,
116 bool& rbRenderToGraphic ) const;
117 css::uno::Reference<css::uno::XAggregation> const & GetFormatter();
118 void HandleCalculateEvents();
119
120 css::uno::Reference<css::uno::XInterface> create(
121 OUString const & aServiceSpecifier,
122 css::uno::Sequence<css::uno::Any> const * arguments);
123
124 static bool IsOnEvenPage( sal_Int32 nPage ) { return nPage % 2 == 0; };
125
126 OUString maBuildId;
127 std::vector<sal_Int32> maValidPages;
128protected:
129 const SfxItemPropertySet& GetPropertySet() const { return aPropSet; }
130
132 virtual SdrModel& getSdrModelFromUnoModel() const override;
133
134public:
135 ScModelObj(ScDocShell* pDocSh);
136 virtual ~ScModelObj() override;
137
139 static void CreateAndSet(ScDocShell* pDocSh);
140
141 ScDocument* GetDocument() const;
142 SfxObjectShell* GetEmbeddedObject() const;
143
144 void UpdateAllRowHeights();
145
146 void BeforeXMLLoading();
147 void AfterXMLLoading();
148 ScSheetSaveData* GetSheetSaveData();
149 ScFormatSaveData* GetFormatSaveData();
150
151 void RepaintRange( const ScRange& rRange );
152 void RepaintRange( const ScRangeList& rRange );
153
154 bool HasChangesListeners() const;
155
156 void NotifyChanges( const OUString& rOperation, const ScRangeList& rRanges,
157 const css::uno::Sequence< css::beans::PropertyValue >& rProperties );
158
159 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
160 virtual void SAL_CALL acquire() noexcept override;
161 virtual void SAL_CALL release() noexcept override;
162
163 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
164
166 virtual css::uno::Reference< css::sheet::XSpreadsheets > SAL_CALL
167 getSheets() override;
168
170 virtual ::css::uno::Reference< css::chart2::data::XDataProvider > SAL_CALL
171 createDataProvider() override;
172
174 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
175 getStyleFamilies() override;
176
178 virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection,
179 const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) override;
180 virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL
181 getRenderer( sal_Int32 nRenderer, const css::uno::Any& aSelection,
182 const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) override;
183 virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection,
184 const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) override;
185
187 virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL
188 getLinks() override;
189
191 virtual sal_Bool SAL_CALL isActionLocked() override;
192 virtual void SAL_CALL addActionLock() override;
193 virtual void SAL_CALL removeActionLock() override;
194 virtual void SAL_CALL setActionLocks( sal_Int16 nLock ) override;
195 virtual sal_Int16 SAL_CALL resetActionLocks() override;
196
197 virtual void SAL_CALL lockControllers() override;
198 virtual void SAL_CALL unlockControllers() override;
199
201 virtual void SAL_CALL calculate() override;
202 virtual void SAL_CALL calculateAll() override;
203 virtual sal_Bool SAL_CALL isAutomaticCalculationEnabled() override;
204 virtual void SAL_CALL enableAutomaticCalculation( sal_Bool bEnabled ) override;
205
207 virtual void SAL_CALL protect( const OUString& aPassword ) override;
208 virtual void SAL_CALL unprotect( const OUString& aPassword ) override;
209 virtual sal_Bool SAL_CALL isProtected() override;
210
212 virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL
213 getDrawPages() override;
214
216 virtual css::sheet::GoalResult SAL_CALL seekGoal(
217 const css::table::CellAddress& aFormulaPosition,
218 const css::table::CellAddress& aVariablePosition,
219 const OUString& aGoalValue ) override;
220
222 virtual css::uno::Reference< css::sheet::XConsolidationDescriptor >
223 SAL_CALL createConsolidationDescriptor( sal_Bool bEmpty ) override;
224 virtual void SAL_CALL consolidate( const css::uno::Reference< css::sheet::XConsolidationDescriptor >& xDescriptor ) override;
225
227 virtual void SAL_CALL refreshArrows() override;
228
230 virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getViewData( ) override;
231
233 virtual css::uno::Reference< css::beans::XPropertySetInfo >
234 SAL_CALL getPropertySetInfo() override;
235 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
236 const css::uno::Any& aValue ) override;
237 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
238 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
239 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
240 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
241 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
242 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
243 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
244 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
245 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
246
248 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
249 createInstance( const OUString& aServiceSpecifier ) override;
250 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL
251 createInstanceWithArguments( const OUString& ServiceSpecifier,
252 const css::uno::Sequence< css::uno::Any >& Arguments ) override;
253 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
254
256 virtual OUString SAL_CALL getImplementationName() override;
257 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
258 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
259
261 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
262
263 static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
264
266 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
267 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
268
270 virtual void SAL_CALL addChangesListener( const css::uno::Reference< css::util::XChangesListener >& aListener ) override;
271 virtual void SAL_CALL removeChangesListener( const css::uno::Reference< css::util::XChangesListener >& aListener ) override;
272
273 // XOpenCLSelection
274 virtual sal_Bool SAL_CALL isOpenCLEnabled() override;
275
276 virtual void SAL_CALL enableOpenCL(sal_Bool bEnable) override;
277
278 virtual void SAL_CALL enableAutomaticDeviceSelection(sal_Bool bForce) override;
279
280 virtual void SAL_CALL disableAutomaticDeviceSelection() override;
281
282 virtual void SAL_CALL selectOpenCLDevice( sal_Int32 platform, sal_Int32 device ) override;
283
284 virtual sal_Int32 SAL_CALL getPlatformID() override;
285
286 virtual sal_Int32 SAL_CALL getDeviceID() override;
287
288 virtual css::uno::Sequence< css::sheet::opencl::OpenCLPlatform >
289 SAL_CALL getOpenCLPlatforms() override;
290
291 virtual void SAL_CALL enableOpcodeSubsetTest() override;
292
293 virtual void SAL_CALL disableOpcodeSubsetTest() override;
294
295 virtual sal_Bool SAL_CALL isOpcodeSubsetTested() override;
296
297 virtual void SAL_CALL setFormulaCellNumberLimit( sal_Int32 number ) override;
298
299 virtual sal_Int32 SAL_CALL getFormulaCellNumberLimit() override;
300
302 virtual void paintTile( VirtualDevice& rDevice,
303 int nOutputWidth,
304 int nOutputHeight,
305 int nTilePosX,
306 int nTilePosY,
307 tools::Long nTileWidth,
308 tools::Long nTileHeight ) override;
309
311 virtual Size getDocumentSize() override;
312
314 virtual Size getDataArea(long nPart) override;
315
317 virtual void setPart(int nPart, bool bAllowChangeFocus = true) override;
318
320 virtual int getPart() override;
321
323 virtual int getParts() override;
324
326 virtual OUString getPartInfo( int nPart ) override;
327
329 virtual OUString getPartName(int nPart) override;
330
332 virtual OUString getPartHash( int nPart ) override;
333
335 virtual VclPtr<vcl::Window> getDocWindow() override;
336
338 virtual void initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) override;
339
341 virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) override;
342
344 virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) override;
345
347 virtual void setTextSelection(int nType, int nX, int nY) override;
348
350 virtual css::uno::Reference<css::datatransfer::XTransferable> getSelection() override;
351
353 virtual void setGraphicSelection(int nType, int nX, int nY) override;
354
356 virtual void resetSelection() override;
357
359 virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
360
362 virtual bool isMimeTypeSupported() override;
363
365 virtual void setClientZoom(int nTilePixelWidth, int nTilePixelHeight, int nTileTwipWidth, int nTileTwipHeight) override;
366
368 virtual void setOutlineState(bool bColumn, int nLevel, int nIndex, bool bHidden) override;
369
371 virtual void getRowColumnHeaders(const tools::Rectangle& rRectangle, tools::JsonWriter& rJsonWriter) override;
372
374 virtual OString getSheetGeometryData(bool bColumns, bool bRows, bool bSizes, bool bHidden,
375 bool bFiltered, bool bGroups) override;
376
378 virtual void getCellCursor(tools::JsonWriter& rJsonWriter) override;
379
381 virtual PointerStyle getPointer() override;
382
384 void getTrackedChanges(tools::JsonWriter&) override;
385
387 virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) override;
388
390 void getPostIts(tools::JsonWriter& rJsonWriter) override;
391
393 void getPostItsPos(tools::JsonWriter& rJsonWriter) override;
394
396 virtual void completeFunction(const OUString& rFunctionName) override;
397};
398
399class ScDrawPagesObj final : public cppu::WeakImplHelper<
400 css::drawing::XDrawPages,
401 css::lang::XServiceInfo>,
402 public SfxListener
403{
404private:
406
407css::uno::Reference< css::drawing::XDrawPage >
408 GetObjectByIndex_Impl(sal_Int32 nIndex) const;
409
410public:
411 ScDrawPagesObj(ScDocShell* pDocSh);
412 virtual ~ScDrawPagesObj() override;
413
414 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
415
417 virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL
418 insertNewByIndex( sal_Int32 nIndex ) override;
419 virtual void SAL_CALL remove( const css::uno::Reference< css::drawing::XDrawPage >& xPage ) override;
420
422 virtual sal_Int32 SAL_CALL getCount() override;
423 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
424
426 virtual css::uno::Type SAL_CALL getElementType() override;
427 virtual sal_Bool SAL_CALL hasElements() override;
428
430 virtual OUString SAL_CALL getImplementationName() override;
431 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
432 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
433};
434
435class ScTableSheetsObj final : public cppu::WeakImplHelper<
436 css::sheet::XSpreadsheets2,
437 css::sheet::XCellRangesAccess,
438 css::container::XEnumerationAccess,
439 css::container::XIndexAccess,
440 css::lang::XServiceInfo>,
441 public SfxListener
442{
443private:
445
446 rtl::Reference<ScTableSheetObj> GetObjectByIndex_Impl(sal_Int32 nIndex) const;
447 rtl::Reference<ScTableSheetObj> GetObjectByName_Impl(const OUString& aName) const;
448
449public:
451 virtual ~ScTableSheetsObj() override;
452
453 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
454
456 virtual void SAL_CALL insertNewByName( const OUString& aName, sal_Int16 nPosition ) override;
457 virtual void SAL_CALL moveByName( const OUString& aName, sal_Int16 nDestination ) override;
458 virtual void SAL_CALL copyByName( const OUString& aName,
459 const OUString& aCopy, sal_Int16 nDestination ) override;
460
462 virtual sal_Int32 SAL_CALL importSheet(
463 const css::uno::Reference< css::sheet::XSpreadsheetDocument > & xDocSrc,
464 const OUString& srcName,
465 sal_Int32 nDestPosition) override;
466
468
469 virtual css::uno::Reference< css::table::XCell >
470 SAL_CALL getCellByPosition( sal_Int32 nColumn, sal_Int32 nRow, sal_Int32 nSheet ) override;
471
472 virtual css::uno::Reference< css::table::XCellRange >
473 SAL_CALL getCellRangeByPosition( sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom, sal_Int32 nSheet ) override;
474
475 virtual css::uno::Sequence < css::uno::Reference< css::table::XCellRange > >
476 SAL_CALL getCellRangesByName( const OUString& aRange ) override;
477
479 virtual void SAL_CALL insertByName( const OUString& aName,
480 const css::uno::Any& aElement ) override;
481 virtual void SAL_CALL removeByName( const OUString& Name ) override;
482
484 virtual void SAL_CALL replaceByName( const OUString& aName,
485 const css::uno::Any& aElement ) override;
486
488 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
489 createEnumeration() override;
490
492 virtual css::uno::Type SAL_CALL getElementType() override;
493 virtual sal_Bool SAL_CALL hasElements() override;
494
496 virtual sal_Int32 SAL_CALL getCount() override;
497 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
498
500 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
501 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
502 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
503
505 virtual OUString SAL_CALL getImplementationName() override;
506 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
507 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
508};
509
510class ScTableColumnsObj final : public cppu::WeakImplHelper<
511 css::table::XTableColumns,
512 css::container::XEnumerationAccess,
513 css::container::XNameAccess,
514 css::beans::XPropertySet,
515 css::lang::XServiceInfo>,
516 public SfxListener
517{
518private:
523
524 rtl::Reference<ScTableColumnObj> GetObjectByIndex_Impl(sal_Int32 nIndex) const;
525 rtl::Reference<ScTableColumnObj> GetObjectByName_Impl(std::u16string_view aName) const;
526
527public:
529 SCCOL nSC, SCCOL nEC);
530 virtual ~ScTableColumnsObj() override;
531
532 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
533
535 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
536 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
537
539 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
540 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
541 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
542
544 virtual sal_Int32 SAL_CALL getCount() override;
545 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
546
548 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
549 createEnumeration() override;
550
552 virtual css::uno::Type SAL_CALL getElementType() override;
553 virtual sal_Bool SAL_CALL hasElements() override;
554
556 virtual css::uno::Reference< css::beans::XPropertySetInfo >
557 SAL_CALL getPropertySetInfo() override;
558 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
559 const css::uno::Any& aValue ) override;
560 virtual css::uno::Any SAL_CALL getPropertyValue(
561 const OUString& PropertyName ) override;
562 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
563 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
564 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
565 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
566 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
567 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
568 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
569 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
570
572 virtual OUString SAL_CALL getImplementationName() override;
573 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
574 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
575};
576
577class ScTableRowsObj final : public cppu::WeakImplHelper<
578 css::table::XTableRows,
579 css::container::XEnumerationAccess,
580 css::beans::XPropertySet,
581 css::lang::XServiceInfo>,
582 public SfxListener
583{
584private:
589
590 rtl::Reference<ScTableRowObj> GetObjectByIndex_Impl(sal_Int32 nIndex) const;
591
592public:
593 ScTableRowsObj(ScDocShell* pDocSh, SCTAB nT,
594 SCROW nSR, SCROW nER);
595 virtual ~ScTableRowsObj() override;
596
597 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
598
600 virtual void SAL_CALL insertByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
601 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex, sal_Int32 nCount ) override;
602
604 virtual sal_Int32 SAL_CALL getCount() override;
605 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
606
608 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
609 createEnumeration() override;
610
612 virtual css::uno::Type SAL_CALL getElementType() override;
613 virtual sal_Bool SAL_CALL hasElements() override;
614
616 virtual css::uno::Reference< css::beans::XPropertySetInfo >
617 SAL_CALL getPropertySetInfo() override;
618 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
619 const css::uno::Any& aValue ) override;
620 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
621 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
622 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
623 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
624 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
625 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
626 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
627 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
628 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
629
631 virtual OUString SAL_CALL getImplementationName() override;
632 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
633 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
634};
635
636class ScSpreadsheetSettingsObj final : public cppu::WeakImplHelper<
637 css::beans::XPropertySet,
638 css::lang::XServiceInfo>,
639 public SfxListener
640{
641public:
642 virtual ~ScSpreadsheetSettingsObj() override;
643
645 virtual css::uno::Reference< css::beans::XPropertySetInfo >
646 SAL_CALL getPropertySetInfo() override;
647 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
648 const css::uno::Any& aValue ) override;
649 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
650 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
651 const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
652 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
653 const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
654 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
655 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
656 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
657 const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
658
660 virtual OUString SAL_CALL getImplementationName() override;
661 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
662 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
663};
664
665class SAL_DLLPUBLIC_RTTI ScAnnotationsObj final : public cppu::WeakImplHelper<
666 css::sheet::XSheetAnnotations,
667 css::container::XEnumerationAccess,
668 css::lang::XServiceInfo>,
669 public SfxListener
670{
671private:
674
675 bool GetAddressByIndex_Impl( sal_Int32 nIndex, ScAddress& rPos ) const;
676 rtl::Reference<ScAnnotationObj> GetObjectByIndex_Impl( sal_Int32 nIndex ) const;
677
678public:
679 ScAnnotationsObj(ScDocShell* pDocSh, SCTAB nT);
680 virtual ~ScAnnotationsObj() override;
681
682 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
683
684 ScDocShell* GetDocShell() const { return pDocShell; }
685
687 virtual void SAL_CALL insertNew( const css::table::CellAddress& aPosition,
688 const OUString& aText ) override;
689 virtual void SAL_CALL removeByIndex( sal_Int32 nIndex ) override;
690
692 virtual sal_Int32 SAL_CALL getCount() override;
693 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
694
696 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
697 createEnumeration() override;
698
700 virtual css::uno::Type SAL_CALL getElementType() override;
701 virtual sal_Bool SAL_CALL hasElements() override;
702
704 virtual OUString SAL_CALL getImplementationName() override;
705 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
706 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
707};
708
709class ScScenariosObj final : public cppu::WeakImplHelper<
710 css::sheet::XScenarios,
711 css::container::XEnumerationAccess,
712 css::container::XIndexAccess,
713 css::lang::XServiceInfo>,
714 public SfxListener
715{
716private:
719
720 bool GetScenarioIndex_Impl( std::u16string_view rName, SCTAB& rIndex );
721 rtl::Reference<ScTableSheetObj> GetObjectByIndex_Impl(sal_Int32 nIndex);
722 rtl::Reference<ScTableSheetObj> GetObjectByName_Impl(std::u16string_view aName);
723
724public:
725 ScScenariosObj(ScDocShell* pDocSh, SCTAB nT);
726 virtual ~ScScenariosObj() override;
727
728 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
729
731 virtual void SAL_CALL addNewByName( const OUString& aName,
732 const css::uno::Sequence< css::table::CellRangeAddress >& aRanges,
733 const OUString& aComment ) override;
734 virtual void SAL_CALL removeByName( const OUString& aName ) override;
735
737 virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override;
738 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
739 virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override;
740
742 virtual sal_Int32 SAL_CALL getCount() override;
743 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override;
744
746 virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL
747 createEnumeration() override;
748
750 virtual css::uno::Type SAL_CALL getElementType() override;
751 virtual sal_Bool SAL_CALL hasElements() override;
752
754 virtual OUString SAL_CALL getImplementationName() override;
755 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
756 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
757};
758
759/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SCTAB nTab
Collection belongs to the sheet.
Definition: docuno.hxx:673
ScDocShell * GetDocShell() const
Definition: docuno.hxx:684
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ScDocShell * pDocShell
Definition: docuno.hxx:672
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
ScDocShell * pDocShell
Definition: docuno.hxx:405
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
css::uno::Reference< css::uno::XInterface > xObjProvider
Definition: docuno.hxx:109
std::vector< sal_Int32 > maValidPages
Definition: docuno.hxx:127
std::unique_ptr< ScPrintFuncCache > pPrintFuncCache
Definition: docuno.hxx:98
std::unique_ptr< ScPrintUIOptions > pPrinterOptions
Definition: docuno.hxx:99
css::uno::Reference< css::uno::XInterface > xDrawDashTab
Definition: docuno.hxx:107
std::unique_ptr< ScPrintState > m_pPrintState
Definition: docuno.hxx:100
css::uno::Reference< css::uno::XInterface > xChartDataProv
Definition: docuno.hxx:108
const SfxItemPropertySet & GetPropertySet() const
Definition: docuno.hxx:129
ScDocShell * pDocShell
Definition: docuno.hxx:97
SfxItemPropertySet aPropSet
Definition: docuno.hxx:96
static bool IsOnEvenPage(sal_Int32 nPage)
Definition: docuno.hxx:124
css::uno::Reference< css::uno::XInterface > xDrawHatchTab
Definition: docuno.hxx:103
css::uno::Reference< css::uno::XAggregation > xNumberAgg
Definition: docuno.hxx:101
OUString maBuildId
Definition: docuno.hxx:124
css::uno::Reference< css::uno::XInterface > xDrawGradTab
Definition: docuno.hxx:102
css::uno::Reference< css::uno::XInterface > xDrawTrGradTab
Definition: docuno.hxx:105
css::uno::Reference< css::uno::XInterface > xDrawMarkerTab
Definition: docuno.hxx:106
::comphelper::OInterfaceContainerHelper3< css::util::XChangesListener > maChangesListeners
Definition: docuno.hxx:111
css::uno::Reference< css::uno::XInterface > xDrawBitmapTab
Definition: docuno.hxx:104
Stores the data for printing that is needed from several sheets, so it doesn't have to be calculated ...
Definition: pfuncache.hxx:85
Stores the selection in the ScPrintFuncCache so it is only used for the same selection again.
Definition: pfuncache.hxx:46
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
ScDocShell * pDocShell
Definition: docuno.hxx:717
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
ScDocShell * pDocShell
Definition: docuno.hxx:519
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
SCROW nEndRow
Definition: docuno.hxx:588
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SCROW nStartRow
Definition: docuno.hxx:587
ScDocShell * pDocShell
Definition: docuno.hxx:585
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ScDocShell * pDocShell
Definition: docuno.hxx:444
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo.
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
void Notify(SfxBroadcaster &aBC, const SfxHint &aHint) override
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual SdrModel & getSdrModelFromUnoModel() const=0
void Notify(ScModelObj &rModelObj, const ScRangeList &rChangeRanges, const OUString &rType=OUString("cell-change"), const css::uno::Sequence< css::beans::PropertyValue > &rProperties=css::uno::Sequence< css::beans::PropertyValue >())
Definition: docsh.hxx:497
OUStringBuffer & remove(OUStringBuffer &rIn, sal_Unicode c)
Type
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
VBAHELPER_DLLPUBLIC bool setPropertyValue(css::uno::Sequence< css::beans::PropertyValue > &aProp, const OUString &aName, const css::uno::Any &aValue)
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
long Long
PointerStyle
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
unsigned char sal_Bool
signed char sal_Int8
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17