LibreOffice Module sc (master)  1
document.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include <vcl/idle.hxx>
23 #include <vcl/errcode.hxx>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <vcl/vclptr.hxx>
26 #include "patattr.hxx"
27 #include "scdllapi.h"
28 #include "interpretercontext.hxx"
29 #include "rangelst.hxx"
30 #include "rangenam.hxx"
31 #include "tabopparams.hxx"
32 #include "types.hxx"
33 #include <formula/grammar.hxx>
34 #include <formula/types.hxx>
35 #include "typedstrdata.hxx"
36 #include "calcmacros.hxx"
37 #include "calcconfig.hxx"
38 #include "sheetlimits.hxx"
39 #include <o3tl/deleter.hxx>
40 #include <o3tl/sorted_vector.hxx>
41 #include <svl/hint.hxx>
42 #include <svl/typedwhich.hxx>
43 #include <svl/zforlist.hxx>
44 #include <tools/gen.hxx>
45 #include <tools/solar.h>
46 
47 #include <cassert>
48 #include <memory>
49 #include <map>
50 #include <optional>
51 #include <set>
52 #include <unordered_map>
53 #include <vector>
54 
55 #include "markdata.hxx"
56 #include "drwlayer.hxx"
57 
58 namespace com::sun::star::chart2 { class XChartDocument; }
59 
60 class Timer;
61 
62 enum class SvtScriptType;
63 enum class ScMF;
64 enum class FormulaError : sal_uInt16;
65 enum class CharCompressType;
66 enum class EEHorizontalTextDirection;
67 namespace editeng { class SvxBorderLine; }
68 namespace formula { struct VectorRefArray; }
69 namespace svl {
70 
71 class SharedString;
72 class SharedStringPool;
73 
74 }
75 
76 namespace sc {
77 
78 struct FormulaGroupContext;
79 class StartListeningContext;
80 class EndListeningContext;
81 class CopyFromClipContext;
82 class ColumnSpanSet;
83 class RangeColumnSpanSet;
84 struct ColumnBlockPosition;
85 struct RefUpdateContext;
86 class EditTextIterator;
87 struct NoteEntry;
88 class DocumentStreamAccess;
89 class DocumentLinkManager;
90 class CellValues;
91 class TableValues;
92 class RowHeightContext;
93 struct SetFormulaDirtyContext;
94 class RefMovedHint;
95 struct ReorderParam;
96 class FormulaGroupAreaListener;
97 class ColumnSet;
98 class UpdatedRangeNames;
99 class TableColumnBlockPositionSet;
100 class ColumnIterator;
101 class ExternalDataMapper;
102 
103 }
104 
105 class Fraction;
106 
107 class OutputDevice;
108 class SdrObject;
109 class SfxBroadcaster;
110 class SfxListener;
111 class SfxItemSet;
112 class SfxObjectShell;
113 class SfxBindings;
114 class SfxPoolItem;
115 class SfxItemPool;
116 class SfxPrinter;
117 class SfxStyleSheetBase;
118 class SvMemoryStream;
119 class SvxBoxInfoItem;
120 class SvxBoxItem;
122 namespace sfx2 {
123  class LinkManager;
124  }
125 class SvxSearchItem;
126 namespace vcl { class Window; }
127 class XColorList;
128 
129 class ScAutoFormatData;
133 class ScClipOptions;
134 class ScColumn;
135 class ScConditionalFormat;
137 class ScDBCollection;
138 class ScDBData;
139 class ScDetOpData;
140 class ScDetOpList;
141 class ScDocOptions;
142 class ScDocProtection;
143 class ScDocumentPool;
144 class ScDrawLayer;
145 class ScExtDocOptions;
147 class ScFormulaCell;
148 class ScMacroManager;
149 class ScOutlineTable;
150 class ScPrintRangeSaver;
151 class ScStyleSheet;
152 class ScStyleSheetPool;
153 class ScTable;
154 class ScTableProtection;
155 class ScTokenArray;
156 class ScValidationData;
158 class ScViewOptions;
159 class ScChangeTrack;
161 class ScFieldEditEngine;
162 class ScNoteEditEngine;
163 class ScDPObject;
164 class ScDPCollection;
165 class ScMatrix;
166 class ScScriptTypeData;
167 class ScPoolHelper;
168 struct ScSortParam;
170 class ScUnoListenerCalls;
171 class ScUnoRefList;
172 class ScRecursionHelper;
173 struct RowInfo;
174 struct ScTableInfo;
175 struct ScTabOpParam;
176 class VirtualDevice;
177 class ScAutoNameCache;
179 class ScLookupCache;
180 struct ScLookupCacheMap;
181 class SfxUndoManager;
182 class ScFormulaParserPool;
183 struct ScClipParam;
184 class ScRowBreakIterator;
185 struct ScSetStringParam;
186 struct ScColWidthParam;
187 class ScSheetEvents;
188 class ScProgress;
189 class SvtListener;
190 class ScEditDataArray;
191 class EditTextObject;
192 struct ScRefCellValue;
193 class ScPostIt;
194 struct ScSubTotalParam;
195 struct ScQueryParam;
196 class ScHint;
197 class SvtBroadcaster;
198 enum class ScDBDataPortion;
199 enum class ScSheetEventId;
200 class BitmapEx;
201 class ScColumnsRange;
204 struct ScSheetLimits;
205 
206 namespace sc {
207 
208 typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
209 
210 }
211 
212 namespace com::sun::star {
213  namespace lang {
214  struct EventObject;
215  }
216  namespace i18n {
217  class XBreakIterator;
218  }
219  namespace util {
220  class XModifyListener;
221  }
222  namespace embed {
223  class XEmbeddedObject;
224  }
225  namespace script::vba {
226  class XVBAEventProcessor;
227  }
228  namespace sheet {
229  struct TablePageBreakData;
230  }
231 }
232 
233 namespace weld {
234 
235 class Window;
236 
237 }
238 
239 #define SC_DOC_NEW 0xFFFF
240 
241 #define SC_MACROCALL_ALLOWED 0
242 
243 #define SC_ASIANKERNING_INVALID 0xff
244 
246 {
251 };
252 
254 {
255  ALLSHOWN, // All comments captions are shown
256  ALLHIDDEN, // All comments captions are hidden
257  MIXED // There are comments in shown and hidden.
258 };
259 
261 {
262  GLOBAL, // A range name can be defined
263  SHEET // with two scope on Manage Names dialog.
264 };
265 
267 enum class SheetGeomType
268 {
269  SIZES, // Column widths or row heights.
270  HIDDEN, // Hidden columns/rows.
271  FILTERED, // Filtered columns/rows.
272  GROUPS // Grouping of columns/rows.
273 };
274 
275 struct ScDocStat
276 {
277  OUString aDocName;
281  sal_uInt16 nPageCount;
283  : nTableCount(0)
284  , nCellCount(0)
285  , nFormulaCount(0)
286  , nPageCount(0)
287  {
288  }
289 };
290 
291 // DDE link modes
296 
297 // During threaded calculation fields being mutated are kept in this struct
299 {
300  std::unique_ptr<ScRecursionHelper> xRecursionHelper; // information for recursive and iterative cell formulas
301  ScInterpreterContext* pContext = nullptr; // references the context passed around for easier access
302 };
303 
306 {
307  // Bit mask bits
308  CORE = 0x0001,
309 };
310 
311 typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
312 
314 {
315 friend class ScValueIterator;
319 friend class ScCellIterator;
320 friend class ScQueryCellIterator;
324 friend class ScDocAttrIterator;
326 friend class ScAttrRectIterator;
327 friend class ScDocShell;
330 friend class ScFormulaCell;
331 friend class ScTable;
332 friend class ScColumn;
333 friend struct ScRefCellValue;
334 friend class ScDocumentImport;
336 friend class sc::ColumnSpanSet;
338 friend class sc::EditTextIterator;
341 friend struct ScMutationGuard;
342 friend struct ScMutationDisable;
343 
344  typedef std::vector<ScTableUniquePtr> TableContainer;
345 
346 public:
347  enum class HardRecalcState
348  {
349  OFF,
350  TEMPORARY,
351  ETERNAL
352  };
353 
354 private:
356 
357  std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
358  std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
359 
360  std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
362 
364 
366  std::unique_ptr<ScFieldEditEngine> mpEditEngine; // uses pEditPool from xPoolHelper
367  std::unique_ptr<ScNoteEditEngine> mpNoteEngine; // uses pEditPool from xPoolHelper
371  std::unique_ptr<ScDrawLayer> mpDrawLayer; // SdrModel
373  std::unique_ptr<ScValidationDataList> pValidationList; // validity
374  SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
375  TableContainer maTabs;
377  std::vector<OUString> maTabNames; // for undo document, we need the information tab name <-> index
378  mutable std::unique_ptr<ScRangeName> pRangeName;
379  std::unique_ptr<ScDBCollection> pDBCollection;
380  std::unique_ptr<ScDPCollection> pDPCollection;
381  std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
382  std::unique_ptr<ScPatternAttr> pSelectionAttr; // Attributes of a block
383  ScFormulaCell* pFormulaTree; // formula tree (start)
384  ScFormulaCell* pEOFormulaTree; // formula tree (end), last cell
385  ScFormulaCell* pFormulaTrack; // BroadcastTrack (start)
386  ScFormulaCell* pEOFormulaTrack; // BroadcastTrack (end), last cell
387  std::unique_ptr<ScBroadcastAreaSlotMachine> pBASM; // BroadcastAreas
388  std::unique_ptr<ScChartListenerCollection> pChartListenerCollection;
389  std::unique_ptr<SvMemoryStream> pClipData;
390  std::unique_ptr<ScDetOpList> pDetOpList;
391  std::unique_ptr<ScChangeTrack> pChangeTrack;
392  std::unique_ptr<SfxBroadcaster> pUnoBroadcaster;
393  std::unique_ptr<ScUnoListenerCalls> pUnoListenerCalls;
394  std::unique_ptr<ScUnoRefList> pUnoRefUndoList;
395  std::unique_ptr<ScChangeViewSettings> pChangeViewSettings;
396  std::unique_ptr<ScScriptTypeData> pScriptTypeData;
397  std::unique_ptr<ScRefreshTimerControl> pRefreshTimerControl;
398  std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharacters;
399  std::unique_ptr<ScDBData> mpAnonymousDBData;
400  std::unique_ptr<sc::ExternalDataMapper> mpDataMapper;
401 
402  std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
403 
404  std::unique_ptr<ScDocProtection> pDocProtection;
405  std::unique_ptr<ScClipParam> mpClipParam;
406 
407  std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
408  std::unique_ptr<ScMacroManager> mpMacroMgr;
409 
410  // mutable for lazy construction
411  mutable std::unique_ptr< ScFormulaParserPool >
413 
414  OUString aDocName; // optional: name of document
415  OUString aDocCodeName; // optional: name of document (twice?)
416  OUString maFileURL; // file URL for copy & paste
419 
420  std::unique_ptr<ScViewOptions> pViewOptions; // view options
421  std::unique_ptr<ScDocOptions> pDocOptions; // document options
422  std::unique_ptr<ScExtDocOptions> pExtDocOptions; // for import etc.
423  std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options
424  std::unique_ptr<ScConsolidateParam> pConsolidateDlgData;
425 
426  std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
427 
428  std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
431  sal_Int64 nUnoObjectId; // counted up for UNO objects
432 
433  ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
434 
437 
439 
440  css::uno::Reference< css::script::vba::XVBAEventProcessor >
442 public:
444  std::vector<ScInterpreterTableOpParams*> m_TableOpList;
446 
447 private:
448 
449  LanguageType eLanguage; // default language
450  LanguageType eCjkLanguage; // default language for asian text
451  LanguageType eCtlLanguage; // default language for complex text
452  rtl_TextEncoding eSrcSet; // during reading: source character set
453 
457 
458  sal_uLong nFormulaCodeInTree; // formula RPN in the formula tree
459  sal_uLong nXMLImportedFormulaCount; // progress count during XML import
460  sal_uInt16 nInterpretLevel; // >0 if in interpreter
461  sal_uInt16 nMacroInterpretLevel; // >0 if macro in interpreter
462  sal_uInt16 nInterpreterTableOpLevel; // >0 if in interpreter TableOp
463 
465 
466  // There can be only one ScDocument being calculated in a thread at a time, so we can use a
467  // plain thread_local static member.
469 
471 
472  osl::Mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
473 
474  static const sal_uInt16 nSrcVer; // file version (load/save)
475  sal_uInt16 nFormulaTrackCount;
476  HardRecalcState eHardRecalcState; // off, temporary, eternal
477  SCTAB nVisibleTab; // for OLE etc., don't use inside ScDocument
478  SCCOL nPosLeft; // for OLE etc., don't use inside ScDocument
479  SCROW nPosTop; // for OLE etc., don't use inside ScDocument
480 
482 
483  bool bAutoCalc; // calculate automatically
484  bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled
485  // are there ForcedFormulas which have to be calculated
486  // in interaction with ScDocShell SetDocumentModified,
487  // AutoCalcShellDisabled and TrackFormulas
490  bool bIsClip;
491  bool bIsUndo;
493  bool bIsVisible; // set from view ctor
494 
495  bool bIsEmbedded; // display/adjust Embedded area?
496 
497  // no broadcast, construct no listener during insert from a different
498  // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
501  bool bImportingXML; // special handling of formula text
502  bool bCalcingAfterLoad; // in CalcAfterLoad TRUE
503  // don't construct/destruct listeners temporarily
506  bool bInLinkUpdate; // TableLink or AreaLink
508  // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
510  // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
512  // expand reference if insert column/row takes place at the border
513  // of a reference
514  // is fetched in each UpdateReference from InputOptions,
515  // assigned, and restored at the end of UpdateReference
517  // for detective update, is set for each change of a formula
519  // If the pointer is set, formula cells will not be automatically grouped into shared formula groups,
520  // instead the range will be extended to contain all such cells.
521  std::unique_ptr< ScRange > pDelayedFormulaGrouping;
522  // If non-empty, ScColumn::StartListeningFormulaCells() calls may be delayed using this,
523  // avoiding repeated calling for the same cells in the given range. The function will be called once
524  // later for all the cells in the range.
525  std::unordered_map< ScColumn*, std::pair<SCROW, SCROW>> pDelayedStartListeningFormulaCells;
526 
527  bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
528 
531 
533 
534  sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
535 
538  sal_uInt32 nAdjustHeightLock;
540 
542 
545  bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
547  bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
548 
550 
551  std::set<ScFormulaCell*> maSubTotalCells;
552 
553 
554  bool mbEmbedFonts : 1;
559 
560  std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
561 
564  // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
566 
568 
569 public:
570  bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
571  void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
572 
573  bool IsEmbedFonts() const { return mbEmbedFonts; }
578 
579  void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
580  void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
584 
585  SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
586  SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
587  sal_uLong GetCodeCount() const; // RPN-Code in formulas
588  DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
589  // number formatter
590 public:
592  SfxObjectShell* pDocShell = nullptr );
594 
595  void SetName( const OUString& r ) { aDocName = r; }
596  const OUString& GetCodeName() const { return aDocCodeName; }
597  void SetCodeName( const OUString& r ) { aDocCodeName = r; }
598  const OUString& GetFileURL() const { return maFileURL; }
599 
600  void GetDocStat( ScDocStat& rDocStat );
601 
602  SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
603 
605  {
607  return maInterpreterContext;
608  }
609  // Uses thread_local.
611  {
612  return IsThreadedGroupCalcInProgress() ? *maThreadSpecific.pContext : GetNonThreadedContext();
613  }
614  void SetupContextFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
615  void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
618 
621 
624 
625  SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
626  SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
628  SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
629  void SetPrintOptions();
630 
631  ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions.get(); }
632  SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
633 
634  ScClipOptions* GetClipOptions() { return mpClipOptions.get(); }
635  void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
636 
637  SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
638  void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
639 
640  void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
641  const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData.get(); }
642 
643  void Clear( bool bFromDestructor = false );
644 
645  std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
646  void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
647 
653  SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap);
654  SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
657  void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
658  void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
659  bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
660 
668  ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
669 
714  SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
715  SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
716  bool bSameDoc, int nRecursion ) const;
717 
758  bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
759  const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
760  const bool bUsedByFormula ) const;
761 
765  SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap );
772 
783  bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
784 
796  bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
797 
803 
804  SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
805 
806  ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
807  ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
810 
813 
814  SC_DLLPUBLIC ScDBCollection* GetDBCollection() const { return pDBCollection.get();}
815  void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
816  bool bRemoveAutoFilter = false );
817  const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
818  ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
819  SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
820  SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
823 
824  SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString& rName,
825  bool* pSheetLocal = nullptr ) const;
826 
827  SC_DLLPUBLIC bool HasPivotTable() const;
830  SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
831  ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
832 
833  void StopTemporaryChartLock();
834 
835  void EnsureGraphicNames();
836 
837  SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
838  bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
839 
840  css::uno::Reference< css::chart2::XChartDocument > GetChartByName( std::u16string_view rChartName );
841 
842  SC_DLLPUBLIC void GetChartRanges( std::u16string_view rChartName, std::vector< ScRangeList >& rRanges, const ScDocument& rSheetNameDoc );
843  void SetChartRanges( std::u16string_view rChartName, const std::vector< ScRangeList >& rRanges );
844 
845  void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
846  bool bColHeaders, bool bRowHeaders, bool bAdd );
847  void UpdateChartArea( const OUString& rChartName,
848  const ScRangeListRef& rNewList,
849  bool bColHeaders, bool bRowHeaders, bool bAdd );
850  void GetOldChartParameters( std::u16string_view rName,
851  ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
852  css::uno::Reference<
853  css::embed::XEmbeddedObject >
854  FindOleObjectByName( std::u16string_view rName );
855 
856  SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
857 
858  SCTAB GetVisibleTab() const { return nVisibleTab; }
859  SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
860  SCCOL GetPosLeft() const { return nPosLeft; }
861  SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
862  SCROW GetPosTop() const { return nPosTop; }
863  SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
864 
865  SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
866  SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
867  SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
868  SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
869  SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
870  SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
871  SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
872  SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
874  [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
875  [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
876  [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
877  [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
878  [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
879  [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
880  [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
881  [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
882 
883  SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
884 
885  OUString GetCopyTabName(SCTAB nTab) const;
886 
887  SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
889 
894  SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
896 
899 
901  SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
902  SC_DLLPUBLIC bool IsDocProtected() const;
903  bool IsDocEditable() const;
904  SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
906  SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
907  void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
908 
909  void LockTable(SCTAB nTab);
910  void UnlockTable(SCTAB nTab);
911 
912  bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
913  SCCOL nEndCol, SCROW nEndRow,
914  bool* pOnlyNotBecauseOfMatrix = nullptr,
915  bool bNoMatrixAtAll = false ) const;
916  bool IsSelectionEditable( const ScMarkData& rMark,
917  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
918  bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
919  SCCOL nEndCol, SCROW nEndRow,
920  const ScMarkData& rMark ) const;
921 
922  bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
923  bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
924 
925  SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
926 
927  bool IsEmbedded() const { return bIsEmbedded;}
928  void GetEmbedded( ScRange& rRange ) const;
929  void SetEmbedded( const ScRange& rRange );
930  void ResetEmbedded();
931  tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
932  void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
933 
934  static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
935 
936  SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
937  SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
938  SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
939 
940  void AppendTabOnLoad(const OUString& rName);
941  void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
942  void InvalidateStreamOnSave();
943 
944  SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
945  bool bExternalDocument = false, bool bUndoDeleteTab = false );
946 
947  SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
948  bool bNamesValid = false );
949  SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
950  SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
951  SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
952  bool bExternalDocument = false );
953  bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
954  bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
955  const ScMarkData* pOnlyMarked = nullptr );
956  SC_DLLPUBLIC sal_uLong TransferTab(ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
957  bool bInsertNew = true,
958  bool bResultsOnly = false );
959  SC_DLLPUBLIC void TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
960  SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
961  SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
962  bool IsStreamValid( SCTAB nTab ) const;
963  void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
964  void LockStreamValid( bool bLock );
965  bool IsStreamValidLocked() const { return mbStreamValidLocked; }
966  bool IsPendingRowHeights( SCTAB nTab ) const;
967  void SetPendingRowHeights( SCTAB nTab, bool bSet );
968  SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
969  SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
970  SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
971  SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
972  SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
973  SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
974  Color& rColor, ScScenarioFlags &rFlags) const;
975  SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
976  const Color& rColor, ScScenarioFlags nFlags);
977  SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
978  SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
979  SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
980  void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
981  SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
982  SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
987  bool IsLinked( SCTAB nTab ) const;
988  SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
989  OUString GetLinkFlt( SCTAB nTab ) const;
990  OUString GetLinkOpt( SCTAB nTab ) const;
991  SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
992  sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
993  void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
994  const OUString& rFilter, const OUString& rOptions,
995  const OUString& rTabName, sal_uLong nRefreshDelay );
996  bool HasLink( std::u16string_view rDoc,
997  std::u16string_view rFilter, std::u16string_view rOptions ) const;
998  SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
999  const OUString& aFileName,
1000  const OUString& aTabName );
1001 
1002  bool HasExternalRefManager() const { return bool(pExternalRefMgr); }
1004  bool IsInExternalReferenceMarking() const;
1006  bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1007 
1011 
1012  bool HasAreaLinks() const;
1014  void UpdateAreaLinks();
1015 
1016  // originating DDE links
1017  void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; }
1018  void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
1019  bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1020 
1021  SC_DLLPUBLIC void CopyDdeLinks( ScDocument& rDestDoc ) const;
1022 
1026  SC_DLLPUBLIC bool FindDdeLink( std::u16string_view rAppl, std::u16string_view rTopic,
1027  std::u16string_view rItem, sal_uInt8 nMode, size_t& rnDdePos );
1028 
1035  bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1040  bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1044  SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1045 
1049  SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1054  bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1055 
1058  SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer.get(); }
1059  SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1060  SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1061  void BeginDrawUndo();
1062 
1063  void BeginUnoRefUndo();
1064  bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1065  [[nodiscard]]
1066  std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1067  sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1068  void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1069 
1070  static bool IsChart( const SdrObject* pObject );
1071 
1072  void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1073  SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1074  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1075  SCCOL nDx, SCROW nDy, SCTAB nDz );
1077  void SetChartRangeList( std::u16string_view rChartName,
1078  const ScRangeListRef& rNewRangeListRef );
1079 
1080  void StartAnimations( SCTAB nTab );
1081 
1082  bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1083  bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1084 
1085  const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1086  void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1087  bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1088  bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1089 
1090  bool HasAnyCalcNotification() const;
1091  bool HasCalcNotification( SCTAB nTab ) const;
1092  void SetCalcNotification( SCTAB nTab );
1093  void ResetCalcNotifications();
1094 
1095  SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1096  bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1097 
1098  void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1099  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1100 
1101  bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1102  void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1103  bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1104  bool HasSubTotalCells( const ScRange& rRange );
1105 
1106  SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1107 
1108  // return TRUE = number format is set
1109  SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1110  const ScSetStringParam * pParam = nullptr );
1111  SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1112  const ScSetStringParam* pParam = nullptr );
1113 
1123  SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1124  void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1125  SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1126  SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1127 
1132  SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1133  void SetEmptyCell( const ScAddress& rPos );
1134  SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1135  SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1136  void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1137  void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1138  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1139  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1141 
1151  bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1152 
1156  bool HasFormulaCell( const ScRange& rRange ) const;
1157  SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1158  SCCOL nCol2, SCROW nRow2,
1159  const ScMarkData& rMark,
1160  const OUString& rFormula,
1161  const ScTokenArray* p = nullptr,
1163  SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1164  SCCOL nCol1, SCROW nRow1,
1165  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1166 
1167  SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1168  const ScInterpreterContext* pContext = nullptr ) const;
1169  SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1170  const ScInterpreterContext* pContext = nullptr ) const;
1171 
1180  SC_DLLPUBLIC double* GetValueCell( const ScAddress& rPos );
1181 
1184 
1185  svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1186 
1187  std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1190  { mbFormulaGroupCxtBlockDiscard = block; }
1191 
1192  SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rString );
1193  FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1194  SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1195  SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1196  SC_DLLPUBLIC void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue ) const;
1197  SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1198  void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1199  SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1200  SC_DLLPUBLIC void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
1201  sal_uInt32& rFormat ) const;
1202  sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1203  SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1204  void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1205 
1206  void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1207  SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1209  SC_DLLPUBLIC void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rFormula ) const;
1210  SC_DLLPUBLIC void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
1211  SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1212 
1213  SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1214  SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1215  SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1216  SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1217  bool HasStringCells( const ScRange& rRange ) const;
1218 
1220  bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1221  bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1222 
1229  sc::MultiDataCellState HasMultipleDataCells( const ScRange& rRange ) const;
1230 
1232  SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1233  SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1234  void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1235  void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1236  SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1237  bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1238  bool HasNote(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const;
1239  SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1240  SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1241  bool HasNotes() const;
1242  SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1244  SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos);
1245  size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1246 
1251  void CreateAllNoteCaptions();
1252  void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1254 
1255  ScAddress GetNotePosition( size_t nIndex ) const;
1256  ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1257  SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1258 
1259  SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1260  SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1261  void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1262  bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1263 
1264  SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab);
1265 
1266  bool IsMerged( const ScAddress& rPos ) const;
1267 
1268  void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1269  SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1270  bool bRefresh = false );
1271  SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1272  SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1273  bool bRefresh = false );
1274  bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1275  SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1276  SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1277  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1278  SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1279 
1280  bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1281  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1282 
1283  SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1284  SCCOL nEndCol, SCROW nEndRow );
1285  SC_DLLPUBLIC void DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1286  SCCOL nEndCol, SCROW nEndRow );
1287  // without checking:
1288  SC_DLLPUBLIC void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1289  SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true );
1290  void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1291 
1292  bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1293  SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const;
1294  bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1295  SCCOL nEndCol, SCROW nEndRow,
1296  bool bLeftIsEmpty = false,
1297  ScRange* pLastRange = nullptr,
1298  tools::Rectangle* pLastMM = nullptr ) const;
1299 
1300  void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1301  bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1302  bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1303 
1304  SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1305  SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1306  SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1307 
1308  SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1309  const ::editeng::SvxBorderLine** ppLeft,
1310  const ::editeng::SvxBorderLine** ppTop,
1311  const ::editeng::SvxBorderLine** ppRight,
1312  const ::editeng::SvxBorderLine** ppBottom ) const;
1313 
1314  void ResetChanged( const ScRange& rRange );
1315 
1316  void CheckVectorizationState();
1317  void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
1318  void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1319  void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1320  void InterpretDirtyCells( const ScRangeList& rRanges );
1321  SC_DLLPUBLIC void CalcAll();
1322  SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1323  void CompileAll();
1324  void CompileXML();
1325 
1336  bool CompileErrorCells(FormulaError nErrCode);
1337 
1338  ScAutoNameCache* GetAutoNameCache() { return pAutoNameCache.get(); }
1339  void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1340  SfxItemSet* GetPreviewFont() { return pPreviewFont.get(); }
1341  SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1343  void SetPreviewSelection( const ScMarkData& rSel );
1345  ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1346  void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; }
1347  SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1348 
1351  ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1354  void RemoveLookupCache( ScLookupCache & rCache );
1356  void ClearLookupCaches();
1357 
1358  // calculate automatically
1359  SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1360  SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1361  // calculate automatically in/from/for ScDocShell disabled
1362  void SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; }
1364  // ForcedFormulas are to be calculated
1365  void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
1367  // if CalcFormulaTree() is currently running
1371  void DelayFormulaGrouping( bool delay );
1372  bool IsDelayedFormulaGrouping() const { return bool(pDelayedFormulaGrouping); }
1374  void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1378  void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1379  bool IsEnabledDelayStartListeningFormulaCells( ScColumn* column ) const;
1382  bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1383 
1384  FormulaError GetErrCode( const ScAddress& ) const;
1385 
1398  bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1399 
1417  bool ShrinkToUsedDataArea( bool& o_bShrunk,
1418  SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1419  SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1420  bool bStickyTopRow = false, bool bStickyLeftCol = false,
1421  bool bConsiderCellNotes = false,
1422  bool bConsiderCellDrawObjects = false,
1423  bool bConsiderCellFormats = false ) const;
1424 
1435  SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1436 
1450  SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1451  SCCOL& rEndCol, SCROW& rEndRow,
1452  bool bIncludeOld, bool bOnlyDown ) const;
1453 
1461  bool GetDataAreaSubrange(ScRange& rRange) const;
1462 
1463  SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1464  SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1465  bool bCalcHiddens = false) const;
1466  SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1467  bool bNotes = true) const;
1468  SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1469  SCCOL& rEndCol ) const;
1470  SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1471  SCROW& rEndRow, bool bNotes ) const;
1472  void InvalidateTableArea();
1473 
1475  SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1476 
1477  SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1478 
1484  void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1485  SCCOL nStartCol, SCROW nStartRow,
1486  SCCOL& rEndCol, SCROW nEndRow ) const;
1487  SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1488  SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1489  ScDirection eDir );
1490 
1491  void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1492  SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1493  bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1494  SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1495 
1496  bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1497  const ScMarkData& rMark );
1498 
1499  void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1500  SCCOL& rEndCol, SCROW& rEndRow );
1501  void LimitChartIfAll( ScRangeListRef& rRangeList );
1502 
1503  bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1504  SCCOL nEndCol, SCTAB nEndTab,
1505  SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1506  const ScMarkData* pTabMark = nullptr );
1507  SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1508  void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1509  SCCOL nEndCol, SCTAB nEndTab,
1510  SCROW nStartRow, SCSIZE nSize,
1511  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1512  const ScMarkData* pTabMark = nullptr );
1513  SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1514  bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1515  SCROW nEndRow, SCTAB nEndTab,
1516  SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1517  const ScMarkData* pTabMark = nullptr );
1518  SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1519  void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1520  SCROW nEndRow, SCTAB nEndTab,
1521  SCCOL nStartCol, SCSIZE nSize,
1522  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1523  const ScMarkData* pTabMark = nullptr );
1524  void DeleteCol( const ScRange& rRange );
1525 
1526  bool CanInsertRow( const ScRange& rRange ) const;
1527  bool CanInsertCol( const ScRange& rRange ) const;
1528 
1529  void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1530  bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1531 
1532  bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1533  bool IsUndo() const { return bIsUndo; }
1534  bool IsClipboard() const { return bIsClip; }
1535  bool IsUndoEnabled() const { return mbUndoEnabled; }
1536  SC_DLLPUBLIC void EnableUndo( bool bVal );
1537  bool IsFunctionAccess() const { return bIsFunctionAccess; }
1538 
1539  bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1543  void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1545  void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1547  SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1549  void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
1550  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1551  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1552  void SetCutMode( bool bCut );
1553  bool IsCutMode();
1554  void SetClipArea( const ScRange& rArea, bool bCut = false );
1555 
1556  SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1557  SC_DLLPUBLIC void SetDocVisible( bool bSet );
1558 
1559  bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1560 
1561  void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1562  const ScMarkData& rMark, bool bAnchored = false );
1563  void DeleteObjectsInSelection( const ScMarkData& rMark );
1564 
1565  SC_DLLPUBLIC void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1566  InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1567  sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1568 
1569  SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1570  SCTAB nTab, InsertDeleteFlags nDelFlag);
1571  void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1572 
1573  SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1574  const ScMarkData* pMarks, bool bKeepScenarioFlags,
1575  bool bIncludeObjects );
1576 
1586  SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1587 
1595  void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1596 
1597  void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1598  SCTAB nTab, ScDocument* pClipDoc);
1599 
1601 
1603  sc::ColumnSpanSet& rBroadcastSpans );
1604 
1606  SCCOL nCol2, SCROW nRow2 );
1607  void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1608  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1609  SCCOL nDx, SCROW nDy );
1614  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, SCCOL nDx,
1615  SCROW& rClipStartRow, SCROW nClipEndRow);
1616 
1617  void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1618  SCCOL nCol2, SCROW nRow2,
1619  const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1620 
1621  void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1622  const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1623  sc::ColumnSpanSet& rBroadcastSpans );
1624 
1627  SC_DLLPUBLIC void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
1628  InsertDeleteFlags nInsFlag,
1629  ScDocument* pRefUndoDoc,
1630  ScDocument* pClipDoc,
1631  bool bResetCut = true,
1632  bool bAsLink = false,
1633  bool bIncludeFiltered = true,
1634  bool bSkipAttrForEmpty = false,
1635  const ScRangeList * pDestRanges = nullptr );
1636 
1637  void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1638  InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1639  bool bResetCut = true, bool bAsLink = false,
1640  bool bIncludeFiltered = true,
1641  bool bSkipAttrForEmpty = false);
1642 
1643  void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1644  void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1645 
1646  bool HasClipFilteredRows();
1647 
1648  bool IsClipboardSource() const;
1649 
1650  SC_DLLPUBLIC void TransposeClip(ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink,
1651  bool bIncludeFiltered);
1652 
1654  void SetClipParam(const ScClipParam& rParam);
1655 
1661  void ClosingClipboardSource();
1662 
1663  void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1664  ScDocument& rSrcDoc );
1665 
1666  void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1667  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1668  bool bSkipEmpty, bool bAsLink );
1669  void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1670  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1671  bool bSkipEmpty, bool bAsLink );
1672 
1673  void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1674 
1675  SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1676  bool bColInfo = false, bool bRowInfo = false );
1677  void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1678  bool bColInfo = false, bool bRowInfo = false );
1679  SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1680  bool bColInfo = false, bool bRowInfo = false );
1681 
1682  // don't use anymore:
1683  void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1684  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1685  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1686  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1687  void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1688  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1689  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1690 
1691  SC_DLLPUBLIC void CopyToDocument(const ScRange& rRange,
1692  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1693  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1694  void UndoToDocument(const ScRange& rRange,
1695  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1696 
1697  void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1698  bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1699  void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1700  ScMarkData& rDestMark, bool bResetMark = true,
1701  ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1702  bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1703  SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1704 
1705  SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1706 
1708  pUndoDoc = nullptr, bool bIncludeDraw = true,
1709  bool bUpdateNoteCaptionPos = true );
1714  SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1715  const ScMarkData& rMark, ScDocument* pUndoDoc );
1716 
1717  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1718 
1719  SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1720  ScProgress* pProgress, const ScMarkData& rMark,
1721  sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1722  FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1723  double nStepValue = 1.0, double nMaxValue = 1E307 );
1724  OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1725 
1727  const ScAddress& rCursor, const ScMarkData& rMark,
1728  double& rResult );
1729 
1730  SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1731  template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1732  {
1733  return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1734  }
1735  SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1736  template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1737  {
1738  return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1739  }
1740  SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1741  SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1742  SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1743  const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1744  std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1745  SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1746  void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1747 
1748  SC_DLLPUBLIC ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1749  // pCell is an optimization, must point to rPos
1750  SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1751  ScRefCellValue* pCell = nullptr ) const;
1752  const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1753  const ScConditionalFormatList& rList,
1754  const ScCondFormatIndexes& rIndex ) const;
1755  const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1756  template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1757  {
1758  return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1759  }
1760 
1761  SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1762  bool HasStringWeakCharacters( const OUString& rString );
1763  SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1764  // pCell is an optimization, must point to rPos
1765  SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1766  const ScRefCellValue* pCell = nullptr );
1767  // pCell is an optimization, must point to nCol,nRow,nTab
1769  const ScRefCellValue* pCell = nullptr );
1770  SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1771  SvtScriptType GetRangeScriptType( const ScRangeList& rRanges );
1772 
1773  bool HasDetectiveOperations() const;
1774  void AddDetectiveOperation( const ScDetOpData& rData );
1775  void ClearDetectiveOperations();
1776  ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1777  void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1778 
1779  bool HasDetectiveObjects(SCTAB nTab) const;
1780 
1781  void GetSelectionFrame( const ScMarkData& rMark,
1782  SvxBoxItem& rLineOuter,
1783  SvxBoxInfoItem& rLineInner );
1784  void ApplySelectionFrame(const ScMarkData& rMark,
1785  const SvxBoxItem& rLineOuter,
1786  const SvxBoxInfoItem* pLineInner);
1787  void ApplyFrameAreaTab(const ScRange& rRange,
1788  const SvxBoxItem& rLineOuter,
1789  const SvxBoxInfoItem& rLineInner);
1790 
1791  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1792  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1793 
1794  SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1795  void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1796 
1797  void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1800 
1802 
1803  const ScValidationDataList* GetValidationList() const { return pValidationList.get();}
1804  ScValidationDataList* GetValidationList() { return pValidationList.get();}
1805 
1806  SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1807  const SfxPoolItem& rAttr );
1808  SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1809  const ScPatternAttr& rAttr );
1810  SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1811  SCCOL nEndCol, SCROW nEndRow,
1812  const ScMarkData& rMark, const ScPatternAttr& rAttr,
1813  ScEditDataArray* pDataArray = nullptr,
1814  bool* const pIsChanged = nullptr );
1815  SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1816  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1817  const ScPatternAttr& rAttr );
1818 
1820  const ScMarkData& rMark,
1821  const ScPatternAttr& rPattern,
1822  SvNumFormatType nNewType );
1823 
1824  void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1825  const ScStyleSheet& rStyle);
1826  void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1827  SCCOL nEndCol, SCROW nEndRow,
1828  const ScMarkData& rMark, const ScStyleSheet& rStyle);
1829  SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1830  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1831  const ScStyleSheet& rStyle);
1832 
1833  SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1834  void ApplySelectionLineStyle( const ScMarkData& rMark,
1835  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1836 
1837  const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1838  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1839 
1840  void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1841  OutputDevice* pDev,
1842  double nPPTX, double nPPTY,
1843  const Fraction& rZoomX, const Fraction& rZoomY );
1844 
1845  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1846 
1847  SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1848  SCCOL nEndCol, SCROW nEndRow,
1849  SCTAB nTab, ScMF nFlags );
1850  SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1851  SCCOL nEndCol, SCROW nEndRow,
1852  SCTAB nTab, ScMF nFlags );
1853 
1854  SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1855  SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> );
1856  SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1857 
1858  void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1859  sal_uInt16 nFormatNo, const ScMarkData& rMark );
1860  void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1861  ScAutoFormatData& rData );
1862  bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1863  SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1864  const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1865  OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
1866 
1867  // determine Col/Row of subsequent calls
1868  // (e.g. not found from the beginning, or subsequent tables)
1869  // meaning of explanation in "()" was already unclear in German
1870  void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1871  SCCOL& rCol, SCROW& rRow );
1872 
1873  bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1874  SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1875  const OUString& sValStr, double& nX);
1876 
1877  SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1878  ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1879  SC_DLLPUBLIC void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1880  void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1881 
1882  SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1883  SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1884  SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1885  SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1886  sal_uInt16 nNewHeight );
1887 
1888  SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1889  sal_uInt16 nNewHeight );
1890  SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1891 
1892  SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1893  SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1894  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1895  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const;
1896  SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1897 
1903  SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
1904  sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
1905  SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1906  SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1907 
1908  SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1909  SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1910 
1911  sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1912 
1913  SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1914 
1915  sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1916  double nPPTX, double nPPTY,
1917  const Fraction& rZoomX, const Fraction& rZoomY,
1918  bool bFormula,
1919  const ScMarkData* pMarkData = nullptr,
1920  const ScColWidthParam* pParam = nullptr );
1921 
1923  SCROW nEndRow, SCTAB nTab, bool bApi );
1924 
1925  void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
1926 
1927  tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
1928  OutputDevice* pDev,
1929  double nPPTX, double nPPTY,
1930  const Fraction& rZoomX, const Fraction& rZoomY,
1931  bool bWidth, bool bTotalSize = false,
1932  bool bInPrintTwips = false );
1933 
1934  SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
1935  SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
1936  SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
1937  SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
1938  SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
1939 
1940  SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
1941  SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
1942 
1943  SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1944  SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1945  SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const;
1946  SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const;
1947  SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1948  SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1949  void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1950  void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1951  css::uno::Sequence<
1952  css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
1953 
1954  SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1955  SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1956  SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
1957  SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
1958  SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
1959  SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1960  SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1961  SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1962 
1963  SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1964  bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1965  bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
1966  SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
1967  SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1968  SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1969  SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1970 
1971  SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
1972 
1973  bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
1974 
1980  void SyncColRowFlags();
1981 
1983  SC_DLLPUBLIC SCROW GetLastFlaggedRow( SCTAB nTab ) const;
1984 
1986  SCCOL GetLastChangedCol( SCTAB nTab ) const;
1988  SCROW GetLastChangedRow( SCTAB nTab ) const;
1989 
1990  SCCOL GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const;
1991 
1992  SCROW GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart) const;
1993 
1994  // returns whether to export a Default style for this col or not
1995  // nDefault is set to one position in the current row where the Default style is
1996  void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
1997 
1998  bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
1999  bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
2000 
2001  void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2002  void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2003 
2007  void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
2008 
2009  // PageStyle:
2010  SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
2011  SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
2012  Size GetPageSize( SCTAB nTab ) const;
2013  void SetPageSize( SCTAB nTab, const Size& rSize );
2014  void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2015  void InvalidatePageBreaks(SCTAB nTab);
2016  void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2017  void RemoveManualBreaks( SCTAB nTab );
2018  bool HasManualBreaks( SCTAB nTab ) const;
2019 
2020  bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2021  bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2022  bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2023  void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2024  const SfxItemSet& rChanges );
2025 
2026  void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2027 
2028  SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2029 
2030  // Was stored in PageStyle previously. Now it exists for every table:
2031  SC_DLLPUBLIC bool HasPrintRange();
2032  SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2033  SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2037  bool IsPrintEntireSheet( SCTAB nTab ) const;
2038 
2040  SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2042  SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2044  SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
2045  SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2046  SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2047  std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2048  void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2049 
2050  SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2051  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2052  SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2053 
2054  void UpdStlShtPtrsFrmNms();
2055  void StylesToNames();
2056 
2057  SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2058 
2059  static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2060 
2061  void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2062  void UpdateFontCharSet();
2063 
2064  void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2065  SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2066  double fRowScale, bool bPageMode, bool bFormulaMode,
2067  const ScMarkData* pMarkData = nullptr );
2068 
2070 
2072  void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2073  bool bKeepQuery, bool bUpdateRefs,
2074  ScProgress* pProgress, sc::ReorderParam* pUndo );
2075 
2076  void Reorder( const sc::ReorderParam& rParam );
2077 
2078  void PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
2079  SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2080  SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2081  void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rStr);
2082 
2089  void GetFilterEntries( SCCOL nCol, SCROW nRow,
2090  SCTAB nTab, ScFilterEntries& rFilterEntries );
2091 
2092  SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2093  SCTAB nTab, bool bCaseSens,
2094  ScFilterEntries& rFilterEntries );
2095 
2096  void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2097  std::vector<ScTypedStrData>& rStrings, bool bValidation = false );
2098  void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2099 
2100  bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2101  void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2102 
2103  SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2104  SCTAB nTab );
2105  SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2106  SCTAB nTab );
2107 
2108  SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2109  void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2111  SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2112 
2113  bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2114  bool bInSel, const ScMarkData& rMark) const;
2115 
2116  void ReplaceStyle( const SvxSearchItem& rSearchItem,
2117  SCCOL nCol, SCROW nRow, SCTAB nTab,
2118  const ScMarkData& rMark);
2119 
2120  void InvalidateTextWidth( std::u16string_view rStyleName );
2121  void InvalidateTextWidth( SCTAB nTab );
2122  void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2123 
2124  bool IdleCalcTextWidth();
2125 
2126  void RepaintRange( const ScRange& rRange );
2127  void RepaintRange( const ScRangeList& rRange );
2128 
2129  bool IsIdleEnabled() const { return mbIdleEnabled; }
2130  void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2131 
2132  bool IsDetectiveDirty() const { return bDetectiveDirty; }
2133  void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2134 
2136  void SetLinkFormulaNeedingCheck(bool bSet) { bLinkFormulaNeedingCheck = bSet; }
2139 
2140  void SetRangeOverflowType(ErrCode nType) { nRangeOverflowType = nType; }
2141  bool HasRangeOverflow() const { return nRangeOverflowType != ERRCODE_NONE; }
2143 
2144  // for broadcasting/listening
2145  void SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; }
2147  void SetLoadingMedium( bool bVal );
2148  SC_DLLPUBLIC void SetImportingXML( bool bVal );
2149  bool IsImportingXML() const { return bImportingXML; }
2150  bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2151  void SetNoListening( bool bVal ) { bNoListening = bVal; }
2152  bool GetNoListening() const { return bNoListening; }
2153  ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2154 
2155  SC_DLLPUBLIC ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection.get(); }
2156  void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2157  bool bSetChartRangeLists );
2158  void UpdateChart( const OUString& rName );
2159  void RestoreChartListener( const OUString& rName );
2162  void SetChartListenerCollectionNeedsUpdate( bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; }
2163  void AddOLEObjectToCollection(const OUString& rName);
2164 
2165  ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings.get(); }
2167 
2168  const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2169  void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2170 
2172  bool IsValidAsianCompression() const;
2174 
2175  bool GetAsianKerning() const;
2176  bool IsValidAsianKerning() const;
2177  void SetAsianKerning(bool bNew);
2179 
2180  EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2181 
2183  void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2184 
2186 
2187  void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2188  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2189  svl::SharedStringPool* pPool = nullptr) const;
2190 
2199  void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2200 
2201  void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2202  void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2203 
2209  void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2210  void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2211 
2212  std::set<Color> GetDocColors();
2214 
2215 private:
2216  ScDocument(const ScDocument& r) = delete;
2217 
2218  void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2219  SCCOL nX1, SCCOL nX2 ) const;
2220 
2221  sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2222  ScDocument& rOtherDoc,
2223  SCROW nOtherRow, SCTAB nOtherTab,
2224  SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2225  sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2226  ScDocument& rOtherDoc,
2227  SCCOL nOtherCol, SCTAB nOtherTab,
2228  SCROW nMaxRow, const SCCOLROW* pOtherRows );
2229  void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2230  bool bColumns,
2231  ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2232  SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2233  ScProgress* pProgress, sal_uLong nProAdd );
2234 
2235  DECL_LINK(TrackTimeHdl, Timer *, void);
2236 
2252  bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2253  bool& o_bEntirelyOutOfBounds ) const;
2254 
2255 public:
2256  void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2257 
2258  void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2264  void Broadcast( const ScHint& rHint );
2265 
2266  void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2267 
2269  void AreaBroadcast( const ScHint& rHint );
2270  void DelBroadcastAreasInRange( const ScRange& rRange );
2271  void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2272  const ScRange& rRange,
2273  SCCOL nDx, SCROW nDy, SCTAB nDz );
2274 
2275  void StartListeningCell( const ScAddress& rAddress,
2276  SvtListener* pListener );
2277  void EndListeningCell( const ScAddress& rAddress,
2278  SvtListener* pListener );
2279 
2280  void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2281  void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2282 
2283  void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2284 
2285  void PutInFormulaTree( ScFormulaCell* pCell );
2286  void RemoveFromFormulaTree( ScFormulaCell* pCell );
2287 
2301  SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2302  void ClearFormulaTree();
2303  void AppendToFormulaTrack( ScFormulaCell* pCell );
2304  void RemoveFromFormulaTrack( ScFormulaCell* pCell );
2305  void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2308  void FinalTrackFormulas( SfxHintId nHintId );
2310  bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2311  bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2313  void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; }
2314  void StartAllListeners();
2315  void StartNeededListeners();
2316  void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2317  SC_DLLPUBLIC void StartAllListeners( const ScRange& rRange );
2318 
2319  void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2321 
2322  bool IsInInterpreter() const { return nInterpretLevel != 0; }
2323 
2325  {
2326  assert(!IsThreadedGroupCalcInProgress());
2327  if ( nInterpretLevel < USHRT_MAX )
2328  nInterpretLevel++;
2329  }
2331  {
2332  assert(!IsThreadedGroupCalcInProgress());
2333  if ( nInterpretLevel )
2334  nInterpretLevel--;
2335  }
2336  sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2338  {
2339  assert(!IsThreadedGroupCalcInProgress());
2340  if ( nMacroInterpretLevel < USHRT_MAX )
2341  nMacroInterpretLevel++;
2342  }
2344  {
2345  assert(!IsThreadedGroupCalcInProgress());
2346  if ( nMacroInterpretLevel )
2347  nMacroInterpretLevel--;
2348  }
2349  bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; }
2351  {
2352  if ( nInterpreterTableOpLevel < USHRT_MAX )
2353  nInterpreterTableOpLevel++;
2354  }
2356  {
2357  if ( nInterpreterTableOpLevel )
2358  nInterpreterTableOpLevel--;
2359  }
2360 
2361  // add a formula to be remembered for TableOp broadcasts
2363  void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = false; }
2365  bool IsInDtorClear() const { return bInDtorClear; }
2366  void SetExpandRefs( bool bVal );
2367  bool IsExpandRefs() const { return bExpandRefs; }
2368 
2371  {
2372  if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount )
2373  nXMLImportedFormulaCount += nVal;
2374  }
2376  {
2377  if ( nVal <= nXMLImportedFormulaCount )
2378  nXMLImportedFormulaCount -= nVal;
2379  else
2380  nXMLImportedFormulaCount = 0;
2381  }
2382 
2383  void StartTrackTimer();
2384 
2385  void CompileDBFormula();
2386  void CompileColRowNameFormula();
2387 
2392  sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2393  SCROW nRowStart, SCROW nRowEnd,
2394  rtl_TextEncoding eCharSet ) const;
2398  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2399  SCTAB nTab, SCCOL nCol,
2400  SCROW nRowStart, SCROW nRowEnd ) const;
2401 
2402  void KeyInput(); // TimerDelays etc.
2403 
2404  ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2405 
2408  SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2409 
2410  void StartChangeTracking();
2411  void EndChangeTracking();
2412 
2413  SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2414 
2415  void AddUnoObject( SfxListener& rObject );
2416  void RemoveUnoObject( SfxListener& rObject );
2417  void BroadcastUno( const SfxHint &rHint );
2418  void AddUnoListenerCall( const css::uno::Reference<
2419  css::util::XModifyListener >& rListener,
2420  const css::lang::EventObject& rEvent );
2421 
2422  void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2423  bool IsInLinkUpdate() const; // including DdeLink
2424 
2429 
2430  std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2431  { return pRefreshTimerControl; }
2432 
2433  void SetPastingDrawFromOtherDoc( bool bVal )
2434  { bPastingDrawFromOtherDoc = bVal; }
2436  { return bPastingDrawFromOtherDoc; }
2437 
2439  sal_uInt32 GetDocumentID() const;
2440 
2441  void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; }
2442  void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2443  void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2444 
2445  void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2446  { mxVbaEvents = rxVbaEvents; }
2447  const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2448 
2452 
2454  bool IsInVBAMode() const;
2456 
2457  void AddSubTotalCell(ScFormulaCell* pCell);
2458  void RemoveSubTotalCell(ScFormulaCell* pCell);
2459  void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2460 
2461  sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2462 
2463  SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2464  void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2465  void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2466 
2477  void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2478  void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2479  void RegroupFormulaCells( const ScRange& range );
2480 
2483 
2485  bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2486 #ifdef DBG_UTIL
2487  void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2488 #endif
2489 
2494  void PrepareFormulaCalc();
2495 
2510  SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2511 
2512  SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2513  const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2514  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2515 
2516  std::optional<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2517  void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2518 
2519  SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2520  SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2521 
2522 #if DUMP_COLUMN_STORAGE
2523  SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2524 #endif
2525 
2526 #if DEBUG_AREA_BROADCASTER
2527  SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2528 #endif
2529 
2530  SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2531  const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2532  void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2533  void SwapNonEmpty( sc::TableValues& rValues );
2534  void finalizeOutlineImport();
2535  bool TableExists( SCTAB nTab ) const;
2536 
2537  SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2538 
2539  bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2540  void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2541 
2550  OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2551 
2552  SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2553  SCROW GetLOKFreezeRow(SCTAB nTab) const;
2554  bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2555  bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2556 
2557 private:
2558 
2565  {
2566  public:
2567  explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2569 
2570  private:
2572  };
2573 
2574  ScTable* FetchTable( SCTAB nTab );
2575  const ScTable* FetchTable( SCTAB nTab ) const;
2576 
2577  void MergeNumberFormatter(const ScDocument& rSrcDoc);
2578 
2579  void ImplCreateOptions(); // Suggestion: switch to on-demand?
2580  void ImplDeleteOptions();
2581 
2582  void DeleteDrawLayer();
2583  SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2584 
2585  void UpdateDrawPrinter();
2586  void UpdateDrawLanguages();
2587  SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2588 
2589  void LoadDdeLinks(SvStream& rStream);
2590  void SaveDdeLinks(SvStream& rStream) const;
2591 
2592  void DeleteAreaLinksOnTab( SCTAB nTab );
2593  void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2594  const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2595 
2596  void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2597 
2598  bool HasPartOfMerged( const ScRange& rRange );
2599 
2600  ScRefCellValue GetRefCellValue( const ScAddress& rPos );
2602 
2603  std::map< SCTAB, ScSortParam > mSheetSortParams;
2604 
2605  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2606  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2607  void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2608 
2609  void SharePooledResources( const ScDocument* pSrcDoc );
2610 
2612  sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2613 
2615  sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2616 
2617  void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2618  void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2619 };
2620 
2621 typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2622 
2629 {
2630 #ifndef NDEBUG
2632  : mnFlagRestore(rDocument.mnMutationGuardFlags)
2633  , mrDocument(rDocument)
2634  {
2635  assert((mnFlagRestore & nFlags) == 0);
2636  mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2637  }
2639  {
2641  }
2644 #else
2646  {
2647  (void)rDocument; (void)nFlags;
2648  }
2649 #endif
2650 };
2651 
2662 {
2663 #ifndef NDEBUG
2665  : mnFlags(static_cast<size_t>(nFlags))
2666  , mrDocument(rDocument)
2667  {
2668  assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2669  }
2670 
2672  {
2673  assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2674  }
2675  size_t mnFlags;
2677 #else
2678  ScMutationGuard(ScDocument& rDocument, ScMutationGuardFlags nFlags)
2679  {
2680  (void)rDocument; (void)nFlags;
2681  }
2682 #endif
2683 };
2684 
2686 {
2688 
2689 public:
2691  : mrDoc(rDoc)
2692  {
2693  assert(!mrDoc.IsInDocShellRecalc());
2694  mrDoc.SetDocShellRecalc(true);
2695  }
2696 
2698  {
2699  mrDoc.SetDocShellRecalc(false);
2700  }
2701 };
2702 
2703 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC void UpdateTranspose(const ScAddress &rDestPos, ScDocument *pClipDoc, const ScMarkData &rMark, ScDocument *pUndoDoc)
Definition: documen3.cxx:1109
exports com.sun.star.lib. util
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3327
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:511
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1895
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:6862
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:575
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:616
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
bool IsInFormulaTree(const ScFormulaCell *pCell) const
Definition: documen7.cxx:321
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:540
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:525
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4781
bool mbEmbedFontScriptComplex
Definition: document.hxx:558
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
Definition: documen6.cxx:40
void BeginDrawUndo()
Definition: documen9.cxx:60
bool IsInDocShellRecalc() const
Definition: document.hxx:2539
void ClearDetectiveOperations()
Definition: documen4.cxx:899
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2085
ScCalcConfig maCalcConfig
Definition: document.hxx:363
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5353
ScMutationGuard(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2664
void AssertNoInterpretNeeded(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1781
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:377
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4329
void FillInfo(ScTableInfo &rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData *pMarkData=nullptr)
Definition: fillinfo.cxx:347
bool IsValidAsianKerning() const
Definition: documen9.cxx:651
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
Definition: document.cxx:1805
std::shared_ptr< SvxForbiddenCharactersTable > xForbiddenCharacters
Definition: document.hxx:398
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:1578
void IncInDdeLinkUpdate()
Definition: document.hxx:1017
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:366
void EnableIdle(bool bDo)
Definition: document.hxx:2130
void ClearLookupCaches()
Zap all caches.
Definition: documen2.cxx:1195
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6247
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:813
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4890
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:369
bool HasExternalRefManager() const
Definition: document.hxx:1002
bool bIsUndo
Definition: document.hxx:491
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4860
void DeleteRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1359
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5698
bool bStyleSheetUsageInvalid
Definition: document.hxx:541
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4737
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4731
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:5946
SfxHintId
sal_uLong GetXMLImportedFormulaCount() const
Definition: document.hxx:2369
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:880
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4882
ScFormulaCell * pFormulaTree
Definition: document.hxx:383
void CalculateInColumnInThread(ScInterpreterContext &rContext, const ScRange &rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
Definition: documen8.cxx:411
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1524
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1836
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
Definition: document.cxx:6313
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:554
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:814
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:880
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4341
SfxItemSet * GetPreviewFont()
Definition: document.hxx:1340
void GetClipStart(SCCOL &nClipX, SCROW &nClipY)
Definition: document.cxx:3201
void IncXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2370
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:864
bool HasUnoRefUndo() const
Definition: document.hxx:1064
void EndChangeTracking()
Definition: documen2.cxx:269
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4825
SC_DLLPUBLIC void SetScenario(SCTAB nTab, bool bFlag)
Definition: documen3.cxx:426
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
Definition: documen2.cxx:643
std::unique_ptr< ScChangeTrack > pChangeTrack
Definition: document.hxx:391
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:565
void SetForcedFormulas(bool bVal)
Definition: document.hxx:2319
sal_uLong nFormulaCount
Definition: document.hxx:280
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1106
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1906
SC_DLLPUBLIC void GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rString)
Definition: document.cxx:3571
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5082
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:34
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6276
sal_uInt16 nInterpretLevel
Definition: document.hxx:460
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter *pInterpreter)
Definition: documen8.cxx:431
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4359
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
Definition: document.hxx:370
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:580
bool IsInInterpreter() const
Definition: document.hxx:2322
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:507
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:747
void SetCutMode(bool bCut)
Definition: document.cxx:2029
HasAttrFlags
Definition: global.hxx:192
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:993
Use this to lock all charts in the calc for a little time.
Definition: chartlock.hxx:52
ScUnoListenerCalls stores notifications to XModifyListener that can't be processed during BroadcastUn...
bool IsEnabledDelayStartListeningFormulaCells(ScColumn *column) const
Definition: document10.cxx:421
bool mbUndoEnabled
Definition: document.hxx:543
bool bInDtorClear
Definition: document.hxx:511
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:402
ScValidationDataList * GetValidationList()
Definition: document.hxx:1804
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:176
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:610
SCTAB nVisibleTab
Definition: document.hxx:477
OUString maFileURL
Definition: document.hxx:416
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:583
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2430
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1408
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1111
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1359
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
Definition: documen3.cxx:1462
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
Definition: documen3.cxx:1923
const OUString & GetFileURL() const
Definition: document.hxx:598
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
Definition: document.cxx:2237
SC_DLLPUBLIC void DoMergeContents(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2031
FillDir
Definition: global.hxx:317
void SetSheetEvents(SCTAB nTab, std::unique_ptr< ScSheetEvents > pNew)
Definition: documen3.cxx:666
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2447
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:2816
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4562
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2521
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:664
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:360
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
Definition: document.cxx:6235
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:2124
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1115
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
Definition: documen3.cxx:877
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
Definition: document.cxx:318
std::unique_ptr< ScClipParam > mpClipParam
Definition: document.hxx:405
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:776
sheet protection state container
ScObjectHandling
Definition: drwlayer.hxx:89
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:402
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
Definition: documen3.cxx:455
SfxObjectShell * mpShell
Definition: document.hxx:368
ScRangePairList * GetColNameRanges()
Definition: document.hxx:806
std::optional< sc::ColumnIterator > GetColumnIterator(SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:966
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:195
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:591
ScInterpreterContext maInterpreterContext
Definition: document.hxx:470
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
Definition: document.cxx:3754
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:40
ScScenarioFlags
Definition: global.hxx:235
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:196
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:808
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const
Definition: document.cxx:6174
bool IsExpandRefs() const
Definition: document.hxx:2367
SC_DLLPUBLIC void CopyStdStylesFrom(const ScDocument &rSrcDoc)
Definition: documen8.cxx:288
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:575
void FillMatrix(ScMatrix &rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool=nullptr) const
Definition: documen8.cxx:384
void CompileColRowNameFormula()
Definition: documen4.cxx:567
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:949
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1776
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1546
SCROW GetLOKFreezeRow(SCTAB nTab) const
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
Definition: documen8.cxx:310
sc::IconSetBitmapMap & GetIconSetBitmapMap()
Definition: documen2.cxx:1385
SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const
Definition: document.cxx:6606
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:878
bool mbUserInteractionEnabled
Definition: document.hxx:547
Context for reference update during shifting, moving or copying of cell ranges.
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:286
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:373
const sal_uInt8 SC_DDE_DEFAULT
Definition: document.hxx:292
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6329
void SetName(const OUString &r)
Definition: document.hxx:595
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5038
ScMutationGuardFlags
Enumeration to determine which pieces of the code should not be mutated when set. ...
Definition: document.hxx:305
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2627
bool mbStreamValidLocked
Definition: document.hxx:546
exports com.sun.star. embed
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3555
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
Definition: documen3.cxx:365
bool IsUndo() const
Definition: document.hxx:1533
List of RefUpdate changes made to UNO objects during ScUpdateRefHint broadcast.
Definition: unoreflist.hxx:41
sal_Int16 mnNamedRangesLockCount
Definition: document.hxx:549
ScInterpreterContext * pContext
Definition: document.hxx:301
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:993
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4913
static const sal_uInt16 nSrcVer
Definition: document.hxx:474
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:1984
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1019
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4498
rtl::Reference< XColorList > pColorList
Definition: document.hxx:372
void BlockFormulaGroupContextDiscard(bool block)
Definition: document.hxx:1189
normal calculation of dependencies
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
Definition: documen8.cxx:209
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2610
const ScMarkData & GetPreviewSelection() const
Definition: document.hxx:1342
void SetPendingRowHeights(SCTAB nTab, bool bSet)
Definition: document.cxx:943
rtl_TextEncoding eSrcSet
Definition: document.hxx:452
bool IsTrackFormulasPending() const
Definition: document.hxx:2307
sal_uLong GetCodeCount() const
Definition: document.cxx:6187
sal_uInt16 nFormulaTrackCount
Definition: document.hxx:475
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:1350
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:464
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1730
void DecInterpreterTableOpLevel()
Definition: document.hxx:2355
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:3033
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:338
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
bool IsClipOrUndo() const
Definition: document.hxx:1532
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:2135
Stores cell values for multiple tables.
Definition: cellvalues.hxx:85
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6347
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4506
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
Definition: document.cxx:3672
OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType)
Serializes the specified sheet's geometry data.
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2470
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
Definition: documen4.cxx:706
SC_DLLPUBLIC bool DeleteTabs(SCTAB nTab, SCTAB nSheets)
Definition: document.cxx:760
Extended options held by an ScDocument containing additional settings for filters.
Definition: scextopt.hxx:76
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4514
bool bLoadingMedium
Definition: document.hxx:500
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1491
bool bCalcingAfterLoad
Definition: document.hxx:502
HardRecalcState eHardRecalcState
Definition: document.hxx:476
VirtualDevice * GetVirtualDevice_100th_mm()
Definition: documen8.cxx:181
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3539
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:21
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2690
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3489
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam &rParam, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark)
Definition: documen4.cxx:356
sal_Int64 GetNewUnoId()
Definition: document.hxx:1067
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:984
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:462
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5755
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1701
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:218
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1479
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
Definition: document.cxx:329
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:422
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1798
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:373
void AppendToFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:451
const sal_uInt8 SC_DDE_TEXT
Definition: document.hxx:294
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Definition: document.cxx:4788
Accessor class to ScDocument.
bool bImportingXML
Definition: document.hxx:501
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
Definition: documen2.cxx:1354
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
Definition: lookupcache.hxx:39
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:673
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:227
void SetClipOptions(std::unique_ptr< ScClipOptions > pClipOptions)
Definition: documen3.cxx:2026
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:485
SC_DLLPUBLIC SfxUndoManager * GetUndoManager()
Definition: document.cxx:6402
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4420
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
Definition: documen8.cxx:141
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:4452
ScFormulaCell * pEOFormulaTrack
Definition: document.hxx:386
void SetHardRecalcState(HardRecalcState eVal)
Definition: document.hxx:2313
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2108
void GetClipArea(SCCOL &nClipX, SCROW &nClipY, bool bIncludeFiltered)
Definition: document.cxx:3149
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:777
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:1153
std::map< SCTAB, ScSortParam > mSheetSortParams
Definition: document.hxx:2603
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:900
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:494
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:877
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:70
sal_uLong nXMLImportedFormulaCount
Definition: document.hxx:459
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5205
bool HasAutoFilter(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1492
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
Definition: document.cxx:6359
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:193
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6806
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:488
bool TableExists(SCTAB nTab) const
Definition: document.cxx:2516
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:374
SC_DLLPUBLIC void GetFormula(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rFormula) const
Definition: document.cxx:3746
bool IsAdjustHeightLocked() const
Definition: document.hxx:1539
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4390
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4192
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:319
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
Definition: documen2.cxx:469
void SetClipParam(const ScClipParam &rParam)
Definition: document.cxx:2573
bool mbChangeReadOnlyEnabled
Definition: document.hxx:545
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:436
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:999
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:3462
exports com.sun.star. sheet
void MixDocument(const ScRange &rRange, ScPasteFunc nFunction, bool bSkipEmpty, ScDocument &rSrcDoc)
Definition: document.cxx:3239
void RemoveFromFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:467
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:5273
bool GetNextSpellingCell(SCCOL &nCol, SCROW &nRow, SCTAB nTab, bool bInSel, const ScMarkData &rMark) const
Definition: documen4.cxx:531
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:392
Row-wise value iterator.
Definition: dociter.hxx:478
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:2221
void UnlockTable(SCTAB nTab)
Definition: document.cxx:5343
bool HasAnySheetEventScript(ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:696
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1542
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6087
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
Definition: documen3.cxx:1426
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1210
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:872
LanguageType eCjkLanguage
Definition: document.hxx:450
void InvalidateTableArea()
Definition: documen4.cxx:577
ScLkUpdMode eLinkMode
Definition: document.hxx:481
SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4586
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:113
void DeleteDrawLayer()
Definition: documen9.cxx:229
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:592
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3866
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:499
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4929
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: documen2.cxx:621
void RepaintRange(const ScRange &rRange)
Definition: documen8.cxx:689
sal_uInt16 sal_Unicode
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:935
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Notes.
Definition: document.cxx:6534
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:581
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:568
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:858
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6689
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1154
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:120
bool HandleRefArrayForParallelism(const ScAddress &rPos, SCROW nLength, const ScFormulaCellGroupRef &mxGroup)
Definition: document.cxx:1796
bool bForcedFormulaPending
Definition: document.hxx:488
std::unordered_map< ScColumn *, std::pair< SCROW, SCROW > > pDelayedStartListeningFormulaCells
Definition: document.hxx:525
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:615
void SetChartListenerCollectionNeedsUpdate(bool bFlg)
Definition: document.hxx:2162
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:759
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:852
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:539
ScClipParam & GetClipParam()
Definition: document.cxx:2565
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4168
void InvalidateStyleSheetUsage()
Definition: document.hxx:2441
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:1005
ScDocument & mrDocument
Definition: document.hxx:2643
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:872
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
void SetNamedRangesLockCount(sal_Int16 nCount)
Definition: document.hxx:1549
void SetCodeName(const OUString &r)
Definition: document.hxx:597
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:313
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4603
SvtScriptType GetRangeScriptType(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rPos, SCROW nLength)
Definition: documen6.cxx:183
Additional class containing cell annotation data.
Definition: postit.hxx:159
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:384
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:800
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4114
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:307
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
Definition: document.cxx:5126
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:368
sal_uLong GetFormulaCodeInTree() const
Definition: document.hxx:2320
TableContainer maTabs
Definition: document.hxx:375
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
Definition: documen8.cxx:1024
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:582
ScLkUpdMode
Definition: global.hxx:418
const ScValidationDataList * GetValidationList() const
Definition: document.hxx:1803
FillDateCmd
Definition: global.hxx:342
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
Definition: document.hxx:397
void DecInDdeLinkUpdate()
Definition: document.hxx:1018
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
Definition: document.cxx:3517
void DecInterpretLevel()
Definition: document.hxx:2330
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:387
bool IsFinalTrackFormulas() const
Definition: document.hxx:2309
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:2050
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:424
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:412
void SetNoListening(bool bVal)
Definition: document.hxx:2151
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:4271
bool bInsertingFromOtherDoc
Definition: document.hxx:499
bool ValidRange(const ScRange &rRange, SCCOL nMaxCol=MAXCOL, SCROW nMaxRow=MAXROW)
Definition: address.hxx:792
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:66
void GetOldChartParameters(std::u16string_view rName, ScRangeList &rRanges, bool &rColHeaders, bool &rRowHeaders)
Definition: documen5.cxx:202
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:259
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:623
SC_DLLPUBLIC bool IsDocVisible() const
Definition: document.hxx:1556
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:333
bool IsAutoCalcShellDisabled() const
Definition: document.hxx:1363
std::unique_ptr< ScDocProtection > pDocProtection
Definition: document.hxx:404
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:25
std::map< OUString, BitmapEx > IconSetBitmapMap
Definition: document.hxx:208
OUString aDocCodeName
Definition: document.hxx:415
Walk through all cells in an area.
Definition: dociter.hxx:207
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1706
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:325
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
Definition: document.cxx:190
ScLinkMode
Definition: global.hxx:224
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:473
bool mbIdleEnabled
Definition: document.hxx:505
void DiscardFormulaGroupContext()
Definition: document.cxx:3564
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:6120
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1771
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6305
std::set< ScFormulaCell * > maSubTotalCells
Definition: document.hxx:551
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1058
bool HasSheetEventScript(SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:672
const sal_uInt8 SC_DDE_IGNOREMODE
Definition: document.hxx:295
void RestoreChartListener(const OUString &rName)
Definition: documen5.cxx:363
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1931
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:500
SCTAB GetMaxTableNumber() const
Definition: document.hxx:804
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:61
void EndListeningFormulaCells(std::vector< ScFormulaCell * > &rCells)
Definition: documen7.cxx:246
SC_DLLPUBLIC ~ScDocument()
Definition: documen2.cxx:326
Optimized ColumnSpanSet version that operates on a single ScRange.
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:574
std::unique_ptr< ScDBData > mpAnonymousDBData
Definition: document.hxx:399
sal_uInt16 ColDifferences(SCCOL nThisCol, SCTAB nThisTab, ScDocument &rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, const SCCOLROW *pOtherRows)
Definition: documen4.cxx:955
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:754
SCROW SanitizeRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:132
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated...
Definition: document.cxx:2464
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6200
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4120
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
Definition: documen2.cxx:487
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2153
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:4800
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4139
bool mbTrackFormulasPending
Definition: document.hxx:562
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4766
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:549
SfxUndoManager * mpUndoManager
Definition: document.hxx:365
SC_DLLPUBLIC bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:81
void MarkUsedExternalReferences()
Definition: documen3.cxx:637
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
Definition: document.cxx:6292
bool bHasForcedFormulas
Definition: document.hxx:509
void FinalTrackFormulas(SfxHintId nHintId)
Definition: documen7.cxx:506
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2404
std::unique_ptr< ScDrawLayer > mpDrawLayer
Definition: document.hxx:371
TransliterationFlags
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScDocument *pClipDoc)
Definition: document.cxx:2248
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4546
bool mbFinalTrackFormulas
Definition: document.hxx:563
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1551
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:4745
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, std::unique_ptr< ScRangeName >> &rRangeMap)
Definition: documen3.cxx:121
void PutInFormulaTree(ScFormulaCell *pCell)
Definition: documen7.cxx:258
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2145
void StylesToNames()
Definition: document.cxx:6148
void StartListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:208
void ImplCreateOptions()
Definition: documen8.cxx:100
void SetInsertingFromOtherDoc(bool bVal)
Definition: document.hxx:2145
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2061
void ResetEmbedded()
Definition: documen3.cxx:1745
bool GetNoListening() const
Definition: document.hxx:2152
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:916
ScStyleSheet * GetPreviewCellStyle()
Definition: document.hxx:1344
bool HasValidationData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3840
SC_DLLPUBLIC bool GetCellArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
Definition: document.cxx:1009
ScRangePairListRef xColNameRanges
Definition: document.hxx:417
bool IsClipboard() const
Definition: document.hxx:1534
SC_DLLPUBLIC bool HasRowHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1530
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bValidation=false)
Entries for selection list listbox (no numbers/formulas)
Definition: documen3.cxx:1617
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3659
ScMutationDisable(ScDocument &rDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2631
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1939
SCCOL SanitizeCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:126
SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, const OUString &rFormula, const ScTokenArray *p=nullptr, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT)
Definition: documen4.cxx:258
constexpr double nPPTX
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx:483
bool IsPrintEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
Definition: documen9.cxx:435
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:714
A pretty assertion that checks that the relevant bits in the are not set on the document at entry an...
Definition: document.hxx:2661
bool bInUnoBroadcast
Definition: document.hxx:536
size_t mnMutationGuardFlags
Definition: document.hxx:567
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:3425
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:891
void InvalidateStreamOnSave()
Definition: document.cxx:494
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:515
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
Definition: document.cxx:1088
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:6839
void SwapNonEmpty(sc::TableValues &rValues)
Definition: document10.cxx:223
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:92
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
Definition: documen2.cxx:549
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:859
ScDBDataPortion
Enum used to indicate which portion of the DBArea is to be considered.
Definition: dbdata.hxx:40
ScPasteFunc
Definition: global.hxx:188
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3394
std::unique_ptr< ScViewOptions > pViewOptions
Definition: document.hxx:420
SC_DLLPUBLIC ScDocProtection * GetDocProtection() const
Definition: documen3.cxx:1882
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:276
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1203
bool HasAnyCalcNotification() const
Definition: documen3.cxx:705
bool HasClipFilteredRows()
Definition: document.cxx:3218
bool bExpandRefs
Definition: document.hxx:516
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
Definition: document.hxx:456
SC_DLLPUBLIC ScPostIt * GetOrCreateNote(const ScAddress &rPos)
Definition: document.cxx:6639
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:437
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1058
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3134
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:871
T * get() const
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:993
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4937
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:440
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4476
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
Definition: document.cxx:5075
bool IsChartListenerCollectionNeedsUpdate() const
Definition: document.hxx:2161
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2146
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5887
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:767
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:98
Parameter for data table aka multiple operations.
Definition: paramisc.hxx:45
SvtScriptType
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2435
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:479
bool bIsFunctionAccess
Definition: document.hxx:492
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1439
FillCmd
Definition: global.hxx:325
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:237
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:6846
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
Definition: document.cxx:6297
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4578
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:590
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6241
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
Definition: documen3.cxx:275
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:380
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:326
bool IsImportingXML() const
Definition: document.hxx:2149
Keep track of all named expressions that have been updated during reference update.
SCCOL nPosLeft
Definition: document.hxx:478
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1543
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:917
bool bIsEmbedded
Definition: document.hxx:495
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1266
SCROW GetNextDifferentChangedRow(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4642
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:360
LanguageType eCtlLanguage
Definition: document.hxx:451
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:869
SC_DLLPUBLIC bool IsDefaultTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:461
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:146
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:342
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4684
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:376
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2488
CharCompressType
void UpdateAllRowHeights(sc::RowHeightContext &rCxt, const ScMarkData *pTabMark)
Definition: document.cxx:4306
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
Definition: documen3.cxx:882
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:202
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:438
void GetFormulaEntries(ScTypedCaseStrSet &rStrings)
Entries for Formula auto input.
Definition: documen3.cxx:1657
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:959
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3259
void CompileXML()
Definition: document.cxx:4001
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4530
bool bDetectiveDirty
Definition: document.hxx:518
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
Definition: document.hxx:360
ScMoveDirection
Definition: global.hxx:334
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6722
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2621
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4382
void IncMacroInterpretLevel()
Definition: document.hxx:2337
SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream &rStream)
sal_Int16 SCCOL
Definition: types.hxx:21
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:5958
std::unique_ptr< sc::ExternalDataMapper > mpDataMapper
Definition: document.hxx:400
void GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: documen3.cxx:1200
InsertDeleteFlags
Definition: global.hxx:157
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
Definition: documen8.cxx:987
SCCOL GetNextDifferentChangedCol(SCTAB nTab, SCCOL nStart) const
Definition: document.cxx:4624
bool ValidCol(SCCOL nCol) const
Definition: document.hxx:874
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2445
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2452
sal_uLong nCellCount
Definition: document.hxx:279
bool GetDdeLinkData(size_t nDdePos, OUString &rAppl, OUString &rTopic, OUString &rItem) const
Returns the connection data of the specified DDE link.
Definition: documen8.cxx:965
LanguageType eLanguage
Definition: document.hxx:449
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:343
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong *pnMaxHeight=nullptr) const
Definition: document.cxx:4229
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6369
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:602
void EnableChangeReadOnly(bool bVal)
Definition: document.hxx:1545
bool HasAreaLinks() const
Definition: documen8.cxx:1034
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1107
ScMarkData maPreviewSelection
Definition: document.hxx:430
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:666
bool IsForcedFormulaPending() const
Definition: document.hxx:1366
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:2101
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1959
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:873
bool HasRangeOverflow() const
Definition: document.hxx:2141
void RemoveEditTextCharAttribs(const ScAddress &rPos, const ScPatternAttr &rAttr)
Definition: document.cxx:3651
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:6818
bool IsFunctionAccess() const
Definition: document.hxx:1537
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1240
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
Definition: documen8.cxx:977
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:391
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:652
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScMarkData &rMark, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document10.cxx:56
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:451
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4794
ScRange aEmbedRange
Definition: document.hxx:435
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:908
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1176
EEHorizontalTextDirection
sal_uInt16 GetMacroInterpretLevel() const
Definition: document.hxx:2336
SC_DLLPUBLIC void UnlockAdjustHeight()
Definition: document.cxx:1789
SC_DLLPUBLIC SCCOL ClampToAllocatedColumns(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2140
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
bool IsInInterpreterTableOp() const
Definition: document.hxx:2349
bool RenamePageStyleInUse(std::u16string_view rOld, const OUString &rNew)
Definition: documen8.cxx:340
void SetLinkFormulaNeedingCheck(bool bSet)
Definition: document.hxx:2136
void EndListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:217
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:852
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6259
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
bool IsDetectiveDirty() const
Definition: document.hxx:2132
exports com.sun.star. i18n
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:391
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
Definition: documen3.cxx:546
bool IsCutMode()
Definition: document.cxx:2039
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4126
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6549
bool mbEmbedFontScriptAsian
Definition: document.hxx:557
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:503
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:1031
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
Definition: documen2.cxx:104
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2312
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
Definition: document.cxx:1095
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4817
SvNumFormatType
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:399
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
Definition: documen7.cxx:527
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6212
BroadcastAreaSlots and their management, once per document.
Definition: bcaslot.hxx:245
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4132
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:975
void DecXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2375
SC_DLLPUBLIC SCROW GetFirstEditTextRow(const ScRange &rRange) const
Definition: document.cxx:3453
Instantiate this to ensure that subsequent modification of the document will cause an assertion failu...
Definition: document.hxx:2628
void BroadcastUno(const SfxHint &rHint)
Definition: documen3.cxx:949
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1756
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:518
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6450
void RemoveSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6429
SC_DLLPUBLIC const EditTextObject * GetEditText(const ScAddress &rPos) const
Definition: document.cxx:3642
bool IsInExternalReferenceMarking() const
Definition: documen3.cxx:632
void SaveDdeLinks(SvStream &rStream) const
Definition: documen8.cxx:709
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2451
sal_uLong nFormulaCodeInTree
Definition: document.hxx:458
SCTAB nTableCount
Definition: document.hxx:278
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1988
bool IsBlockEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes=false) const
Definition: document.cxx:5322
void IncInterpreterTableOpLevel()
Definition: document.hxx:2350
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:252
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4176
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4102
SCROW GetRowForHeight(SCTAB nTab, sal_uLong nHeight) const
Given the height i.e.
Definition: document.cxx:4224
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd) const
Maximum string length of numerical cells of a column, e.g.
Definition: documen4.cxx:598
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
RangeNameScope
Definition: document.hxx:260
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:580
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1214
SC_DLLPUBLIC void DoMerge(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions=true)
Definition: documen3.cxx:2068
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6335
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4041
CommentCaptionState
Definition: document.hxx:253
std::unique_ptr< ScScriptTypeData > pScriptTypeData
Definition: document.hxx:396
SC_DLLPUBLIC void SetPosTop(SCROW nRow)
Definition: document.hxx:863
void RemoveManualBreaks(SCTAB nTab)
Definition: document.cxx:6253
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3796
SC_DLLPUBLIC ScPostIt * CreateNote(const ScAddress &rPos)
Definition: document.cxx:6646
bool HasSelectedBlockMatrixFragment(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark) const
Definition: document.cxx:5433
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
Definition: document.hxx:358
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
Definition: documen4.cxx:789
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2135
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3730
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1470
Use this class as a locale variable to merge number formatter from another document, and set NULL pointer to pFormatExchangeList when done.
Definition: document.hxx:2564
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
Definition: document.hxx:367
SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream &rStrm) const
void UpdateChartRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen5.cxx:391
void Broadcast(const ScHint &rHint)
Broadcast wrapper, calls rHint.GetCell()->Broadcast() and AreaBroadcast() and TrackFormulas() Preferr...
Definition: documen7.cxx:117
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6135
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1184
void CheckVectorizationState()
Definition: document.cxx:3852
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5594
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6559
void CompileDBFormula()
Definition: documen4.cxx:557
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
Definition: document.cxx:6671
sal_Int32 GetMaxStringLen(SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Maximum string length of a column, e.g.
Definition: documen4.cxx:589
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:879
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1338
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1083
sal_uInt16 nPageCount
Definition: document.hxx:281
void LockStreamValid(bool bLock)
Definition: document.cxx:930
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:254
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
Definition: document.hxx:441
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4538
FormulaError
bool mbExecuteLinkEnabled
Definition: document.hxx:544
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:143
bool bCalculatingFormulaTree
Definition: document.hxx:489
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3787
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6353
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:539
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:1603
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:721
ScDocument & mrDoc
Definition: document.hxx:2687
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4428
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:377
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4094
bool bInLinkUpdate
Definition: document.hxx:506
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1953
SCROW nPosTop
Definition: document.hxx:479
SheetGeomType
Represents the type of sheet geometry data.
Definition: document.hxx:267
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:771
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:898
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
Definition: document.hxx:394
std::unique_ptr< SvMemoryStream > pClipData
Definition: document.hxx:389
bool bIsVisible
Definition: document.hxx:493
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4057
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:226
void CopyBlockFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW nDy)
Definition: document.cxx:2635
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2140
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:949
Configuration options for formula interpreter.
Definition: calcconfig.hxx:43
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1372
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1368
ScBreakType
Definition: global.hxx:148
void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rStr)
Definition: documen3.cxx:1471
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:881
SC_DLLPUBLIC void DoEmptyBlock(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2055
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const
Definition: document.hxx:2182
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:468
void LockTable(SCTAB nTab)
Definition: document.cxx:5333
bool IdleCalcTextWidth()
Definition: documen8.cxx:532
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:634
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
Definition: document.cxx:6662
SCROW CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow, SCROW nClipEndRow)
Definition: document.cxx:2738
void finalizeOutlineImport()
Definition: document10.cxx:568
void InvalidateTextWidth(std::u16string_view rStyleName)
Definition: documen8.cxx:295
void SetDetOpList(std::unique_ptr< ScDetOpList > pNew)
Definition: documen4.cxx:904
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: document.hxx:876
void SyncColRowFlags()
Write all column row flags to table's flag data, because not all column row attributes are stored in ...
Definition: document.cxx:4594
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: document.cxx:5006
static thread_local ScDocumentThreadSpecific maThreadSpecific
Definition: document.hxx:468
void FindMaxRotCol(SCTAB nTab, RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2) const
Definition: document.cxx:5262
bool IsInDtorClear() const
Definition: document.hxx:2365
o3tl::sorted_vector< sal_uInt32 > ScCondFormatIndexes
Definition: document.hxx:202
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3720
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
Definition: document.cxx:6206
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:309
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:448
SCCOL GetPosLeft() const
Definition: document.hxx:860
void SkipOverlapped(SCCOL &rCol, SCROW &rRow, SCTAB nTab) const
Definition: document.cxx:5747
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:503
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi)
Definition: document.cxx:4297
SC_DLLPUBLIC sal_uLong AddValidationEntry(const ScValidationData &rNew)
Definition: documen4.cxx:717
SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, ScDirection eDir)
Definition: document.cxx:6097
void GetFilterSelCount(SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE &nSelected, SCSIZE &nTotal)
Definition: documen3.cxx:1536
CRFlags
Definition: global.hxx:134</