LibreOffice Module sc (master)  1
document.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 <vcl/idle.hxx>
23 #include <vcl/errcode.hxx>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <vcl/vclptr.hxx>
26 #include "patattr.hxx"
27 #include "scdllapi.h"
28 #include "interpretercontext.hxx"
29 #include "rangelst.hxx"
30 #include "rangenam.hxx"
31 #include "tabopparams.hxx"
32 #include "types.hxx"
33 #include <formula/grammar.hxx>
34 #include <formula/types.hxx>
35 #include "typedstrdata.hxx"
36 #include "calcmacros.hxx"
37 #include "calcconfig.hxx"
38 #include "sheetlimits.hxx"
39 #include <o3tl/deleter.hxx>
40 #include <o3tl/sorted_vector.hxx>
41 #include <svl/hint.hxx>
42 #include <svl/typedwhich.hxx>
43 #include <svl/zforlist.hxx>
44 #include <tools/gen.hxx>
45 #include <tools/solar.h>
46 
47 #include <cassert>
48 #include <memory>
49 #include <map>
50 #include <mutex>
51 #include <optional>
52 #include <set>
53 #include <unordered_map>
54 #include <vector>
55 
56 #include "markdata.hxx"
57 #include "drwlayer.hxx"
58 
59 namespace com::sun::star::chart2 { class XChartDocument; }
60 
61 class Timer;
62 
63 enum class SvtScriptType;
64 enum class ScMF;
65 enum class FormulaError : sal_uInt16;
66 enum class CharCompressType;
67 enum class EEHorizontalTextDirection;
68 namespace editeng { class SvxBorderLine; }
69 namespace formula { struct VectorRefArray; }
70 namespace svl {
71 
72 class SharedString;
73 class SharedStringPool;
74 
75 }
76 
77 namespace sc {
78 
79 struct FormulaGroupContext;
80 class StartListeningContext;
81 class EndListeningContext;
82 class CopyFromClipContext;
83 class ColumnSpanSet;
84 class RangeColumnSpanSet;
85 struct ColumnBlockPosition;
86 struct RefUpdateContext;
87 class EditTextIterator;
88 struct NoteEntry;
89 class DocumentStreamAccess;
90 class DocumentLinkManager;
91 class CellValues;
92 class TableValues;
93 class RowHeightContext;
94 struct SetFormulaDirtyContext;
95 class RefMovedHint;
96 struct ReorderParam;
97 class FormulaGroupAreaListener;
98 class ColumnSet;
99 class UpdatedRangeNames;
100 class TableColumnBlockPositionSet;
101 class ColumnIterator;
102 class ExternalDataMapper;
103 
104 }
105 
106 class Fraction;
107 
108 class OutputDevice;
109 class SdrObject;
110 class SfxBroadcaster;
111 class SfxListener;
112 class SfxItemSet;
113 class SfxObjectShell;
114 class SfxBindings;
115 class SfxPoolItem;
116 class SfxItemPool;
117 class SfxPrinter;
118 class SfxStyleSheetBase;
119 class SvMemoryStream;
120 class SvxBoxInfoItem;
121 class SvxBoxItem;
123 namespace sfx2 {
124  class LinkManager;
125  }
126 class SvxSearchItem;
127 class XColorList;
128 
129 class ScAutoFormatData;
133 class ScClipOptions;
134 class ScColumn;
135 class ScConditionalFormat;
137 class ScDBCollection;
138 class ScDBData;
139 class ScDetOpData;
140 class ScDetOpList;
141 class ScDocOptions;
142 class ScDocProtection;
143 class ScDocumentPool;
144 class ScDrawLayer;
145 class ScExtDocOptions;
147 class ScFormulaCell;
148 class ScMacroManager;
149 class ScOutlineTable;
150 class ScPrintRangeSaver;
151 class ScStyleSheet;
152 class ScStyleSheetPool;
153 class ScTable;
154 class ScTableProtection;
155 class ScTokenArray;
156 class ScValidationData;
158 class ScViewOptions;
159 class ScChangeTrack;
161 class ScFieldEditEngine;
162 class ScNoteEditEngine;
163 class ScDPObject;
164 class ScDPCollection;
165 class ScMatrix;
166 class ScScriptTypeData;
167 class ScPoolHelper;
168 struct ScSortParam;
170 class ScUnoListenerCalls;
171 class ScUnoRefList;
172 class ScRecursionHelper;
173 struct RowInfo;
174 struct ScTableInfo;
175 struct ScTabOpParam;
176 class VirtualDevice;
177 class ScAutoNameCache;
179 class ScLookupCache;
180 struct ScLookupCacheMap;
181 class SfxUndoManager;
182 class ScFormulaParserPool;
183 struct ScClipParam;
184 class ScRowBreakIterator;
185 struct ScSetStringParam;
186 struct ScColWidthParam;
187 class ScSheetEvents;
188 class ScProgress;
189 class SvtListener;
190 class ScEditDataArray;
191 class EditTextObject;
192 struct ScRefCellValue;
193 class ScPostIt;
194 struct ScSubTotalParam;
195 struct ScQueryParam;
196 class ScHint;
197 class SvtBroadcaster;
198 enum class ScDBDataPortion;
199 enum class ScSheetEventId;
200 class BitmapEx;
201 class ScColumnsRange;
204 struct ScSheetLimits;
205 struct ScDataAreaExtras;
206 
207 namespace sc {
208 
209 typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
210 
211 }
212 
213 namespace com::sun::star {
214  namespace lang {
215  struct EventObject;
216  }
217  namespace i18n {
218  class XBreakIterator;
219  }
220  namespace util {
221  class XModifyListener;
222  }
223  namespace embed {
224  class XEmbeddedObject;
225  }
226  namespace script::vba {
227  class XVBAEventProcessor;
228  }
229  namespace sheet {
230  struct TablePageBreakData;
231  }
232 }
233 
234 namespace weld {
235 
236 class Window;
237 
238 }
239 
240 #define SC_DOC_NEW 0xFFFF
241 
242 #define SC_MACROCALL_ALLOWED 0
243 
244 #define SC_ASIANKERNING_INVALID 0xff
245 
247 {
252 };
253 
255 {
256  ALLSHOWN, // All comments captions are shown
257  ALLHIDDEN, // All comments captions are hidden
258  MIXED // There are comments in shown and hidden.
259 };
260 
262 {
263  GLOBAL, // A range name can be defined
264  SHEET // with two scope on Manage Names dialog.
265 };
266 
268 enum class SheetGeomType
269 {
270  SIZES, // Column widths or row heights.
271  HIDDEN, // Hidden columns/rows.
272  FILTERED, // Filtered columns/rows.
273  GROUPS // Grouping of columns/rows.
274 };
275 
276 struct ScDocStat
277 {
278  OUString aDocName;
282  sal_uInt16 nPageCount;
284  : nTableCount(0)
285  , nCellCount(0)
286  , nFormulaCount(0)
287  , nPageCount(0)
288  {
289  }
290 };
291 
292 // DDE link modes
297 
298 // During threaded calculation fields being mutated are kept in this struct
300 {
301  std::unique_ptr<ScRecursionHelper> xRecursionHelper; // information for recursive and iterative cell formulas
302  ScInterpreterContext* pContext = nullptr; // references the context passed around for easier access
303 };
304 
307 {
308  // Bit mask bits
309  CORE = 0x0001,
310 };
311 
312 typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
313 
315 {
316 friend class ScValueIterator;
320 friend class ScCellIterator;
321 friend class ScQueryCellIterator;
325 friend class ScDocAttrIterator;
327 friend class ScAttrRectIterator;
328 friend class ScDocShell;
331 friend class ScFormulaCell;
332 friend class ScTable;
333 friend class ScColumn;
334 friend struct ScRefCellValue;
335 friend class ScDocumentImport;
337 friend class sc::ColumnSpanSet;
339 friend class sc::EditTextIterator;
342 friend struct ScMutationGuard;
343 friend struct ScMutationDisable;
344 
345  typedef std::vector<ScTableUniquePtr> TableContainer;
346 
347 public:
348  enum class HardRecalcState
349  {
350  OFF,
351  TEMPORARY,
352  ETERNAL
353  };
354 
355 private:
357 
358  std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
359  std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
360 
361  std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
363 
365 
367  std::unique_ptr<ScFieldEditEngine> mpEditEngine; // uses pEditPool from xPoolHelper
368  std::unique_ptr<ScNoteEditEngine> mpNoteEngine; // uses pEditPool from xPoolHelper
372  std::unique_ptr<ScDrawLayer> mpDrawLayer; // SdrModel
374  std::unique_ptr<ScValidationDataList> pValidationList; // validity
375  SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
376  TableContainer maTabs;
378  std::vector<OUString> maTabNames; // for undo document, we need the information tab name <-> index
379  mutable std::unique_ptr<ScRangeName> pRangeName;
380  std::unique_ptr<ScDBCollection> pDBCollection;
381  std::unique_ptr<ScDPCollection> pDPCollection;
382  std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
383  std::unique_ptr<ScPatternAttr> pSelectionAttr; // Attributes of a block
384  ScFormulaCell* pFormulaTree; // formula tree (start)
385  ScFormulaCell* pEOFormulaTree; // formula tree (end), last cell
386  ScFormulaCell* pFormulaTrack; // BroadcastTrack (start)
387  ScFormulaCell* pEOFormulaTrack; // BroadcastTrack (end), last cell
388  std::unique_ptr<ScBroadcastAreaSlotMachine> pBASM; // BroadcastAreas
389  std::unique_ptr<ScChartListenerCollection> pChartListenerCollection;
390  std::unique_ptr<SvMemoryStream> pClipData;
391  std::unique_ptr<ScDetOpList> pDetOpList;
392  std::unique_ptr<ScChangeTrack> pChangeTrack;
393  std::unique_ptr<SfxBroadcaster> pUnoBroadcaster;
394  std::unique_ptr<ScUnoListenerCalls> pUnoListenerCalls;
395  std::unique_ptr<ScUnoRefList> pUnoRefUndoList;
396  std::unique_ptr<ScChangeViewSettings> pChangeViewSettings;
397  std::unique_ptr<ScScriptTypeData> pScriptTypeData;
398  std::unique_ptr<ScRefreshTimerControl> pRefreshTimerControl;
399  std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharacters;
400  std::unique_ptr<ScDBData> mpAnonymousDBData;
401  std::unique_ptr<sc::ExternalDataMapper> mpDataMapper;
402 
403  std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
404 
405  std::unique_ptr<ScDocProtection> pDocProtection;
406  std::unique_ptr<ScClipParam> mpClipParam;
407 
408  std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
409  std::unique_ptr<ScMacroManager> mpMacroMgr;
410 
411  // mutable for lazy construction
412  mutable std::unique_ptr< ScFormulaParserPool >
414 
415  OUString aDocName; // optional: name of document
416  OUString aDocCodeName; // optional: name of document (twice?)
417  OUString maFileURL; // file URL for copy & paste
420 
421  std::unique_ptr<ScViewOptions> pViewOptions; // view options
422  std::unique_ptr<ScDocOptions> pDocOptions; // document options
423  std::unique_ptr<ScExtDocOptions> pExtDocOptions; // for import etc.
424  std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options
425  std::unique_ptr<ScConsolidateParam> pConsolidateDlgData;
426 
427  std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
428 
429  std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
432  sal_Int64 nUnoObjectId; // counted up for UNO objects
433 
434  ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
435 
438 
440 
441  css::uno::Reference< css::script::vba::XVBAEventProcessor >
443 public:
445  std::vector<ScInterpreterTableOpParams*> m_TableOpList;
447 
448 private:
449 
450  LanguageType eLanguage; // default language
451  LanguageType eCjkLanguage; // default language for asian text
452  LanguageType eCtlLanguage; // default language for complex text
453  rtl_TextEncoding eSrcSet; // during reading: source character set
454 
458 
459  sal_uLong nFormulaCodeInTree; // formula RPN in the formula tree
460  sal_uLong nXMLImportedFormulaCount; // progress count during XML import
461  sal_uInt16 nInterpretLevel; // >0 if in interpreter
462  sal_uInt16 nMacroInterpretLevel; // >0 if macro in interpreter
463  sal_uInt16 nInterpreterTableOpLevel; // >0 if in interpreter TableOp
464 
466 
467  // There can be only one ScDocument being calculated in a thread at a time, so we can use a
468  // plain thread_local static member.
470 
472 
473  std::mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
474 
475  static const sal_uInt16 nSrcVer; // file version (load/save)
476  sal_uInt16 nFormulaTrackCount;
477  HardRecalcState eHardRecalcState; // off, temporary, eternal
478  SCTAB nVisibleTab; // for OLE etc., don't use inside ScDocument
479  SCCOL nPosLeft; // for OLE etc., don't use inside ScDocument
480  SCROW nPosTop; // for OLE etc., don't use inside ScDocument
481 
483 
484  bool bAutoCalc; // calculate automatically
485  bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled
486  // are there ForcedFormulas which have to be calculated
487  // in interaction with ScDocShell SetDocumentModified,
488  // AutoCalcShellDisabled and TrackFormulas
491  bool bIsClip;
492  bool bIsUndo;
494  bool bIsVisible; // set from view ctor
495 
496  bool bIsEmbedded; // display/adjust Embedded area?
497 
498  // no broadcast, construct no listener during insert from a different
499  // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
502  bool bImportingXML; // special handling of formula text
503  bool bCalcingAfterLoad; // in CalcAfterLoad TRUE
504  // don't construct/destruct listeners temporarily
507  bool bInLinkUpdate; // TableLink or AreaLink
509  // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
511  // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
513  // expand reference if insert column/row takes place at the border
514  // of a reference
515  // is fetched in each UpdateReference from InputOptions,
516  // assigned, and restored at the end of UpdateReference
518  // for detective update, is set for each change of a formula
520  // If the pointer is set, formula cells will not be automatically grouped into shared formula groups,
521  // instead the range will be extended to contain all such cells.
522  std::unique_ptr< ScRange > pDelayedFormulaGrouping;
523  // If non-empty, ScColumn::StartListeningFormulaCells() calls may be delayed using this,
524  // avoiding repeated calling for the same cells in the given range. The function will be called once
525  // later for all the cells in the range.
526  std::unordered_map< ScColumn*, std::pair<SCROW, SCROW>> pDelayedStartListeningFormulaCells;
527 
528  bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
529 
532 
534 
535  sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
536 
539  sal_uInt32 nAdjustHeightLock;
541 
543 
546  bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
548  bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
549 
551 
552  std::set<ScFormulaCell*> maSubTotalCells;
553 
554 
555  bool mbEmbedFonts : 1;
560 
562 
563  std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
564 
567  // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
569 
571 
572 public:
573  bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
574  void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
575 
576  bool IsEmbedFonts() const { return mbEmbedFonts; }
581 
582  void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
583  void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
587 
588  void SetImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = nValue; }
590 
591  SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
592  SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
593  sal_uLong GetCodeCount() const; // RPN-Code in formulas
594  DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
595  // number formatter
596 public:
598  SfxObjectShell* pDocShell = nullptr );
600 
601  void SetName( const OUString& r ) { aDocName = r; }
602  const OUString& GetCodeName() const { return aDocCodeName; }
603  void SetCodeName( const OUString& r ) { aDocCodeName = r; }
604  const OUString& GetFileURL() const { return maFileURL; }
605 
606  void GetDocStat( ScDocStat& rDocStat );
607 
608  SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
609 
611  {
613  return maInterpreterContext;
614  }
615  // Uses thread_local.
617  {
618  return IsThreadedGroupCalcInProgress() ? *maThreadSpecific.pContext : GetNonThreadedContext();
619  }
620  void SetupContextFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
621  void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
624 
627 
630 
631  SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
632  SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
634  SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
635  void SetPrintOptions();
636 
637  ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions.get(); }
638  SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
639 
640  ScClipOptions* GetClipOptions() { return mpClipOptions.get(); }
641  void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
642 
643  SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
644  void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
645 
646  void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
647  const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData.get(); }
648 
649  void Clear( bool bFromDestructor = false );
650 
651  std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
652  void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
653 
659  SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap);
660  SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
663  void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
664  void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
665  bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
666 
674  ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
675 
720  SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
721  SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
722  bool bSameDoc, int nRecursion ) const;
723 
764  bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
765  const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
766  const bool bUsedByFormula ) const;
767 
771  SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap );
778 
789  bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
790 
802  bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
803 
809 
810  SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
811 
812  ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
813  ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
816 
819 
820  SC_DLLPUBLIC ScDBCollection* GetDBCollection() const { return pDBCollection.get();}
821  void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
822  bool bRemoveAutoFilter = false );
823  const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
824  ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
825  SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
826  SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
829 
830  SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString& rName,
831  bool* pSheetLocal = nullptr ) const;
832 
833  SC_DLLPUBLIC bool HasPivotTable() const;
836  SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
837  ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
838 
839  void StopTemporaryChartLock();
840 
841  void EnsureGraphicNames();
842 
843  SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
844  bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
845 
846  css::uno::Reference< css::chart2::XChartDocument > GetChartByName( std::u16string_view rChartName );
847 
848  SC_DLLPUBLIC void GetChartRanges( std::u16string_view rChartName, std::vector< ScRangeList >& rRanges, const ScDocument& rSheetNameDoc );
849  void SetChartRanges( std::u16string_view rChartName, const std::vector< ScRangeList >& rRanges );
850 
851  void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
852  bool bColHeaders, bool bRowHeaders, bool bAdd );
853  void UpdateChartArea( const OUString& rChartName,
854  const ScRangeListRef& rNewList,
855  bool bColHeaders, bool bRowHeaders, bool bAdd );
856  void GetOldChartParameters( std::u16string_view rName,
857  ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
858  css::uno::Reference<
859  css::embed::XEmbeddedObject >
860  FindOleObjectByName( std::u16string_view rName );
861 
862  SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
863 
864  SCTAB GetVisibleTab() const { return nVisibleTab; }
865  SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
866  SCCOL GetPosLeft() const { return nPosLeft; }
867  SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
868  SCROW GetPosTop() const { return nPosTop; }
869  SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
870 
871  SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
872  SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
873  SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
874  SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
875  SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
876  SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
877  SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
878  SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
880  [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
881  [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
882  [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
883  [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
884  [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
885  [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
886  [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
887  [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
888 
889  SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
890 
891  OUString GetCopyTabName(SCTAB nTab) const;
892 
893  SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
895 
900  SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
902 
905 
907  SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
908  SC_DLLPUBLIC bool IsDocProtected() const;
909  bool IsDocEditable() const;
910  SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
912  SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
913  void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
914 
915  void LockTable(SCTAB nTab);
916  void UnlockTable(SCTAB nTab);
917 
918  bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
919  SCCOL nEndCol, SCROW nEndRow,
920  bool* pOnlyNotBecauseOfMatrix = nullptr,
921  bool bNoMatrixAtAll = false ) const;
922  bool IsSelectionEditable( const ScMarkData& rMark,
923  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
924  bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
925  SCCOL nEndCol, SCROW nEndRow,
926  const ScMarkData& rMark ) const;
927 
928  bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
929  bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
930 
931  SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
932 
933  bool IsEmbedded() const { return bIsEmbedded;}
934  void GetEmbedded( ScRange& rRange ) const;
935  void SetEmbedded( const ScRange& rRange );
936  void ResetEmbedded();
937  tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
938  void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
939 
940  static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
941 
942  SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
943  SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
944  SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
945 
946  void AppendTabOnLoad(const OUString& rName);
947  void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
948  void InvalidateStreamOnSave();
949 
950  SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
951  bool bExternalDocument = false, bool bUndoDeleteTab = false );
952 
953  SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
954  bool bNamesValid = false );
955  SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
956  SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
957  SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
958  bool bExternalDocument = false );
959  bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
960  bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
961  const ScMarkData* pOnlyMarked = nullptr );
962  SC_DLLPUBLIC sal_uLong TransferTab(ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
963  bool bInsertNew = true,
964  bool bResultsOnly = false );
965  SC_DLLPUBLIC void TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
966  SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
967  SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
968  bool IsStreamValid( SCTAB nTab ) const;
969  void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
970  void LockStreamValid( bool bLock );
971  bool IsStreamValidLocked() const { return mbStreamValidLocked; }
972  bool IsPendingRowHeights( SCTAB nTab ) const;
973  void SetPendingRowHeights( SCTAB nTab, bool bSet );
974  SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
975  SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
976  SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
977  SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
978  SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
979  SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
980  Color& rColor, ScScenarioFlags &rFlags) const;
981  SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
982  const Color& rColor, ScScenarioFlags nFlags);
983  SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
984  SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
985  SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
986  void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
987  SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
988  SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
993  bool IsLinked( SCTAB nTab ) const;
994  SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
995  OUString GetLinkFlt( SCTAB nTab ) const;
996  OUString GetLinkOpt( SCTAB nTab ) const;
997  SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
998  sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
999  void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
1000  const OUString& rFilter, const OUString& rOptions,
1001  const OUString& rTabName, sal_uLong nRefreshDelay );
1002  bool HasLink( std::u16string_view rDoc,
1003  std::u16string_view rFilter, std::u16string_view rOptions ) const;
1004  SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
1005  const OUString& aFileName,
1006  const OUString& aTabName );
1007 
1008  bool HasExternalRefManager() const { return bool(pExternalRefMgr); }
1010  bool IsInExternalReferenceMarking() const;
1012  bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1013 
1017 
1018  bool HasAreaLinks() const;
1020  void UpdateAreaLinks();
1021 
1022  // originating DDE links
1023  void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; }
1024  void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
1025  bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1026 
1027  SC_DLLPUBLIC void CopyDdeLinks( ScDocument& rDestDoc ) const;
1028 
1032  SC_DLLPUBLIC bool FindDdeLink( std::u16string_view rAppl, std::u16string_view rTopic,
1033  std::u16string_view rItem, sal_uInt8 nMode, size_t& rnDdePos );
1034 
1041  bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1046  bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1050  SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1051 
1055  SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1060  bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1061 
1064  SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer.get(); }
1065  SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1066  SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1067  void BeginDrawUndo();
1068 
1069  void BeginUnoRefUndo();
1070  bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1071  [[nodiscard]]
1072  std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1073  sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1074  void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1075 
1076  static bool IsChart( const SdrObject* pObject );
1077 
1078  void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1079  SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1080  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1081  SCCOL nDx, SCROW nDy, SCTAB nDz );
1083  void SetChartRangeList( std::u16string_view rChartName,
1084  const ScRangeListRef& rNewRangeListRef );
1085 
1086  void StartAnimations( SCTAB nTab );
1087 
1088  bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1089  bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1090 
1091  const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1092  void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1093  bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1094  bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1095 
1096  bool HasAnyCalcNotification() const;
1097  bool HasCalcNotification( SCTAB nTab ) const;
1098  void SetCalcNotification( SCTAB nTab );
1099  void ResetCalcNotifications();
1100 
1101  SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1102  bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1103 
1104  void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1105  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1106 
1107  bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1108  void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1109  bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1110  bool HasSubTotalCells( const ScRange& rRange );
1111 
1112  SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1113 
1114  // return TRUE = number format is set
1115  SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1116  const ScSetStringParam * pParam = nullptr );
1117  SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1118  const ScSetStringParam* pParam = nullptr );
1119 
1129  SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1130  void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1131  SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1132  SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1133 
1138  SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1139  void SetEmptyCell( const ScAddress& rPos );
1140  SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1141  SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1142  void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1143  void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1144  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1145  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1147 
1157  bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1158 
1162  bool HasFormulaCell( const ScRange& rRange ) const;
1163  SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1164  SCCOL nCol2, SCROW nRow2,
1165  const ScMarkData& rMark,
1166  const OUString& rFormula,
1167  const ScTokenArray* p = nullptr,
1169  SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1170  SCCOL nCol1, SCROW nRow1,
1171  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1172 
1173  SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1174  const ScInterpreterContext* pContext = nullptr ) const;
1175  SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1176  const ScInterpreterContext* pContext = nullptr ) const;
1177 
1186  SC_DLLPUBLIC double* GetValueCell( const ScAddress& rPos );
1187 
1190 
1191  svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1192 
1193  std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1196  { mbFormulaGroupCxtBlockDiscard = block; }
1197 
1198  // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
1199  SC_DLLPUBLIC OUString GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1200  const svl::SharedString** pShared = nullptr ) const;
1201  FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1202  SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1203  SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1204  SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1205  void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1206  SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1207  SC_DLLPUBLIC sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1208  sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1209  SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1210  void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1211 
1212  void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1213  SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1215  SC_DLLPUBLIC OUString GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1216  SC_DLLPUBLIC CellType GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1217  SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1218 
1219  SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1220  SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1221  SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1222  SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1223  bool HasStringCells( const ScRange& rRange ) const;
1224 
1226  bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1227  bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1228 
1235  sc::MultiDataCellState HasMultipleDataCells( const ScRange& rRange ) const;
1236 
1238  SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1239  SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1240  void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1241  void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1242  SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1243  bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1244  bool HasNote(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const;
1245  SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1246  SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1247  bool HasNotes() const;
1248  SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1250  SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos);
1251  size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1252 
1257  void CreateAllNoteCaptions();
1258  void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1260 
1261  ScAddress GetNotePosition( size_t nIndex ) const;
1262  ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1263  SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1264 
1265  SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1266  SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1267  void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1268  bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1269 
1270  SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab);
1271 
1272  bool IsMerged( const ScAddress& rPos ) const;
1273 
1274  void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1275  SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1276  bool bRefresh = false );
1277  SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1278  SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1279  bool bRefresh = false );
1280  bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1281  SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1282  SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1283  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1284  SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1285 
1286  bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1287  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1288 
1289  SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1290  SCCOL nEndCol, SCROW nEndRow );
1291  SC_DLLPUBLIC void DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1292  SCCOL nEndCol, SCROW nEndRow );
1293  // without checking:
1294  SC_DLLPUBLIC void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1295  SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true );
1296  void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1297 
1298  bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1299  SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const;
1300  bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1301  SCCOL nEndCol, SCROW nEndRow,
1302  bool bLeftIsEmpty = false,
1303  ScRange* pLastRange = nullptr,
1304  tools::Rectangle* pLastMM = nullptr ) const;
1305 
1306  void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1307  bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1308  bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1309 
1310  SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1311  SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1312  SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1313 
1314  SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1315  const ::editeng::SvxBorderLine** ppLeft,
1316  const ::editeng::SvxBorderLine** ppTop,
1317  const ::editeng::SvxBorderLine** ppRight,
1318  const ::editeng::SvxBorderLine** ppBottom ) const;
1319 
1320  void ResetChanged( const ScRange& rRange );
1321 
1322  void CheckVectorizationState();
1323  void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
1324  void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1325  void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1326  void InterpretDirtyCells( const ScRangeList& rRanges );
1327  SC_DLLPUBLIC void CalcAll();
1328  SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1329  void CompileAll();
1330  void CompileXML();
1331 
1342  bool CompileErrorCells(FormulaError nErrCode);
1343 
1344  ScAutoNameCache* GetAutoNameCache() { return pAutoNameCache.get(); }
1345  void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1346  SfxItemSet* GetPreviewFont() { return pPreviewFont.get(); }
1347  SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1349  void SetPreviewSelection( const ScMarkData& rSel );
1351  ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1352  void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; }
1353  SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1354 
1357  ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1360  void RemoveLookupCache( ScLookupCache & rCache );
1362  void ClearLookupCaches();
1363 
1364  // calculate automatically
1365  SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1366  SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1367  // calculate automatically in/from/for ScDocShell disabled
1368  void SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; }
1370  // ForcedFormulas are to be calculated
1371  void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
1373  // if CalcFormulaTree() is currently running
1377  void DelayFormulaGrouping( bool delay );
1378  bool IsDelayedFormulaGrouping() const { return bool(pDelayedFormulaGrouping); }
1380  void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1384  void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1385  bool IsEnabledDelayStartListeningFormulaCells( ScColumn* column ) const;
1388  bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1389 
1390  FormulaError GetErrCode( const ScAddress& ) const;
1391 
1404  bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1405 
1425  bool ShrinkToUsedDataArea( bool& o_bShrunk,
1426  SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1427  SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1428  bool bStickyTopRow = false, bool bStickyLeftCol = false,
1429  ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
1430 
1441  SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1442 
1456  SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1457  SCCOL& rEndCol, SCROW& rEndRow,
1458  bool bIncludeOld, bool bOnlyDown ) const;
1459 
1467  bool GetDataAreaSubrange(ScRange& rRange) const;
1468 
1469  SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1470  SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1471  bool bCalcHiddens = false) const;
1472  SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1473  bool bNotes = true) const;
1474  SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1475  SCCOL& rEndCol ) const;
1476  SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1477  SCROW& rEndRow, bool bNotes ) const;
1478  void InvalidateTableArea();
1479 
1481  SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1482 
1483  SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1484 
1490  void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1491  SCCOL nStartCol, SCROW nStartRow,
1492  SCCOL& rEndCol, SCROW nEndRow ) const;
1493  SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1494  SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1495  ScDirection eDir );
1496 
1497  void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1498  SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1499  bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1500  SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1501 
1502  bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1503  const ScMarkData& rMark );
1504 
1505  void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1506  SCCOL& rEndCol, SCROW& rEndRow );
1507  void LimitChartIfAll( ScRangeListRef& rRangeList );
1508 
1509  bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1510  SCCOL nEndCol, SCTAB nEndTab,
1511  SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1512  const ScMarkData* pTabMark = nullptr );
1513  SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1514  void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1515  SCCOL nEndCol, SCTAB nEndTab,
1516  SCROW nStartRow, SCSIZE nSize,
1517  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1518  const ScMarkData* pTabMark = nullptr );
1519  SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1520  bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1521  SCROW nEndRow, SCTAB nEndTab,
1522  SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1523  const ScMarkData* pTabMark = nullptr );
1524  SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1525  void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1526  SCROW nEndRow, SCTAB nEndTab,
1527  SCCOL nStartCol, SCSIZE nSize,
1528  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1529  const ScMarkData* pTabMark = nullptr );
1530  void DeleteCol( const ScRange& rRange );
1531 
1532  bool CanInsertRow( const ScRange& rRange ) const;
1533  bool CanInsertCol( const ScRange& rRange ) const;
1534 
1535  void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1536  bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1537 
1538  bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1539  bool IsUndo() const { return bIsUndo; }
1540  bool IsClipboard() const { return bIsClip; }
1541  bool IsUndoEnabled() const { return mbUndoEnabled; }
1542  SC_DLLPUBLIC void EnableUndo( bool bVal );
1543  bool IsFunctionAccess() const { return bIsFunctionAccess; }
1544 
1545  bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1549  void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1551  void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1553  SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1555  void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
1556  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1557  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1558  void SetCutMode( bool bCut );
1559  bool IsCutMode();
1560  void SetClipArea( const ScRange& rArea, bool bCut = false );
1561 
1562  SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1563  SC_DLLPUBLIC void SetDocVisible( bool bSet );
1564 
1565  bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1566 
1567  void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1568  const ScMarkData& rMark, bool bAnchored = false );
1569  void DeleteObjectsInSelection( const ScMarkData& rMark );
1570 
1571  SC_DLLPUBLIC void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1572  InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1573  sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1574 
1575  SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1576  SCTAB nTab, InsertDeleteFlags nDelFlag);
1577  void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1578 
1579  SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1580  const ScMarkData* pMarks, bool bKeepScenarioFlags,
1581  bool bIncludeObjects );
1582 
1592  SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1593 
1601  void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1602 
1603  void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1604  SCTAB nTab, ScDocument* pClipDoc);
1605 
1607 
1609  sc::ColumnSpanSet& rBroadcastSpans );
1610 
1612  SCCOL nCol2, SCROW nRow2 );
1613  void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1614  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1615  SCCOL nDx, SCROW nDy );
1620  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, SCCOL nDx,
1621  SCROW& rClipStartRow, SCROW nClipEndRow);
1622 
1623  void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1624  SCCOL nCol2, SCROW nRow2,
1625  const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1626 
1627  void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1628  const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1629  sc::ColumnSpanSet& rBroadcastSpans );
1630 
1633  SC_DLLPUBLIC void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
1634  InsertDeleteFlags nInsFlag,
1635  ScDocument* pRefUndoDoc,
1636  ScDocument* pClipDoc,
1637  bool bResetCut = true,
1638  bool bAsLink = false,
1639  bool bIncludeFiltered = true,
1640  bool bSkipAttrForEmpty = false,
1641  const ScRangeList * pDestRanges = nullptr );
1642 
1643  void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1644  InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1645  bool bResetCut = true, bool bAsLink = false,
1646  bool bIncludeFiltered = true,
1647  bool bSkipAttrForEmpty = false);
1648 
1649  void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1650  void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1651 
1652  bool HasClipFilteredRows();
1653 
1654  bool IsClipboardSource() const;
1655 
1656  SC_DLLPUBLIC void TransposeClip(ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink,
1657  bool bIncludeFiltered);
1658 
1660  void SetClipParam(const ScClipParam& rParam);
1661 
1667  void ClosingClipboardSource();
1668 
1669  void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1670  ScDocument& rSrcDoc );
1671 
1672  void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1673  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1674  bool bSkipEmpty, bool bAsLink );
1675  void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1676  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1677  bool bSkipEmpty, bool bAsLink );
1678 
1679  void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1680 
1681  SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1682  bool bColInfo = false, bool bRowInfo = false );
1683  void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1684  bool bColInfo = false, bool bRowInfo = false );
1685  SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1686  bool bColInfo = false, bool bRowInfo = false );
1687 
1688  // don't use anymore:
1689  void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1690  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1691  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1692  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1693  void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1694  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1695  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1696 
1697  SC_DLLPUBLIC void CopyToDocument(const ScRange& rRange,
1698  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1699  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1700  void UndoToDocument(const ScRange& rRange,
1701  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1702 
1703  void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1704  bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1705  void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1706  ScMarkData& rDestMark, bool bResetMark = true,
1707  ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1708  bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1709  SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1710 
1711  SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1712 
1714  pUndoDoc = nullptr, bool bIncludeDraw = true,
1715  bool bUpdateNoteCaptionPos = true );
1720  SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1721  const ScMarkData& rMark, ScDocument* pUndoDoc );
1722 
1723  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1724 
1725  SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1726  ScProgress* pProgress, const ScMarkData& rMark,
1727  sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1728  FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1729  double nStepValue = 1.0, double nMaxValue = 1E307 );
1730  OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1731 
1733  const ScAddress& rCursor, const ScMarkData& rMark,
1734  double& rResult );
1735 
1736  SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1737  template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1738  {
1739  return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1740  }
1741  SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1742  template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1743  {
1744  return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1745  }
1746  SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1747  SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1748  SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1749  const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1750  std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1751  SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1752  void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1753 
1754  SC_DLLPUBLIC ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1755  // pCell is an optimization, must point to rPos
1756  SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1757  ScRefCellValue* pCell = nullptr ) const;
1758  const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1759  const ScConditionalFormatList& rList,
1760  const ScCondFormatIndexes& rIndex ) const;
1761  const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1762  template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1763  {
1764  return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1765  }
1766 
1767  SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1768  bool HasStringWeakCharacters( const OUString& rString );
1769  SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1770  // pCell is an optimization, must point to rPos
1771  SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1772  const ScRefCellValue* pCell = nullptr );
1773  // pCell is an optimization, must point to nCol,nRow,nTab
1775  const ScRefCellValue* pCell = nullptr );
1776  SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1777  SvtScriptType GetRangeScriptType( const ScRangeList& rRanges );
1778 
1779  bool HasDetectiveOperations() const;
1780  void AddDetectiveOperation( const ScDetOpData& rData );
1781  void ClearDetectiveOperations();
1782  ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1783  void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1784 
1785  bool HasDetectiveObjects(SCTAB nTab) const;
1786 
1787  void GetSelectionFrame( const ScMarkData& rMark,
1788  SvxBoxItem& rLineOuter,
1789  SvxBoxInfoItem& rLineInner );
1790  void ApplySelectionFrame(const ScMarkData& rMark,
1791  const SvxBoxItem& rLineOuter,
1792  const SvxBoxInfoItem* pLineInner);
1793  void ApplyFrameAreaTab(const ScRange& rRange,
1794  const SvxBoxItem& rLineOuter,
1795  const SvxBoxInfoItem& rLineInner);
1796 
1797  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1798  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1799 
1800  SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1801  void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1802 
1803  void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1806 
1808 
1809  const ScValidationDataList* GetValidationList() const { return pValidationList.get();}
1810  ScValidationDataList* GetValidationList() { return pValidationList.get();}
1811 
1812  SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1813  const SfxPoolItem& rAttr );
1814  SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1815  const ScPatternAttr& rAttr );
1816  SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1817  SCCOL nEndCol, SCROW nEndRow,
1818  const ScMarkData& rMark, const ScPatternAttr& rAttr,
1819  ScEditDataArray* pDataArray = nullptr,
1820  bool* const pIsChanged = nullptr );
1821  SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1822  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1823  const ScPatternAttr& rAttr );
1824 
1826  const ScMarkData& rMark,
1827  const ScPatternAttr& rPattern,
1828  SvNumFormatType nNewType );
1829 
1830  void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1831  const ScStyleSheet& rStyle);
1832  void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1833  SCCOL nEndCol, SCROW nEndRow,
1834  const ScMarkData& rMark, const ScStyleSheet& rStyle);
1835  SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1836  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1837  const ScStyleSheet& rStyle);
1838 
1839  SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1840  void ApplySelectionLineStyle( const ScMarkData& rMark,
1841  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1842 
1843  const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1844  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1845 
1846  void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1847  OutputDevice* pDev,
1848  double nPPTX, double nPPTY,
1849  const Fraction& rZoomX, const Fraction& rZoomY );
1850 
1851  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1852 
1853  SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1854  SCCOL nEndCol, SCROW nEndRow,
1855  SCTAB nTab, ScMF nFlags );
1856  SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1857  SCCOL nEndCol, SCROW nEndRow,
1858  SCTAB nTab, ScMF nFlags );
1859 
1860  SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1861  SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> );
1862  SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1863 
1864  void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1865  sal_uInt16 nFormatNo, const ScMarkData& rMark );
1866  void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1867  ScAutoFormatData& rData );
1868  bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1869  SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1870  const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1871  OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
1872  static bool IsEmptyCellSearch( const SvxSearchItem& rSearchItem );
1873 
1874  // determine Col/Row of subsequent calls
1875  // (e.g. not found from the beginning, or subsequent tables)
1876  // meaning of explanation in "()" was already unclear in German
1877  void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1878  SCCOL& rCol, SCROW& rRow );
1879 
1880  bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1881  SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1882  const OUString& sValStr, double& nX);
1883 
1884  SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1885  ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1886  SC_DLLPUBLIC void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1887  void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1888 
1889  SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1890  SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1891  SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1892  SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1893  sal_uInt16 nNewHeight );
1894 
1895  SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1896  sal_uInt16 nNewHeight );
1897  SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1898 
1899  SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1900  SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1901  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1902  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const;
1903  SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1904 
1910  SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
1911  sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
1912  SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1913  SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1914 
1915  SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1916  SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1917 
1918  sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1919 
1920  SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1921 
1922  sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1923  double nPPTX, double nPPTY,
1924  const Fraction& rZoomX, const Fraction& rZoomY,
1925  bool bFormula,
1926  const ScMarkData* pMarkData = nullptr,
1927  const ScColWidthParam* pParam = nullptr );
1928 
1930  SCROW nEndRow, SCTAB nTab, bool bApi );
1931 
1932  void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
1933 
1934  tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
1935  OutputDevice* pDev,
1936  double nPPTX, double nPPTY,
1937  const Fraction& rZoomX, const Fraction& rZoomY,
1938  bool bWidth, bool bTotalSize = false,
1939  bool bInPrintTwips = false );
1940 
1941  SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
1942  SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
1943  SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
1944  SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
1945  SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
1946 
1947  SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
1948  SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
1949 
1950  SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1951  SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1952  SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const;
1953  SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const;
1954  SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1955  SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1956  void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1957  void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1958  css::uno::Sequence<
1959  css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
1960 
1961  SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1962  SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1963  SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
1964  SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
1965  SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
1966  SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1967  SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1968  SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1969 
1970  SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1971  bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1972  bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
1973  SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
1974  SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1975  SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1976  SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1977 
1978  SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
1979 
1980  bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
1981 
1987  void SyncColRowFlags();
1988 
1990  SC_DLLPUBLIC SCROW GetLastFlaggedRow( SCTAB nTab ) const;
1991 
1993  SCCOL GetLastChangedCol( SCTAB nTab ) const;
1995  SCROW GetLastChangedRow( SCTAB nTab ) const;
1996 
1997  SCCOL GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const;
1998 
1999  SCROW GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart) const;
2000 
2001  // returns whether to export a Default style for this col or not
2002  // nDefault is set to one position in the current row where the Default style is
2003  void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
2004 
2005  bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
2006  bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
2007 
2008  void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2009  void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2010 
2014  void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
2015 
2016  // PageStyle:
2017  SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
2018  SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
2019  Size GetPageSize( SCTAB nTab ) const;
2020  void SetPageSize( SCTAB nTab, const Size& rSize );
2021  void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2022  void InvalidatePageBreaks(SCTAB nTab);
2023  void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2024  void RemoveManualBreaks( SCTAB nTab );
2025  bool HasManualBreaks( SCTAB nTab ) const;
2026 
2027  bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2028  bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2029  bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2030  void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2031  const SfxItemSet& rChanges );
2032 
2033  void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2034 
2035  SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2036 
2037  // Was stored in PageStyle previously. Now it exists for every table:
2038  SC_DLLPUBLIC bool HasPrintRange();
2039  SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2040  SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2044  bool IsPrintEntireSheet( SCTAB nTab ) const;
2045 
2047  SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2049  SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2051  SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
2052  SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2053  SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2054  std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2055  void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2056 
2057  SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2058  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2059  SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2060 
2061  void UpdStlShtPtrsFrmNms();
2062  void StylesToNames();
2063 
2064  SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2065 
2066  static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2067 
2068  void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2069  void UpdateFontCharSet();
2070 
2071  void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2072  SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2073  double fRowScale, bool bPageMode, bool bFormulaMode,
2074  const ScMarkData* pMarkData = nullptr );
2075 
2077 
2079  void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2080  bool bKeepQuery, bool bUpdateRefs,
2081  ScProgress* pProgress, sc::ReorderParam* pUndo );
2082 
2083  void Reorder( const sc::ReorderParam& rParam );
2084 
2085  void PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
2086  SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2087  SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2088  OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab);
2089 
2096  void GetFilterEntries( SCCOL nCol, SCROW nRow,
2097  SCTAB nTab, ScFilterEntries& rFilterEntries );
2098 
2099  SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2100  SCTAB nTab, bool bCaseSens,
2101  ScFilterEntries& rFilterEntries );
2102 
2103  void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2104  std::vector<ScTypedStrData>& rStrings, bool bValidation = false );
2105  void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2106 
2107  bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2108  void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2109 
2110  SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2111  SCTAB nTab );
2112  SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2113  SCTAB nTab );
2114 
2115  SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2116  void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2118  SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2119 
2120  bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2121  bool bInSel, const ScMarkData& rMark) const;
2122 
2123  void ReplaceStyle( const SvxSearchItem& rSearchItem,
2124  SCCOL nCol, SCROW nRow, SCTAB nTab,
2125  const ScMarkData& rMark);
2126 
2127  void InvalidateTextWidth( std::u16string_view rStyleName );
2128  void InvalidateTextWidth( SCTAB nTab );
2129  void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2130 
2131  bool IdleCalcTextWidth();
2132 
2133  void RepaintRange( const ScRange& rRange );
2134  void RepaintRange( const ScRangeList& rRange );
2135 
2136  bool IsIdleEnabled() const { return mbIdleEnabled; }
2137  void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2138 
2139  bool IsDetectiveDirty() const { return bDetectiveDirty; }
2140  void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2141 
2143  void SetLinkFormulaNeedingCheck(bool bSet) { bLinkFormulaNeedingCheck = bSet; }
2146 
2147  void SetRangeOverflowType(ErrCode nType) { nRangeOverflowType = nType; }
2148  bool HasRangeOverflow() const { return nRangeOverflowType != ERRCODE_NONE; }
2150 
2151  // for broadcasting/listening
2152  void SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; }
2154  void SetLoadingMedium( bool bVal );
2155  SC_DLLPUBLIC void SetImportingXML( bool bVal );
2156  bool IsImportingXML() const { return bImportingXML; }
2157  bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2158  void SetNoListening( bool bVal ) { bNoListening = bVal; }
2159  bool GetNoListening() const { return bNoListening; }
2160  ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2161 
2162  SC_DLLPUBLIC ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection.get(); }
2163  void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2164  bool bSetChartRangeLists );
2165  void UpdateChart( const OUString& rName );
2166  void RestoreChartListener( const OUString& rName );
2169  void SetChartListenerCollectionNeedsUpdate( bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; }
2170  void AddOLEObjectToCollection(const OUString& rName);
2171 
2172  ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings.get(); }
2174 
2175  const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2176  void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2177 
2179  bool IsValidAsianCompression() const;
2181 
2182  bool GetAsianKerning() const;
2183  bool IsValidAsianKerning() const;
2184  void SetAsianKerning(bool bNew);
2186 
2187  EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2188 
2190  void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2191 
2193 
2194  void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2195  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2196  svl::SharedStringPool* pPool = nullptr) const;
2197 
2206  void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2207 
2208  void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2209  void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2210 
2216  void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2217  void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2218 
2219  std::set<Color> GetDocColors();
2221 
2222 private:
2223  ScDocument(const ScDocument& r) = delete;
2224 
2225  void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2226  SCCOL nX1, SCCOL nX2 ) const;
2227 
2228  sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2229  ScDocument& rOtherDoc,
2230  SCROW nOtherRow, SCTAB nOtherTab,
2231  SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2232  sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2233  ScDocument& rOtherDoc,
2234  SCCOL nOtherCol, SCTAB nOtherTab,
2235  SCROW nMaxRow, const SCCOLROW* pOtherRows );
2236  void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2237  bool bColumns,
2238  ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2239  SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2240  ScProgress* pProgress, sal_uLong nProAdd );
2241 
2242  DECL_LINK(TrackTimeHdl, Timer *, void);
2243 
2259  bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2260  bool& o_bEntirelyOutOfBounds ) const;
2261 
2262 public:
2263  void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2264 
2265  void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2271  void Broadcast( const ScHint& rHint );
2272 
2273  void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2274 
2276  void AreaBroadcast( const ScHint& rHint );
2277  void DelBroadcastAreasInRange( const ScRange& rRange );
2278  void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2279  const ScRange& rRange,
2280  SCCOL nDx, SCROW nDy, SCTAB nDz );
2281 
2282  void StartListeningCell( const ScAddress& rAddress,
2283  SvtListener* pListener );
2284  void EndListeningCell( const ScAddress& rAddress,
2285  SvtListener* pListener );
2286 
2287  void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2288  void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2289 
2290  void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2291 
2292  void PutInFormulaTree( ScFormulaCell* pCell );
2293  void RemoveFromFormulaTree( ScFormulaCell* pCell );
2294 
2308  SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2309  void ClearFormulaTree();
2310  void AppendToFormulaTrack( ScFormulaCell* pCell );
2311  void RemoveFromFormulaTrack( ScFormulaCell* pCell );
2312  void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2315  void FinalTrackFormulas( SfxHintId nHintId );
2317  inline bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2318  inline bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2320  void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; }
2321  void StartAllListeners();
2322  void StartNeededListeners();
2323  void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2324  SC_DLLPUBLIC void StartAllListeners( const ScRange& rRange );
2325 
2326  void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2328 
2329  bool IsInInterpreter() const { return nInterpretLevel != 0; }
2330 
2332  {
2333  assert(!IsThreadedGroupCalcInProgress());
2334  if ( nInterpretLevel < USHRT_MAX )
2335  nInterpretLevel++;
2336  }
2338  {
2339  assert(!IsThreadedGroupCalcInProgress());
2340  if ( nInterpretLevel )
2341  nInterpretLevel--;
2342  }
2343  sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2345  {
2346  assert(!IsThreadedGroupCalcInProgress());
2347  if ( nMacroInterpretLevel < USHRT_MAX )
2348  nMacroInterpretLevel++;
2349  }
2351  {
2352  assert(!IsThreadedGroupCalcInProgress());
2353  if ( nMacroInterpretLevel )
2354  nMacroInterpretLevel--;
2355  }
2356  bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; }
2358  {
2359  if ( nInterpreterTableOpLevel < USHRT_MAX )
2360  nInterpreterTableOpLevel++;
2361  }
2363  {
2364  if ( nInterpreterTableOpLevel )
2365  nInterpreterTableOpLevel--;
2366  }
2367 
2368  // add a formula to be remembered for TableOp broadcasts
2370  void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = false; }
2372  bool IsInDtorClear() const { return bInDtorClear; }
2373  void SetExpandRefs( bool bVal );
2374  bool IsExpandRefs() const { return bExpandRefs; }
2375 
2378  {
2379  if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount )
2380  nXMLImportedFormulaCount += nVal;
2381  }
2383  {
2384  if ( nVal <= nXMLImportedFormulaCount )
2385  nXMLImportedFormulaCount -= nVal;
2386  else
2387  nXMLImportedFormulaCount = 0;
2388  }
2389 
2390  void StartTrackTimer();
2391 
2392  void CompileDBFormula();
2393  void CompileColRowNameFormula();
2394 
2399  sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2400  SCROW nRowStart, SCROW nRowEnd,
2401  rtl_TextEncoding eCharSet ) const;
2405  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2406  SCTAB nTab, SCCOL nCol,
2407  SCROW nRowStart, SCROW nRowEnd ) const;
2408 
2409  void KeyInput(); // TimerDelays etc.
2410 
2411  ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2412 
2415  SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2416 
2417  void StartChangeTracking();
2418  void EndChangeTracking();
2419 
2420  SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2421 
2422  void AddUnoObject( SfxListener& rObject );
2423  void RemoveUnoObject( SfxListener& rObject );
2424  void BroadcastUno( const SfxHint &rHint );
2425  void AddUnoListenerCall( const css::uno::Reference<
2426  css::util::XModifyListener >& rListener,
2427  const css::lang::EventObject& rEvent );
2428 
2429  void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2430  bool IsInLinkUpdate() const; // including DdeLink
2431 
2436 
2437  std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2438  { return pRefreshTimerControl; }
2439 
2440  void SetPastingDrawFromOtherDoc( bool bVal )
2441  { bPastingDrawFromOtherDoc = bVal; }
2443  { return bPastingDrawFromOtherDoc; }
2444 
2446  sal_uInt32 GetDocumentID() const;
2447 
2448  void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; }
2449  void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2450  void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2451 
2452  void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2453  { mxVbaEvents = rxVbaEvents; }
2454  const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2455 
2459 
2461  bool IsInVBAMode() const;
2463 
2464  void AddSubTotalCell(ScFormulaCell* pCell);
2465  void RemoveSubTotalCell(ScFormulaCell* pCell);
2466  void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2467 
2468  sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2469 
2470  SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2471  void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2472  void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2473 
2484  void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2485  void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2486  void RegroupFormulaCells( const ScRange& range );
2487 
2490 
2492  bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2493 #ifdef DBG_UTIL
2494  void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2495 #endif
2496 
2501  void PrepareFormulaCalc();
2502 
2517  SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2518 
2519  SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2520  const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2521  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2522 
2523  std::optional<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2524  void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2525 
2526  SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2527  SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2528 
2529 #if DUMP_COLUMN_STORAGE
2530  SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2531 #endif
2532 
2533 #if DEBUG_AREA_BROADCASTER
2534  SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2535 #endif
2536 
2537  SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2538  const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2539  void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2540  void SwapNonEmpty( sc::TableValues& rValues );
2541  void finalizeOutlineImport();
2542  bool TableExists( SCTAB nTab ) const;
2543 
2544  SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2545 
2546  bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2547  void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2548 
2557  OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2558 
2559  SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2560  SCROW GetLOKFreezeRow(SCTAB nTab) const;
2561  bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2562  bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2563 
2564 private:
2565 
2572  {
2573  public:
2574  explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2576 
2577  private:
2579  };
2580 
2581  ScTable* FetchTable( SCTAB nTab );
2582  const ScTable* FetchTable( SCTAB nTab ) const;
2583 
2584  void MergeNumberFormatter(const ScDocument& rSrcDoc);
2585 
2586  void ImplCreateOptions(); // Suggestion: switch to on-demand?
2587  void ImplDeleteOptions();
2588 
2589  void DeleteDrawLayer();
2590  SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2591 
2592  void UpdateDrawPrinter();
2593  void UpdateDrawLanguages();
2594  SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2595 
2596  void LoadDdeLinks(SvStream& rStream);
2597  void SaveDdeLinks(SvStream& rStream) const;
2598 
2599  void DeleteAreaLinksOnTab( SCTAB nTab );
2600  void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2601  const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2602 
2603  void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2604 
2605  bool HasPartOfMerged( const ScRange& rRange );
2606 
2607  ScRefCellValue GetRefCellValue( const ScAddress& rPos );
2609 
2610  std::map< SCTAB, ScSortParam > mSheetSortParams;
2611 
2612  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2613  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2614  void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2615 
2616  void SharePooledResources( const ScDocument* pSrcDoc );
2617 
2619  sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2620 
2622  sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2623 
2624  void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2625  void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2626 
2627  bool BroadcastHintInternal( const ScHint &rHint );
2628 };
2629 
2630 typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2631 
2638 {
2639 #ifndef NDEBUG
2641  : mnFlagRestore(rDocument.mnMutationGuardFlags)
2642  , mrDocument(rDocument)
2643  {
2644  assert((mnFlagRestore & nFlags) == 0);
2645  mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2646  }
2648  {
2650  }
2653 #else
2655  {
2656  (void)rDocument; (void)nFlags;
2657  }
2658 #endif
2659 };
2660 
2671 {
2672 #ifndef NDEBUG
2674  : mnFlags(static_cast<size_t>(nFlags))
2675  , mrDocument(rDocument)
2676  {
2677  assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2678  }
2679 
2681  {
2682  assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2683  }
2684  size_t mnFlags;
2686 #else
2687  ScMutationGuard(ScDocument& rDocument, ScMutationGuardFlags nFlags)
2688  {
2689  (void)rDocument; (void)nFlags;
2690  }
2691 #endif
2692 };
2693 
2695 {
2697 
2698 public:
2700  : mrDoc(rDoc)
2701  {
2702  assert(!mrDoc.IsInDocShellRecalc());
2703  mrDoc.SetDocShellRecalc(true);
2704  }
2705 
2707  {
2708  mrDoc.SetDocShellRecalc(false);
2709  }
2710 };
2711 
2712 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC void UpdateTranspose(const ScAddress &rDestPos, ScDocument *pClipDoc, const ScMarkData &rMark, ScDocument *pUndoDoc)
Definition: documen3.cxx:1112
exports com.sun.star.lib. util
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3332
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:511
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1903
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:6850
void AddDelayedFormulaGroupingCell(const ScFormulaCell *cell)
To be used only by SharedFormulaUtil::joinFormulaCells().
Definition: document10.cxx:391
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
Definition: documen2.cxx:577
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:622
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
bool IsInFormulaTree(const ScFormulaCell *pCell) const
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:540
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:525
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4769
bool mbEmbedFontScriptComplex
Definition: document.hxx:559
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
Definition: documen6.cxx:40
void BeginDrawUndo()
Definition: documen9.cxx:60
bool IsInDocShellRecalc() const
Definition: document.hxx:2546
void ClearDetectiveOperations()
Definition: documen4.cxx:908
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2090
ScCalcConfig maCalcConfig
Definition: document.hxx:364
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5341
ScMutationGuard(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2673
void AssertNoInterpretNeeded(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1785
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:377
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4317
void FillInfo(ScTableInfo &rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData *pMarkData=nullptr)
Definition: fillinfo.cxx:347
bool IsValidAsianKerning() const
Definition: documen9.cxx:651
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
Definition: document.cxx:1809
std::shared_ptr< SvxForbiddenCharactersTable > xForbiddenCharacters
Definition: document.hxx:399
constexpr double nPPTY
void DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1581
void IncInDdeLinkUpdate()
Definition: document.hxx:1023
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:367
void EnableIdle(bool bDo)
Definition: document.hxx:2137
void ClearLookupCaches()
Zap all caches.
Definition: documen2.cxx:1198
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6235
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:803
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4878
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:370
bool HasExternalRefManager() const
Definition: document.hxx:1008
bool bIsUndo
Definition: document.hxx:492
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4848
void DeleteRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1359
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5686
bool bStyleSheetUsageInvalid
Definition: document.hxx:542
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4725
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4719
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:5934
SfxHintId
sal_uLong GetXMLImportedFormulaCount() const
Definition: document.hxx:2376
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:886
sal_Int32 GetImagePreferredDPI()
Definition: document.hxx:589
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4870
ScFormulaCell * pFormulaTree
Definition: document.hxx:384
void CalculateInColumnInThread(ScInterpreterContext &rContext, const ScRange &rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
Definition: documen8.cxx:413
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1535
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1840
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
Definition: document.cxx:6301
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:554
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:820
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:889
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4329
SfxItemSet * GetPreviewFont()
Definition: document.hxx:1346
void GetClipStart(SCCOL &nClipX, SCROW &nClipY)
Definition: document.cxx:3206
void IncXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2377
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:867
bool HasUnoRefUndo() const
Definition: document.hxx:1070
void EndChangeTracking()
Definition: documen2.cxx:271
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4813
SC_DLLPUBLIC void SetScenario(SCTAB nTab, bool bFlag)
Definition: documen3.cxx:426
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
Definition: documen2.cxx:645
std::unique_ptr< ScChangeTrack > pChangeTrack
Definition: document.hxx:392
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:567
void SetForcedFormulas(bool bVal)
Definition: document.hxx:2326
sal_uLong nFormulaCount
Definition: document.hxx:281
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1110
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1914
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5070
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:34
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6264
sal_uInt16 nInterpretLevel
Definition: document.hxx:461
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter *pInterpreter)
Definition: documen8.cxx:433
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4347
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
Definition: document.hxx:371
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:583
bool IsInInterpreter() const
Definition: document.hxx:2329
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:508
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:749
void SetCutMode(bool bCut)
Definition: document.cxx:2033
HasAttrFlags
Definition: global.hxx:182
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:994
Use this to lock all charts in the calc for a little time.
Definition: chartlock.hxx:52
ScUnoListenerCalls stores notifications to XModifyListener that can't be processed during BroadcastUn...
bool IsEnabledDelayStartListeningFormulaCells(ScColumn *column) const
Definition: document10.cxx:421
bool mbUndoEnabled
Definition: document.hxx:544
bool bInDtorClear
Definition: document.hxx:512
void SC_DLLPUBLIC SetFormulaResults(const ScAddress &rTopPos, const double *pResults, size_t nLen)
Set an array of numerical formula results to a group of contiguous formula cells. ...
Definition: documen8.cxx:404
ScValidationDataList * GetValidationList()
Definition: document.hxx:1810
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:176
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:616
SCTAB nVisibleTab
Definition: document.hxx:478
OUString maFileURL
Definition: document.hxx:417
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:586
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2437
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1419
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1115
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1362
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
Definition: documen3.cxx:1473
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
Definition: documen3.cxx:1931
const OUString & GetFileURL() const
Definition: document.hxx:604
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
Definition: document.cxx:2242
SC_DLLPUBLIC void DoMergeContents(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2036
FillDir
Definition: global.hxx:305
void SetSheetEvents(SCTAB nTab, std::unique_ptr< ScSheetEvents > pNew)
Definition: documen3.cxx:670
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2454
SC_DLLPUBLIC void CopyFromClip(const ScRange &rDestRange, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pRefUndoDoc, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipAttrForEmpty=false, const ScRangeList *pDestRanges=nullptr)
If pDestRanges is given it overrides rDestRange, rDestRange in this case is the overall encompassing ...
Definition: document.cxx:2821
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4550
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2526
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:664
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:360
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
Definition: document.cxx:6223
Provides methods to allow direct shifting of document content without broadcasting or shifting of bro...
void ReservePatternCount(SCTAB nTab, SCCOL nCol, SCSIZE nReserve)
Definition: documen3.cxx:2129
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1115
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
Definition: documen3.cxx:880
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
Definition: document.cxx:319
std::unique_ptr< ScClipParam > mpClipParam
Definition: document.hxx:406
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:778
sheet protection state container
ScObjectHandling
Definition: drwlayer.hxx:90
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:403
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
Definition: documen3.cxx:455
SfxObjectShell * mpShell
Definition: document.hxx:369
ScRangePairList * GetColNameRanges()
Definition: document.hxx:812
std::optional< sc::ColumnIterator > GetColumnIterator(SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:966
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:195
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:592
ScInterpreterContext maInterpreterContext
Definition: document.hxx:471
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
Definition: document.cxx:3743
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:40
ScScenarioFlags
Definition: global.hxx:223
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:196
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:811
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const
Definition: document.cxx:6162
bool IsExpandRefs() const
Definition: document.hxx:2374
SC_DLLPUBLIC void CopyStdStylesFrom(const ScDocument &rSrcDoc)
Definition: documen8.cxx:290
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:578
void FillMatrix(ScMatrix &rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool=nullptr) const
Definition: documen8.cxx:386
void CompileColRowNameFormula()
Definition: documen4.cxx:567
sal_Int32 mnImagePreferredDPI
Definition: document.hxx:561
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:950
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1782
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1552
SCROW GetLOKFreezeRow(SCTAB nTab) const
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
Definition: documen8.cxx:312
sc::IconSetBitmapMap & GetIconSetBitmapMap()
Definition: documen2.cxx:1388
SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const
Definition: document.cxx:6594
sal_uIntPtr sal_uLong
long Long
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
Definition: document10.cxx:315
bool ValidRange(const ScRange &rRange) const
Definition: document.hxx:884
bool mbUserInteractionEnabled
Definition: document.hxx:548
Context for reference update during shifting, moving or copying of cell ranges.
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:287
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:374
const sal_uInt8 SC_DDE_DEFAULT
Definition: document.hxx:293
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6317
void SetName(const OUString &r)
Definition: document.hxx:601
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5026
ScMutationGuardFlags
Enumeration to determine which pieces of the code should not be mutated when set. ...
Definition: document.hxx:306
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2632
bool mbStreamValidLocked
Definition: document.hxx:547
exports com.sun.star. embed
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3553
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
Definition: documen3.cxx:365
bool IsUndo() const
Definition: document.hxx:1539
List of RefUpdate changes made to UNO objects during ScUpdateRefHint broadcast.
Definition: unoreflist.hxx:41
sal_Int16 mnNamedRangesLockCount
Definition: document.hxx:550
ScInterpreterContext * pContext
Definition: document.hxx:302
SC_DLLPUBLIC bool CreateDdeLink(const OUString &rAppl, const OUString &rTopic, const OUString &rItem, sal_uInt8 nMode, const ScMatrixRef &pResults)
Tries to find a DDE link or creates a new, if not extant.
Definition: documen8.cxx:995
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4901
static const sal_uInt16 nSrcVer
Definition: document.hxx:475
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:1988
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1025
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4486
rtl::Reference< XColorList > pColorList
Definition: document.hxx:373
void BlockFormulaGroupContextDiscard(bool block)
Definition: document.hxx:1195
normal calculation of dependencies
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
Definition: documen8.cxx:211
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2615
const ScMarkData & GetPreviewSelection() const
Definition: document.hxx:1348
void SetPendingRowHeights(SCTAB nTab, bool bSet)
Definition: document.cxx:944
rtl_TextEncoding eSrcSet
Definition: document.hxx:453
bool IsTrackFormulasPending() const
Definition: document.hxx:2314
sal_uLong GetCodeCount() const
Definition: document.cxx:6175
sal_uInt16 nFormulaTrackCount
Definition: document.hxx:476
Store position data for column array storage.
SC_DLLPUBLIC sal_Unicode GetSheetSeparator() const
Obtain the sheet separator corresponding to the document's grammar.
Definition: documen4.cxx:1359
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:465
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1734
void DecInterpreterTableOpLevel()
Definition: document.hxx:2362
void CopyMultiRangeFromClip(const ScAddress &rDestPos, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipAttrForEmpty=false)
Definition: document.cxx:3038
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:338
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
bool IsClipOrUndo() const
Definition: document.hxx:1538
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, const ScAddress &rPos, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:463
void SC_DLLPUBLIC SetSortParam(const ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2140
Stores cell values for multiple tables.
Definition: cellvalues.hxx:85
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6335
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4494
OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType)
Serializes the specified sheet's geometry data.
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2475
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
Definition: documen4.cxx:715
SC_DLLPUBLIC bool DeleteTabs(SCTAB nTab, SCTAB nSheets)
Definition: document.cxx:761
Extended options held by an ScDocument containing additional settings for filters.
Definition: scextopt.hxx:76
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4502
bool bLoadingMedium
Definition: document.hxx:501
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1491
bool bCalcingAfterLoad
Definition: document.hxx:503
HardRecalcState eHardRecalcState
Definition: document.hxx:477
VirtualDevice * GetVirtualDevice_100th_mm()
Definition: documen8.cxx:183
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3537
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:21
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2699
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3494
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam &rParam, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark)
Definition: documen4.cxx:356
sal_Int64 GetNewUnoId()
Definition: document.hxx:1073
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:990
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:463
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5743
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1712
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:218
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1490
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
Definition: document.cxx:330
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:423
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1806
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:374
void AppendToFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:459
const sal_uInt8 SC_DDE_TEXT
Definition: document.hxx:295
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Definition: document.cxx:4776
Accessor class to ScDocument.
bool bImportingXML
Definition: document.hxx:502
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
Definition: documen2.cxx:1357
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
Definition: lookupcache.hxx:39
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:673
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:229
void SetClipOptions(std::unique_ptr< ScClipOptions > pClipOptions)
Definition: documen3.cxx:2031
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:485
SC_DLLPUBLIC SfxUndoManager * GetUndoManager()
Definition: document.cxx:6390
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4408
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
Definition: documen8.cxx:143
css::uno::Reference< css::embed::XEmbeddedObject > FindOleObjectByName(std::u16string_view rName)
Definition: documen5.cxx:536
bool HasStringWeakCharacters(const OUString &rString)
Definition: documen6.cxx:51
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
Definition: document.cxx:4440
ScFormulaCell * pEOFormulaTrack
Definition: document.hxx:387
void SetHardRecalcState(HardRecalcState eVal)
Definition: document.hxx:2320
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2113
void GetClipArea(SCCOL &nClipX, SCROW &nClipY, bool bIncludeFiltered)
Definition: document.cxx:3154
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:780
SC_DLLPUBLIC void Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScProgress *pProgress, const ScMarkData &rMark, sal_uLong nFillCount, FillDir eFillDir=FILL_TO_BOTTOM, FillCmd eFillCmd=FILL_LINEAR, FillDateCmd eFillDateCmd=FILL_DAY, double nStepValue=1.0, double nMaxValue=1E307)
Definition: documen3.cxx:1156
std::map< SCTAB, ScSortParam > mSheetSortParams
Definition: document.hxx:2610
css::uno::Reference< css::chart2::XChartDocument > GetChartByName(std::u16string_view rChartName)
Definition: documen5.cxx:138
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
Definition: document.cxx:901
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:494
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:883
bool Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const OUString &sValStr, double &nX)
(Goal Seek) Find a value of x that is a root of f(x)
Definition: documen4.cxx:71
sal_uLong nXMLImportedFormulaCount
Definition: document.hxx:460
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5193
bool HasAutoFilter(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1503
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
Definition: document.cxx:6347
void UpdateChartArea(const OUString &rChartName, const ScRange &rNewArea, bool bColHeaders, bool bRowHeaders, bool bAdd)
Definition: documen5.cxx:130
::std::map< SCTAB, const ScRangeName * > TabNameCopyMap
Map that stores non-managed pointers to ScRangeName instances.
Definition: rangenam.hxx:193
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6794
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:488
bool TableExists(SCTAB nTab) const
Definition: document.cxx:2521
void UpdateChart(const OUString &rName)
Definition: documen5.cxx:335
SC_DLLPUBLIC SvtScriptType GetStringScriptType(const OUString &rString)
Definition: documen6.cxx:76
SvNumberFormatterIndexTable * pFormatExchangeList
Definition: document.hxx:375
bool IsAdjustHeightLocked() const
Definition: document.hxx:1545
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4378
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4180
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:319
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
Definition: documen2.cxx:471
void SetClipParam(const ScClipParam &rParam)
Definition: document.cxx:2578
bool mbChangeReadOnlyEnabled
Definition: document.hxx:546
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:437
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:1002
SC_DLLPUBLIC void SetTextCell(const ScAddress &rPos, const OUString &rStr)
Call this if you are not sure whether to put this as an edit text or a simple text.
Definition: document.cxx:3467
exports com.sun.star. sheet
void MixDocument(const ScRange &rRange, ScPasteFunc nFunction, bool bSkipEmpty, ScDocument &rSrcDoc)
Definition: document.cxx:3244
void RemoveFromFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:475
SC_DLLPUBLIC void GetBorderLines(SCCOL nCol, SCROW nRow, SCTAB nTab, const ::editeng::SvxBorderLine **ppLeft, const ::editeng::SvxBorderLine **ppTop, const ::editeng::SvxBorderLine **ppRight, const ::editeng::SvxBorderLine **ppBottom) const
Definition: document.cxx:5261
bool GetNextSpellingCell(SCCOL &nCol, SCROW &nRow, SCTAB nTab, bool bInSel, const ScMarkData &rMark) const
Definition: documen4.cxx:531
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:393
Row-wise value iterator.
Definition: dociter.hxx:478
SC_DLLPUBLIC void CopyStaticToDocument(const ScRange &rSrcRange, SCTAB nDestTab, ScDocument &rDestDoc)
Copy only raw cell values to another document.
Definition: document.cxx:2226
void UnlockTable(SCTAB nTab)
Definition: document.cxx:5331
bool HasAnySheetEventScript(ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:699
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1548
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6075
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
Definition: documen3.cxx:1437
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1212
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:881
LanguageType eCjkLanguage
Definition: document.hxx:451
void InvalidateTableArea()
Definition: documen4.cxx:577
ScLkUpdMode eLinkMode
Definition: document.hxx:482
SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4574
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:115
void DeleteDrawLayer()
Definition: documen9.cxx:229
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:592
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3854
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:499
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4917
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: documen2.cxx:623
void RepaintRange(const ScRange &rRange)
Definition: documen8.cxx:691
sal_uInt16 sal_Unicode
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:936
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
Definition: document.cxx:6522
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:584
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:568
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:867
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6677
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1156
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:120
bool HandleRefArrayForParallelism(const ScAddress &rPos, SCROW nLength, const ScFormulaCellGroupRef &mxGroup)
Definition: document.cxx:1800
bool bForcedFormulaPending
Definition: document.hxx:489
std::unordered_map< ScColumn *, std::pair< SCROW, SCROW > > pDelayedStartListeningFormulaCells
Definition: document.hxx:526
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:615
void SetChartListenerCollectionNeedsUpdate(bool bFlg)
Definition: document.hxx:2169
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:762
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:853
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:540
ScClipParam & GetClipParam()
Definition: document.cxx:2570
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4156
void InvalidateStyleSheetUsage()
Definition: document.hxx:2448
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:1008
ScDocument & mrDocument
Definition: document.hxx:2652
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:878
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
void SetNamedRangesLockCount(sal_Int16 nCount)
Definition: document.hxx:1555
void SetCodeName(const OUString &r)
Definition: document.hxx:603
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:314
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4591
SvtScriptType GetRangeScriptType(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rPos, SCROW nLength)
Definition: documen6.cxx:183
Additional class containing cell annotation data.
Definition: postit.hxx:161
bool CanDelayStartListeningFormulaCells(ScColumn *column, SCROW row1, SCROW row2)
If true is returned, ScColumn::StartListeningFormulaCells() for the given cells will be performed lat...
Definition: document10.cxx:426
ScFormulaCell * pEOFormulaTree
Definition: document.hxx:385
SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate(const std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Call this immediately before updating all named ranges.
Definition: document10.cxx:245
SC_DLLPUBLIC void CopyUpdated(ScDocument *pPosDoc, ScDocument *pDestDoc)
From this document this method copies the cells of positions at which there are also cells in pPosDoc...
Definition: documen3.cxx:803
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4102
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:309
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
Definition: document.cxx:5114
bool HasChartAtPoint(SCTAB nTab, const Point &rPos, OUString &rName)
Definition: documen5.cxx:100
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:368
sal_uLong GetFormulaCodeInTree() const
Definition: document.hxx:2327
TableContainer maTabs
Definition: document.hxx:376
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
Definition: documen8.cxx:1026
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:585
ScLkUpdMode
Definition: global.hxx:406
const ScValidationDataList * GetValidationList() const
Definition: document.hxx:1809
FillDateCmd
Definition: global.hxx:330
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
Definition: document.hxx:398
void DecInDdeLinkUpdate()
Definition: document.hxx:1024
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
Definition: document.cxx:3522
void DecInterpretLevel()
Definition: document.hxx:2337
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:388
bool IsFinalTrackFormulas() const
Definition: document.hxx:2316
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
Definition: document.cxx:2054
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:425
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:412
void SetNoListening(bool bVal)
Definition: document.hxx:2158
sal_uInt16 GetOptimalColWidth(SCCOL nCol, SCTAB nTab, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bFormula, const ScMarkData *pMarkData=nullptr, const ScColWidthParam *pParam=nullptr)
Definition: document.cxx:4259
bool bInsertingFromOtherDoc
Definition: document.hxx:500
bool ValidRange(const ScRange &rRange, SCCOL nMaxCol=MAXCOL, SCROW nMaxRow=MAXROW)
Definition: address.hxx:800
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:66
void GetOldChartParameters(std::u16string_view rName, ScRangeList &rRanges, bool &rColHeaders, bool &rRowHeaders)
Definition: documen5.cxx:204
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:260
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:627
SC_DLLPUBLIC bool IsDocVisible() const
Definition: document.hxx:1562
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:333
bool IsAutoCalcShellDisabled() const
Definition: document.hxx:1369
std::unique_ptr< ScDocProtection > pDocProtection
Definition: document.hxx:405
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25
std::map< OUString, BitmapEx > IconSetBitmapMap
Definition: document.hxx:209
OUString aDocCodeName
Definition: document.hxx:416
Walk through all cells in an area.
Definition: dociter.hxx:207
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1717
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:327
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
Definition: document.cxx:191
ScLinkMode
Definition: global.hxx:212
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:473
bool mbIdleEnabled
Definition: document.hxx:506
void DiscardFormulaGroupContext()
Definition: document.cxx:3562
SC_DLLPUBLIC void GetNextPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData &rMark, SCCOL nTabStartCol=SC_TABSTART_NONE) const
Definition: document.cxx:6108
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1775
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6293
std::set< ScFormulaCell * > maSubTotalCells
Definition: document.hxx:552
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1062
bool HasSheetEventScript(SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:676
const sal_uInt8 SC_DDE_IGNOREMODE
Definition: document.hxx:296
void RestoreChartListener(const OUString &rName)
Definition: documen5.cxx:363
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1939
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:500
SCTAB GetMaxTableNumber() const
Definition: document.hxx:810
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:61
void EndListeningFormulaCells(std::vector< ScFormulaCell * > &rCells)
Definition: documen7.cxx:259
SC_DLLPUBLIC ~ScDocument()
Definition: documen2.cxx:328
Optimized ColumnSpanSet version that operates on a single ScRange.
SC_DLLPUBLIC OUString GetFormula(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3735
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:577
std::unique_ptr< ScDBData > mpAnonymousDBData
Definition: document.hxx:400
sal_uInt16 ColDifferences(SCCOL nThisCol, SCTAB nThisTab, ScDocument &rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, const SCCOLROW *pOtherRows)
Definition: documen4.cxx:964
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:757
SCROW SanitizeRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:132
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated...
Definition: document.cxx:2469
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6188
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4108
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
Definition: documen2.cxx:489
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2160
SC_DLLPUBLIC void ApplyPatternArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark, const ScPatternAttr &rAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
Definition: document.cxx:4788
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4127
bool mbTrackFormulasPending
Definition: document.hxx:565
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4754
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:549
SfxUndoManager * mpUndoManager
Definition: document.hxx:366
SC_DLLPUBLIC bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:81
void MarkUsedExternalReferences()
Definition: documen3.cxx:641
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
Definition: document.cxx:6280
bool bHasForcedFormulas
Definition: document.hxx:510
void FinalTrackFormulas(SfxHintId nHintId)
Definition: documen7.cxx:509
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2411
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Shrink a range to only include used data area.
Definition: document.cxx:1063
std::unique_ptr< ScDrawLayer > mpDrawLayer
Definition: document.hxx:372
TransliterationFlags
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScDocument *pClipDoc)
Definition: document.cxx:2253
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4534
bool mbFinalTrackFormulas
Definition: document.hxx:566
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1562
Stores the used instances of the FilterFormulaParser service implementations, mapped by the formula n...
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: document.cxx:4733
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Definition: documen3.cxx:121
void PutInFormulaTree(ScFormulaCell *pCell)
Definition: documen7.cxx:271
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2150
void StylesToNames()
Definition: document.cxx:6136
void StartListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:221
void ImplCreateOptions()
Definition: documen8.cxx:102
void SetInsertingFromOtherDoc(bool bVal)
Definition: document.hxx:2152
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2068
void ResetEmbedded()
Definition: documen3.cxx:1753
bool GetNoListening() const
Definition: document.hxx:2159
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:917
ScStyleSheet * GetPreviewCellStyle()
Definition: document.hxx:1350
bool HasValidationData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3828
SC_DLLPUBLIC bool GetCellArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
Definition: document.cxx:1010
ScRangePairListRef xColNameRanges
Definition: document.hxx:418
bool IsClipboard() const
Definition: document.hxx:1540
SC_DLLPUBLIC bool HasRowHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1541
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bValidation=false)
Entries for selection list listbox (no numbers/formulas)
Definition: documen3.cxx:1628
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3649
SC_DLLPUBLIC OUString GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, const svl::SharedString **pShared=nullptr) const
Definition: document.cxx:3569
ScMutationDisable(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2640
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1947
SCCOL SanitizeCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:126
SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, const OUString &rFormula, const ScTokenArray *p=nullptr, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT)
Definition: documen4.cxx:258
constexpr double nPPTX
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx:484
bool IsPrintEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
Definition: documen9.cxx:435
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:717
A pretty assertion that checks that the relevant bits in the are not set on the document at entry an...
Definition: document.hxx:2670
bool bInUnoBroadcast
Definition: document.hxx:537
size_t mnMutationGuardFlags
Definition: document.hxx:570
void AddOLEObjectToCollection(const OUString &rName)
Definition: documen5.cxx:645
SC_DLLPUBLIC bool SetEditText(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
This method manages the lifecycle of the passed edit text object.
Definition: document.cxx:3430
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:900
void InvalidateStreamOnSave()
Definition: document.cxx:495
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:515
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
Definition: document.cxx:1088
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:6827
void SwapNonEmpty(sc::TableValues &rValues)
Definition: document10.cxx:223
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:92
void SetImagePreferredDPI(sal_Int32 nValue)
Definition: document.hxx:588
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
Definition: documen2.cxx:551
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:865
ScDBDataPortion
Enum used to indicate which portion of the DBArea is to be considered.
Definition: dbdata.hxx:40
ScPasteFunc
Definition: global.hxx:178
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3399
std::unique_ptr< ScViewOptions > pViewOptions
Definition: document.hxx:421
SC_DLLPUBLIC ScDocProtection * GetDocProtection() const
Definition: documen3.cxx:1890
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:276
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1206
bool HasAnyCalcNotification() const
Definition: documen3.cxx:708
bool HasClipFilteredRows()
Definition: document.cxx:3223
bool bExpandRefs
Definition: document.hxx:517
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
Definition: document.hxx:457
SC_DLLPUBLIC ScPostIt * GetOrCreateNote(const ScAddress &rPos)
Definition: document.cxx:6627
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:437
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1064
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3139
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:877
T * get() const
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:996
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4925
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:442
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4464
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
Definition: document.cxx:5063
bool IsChartListenerCollectionNeedsUpdate() const
Definition: document.hxx:2168
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2153
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5875
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:769
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:98
Parameter for data table aka multiple operations.
Definition: paramisc.hxx:45
SvtScriptType
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2442
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:479
bool bIsFunctionAccess
Definition: document.hxx:493
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1450
FillCmd
Definition: global.hxx:313
void DelayFormulaGrouping(bool delay)
If set, joining cells into shared formula groups will be delayed until reset again (RegroupFormulaCel...
Definition: document10.cxx:376
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
Definition: documen2.cxx:239
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:6834
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
Definition: document.cxx:6285
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4566
Set of column block positions only for one table.
void UpdateBroadcastAreas(UpdateRefMode eUpdateRefMode, const ScRange &rRange, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen7.cxx:596
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6229
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
Definition: documen3.cxx:275
std::mutex mScLookupMutex
Definition: document.hxx:473
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:381
SC_DLLPUBLIC void CalcFormulaTree(bool bOnlyForced=false, bool bProgressBar=true, bool bSetAllDirty=true)
Calculate formula cells that are on the formula tree either partially, or in full.
Definition: documen7.cxx:334
bool IsImportingXML() const
Definition: document.hxx:2156
Keep track of all named expressions that have been updated during reference update.
SC_DLLPUBLIC CellType GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3767
SCCOL nPosLeft
Definition: document.hxx:479
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1549
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:926
bool bIsEmbedded
Definition: document.hxx:496
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1269
SCROW GetNextDifferentChangedRow(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4630
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:360
LanguageType eCtlLanguage
Definition: document.hxx:452
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:872
SC_DLLPUBLIC bool IsDefaultTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:461
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:146
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:342
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4672
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:377
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2493
CharCompressType
void UpdateAllRowHeights(sc::RowHeightContext &rCxt, const ScMarkData *pTabMark)
Definition: document.cxx:4294
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
Definition: documen3.cxx:885
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:215
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:439
void GetFormulaEntries(ScTypedCaseStrSet &rStrings)
Entries for Formula auto input.
Definition: documen3.cxx:1668
SC_DLLPUBLIC bool FindDdeLink(std::u16string_view rAppl, std::u16string_view rTopic, std::u16string_view rItem, sal_uInt8 nMode, size_t &rnDdePos)
Tries to find a DDE link with the specified connection data.
Definition: documen8.cxx:961
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3264
void CompileXML()
Definition: document.cxx:3989
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4518
bool bDetectiveDirty
Definition: document.hxx:519
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
Definition: document.hxx:361
ScMoveDirection
Definition: global.hxx:322
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6710
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2630
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4370
void IncMacroInterpretLevel()
Definition: document.hxx:2344
SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream &rStream)
sal_Int16 SCCOL
Definition: types.hxx:21
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:5946
std::unique_ptr< sc::ExternalDataMapper > mpDataMapper
Definition: document.hxx:401
void GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: documen3.cxx:1203
InsertDeleteFlags
Definition: global.hxx:147
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
Definition: documen8.cxx:989
SCCOL GetNextDifferentChangedCol(SCTAB nTab, SCCOL nStart) const
Definition: document.cxx:4612
bool ValidCol(SCCOL nCol) const
Definition: document.hxx:880
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2452
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2457
sal_uLong nCellCount
Definition: document.hxx:280
bool GetDdeLinkData(size_t nDdePos, OUString &rAppl, OUString &rTopic, OUString &rItem) const
Returns the connection data of the specified DDE link.
Definition: documen8.cxx:967
LanguageType eLanguage
Definition: document.hxx:450
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:343
Struct to hold non-data extended area, used with ScDocument::ShrinkToUsedDataArea().
Definition: sortparam.hxx:43
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong *pnMaxHeight=nullptr) const
Definition: document.cxx:4217
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6357
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:608
void EnableChangeReadOnly(bool bVal)
Definition: document.hxx:1551
bool HasAreaLinks() const
Definition: documen8.cxx:1036
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1107
ScMarkData maPreviewSelection
Definition: document.hxx:431
SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
Return the number of columns / rows that should be visible for the tiled rendering.
Definition: documen2.cxx:668
bool IsForcedFormulaPending() const
Definition: document.hxx:1372
void ExtendPrintArea(OutputDevice *pDev, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW nEndRow) const
Find the maximum column position that contains printable data for the specified row range...
Definition: documen3.cxx:2106
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1967
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:879
bool HasRangeOverflow() const
Definition: document.hxx:2148
void RemoveEditTextCharAttribs(const ScAddress &rPos, const ScPatternAttr &rAttr)
Definition: document.cxx:3641
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:6806
bool IsFunctionAccess() const
Definition: document.hxx:1543
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1240
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
Definition: documen8.cxx:979
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:392
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:656
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScMarkData &rMark, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document10.cxx:56
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:453
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4782
ScRange aEmbedRange
Definition: document.hxx:436
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:910
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1179
EEHorizontalTextDirection
sal_uInt16 GetMacroInterpretLevel() const
Definition: document.hxx:2343
SC_DLLPUBLIC void UnlockAdjustHeight()
Definition: document.cxx:1793
SC_DLLPUBLIC SCCOL ClampToAllocatedColumns(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2145
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
bool IsInInterpreterTableOp() const
Definition: document.hxx:2356
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
Definition: documen8.cxx:342
void SetLinkFormulaNeedingCheck(bool bSet)
Definition: document.hxx:2143
void EndListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:230
void SharePooledResources(const ScDocument *pSrcDoc)
Definition: document10.cxx:326
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:855
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6247
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
bool IsDetectiveDirty() const
Definition: document.hxx:2139
exports com.sun.star. i18n
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:391
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
Definition: documen3.cxx:546
bool IsCutMode()
Definition: document.cxx:2043
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4114
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6537
bool mbEmbedFontScriptAsian
Definition: document.hxx:558
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:504
void CopyCellValuesFrom(const ScAddress &rTopPos, const sc::CellValues &rSrc)
Definition: document10.cxx:172
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
Definition: document.cxx:1032
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
Definition: documen2.cxx:105
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2319
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
Definition: document.cxx:1095
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4805
SvNumFormatType
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:399
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
Definition: documen7.cxx:530
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6200
BroadcastAreaSlots and their management, once per document.
Definition: bcaslot.hxx:245
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4120
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:975
void DecXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2382
SC_DLLPUBLIC SCROW GetFirstEditTextRow(const ScRange &rRange) const
Definition: document.cxx:3458
Instantiate this to ensure that subsequent modification of the document will cause an assertion failu...
Definition: document.hxx:2637
void BroadcastUno(const SfxHint &rHint)
Definition: documen3.cxx:952
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1762
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:518
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6438
void RemoveSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6417
SC_DLLPUBLIC const EditTextObject * GetEditText(const ScAddress &rPos) const
Definition: document.cxx:3632
bool IsInExternalReferenceMarking() const
Definition: documen3.cxx:636
void SaveDdeLinks(SvStream &rStream) const
Definition: documen8.cxx:711
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2458
sal_uLong nFormulaCodeInTree
Definition: document.hxx:459
SCTAB nTableCount
Definition: document.hxx:279
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1996
bool BroadcastHintInternal(const ScHint &rHint)
Definition: documen7.cxx:137
bool IsBlockEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes=false) const
Definition: document.cxx:5310
void IncInterpreterTableOpLevel()
Definition: document.hxx:2357
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:252
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4164
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4090
SCROW GetRowForHeight(SCTAB nTab, sal_uLong nHeight) const
Given the height i.e.
Definition: document.cxx:4212
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd) const
Maximum string length of numerical cells of a column, e.g.
Definition: documen4.cxx:598
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
RangeNameScope
Definition: document.hxx:261
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:580
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1217
SC_DLLPUBLIC void DoMerge(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions=true)
Definition: documen3.cxx:2073
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6323
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4029
CommentCaptionState
Definition: document.hxx:254
std::unique_ptr< ScScriptTypeData > pScriptTypeData
Definition: document.hxx:397
SC_DLLPUBLIC void SetPosTop(SCROW nRow)
Definition: document.hxx:869
void RemoveManualBreaks(SCTAB nTab)
Definition: document.cxx:6241
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3784
SC_DLLPUBLIC ScPostIt * CreateNote(const ScAddress &rPos)
Definition: document.cxx:6634
bool HasSelectedBlockMatrixFragment(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark) const
Definition: document.cxx:5421
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
Definition: document.hxx:359
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
Definition: documen4.cxx:798
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2142
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3719
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1470
Use this class as a locale variable to merge number formatter from another document, and set NULL pointer to pFormatExchangeList when done.
Definition: document.hxx:2571
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
Definition: document.hxx:368
SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream &rStrm) const
void UpdateChartRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen5.cxx:391
void Broadcast(const ScHint &rHint)
Broadcast wrapper, calls rHint.GetCell()->Broadcast() and AreaBroadcast() and TrackFormulas() Preferr...
Definition: documen7.cxx:117
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6123
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1184
void CheckVectorizationState()
Definition: document.cxx:3840
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5582
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6547
void CompileDBFormula()
Definition: documen4.cxx:557
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
Definition: document.cxx:6659
sal_Int32 GetMaxStringLen(SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Maximum string length of a column, e.g.
Definition: documen4.cxx:589
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:885
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1344
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1085
sal_uInt16 nPageCount
Definition: document.hxx:282
void LockStreamValid(bool bLock)
Definition: document.cxx:931
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:256
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
Definition: document.hxx:442
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4526
FormulaError
bool mbExecuteLinkEnabled
Definition: document.hxx:545
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:158
bool bCalculatingFormulaTree
Definition: document.hxx:490
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3775
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6341
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:541
Iterate through all edit text cells in a given sheet.
SC_DLLPUBLIC void GetFilterEntriesArea(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, ScFilterEntries &rFilterEntries)
Entries for Filter dialog.
Definition: documen3.cxx:1614
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:724
ScDocument & mrDoc
Definition: document.hxx:2696
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4416
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:379
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4082
bool bInLinkUpdate
Definition: document.hxx:507
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1961
SCROW nPosTop
Definition: document.hxx:480
SheetGeomType
Represents the type of sheet geometry data.
Definition: document.hxx:268
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:774
static bool IsEmptyCellSearch(const SvxSearchItem &rSearchItem)
Definition: documen3.cxx:1304
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:901
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
Definition: document.hxx:395
std::unique_ptr< SvMemoryStream > pClipData
Definition: document.hxx:390
bool bIsVisible
Definition: document.hxx:494
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4045
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:227
void CopyBlockFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW nDy)
Definition: document.cxx:2640
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2147
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:949
Configuration options for formula interpreter.
Definition: calcconfig.hxx:43
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1378
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1374
ScBreakType
Definition: global.hxx:138
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:887
SC_DLLPUBLIC void DoEmptyBlock(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2060
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const
Definition: document.hxx:2189
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:468
void LockTable(SCTAB nTab)
Definition: document.cxx:5321
bool IdleCalcTextWidth()
Definition: documen8.cxx:534
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:634
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
Definition: document.cxx:6650
SCROW CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow, SCROW nClipEndRow)
Definition: document.cxx:2743
void finalizeOutlineImport()
Definition: document10.cxx:568
void InvalidateTextWidth(std::u16string_view rStyleName)
Definition: documen8.cxx:297
void SetDetOpList(std::unique_ptr< ScDetOpList > pNew)
Definition: documen4.cxx:913
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: document.hxx:882
void SyncColRowFlags()
Write all column row flags to table's flag data, because not all column row attributes are stored in ...
Definition: document.cxx:4582
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: document.cxx:4994
static thread_local ScDocumentThreadSpecific maThreadSpecific
Definition: document.hxx:469
void FindMaxRotCol(SCTAB nTab, RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2) const
Definition: document.cxx:5250
bool IsInDtorClear() const
Definition: document.hxx:2372
o3tl::sorted_vector< sal_uInt32 > ScCondFormatIndexes
Definition: document.hxx:202
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3709
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
Definition: document.cxx:6194
SC_DLLPUBLIC bool EnsureFormulaCellResults(const ScRange &rRange, bool bSkipRunning=false)
Make sure all of the formula cells in the specified range have been fully calculated.
Definition: document10.cxx:984
UpdateRefMode
Definition: global.hxx:297