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 #ifndef INCLUDED_SC_INC_DOCUMENT_HXX
21 #define INCLUDED_SC_INC_DOCUMENT_HXX
22 
23 #include <vcl/idle.hxx>
24 #include <vcl/errcode.hxx>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <vcl/vclptr.hxx>
27 #include "patattr.hxx"
28 #include "scdllapi.h"
29 #include "interpretercontext.hxx"
30 #include "rangelst.hxx"
31 #include "rangenam.hxx"
32 #include "tabopparams.hxx"
33 #include "types.hxx"
34 #include <formula/grammar.hxx>
35 #include <formula/types.hxx>
36 #include "typedstrdata.hxx"
37 #include "calcmacros.hxx"
38 #include "calcconfig.hxx"
39 #include "sheetlimits.hxx"
40 #include <o3tl/deleter.hxx>
41 #include <o3tl/sorted_vector.hxx>
42 #include <svl/hint.hxx>
43 #include <svl/typedwhich.hxx>
44 #include <svl/zforlist.hxx>
45 #include <tools/gen.hxx>
46 #include <tools/solar.h>
47 
48 #include <cassert>
49 #include <memory>
50 #include <map>
51 #include <set>
52 #include <unordered_map>
53 #include <vector>
54 
55 #include "markdata.hxx"
56 
57 namespace com::sun::star::chart2 { class XChartDocument; }
58 
59 class Timer;
60 
61 enum class SvtScriptType;
62 enum class ScMF;
63 enum class FormulaError : sal_uInt16;
64 enum class CharCompressType;
65 enum class EEHorizontalTextDirection;
66 namespace editeng { class SvxBorderLine; }
67 namespace formula { struct VectorRefArray; }
68 namespace svl {
69 
70 class SharedString;
71 class SharedStringPool;
72 
73 }
74 
75 namespace sc {
76 
77 struct FormulaGroupContext;
78 class StartListeningContext;
79 class EndListeningContext;
80 class CopyFromClipContext;
81 class ColumnSpanSet;
82 class RangeColumnSpanSet;
83 struct ColumnBlockPosition;
84 struct RefUpdateContext;
85 class EditTextIterator;
86 struct NoteEntry;
87 class DocumentStreamAccess;
88 class DocumentLinkManager;
89 class CellValues;
90 class TableValues;
91 class RowHeightContext;
92 struct SetFormulaDirtyContext;
93 class RefMovedHint;
94 struct ReorderParam;
95 class FormulaGroupAreaListener;
96 class ColumnSet;
97 class UpdatedRangeNames;
98 class TableColumnBlockPositionSet;
99 class ColumnIterator;
100 class ExternalDataMapper;
101 
102 }
103 
104 class Fraction;
105 
106 class OutputDevice;
107 class SdrObject;
108 class SfxBroadcaster;
109 class SfxListener;
110 class SfxItemSet;
111 class SfxObjectShell;
112 class SfxBindings;
113 class SfxPoolItem;
114 class SfxItemPool;
115 class SfxPrinter;
116 class SfxStyleSheetBase;
117 class SvMemoryStream;
118 class SvxBoxInfoItem;
119 class SvxBoxItem;
121 namespace sfx2 {
122  class LinkManager;
123  }
124 class SvxSearchItem;
125 namespace vcl { class Window; }
126 class XColorList;
127 
128 class ScAutoFormatData;
132 class ScClipOptions;
133 class ScColumn;
134 class ScConditionalFormat;
136 class ScDBCollection;
137 class ScDBData;
138 class ScDetOpData;
139 class ScDetOpList;
140 class ScDocOptions;
141 class ScDocProtection;
142 class ScDocumentPool;
143 class ScDrawLayer;
144 class ScExtDocOptions;
146 class ScFormulaCell;
147 class ScMacroManager;
148 class ScOutlineTable;
149 class ScPrintRangeSaver;
150 class ScStyleSheet;
151 class ScStyleSheetPool;
152 class ScTable;
153 class ScTableProtection;
154 class ScTokenArray;
155 class ScValidationData;
157 class ScViewOptions;
158 class ScChangeTrack;
160 class ScFieldEditEngine;
161 class ScNoteEditEngine;
162 class ScDPObject;
163 class ScDPCollection;
164 class ScMatrix;
165 class ScScriptTypeData;
166 class ScPoolHelper;
167 struct ScSortParam;
169 class ScUnoListenerCalls;
170 class ScUnoRefList;
171 class ScRecursionHelper;
172 struct RowInfo;
173 struct ScTableInfo;
174 struct ScTabOpParam;
175 class VirtualDevice;
176 class ScAutoNameCache;
178 class ScLookupCache;
179 struct ScLookupCacheMap;
180 class SfxUndoManager;
181 class ScFormulaParserPool;
182 struct ScClipParam;
183 class ScRowBreakIterator;
184 struct ScSetStringParam;
185 struct ScColWidthParam;
186 class ScSheetEvents;
187 class ScProgress;
188 class SvtListener;
189 class ScEditDataArray;
190 class EditTextObject;
191 struct ScRefCellValue;
192 class ScPostIt;
193 struct ScSubTotalParam;
194 struct ScQueryParam;
195 class ScHint;
196 class SvtBroadcaster;
197 enum class ScDBDataPortion;
198 enum class ScSheetEventId;
199 class BitmapEx;
200 class ScColumnsRange;
203 struct ScSheetLimits;
204 
205 namespace sc {
206 
207 typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
208 
209 }
210 
211 namespace com::sun::star {
212  namespace lang {
213  struct EventObject;
214  }
215  namespace i18n {
216  class XBreakIterator;
217  }
218  namespace util {
219  class XModifyListener;
220  }
221  namespace embed {
222  class XEmbeddedObject;
223  }
224  namespace script::vba {
225  class XVBAEventProcessor;
226  }
227  namespace sheet {
228  struct TablePageBreakData;
229  }
230 }
231 
232 namespace weld {
233 
234 class Window;
235 
236 }
237 
238 #define SC_DOC_NEW 0xFFFF
239 
240 #define SC_MACROCALL_ALLOWED 0
241 
242 #define SC_ASIANKERNING_INVALID 0xff
243 
245 {
250 };
251 
253 {
254  ALLSHOWN, // All comments captions are shown
255  ALLHIDDEN, // All comments captions are hidden
256  MIXED // There are comments in shown and hidden.
257 };
258 
260 {
261  GLOBAL, // A range name can be defined
262  SHEET // with two scope on Manage Names dialog.
263 };
264 
266 enum class SheetGeomType
267 {
268  SIZES, // Column widths or row heights.
269  HIDDEN, // Hidden columns/rows.
270  FILTERED, // Filtered columns/rows.
271  GROUPS // Grouping of columns/rows.
272 };
273 
274 struct ScDocStat
275 {
276  OUString aDocName;
280  sal_uInt16 nPageCount;
282  : nTableCount(0)
283  , nCellCount(0)
284  , nFormulaCount(0)
285  , nPageCount(0)
286  {
287  }
288 };
289 
290 // DDE link modes
295 
296 // During threaded calculation fields being mutated are kept in this struct
298 {
299  std::unique_ptr<ScRecursionHelper> xRecursionHelper; // information for recursive and iterative cell formulas
300  ScInterpreterContext* pContext = nullptr; // references the context passed around for easier access
301 };
302 
305 {
306  // Bit mask bits
307  CORE = 0x0001,
308 };
309 
310 typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
311 
313 {
314 friend class ScValueIterator;
318 friend class ScCellIterator;
319 friend class ScQueryCellIterator;
323 friend class ScDocAttrIterator;
325 friend class ScAttrRectIterator;
326 friend class ScDocShell;
329 friend class ScFormulaCell;
330 friend class ScTable;
331 friend class ScColumn;
332 friend struct ScRefCellValue;
333 friend class ScDocumentImport;
335 friend class sc::ColumnSpanSet;
337 friend class sc::EditTextIterator;
340 friend struct ScMutationGuard;
341 friend struct ScMutationDisable;
342 
343  typedef std::vector<ScTableUniquePtr> TableContainer;
344 
345 public:
346  enum class HardRecalcState
347  {
348  OFF,
349  TEMPORARY,
350  ETERNAL
351  };
352 
353 private:
355 
356  std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
357  std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
358 
359  std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
361 
363 
365  std::unique_ptr<ScFieldEditEngine> mpEditEngine; // uses pEditPool from xPoolHelper
366  std::unique_ptr<ScNoteEditEngine> mpNoteEngine; // uses pEditPool from xPoolHelper
370  std::unique_ptr<ScDrawLayer> mpDrawLayer; // SdrModel
372  std::unique_ptr<ScValidationDataList> pValidationList; // validity
373  SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
374  TableContainer maTabs;
376  std::vector<OUString> maTabNames; // for undo document, we need the information tab name <-> index
377  mutable std::unique_ptr<ScRangeName> pRangeName;
378  std::unique_ptr<ScDBCollection> pDBCollection;
379  std::unique_ptr<ScDPCollection> pDPCollection;
380  std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
381  std::unique_ptr<ScPatternAttr> pSelectionAttr; // Attributes of a block
382  ScFormulaCell* pFormulaTree; // formula tree (start)
383  ScFormulaCell* pEOFormulaTree; // formula tree (end), last cell
384  ScFormulaCell* pFormulaTrack; // BroadcastTrack (start)
385  ScFormulaCell* pEOFormulaTrack; // BroadcastTrack (end), last cell
386  std::unique_ptr<ScBroadcastAreaSlotMachine> pBASM; // BroadcastAreas
387  std::unique_ptr<ScChartListenerCollection> pChartListenerCollection;
388  std::unique_ptr<SvMemoryStream> pClipData;
389  std::unique_ptr<ScDetOpList> pDetOpList;
390  std::unique_ptr<ScChangeTrack> pChangeTrack;
391  std::unique_ptr<SfxBroadcaster> pUnoBroadcaster;
392  std::unique_ptr<ScUnoListenerCalls> pUnoListenerCalls;
393  std::unique_ptr<ScUnoRefList> pUnoRefUndoList;
394  std::unique_ptr<ScChangeViewSettings> pChangeViewSettings;
395  std::unique_ptr<ScScriptTypeData> pScriptTypeData;
396  std::unique_ptr<ScRefreshTimerControl> pRefreshTimerControl;
397  std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharacters;
398  std::unique_ptr<ScDBData> mpAnonymousDBData;
399  std::unique_ptr<sc::ExternalDataMapper> mpDataMapper;
400 
401  std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
402 
403  std::unique_ptr<ScDocProtection> pDocProtection;
404  std::unique_ptr<ScClipParam> mpClipParam;
405 
406  std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
407  std::unique_ptr<ScMacroManager> mpMacroMgr;
408 
409  // mutable for lazy construction
410  mutable std::unique_ptr< ScFormulaParserPool >
412 
413  OUString aDocName; // optional: name of document
414  OUString aDocCodeName; // optional: name of document (twice?)
415  OUString maFileURL; // file URL for copy & paste
418 
419  std::unique_ptr<ScViewOptions> pViewOptions; // view options
420  std::unique_ptr<ScDocOptions> pDocOptions; // document options
421  std::unique_ptr<ScExtDocOptions> pExtDocOptions; // for import etc.
422  std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options
423  std::unique_ptr<ScConsolidateParam> pConsolidateDlgData;
424 
425  std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
426 
427  std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
430  sal_Int64 nUnoObjectId; // counted up for UNO objects
431 
432  ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
433 
436 
438 
439  css::uno::Reference< css::script::vba::XVBAEventProcessor >
441 public:
443  std::vector<ScInterpreterTableOpParams*> m_TableOpList;
445 
446 private:
447 
448  LanguageType eLanguage; // default language
449  LanguageType eCjkLanguage; // default language for asian text
450  LanguageType eCtlLanguage; // default language for complex text
451  rtl_TextEncoding eSrcSet; // during reading: source character set
452 
456 
457  sal_uLong nFormulaCodeInTree; // formula RPN in the formula tree
458  sal_uLong nXMLImportedFormulaCount; // progress count during XML import
459  sal_uInt16 nInterpretLevel; // >0 if in interpreter
460  sal_uInt16 nMacroInterpretLevel; // >0 if macro in interpreter
461  sal_uInt16 nInterpreterTableOpLevel; // >0 if in interpreter TableOp
462 
464 
465  // There can be only one ScDocument being calculated in a thread at a time, so we can use a
466  // plain thread_local static member.
468 
470 
471  osl::Mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
472 
473  static const sal_uInt16 nSrcVer; // file version (load/save)
474  sal_uInt16 nFormulaTrackCount;
475  HardRecalcState eHardRecalcState; // off, temporary, eternal
476  SCTAB nVisibleTab; // for OLE etc., don't use inside ScDocument
477  SCCOL nPosLeft; // for OLE etc., don't use inside ScDocument
478  SCROW nPosTop; // for OLE etc., don't use inside ScDocument
479 
481 
482  bool bAutoCalc; // calculate automatically
483  bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled
484  // are there ForcedFormulas which have to be calculated
485  // in interaction with ScDocShell SetDocumentModified,
486  // AutoCalcShellDisabled and TrackFormulas
489  bool bIsClip;
490  bool bIsUndo;
492  bool bIsVisible; // set from view ctor
493 
494  bool bIsEmbedded; // display/adjust Embedded area?
495 
496  // no broadcast, construct no listener during insert from a different
497  // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
500  bool bImportingXML; // special handling of formula text
501  bool bCalcingAfterLoad; // in CalcAfterLoad TRUE
502  // don't construct/destruct listeners temporarily
505  bool bInLinkUpdate; // TableLink or AreaLink
507  // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
509  // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
511  // expand reference if insert column/row takes place at the border
512  // of a reference
513  // is fetched in each UpdateReference from InputOptions,
514  // assigned, and restored at the end of UpdateReference
516  // for detective update, is set for each change of a formula
518  // If the pointer is set, formula cells will not be automatically grouped into shared formula groups,
519  // instead the range will be extended to contain all such cells.
520  std::unique_ptr< ScRange > pDelayedFormulaGrouping;
521  // If non-empty, ScColumn::StartListeningFormulaCells() calls may be delayed using this,
522  // avoiding repeated calling for the same cells in the given range. The function will be called once
523  // later for all the cells in the range.
524  std::unordered_map< ScColumn*, std::pair<SCROW, SCROW>> pDelayedStartListeningFormulaCells;
525 
526  bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
527 
530 
532 
533  sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
534 
537  sal_uInt32 nAdjustHeightLock;
539 
541 
544  bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
546  bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
547 
549 
550  std::set<ScFormulaCell*> maSubTotalCells;
551 
552 
553  bool mbEmbedFonts : 1;
558 
559  std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
560 
563  // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
565 
567 
568 public:
569  bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
570  void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
571 
572  bool IsEmbedFonts() const { return mbEmbedFonts; }
577 
578  void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
579  void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
583 
584  SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
585  SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
586  sal_uLong GetCodeCount() const; // RPN-Code in formulas
587  DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
588  // number formatter
589 public:
591  SfxObjectShell* pDocShell = nullptr );
593 
594  void SetName( const OUString& r ) { aDocName = r; }
595  const OUString& GetCodeName() const { return aDocCodeName; }
596  void SetCodeName( const OUString& r ) { aDocCodeName = r; }
597  const OUString& GetFileURL() const { return maFileURL; }
598 
599  void GetDocStat( ScDocStat& rDocStat );
600 
601  SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
602 
604  {
606  return maInterpreterContext;
607  }
608  // Uses thread_local.
610  {
611  return IsThreadedGroupCalcInProgress() ? *maThreadSpecific.pContext : GetNonThreadedContext();
612  }
613  void SetupContextFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
614  void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
617 
620 
623 
624  SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
625  SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
627  SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
628  void SetPrintOptions();
629 
630  ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions.get(); }
631  SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
632 
633  ScClipOptions* GetClipOptions() { return mpClipOptions.get(); }
634  void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
635 
636  SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
637  void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
638 
639  void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
640  const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData.get(); }
641 
642  void Clear( bool bFromDestructor = false );
643 
644  std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
645  void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
646 
652  SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap);
653  SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
656  void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
657  void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
658  bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
659 
667  ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
668 
713  SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
714  SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
715  bool bSameDoc, int nRecursion ) const;
716 
757  bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
758  const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
759  const bool bUsedByFormula ) const;
760 
764  SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap );
771 
782  bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
783 
795  bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
796 
802 
803  SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
804 
805  ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
806  ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
809 
812 
813  SC_DLLPUBLIC ScDBCollection* GetDBCollection() const { return pDBCollection.get();}
814  void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
815  bool bRemoveAutoFilter = false );
816  const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
817  ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
818  SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
819  SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
822 
823  SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString* pName ) const;
824 
825  SC_DLLPUBLIC bool HasPivotTable() const;
828  SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
829  ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
830 
831  void StopTemporaryChartLock();
832 
833  void EnsureGraphicNames();
834 
835  SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
836  bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
837 
838  css::uno::Reference< css::chart2::XChartDocument > GetChartByName( std::u16string_view rChartName );
839 
840  SC_DLLPUBLIC void GetChartRanges( std::u16string_view rChartName, std::vector< ScRangeList >& rRanges, const ScDocument& rSheetNameDoc );
841  void SetChartRanges( std::u16string_view rChartName, const std::vector< ScRangeList >& rRanges );
842 
843  void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
844  bool bColHeaders, bool bRowHeaders, bool bAdd );
845  void UpdateChartArea( const OUString& rChartName,
846  const ScRangeListRef& rNewList,
847  bool bColHeaders, bool bRowHeaders, bool bAdd );
848  void GetOldChartParameters( std::u16string_view rName,
849  ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
850  css::uno::Reference<
851  css::embed::XEmbeddedObject >
852  FindOleObjectByName( std::u16string_view rName );
853 
854  SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
855 
856  SCTAB GetVisibleTab() const { return nVisibleTab; }
857  SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
858  SCCOL GetPosLeft() const { return nPosLeft; }
859  SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
860  SCROW GetPosTop() const { return nPosTop; }
861  SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
862 
863  SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
864  SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
865  SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
866  SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
867  SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
868  SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
869  SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
870  SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
872  [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
873  [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
874  [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
875  [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
876  [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
877  [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
878  [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
879  [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
880 
881  SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
882 
883  OUString GetCopyTabName(SCTAB nTab) const;
884 
885  SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
887 
892  SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
894 
897 
899  SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
900  SC_DLLPUBLIC bool IsDocProtected() const;
901  bool IsDocEditable() const;
902  SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
904  SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
905  void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
906 
907  void LockTable(SCTAB nTab);
908  void UnlockTable(SCTAB nTab);
909 
910  bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
911  SCCOL nEndCol, SCROW nEndRow,
912  bool* pOnlyNotBecauseOfMatrix = nullptr,
913  bool bNoMatrixAtAll = false ) const;
914  bool IsSelectionEditable( const ScMarkData& rMark,
915  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
916  bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
917  SCCOL nEndCol, SCROW nEndRow,
918  const ScMarkData& rMark ) const;
919 
920  bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
921  bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
922 
923  SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
924 
925  bool IsEmbedded() const { return bIsEmbedded;}
926  void GetEmbedded( ScRange& rRange ) const;
927  void SetEmbedded( const ScRange& rRange );
928  void ResetEmbedded();
929  tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
930  void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
931 
932  static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
933 
934  SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
935  SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
936  SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
937 
938  void AppendTabOnLoad(const OUString& rName);
939  void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
940  void InvalidateStreamOnSave();
941 
942  SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
943  bool bExternalDocument = false, bool bUndoDeleteTab = false );
944 
945  SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
946  bool bNamesValid = false );
947  SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
948  SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
949  SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
950  bool bExternalDocument = false );
951  bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
952  bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
953  const ScMarkData* pOnlyMarked = nullptr );
954  SC_DLLPUBLIC sal_uLong TransferTab(ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
955  bool bInsertNew = true,
956  bool bResultsOnly = false );
957  SC_DLLPUBLIC void TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
958  SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
959  SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
960  bool IsStreamValid( SCTAB nTab ) const;
961  void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
962  void LockStreamValid( bool bLock );
963  bool IsStreamValidLocked() const { return mbStreamValidLocked; }
964  bool IsPendingRowHeights( SCTAB nTab ) const;
965  void SetPendingRowHeights( SCTAB nTab, bool bSet );
966  SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL );
967  SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
968  SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
969  SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
970  SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
971  SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
972  Color& rColor, ScScenarioFlags &rFlags) const;
973  SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
974  const Color& rColor, ScScenarioFlags nFlags);
975  SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
976  SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
977  SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
978  void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
979  SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
980  SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
985  bool IsLinked( SCTAB nTab ) const;
986  SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
987  OUString GetLinkFlt( SCTAB nTab ) const;
988  OUString GetLinkOpt( SCTAB nTab ) const;
989  SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
990  sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
991  void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
992  const OUString& rFilter, const OUString& rOptions,
993  const OUString& rTabName, sal_uLong nRefreshDelay );
994  bool HasLink( std::u16string_view rDoc,
995  std::u16string_view rFilter, std::u16string_view rOptions ) const;
996  SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
997  const OUString& aFileName,
998  const OUString& aTabName );
999 
1000  bool HasExternalRefManager() const { return bool(pExternalRefMgr); }
1002  bool IsInExternalReferenceMarking() const;
1004  bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1005 
1009 
1010  bool HasAreaLinks() const;
1012  void UpdateAreaLinks();
1013 
1014  // originating DDE links
1015  void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; }
1016  void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
1017  bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1018 
1019  SC_DLLPUBLIC void CopyDdeLinks( ScDocument& rDestDoc ) const;
1020 
1024  SC_DLLPUBLIC bool FindDdeLink( std::u16string_view rAppl, std::u16string_view rTopic,
1025  std::u16string_view rItem, sal_uInt8 nMode, size_t& rnDdePos );
1026 
1033  bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1038  bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1042  SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1043 
1047  SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1052  bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1053 
1056  SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer.get(); }
1057  SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1058  SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1059  void BeginDrawUndo();
1060 
1061  void BeginUnoRefUndo();
1062  bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1063  [[nodiscard]]
1064  std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1065  sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1066  void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1067 
1068  static bool IsChart( const SdrObject* pObject );
1069 
1070  void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1071  SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1072  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1073  SCCOL nDx, SCROW nDy, SCTAB nDz );
1075  void SetChartRangeList( std::u16string_view rChartName,
1076  const ScRangeListRef& rNewRangeListRef );
1077 
1078  void StartAnimations( SCTAB nTab );
1079 
1080  bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1081  bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1082 
1083  const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1084  void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1085  bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1086  bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1087 
1088  bool HasAnyCalcNotification() const;
1089  bool HasCalcNotification( SCTAB nTab ) const;
1090  void SetCalcNotification( SCTAB nTab );
1091  void ResetCalcNotifications();
1092 
1093  SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1094  bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1095 
1096  void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1097  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1098 
1099  bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1100  void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1101  bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1102  bool HasSubTotalCells( const ScRange& rRange );
1103 
1104  SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1105 
1106  // return TRUE = number format is set
1107  SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1108  const ScSetStringParam * pParam = nullptr );
1109  SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1110  const ScSetStringParam* pParam = nullptr );
1111 
1121  SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1122  void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1123  SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1124  SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1125 
1130  SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1131  void SetEmptyCell( const ScAddress& rPos );
1132  SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1133  SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1134  void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1135  void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1136  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1137  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1139 
1149  bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1150 
1154  bool HasFormulaCell( const ScRange& rRange ) const;
1155  SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1156  SCCOL nCol2, SCROW nRow2,
1157  const ScMarkData& rMark,
1158  const OUString& rFormula,
1159  const ScTokenArray* p = nullptr,
1161  SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1162  SCCOL nCol1, SCROW nRow1,
1163  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1164 
1165  SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1166  const ScInterpreterContext* pContext = nullptr ) const;
1167  SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1168  const ScInterpreterContext* pContext = nullptr ) const;
1169 
1178  SC_DLLPUBLIC double* GetValueCell( const ScAddress& rPos );
1179 
1182 
1183  svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1184 
1185  std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1188  { mbFormulaGroupCxtBlockDiscard = block; }
1189 
1190  SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rString );
1191  FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1192  SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1193  SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1194  SC_DLLPUBLIC void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue ) const;
1195  SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1196  void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1197  SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1198  SC_DLLPUBLIC void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
1199  sal_uInt32& rFormat ) const;
1200  sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1201  SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1202  void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1203 
1204  void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1205  SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1207  SC_DLLPUBLIC void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rFormula ) const;
1208  SC_DLLPUBLIC void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
1209  SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1210 
1211  SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1212  SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1213  SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1214  SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1215  bool HasStringCells( const ScRange& rRange ) const;
1216 
1218  bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1219  bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1220 
1227  sc::MultiDataCellState HasMultipleDataCells( const ScRange& rRange ) const;
1228 
1230  SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1231  SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1232  void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1233  void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1234  SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1235  bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1236  SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1237  SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1238  bool HasNotes() const;
1239  SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1241  SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos);
1242  size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1243 
1248  void CreateAllNoteCaptions();
1249  void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1251 
1252  ScAddress GetNotePosition( size_t nIndex ) const;
1253  ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1254  SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1255 
1256  SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1257  SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1258  void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1259  bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1260 
1261  SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab);
1262 
1263  bool IsMerged( const ScAddress& rPos ) const;
1264 
1265  void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1266  SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1267  bool bRefresh = false );
1268  SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1269  SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1270  bool bRefresh = false );
1271  bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1272  SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1273  SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1274  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1275  SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1276 
1277  bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1278  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1279 
1280  SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1281  SCCOL nEndCol, SCROW nEndRow );
1282  SC_DLLPUBLIC void DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1283  SCCOL nEndCol, SCROW nEndRow );
1284  // without checking:
1285  SC_DLLPUBLIC void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1286  SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true );
1287  void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1288 
1289  bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1290  SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const;
1291  bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1292  SCCOL nEndCol, SCROW nEndRow,
1293  bool bLeftIsEmpty = false,
1294  ScRange* pLastRange = nullptr,
1295  tools::Rectangle* pLastMM = nullptr ) const;
1296 
1297  void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1298  bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1299  bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1300 
1301  SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1302  SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1303  SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1304 
1305  SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1306  const ::editeng::SvxBorderLine** ppLeft,
1307  const ::editeng::SvxBorderLine** ppTop,
1308  const ::editeng::SvxBorderLine** ppRight,
1309  const ::editeng::SvxBorderLine** ppBottom ) const;
1310 
1311  void ResetChanged( const ScRange& rRange );
1312 
1313  void CheckVectorizationState();
1314  void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
1315  void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1316  void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1317  void InterpretDirtyCells( const ScRangeList& rRanges );
1318  SC_DLLPUBLIC void CalcAll();
1319  SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1320  void CompileAll();
1321  void CompileXML();
1322 
1333  bool CompileErrorCells(FormulaError nErrCode);
1334 
1335  ScAutoNameCache* GetAutoNameCache() { return pAutoNameCache.get(); }
1336  void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1337  SfxItemSet* GetPreviewFont() { return pPreviewFont.get(); }
1338  SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1340  void SetPreviewSelection( const ScMarkData& rSel );
1342  ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1343  void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; }
1344  SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1345 
1348  ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1351  void RemoveLookupCache( ScLookupCache & rCache );
1353  void ClearLookupCaches();
1354 
1355  // calculate automatically
1356  SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1357  SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1358  // calculate automatically in/from/for ScDocShell disabled
1359  void SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; }
1361  // ForcedFormulas are to be calculated
1362  void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
1364  // if CalcFormulaTree() is currently running
1368  void DelayFormulaGrouping( bool delay );
1369  bool IsDelayedFormulaGrouping() const { return bool(pDelayedFormulaGrouping); }
1371  void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1375  void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1376  bool IsEnabledDelayStartListeningFormulaCells( ScColumn* column ) const;
1379  bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1380 
1381  FormulaError GetErrCode( const ScAddress& ) const;
1382 
1395  bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1396 
1412  bool ShrinkToUsedDataArea( bool& o_bShrunk,
1413  SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1414  SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1415  bool bStickyTopRow = false, bool bStickyLeftCol = false,
1416  bool bConsiderCellNotes = false,
1417  bool bConsiderCellDrawObjects = false ) const;
1418 
1429  SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1430 
1444  SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1445  SCCOL& rEndCol, SCROW& rEndRow,
1446  bool bIncludeOld, bool bOnlyDown ) const;
1447 
1455  bool GetDataAreaSubrange(ScRange& rRange) const;
1456 
1457  SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1458  SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1459  SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1460  bool bNotes = true ) const;
1461  SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1462  SCCOL& rEndCol ) const;
1463  SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1464  SCROW& rEndRow, bool bNotes ) const;
1465  void InvalidateTableArea();
1466 
1468  SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1469 
1470  SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1471 
1477  void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1478  SCCOL nStartCol, SCROW nStartRow,
1479  SCCOL& rEndCol, SCROW nEndRow ) const;
1480  SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1481  SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1482  ScDirection eDir );
1483 
1484  void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1485  SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1486  bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1487  SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1488 
1489  bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1490  const ScMarkData& rMark );
1491 
1492  void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1493  SCCOL& rEndCol, SCROW& rEndRow );
1494  void LimitChartIfAll( ScRangeListRef& rRangeList );
1495 
1496  bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1497  SCCOL nEndCol, SCTAB nEndTab,
1498  SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1499  const ScMarkData* pTabMark = nullptr );
1500  SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1501  void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1502  SCCOL nEndCol, SCTAB nEndTab,
1503  SCROW nStartRow, SCSIZE nSize,
1504  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1505  const ScMarkData* pTabMark = nullptr );
1506  SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1507  bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1508  SCROW nEndRow, SCTAB nEndTab,
1509  SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1510  const ScMarkData* pTabMark = nullptr );
1511  SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1512  void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1513  SCROW nEndRow, SCTAB nEndTab,
1514  SCCOL nStartCol, SCSIZE nSize,
1515  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1516  const ScMarkData* pTabMark = nullptr );
1517  void DeleteCol( const ScRange& rRange );
1518 
1519  bool CanInsertRow( const ScRange& rRange ) const;
1520  bool CanInsertCol( const ScRange& rRange ) const;
1521 
1522  void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1523  bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1524 
1525  bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1526  bool IsUndo() const { return bIsUndo; }
1527  bool IsClipboard() const { return bIsClip; }
1528  bool IsUndoEnabled() const { return mbUndoEnabled; }
1529  SC_DLLPUBLIC void EnableUndo( bool bVal );
1530  bool IsFunctionAccess() const { return bIsFunctionAccess; }
1531 
1532  bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1536  void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1538  void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1540  SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1542  void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
1543  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1544  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1545  void SetCutMode( bool bCut );
1546  bool IsCutMode();
1547  void SetClipArea( const ScRange& rArea, bool bCut = false );
1548 
1549  SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1550  SC_DLLPUBLIC void SetDocVisible( bool bSet );
1551 
1552  bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1553 
1554  void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1555  const ScMarkData& rMark, bool bAnchored = false );
1556  void DeleteObjectsInSelection( const ScMarkData& rMark );
1557 
1558  void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1559  InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1560  sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1561 
1562  SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1563  SCTAB nTab, InsertDeleteFlags nDelFlag);
1564  void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1565 
1566  SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1567  const ScMarkData* pMarks, bool bKeepScenarioFlags,
1568  bool bIncludeObjects );
1569 
1579  SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1580 
1588  void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1589 
1590  void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1591  SCTAB nTab, ScDocument* pClipDoc);
1592 
1594 
1596  sc::ColumnSpanSet& rBroadcastSpans );
1597 
1598  bool CopyOneCellFromClip(sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1599  SCCOL nCol2, SCROW nRow2 );
1600  void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1601  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1602  SCCOL nDx, SCROW nDy );
1604  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1605  const ScMarkData& rMark, SCCOL nDx, SCROW & rClipStartRow );
1606 
1607  void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1608  SCCOL nCol2, SCROW nRow2,
1609  const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1610 
1611  void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1612  const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1613  sc::ColumnSpanSet& rBroadcastSpans );
1614 
1617  SC_DLLPUBLIC void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
1618  InsertDeleteFlags nInsFlag,
1619  ScDocument* pRefUndoDoc,
1620  ScDocument* pClipDoc,
1621  bool bResetCut = true,
1622  bool bAsLink = false,
1623  bool bIncludeFiltered = true,
1624  bool bSkipAttrForEmpty = false,
1625  const ScRangeList * pDestRanges = nullptr );
1626 
1627  void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1628  InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1629  bool bResetCut = true, bool bAsLink = false,
1630  bool bIncludeFiltered = true,
1631  bool bSkipAttrForEmpty = false);
1632 
1633  void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1634  void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1635 
1636  bool HasClipFilteredRows();
1637 
1638  bool IsClipboardSource() const;
1639 
1640  SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink );
1641 
1643  void SetClipParam(const ScClipParam& rParam);
1644 
1650  void ClosingClipboardSource();
1651 
1652  void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1653  ScDocument& rSrcDoc );
1654 
1655  void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1656  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1657  bool bSkipEmpty, bool bAsLink );
1658  void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1659  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1660  bool bSkipEmpty, bool bAsLink );
1661 
1662  void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1663 
1664  SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1665  bool bColInfo = false, bool bRowInfo = false );
1666  void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1667  bool bColInfo = false, bool bRowInfo = false );
1668  SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1669  bool bColInfo = false, bool bRowInfo = false );
1670 
1671  // don't use anymore:
1672  void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1673  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1674  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1675  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1676  void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1677  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1678  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1679 
1680  void CopyToDocument(const ScRange& rRange,
1681  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1682  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1683  void UndoToDocument(const ScRange& rRange,
1684  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1685 
1686  void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1687  bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1688  void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1689  ScMarkData& rDestMark, bool bResetMark = true,
1690  ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1691  bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1692  SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1693 
1694  SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1695 
1697  pUndoDoc = nullptr, bool bIncludeDraw = true,
1698  bool bUpdateNoteCaptionPos = true );
1699 
1700  SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1701  const ScMarkData& rMark, ScDocument* pUndoDoc );
1702 
1703  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1704 
1705  SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1706  ScProgress* pProgress, const ScMarkData& rMark,
1707  sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1708  FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1709  double nStepValue = 1.0, double nMaxValue = 1E307 );
1710  OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1711 
1713  const ScAddress& rCursor, const ScMarkData& rMark,
1714  double& rResult );
1715 
1716  SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1717  template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1718  {
1719  return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1720  }
1721  SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1722  template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1723  {
1724  return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1725  }
1726  SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1727  SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1728  SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1729  const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1730  std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1731  SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1732  void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1733 
1734  SC_DLLPUBLIC ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1735  // pCell is an optimization, must point to rPos
1736  SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1737  ScRefCellValue* pCell = nullptr ) const;
1738  const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1739  const ScConditionalFormatList& rList,
1740  const ScCondFormatIndexes& rIndex ) const;
1741  const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1742  template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1743  {
1744  return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1745  }
1746 
1747  SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1748  bool HasStringWeakCharacters( const OUString& rString );
1749  SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1750  // pCell is an optimization, must point to rPos
1751  SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1752  const ScRefCellValue* pCell = nullptr );
1753  // pCell is an optimization, must point to nCol,nRow,nTab
1755  const ScRefCellValue* pCell = nullptr );
1756  SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1757  SvtScriptType GetRangeScriptType( const ScRangeList& rRanges );
1758 
1759  bool HasDetectiveOperations() const;
1760  void AddDetectiveOperation( const ScDetOpData& rData );
1761  void ClearDetectiveOperations();
1762  ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1763  void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1764 
1765  bool HasDetectiveObjects(SCTAB nTab) const;
1766 
1767  void GetSelectionFrame( const ScMarkData& rMark,
1768  SvxBoxItem& rLineOuter,
1769  SvxBoxInfoItem& rLineInner );
1770  void ApplySelectionFrame(const ScMarkData& rMark,
1771  const SvxBoxItem& rLineOuter,
1772  const SvxBoxInfoItem* pLineInner);
1773  void ApplyFrameAreaTab(const ScRange& rRange,
1774  const SvxBoxItem& rLineOuter,
1775  const SvxBoxInfoItem& rLineInner);
1776 
1777  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1778  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1779 
1780  SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1781  void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1782 
1783  void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1786 
1788 
1789  const ScValidationDataList* GetValidationList() const { return pValidationList.get();}
1790  ScValidationDataList* GetValidationList() { return pValidationList.get();}
1791 
1792  SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1793  const SfxPoolItem& rAttr );
1794  SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1795  const ScPatternAttr& rAttr );
1796  SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1797  SCCOL nEndCol, SCROW nEndRow,
1798  const ScMarkData& rMark, const ScPatternAttr& rAttr,
1799  ScEditDataArray* pDataArray = nullptr,
1800  bool* const pIsChanged = nullptr );
1801  SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1802  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1803  const ScPatternAttr& rAttr );
1804 
1806  const ScMarkData& rMark,
1807  const ScPatternAttr& rPattern,
1808  SvNumFormatType nNewType );
1809 
1810  void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1811  const ScStyleSheet& rStyle);
1812  void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1813  SCCOL nEndCol, SCROW nEndRow,
1814  const ScMarkData& rMark, const ScStyleSheet& rStyle);
1815  SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1816  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1817  const ScStyleSheet& rStyle);
1818 
1819  SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1820  void ApplySelectionLineStyle( const ScMarkData& rMark,
1821  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1822 
1823  const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1824  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1825 
1826  void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1827  OutputDevice* pDev,
1828  double nPPTX, double nPPTY,
1829  const Fraction& rZoomX, const Fraction& rZoomY );
1830 
1831  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1832 
1833  SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1834  SCCOL nEndCol, SCROW nEndRow,
1835  SCTAB nTab, ScMF nFlags );
1836  SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1837  SCCOL nEndCol, SCROW nEndRow,
1838  SCTAB nTab, ScMF nFlags );
1839 
1840  SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1841  SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> );
1842  SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1843 
1844  void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1845  sal_uInt16 nFormatNo, const ScMarkData& rMark );
1846  void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1847  ScAutoFormatData& rData );
1848  bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1849  SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1850  const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1851  OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
1852 
1853  // determine Col/Row of subsequent calls
1854  // (e.g. not found from the beginning, or subsequent tables)
1855  // meaning of explanation in "()" was already unclear in German
1856  void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1857  SCCOL& rCol, SCROW& rRow );
1858 
1859  bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1860  SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1861  const OUString& sValStr, double& nX);
1862 
1863  SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1864  ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1865  void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1866  void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1867 
1868  SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1869  SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1870  SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1871  SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1872  sal_uInt16 nNewHeight );
1873 
1874  SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1875  sal_uInt16 nNewHeight );
1876  SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1877 
1878  SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1879  SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1880  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1881  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const;
1882  SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1883 
1889  SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
1890  sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
1891  SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1892  SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1893 
1894  SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1895  SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1896 
1897  sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1898 
1899  SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1900 
1901  sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1902  double nPPTX, double nPPTY,
1903  const Fraction& rZoomX, const Fraction& rZoomY,
1904  bool bFormula,
1905  const ScMarkData* pMarkData = nullptr,
1906  const ScColWidthParam* pParam = nullptr );
1907 
1909  SCROW nEndRow, SCTAB nTab );
1910 
1911  void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
1912 
1913  tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
1914  OutputDevice* pDev,
1915  double nPPTX, double nPPTY,
1916  const Fraction& rZoomX, const Fraction& rZoomY,
1917  bool bWidth, bool bTotalSize = false,
1918  bool bInPrintTwips = false );
1919 
1920  SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
1921  SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
1922  SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
1923  SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
1924  SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
1925 
1926  SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
1927  SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
1928 
1929  SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1930  SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1931  SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const;
1932  SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const;
1933  SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1934  SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1935  void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1936  void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1937  css::uno::Sequence<
1938  css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
1939 
1940  SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1941  SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1942  SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
1943  SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
1944  SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
1945  SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1946  SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1947  SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1948 
1949  bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1950  bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1951  bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
1952  SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
1953  SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1954  SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1955  SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1956 
1957  SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
1958 
1959  bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
1960 
1966  void SyncColRowFlags();
1967 
1969  SC_DLLPUBLIC SCROW GetLastFlaggedRow( SCTAB nTab ) const;
1970 
1972  SCCOL GetLastChangedCol( SCTAB nTab ) const;
1974  SCROW GetLastChangedRow( SCTAB nTab ) const;
1975 
1976  SCCOL GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const;
1977 
1978  SCROW GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart) const;
1979 
1980  // returns whether to export a Default style for this col or not
1981  // nDefault is set to one position in the current row where the Default style is
1982  void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
1983 
1984  bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
1985  bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
1986 
1987  void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
1988  void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
1989 
1993  void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
1994 
1995  // PageStyle:
1996  SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
1997  SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
1998  Size GetPageSize( SCTAB nTab ) const;
1999  void SetPageSize( SCTAB nTab, const Size& rSize );
2000  void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2001  void InvalidatePageBreaks(SCTAB nTab);
2002  void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2003  void RemoveManualBreaks( SCTAB nTab );
2004  bool HasManualBreaks( SCTAB nTab ) const;
2005 
2006  bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2007  bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2008  bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2009  void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2010  const SfxItemSet& rChanges );
2011 
2012  void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2013 
2014  SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2015 
2016  // Was stored in PageStyle previously. Now it exists for every table:
2017  SC_DLLPUBLIC bool HasPrintRange();
2018  SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2019  SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2023  bool IsPrintEntireSheet( SCTAB nTab ) const;
2024 
2026  SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2028  SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2030  SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
2031  SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2032  SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2033  std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2034  void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2035 
2036  SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2037  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2038  SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2039 
2040  void UpdStlShtPtrsFrmNms();
2041  void StylesToNames();
2042 
2043  SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2044 
2045  static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2046 
2047  void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2048  void UpdateFontCharSet();
2049 
2050  void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2051  SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2052  double fRowScale, bool bPageMode, bool bFormulaMode,
2053  const ScMarkData* pMarkData = nullptr );
2054 
2056 
2058  void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2059  bool bKeepQuery, bool bUpdateRefs,
2060  ScProgress* pProgress, sc::ReorderParam* pUndo );
2061 
2062  void Reorder( const sc::ReorderParam& rParam );
2063 
2064  SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2065  SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2066  void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rStr);
2067 
2074  void GetFilterEntries( SCCOL nCol, SCROW nRow,
2075  SCTAB nTab, ScFilterEntries& rFilterEntries );
2076 
2077  SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2078  SCTAB nTab, bool bCaseSens,
2079  ScFilterEntries& rFilterEntries );
2080 
2081  void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2082  std::vector<ScTypedStrData>& rStrings, bool bLimit = false );
2083  void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2084 
2085  bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2086  void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2087 
2088  SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2089  SCTAB nTab );
2090  SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2091  SCTAB nTab );
2092 
2093  SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2094  void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2096  SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2097 
2098  bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2099  bool bInSel, const ScMarkData& rMark) const;
2100 
2101  void ReplaceStyle( const SvxSearchItem& rSearchItem,
2102  SCCOL nCol, SCROW nRow, SCTAB nTab,
2103  const ScMarkData& rMark);
2104 
2105  void InvalidateTextWidth( std::u16string_view rStyleName );
2106  void InvalidateTextWidth( SCTAB nTab );
2107  void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2108 
2109  bool IdleCalcTextWidth();
2110 
2111  void RepaintRange( const ScRange& rRange );
2112  void RepaintRange( const ScRangeList& rRange );
2113 
2114  bool IsIdleEnabled() const { return mbIdleEnabled; }
2115  void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2116 
2117  bool IsDetectiveDirty() const { return bDetectiveDirty; }
2118  void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2119 
2121  void SetLinkFormulaNeedingCheck(bool bSet) { bLinkFormulaNeedingCheck = bSet; }
2124 
2125  void SetRangeOverflowType(ErrCode nType) { nRangeOverflowType = nType; }
2126  bool HasRangeOverflow() const { return nRangeOverflowType != ERRCODE_NONE; }
2128 
2129  // for broadcasting/listening
2130  void SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; }
2132  void SetLoadingMedium( bool bVal );
2133  SC_DLLPUBLIC void SetImportingXML( bool bVal );
2134  bool IsImportingXML() const { return bImportingXML; }
2135  bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2136  void SetNoListening( bool bVal ) { bNoListening = bVal; }
2137  bool GetNoListening() const { return bNoListening; }
2138  ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2139 
2140  SC_DLLPUBLIC ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection.get(); }
2141  void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2142  bool bSetChartRangeLists );
2143  void UpdateChart( const OUString& rName );
2144  void RestoreChartListener( const OUString& rName );
2147  void SetChartListenerCollectionNeedsUpdate( bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; }
2148  void AddOLEObjectToCollection(const OUString& rName);
2149 
2150  ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings.get(); }
2152 
2153  const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2154  void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2155 
2157  bool IsValidAsianCompression() const;
2159 
2160  bool GetAsianKerning() const;
2161  bool IsValidAsianKerning() const;
2162  void SetAsianKerning(bool bNew);
2164 
2165  EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2166 
2168  void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2169 
2171 
2172  void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2173  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2174  svl::SharedStringPool* pPool = nullptr) const;
2175 
2184  void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2185 
2186  void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2187  void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2188 
2194  void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2195  void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2196 
2197  std::set<Color> GetDocColors();
2199 
2200 private:
2201  ScDocument(const ScDocument& r) = delete;
2202 
2203  void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2204  SCCOL nX1, SCCOL nX2 ) const;
2205 
2206  sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2207  ScDocument& rOtherDoc,
2208  SCROW nOtherRow, SCTAB nOtherTab,
2209  SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2210  sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2211  ScDocument& rOtherDoc,
2212  SCCOL nOtherCol, SCTAB nOtherTab,
2213  SCROW nMaxRow, const SCCOLROW* pOtherRows );
2214  void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2215  bool bColumns,
2216  ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2217  SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2218  ScProgress* pProgress, sal_uLong nProAdd );
2219 
2220  DECL_LINK(TrackTimeHdl, Timer *, void);
2221 
2237  bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2238  bool& o_bEntirelyOutOfBounds ) const;
2239 
2240 public:
2241  void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2242 
2243  void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2249  void Broadcast( const ScHint& rHint );
2250 
2251  void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2252 
2254  void AreaBroadcast( const ScHint& rHint );
2255  void DelBroadcastAreasInRange( const ScRange& rRange );
2256  void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2257  const ScRange& rRange,
2258  SCCOL nDx, SCROW nDy, SCTAB nDz );
2259 
2260  void StartListeningCell( const ScAddress& rAddress,
2261  SvtListener* pListener );
2262  void EndListeningCell( const ScAddress& rAddress,
2263  SvtListener* pListener );
2264 
2265  void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2266  void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2267 
2268  void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2269 
2270  void PutInFormulaTree( ScFormulaCell* pCell );
2271  void RemoveFromFormulaTree( ScFormulaCell* pCell );
2272 
2286  SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2287  void ClearFormulaTree();
2288  void AppendToFormulaTrack( ScFormulaCell* pCell );
2289  void RemoveFromFormulaTrack( ScFormulaCell* pCell );
2290  void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2293  void FinalTrackFormulas( SfxHintId nHintId );
2295  bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2296  bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2298  void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; }
2299  void StartAllListeners();
2300  void StartNeededListeners();
2301  void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2302  void StartAllListeners( const ScRange& rRange );
2303 
2304  void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2306 
2307  bool IsInInterpreter() const { return nInterpretLevel != 0; }
2308 
2310  {
2312  if ( nInterpretLevel < USHRT_MAX )
2313  nInterpretLevel++;
2314  }
2316  {
2318  if ( nInterpretLevel )
2319  nInterpretLevel--;
2320  }
2321  sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2323  {
2325  if ( nMacroInterpretLevel < USHRT_MAX )
2326  nMacroInterpretLevel++;
2327  }
2329  {
2331  if ( nMacroInterpretLevel )
2332  nMacroInterpretLevel--;
2333  }
2334  bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; }
2336  {
2337  if ( nInterpreterTableOpLevel < USHRT_MAX )
2338  nInterpreterTableOpLevel++;
2339  }
2341  {
2342  if ( nInterpreterTableOpLevel )
2343  nInterpreterTableOpLevel--;
2344  }
2345 
2346  // add a formula to be remembered for TableOp broadcasts
2348  void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = false; }
2350  bool IsInDtorClear() const { return bInDtorClear; }
2351  void SetExpandRefs( bool bVal );
2352  bool IsExpandRefs() const { return bExpandRefs; }
2353 
2356  {
2357  if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount )
2358  nXMLImportedFormulaCount += nVal;
2359  }
2361  {
2362  if ( nVal <= nXMLImportedFormulaCount )
2363  nXMLImportedFormulaCount -= nVal;
2364  else
2365  nXMLImportedFormulaCount = 0;
2366  }
2367 
2368  void StartTrackTimer();
2369 
2370  void CompileDBFormula();
2371  void CompileColRowNameFormula();
2372 
2377  sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2378  SCROW nRowStart, SCROW nRowEnd,
2379  rtl_TextEncoding eCharSet ) const;
2383  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2384  SCTAB nTab, SCCOL nCol,
2385  SCROW nRowStart, SCROW nRowEnd ) const;
2386 
2387  void KeyInput(); // TimerDelays etc.
2388 
2389  ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2390 
2393  SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2394 
2395  void StartChangeTracking();
2396  void EndChangeTracking();
2397 
2398  SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2399 
2400  void AddUnoObject( SfxListener& rObject );
2401  void RemoveUnoObject( SfxListener& rObject );
2402  void BroadcastUno( const SfxHint &rHint );
2403  void AddUnoListenerCall( const css::uno::Reference<
2404  css::util::XModifyListener >& rListener,
2405  const css::lang::EventObject& rEvent );
2406 
2407  void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2408  bool IsInLinkUpdate() const; // including DdeLink
2409 
2414 
2415  std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2416  { return pRefreshTimerControl; }
2417 
2418  void SetPastingDrawFromOtherDoc( bool bVal )
2419  { bPastingDrawFromOtherDoc = bVal; }
2421  { return bPastingDrawFromOtherDoc; }
2422 
2424  sal_uInt32 GetDocumentID() const;
2425 
2426  void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; }
2427  void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2428  void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2429 
2430  void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2431  { mxVbaEvents = rxVbaEvents; }
2432  const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2433 
2437 
2439  bool IsInVBAMode() const;
2441 
2442  void AddSubTotalCell(ScFormulaCell* pCell);
2443  void RemoveSubTotalCell(ScFormulaCell* pCell);
2444  void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2445 
2446  sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2447 
2448  SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2449  void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2450  void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2451 
2452  size_t GetFormulaHash( const ScAddress& rPos ) const;
2453 
2464  void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2465  void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2466  void RegroupFormulaCells( const ScRange& range );
2467 
2469 
2472 
2474  bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2475 #ifdef DBG_UTIL
2476  void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2477 #endif
2478 
2483  void PrepareFormulaCalc();
2484 
2499  SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2500 
2501  SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2502  const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2503  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2504 
2505  std::unique_ptr<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2506  void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2507 
2508  SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2509  SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2510 
2511 #if DUMP_COLUMN_STORAGE
2512  SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2513 #endif
2514 
2515 #if DEBUG_AREA_BROADCASTER
2516  SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2517 #endif
2518 
2519  SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2520  const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2521  void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2522  void SwapNonEmpty( sc::TableValues& rValues );
2523  void finalizeOutlineImport();
2524  bool TableExists( SCTAB nTab ) const;
2525 
2526  SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2527 
2528  bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2529  void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2530 
2539  OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2540 
2541  SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2542  SCROW GetLOKFreezeRow(SCTAB nTab) const;
2543  bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2544  bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2545 
2546 private:
2547 
2554  {
2555  public:
2556  explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2558 
2559  private:
2561  };
2562 
2563  ScTable* FetchTable( SCTAB nTab );
2564  const ScTable* FetchTable( SCTAB nTab ) const;
2565 
2566  void MergeNumberFormatter(const ScDocument& rSrcDoc);
2567 
2568  void ImplCreateOptions(); // Suggestion: switch to on-demand?
2569  void ImplDeleteOptions();
2570 
2571  void DeleteDrawLayer();
2572  SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2573 
2574  void UpdateDrawPrinter();
2575  void UpdateDrawLanguages();
2576  SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2577 
2578  void LoadDdeLinks(SvStream& rStream);
2579  void SaveDdeLinks(SvStream& rStream) const;
2580 
2581  void DeleteAreaLinksOnTab( SCTAB nTab );
2582  void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2583  const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2584 
2585  void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2586 
2587  bool HasPartOfMerged( const ScRange& rRange );
2588 
2589  ScRefCellValue GetRefCellValue( const ScAddress& rPos );
2591 
2592  std::map< SCTAB, ScSortParam > mSheetSortParams;
2593 
2594  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2595  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2596  void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2597 
2598  void SharePooledResources( const ScDocument* pSrcDoc );
2599 
2601  sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2602 
2604  sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2605 
2606  void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2607  void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2608 };
2609 
2610 typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2611 
2618 {
2619 #ifndef NDEBUG
2621  : mnFlagRestore(rDocument.mnMutationGuardFlags)
2622  , mrDocument(rDocument)
2623  {
2624  assert((mnFlagRestore & nFlags) == 0);
2625  mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2626  }
2628  {
2630  }
2633 #else
2635  {
2636  (void)rDocument; (void)nFlags;
2637  }
2638 #endif
2639 };
2640 
2651 {
2652 #ifndef NDEBUG
2654  : mnFlags(static_cast<size_t>(nFlags))
2655  , mrDocument(rDocument)
2656  {
2658  }
2659 
2661  {
2663  }
2664  size_t mnFlags;
2666 #else
2667  ScMutationGuard(ScDocument& rDocument, ScMutationGuardFlags nFlags)
2668  {
2669  (void)rDocument; (void)nFlags;
2670  }
2671 #endif
2672 };
2673 
2675 {
2677 
2678 public:
2680  : mrDoc(rDoc)
2681  {
2682  assert(!mrDoc.IsInDocShellRecalc());
2683  mrDoc.SetDocShellRecalc(true);
2684  }
2685 
2687  {
2688  mrDoc.SetDocShellRecalc(false);
2689  }
2690 };
2691 
2692 #endif
2693 
2694 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC void UpdateTranspose(const ScAddress &rDestPos, ScDocument *pClipDoc, const ScMarkData &rMark, ScDocument *pUndoDoc)
Definition: documen3.cxx:1103
exports com.sun.star.lib. util
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3294
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:505
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1878
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:6815
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:572
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:615
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:113
bool IsInFormulaTree(const ScFormulaCell *pCell) const
Definition: documen7.cxx:320
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:539
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:519
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4748
bool mbEmbedFontScriptComplex
Definition: document.hxx:557
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
Definition: documen6.cxx:40
void BeginDrawUndo()
Definition: documen9.cxx:58
bool IsInDocShellRecalc() const
Definition: document.hxx:2528
void ClearDetectiveOperations()
Definition: documen4.cxx:898
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2068
ScCalcConfig maCalcConfig
Definition: document.hxx:362
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5320
ScMutationGuard(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2653
void AssertNoInterpretNeeded(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1805
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:371
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4296
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:346
bool IsValidAsianKerning() const
Definition: documen9.cxx:647
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
Definition: document.cxx:1829
std::shared_ptr< SvxForbiddenCharactersTable > xForbiddenCharacters
Definition: document.hxx:397
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:1584
void IncInDdeLinkUpdate()
Definition: document.hxx:1015
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:365
void EnableIdle(bool bDo)
Definition: document.hxx:2115
void ClearLookupCaches()
Zap all caches.
Definition: documen2.cxx:1192
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6214
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:815
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4857
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:368
bool HasExternalRefManager() const
Definition: document.hxx:1000
bool bIsUndo
Definition: document.hxx:490
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4827
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:1365
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5665
bool bStyleSheetUsageInvalid
Definition: document.hxx:540
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4704
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4698
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:5913
SfxHintId
sal_uLong GetXMLImportedFormulaCount() const
Definition: document.hxx:2354
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:44
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:878
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4849
ScFormulaCell * pFormulaTree
Definition: document.hxx:382
void CalculateInColumnInThread(ScInterpreterContext &rContext, const ScRange &rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
Definition: documen8.cxx:410
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1507
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1860
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
Definition: document.cxx:6280
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:548
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:813
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:879
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4308
SfxItemSet * GetPreviewFont()
Definition: document.hxx:1337
void GetClipStart(SCCOL &nClipX, SCROW &nClipY)
Definition: document.cxx:3168
void IncXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2355
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:858
bool HasUnoRefUndo() const
Definition: document.hxx:1062
void EndChangeTracking()
Definition: documen2.cxx:266
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4792
SC_DLLPUBLIC void SetScenario(SCTAB nTab, bool bFlag)
Definition: documen3.cxx:420
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
Definition: documen2.cxx:640
std::unique_ptr< ScChangeTrack > pChangeTrack
Definition: document.hxx:390
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:562
void SetForcedFormulas(bool bVal)
Definition: document.hxx:2304
sal_uLong nFormulaCount
Definition: document.hxx:279
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1103
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1889
SC_DLLPUBLIC void GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rString)
Definition: document.cxx:3538
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5049
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:35
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6243
sal_uInt16 nInterpretLevel
Definition: document.hxx:459
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter *pInterpreter)
Definition: documen8.cxx:430
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4326
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
Definition: document.hxx:369
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:579
bool IsInInterpreter() const
Definition: document.hxx:2307
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:506
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:746
void SetCutMode(bool bCut)
Definition: document.cxx:2053
HasAttrFlags
Definition: global.hxx:195
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1000
Use this to lock all charts in the calc for a little time.
Definition: chartlock.hxx:53
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:542
bool bInDtorClear
Definition: document.hxx:510
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:401
ScValidationDataList * GetValidationList()
Definition: document.hxx:1790
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:175
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:609
SCTAB nVisibleTab
Definition: document.hxx:476
OUString maFileURL
Definition: document.hxx:415
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:582
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2415
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1402
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1108
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1356
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
Definition: documen3.cxx:1445
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
Definition: documen3.cxx:1906
const OUString & GetFileURL() const
Definition: document.hxx:597
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
Definition: document.cxx:2261
SC_DLLPUBLIC void DoMergeContents(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2014
FillDir
Definition: global.hxx:320
void SetSheetEvents(SCTAB nTab, std::unique_ptr< ScSheetEvents > pNew)
Definition: documen3.cxx:660
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2432
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:2796
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4529
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2503
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:660
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:6202
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:2107
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1121
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
Definition: documen3.cxx:871
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
Definition: document.cxx:317
std::unique_ptr< ScClipParam > mpClipParam
Definition: document.hxx:404
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:775
sheet protection state container
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:401
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
Definition: documen3.cxx:449
SfxObjectShell * mpShell
Definition: document.hxx:367
ScRangePairList * GetColNameRanges()
Definition: document.hxx:805
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:193
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:590
ScInterpreterContext maInterpreterContext
Definition: document.hxx:469
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
Definition: document.cxx:3721
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:41
ScScenarioFlags
Definition: global.hxx:238
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:195
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:802
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const
Definition: document.cxx:6141
bool IsExpandRefs() const
Definition: document.hxx:2352
SC_DLLPUBLIC void CopyStdStylesFrom(const ScDocument &rSrcDoc)
Definition: documen8.cxx:287
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:574
void FillMatrix(ScMatrix &rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool=nullptr) const
Definition: documen8.cxx:383
void CompileColRowNameFormula()
Definition: documen4.cxx:566
SC_DLLPUBLIC void TransposeClip(ScDocument *pTransClip, InsertDeleteFlags nFlags, bool bAsLink)
Definition: document.cxx:2326
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1762
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1539
SCROW GetLOKFreezeRow(SCTAB nTab) const
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
Definition: documen8.cxx:309
sc::IconSetBitmapMap & GetIconSetBitmapMap()
Definition: documen2.cxx:1382
SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const
Definition: document.cxx:6559
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:876
bool mbUserInteractionEnabled
Definition: document.hxx:546
Context for reference update during shifting, moving or copying of cell ranges.
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:285
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:372
const sal_uInt8 SC_DDE_DEFAULT
Definition: document.hxx:291
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6296
void SetName(const OUString &r)
Definition: document.hxx:594
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5005
ScMutationGuardFlags
Enumeration to determine which pieces of the code should not be mutated when set. ...
Definition: document.hxx:304
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2609
bool mbStreamValidLocked
Definition: document.hxx:545
exports com.sun.star. embed
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3522
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
Definition: documen3.cxx:359
bool IsUndo() const
Definition: document.hxx:1526
List of RefUpdate changes made to UNO objects during ScUpdateRefHint broadcast.
Definition: unoreflist.hxx:42
sal_Int16 mnNamedRangesLockCount
Definition: document.hxx:548
ScInterpreterContext * pContext
Definition: document.hxx:300
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:992
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4880
static const sal_uInt16 nSrcVer
Definition: document.hxx:473
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2008
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1017
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4465
rtl::Reference< XColorList > pColorList
Definition: document.hxx:371
void BlockFormulaGroupContextDiscard(bool block)
Definition: document.hxx:1187
normal calculation of dependencies
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
Definition: documen8.cxx:208
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2592
const ScMarkData & GetPreviewSelection() const
Definition: document.hxx:1339
void SetPendingRowHeights(SCTAB nTab, bool bSet)
Definition: document.cxx:942
rtl_TextEncoding eSrcSet
Definition: document.hxx:451
bool IsTrackFormulasPending() const
Definition: document.hxx:2292
sal_uLong GetCodeCount() const
Definition: document.cxx:6154
sal_uInt16 nFormulaTrackCount
Definition: document.hxx:474
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:1349
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:463
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1736
void DecInterpreterTableOpLevel()
Definition: document.hxx:2340
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:3013
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:332
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
bool IsClipOrUndo() const
Definition: document.hxx:1525
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:2118
Stores cell values for multiple tables.
Definition: cellvalues.hxx:86
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6314
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4473
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
Definition: document.cxx:3639
OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType)
Serializes the specified sheet's geometry data.
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2452
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
Definition: documen4.cxx:705
SC_DLLPUBLIC bool DeleteTabs(SCTAB nTab, SCTAB nSheets)
Definition: document.cxx:759
Extended options held by an ScDocument containing additional settings for filters.
Definition: scextopt.hxx:77
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4481
bool bLoadingMedium
Definition: document.hxx:499
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL)
Definition: document.cxx:948
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1497
bool bCalcingAfterLoad
Definition: document.hxx:501
HardRecalcState eHardRecalcState
Definition: document.hxx:475
VirtualDevice * GetVirtualDevice_100th_mm()
Definition: documen8.cxx:180
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3506
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:22
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2679
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3456
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam &rParam, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark)
Definition: documen4.cxx:355
sal_Int64 GetNewUnoId()
Definition: document.hxx:1065
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:104
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:982
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:461
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5722
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1684
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:217
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1462
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
Definition: document.cxx:328
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:421
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1781
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:372
void AppendToFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:450
const sal_uInt8 SC_DDE_TEXT
Definition: document.hxx:293
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Definition: document.cxx:4755
Accessor class to ScDocument.
bool bImportingXML
Definition: document.hxx:500
ScFormulaVectorState GetFormulaVectorState(const ScAddress &rPos) const
Definition: document.cxx:1767
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
Definition: documen2.cxx:1351
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
Definition: lookupcache.hxx:40
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:669
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:224
void SetClipOptions(std::unique_ptr< ScClipOptions > pClipOptions)
Definition: documen3.cxx:2009
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:479
SC_DLLPUBLIC SfxUndoManager * GetUndoManager()
Definition: document.cxx:6369
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4387
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
Definition: documen8.cxx:140
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:4419
ScFormulaCell * pEOFormulaTrack
Definition: document.hxx:385
void SetHardRecalcState(HardRecalcState eVal)
Definition: document.hxx:2298
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2091
void GetClipArea(SCCOL &nClipX, SCROW &nClipY, bool bIncludeFiltered)
Definition: document.cxx:3116
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:771
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:1147
std::map< SCTAB, ScSortParam > mSheetSortParams
Definition: document.hxx:2592
css::uno::Reference< css::chart2::XChartDocument > GetChartByName(std::u16string_view rChartName)
Definition: documen5.cxx:137
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
Definition: document.cxx:899
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:488
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:875
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:69
sal_uLong nXMLImportedFormulaCount
Definition: document.hxx:458
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5172
bool HasAutoFilter(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1475
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
Definition: document.cxx:6326
void UpdateChartArea(const OUString &rChartName, const ScRange &rNewArea, bool bColHeaders, bool bRowHeaders, bool bAdd)
Definition: documen5.cxx:129
::std::map< SCTAB, const ScRangeName * > TabNameCopyMap
Map that stores non-managed pointers to ScRangeName instances.
Definition: rangenam.hxx:194
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6759
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:488
bool TableExists(SCTAB nTab) const
Definition: document.cxx:2498
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:373
SC_DLLPUBLIC void GetFormula(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rFormula) const
Definition: document.cxx:3713
bool IsAdjustHeightLocked() const
Definition: document.hxx:1532
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4357
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4159
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:317
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
Definition: documen2.cxx:466
void SetClipParam(const ScClipParam &rParam)
Definition: document.cxx:2555
bool mbChangeReadOnlyEnabled
Definition: document.hxx:544
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:435
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:993
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:3429
exports com.sun.star. sheet
void MixDocument(const ScRange &rRange, ScPasteFunc nFunction, bool bSkipEmpty, ScDocument &rSrcDoc)
Definition: document.cxx:3206
void RemoveFromFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:466
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:5240
bool GetNextSpellingCell(SCCOL &nCol, SCROW &nRow, SCTAB nTab, bool bInSel, const ScMarkData &rMark) const
Definition: documen4.cxx:530
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:391
Row-wise value iterator.
Definition: dociter.hxx:479
std::map< sal_uInt16, sal_uInt32 > SvNumberFormatterIndexTable
SC_DLLPUBLIC void CopyStaticToDocument(const ScRange &rSrcRange, SCTAB nDestTab, ScDocument &rDestDoc)
Copy only raw cell values to another document.
Definition: document.cxx:2245
void UnlockTable(SCTAB nTab)
Definition: document.cxx:5310
bool HasAnySheetEventScript(ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:690
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1535
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6054
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
Definition: documen3.cxx:1420
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1209
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:871
LanguageType eCjkLanguage
Definition: document.hxx:449
void InvalidateTableArea()
Definition: documen4.cxx:576
ScLkUpdMode eLinkMode
Definition: document.hxx:480
SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4553
void CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow)
Definition: document.cxx:2720
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:112
void DeleteDrawLayer()
Definition: documen9.cxx:227
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:590
size_t GetFormulaHash(const ScAddress &rPos) const
Definition: document.cxx:1758
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3833
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:493
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4896
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: documen2.cxx:618
void RepaintRange(const ScRange &rRange)
Definition: documen8.cxx:688
sal_uInt16 sal_Unicode
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:934
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
Definition: document.cxx:6501
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:580
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:562
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:857
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6642
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1153
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:121
bool HandleRefArrayForParallelism(const ScAddress &rPos, SCROW nLength, const ScFormulaCellGroupRef &mxGroup)
Definition: document.cxx:1820
bool bForcedFormulaPending
Definition: document.hxx:487
std::unordered_map< ScColumn *, std::pair< SCROW, SCROW > > pDelayedStartListeningFormulaCells
Definition: document.hxx:524
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:611
void SetChartListenerCollectionNeedsUpdate(bool bFlg)
Definition: document.hxx:2147
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:753
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:851
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:538
ScClipParam & GetClipParam()
Definition: document.cxx:2547
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4135
void InvalidateStyleSheetUsage()
Definition: document.hxx:2426
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:999
ScDocument & mrDocument
Definition: document.hxx:2632
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:870
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:45
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
void SetNamedRangesLockCount(sal_Int16 nCount)
Definition: document.hxx:1542
void SetCodeName(const OUString &r)
Definition: document.hxx:596
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:312
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4570
SvtScriptType GetRangeScriptType(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rPos, SCROW nLength)
Definition: documen6.cxx:183
Additional class containing cell annotation data.
Definition: postit.hxx:160
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:383
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:794
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4081
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:304
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
Definition: document.cxx:5093
bool HasChartAtPoint(SCTAB nTab, const Point &rPos, OUString &rName)
Definition: documen5.cxx:99
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:366
sal_uLong GetFormulaCodeInTree() const
Definition: document.hxx:2305
TableContainer maTabs
Definition: document.hxx:374
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
Definition: documen8.cxx:1023
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:581
ScLkUpdMode
Definition: global.hxx:420
const ScValidationDataList * GetValidationList() const
Definition: document.hxx:1789
FillDateCmd
Definition: global.hxx:345
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
Definition: document.hxx:396
void DecInDdeLinkUpdate()
Definition: document.hxx:1016
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
Definition: document.cxx:3484
void DecInterpretLevel()
Definition: document.hxx:2315
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:386
bool IsFinalTrackFormulas() const
Definition: document.hxx:2294
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:2074
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:423
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:406
void SetNoListening(bool bVal)
Definition: document.hxx:2136
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:4238
bool bInsertingFromOtherDoc
Definition: document.hxx:498
bool ValidRange(const ScRange &rRange, SCCOL nMaxCol=MAXCOL, SCROW nMaxRow=MAXROW)
Definition: address.hxx:793
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:64
void GetOldChartParameters(std::u16string_view rName, ScRangeList &rRanges, bool &rColHeaders, bool &rRowHeaders)
Definition: documen5.cxx:202
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:258
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:617
SC_DLLPUBLIC bool IsDocVisible() const
Definition: document.hxx:1549
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:333
bool IsAutoCalcShellDisabled() const
Definition: document.hxx:1360
std::unique_ptr< ScDocProtection > pDocProtection
Definition: document.hxx:403
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:26
std::map< OUString, BitmapEx > IconSetBitmapMap
Definition: document.hxx:207
OUString aDocCodeName
Definition: document.hxx:414
Walk through all cells in an area.
Definition: dociter.hxx:208
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1689
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:324
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
Definition: document.cxx:189
ScLinkMode
Definition: global.hxx:227
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:473
bool mbIdleEnabled
Definition: document.hxx:504
void DiscardFormulaGroupContext()
Definition: document.cxx:3531
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:6087
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1795
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6272
std::set< ScFormulaCell * > maSubTotalCells
Definition: document.hxx:550
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1055
bool HasSheetEventScript(SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:666
const sal_uInt8 SC_DDE_IGNOREMODE
Definition: document.hxx:294
void RestoreChartListener(const OUString &rName)
Definition: documen5.cxx:363
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1914
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:498
SCTAB GetMaxTableNumber() const
Definition: document.hxx:803
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:60
void EndListeningFormulaCells(std::vector< ScFormulaCell * > &rCells)
Definition: documen7.cxx:245
SC_DLLPUBLIC ~ScDocument()
Definition: documen2.cxx:323
Optimized ColumnSpanSet version that operates on a single ScRange.
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:573
std::unique_ptr< ScDBData > mpAnonymousDBData
Definition: document.hxx:398
sal_uInt16 ColDifferences(SCCOL nThisCol, SCTAB nThisTab, ScDocument &rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, const SCCOLROW *pOtherRows)
Definition: documen4.cxx:954
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:748
SCROW SanitizeRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:133
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated...
Definition: document.cxx:2446
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6167
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4087
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
Definition: documen2.cxx:484
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2138
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:4767
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4106
bool mbTrackFormulasPending
Definition: document.hxx:561
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4733
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:548
SfxUndoManager * mpUndoManager
Definition: document.hxx:364
bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:81
void MarkUsedExternalReferences()
Definition: documen3.cxx:631
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
Definition: document.cxx:6259
bool bHasForcedFormulas
Definition: document.hxx:508
void FinalTrackFormulas(SfxHintId nHintId)
Definition: documen7.cxx:505
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2389
std::unique_ptr< ScDrawLayer > mpDrawLayer
Definition: document.hxx:370
TransliterationFlags
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScDocument *pClipDoc)
Definition: document.cxx:2272
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4513
bool mbFinalTrackFormulas
Definition: document.hxx:562
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1534
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:4712
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Definition: documen3.cxx:120
void PutInFormulaTree(ScFormulaCell *pCell)
Definition: documen7.cxx:257
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2128
void StylesToNames()
Definition: document.cxx:6115
void StartListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:207
void ImplCreateOptions()
Definition: documen8.cxx:99
void SetInsertingFromOtherDoc(bool bVal)
Definition: document.hxx:2130
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2047
void ResetEmbedded()
Definition: documen3.cxx:1728
bool GetNoListening() const
Definition: document.hxx:2137
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:915
ScStyleSheet * GetPreviewCellStyle()
Definition: document.hxx:1341
bool HasValidationData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3807
SC_DLLPUBLIC bool GetCellArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
Definition: document.cxx:1016
ScRangePairListRef xColNameRanges
Definition: document.hxx:416
bool IsClipboard() const
Definition: document.hxx:1527
SC_DLLPUBLIC bool HasRowHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1513
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3626
ScMutationDisable(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2620
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1922
SCCOL SanitizeCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:127
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:257
constexpr double nPPTX
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx:482
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:433
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:708
A pretty assertion that checks that the relevant bits in the are not set on the document at entry an...
Definition: document.hxx:2650
bool bInUnoBroadcast
Definition: document.hxx:535
size_t mnMutationGuardFlags
Definition: document.hxx:566
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:3392
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:890
void InvalidateStreamOnSave()
Definition: document.cxx:493
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:513
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:1094
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:6792
void SwapNonEmpty(sc::TableValues &rValues)
Definition: document10.cxx:223
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:93
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
Definition: documen2.cxx:546
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:857
ScDBDataPortion
Enum used to indicate which portion of the DBArea is to be considered.
Definition: dbdata.hxx:41
ScPasteFunc
Definition: global.hxx:191
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3361
std::unique_ptr< ScViewOptions > pViewOptions
Definition: document.hxx:419
SC_DLLPUBLIC ScDocProtection * GetDocProtection() const
Definition: documen3.cxx:1865
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:274
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1200
bool HasAnyCalcNotification() const
Definition: documen3.cxx:699
bool HasClipFilteredRows()
Definition: document.cxx:3185
bool bExpandRefs
Definition: document.hxx:515
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
Definition: document.hxx:455
SC_DLLPUBLIC ScPostIt * GetOrCreateNote(const ScAddress &rPos)
Definition: document.cxx:6592
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:431
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1056
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3101
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:869
T * get() const
sal_uInt16 char * pName
Definition: callform.cxx:57
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, bool bConsiderCellNotes=false, bool bConsiderCellDrawObjects=false) const
Shrink a range to only include used data area.
Definition: document.cxx:1069
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:987
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4904
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:437
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4443
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
Definition: document.cxx:5042
bool IsChartListenerCollectionNeedsUpdate() const
Definition: document.hxx:2146
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2131
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5854
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:764
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:96
Parameter for data table aka multiple operations.
Definition: paramisc.hxx:46
SvtScriptType
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2420
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:473
bool bIsFunctionAccess
Definition: document.hxx:491
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1433
FillCmd
Definition: global.hxx:328
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:234
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:6799
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
Definition: document.cxx:6264
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4545
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:589
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6208
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
Definition: documen3.cxx:269
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:379
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:325
bool IsImportingXML() const
Definition: document.hxx:2134
Keep track of all named expressions that have been updated during reference update.
SCCOL nPosLeft
Definition: document.hxx:477
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1536
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:916
bool bIsEmbedded
Definition: document.hxx:494
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1263
SCROW GetNextDifferentChangedRow(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4609
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:354
LanguageType eCtlLanguage
Definition: document.hxx:450
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:863
SC_DLLPUBLIC bool IsDefaultTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:455
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:145
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:4651
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:375
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2470
CharCompressType
void UpdateAllRowHeights(sc::RowHeightContext &rCxt, const ScMarkData *pTabMark)
Definition: document.cxx:4273
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
Definition: documen3.cxx:876
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:201
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:437
void GetFormulaEntries(ScTypedCaseStrSet &rStrings)
Entries for Formula auto input.
Definition: documen3.cxx:1640
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:958
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3226
void CompileXML()
Definition: document.cxx:3968
bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4497
bool bDetectiveDirty
Definition: document.hxx:517
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
Definition: document.hxx:359
ScMoveDirection
Definition: global.hxx:337
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6675
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2610
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4349
void IncMacroInterpretLevel()
Definition: document.hxx:2322
SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream &rStream)
sal_Int16 SCCOL
Definition: types.hxx:22
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:5925
std::unique_ptr< sc::ExternalDataMapper > mpDataMapper
Definition: document.hxx:399
void GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: documen3.cxx:1194
InsertDeleteFlags
Definition: global.hxx:160
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
Definition: documen8.cxx:986
SCCOL GetNextDifferentChangedCol(SCTAB nTab, SCCOL nStart) const
Definition: document.cxx:4591
bool ValidCol(SCCOL nCol) const
Definition: document.hxx:872
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2430
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2434
sal_uLong nCellCount
Definition: document.hxx:278
bool GetDdeLinkData(size_t nDdePos, OUString &rAppl, OUString &rTopic, OUString &rItem) const
Returns the connection data of the specified DDE link.
Definition: documen8.cxx:964
LanguageType eLanguage
Definition: document.hxx:448
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:341
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong *pnMaxHeight=nullptr) const
Definition: document.cxx:4196
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6336
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:601
void EnableChangeReadOnly(bool bVal)
Definition: document.hxx:1538
bool HasAreaLinks() const
Definition: documen8.cxx:1033
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1113
ScMarkData maPreviewSelection
Definition: document.hxx:429
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:4264
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:663
bool IsForcedFormulaPending() const
Definition: document.hxx:1363
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:2084
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1942
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:871
bool HasRangeOverflow() const
Definition: document.hxx:2126
void RemoveEditTextCharAttribs(const ScAddress &rPos, const ScPatternAttr &rAttr)
Definition: document.cxx:3618
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:6771
bool IsFunctionAccess() const
Definition: document.hxx:1530
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1246
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
Definition: documen8.cxx:976
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:390
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:646
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScMarkData &rMark, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document10.cxx:56
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:448
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4761
ScRange aEmbedRange
Definition: document.hxx:434
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:905
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1170
EEHorizontalTextDirection
sal_uInt16 GetMacroInterpretLevel() const
Definition: document.hxx:2321
SC_DLLPUBLIC void UnlockAdjustHeight()
Definition: document.cxx:1813
SC_DLLPUBLIC SCCOL ClampToAllocatedColumns(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2123
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
bool IsInInterpreterTableOp() const
Definition: document.hxx:2334
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
Definition: documen8.cxx:339
void SetLinkFormulaNeedingCheck(bool bSet)
Definition: document.hxx:2121
void EndListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:216
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:846
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6226
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
bool IsDetectiveDirty() const
Definition: document.hxx:2117
exports com.sun.star. i18n
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:385
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
Definition: documen3.cxx:540
bool IsCutMode()
Definition: document.cxx:2063
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4093
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6516
bool mbEmbedFontScriptAsian
Definition: document.hxx:556
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:502
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:1038
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
Definition: documen2.cxx:102
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2297
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
Definition: document.cxx:1101
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4784
SvNumFormatType
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:397
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
Definition: documen7.cxx:526
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6179
BroadcastAreaSlots and their management, once per document.
Definition: bcaslot.hxx:246
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4099
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:975
void DecXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2360
SC_DLLPUBLIC SCROW GetFirstEditTextRow(const ScRange &rRange) const
Definition: document.cxx:3420
Instantiate this to ensure that subsequent modification of the document will cause an assertion failu...
Definition: document.hxx:2617
void BroadcastUno(const SfxHint &rHint)
Definition: documen3.cxx:943
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1742
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:512
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6417
void RemoveSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6396
SC_DLLPUBLIC const EditTextObject * GetEditText(const ScAddress &rPos) const
Definition: document.cxx:3609
bool IsInExternalReferenceMarking() const
Definition: documen3.cxx:626
void SaveDdeLinks(SvStream &rStream) const
Definition: documen8.cxx:708
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2436
sal_uLong nFormulaCodeInTree
Definition: document.hxx:457
SCTAB nTableCount
Definition: document.hxx:277
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1971
bool IsBlockEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes=false) const
Definition: document.cxx:5289
void IncInterpreterTableOpLevel()
Definition: document.hxx:2335
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:250
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4143
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4069
SCROW GetRowForHeight(SCTAB nTab, sal_uLong nHeight) const
Given the height i.e.
Definition: document.cxx:4191
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:597
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
RangeNameScope
Definition: document.hxx:259
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:578
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1208
SC_DLLPUBLIC void DoMerge(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions=true)
Definition: documen3.cxx:2051
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6302
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4008
CommentCaptionState
Definition: document.hxx:252
std::unique_ptr< ScScriptTypeData > pScriptTypeData
Definition: document.hxx:395
SC_DLLPUBLIC void SetPosTop(SCROW nRow)
Definition: document.hxx:861
void RemoveManualBreaks(SCTAB nTab)
Definition: document.cxx:6220
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3763
SC_DLLPUBLIC ScPostIt * CreateNote(const ScAddress &rPos)
Definition: document.cxx:6599
bool HasSelectedBlockMatrixFragment(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark) const
Definition: document.cxx:5400
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
Definition: document.hxx:357
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
Definition: documen4.cxx:788
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2120
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3697
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1476
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:2553
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
Definition: document.hxx:366
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:116
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6102
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1190
void CheckVectorizationState()
Definition: document.cxx:3819
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5561
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6526
void CompileDBFormula()
Definition: documen4.cxx:556
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
Definition: document.cxx:6624
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:588
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:877
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1335
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1082
sal_uInt16 nPageCount
Definition: document.hxx:280
void LockStreamValid(bool bLock)
Definition: document.cxx:929
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:251
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
Definition: document.hxx:440
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4505
FormulaError
bool mbExecuteLinkEnabled
Definition: document.hxx:543
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bLimit=false)
Entries for selection list listbox (no numbers/formulas)
Definition: documen3.cxx:1600
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:142
bool bCalculatingFormulaTree
Definition: document.hxx:488
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3754
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6320
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:536
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:1586
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:715
ScDocument & mrDoc
Definition: document.hxx:2676
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4395
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:376
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4061
bool bInLinkUpdate
Definition: document.hxx:505
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1936
SCROW nPosTop
Definition: document.hxx:478
SheetGeomType
Represents the type of sheet geometry data.
Definition: document.hxx:266
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:765
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:892
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
Definition: document.hxx:393
std::unique_ptr< SvMemoryStream > pClipData
Definition: document.hxx:388
bool bIsVisible
Definition: document.hxx:492
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4024
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:225
void CopyBlockFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW nDy)
Definition: document.cxx:2617
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2125
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:949
Configuration options for formula interpreter.
Definition: calcconfig.hxx:44
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1369
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1365
ScBreakType
Definition: global.hxx:151
void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rStr)
Definition: documen3.cxx:1454
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:879
SC_DLLPUBLIC void DoEmptyBlock(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2038
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const
Definition: document.hxx:2167
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:462
void LockTable(SCTAB nTab)
Definition: document.cxx:5300
bool IdleCalcTextWidth()
Definition: documen8.cxx:531
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:633
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
Definition: document.cxx:6615
void finalizeOutlineImport()
Definition: document10.cxx:568
void InvalidateTextWidth(std::u16string_view rStyleName)
Definition: documen8.cxx:294
void SetDetOpList(std::unique_ptr< ScDetOpList > pNew)
Definition: documen4.cxx:903
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: document.hxx:874
void SyncColRowFlags()
Write all column row flags to table's flag data, because not all column row attributes are stored in ...
Definition: document.cxx:4561
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: document.cxx:4973
static thread_local ScDocumentThreadSpecific maThreadSpecific
Definition: document.hxx:467
void FindMaxRotCol(SCTAB nTab, RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2) const
Definition: document.cxx:5229
bool IsInDtorClear() const
Definition: document.hxx:2350
o3tl::sorted_vector< sal_uInt32 > ScCondFormatIndexes
Definition: document.hxx:201
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3687
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
Definition: document.cxx:6173
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:312
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:442