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