LibreOffice Module sc (master)  1
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
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 .
18  */
23 #include <vcl/idle.hxx>
24 #include <vcl/errcode.hxx>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <vcl/vclptr.hxx>
27 #include "patattr.hxx"
28 #include "scdllapi.h"
29 #include "interpretercontext.hxx"
30 #include "rangelst.hxx"
31 #include "rangenam.hxx"
32 #include "tabopparams.hxx"
33 #include "types.hxx"
34 #include <formula/grammar.hxx>
35 #include <formula/types.hxx>
36 #include "typedstrdata.hxx"
37 #include "calcmacros.hxx"
38 #include "calcconfig.hxx"
39 #include "sheetlimits.hxx"
40 #include <o3tl/deleter.hxx>
41 #include <o3tl/sorted_vector.hxx>
42 #include <svl/hint.hxx>
43 #include <svl/typedwhich.hxx>
44 #include <svl/zforlist.hxx>
45 #include <tools/gen.hxx>
46 #include <tools/solar.h>
48 #include <cassert>
49 #include <memory>
50 #include <map>
51 #include <set>
52 #include <vector>
54 #include "markdata.hxx"
56 namespace com { namespace sun { namespace star { namespace chart2 { class XChartDocument; } } } }
58 class Timer;
60 enum class SvtScriptType;
61 enum class ScMF;
62 enum class FormulaError : sal_uInt16;
63 enum class CharCompressType;
64 enum class EEHorizontalTextDirection;
65 namespace editeng { class SvxBorderLine; }
66 namespace formula { struct VectorRefArray; }
67 namespace svl {
69 class SharedString;
70 class SharedStringPool;
72 }
74 namespace sc {
76 struct FormulaGroupContext;
77 class StartListeningContext;
78 class EndListeningContext;
79 class CopyFromClipContext;
80 class ColumnSpanSet;
81 class RangeColumnSpanSet;
82 struct ColumnBlockPosition;
83 struct RefUpdateContext;
84 class EditTextIterator;
85 struct NoteEntry;
86 class DocumentStreamAccess;
87 class DocumentLinkManager;
88 class CellValues;
89 class TableValues;
90 class RowHeightContext;
91 struct SetFormulaDirtyContext;
92 class RefMovedHint;
93 struct ReorderParam;
94 class FormulaGroupAreaListener;
95 class ColumnSet;
96 class UpdatedRangeNames;
97 class TableColumnBlockPositionSet;
98 class ColumnIterator;
99 class ExternalDataMapper;
101 }
103 class Fraction;
105 class OutputDevice;
106 class SdrObject;
107 class SfxBroadcaster;
108 class SfxListener;
109 class SfxItemSet;
110 class SfxObjectShell;
111 class SfxBindings;
112 class SfxPoolItem;
113 class SfxItemPool;
114 class SfxPrinter;
115 class SfxStyleSheetBase;
116 class SvMemoryStream;
117 class SvxBoxInfoItem;
118 class SvxBoxItem;
120 namespace sfx2 {
121  class LinkManager;
122  }
123 class SvxSearchItem;
124 namespace vcl { class Window; }
125 class XColorList;
127 class ScAutoFormatData;
131 class ScClipOptions;
132 class ScConditionalFormat;
134 class ScDBCollection;
135 class ScDBData;
136 class ScDetOpData;
137 class ScDetOpList;
138 class ScDocOptions;
139 class ScDocProtection;
140 class ScDocumentPool;
141 class ScDrawLayer;
142 class ScExtDocOptions;
144 class ScFormulaCell;
145 class ScMacroManager;
146 class ScOutlineTable;
147 class ScPrintRangeSaver;
148 class ScStyleSheet;
149 class ScStyleSheetPool;
150 class ScTable;
151 class ScTableProtection;
152 class ScTokenArray;
153 class ScValidationData;
155 class ScViewOptions;
156 class ScChangeTrack;
158 class ScFieldEditEngine;
159 class ScNoteEditEngine;
160 class ScDPObject;
161 class ScDPCollection;
162 class ScMatrix;
163 class ScScriptTypeData;
164 class ScPoolHelper;
165 struct ScSortParam;
167 class ScUnoListenerCalls;
168 class ScUnoRefList;
169 class ScRecursionHelper;
170 struct RowInfo;
171 struct ScTableInfo;
172 struct ScTabOpParam;
173 class VirtualDevice;
174 class ScAutoNameCache;
176 class ScLookupCache;
177 struct ScLookupCacheMap;
178 class SfxUndoManager;
179 class ScFormulaParserPool;
180 struct ScClipParam;
181 class ScRowBreakIterator;
182 struct ScSetStringParam;
183 struct ScColWidthParam;
184 class ScSheetEvents;
185 class ScProgress;
186 class SvtListener;
187 class ScEditDataArray;
188 class EditTextObject;
189 struct ScRefCellValue;
190 class ScPostIt;
191 struct ScSubTotalParam;
192 struct ScQueryParam;
193 class ScHint;
194 class SvtBroadcaster;
195 enum class ScDBDataPortion;
196 enum class ScSheetEventId;
197 class BitmapEx;
198 class ScColumnsRange;
201 struct ScSheetLimits;
203 namespace sc {
205 typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
207 }
209 namespace com { namespace sun { namespace star {
210  namespace lang {
211  struct EventObject;
212  }
213  namespace i18n {
214  class XBreakIterator;
215  }
216  namespace util {
217  class XModifyListener;
218  }
219  namespace embed {
220  class XEmbeddedObject;
221  }
222  namespace script { namespace vba {
223  class XVBAEventProcessor;
224  } }
225  namespace sheet {
226  struct TablePageBreakData;
227  }
228 } } }
230 namespace weld {
232 class Window;
234 }
236 #define SC_DOC_NEW 0xFFFF
243 {
248 };
251 {
252  ALLSHOWN, // All comments captions are shown
253  ALLHIDDEN, // All comments captions are hidden
254  MIXED // There are comments in shown and hidden.
255 };
258 {
259  GLOBAL, // A range name can be defined
260  SHEET // with two scope on Manage Names dialog.
261 };
263 struct ScDocStat
264 {
265  OUString aDocName;
269  sal_uInt16 nPageCount;
271  : nTableCount(0)
272  , nCellCount(0)
273  , nFormulaCount(0)
274  , nPageCount(0)
275  {
276  }
277 };
279 // DDE link modes
285 // During threaded calculation fields being mutated are kept in this struct
287 {
288  ScRecursionHelper* pRecursionHelper; // information for recursive and iterative cell formulas
289  ScInterpreterContext* pContext; // references the context passed around for easier access
292  : pRecursionHelper(nullptr)
293  , pContext(nullptr)
294  {
295  }
297  // To be called in the thread at start
298  static void SetupFromNonThreadedData(const ScDocumentThreadSpecific& rNonThreadedData);
300  // To be called in the main thread after the thread has finished
301  static void MergeBackIntoNonThreadedData(ScDocumentThreadSpecific& rNonThreadedData);
302 };
306 {
307  // Bit mask bits
308  CORE = 0x0001,
309 };
311 typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
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;
344  typedef std::vector<ScTableUniquePtr> TableContainer;
346 public:
347  enum class HardRecalcState
348  {
349  OFF,
352  };
354 private:
357  std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
358  std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
360  std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
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;
402  std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
404  std::unique_ptr<ScDocProtection> pDocProtection;
405  std::unique_ptr<ScClipParam> mpClipParam;
407  std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
408  std::unique_ptr<ScMacroManager> mpMacroMgr;
410  // mutable for lazy construction
411  mutable std::unique_ptr< ScFormulaParserPool >
414  OUString aDocName; // optional: name of document
415  OUString aDocCodeName; // optional: name of document (twice?)
416  OUString maFileURL; // file URL for copy & paste
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;
426  std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
428  std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
431  sal_Int64 nUnoObjectId; // counted up for UNO objects
433  ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
440  css::uno::Reference< css::script::vba::XVBAEventProcessor >
442 public:
444  std::vector<ScInterpreterTableOpParams*> m_TableOpList;
447 private:
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
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
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.
472  osl::Mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
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
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
495  bool bIsEmbedded; // display/adjust Embedded area?
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;
523  bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
530  sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
534  sal_uInt32 nAdjustHeightLock;
541  bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
543  bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
547  std::set<ScFormulaCell*> maSubTotalCells;
550  bool mbEmbedFonts : 1;
556  std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
560  // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
565 public:
566  bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
567  void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
569  bool IsEmbedFonts() const { return mbEmbedFonts; }
575  void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
576  void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
581  SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
582  SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
583  sal_uLong GetCodeCount() const; // RPN-Code in formulas
584  DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
585  // number formatter
586 public:
588  SfxObjectShell* pDocShell = nullptr );
591  void SetName( const OUString& r ) { aDocName = r; }
592  const OUString& GetCodeName() const { return aDocCodeName; }
593  void SetCodeName( const OUString& r ) { aDocCodeName = r; }
594  const OUString& GetFileURL() const { return maFileURL; }
596  void GetDocStat( ScDocStat& rDocStat );
598  SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
601  {
603  return maInterpreterContext;
604  }
605  // Uses thread_local.
607  {
608  return IsThreadedGroupCalcInProgress() ? *maThreadSpecific.pContext : GetNonThreadedContext();
609  }
610  static void SetupFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
611  void MergeBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
621  SC_DLLPUBLIC const ScDocOptions& GetDocOptions() const;
622  SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
624  SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
625  void SetPrintOptions();
627  ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions.get(); }
628  SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
630  ScClipOptions* GetClipOptions() { return mpClipOptions.get(); }
631  void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
633  SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
634  void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
636  void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
637  const ScConsolidateParam* GetConsolidateDlgData() const { return pConsolidateDlgData.get(); }
639  void Clear( bool bFromDestructor = false );
641  std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
642  void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
649  SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap);
650  SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
653  void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
654  void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
655  bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
664  ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
710  SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
711  SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
712  bool bSameDoc, int nRecursion ) const;
754  bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
755  const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
756  const bool bUsedByFormula ) const;
761  SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap );
779  bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
792  bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
794  SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
796  ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
797  ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
804  SC_DLLPUBLIC ScDBCollection* GetDBCollection() const { return pDBCollection.get();}
805  void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
806  bool bRemoveAutoFilter = false );
807  const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
808  ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
809  const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
810  ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
814  SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString* pName ) const;
816  SC_DLLPUBLIC bool HasPivotTable() const;
819  SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
820  ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
822  void StopTemporaryChartLock();
824  void EnsureGraphicNames();
826  SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
827  bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
829  css::uno::Reference< css::chart2::XChartDocument > GetChartByName( const OUString& rChartName );
831  SC_DLLPUBLIC void GetChartRanges( const OUString& rChartName, std::vector< ScRangeList >& rRanges, const ScDocument* pSheetNameDoc );
832  void SetChartRanges( const OUString& rChartName, const std::vector< ScRangeList >& rRanges );
834  void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
835  bool bColHeaders, bool bRowHeaders, bool bAdd );
836  void UpdateChartArea( const OUString& rChartName,
837  const ScRangeListRef& rNewList,
838  bool bColHeaders, bool bRowHeaders, bool bAdd );
839  void GetOldChartParameters( const OUString& rName,
840  ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
841  css::uno::Reference<
842  css::embed::XEmbeddedObject >
843  FindOleObjectByName( const OUString& rName );
845  SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
847  SCTAB GetVisibleTab() const { return nVisibleTab; }
848  SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab) { nVisibleTab = nTab; }
849  SCCOL GetPosLeft() const { return nPosLeft; }
850  SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
851  SCROW GetPosTop() const { return nPosTop; }
852  SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
854  SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
855  SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
856  SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
857  SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
858  SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
859  SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
860  SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
861  SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
863  [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
864  [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
865  [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
866  [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
867  [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
868  [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
869  [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
870  [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
872  SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
874  OUString GetCopyTabName(SCTAB nTab) const;
876  SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
883  SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
890  SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
891  SC_DLLPUBLIC bool IsDocProtected() const;
892  bool IsDocEditable() const;
893  SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
895  SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
896  void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
898  void LockTable(SCTAB nTab);
899  void UnlockTable(SCTAB nTab);
901  bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
902  SCCOL nEndCol, SCROW nEndRow,
903  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
904  bool IsSelectionEditable( const ScMarkData& rMark,
905  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
906  bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
907  SCCOL nEndCol, SCROW nEndRow,
908  const ScMarkData& rMark ) const;
910  bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
911  bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
913  SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
915  bool IsEmbedded() const { return bIsEmbedded;}
916  void GetEmbedded( ScRange& rRange ) const;
917  void SetEmbedded( const ScRange& rRange );
918  void ResetEmbedded();
919  tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
920  void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
922  static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
924  SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
925  SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
926  SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
928  void AppendTabOnLoad(const OUString& rName);
929  void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
930  void InvalidateStreamOnSave();
932  SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
933  bool bExternalDocument = false, bool bUndoDeleteTab = false );
935  SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
936  bool bNamesValid = false );
937  SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
938  SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
939  SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
940  bool bExternalDocument = false );
941  bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
942  bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
943  const ScMarkData* pOnlyMarked = nullptr );
944  SC_DLLPUBLIC sal_uLong TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
945  bool bInsertNew = true,
946  bool bResultsOnly = false );
947  SC_DLLPUBLIC void TransferDrawPage(const ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
948  SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
949  SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
950  bool IsStreamValid( SCTAB nTab ) const;
951  void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
952  void LockStreamValid( bool bLock );
953  bool IsStreamValidLocked() const { return mbStreamValidLocked; }
954  bool IsPendingRowHeights( SCTAB nTab ) const;
955  void SetPendingRowHeights( SCTAB nTab, bool bSet );
956  SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL );
957  SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
958  SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
959  SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
960  SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
961  SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
962  Color& rColor, ScScenarioFlags &rFlags) const;
963  SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
964  const Color& rColor, ScScenarioFlags nFlags);
965  SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
966  SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
967  SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
968  void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
969  SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
970  SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
975  bool IsLinked( SCTAB nTab ) const;
976  SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
977  OUString GetLinkFlt( SCTAB nTab ) const;
978  OUString GetLinkOpt( SCTAB nTab ) const;
979  SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
980  sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
981  void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
982  const OUString& rFilter, const OUString& rOptions,
983  const OUString& rTabName, sal_uLong nRefreshDelay );
984  bool HasLink( const OUString& rDoc,
985  const OUString& rFilter, const OUString& rOptions ) const;
986  SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
987  const OUString& aFileName,
988  const OUString& aTabName );
990  bool HasExternalRefManager() const { return pExternalRefMgr.get(); }
992  bool IsInExternalReferenceMarking() const;
994  bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1000  bool HasAreaLinks() const;
1002  void UpdateAreaLinks();
1004  // originating DDE links
1005  void IncInDdeLinkUpdate() { if ( nInDdeLinkUpdate < 255 ) ++nInDdeLinkUpdate; }
1006  void DecInDdeLinkUpdate() { if ( nInDdeLinkUpdate ) --nInDdeLinkUpdate; }
1007  bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1009  SC_DLLPUBLIC void CopyDdeLinks( ScDocument* pDestDoc ) const;
1014  SC_DLLPUBLIC bool FindDdeLink( const OUString& rAppl, const OUString& rTopic,
1015  const OUString& rItem, sal_uInt8 nMode, size_t& rnDdePos );
1023  bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1028  bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1032  SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1037  SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1042  bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1046  SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return mpDrawLayer.get(); }
1047  SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1048  SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1049  void BeginDrawUndo();
1051  void BeginUnoRefUndo();
1052  bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1053  [[nodiscard]]
1054  std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1055  sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1056  void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1058  static bool IsChart( const SdrObject* pObject );
1060  void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1061  SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1062  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1063  SCCOL nDx, SCROW nDy, SCTAB nDz );
1065  void SetChartRangeList( const OUString& rChartName,
1066  const ScRangeListRef& rNewRangeListRef );
1068  void StartAnimations( SCTAB nTab );
1070  bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1071  bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1073  const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1074  void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1075  bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1076  bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1078  bool HasAnyCalcNotification() const;
1079  bool HasCalcNotification( SCTAB nTab ) const;
1080  void SetCalcNotification( SCTAB nTab );
1081  void ResetCalcNotifications();
1083  SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1084  bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1086  void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1087  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1089  bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1090  void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1091  bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1092  bool HasSubTotalCells( const ScRange& rRange );
1094  SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1096  // return TRUE = number format is set
1097  SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1098  const ScSetStringParam * pParam = nullptr );
1099  SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1100  const ScSetStringParam* pParam = nullptr );
1111  SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1112  void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1113  SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1114  SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1120  SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1121  void SetEmptyCell( const ScAddress& rPos );
1122  SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1123  SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1124  void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1125  void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1126  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1127  SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1139  bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1144  bool HasFormulaCell( const ScRange& rRange ) const;
1145  SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1146  SCCOL nCol2, SCROW nRow2,
1147  const ScMarkData& rMark,
1148  const OUString& rFormula,
1149  const ScTokenArray* p = nullptr,
1151  SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1152  SCCOL nCol1, SCROW nRow1,
1153  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1155  SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1156  const ScInterpreterContext* pContext = nullptr ) const;
1157  SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1158  const ScInterpreterContext* pContext = nullptr ) const;
1168  double* GetValueCell( const ScAddress& rPos );
1173  svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1175  std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1178  { mbFormulaGroupCxtBlockDiscard = block; }
1180  SC_DLLPUBLIC void GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rString );
1181  FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1182  SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1183  SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1184  SC_DLLPUBLIC void GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, double& rValue ) const;
1185  SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1186  void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1187  SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1188  SC_DLLPUBLIC void GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab,
1189  sal_uInt32& rFormat ) const;
1190  sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1191  SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1192  void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1194  void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1195  SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1197  SC_DLLPUBLIC void GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rFormula ) const;
1198  SC_DLLPUBLIC void GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab, CellType& rCellType ) const;
1199  SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1201  SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1202  SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1203  SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1204  SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1205  bool HasStringCells( const ScRange& rRange ) const;
1208  bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1209  bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1217  sc::MultiDataCellState HasMultipleDataCells( const ScRange& rRange ) const;
1220  SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1221  SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1222  void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1223  void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1224  SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1225  bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1226  SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1227  SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1228  bool HasNotes() const;
1229  SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1231  SC_DLLPUBLIC ScPostIt* CreateNote(const ScAddress& rPos);
1232  size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1238  void CreateAllNoteCaptions();
1239  void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1242  ScAddress GetNotePosition( size_t nIndex ) const;
1243  ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1244  SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1246  SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1247  SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1248  void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1249  bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1251  SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab);
1253  bool IsMerged( const ScAddress& rPos ) const;
1255  void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1256  SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1257  bool bRefresh = false );
1258  SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1259  SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1260  bool bRefresh = false );
1261  bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1262  SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1263  SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1264  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1265  SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1267  bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1268  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1270  SC_DLLPUBLIC void DoMergeContents( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1271  SCCOL nEndCol, SCROW nEndRow );
1272  SC_DLLPUBLIC void DoEmptyBlock( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1273  SCCOL nEndCol, SCROW nEndRow );
1274  // without checking:
1275  SC_DLLPUBLIC void DoMerge( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1276  SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions = true );
1277  void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1279  bool IsBlockEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1280  SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes = false ) const;
1281  bool IsPrintEmpty( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
1282  SCCOL nEndCol, SCROW nEndRow,
1283  bool bLeftIsEmpty = false,
1284  ScRange* pLastRange = nullptr,
1285  tools::Rectangle* pLastMM = nullptr ) const;
1287  void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1288  bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1289  bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1291  SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1292  SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1293  SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1295  SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1296  const ::editeng::SvxBorderLine** ppLeft,
1297  const ::editeng::SvxBorderLine** ppTop,
1298  const ::editeng::SvxBorderLine** ppRight,
1299  const ::editeng::SvxBorderLine** ppBottom ) const;
1301  void ResetChanged( const ScRange& rRange );
1303  void CheckVectorizationState();
1304  void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
1305  void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1306  void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1307  void InterpretDirtyCells( const ScRangeList& rRanges );
1308  SC_DLLPUBLIC void CalcAll();
1309  SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1310  void CompileAll();
1311  void CompileXML();
1323  bool CompileErrorCells(FormulaError nErrCode);
1325  ScAutoNameCache* GetAutoNameCache() { return pAutoNameCache.get(); }
1326  void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1327  SfxItemSet* GetPreviewFont() { return pPreviewFont.get(); }
1328  SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1330  void SetPreviewSelection( const ScMarkData& rSel );
1332  ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1333  void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; }
1334  SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1338  ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1341  void RemoveLookupCache( ScLookupCache & rCache );
1343  void ClearLookupCaches();
1345  // calculate automatically
1346  SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1347  SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1348  // calculate automatically in/from/for ScDocShell disabled
1349  void SetAutoCalcShellDisabled( bool bNew ) { bAutoCalcShellDisabled = bNew; }
1351  // ForcedFormulas are to be calculated
1352  void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
1354  // if CalcFormulaTree() is currently running
1358  void DelayFormulaGrouping( bool delay );
1359  bool IsDelayedFormulaGrouping() const { return pDelayedFormulaGrouping.get() != nullptr; }
1361  void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1363  FormulaError GetErrCode( const ScAddress& ) const;
1377  bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1394  bool ShrinkToUsedDataArea( bool& o_bShrunk,
1395  SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1396  SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1397  bool bStickyTopRow = false, bool bStickyLeftCol = false,
1398  bool bConsiderCellNotes = false,
1399  bool bConsiderCellDrawObjects = false ) const;
1411  SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1426  SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1427  SCCOL& rEndCol, SCROW& rEndRow,
1428  bool bIncludeOld, bool bOnlyDown ) const;
1437  bool GetDataAreaSubrange(ScRange& rRange) const;
1439  SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1440  SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1441  SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1442  bool bNotes = true ) const;
1443  SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1444  SCCOL& rEndCol ) const;
1445  SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1446  SCROW& rEndRow, bool bNotes ) const;
1447  void InvalidateTableArea();
1450  SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1452  SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1459  void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1460  SCCOL nStartCol, SCROW nStartRow,
1461  SCCOL& rEndCol, SCROW nEndRow ) const;
1462  SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1463  SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1464  ScDirection eDir );
1466  void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1467  SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1468  bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1469  SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1471  bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1472  const ScMarkData& rMark );
1474  void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1475  SCCOL& rEndCol, SCROW& rEndRow );
1476  void LimitChartIfAll( ScRangeListRef& rRangeList );
1478  bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1479  SCCOL nEndCol, SCTAB nEndTab,
1480  SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1481  const ScMarkData* pTabMark = nullptr );
1482  SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1483  void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1484  SCCOL nEndCol, SCTAB nEndTab,
1485  SCROW nStartRow, SCSIZE nSize,
1486  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1487  const ScMarkData* pTabMark = nullptr );
1488  SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1489  bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1490  SCROW nEndRow, SCTAB nEndTab,
1491  SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1492  const ScMarkData* pTabMark = nullptr );
1493  SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1494  void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1495  SCROW nEndRow, SCTAB nEndTab,
1496  SCCOL nStartCol, SCSIZE nSize,
1497  ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1498  const ScMarkData* pTabMark = nullptr );
1499  void DeleteCol( const ScRange& rRange );
1501  bool CanInsertRow( const ScRange& rRange ) const;
1502  bool CanInsertCol( const ScRange& rRange ) const;
1504  void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1505  bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1507  bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1508  bool IsUndo() const { return bIsUndo; }
1509  bool IsClipboard() const { return bIsClip; }
1510  bool IsUndoEnabled() const { return mbUndoEnabled; }
1511  SC_DLLPUBLIC void EnableUndo( bool bVal );
1512  bool IsFunctionAccess() const { return bIsFunctionAccess; }
1514  bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1518  void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1520  void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1522  SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1524  void SetNamedRangesLockCount( sal_Int16 nCount ) { mnNamedRangesLockCount = nCount; }
1525  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1526  SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1527  void SetCutMode( bool bCut );
1528  bool IsCutMode();
1529  void SetClipArea( const ScRange& rArea, bool bCut = false );
1531  SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1532  SC_DLLPUBLIC void SetDocVisible( bool bSet );
1534  bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1536  void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1537  const ScMarkData& rMark, bool bAnchored = false );
1538  void DeleteObjectsInSelection( const ScMarkData& rMark );
1540  void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1541  InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1542  sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1544  SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1545  SCTAB nTab, InsertDeleteFlags nDelFlag);
1546  void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1548  void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1549  const ScMarkData* pMarks, bool bKeepScenarioFlags,
1550  bool bIncludeObjects );
1561  SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument* pDestDoc);
1570  void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1572  void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1573  SCTAB nTab, ScDocument* pClipDoc);
1578  sc::ColumnSpanSet& rBroadcastSpans );
1580  bool CopyOneCellFromClip(sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1581  SCCOL nCol2, SCROW nRow2 );
1582  void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1583  SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1584  SCCOL nDx, SCROW nDy );
1586  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1587  const ScMarkData& rMark, SCCOL nDx, SCROW & rClipStartRow );
1589  void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1590  SCCOL nCol2, SCROW nRow2,
1591  const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1593  void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1594  const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1595  sc::ColumnSpanSet& rBroadcastSpans );
1599  void CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMark,
1600  InsertDeleteFlags nInsFlag,
1601  ScDocument* pRefUndoDoc,
1602  ScDocument* pClipDoc,
1603  bool bResetCut = true,
1604  bool bAsLink = false,
1605  bool bIncludeFiltered = true,
1606  bool bSkipAttrForEmpty = false,
1607  const ScRangeList * pDestRanges = nullptr );
1609  void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1610  InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1611  bool bResetCut = true, bool bAsLink = false,
1612  bool bIncludeFiltered = true,
1613  bool bSkipAttrForEmpty = false);
1615  void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1616  void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1618  bool HasClipFilteredRows();
1620  bool IsClipboardSource() const;
1622  SC_DLLPUBLIC void TransposeClip( ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink );
1625  void SetClipParam(const ScClipParam& rParam);
1632  void ClosingClipboardSource();
1634  void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1635  ScDocument* pSrcDoc );
1637  void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1638  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1639  bool bSkipEmpty, bool bAsLink );
1640  void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1641  InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1642  bool bSkipEmpty, bool bAsLink );
1644  void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1646  SC_DLLPUBLIC void InitUndo( const ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
1647  bool bColInfo = false, bool bRowInfo = false );
1648  void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1649  bool bColInfo = false, bool bRowInfo = false );
1650  SC_DLLPUBLIC void InitUndoSelected( const ScDocument* pSrcDoc, const ScMarkData& rTabSelection,
1651  bool bColInfo = false, bool bRowInfo = false );
1653  // don't use anymore:
1654  void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1655  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1656  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1657  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1658  void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1659  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1660  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1662  void CopyToDocument(const ScRange& rRange,
1663  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1664  const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1665  void UndoToDocument(const ScRange& rRange,
1666  InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1668  void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1669  bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1670  void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1671  ScMarkData& rDestMark, bool bResetMark = true,
1672  ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1673  bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1674  SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1676  SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1679  pUndoDoc = nullptr, bool bIncludeDraw = true,
1680  bool bUpdateNoteCaptionPos = true );
1682  SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1683  const ScMarkData& rMark, ScDocument* pUndoDoc );
1685  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1687  SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1688  ScProgress* pProgress, const ScMarkData& rMark,
1689  sal_uLong nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1690  FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1691  double nStepValue = 1.0, double nMaxValue = 1E307 );
1692  OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1695  const ScAddress& rCursor, const ScMarkData& rMark,
1696  double& rResult );
1698  SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1699  template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1700  {
1701  return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1702  }
1703  SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1704  template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1705  {
1706  return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1707  }
1708  SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1709  SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1710  SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1711  const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1712  std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1713  SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1714  void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1716  SC_DLLPUBLIC ScConditionalFormat* GetCondFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1717  // pCell is an optimization, must point to rPos
1718  SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1719  ScRefCellValue* pCell = nullptr ) const;
1720  const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1721  const ScConditionalFormatList& rList,
1722  const ScCondFormatIndexes& rIndex ) const;
1723  const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1724  template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1725  {
1726  return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1727  }
1729  SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1730  bool HasStringWeakCharacters( const OUString& rString );
1731  SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1732  // pCell is an optimization, must point to rPos
1733  SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1734  const ScRefCellValue* pCell = nullptr );
1735  // pCell is an optimization, must point to nCol,nRow,nTab
1737  const ScRefCellValue* pCell = nullptr );
1738  SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1739  SvtScriptType GetRangeScriptType( const ScRangeList& rRanges );
1741  bool HasDetectiveOperations() const;
1742  void AddDetectiveOperation( const ScDetOpData& rData );
1743  void ClearDetectiveOperations();
1744  ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1745  void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1747  bool HasDetectiveObjects(SCTAB nTab) const;
1749  void GetSelectionFrame( const ScMarkData& rMark,
1750  SvxBoxItem& rLineOuter,
1751  SvxBoxInfoItem& rLineInner );
1752  void ApplySelectionFrame(const ScMarkData& rMark,
1753  const SvxBoxItem& rLineOuter,
1754  const SvxBoxInfoItem* pLineInner);
1755  void ApplyFrameAreaTab(const ScRange& rRange,
1756  const SvxBoxItem& rLineOuter,
1757  const SvxBoxInfoItem& rLineInner);
1759  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1760  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1762  SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1763  void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1765  void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1771  const ScValidationDataList* GetValidationList() const { return pValidationList.get();}
1772  ScValidationDataList* GetValidationList() { return pValidationList.get();}
1774  SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1775  const SfxPoolItem& rAttr );
1776  SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1777  const ScPatternAttr& rAttr );
1778  SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1779  SCCOL nEndCol, SCROW nEndRow,
1780  const ScMarkData& rMark, const ScPatternAttr& rAttr,
1781  ScEditDataArray* pDataArray = nullptr,
1782  bool* const pIsChanged = nullptr );
1783  SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1784  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1785  const ScPatternAttr& rAttr );
1788  const ScMarkData& rMark,
1789  const ScPatternAttr& rPattern,
1790  SvNumFormatType nNewType );
1792  void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1793  const ScStyleSheet& rStyle);
1794  void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1795  SCCOL nEndCol, SCROW nEndRow,
1796  const ScMarkData& rMark, const ScStyleSheet& rStyle);
1797  SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1798  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1799  const ScStyleSheet& rStyle);
1801  SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1802  void ApplySelectionLineStyle( const ScMarkData& rMark,
1803  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1805  const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1806  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1808  void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1809  OutputDevice* pDev,
1810  double nPPTX, double nPPTY,
1811  const Fraction& rZoomX, const Fraction& rZoomY );
1813  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1815  SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1816  SCCOL nEndCol, SCROW nEndRow,
1817  SCTAB nTab, ScMF nFlags );
1818  SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1819  SCCOL nEndCol, SCROW nEndRow,
1820  SCTAB nTab, ScMF nFlags );
1822  SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1823  SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> );
1824  SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1826  void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1827  sal_uInt16 nFormatNo, const ScMarkData& rMark );
1828  void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1829  ScAutoFormatData& rData );
1830  bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1831  SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1832  const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1833  OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
1835  // determine Col/Row of subsequent calls
1836  // (e.g. not found from the beginning, or subsequent tables)
1837  // meaning of explanation in "()" was already unclear in German
1838  void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1839  SCCOL& rCol, SCROW& rRow );
1841  bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1842  SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1843  const OUString& sValStr, double& nX);
1845  SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1846  ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1847  void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1848  void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1850  SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1851  SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1852  SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1853  SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1854  sal_uInt16 nNewHeight );
1856  SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1857  sal_uInt16 nNewHeight );
1858  SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1860  SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1861  SC_DLLPUBLIC sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1862  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1863  SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow ) const;
1864  SC_DLLPUBLIC sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1871  SCROW GetRowForHeight( SCTAB nTab, sal_uLong nHeight ) const;
1872  sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
1873  SC_DLLPUBLIC sal_uLong GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1874  SC_DLLPUBLIC sal_uLong GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1876  SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1877  SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1879  sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1881  SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1883  sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1884  double nPPTX, double nPPTY,
1885  const Fraction& rZoomX, const Fraction& rZoomY,
1886  bool bFormula,
1887  const ScMarkData* pMarkData = nullptr,
1888  const ScColWidthParam* pParam = nullptr );
1891  SCROW nEndRow, SCTAB nTab );
1893  void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
1895  long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
1896  OutputDevice* pDev,
1897  double nPPTX, double nPPTY,
1898  const Fraction& rZoomX, const Fraction& rZoomY,
1899  bool bWidth, bool bTotalSize = false );
1901  SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
1902  SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
1903  SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
1904  SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
1905  SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
1907  SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
1908  SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
1910  SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1911  SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
1912  SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const;
1913  SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const;
1914  SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1915  SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1916  void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
1917  void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
1918  css::uno::Sequence<
1919  css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
1921  SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1922  SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1923  SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
1924  SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
1925  SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
1926  SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1927  SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1928  SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1930  bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
1931  bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1932  bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
1933  SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
1934  SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1935  SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1936  SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
1938  SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
1940  bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
1947  void SyncColRowFlags();
1950  SC_DLLPUBLIC SCROW GetLastFlaggedRow( SCTAB nTab ) const;
1953  SCCOL GetLastChangedCol( SCTAB nTab ) const;
1955  SCROW GetLastChangedRow( SCTAB nTab ) const;
1957  SCCOL GetNextDifferentChangedCol( SCTAB nTab, SCCOL nStart) const;
1959  SCROW GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart) const;
1961  // returns whether to export a Default style for this col or not
1962  // nDefault is set to one position in the current row where the Default style is
1963  void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
1965  bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
1966  bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
1968  void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
1969  void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
1974  void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
1976  // PageStyle:
1977  SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
1978  SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
1979  Size GetPageSize( SCTAB nTab ) const;
1980  void SetPageSize( SCTAB nTab, const Size& rSize );
1981  void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
1982  void InvalidatePageBreaks(SCTAB nTab);
1983  void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
1984  void RemoveManualBreaks( SCTAB nTab );
1985  bool HasManualBreaks( SCTAB nTab ) const;
1987  bool IsPageStyleInUse( const OUString& rStrPageStyle, SCTAB* pInTab );
1988  bool RemovePageStyleInUse( const OUString& rStrPageStyle );
1989  bool RenamePageStyleInUse( const OUString& rOld, const OUString& rNew );
1990  void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
1991  const SfxItemSet& rChanges );
1993  void PageStyleModified( SCTAB nTab, const OUString& rNewName );
1995  SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
1997  // Was stored in PageStyle previously. Now it exists for every table:
1998  SC_DLLPUBLIC bool HasPrintRange();
1999  SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2000  SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2004  bool IsPrintEntireSheet( SCTAB nTab ) const;
2007  SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2009  SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2011  SC_DLLPUBLIC void SetPrintEntireSheet( SCTAB nTab );
2012  SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2013  SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::unique_ptr<ScRange> pNew );
2014  std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2015  void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2017  SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2018  SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2019  SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2021  void UpdStlShtPtrsFrmNms();
2022  void StylesToNames();
2024  SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument* pSrcDoc );
2026  static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2028  void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2029  void UpdateFontCharSet();
2031  void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2032  SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2033  double fRowScale, bool bPageMode, bool bFormulaMode,
2034  const ScMarkData* pMarkData = nullptr );
2039  void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2040  bool bKeepQuery, bool bUpdateRefs,
2041  ScProgress* pProgress, sc::ReorderParam* pUndo );
2043  void Reorder( const sc::ReorderParam& rParam );
2045  SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2046  SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2047  void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString& rStr);
2055  void GetFilterEntries( SCCOL nCol, SCROW nRow,
2056  SCTAB nTab, ScFilterEntries& rFilterEntries );
2058  SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2059  SCTAB nTab, bool bCaseSens,
2060  ScFilterEntries& rFilterEntries );
2062  void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2063  std::vector<ScTypedStrData>& rStrings, bool bLimit = false );
2064  void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2066  bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2067  void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2069  SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2070  SCTAB nTab );
2071  SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2072  SCTAB nTab );
2074  SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2075  void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2077  SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2079  bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2080  bool bInSel, const ScMarkData& rMark) const;
2082  void ReplaceStyle( const SvxSearchItem& rSearchItem,
2083  SCCOL nCol, SCROW nRow, SCTAB nTab,
2084  const ScMarkData& rMark);
2086  void InvalidateTextWidth( const OUString& rStyleName );
2087  void InvalidateTextWidth( SCTAB nTab );
2088  void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2090  bool IdleCalcTextWidth();
2092  void RepaintRange( const ScRange& rRange );
2093  void RepaintRange( const ScRangeList& rRange );
2095  bool IsIdleEnabled() const { return mbIdleEnabled; }
2096  void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2098  bool IsDetectiveDirty() const { return bDetectiveDirty; }
2099  void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2102  void SetLinkFormulaNeedingCheck(bool bSet) { bLinkFormulaNeedingCheck = bSet; }
2106  void SetRangeOverflowType(ErrCode nType) { nRangeOverflowType = nType; }
2107  bool HasRangeOverflow() const { return nRangeOverflowType != ERRCODE_NONE; }
2110  // for broadcasting/listening
2111  void SetInsertingFromOtherDoc( bool bVal ) { bInsertingFromOtherDoc = bVal; }
2113  void SetLoadingMedium( bool bVal );
2114  SC_DLLPUBLIC void SetImportingXML( bool bVal );
2115  bool IsImportingXML() const { return bImportingXML; }
2116  bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2117  void SetNoListening( bool bVal ) { bNoListening = bVal; }
2118  bool GetNoListening() const { return bNoListening; }
2119  ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2121  SC_DLLPUBLIC ScChartListenerCollection* GetChartListenerCollection() const { return pChartListenerCollection.get(); }
2122  void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2123  bool bSetChartRangeLists );
2124  void UpdateChart( const OUString& rName );
2125  void RestoreChartListener( const OUString& rName );
2128  void SetChartListenerCollectionNeedsUpdate( bool bFlg ) { bChartListenerCollectionNeedsUpdate = bFlg; }
2129  void AddOLEObjectToCollection(const OUString& rName);
2131  ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings.get(); }
2134  const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2135  void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2138  bool IsValidAsianCompression() const;
2141  bool GetAsianKerning() const;
2142  bool IsValidAsianKerning() const;
2143  void SetAsianKerning(bool bNew);
2146  EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2149  void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2153  void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2154  SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2155  svl::SharedStringPool* pPool = nullptr) const;
2165  void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2167  const ScDocumentThreadSpecific& CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2168  void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2175  void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2176  void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2178  std::set<Color> GetDocColors();
2181 private:
2182  ScDocument(const ScDocument& r) = delete;
2184  void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2185  SCCOL nX1, SCCOL nX2 ) const;
2187  sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2188  ScDocument& rOtherDoc,
2189  SCROW nOtherRow, SCTAB nOtherTab,
2190  SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2191  sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2192  ScDocument& rOtherDoc,
2193  SCCOL nOtherCol, SCTAB nOtherTab,
2194  SCROW nMaxRow, const SCCOLROW* pOtherRows );
2195  void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2196  bool bColumns,
2197  ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2198  SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2199  ScProgress* pProgress, sal_uLong nProAdd );
2201  DECL_LINK(TrackTimeHdl, Timer *, void);
2220  bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2221  bool& o_bEntirelyOutOfBounds ) const;
2223 public:
2224  void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2226  void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2232  void Broadcast( const ScHint& rHint );
2234  void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2237  void AreaBroadcast( const ScHint& rHint );
2238  void DelBroadcastAreasInRange( const ScRange& rRange );
2239  void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2240  const ScRange& rRange,
2241  SCCOL nDx, SCROW nDy, SCTAB nDz );
2243  void StartListeningCell( const ScAddress& rAddress,
2244  SvtListener* pListener );
2245  void EndListeningCell( const ScAddress& rAddress,
2246  SvtListener* pListener );
2248  void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2249  void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2251  void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2253  void PutInFormulaTree( ScFormulaCell* pCell );
2254  void RemoveFromFormulaTree( ScFormulaCell* pCell );
2269  SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2270  void ClearFormulaTree();
2271  void AppendToFormulaTrack( ScFormulaCell* pCell );
2272  void RemoveFromFormulaTrack( ScFormulaCell* pCell );
2273  void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2276  void FinalTrackFormulas( SfxHintId nHintId );
2278  bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2279  bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2281  void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; }
2282  void StartAllListeners();
2283  void StartNeededListeners();
2284  void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2285  void StartAllListeners( const ScRange& rRange );
2287  void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2290  bool IsInInterpreter() const { return nInterpretLevel != 0; }
2293  {
2294  assert(!IsThreadedGroupCalcInProgress());
2295  if ( nInterpretLevel < USHRT_MAX )
2296  nInterpretLevel++;
2297  }
2299  {
2300  assert(!IsThreadedGroupCalcInProgress());
2301  if ( nInterpretLevel )
2302  nInterpretLevel--;
2303  }
2304  sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2306  {
2307  assert(!IsThreadedGroupCalcInProgress());
2308  if ( nMacroInterpretLevel < USHRT_MAX )
2309  nMacroInterpretLevel++;
2310  }
2312  {
2313  assert(!IsThreadedGroupCalcInProgress());
2314  if ( nMacroInterpretLevel )
2315  nMacroInterpretLevel--;
2316  }
2317  bool IsInInterpreterTableOp() const { return nInterpreterTableOpLevel != 0; }
2319  {
2320  if ( nInterpreterTableOpLevel < USHRT_MAX )
2321  nInterpreterTableOpLevel++;
2322  }
2324  {
2325  if ( nInterpreterTableOpLevel )
2326  nInterpreterTableOpLevel--;
2327  }
2329  // add a formula to be remembered for TableOp broadcasts
2331  void InvalidateLastTableOpParams() { aLastTableOpParams.bValid = false; }
2333  bool IsInDtorClear() const { return bInDtorClear; }
2334  void SetExpandRefs( bool bVal );
2335  bool IsExpandRefs() const { return bExpandRefs; }
2339  {
2340  if ( nXMLImportedFormulaCount + nVal > nXMLImportedFormulaCount )
2341  nXMLImportedFormulaCount += nVal;
2342  }
2344  {
2345  if ( nVal <= nXMLImportedFormulaCount )
2346  nXMLImportedFormulaCount -= nVal;
2347  else
2348  nXMLImportedFormulaCount = 0;
2349  }
2351  void StartTrackTimer();
2353  void CompileDBFormula();
2354  void CompileColRowNameFormula();
2360  sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2361  SCROW nRowStart, SCROW nRowEnd,
2362  rtl_TextEncoding eCharSet ) const;
2366  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2367  SCTAB nTab, SCCOL nCol,
2368  SCROW nRowStart, SCROW nRowEnd ) const;
2370  void KeyInput(); // TimerDelays etc.
2372  ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2376  SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2378  void StartChangeTracking();
2379  void EndChangeTracking();
2381  SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2383  void AddUnoObject( SfxListener& rObject );
2384  void RemoveUnoObject( SfxListener& rObject );
2385  void BroadcastUno( const SfxHint &rHint );
2386  void AddUnoListenerCall( const css::uno::Reference<
2387  css::util::XModifyListener >& rListener,
2388  const css::lang::EventObject& rEvent );
2390  void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2391  bool IsInLinkUpdate() const; // including DdeLink
2398  std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2399  { return pRefreshTimerControl; }
2401  void SetPastingDrawFromOtherDoc( bool bVal )
2402  { bPastingDrawFromOtherDoc = bVal; }
2404  { return bPastingDrawFromOtherDoc; }
2407  sal_uInt32 GetDocumentID() const;
2409  void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; }
2410  void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2411  void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2413  void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2414  { mxVbaEvents = rxVbaEvents; }
2415  const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2422  bool IsInVBAMode() const;
2425  void AddSubTotalCell(ScFormulaCell* pCell);
2426  void RemoveSubTotalCell(ScFormulaCell* pCell);
2427  void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2429  sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2431  SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2432  void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2433  void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2435  size_t GetFormulaHash( const ScAddress& rPos ) const;
2447  void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2448  void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2449  void RegroupFormulaCells( const ScRange& range );
2457  bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2458 #ifdef DBG_UTIL
2459  void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2460 #endif
2466  void PrepareFormulaCalc();
2482  SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2484  SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2485  const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2486  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2488  std::unique_ptr<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2489  void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2491  SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2492  SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2495  SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2496 #endif
2499  SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2500 #endif
2502  SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2503  const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2504  void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2505  void SwapNonEmpty( sc::TableValues& rValues );
2506  void finalizeOutlineImport();
2507  bool TableExists( SCTAB nTab ) const;
2509  SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2511  bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2512  void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2514 private:
2522  {
2523  public:
2524  explicit NumFmtMergeHandler(ScDocument* pDoc, const ScDocument* pSrcDoc);
2527  private:
2529  };
2531  ScTable* FetchTable( SCTAB nTab );
2532  const ScTable* FetchTable( SCTAB nTab ) const;
2534  void MergeNumberFormatter(const ScDocument* pSrcDoc);
2536  void ImplCreateOptions(); // Suggestion: switch to on-demand?
2537  void ImplDeleteOptions();
2539  void DeleteDrawLayer();
2540  SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2542  void UpdateDrawPrinter();
2543  void UpdateDrawLanguages();
2544  SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2546  void LoadDdeLinks(SvStream& rStream);
2547  void SaveDdeLinks(SvStream& rStream) const;
2549  void DeleteAreaLinksOnTab( SCTAB nTab );
2550  void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2551  const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2553  void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2555  bool HasPartOfMerged( const ScRange& rRange );
2557  ScRefCellValue GetRefCellValue( const ScAddress& rPos );
2560  std::map< SCTAB, ScSortParam > mSheetSortParams;
2562  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2563  SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2564  void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2566  void SharePooledResources( const ScDocument* pSrcDoc );
2569  sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2572  sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2574  void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2575  void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2576 };
2578 typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2586 {
2588  {
2589 #ifndef NDEBUG
2590  mpDocument = pDocument;
2591  mnFlagRestore = pDocument->mnMutationGuardFlags;
2592  assert((mnFlagRestore & nFlags) == 0);
2593  mpDocument->mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2594 #else
2595  (void)pDocument; (void)nFlags;
2596 #endif
2597  }
2598 #ifndef NDEBUG
2600  {
2602  }
2605 #endif
2606 };
2618 {
2620  {
2621 #ifndef NDEBUG
2622  mpDocument = pDocument;
2623  mnFlags = static_cast<size_t>(nFlags);
2624  assert((mpDocument->mnMutationGuardFlags & mnFlags) == 0);
2625 #else
2626  (void)pDocument; (void)nFlags;
2627 #endif
2628  }
2629 #ifndef NDEBUG
2631  {
2632  assert((mpDocument->mnMutationGuardFlags & mnFlags) == 0);
2633  }
2634  size_t mnFlags;
2636 #endif
2638 };
2641 {
2644 public:
2646  : mrDoc(rDoc)
2647  {
2648  assert(!mrDoc.IsInDocShellRecalc());
2649  mrDoc.SetDocShellRecalc(true);
2650  }
2653  {
2654  mrDoc.SetDocShellRecalc(false);
2655  }
2656 };
2658 #endif
2660 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SC_DLLPUBLIC void UpdateTranspose(const ScAddress &rDestPos, ScDocument *pClipDoc, const ScMarkData &rMark, ScDocument *pUndoDoc)
Definition: documen3.cxx:1091
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3298
SC_DLLPUBLIC OUString GetLinkDoc(SCTAB nTab) const
Definition: documen3.cxx:493
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1861
void AddDelayedFormulaGroupingCell(const ScFormulaCell *cell)
To be used only by SharedFormulaUtil::joinFormulaCells().
Definition: document10.cxx:392
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
Definition: documen2.cxx:563
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:612
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:113
bool IsInFormulaTree(const ScFormulaCell *pCell) const
Definition: documen7.cxx:321
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:537
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:507
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4752
bool mbEmbedFontScriptComplex
Definition: document.hxx:554
SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator > & GetBreakIterator()
Definition: documen6.cxx:40
void BeginDrawUndo()
Definition: documen9.cxx:58
bool IsInDocShellRecalc() const
Definition: document.hxx:2511
void ClearDetectiveOperations()
Definition: documen4.cxx:895
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2051
ScCalcConfig maCalcConfig
Definition: document.hxx:363
void AssertNoInterpretNeeded(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1806
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:359
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4300
void FillInfo(ScTableInfo &rTabInfo, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale, double fRowScale, bool bPageMode, bool bFormulaMode, const ScMarkData *pMarkData=nullptr)
Definition: fillinfo.cxx:346
bool IsValidAsianKerning() const
Definition: documen9.cxx:647
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
Definition: document.cxx:1830
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:1585
void IncInDdeLinkUpdate()
Definition: document.hxx:1005
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:366
void EnableIdle(bool bDo)
Definition: document.hxx:2096
void ClearLookupCaches()
Zap all caches.
Definition: documen2.cxx:1188
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6217
static SC_DLLPUBLIC bool bThreadedGroupCalcInProgress
Calc's threaded group calculation is in progress.
Definition: global.hxx:817
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4861
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:369
bool HasExternalRefManager() const
Definition: document.hxx:990
bool bIsUndo
Definition: document.hxx:491
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4831
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:1366
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5668
bool bStyleSheetUsageInvalid
Definition: document.hxx:537
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4708
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4702
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:5916
sal_uLong GetXMLImportedFormulaCount() const
Definition: document.hxx:2337
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:44
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:869
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4853
ScFormulaCell * pFormulaTree
Definition: document.hxx:383
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1490
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1861
SC_DLLPUBLIC const ScRange * GetRepeatColRange(SCTAB nTab)
Definition: document.cxx:6283
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:804
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:876
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4312
SfxItemSet * GetPreviewFont()
Definition: document.hxx:1327
void GetClipStart(SCCOL &nClipX, SCROW &nClipY)
Definition: document.cxx:3172
void IncXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2338
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:846
bool HasUnoRefUndo() const
Definition: document.hxx:1052
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr) const
Definition: document.cxx:5324
void EndChangeTracking()
Definition: documen2.cxx:263
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4796
SC_DLLPUBLIC void SetScenario(SCTAB nTab, bool bFlag)
Definition: documen3.cxx:408
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
Definition: documen2.cxx:631
std::unique_ptr< ScChangeTrack > pChangeTrack
Definition: document.hxx:391
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:553
void SetForcedFormulas(bool bVal)
Definition: document.hxx:2287
sal_uLong nFormulaCount
Definition: document.hxx:268
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1094
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1872
SC_DLLPUBLIC void GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rString)
Definition: document.cxx:3542
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
void InvalidateTextWidth(const OUString &rStyleName)
Definition: documen8.cxx:297
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5053
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:35
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6246
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:4330
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
Definition: document.hxx:370
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument *pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:896
void SetEmbedUsedFontsOnly(bool bUse)
Definition: document.hxx:576
bool IsInInterpreter() const
Definition: document.hxx:2290
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:507
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:757
void SetCutMode(bool bCut)
Definition: document.cxx:2054
Definition: global.hxx:193
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1001
NumFmtMergeHandler(ScDocument *pDoc, const ScDocument *pSrcDoc)
Definition: document.cxx:2438
Use this to lock all charts in the calc for a little time.
Definition: chartlock.hxx:53
ScUnoListenerCalls stores notifications to XModifyListener that can't be processed during BroadcastUn...
bool mbUndoEnabled
Definition: document.hxx:539
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:404
ScValidationDataList * GetValidationList()
Definition: document.hxx:1772
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:177
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:606
SCTAB nVisibleTab
Definition: document.hxx:477
OUString maFileURL
Definition: document.hxx:416
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:579
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2398
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1385
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1099
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1353
SCSIZE Query(SCTAB nTab, const ScQueryParam &rQueryParam, bool bKeepSub)
Definition: documen3.cxx:1428
SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection *pProtect)
Definition: documen3.cxx:1889
const OUString & GetFileURL() const
Definition: document.hxx:594
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
Definition: document.cxx:2265
SC_DLLPUBLIC void DoMergeContents(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:1997
Definition: global.hxx:318
void SetSheetEvents(SCTAB nTab, std::unique_ptr< ScSheetEvents > pNew)
Definition: documen3.cxx:648
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2415
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:2800
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4533
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2507
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:660
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:361
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
Definition: document.cxx:6205
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:2090
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1122
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
Definition: documen3.cxx:859
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:786
sheet protection state container
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:402
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
Definition: documen3.cxx:437
SfxObjectShell * mpShell
Definition: document.hxx:368
ScRangePairList * GetColNameRanges()
Definition: document.hxx:796
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:193
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:591
ScInterpreterContext maInterpreterContext
Definition: document.hxx:470
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
Definition: document.cxx:3725
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:42
Definition: global.hxx:236
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:197
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:790
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const
Definition: document.cxx:6144
bool IsExpandRefs() const
Definition: document.hxx:2335
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:571
void FillMatrix(ScMatrix &rMat, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool=nullptr) const
Definition: documen8.cxx:386
void CompileColRowNameFormula()
Definition: documen4.cxx:564
SC_DLLPUBLIC void TransposeClip(ScDocument *pTransClip, InsertDeleteFlags nFlags, bool bAsLink)
Definition: document.cxx:2330
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1744
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1521
sc::IconSetBitmapMap & GetIconSetBitmapMap()
Definition: documen2.cxx:1379
SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const
Definition: document.cxx:6562
sal_uIntPtr sal_uLong
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
Definition: document10.cxx:316
bool ValidRange(const ScRange &rRange) const
Definition: document.hxx:867
bool mbUserInteractionEnabled
Definition: document.hxx:543
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:280
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6299
void SetName(const OUString &r)
Definition: document.hxx:591
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5009
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:2613
bool mbStreamValidLocked
Definition: document.hxx:542
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3526
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
Definition: documen3.cxx:347
bool IsUndo() const
Definition: document.hxx:1508
List of RefUpdate changes made to UNO objects during ScUpdateRefHint broadcast.
Definition: unoreflist.hxx:42
sal_Int16 mnNamedRangesLockCount
Definition: document.hxx:545
ScInterpreterContext * pContext
Definition: document.hxx:289
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:1003
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4884
static const sal_uInt16 nSrcVer
Definition: document.hxx:474
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1007
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4469
rtl::Reference< XColorList > pColorList
Definition: document.hxx:372
void BlockFormulaGroupContextDiscard(bool block)
Definition: document.hxx:1177
sal_Int16 script
normal calculation of dependencies
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
Definition: documen8.cxx:211
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2596
const ScMarkData & GetPreviewSelection() const
Definition: document.hxx:1329
void SetPendingRowHeights(SCTAB nTab, bool bSet)
Definition: document.cxx:943
rtl_TextEncoding eSrcSet
Definition: document.hxx:452
bool IsTrackFormulasPending() const
Definition: document.hxx:2275
sal_uLong GetCodeCount() const
Definition: document.cxx:6157
sal_uInt16 nFormulaTrackCount
Definition: document.hxx:475
Store position data for column array storage.
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:464
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1737
void DecInterpreterTableOpLevel()
Definition: document.hxx:2323
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:3017
const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:320
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
bool IsClipOrUndo() const
Definition: document.hxx:1507
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, const ScAddress &rPos, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:416
void SC_DLLPUBLIC SetSortParam(const ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2101
Stores cell values for multiple tables.
Definition: cellvalues.hxx:87
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6317
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4477
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
Definition: document.cxx:3643
static ScRecursionHelper * CreateRecursionHelperInstance()
Definition: documen2.cxx:1141
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2456
SC_DLLPUBLIC sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew, SCTAB nTab)
Definition: documen4.cxx:702
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:77
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4485
bool bLoadingMedium
Definition: document.hxx:500
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL)
Definition: document.cxx:949
SC_DLLPUBLIC void CopyDdeLinks(ScDocument *pDestDoc) const
Definition: documen8.cxx:876
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1498
bool bCalcingAfterLoad
Definition: document.hxx:502
HardRecalcState eHardRecalcState
Definition: document.hxx:476
VirtualDevice * GetVirtualDevice_100th_mm()
Definition: documen8.cxx:183
double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3510
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:19
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2645
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3460
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam &rParam, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark)
Definition: documen4.cxx:355
sal_Int64 GetNewUnoId()
Definition: document.hxx:1055
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:104
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:972
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:462
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5725
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1667
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:219
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1445
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:1764
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:282
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Definition: document.cxx:4759
Accessor class to ScDocument.
bool bImportingXML
Definition: document.hxx:501
ScFormulaVectorState GetFormulaVectorState(const ScAddress &rPos) const
Definition: document.cxx:1768
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
Definition: documen2.cxx:1348
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
Definition: lookupcache.hxx:40
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
Definition: documen9.cxx:669
sc::DocumentLinkManager & GetDocLinkManager()
Definition: documen2.cxx:221
void SetClipOptions(std::unique_ptr< ScClipOptions > pClipOptions)
Definition: documen3.cxx:1992
bool IsLinked(SCTAB nTab) const
Definition: documen3.cxx:467
SC_DLLPUBLIC SfxUndoManager * GetUndoManager()
Definition: document.cxx:6372
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4391
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
Definition: documen8.cxx:142
bool HasStringWeakCharacters(const OUString &rString)
Definition: documen6.cxx:51
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
Definition: document.cxx:4423
ScFormulaCell * pEOFormulaTrack
Definition: document.hxx:386
void SetHardRecalcState(HardRecalcState eVal)
Definition: document.hxx:2281
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2074
void GetClipArea(SCCOL &nClipX, SCROW &nClipY, bool bIncludeFiltered)
Definition: document.cxx:3120
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:759
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:1135
std::map< SCTAB, ScSortParam > mSheetSortParams
Definition: document.hxx:2560
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
Definition: document.cxx:900
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:476
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:866
bool Solver(SCCOL nFCol, SCROW nFRow, SCTAB nFTab, SCCOL nVCol, SCROW nVRow, SCTAB nVTab, const OUString &sValStr, double &nX)
(Goal Seek) Find a value of x that is a root of f(x)
Definition: documen4.cxx:69
sal_uLong nXMLImportedFormulaCount
Definition: document.hxx:459
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5176
bool HasAutoFilter(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1458
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
Definition: document.cxx:6329
void UpdateChartArea(const OUString &rChartName, const ScRange &rNewArea, bool bColHeaders, bool bRowHeaders, bool bAdd)
Definition: documen5.cxx:129
::std::map< SCTAB, const ScRangeName * > TabNameCopyMap
Map that stores non-managed pointers to ScRangeName instances.
Definition: rangenam.hxx:194
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6762
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:441
bool TableExists(SCTAB nTab) const
Definition: document.cxx:2502
void UpdateChart(const OUString &rName)
Definition: documen5.cxx:334
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:3717
bool IsAdjustHeightLocked() const
Definition: document.hxx:1514
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4361
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4163
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:317
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
Definition: documen2.cxx:457
void SetClipParam(const ScClipParam &rParam)
Definition: document.cxx:2559
bool mbChangeReadOnlyEnabled
Definition: document.hxx:541
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:436
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:981
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:3433
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:5244
bool GetNextSpellingCell(SCCOL &nCol, SCROW &nRow, SCTAB nTab, bool bInSel, const ScMarkData &rMark) const
Definition: documen4.cxx:528
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:392
Row-wise value iterator.
Definition: dociter.hxx:479
std::map< sal_uInt16, sal_uInt32 > SvNumberFormatterIndexTable
void UnlockTable(SCTAB nTab)
Definition: document.cxx:5314
bool HasAnySheetEventScript(ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:678
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1517
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6057
void Sort(SCTAB nTab, const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
Definition: documen3.cxx:1403
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1220
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:868
LanguageType eCjkLanguage
Definition: document.hxx:450
void InvalidateTableArea()
Definition: documen4.cxx:574
ScLkUpdMode eLinkMode
Definition: document.hxx:481
long GetNeededSize(SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bWidth, bool bTotalSize=false)
Definition: document.cxx:4255
SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4557
void CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow)
Definition: document.cxx:2724
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
Definition: documen8.cxx:113
void DeleteDrawLayer()
Definition: documen9.cxx:227
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:590
size_t GetFormulaHash(const ScAddress &rPos) const
Definition: document.cxx:1759
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3837
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:481
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4900
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: documen2.cxx:609
void RepaintRange(const ScRange &rRange)
Definition: documen8.cxx:699
static void SetupFromNonThreadedData(const ScDocumentThreadSpecific &rNonThreadedData)
Definition: document.cxx:6818
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:935
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6504
void SetEmbedFontScriptLatin(bool bUse)
Definition: document.hxx:577
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:550
SC_DLLPUBLIC ScConditionalFormatList * GetCondFormList(SCTAB nTab) const
Definition: documen4.cxx:854
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6645
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1164
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:121
bool HandleRefArrayForParallelism(const ScAddress &rPos, SCROW nLength, const ScFormulaCellGroupRef &mxGroup)
Definition: document.cxx:1821
bool bForcedFormulaPending
Definition: document.hxx:488
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:611
void SetChartListenerCollectionNeedsUpdate(bool bFlg)
Definition: document.hxx:2128
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:741
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:852
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:535
ScClipParam & GetClipParam()
Definition: document.cxx:2551
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4139
void InvalidateStyleSheetUsage()
Definition: document.hxx:2409
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:987
Definition: document.hxx:861
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:45
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
void SetNamedRangesLockCount(sal_Int16 nCount)
Definition: document.hxx:1524
void SetCodeName(const OUString &r)
Definition: document.hxx:593
SC_DLLPUBLIC SCTAB GetTableCount() const
Definition: document.cxx:313
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4574
SvtScriptType GetRangeScriptType(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rPos, SCROW nLength)
Definition: documen6.cxx:183
Additional class containing cell annotation data.
Definition: postit.hxx:160
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:246
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:782
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4085
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:301
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
Definition: document.cxx:5097
bool HasChartAtPoint(SCTAB nTab, const Point &rPos, OUString &rName)
Definition: documen5.cxx:99
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:366
sal_uLong GetFormulaCodeInTree() const
Definition: document.hxx:2288
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:1034
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:578
Definition: global.hxx:418
const ScValidationDataList * GetValidationList() const
Definition: document.hxx:1771
Definition: global.hxx:343
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
Definition: document.hxx:397
void DecInDdeLinkUpdate()
Definition: document.hxx:1006
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
Definition: document10.cxx:954
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
Definition: document.cxx:3488
void DecInterpretLevel()
Definition: document.hxx:2298
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:387
bool IsFinalTrackFormulas() const
Definition: document.hxx:2277
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:2075
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:424
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:394
void SetNoListening(bool bVal)
Definition: document.hxx:2117
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:4242
bool bInsertingFromOtherDoc
Definition: document.hxx:499
bool ValidRange(const ScRange &rRange, SCCOL nMaxCol=MAXCOL, SCROW nMaxRow=MAXROW)
Definition: address.hxx:793
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:259
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:605
SC_DLLPUBLIC bool IsDocVisible() const
Definition: document.hxx:1531
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:334
const ScDocumentThreadSpecific & CalculateInColumnInThread(ScInterpreterContext &rContext, const ScRange &rCalcRange, unsigned nThisThread, unsigned nThreadsTotal)
Definition: documen8.cxx:413
bool IsAutoCalcShellDisabled() const
Definition: document.hxx:1350
std::unique_ptr< ScDocProtection > pDocProtection
Definition: document.hxx:404
::boost::intrusive_ptr< ScMatrix > ScMatrixRef
Definition: types.hxx:26
std::map< OUString, BitmapEx > IconSetBitmapMap
Definition: document.hxx:205
OUString aDocCodeName
Definition: document.hxx:415
Walk through all cells in an area.
Definition: dociter.hxx:208
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1672
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
Definition: document.cxx:190
Definition: global.hxx:225
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:426
bool mbIdleEnabled
Definition: document.hxx:505
void DiscardFormulaGroupContext()
Definition: document.cxx:3535
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:6090
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1796
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6275
std::set< ScFormulaCell * > maSubTotalCells
Definition: document.hxx:547
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1046
bool RenamePageStyleInUse(const OUString &rOld, const OUString &rNew)
Definition: documen8.cxx:342
bool HasSheetEventScript(SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents=false) const
Definition: documen3.cxx:654
const sal_uInt8 SC_DDE_IGNOREMODE
Definition: document.hxx:283
void RestoreChartListener(const OUString &rName)
Definition: documen5.cxx:362
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1897
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:498
SCTAB GetMaxTableNumber() const
Definition: document.hxx:794
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:320
Optimized ColumnSpanSet version that operates on a single ScRange.
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:570
std::unique_ptr< ScDBData > mpAnonymousDBData
Definition: document.hxx:399
ScRecursionHelper * pRecursionHelper
Definition: document.hxx:288
sal_uInt16 ColDifferences(SCCOL nThisCol, SCTAB nThisTab, ScDocument &rOtherDoc, SCCOL nOtherCol, SCTAB nOtherTab, SCROW nMaxRow, const SCCOLROW *pOtherRows)
Definition: documen4.cxx:951
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:736
SCROW SanitizeRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:133
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated...
Definition: document.cxx:2450
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6170
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4091
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
Definition: documen2.cxx:475
ScMutationDisable(ScDocument *pDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2587
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2119
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:4771
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4110
bool mbTrackFormulasPending
Definition: document.hxx:558
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4737
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:546
SfxUndoManager * mpUndoManager
Definition: document.hxx:365
bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:82
void MarkUsedExternalReferences()
Definition: documen3.cxx:619
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
Definition: document.cxx:6262
bool bHasForcedFormulas
Definition: document.hxx:509
void FinalTrackFormulas(SfxHintId nHintId)
Definition: documen7.cxx:506
ScChangeTrack * GetChangeTrack() const
Definition: document.hxx:2372
std::unique_ptr< ScDrawLayer > mpDrawLayer
Definition: document.hxx:371
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScDocument *pClipDoc)
Definition: document.cxx:2276
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4517
bool mbFinalTrackFormulas
Definition: document.hxx:559
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1517
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:4716
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:2111
void StylesToNames()
Definition: document.cxx:6118
void StartListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:208
void ImplCreateOptions()
Definition: documen8.cxx:100
void SetInsertingFromOtherDoc(bool bVal)
Definition: document.hxx:2111
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2028
void ResetEmbedded()
Definition: documen3.cxx:1711
bool GetNoListening() const
Definition: document.hxx:2118
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:916
ScStyleSheet * GetPreviewCellStyle()
Definition: document.hxx:1331
bool HasValidationData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3811
SC_DLLPUBLIC bool GetCellArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
Definition: document.cxx:1017
ScRangePairListRef xColNameRanges
Definition: document.hxx:417
bool IsClipboard() const
Definition: document.hxx:1509
SC_DLLPUBLIC bool HasRowHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1496
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3630
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
Definition: documen3.cxx:1905
SCCOL SanitizeCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:127
SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, const OUString &rFormula, const ScTokenArray *p=nullptr, const formula::FormulaGrammar::Grammar=formula::FormulaGrammar::GRAM_DEFAULT)
Definition: documen4.cxx:257
constexpr double nPPTX
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx: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:433
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:696
A pretty assertion that checks that the relevant bits in the are not set on the document at entry an...
Definition: document.hxx:2617
bool bInUnoBroadcast
Definition: document.hxx:532
size_t mnMutationGuardFlags
Definition: document.hxx:563
void AddOLEObjectToCollection(const OUString &rName)
Definition: documen5.cxx:644
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:3396
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:887
void InvalidateStreamOnSave()
Definition: document.cxx:494
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:513
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
Definition: document.cxx:1095
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:6795
void SwapNonEmpty(sc::TableValues &rValues)
Definition: document10.cxx:224
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:93
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
Definition: documen2.cxx:537
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:848
Enum used to indicate which portion of the DBArea is to be considered.
Definition: dbdata.hxx:41
Definition: global.hxx:189
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3365
std::unique_ptr< ScViewOptions > pViewOptions
Definition: document.hxx:420
SC_DLLPUBLIC ScDocProtection * GetDocProtection() const
Definition: documen3.cxx:1848
static void MergeBackIntoNonThreadedData(ScDocumentThreadSpecific &rNonThreadedData)
Definition: document.cxx:6824
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:274
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1196
bool HasAnyCalcNotification() const
Definition: documen3.cxx:687
bool HasClipFilteredRows()
Definition: document.cxx:3189
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:6595
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:419
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1046
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3105
Definition: document.hxx:860
T * get() const
sal_uInt16 char * pName
Definition: callform.cxx:58
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, bool bConsiderCellNotes=false, bool bConsiderCellDrawObjects=false) const
Shrink a range to only include used data area.
Definition: document.cxx:1070
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:975
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4908
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:428
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: document.cxx:4447
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
Definition: document.cxx:5046
bool IsChartListenerCollectionNeedsUpdate() const
Definition: document.hxx:2127
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2112
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5857
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:755
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:96
Parameter for data table aka multiple operations.
Definition: paramisc.hxx:46
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2403
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:461
bool bIsFunctionAccess
Definition: document.hxx:492
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1416
Definition: global.hxx:326
void DelayFormulaGrouping(bool delay)
If set, joining cells into shared formula groups will be delayed until reset again (RegroupFormulaCel...
Definition: document10.cxx:377
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
Definition: documen2.cxx:231
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:6802
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
Definition: document.cxx:6267
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4549
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:6211
void SetDBCollection(std::unique_ptr< ScDBCollection > pNewDBCollection, bool bRemoveAutoFilter=false)
Definition: documen3.cxx:257
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:2115
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:1518
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:913
ScDocument * mpDocument
Definition: document.hxx:2635
bool bIsEmbedded
Definition: document.hxx:495
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1260
SCROW GetNextDifferentChangedRow(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4613
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:342
LanguageType eCtlLanguage
Definition: document.hxx:451
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:851
SC_DLLPUBLIC bool IsDefaultTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:443
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:343
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4655
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:376
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2474
void UpdateAllRowHeights(sc::RowHeightContext &rCxt, const ScMarkData *pTabMark)
Definition: document.cxx:4277
SC_DLLPUBLIC void SetActiveScenario(SCTAB nTab, bool bActive)
Definition: documen3.cxx:864
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:202
void GetOldChartParameters(const OUString &rName, ScRangeList &rRanges, bool &rColHeaders, bool &rRowHeaders)
Definition: documen5.cxx:201
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:1623
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3230
void CompileXML()
Definition: document.cxx:3972
bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4501
bool bDetectiveDirty
Definition: document.hxx:518
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
Definition: document.hxx:360
Definition: global.hxx:335
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6678
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2578
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4353
void IncMacroInterpretLevel()
Definition: document.hxx:2305
SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream &rStream)
Definition: document10.cxx:971
sal_Int16 SCCOL
Definition: types.hxx:22
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:5928
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:1177
Definition: global.hxx:158
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
Definition: documen8.cxx:997
SCCOL GetNextDifferentChangedCol(SCTAB nTab, SCCOL nStart) const
Definition: document.cxx:4595
bool ValidCol(SCCOL nCol) const
Definition: document.hxx:863
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2413
sal_uLong nCellCount
Definition: document.hxx:267
bool GetDdeLinkData(size_t nDdePos, OUString &rAppl, OUString &rTopic, OUString &rItem) const
Returns the connection data of the specified DDE link.
Definition: documen8.cxx:975
LanguageType eLanguage
Definition: document.hxx:449
bool HasBackgroundDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:341
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale, const sal_uLong *pnMaxHeight=nullptr) const
Definition: document.cxx:4200
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6339
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
Definition: documen7.cxx:602
void EnableChangeReadOnly(bool bVal)
Definition: document.hxx:1520
bool HasAreaLinks() const
Definition: documen8.cxx:1044
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1114
ScMarkData maPreviewSelection
Definition: document.hxx:430
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:4268
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:654
bool IsForcedFormulaPending() const
Definition: document.hxx:1353
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:2067
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1925
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:862
bool HasRangeOverflow() const
Definition: document.hxx:2107
void RemoveEditTextCharAttribs(const ScAddress &rPos, const ScPatternAttr &rAttr)
Definition: document.cxx:3622
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:6774
bool IsFunctionAccess() const
Definition: document.hxx:1512
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Definition: document.cxx:1247
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
Definition: documen8.cxx:987
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:391
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:634
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScMarkData &rMark, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document10.cxx:57
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:439
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4765
ScRange aEmbedRange
Definition: document.hxx:435
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1153
sal_uInt16 GetMacroInterpretLevel() const
Definition: document.hxx:2304
SC_DLLPUBLIC void UnlockAdjustHeight()
Definition: document.cxx:1814
SC_DLLPUBLIC SCCOL ClampToAllocatedColumns(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2106
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
bool IsInInterpreterTableOp() const
Definition: document.hxx:2317
void SetLinkFormulaNeedingCheck(bool bSet)
Definition: document.hxx:2102
void EndListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:217
void SharePooledResources(const ScDocument *pSrcDoc)
Definition: document10.cxx:327
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:834
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6229
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
bool IsDetectiveDirty() const
Definition: document.hxx:2098
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:373
void SetLink(SCTAB nTab, ScLinkMode nMode, const OUString &rDoc, const OUString &rFilter, const OUString &rOptions, const OUString &rTabName, sal_uLong nRefreshDelay)
Definition: documen3.cxx:528
bool IsCutMode()
Definition: document.cxx:2064
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4097
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6519
bool mbEmbedFontScriptAsian
Definition: document.hxx:553
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:173
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
Definition: document.cxx:1039
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
Definition: documen2.cxx:94
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2280
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
Definition: document.cxx:1102
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4788
SdrObject * GetObjectAtPoint(SCTAB nTab, const Point &rPos)
Definition: documen9.cxx:397
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
Definition: documen7.cxx:527
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6182
BroadcastAreaSlots and their management, once per document.
Definition: bcaslot.hxx:246
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4103
ScMutationGuard(ScDocument *pDocument, ScMutationGuardFlags nFlags)
Definition: document.hxx:2619
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:928
void DecXMLImportedFormulaCount(sal_uLong nVal)
Definition: document.hxx:2343
SC_DLLPUBLIC SCROW GetFirstEditTextRow(const ScRange &rRange) const
Definition: document.cxx:3424
css::uno::Reference< css::chart2::XChartDocument > GetChartByName(const OUString &rChartName)
Definition: documen5.cxx:137
Instantiate this to ensure that subsequent modification of the document will cause an assertion failu...
Definition: document.hxx:2585
void BroadcastUno(const SfxHint &rHint)
Definition: documen3.cxx:931
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1724
OUString GetLinkFlt(SCTAB nTab) const
Definition: documen3.cxx:500
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6420
void RemoveSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6399
SC_DLLPUBLIC const EditTextObject * GetEditText(const ScAddress &rPos) const
Definition: document.cxx:3613
bool IsInExternalReferenceMarking() const
Definition: documen3.cxx:614
void SaveDdeLinks(SvStream &rStream) const
Definition: documen8.cxx:719
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2419
sal_uLong nFormulaCodeInTree
Definition: document.hxx:458
SCTAB nTableCount
Definition: document.hxx:266
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1954
bool IsBlockEmpty(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bIgnoreNotes=false) const
Definition: document.cxx:5293
void IncInterpreterTableOpLevel()
Definition: document.hxx:2318
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:250
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4147
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4073
SCROW GetRowForHeight(SCTAB nTab, sal_uLong nHeight) const
Given the height i.e.
Definition: document.cxx:4195
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:595
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
Definition: document.hxx:257
void SetLoadingMedium(bool bVal)
Definition: documen9.cxx:578
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1191
SC_DLLPUBLIC void DoMerge(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool bDeleteCaptions=true)
Definition: documen3.cxx:2034
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6305
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4012
Definition: document.hxx:250
std::unique_ptr< ScScriptTypeData > pScriptTypeData
Definition: document.hxx:396
Definition: document.hxx:852
void RemoveManualBreaks(SCTAB nTab)
Definition: document.cxx:6223
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3767
SC_DLLPUBLIC ScPostIt * CreateNote(const ScAddress &rPos)
Definition: document.cxx:6602
bool HasSelectedBlockMatrixFragment(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark) const
Definition: document.cxx:5403
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:785
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2101
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3701
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1477
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:2521
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
Definition: document.hxx:367
SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream &rStrm) const
Definition: document10.cxx:962
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:390
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:6105
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1191
ScDocument * mpDocument
Definition: document.hxx:2604
void CheckVectorizationState()
Definition: document.cxx:3823
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5564
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6529
void CompileDBFormula()
Definition: documen4.cxx:554
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
Definition: document.cxx:6627
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:586
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:868
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1325
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1093
sal_uInt16 nPageCount
Definition: document.hxx:269
void LockStreamValid(bool bLock)
Definition: document.cxx:930
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:248
css::uno::Reference< css::script::vba::XVBAEventProcessor > mxVbaEvents
Definition: document.hxx:441
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4509
bool mbExecuteLinkEnabled
Definition: document.hxx:540
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bLimit=false)
Entries for selection list listbox (no numbers/formulas)
Definition: documen3.cxx:1583
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:143
bool bCalculatingFormulaTree
Definition: document.hxx:489
static void SetupFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:6829
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3758
bool HasLink(const OUString &rDoc, const OUString &rFilter, const OUString &rOptions) const
Definition: documen3.cxx:536
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::unique_ptr< ScRange > pNew)
Definition: document.cxx:6323
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:527
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:1569
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:703
ScDocument & mrDoc
Definition: document.hxx:2642
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4399
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:379
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4065
bool bInLinkUpdate
Definition: document.hxx:506
void SetChartRangeList(const OUString &rChartName, const ScRangeListRef &rNewRangeListRef)
only assigns the new RangeList, no ChartListener or the like
Definition: documen5.cxx:481
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1919
Definition: document.hxx:479
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:753
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:880
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:4028
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:2621
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2106
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:902
Configuration options for formula interpreter.
Definition: calcconfig.hxx:43
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1359
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1355
Definition: global.hxx:149
void GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab, OUString &rStr)
Definition: documen3.cxx:1437
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:870
SC_DLLPUBLIC void DoEmptyBlock(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: documen3.cxx:2021
SC_DLLPUBLIC ScLkUpdMode GetLinkMode() const
Definition: document.hxx:2148
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:450
void LockTable(SCTAB nTab)
Definition: document.cxx:5304
bool IdleCalcTextWidth()
Definition: documen8.cxx:542
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:631
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
Definition: document.cxx:6618
void finalizeOutlineImport()
Definition: document10.cxx:521
void SetDetOpList(std::unique_ptr< ScDetOpList > pNew)
Definition: documen4.cxx:900
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: document.hxx:865
void SyncColRowFlags()
Write all column row flags to table's flag data, because not all column row attributes are stored in ...
Definition: document.cxx:4565
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: document.cxx:4977
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:5233
bool IsInDtorClear() const
Definition: document.hxx:2333
o3tl::sorted_vector< sal_uInt32 > ScCondFormatIndexes
Definition: document.hxx:199
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3691
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
Definition: document.cxx:6176
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:937
Definition: global.hxx:310
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:430
SCCOL GetPosLeft() const
Definition: document.hxx:849
void SkipOverlapped(SCCOL &rCol, SCROW &rRow, SCTAB nTab) const
Definition: document.cxx:5717
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:456
SC_DLLPUBLIC sal_uLong AddValidationEntry(const ScValidationData &rNew)
Definition: documen4.cxx:713
SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, ScDirection eDir)
Definition: document.cxx:6067
void GetFilterSelCount(SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE &nSelected, SCSIZE &nTotal)
Definition: documen3.cxx:1502
Definition: global.hxx:135
SC_DLLPUBLIC void TransferDrawPage(const ScDocument *pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:64
void SetEmbedded(const ScRange &rRange)
Definition: documen3.cxx:1705
DECL_LINK(GetUserDefinedColor, sal_uInt16, Color *)
sal_Int32 SCROW
Definition: types.hxx:18
void UpdateExternalRefLinks(weld::Window *pWin)
Definition: documen8.cxx:799
EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const
Definition: documen8.cxx:357
void StopTemporaryChartLock()
Definition: documen3.cxx:388
sal_uInt8 nInDdeLinkUpdate
Definition: document.hxx:530
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
Definition: document.cxx:4958
sal_uInt32 nAdjustHeightLock
Definition: document.hxx:534
SC_DLLPUBLIC void SetDocVisible(bool bSet)
Definition: documen2.cxx:241
bool IsVerOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5737
SC_DLLPUBLIC OutputDevice * GetRefDevice()
Definition: documen8.cxx:200
SC_DLLPUBLIC const ScDrawLayer * GetDrawLayer() const
Definition: document.hxx:1047
Definition: global.hxx:435
bool IsThreadedGroupCalcInProgress() const
Definition: document.hxx:613
void SetDirty(const ScRange &, bool bIncludeEmptyCells)
Definition: document.cxx:3859
SC_DLLPUBLIC sal_Int16 GetNamedRangesLockCount() const
Definition: document.hxx:1523
bool ValidRow(SCROW nRow) const
Definition: document.hxx:864
void SetForcedFormulaPending(bool bNew)
Definition: document.hxx:1352
void AddUndoTab(SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2034
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
Definition: documen2.cxx:1071
ScStyleSheet * pPreviewCellStyle
Definition: document.hxx:429
Definition: attrib.hxx:35
SC_DLLPUBLIC void InitClipPtrs(ScDocument *pSourceDoc)
Definition: documen2.cxx:396
sal_uInt16 nMacroInterpretLevel