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 -*- */
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 */
20#pragma once
22#include <vcl/idle.hxx>
23#include <vcl/errcode.hxx>
24#include <com/sun/star/uno/Reference.hxx>
25#include <vcl/vclptr.hxx>
26#include "patattr.hxx"
27#include "scdllapi.h"
29#include "rangelst.hxx"
30#include "rangenam.hxx"
31#include "recursionhelper.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>
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 <shared_mutex>
52#include <optional>
53#include <set>
54#include <unordered_map>
55#include <vector>
57#include "markdata.hxx"
58#include "drwlayer.hxx"
60namespace com::sun::star::chart2 { class XChartDocument; }
62class Timer;
64enum class SvtScriptType : sal_uInt8;
65enum class ScMF;
66enum class FormulaError : sal_uInt16;
67enum class CharCompressType;
69namespace editeng { class SvxBorderLine; }
70namespace formula { struct VectorRefArray; }
71namespace svl {
72class SharedString;
73class SharedStringPool;
76namespace tools { class Guid; }
78namespace sc {
80struct FormulaGroupContext;
81class StartListeningContext;
82class EndListeningContext;
83class CopyFromClipContext;
84class ColumnSpanSet;
85class RangeColumnSpanSet;
86struct ColumnBlockPosition;
87struct RefUpdateContext;
88class EditTextIterator;
89struct NoteEntry;
90class DocumentStreamAccess;
91class DocumentLinkManager;
92class CellValues;
93class TableValues;
94class RowHeightContext;
95struct SetFormulaDirtyContext;
96class RefMovedHint;
97struct ReorderParam;
98class FormulaGroupAreaListener;
99class ColumnSet;
100class UpdatedRangeNames;
101class TableColumnBlockPositionSet;
102class ColumnIterator;
103class ExternalDataMapper;
104class Sparkline;
105class SparklineGroup;
106class SparklineList;
110class Fraction;
112class OutputDevice;
113class SdrObject;
114class SfxBroadcaster;
115class SfxListener;
116class SfxItemSet;
117class SfxObjectShell;
118class SfxBindings;
119class SfxPoolItem;
120class SfxItemPool;
121class SfxPrinter;
123class SvMemoryStream;
124class SvxBoxInfoItem;
125class SvxBoxItem;
127namespace sfx2 {
128 class LinkManager;
129 }
130class SvxSearchItem;
131class XColorList;
133class ScAutoFormatData;
137class ScClipOptions;
138class ScColumn;
141class ScDBCollection;
142class ScDBData;
143class ScDetOpData;
144class ScDetOpList;
145class ScDocOptions;
146class ScDocProtection;
147class ScDocumentPool;
148class ScDrawLayer;
149class ScExtDocOptions;
151class ScFormulaCell;
152class ScMacroManager;
153class ScOutlineTable;
155class ScStyleSheet;
156class ScStyleSheetPool;
157class ScTable;
159class ScTokenArray;
160class ScValidationData;
162class ScViewOptions;
163class ScChangeTrack;
166class ScNoteEditEngine;
167class ScDPObject;
168class ScDPCollection;
169class ScMatrix;
170class ScScriptTypeData;
171class ScPoolHelper;
172struct ScSortParam;
175class ScUnoRefList;
177struct RowInfo;
178struct ScTableInfo;
179struct ScTabOpParam;
180class VirtualDevice;
181class ScAutoNameCache;
183class ScLookupCache;
184struct ScLookupCacheMap;
187class SfxUndoManager;
189struct ScClipParam;
191struct ScSetStringParam;
192struct ScColWidthParam;
193class ScSheetEvents;
194class ScProgress;
195class SvtListener;
196class ScEditDataArray;
197class EditTextObject;
198struct ScRefCellValue;
199class ScPostIt;
200struct ScSubTotalParam;
201struct ScQueryParam;
202class ScHint;
203class SvtBroadcaster;
204enum class ScDBDataPortion;
205enum class ScSheetEventId;
206class BitmapEx;
207class ScColumnsRange;
208struct ScFilterEntries;
210struct ScSheetLimits;
211struct ScDataAreaExtras;
214namespace sc {
216typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
220namespace com::sun::star {
221 namespace lang {
222 struct EventObject;
223 }
224 namespace i18n {
225 class XBreakIterator;
226 }
227 namespace util {
228 class XModifyListener;
229 }
230 namespace embed {
231 class XEmbeddedObject;
232 }
233 namespace script::vba {
234 class XVBAEventProcessor;
235 }
236 namespace sheet {
237 struct TablePageBreakData;
238 }
241namespace weld {
243class Window;
247#define SC_DOC_NEW 0xFFFF
263 ALLSHOWN, // All comments captions are shown
264 ALLHIDDEN, // All comments captions are hidden
265 MIXED // There are comments in shown and hidden.
270 GLOBAL, // A range name can be defined
271 SHEET // with two scope on Manage Names dialog.
277 SIZES, // Column widths or row heights.
278 HIDDEN, // Hidden columns/rows.
279 FILTERED, // Filtered columns/rows.
280 GROUPS // Grouping of columns/rows.
285 OUString aDocName;
287 sal_uInt64 nCellCount;
288 sal_uInt64 nFormulaCount;
289 sal_uInt16 nPageCount;
291 : nTableCount(0)
292 , nCellCount(0)
293 , nFormulaCount(0)
294 , nPageCount(0)
295 {
296 }
299// DDE link modes
305// During threaded calculation fields being mutated are kept in this struct
308 std::unique_ptr<ScRecursionHelper> xRecursionHelper; // information for recursive and iterative cell formulas
309 ScInterpreterContext* pContext = nullptr; // references the context passed around for easier access
315 // Bit mask bits
316 CORE = 0x0001,
319typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
323friend class ScValueIterator;
326friend class ScCellIterator;
327template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType >
329template< ScQueryCellIteratorAccess accessType >
333friend class ScDocAttrIterator;
335friend class ScDocShell;
338friend class ScTable;
339friend class ScColumn;
340friend struct ScRefCellValue;
341friend class ScDocumentImport;
343friend struct ScMutationGuard;
344friend struct ScMutationDisable;
346 typedef std::vector<ScTableUniquePtr> TableContainer;
350 {
351 OFF,
354 };
359 std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
360 std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
362 std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
368 std::unique_ptr<ScFieldEditEngine> mpEditEngine; // uses pEditPool from xPoolHelper
369 std::unique_ptr<ScNoteEditEngine> mpNoteEngine; // uses pEditPool from xPoolHelper
373 std::unique_ptr<ScDrawLayer> mpDrawLayer; // SdrModel
375 std::unique_ptr<ScValidationDataList> pValidationList; // validity
376 SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
379 std::vector<OUString> maTabNames; // for undo document, we need the information tab name <-> index
380 mutable std::unique_ptr<ScRangeName> pRangeName;
381 std::unique_ptr<ScDBCollection> pDBCollection;
382 std::unique_ptr<ScDPCollection> pDPCollection;
383 std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
384 std::unique_ptr<ScPatternAttr> pSelectionAttr; // Attributes of a block
385 ScFormulaCell* pFormulaTree; // formula tree (start)
386 ScFormulaCell* pEOFormulaTree; // formula tree (end), last cell
387 ScFormulaCell* pFormulaTrack; // BroadcastTrack (start)
388 ScFormulaCell* pEOFormulaTrack; // BroadcastTrack (end), last cell
389 std::unique_ptr<ScBroadcastAreaSlotMachine> pBASM; // BroadcastAreas
390 std::unique_ptr<ScChartListenerCollection> pChartListenerCollection;
391 std::unique_ptr<SvMemoryStream> pClipData;
392 std::unique_ptr<ScDetOpList> pDetOpList;
393 std::unique_ptr<ScChangeTrack> pChangeTrack;
394 std::unique_ptr<SfxBroadcaster> pUnoBroadcaster;
395 std::unique_ptr<ScUnoListenerCalls> pUnoListenerCalls;
396 std::unique_ptr<ScUnoRefList> pUnoRefUndoList;
397 std::unique_ptr<ScChangeViewSettings> pChangeViewSettings;
398 std::unique_ptr<ScScriptTypeData> pScriptTypeData;
399 std::unique_ptr<ScRefreshTimerControl> pRefreshTimerControl;
400 std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharacters;
401 std::unique_ptr<ScDBData> mpAnonymousDBData;
402 std::unique_ptr<sc::ExternalDataMapper> mpDataMapper;
404 std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
406 std::unique_ptr<ScDocProtection> pDocProtection;
407 std::unique_ptr<ScClipParam> mpClipParam;
409 std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
410 std::unique_ptr<ScMacroManager> mpMacroMgr;
412 // mutable for lazy construction
413 mutable std::unique_ptr< ScFormulaParserPool >
416 OUString aDocName; // optional: name of document
417 OUString aDocCodeName; // optional: name of document (twice?)
418 OUString maFileURL; // file URL for copy & paste
422 std::unique_ptr<ScViewOptions> pViewOptions; // view options
423 std::unique_ptr<ScDocOptions> pDocOptions; // document options
424 std::unique_ptr<ScExtDocOptions> pExtDocOptions; // for import etc.
425 std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options
426 std::unique_ptr<ScConsolidateParam> pConsolidateDlgData;
428 std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
430 std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
433 sal_Int64 nUnoObjectId; // counted up for UNO objects
435 ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
442 css::uno::Reference< css::script::vba::XVBAEventProcessor >
446 std::vector<ScInterpreterTableOpParams*> m_TableOpList;
451 LanguageType eLanguage; // default language
452 LanguageType eCjkLanguage; // default language for asian text
453 LanguageType eCtlLanguage; // default language for complex text
454 rtl_TextEncoding eSrcSet; // during reading: source character set
460 sal_uInt64 nFormulaCodeInTree; // formula RPN in the formula tree
461 sal_uInt64 nXMLImportedFormulaCount; // progress count during XML import
462 sal_uInt16 nInterpretLevel; // >0 if in interpreter
463 sal_uInt16 nMacroInterpretLevel; // >0 if macro in interpreter
464 sal_uInt16 nInterpreterTableOpLevel; // >0 if in interpreter TableOp
468 // There can be only one ScDocument being calculated in a thread at a time, so we can use a
469 // plain thread_local static member.
474 std::shared_mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
475 std::unique_ptr<ScSortedRangeCacheMap> mxScSortedRangeCache; // cache for unsorted lookups
477 static const sal_uInt16 nSrcVer; // file version (load/save)
479 HardRecalcState eHardRecalcState; // off, temporary, eternal
480 SCTAB nVisibleTab; // for OLE etc., don't use inside ScDocument
481 SCCOL nPosLeft; // for OLE etc., don't use inside ScDocument
482 SCROW nPosTop; // for OLE etc., don't use inside ScDocument
486 bool bAutoCalc; // calculate automatically
487 bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled
488 // are there ForcedFormulas which have to be calculated
489 // in interaction with ScDocShell SetDocumentModified,
490 // AutoCalcShellDisabled and TrackFormulas
496 bool bIsVisible; // set from view ctor
498 bool bIsEmbedded; // display/adjust Embedded area?
500 // no broadcast, construct no listener during insert from a different
501 // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
504 bool bImportingXML; // special handling of formula text
505 bool bCalcingAfterLoad; // in CalcAfterLoad TRUE
506 // don't construct/destruct listeners temporarily
509 bool bInLinkUpdate; // TableLink or AreaLink
511 // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
513 // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
515 // expand reference if insert column/row takes place at the border
516 // of a reference
517 // is fetched in each UpdateReference from InputOptions,
518 // assigned, and restored at the end of UpdateReference
520 // for detective update, is set for each change of a formula
522 // If the pointer is set, formula cells will not be automatically grouped into shared formula groups,
523 // instead the range will be extended to contain all such cells.
524 std::unique_ptr< ScRange > pDelayedFormulaGrouping;
525 // If non-empty, ScColumn::StartListeningFormulaCells() calls may be delayed using this,
526 // avoiding repeated calling for the same cells in the given range. The function will be called once
527 // later for all the cells in the range.
528 std::unordered_map< ScColumn*, std::pair<SCROW, SCROW>> pDelayedStartListeningFormulaCells;
529 // Cells will not delete their broadcasters if delayed, avoiding possible extensive mdds vector changes.
532 bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
539 sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
550 bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
552 bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
556 std::set<ScFormulaCell*> maSubTotalCells;
559 bool mbEmbedFonts : 1;
567 std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
571 // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
573 // This indicates if a ScOutputData::LayoutStrings() is in progress.
579 bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
580 void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
582 bool IsEmbedFonts() const { return mbEmbedFonts; }
588 void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
589 void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
594 void SetImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = nValue; }
597 SC_DLLPUBLIC sal_uInt64 GetCellCount() const; // all cells
598 SC_DLLPUBLIC sal_uInt64 GetFormulaGroupCount() const; // all cells
599 sal_uInt64 GetCodeCount() const; // RPN-Code in formulas
600 DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
601 // number formatter
604 SfxObjectShell* pDocShell = nullptr );
607 void SetName( const OUString& r ) { aDocName = r; }
608 const OUString& GetCodeName() const { return aDocCodeName; }
609 void SetCodeName( const OUString& r ) { aDocCodeName = r; }
610 const OUString& GetFileURL() const { return maFileURL; }
612 void GetDocStat( ScDocStat& rDocStat );
614 SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
617 {
620 }
621 // Uses thread_local.
623 {
625 }
626 void SetupContextFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
627 void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
638 SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
640 SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
641 void SetPrintOptions();
644 SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
647 void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
649 SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
650 void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
652 void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
655 void Clear( bool bFromDestructor = false );
657 std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
658 void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
665 SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap);
666 SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
669 void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
670 void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
671 bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
680 ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
726 SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
727 SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
728 bool bSameDoc, int nRecursion ) const;
770 bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
771 const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
772 const bool bUsedByFormula ) const;
777 SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap );
795 bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
808 bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
816 SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
827 void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
828 bool bRemoveAutoFilter = false );
829 const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
830 ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
831 SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
832 SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
836 SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString& rName,
837 bool* pSheetLocal = nullptr ) const;
839 SC_DLLPUBLIC bool HasPivotTable() const;
842 SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
844 {
845 return GetDPAtCursor(rAddress.Col(), rAddress.Row(), rAddress.Tab());
846 }
848 {
849 return GetDPAtCursor(rAddress) != nullptr;
850 }
851 ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
855 void EnsureGraphicNames();
857 SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
858 bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
860 css::uno::Reference< css::chart2::XChartDocument > GetChartByName( std::u16string_view rChartName );
862 SC_DLLPUBLIC void GetChartRanges( std::u16string_view rChartName, std::vector< ScRangeList >& rRanges, const ScDocument& rSheetNameDoc );
863 void SetChartRanges( std::u16string_view rChartName, const std::vector< ScRangeList >& rRanges );
865 void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
866 bool bColHeaders, bool bRowHeaders, bool bAdd );
867 void UpdateChartArea( const OUString& rChartName,
868 const ScRangeListRef& rNewList,
869 bool bColHeaders, bool bRowHeaders, bool bAdd );
870 void GetOldChartParameters( std::u16string_view rName,
871 ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
872 css::uno::Reference<
873 css::embed::XEmbeddedObject >
874 FindOleObjectByName( std::u16string_view rName );
876 SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
878 SCTAB GetVisibleTab() const { return nVisibleTab; }
880 SCCOL GetPosLeft() const { return nPosLeft; }
881 SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
882 SCROW GetPosTop() const { return nPosTop; }
883 SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
885 SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
886 SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
887 SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
888 SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
889 SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
890 SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
891 SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
892 SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
893 SC_DLLPUBLIC SCCOL GetMaxColCount() const { return mxSheetLimits->GetMaxColCount(); }
894 SC_DLLPUBLIC SCROW GetMaxRowCount() const { return mxSheetLimits->GetMaxRowCount(); }
895 SC_DLLPUBLIC OUString MaxRowAsString() const { return mxSheetLimits->MaxRowAsString(); }
896 SC_DLLPUBLIC OUString MaxColAsString() const { return mxSheetLimits->MaxColAsString(); }
898 [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
899 [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
900 [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
901 [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
902 [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
903 [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
904 [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
905 [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
907 SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
909 OUString GetCopyTabName(SCTAB nTab) const;
911 SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
918 SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
925 SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
926 SC_DLLPUBLIC bool IsDocProtected() const;
927 bool IsDocEditable() const;
928 SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
930 SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
931 void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
933 void LockTable(SCTAB nTab);
934 void UnlockTable(SCTAB nTab);
936 bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
937 SCCOL nEndCol, SCROW nEndRow,
938 bool* pOnlyNotBecauseOfMatrix = nullptr,
939 bool bNoMatrixAtAll = false ) const;
940 bool IsSelectionEditable( const ScMarkData& rMark,
941 bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
942 bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
943 SCCOL nEndCol, SCROW nEndRow,
944 const ScMarkData& rMark ) const;
946 bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
947 bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
949 SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
951 bool IsEmbedded() const { return bIsEmbedded;}
952 void GetEmbedded( ScRange& rRange ) const;
953 void SetEmbedded( const ScRange& rRange );
954 void ResetEmbedded();
955 tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
956 void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
958 static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
960 SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
961 SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
962 SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
964 void AppendTabOnLoad(const OUString& rName);
965 void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
968 SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
969 bool bExternalDocument = false, bool bUndoDeleteTab = false );
971 SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
972 bool bNamesValid = false );
973 SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
974 SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
975 SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
976 bool bExternalDocument = false );
977 bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
978 SC_DLLPUBLIC bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
979 const ScMarkData* pOnlyMarked = nullptr );
980 SC_DLLPUBLIC sal_uLong TransferTab(ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
981 bool bInsertNew = true,
982 bool bResultsOnly = false );
983 SC_DLLPUBLIC void TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
984 SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
985 SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
986 bool IsStreamValid( SCTAB nTab ) const;
987 void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
988 void LockStreamValid( bool bLock );
990 bool IsPendingRowHeights( SCTAB nTab ) const;
991 void SetPendingRowHeights( SCTAB nTab, bool bSet );
992 SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
993 SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
994 SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
995 SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
996 SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
997 SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
998 Color& rColor, ScScenarioFlags &rFlags) const;
999 SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
1000 const Color& rColor, ScScenarioFlags nFlags);
1001 SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
1002 SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
1003 SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
1004 void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
1005 SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
1006 SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
1011 bool IsLinked( SCTAB nTab ) const;
1012 SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
1013 OUString GetLinkFlt( SCTAB nTab ) const;
1014 OUString GetLinkOpt( SCTAB nTab ) const;
1015 SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
1016 sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
1017 void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
1018 const OUString& rFilter, const OUString& rOptions,
1019 const OUString& rTabName, sal_uLong nRefreshDelay );
1020 bool HasLink( std::u16string_view rDoc,
1021 std::u16string_view rFilter, std::u16string_view rOptions ) const;
1022 SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
1023 const OUString& aFileName,
1024 const OUString& aTabName );
1026 bool HasExternalRefManager() const { return bool(pExternalRefMgr); }
1028 bool IsInExternalReferenceMarking() const;
1030 bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1036 bool HasAreaLinks() const;
1038 void UpdateAreaLinks();
1040 // originating DDE links
1043 bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1045 SC_DLLPUBLIC void CopyDdeLinks( ScDocument& rDestDoc ) const;
1050 SC_DLLPUBLIC bool FindDdeLink( std::u16string_view rAppl, std::u16string_view rTopic,
1051 std::u16string_view rItem, sal_uInt8 nMode, size_t& rnDdePos );
1059 bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1064 bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1068 SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1073 SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1078 bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1083 SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1084 SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1085 void BeginDrawUndo();
1087 void BeginUnoRefUndo();
1088 bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1089 [[nodiscard]]
1090 std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1091 sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1092 void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1094 static bool IsChart( const SdrObject* pObject );
1096 void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1097 SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1098 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1099 SCCOL nDx, SCROW nDy, SCTAB nDz );
1101 void SetChartRangeList( std::u16string_view rChartName,
1102 const ScRangeListRef& rNewRangeListRef );
1104 void StartAnimations( SCTAB nTab );
1106 bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1107 bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1109 const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1110 void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1111 bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1112 bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1114 bool HasAnyCalcNotification() const;
1115 bool HasCalcNotification( SCTAB nTab ) const;
1116 void SetCalcNotification( SCTAB nTab );
1119 SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1120 bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1122 void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1123 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1125 bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1126 void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1127 bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1128 bool HasSubTotalCells( const ScRange& rRange );
1130 SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1132 // return TRUE = number format is set
1133 SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1134 const ScSetStringParam * pParam = nullptr );
1135 SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1136 const ScSetStringParam* pParam = nullptr );
1147 SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1148 void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1149 SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1150 SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1156 SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1157 void SetEmptyCell( const ScAddress& rPos );
1158 SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1159 SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1160 void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1161 void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1162 SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1163 SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1175 bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1180 bool HasFormulaCell( const ScRange& rRange ) const;
1181 SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1182 SCCOL nCol2, SCROW nRow2,
1183 const ScMarkData& rMark,
1184 const OUString& rFormula,
1185 const ScTokenArray* p = nullptr,
1187 SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1188 SCCOL nCol1, SCROW nRow1,
1189 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1191 SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1192 const ScInterpreterContext* pContext = nullptr ) const;
1193 SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1194 const ScInterpreterContext* pContext = nullptr ) const;
1204 SC_DLLPUBLIC double* GetValueCell( const ScAddress& rPos );
1209 svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1211 std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1216 // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
1217 SC_DLLPUBLIC OUString GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bForceSystemLocale = false ) const;
1218 FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1219 SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1220 SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1221 SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1222 void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1223 SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1224 SC_DLLPUBLIC sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1225 sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1226 SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1227 void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1229 void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1230 SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1232 SC_DLLPUBLIC OUString GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1233 SC_DLLPUBLIC CellType GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1234 SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1236 SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1237 SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1238 SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1239 SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1240 bool HasStringCells( const ScRange& rRange ) const;
1243 bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1244 bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1254 // Spaklines
1256 SC_DLLPUBLIC std::shared_ptr<sc::Sparkline> GetSparkline(ScAddress const & rPosition);
1257 SC_DLLPUBLIC bool HasSparkline(ScAddress const & rPosition);
1258 SC_DLLPUBLIC sc::Sparkline* CreateSparkline(ScAddress const & rPosition, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup);
1260 SC_DLLPUBLIC bool DeleteSparkline(ScAddress const& rPosition);
1266 SC_DLLPUBLIC bool GetSparklineGroupInRange(ScRange const& rRange, std::shared_ptr<sc::SparklineGroup>& rGroup);
1267 SC_DLLPUBLIC bool HasOneSparklineGroup(ScRange const& rRange);
1268 SC_DLLPUBLIC std::shared_ptr<sc::SparklineGroup> SearchSparklineGroup(tools::Guid const& rGuid);
1270 // Notes
1271 SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1272 SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1273 void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1274 void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1275 SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1276 bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1277 bool HasNote(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const;
1278 SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1279 SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1280 bool HasNotes() const;
1281 SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1284 size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1290 void CreateAllNoteCaptions();
1291 void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1294 ScAddress GetNotePosition( size_t nIndex ) const;
1295 ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1296 SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1298 SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1299 SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1300 void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1302 bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1306 bool IsMerged( const ScAddress& rPos ) const;
1308 void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1309 SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1310 bool bRefresh = false );
1311 SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1312 SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1313 bool bRefresh = false );
1314 bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1315 SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1316 SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1317 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1318 SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1320 bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1321 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1323 SC_DLLPUBLIC void DoMergeContents( SCCOL nStartCol, SCROW nStartRow,
1324 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1325 SC_DLLPUBLIC void DoEmptyBlock( SCCOL nStartCol, SCROW nStartRow,
1326 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1327 // without checking:
1328 SC_DLLPUBLIC void DoMerge( SCCOL nStartCol, SCROW nStartRow,
1329 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bDeleteCaptions = true );
1330 void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1332 // This also includes e.g. notes. Use IsEmptyData() for cell data only.
1333 bool IsBlockEmpty( SCCOL nStartCol, SCROW nStartRow,
1334 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1335 bool IsPrintEmpty( SCCOL nStartCol, SCROW nStartRow,
1336 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1337 bool bLeftIsEmpty = false,
1338 ScRange* pLastRange = nullptr,
1339 tools::Rectangle* pLastMM = nullptr ) const;
1341 void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1342 bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1343 bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab,
1344 SCROW* nStartRow = nullptr, SCROW* nEndRow = nullptr ) const;
1346 SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1347 SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1348 SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1349 bool HasAttrib( SCCOL nCol, SCROW nRow, SCTAB nTab, HasAttrFlags nMask,
1350 SCROW* nStartRow = nullptr, SCROW* nEndRow = nullptr ) const;
1352 SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1353 const ::editeng::SvxBorderLine** ppLeft,
1354 const ::editeng::SvxBorderLine** ppTop,
1355 const ::editeng::SvxBorderLine** ppRight,
1356 const ::editeng::SvxBorderLine** ppBottom ) const;
1358 void ResetChanged( const ScRange& rRange );
1362 void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1363 void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1364 void InterpretDirtyCells( const ScRangeList& rRanges );
1365 // Interprets cells that have NeedsInterpret(), i.e. the same like calling MaybeInterpret() on them.
1366 void InterpretCellsIfNeeded( const ScRangeList& rRanges );
1367 SC_DLLPUBLIC void CalcAll();
1368 SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1369 void CompileAll();
1370 void CompileXML();
1382 bool CompileErrorCells(FormulaError nErrCode);
1385 void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1387 SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1389 void SetPreviewSelection( const ScMarkData& rSel );
1391 ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1393 SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1397 ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1398 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const ScQueryParam& param,
1399 ScInterpreterContext* pContext );
1402 void RemoveLookupCache( ScLookupCache & rCache );
1405 void ClearLookupCaches();
1407 // calculate automatically
1408 SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1409 SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1410 // calculate automatically in/from/for ScDocShell disabled
1413 // ForcedFormulas are to be calculated
1416 // if CalcFormulaTree() is currently running
1420 void DelayFormulaGrouping( bool delay );
1423 void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1427 void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1431 bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1434 void EnableDelayDeletingBroadcasters(bool set);
1437 FormulaError GetErrCode( const ScAddress& ) const;
1451 bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1472 bool ShrinkToUsedDataArea( bool& o_bShrunk,
1473 SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1474 SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1475 bool bStickyTopRow = false, bool bStickyLeftCol = false,
1476 ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
1488 SC_DLLPUBLIC SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1503 SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1504 SCCOL& rEndCol, SCROW& rEndRow,
1505 bool bIncludeOld, bool bOnlyDown ) const;
1514 bool GetDataAreaSubrange(ScRange& rRange) const;
1516 SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1517 SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1518 bool bCalcHiddens = false) const;
1519 SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1520 bool bNotes = true) const;
1521 SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1522 SCCOL& rEndCol ) const;
1523 SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1524 SCROW& rEndRow, bool bNotes ) const;
1525 void InvalidateTableArea();
1528 SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1530 SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1537 void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1538 SCCOL nStartCol, SCROW nStartRow,
1539 SCCOL& rEndCol, SCROW nEndRow ) const;
1540 SC_DLLPUBLIC bool IsEmptyData(SCCOL nStartCol, SCROW nStartRow,
1541 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const;
1542 // I think this returns the number of empty cells starting from the given direction.
1543 SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1544 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1545 ScDirection eDir );
1547 void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1548 SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1549 bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1550 SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1552 bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1553 const ScMarkData& rMark );
1555 void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1556 SCCOL& rEndCol, SCROW& rEndRow );
1557 void LimitChartIfAll( ScRangeListRef& rRangeList );
1559 bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1560 SCCOL nEndCol, SCTAB nEndTab,
1561 SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1562 const ScMarkData* pTabMark = nullptr );
1563 SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1564 void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1565 SCCOL nEndCol, SCTAB nEndTab,
1566 SCROW nStartRow, SCSIZE nSize,
1567 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1568 const ScMarkData* pTabMark = nullptr );
1569 SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1570 bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1571 SCROW nEndRow, SCTAB nEndTab,
1572 SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1573 const ScMarkData* pTabMark = nullptr );
1574 SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1575 void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1576 SCROW nEndRow, SCTAB nEndTab,
1577 SCCOL nStartCol, SCSIZE nSize,
1578 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1579 const ScMarkData* pTabMark = nullptr );
1580 void DeleteCol( const ScRange& rRange );
1582 bool CanInsertRow( const ScRange& rRange ) const;
1583 bool CanInsertCol( const ScRange& rRange ) const;
1585 void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1586 bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1588 bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1589 bool IsUndo() const { return bIsUndo; }
1590 bool IsClipboard() const { return bIsClip; }
1591 bool IsUndoEnabled() const { return mbUndoEnabled; }
1592 SC_DLLPUBLIC void EnableUndo( bool bVal );
1593 bool IsFunctionAccess() const { return bIsFunctionAccess; }
1595 bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1599 void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1601 void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1603 SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1606 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1607 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1608 void SetCutMode( bool bCut );
1609 bool IsCutMode();
1610 void SetClipArea( const ScRange& rArea, bool bCut = false );
1612 SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1613 SC_DLLPUBLIC void SetDocVisible( bool bSet );
1615 bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1617 void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1618 const ScMarkData& rMark, bool bAnchored = false );
1619 void DeleteObjectsInSelection( const ScMarkData& rMark );
1621 SC_DLLPUBLIC void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1622 InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1623 sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1625 SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1626 SCTAB nTab, InsertDeleteFlags nDelFlag);
1627 void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1629 SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1630 const ScMarkData* pMarks, bool bKeepScenarioFlags,
1631 bool bIncludeObjects );
1642 SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1651 void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1653 void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1654 SCTAB nTab, ScDocument* pClipDoc);
1659 sc::ColumnSpanSet& rBroadcastSpans );
1662 SCCOL nCol2, SCROW nRow2 );
1663 void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1664 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1665 SCCOL nDx, SCROW nDy );
1670 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, SCCOL nDx,
1671 SCROW& rClipStartRow, SCROW nClipEndRow);
1673 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1674 SCCOL nCol2, SCROW nRow2,
1675 const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1677 void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1678 const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1679 sc::ColumnSpanSet& rBroadcastSpans );
1693 const ScRange& rDestRange, const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1694 ScDocument* pRefUndoDoc, ScDocument* pClipDoc,
1695 bool bResetCut = true, bool bAsLink = false,
1696 bool bIncludeFiltered = true, bool bSkipEmptyCells = false,
1697 const ScRangeList* pDestRanges = nullptr );
1699 void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1700 InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1701 bool bResetCut = true, bool bAsLink = false,
1702 bool bIncludeFiltered = true,
1703 bool bSkipAttrForEmpty = false);
1705 void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1706 void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1708 bool HasClipFilteredRows();
1710 bool IsClipboardSource() const;
1712 SC_DLLPUBLIC void TransposeClip(ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink,
1713 bool bIncludeFiltered);
1716 void SetClipParam(const ScClipParam& rParam);
1725 void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1726 ScDocument& rSrcDoc );
1728 void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1729 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1730 bool bSkipEmpty, bool bAsLink );
1731 void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1732 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1733 bool bSkipEmpty, bool bAsLink );
1735 void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1737 SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1738 bool bColInfo = false, bool bRowInfo = false );
1739 void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1740 bool bColInfo = false, bool bRowInfo = false );
1741 SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1742 bool bColInfo = false, bool bRowInfo = false );
1744 // don't use anymore:
1745 void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1746 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1747 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1748 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1749 void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1750 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1751 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1753 SC_DLLPUBLIC void CopyToDocument(const ScRange& rRange,
1754 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1755 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1756 void UndoToDocument(const ScRange& rRange,
1757 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1759 void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1760 bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1761 void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1762 ScMarkData& rDestMark, bool bResetMark = true,
1763 ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1764 bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1765 SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1767 SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1770 pUndoDoc = nullptr, bool bIncludeDraw = true,
1771 bool bUpdateNoteCaptionPos = true );
1776 SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1777 const ScMarkData& rMark, ScDocument* pUndoDoc );
1779 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1781 SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1782 ScProgress* pProgress, const ScMarkData& rMark,
1783 sal_uInt64 nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1784 FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1785 double nStepValue = 1.0, double nMaxValue = 1E307 );
1786 OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1789 const ScAddress& rCursor, const ScMarkData& rMark,
1790 double& rResult );
1792 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1793 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1794 {
1795 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1796 }
1797 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich,
1798 SCROW& nStartRow, SCROW& nEndRow ) const;
1799 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich,
1800 SCROW& nStartRow, SCROW& nEndRow ) const
1801 {
1802 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich), nStartRow, nEndRow));
1803 }
1804 SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1805 template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1806 {
1807 return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1808 }
1809 SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1810 SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1811 SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1812 const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1813 std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1814 SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1815 void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1818 // pCell is an optimization, must point to rPos
1819 SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1820 ScRefCellValue* pCell = nullptr ) const;
1821 const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1822 const ScConditionalFormatList& rList,
1823 const ScCondFormatIndexes& rIndex ) const;
1824 const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1825 template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1826 {
1827 return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1828 }
1830 SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1831 bool HasStringWeakCharacters( const OUString& rString );
1832 SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1833 // pCell is an optimization, must point to rPos
1834 SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1835 const ScRefCellValue* pCell = nullptr );
1836 // pCell is an optimization, must point to nCol,nRow,nTab
1838 const ScRefCellValue* pCell = nullptr );
1839 SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1842 bool HasDetectiveOperations() const;
1843 void AddDetectiveOperation( const ScDetOpData& rData );
1845 ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1846 void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1848 bool HasDetectiveObjects(SCTAB nTab) const;
1850 void GetSelectionFrame( const ScMarkData& rMark,
1851 SvxBoxItem& rLineOuter,
1852 SvxBoxInfoItem& rLineInner );
1853 void ApplySelectionFrame(const ScMarkData& rMark,
1854 const SvxBoxItem& rLineOuter,
1855 const SvxBoxInfoItem* pLineInner);
1856 void ApplyFrameAreaTab(const ScRange& rRange,
1857 const SvxBoxItem& rLineOuter,
1858 const SvxBoxInfoItem& rLineInner);
1860 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1861 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1863 SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1864 void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1866 void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1875 SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1876 const SfxPoolItem& rAttr );
1877 SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1878 const ScPatternAttr& rAttr );
1879 SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1880 SCCOL nEndCol, SCROW nEndRow,
1881 const ScMarkData& rMark, const ScPatternAttr& rAttr,
1882 ScEditDataArray* pDataArray = nullptr,
1883 bool* const pIsChanged = nullptr );
1884 SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1885 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1886 const ScPatternAttr& rAttr );
1889 const ScMarkData& rMark,
1890 const ScPatternAttr& rPattern,
1891 SvNumFormatType nNewType );
1893 void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1894 const ScStyleSheet& rStyle);
1895 void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1896 SCCOL nEndCol, SCROW nEndRow,
1897 const ScMarkData& rMark, const ScStyleSheet& rStyle);
1898 SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1899 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1900 const ScStyleSheet& rStyle);
1902 SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1903 void ApplySelectionLineStyle( const ScMarkData& rMark,
1904 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1906 const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1907 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1909 void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1910 OutputDevice* pDev,
1911 double nPPTX, double nPPTY,
1912 const Fraction& rZoomX, const Fraction& rZoomY );
1914 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1916 SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1917 SCCOL nEndCol, SCROW nEndRow,
1918 SCTAB nTab, ScMF nFlags );
1919 SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1920 SCCOL nEndCol, SCROW nEndRow,
1921 SCTAB nTab, ScMF nFlags );
1923 SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1924 SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> pAttr );
1925 SC_DLLPUBLIC const ScPatternAttr* SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> pAttr );
1926 SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1928 void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1929 sal_uInt16 nFormatNo, const ScMarkData& rMark );
1930 void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1931 ScAutoFormatData& rData );
1932 bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1933 SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1934 const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1935 OUString& rUndoStr, ScDocument* pUndoDoc = nullptr );
1936 static bool IsEmptyCellSearch( const SvxSearchItem& rSearchItem );
1938 // determine Col/Row of subsequent calls
1939 // (e.g. not found from the beginning, or subsequent tables)
1940 // meaning of explanation in "()" was already unclear in German
1941 void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1942 SCCOL& rCol, SCROW& rRow );
1944 bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1945 SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1946 const OUString& sValStr, double& nX);
1948 SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1949 ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1950 SC_DLLPUBLIC void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1951 void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1953 SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1954 SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1955 SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1956 SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1957 sal_uInt16 nNewHeight );
1959 SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1960 sal_uInt16 nNewHeight );
1961 SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1963 SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1964 SC_DLLPUBLIC tools::Long GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1965 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1966 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
1967 SC_DLLPUBLIC tools::Long GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1974 SCROW GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const;
1975 tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
1976 SC_DLLPUBLIC tools::Long GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1977 SC_DLLPUBLIC tools::Long GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1979 SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1980 SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1982 sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1984 SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1986 sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1987 double nPPTX, double nPPTY,
1988 const Fraction& rZoomX, const Fraction& rZoomY,
1989 bool bFormula,
1990 const ScMarkData* pMarkData = nullptr,
1991 const ScColWidthParam* pParam = nullptr );
1994 SCROW nEndRow, SCTAB nTab, bool bApi );
1996 void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
1998 tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
1999 OutputDevice* pDev,
2000 double nPPTX, double nPPTY,
2001 const Fraction& rZoomX, const Fraction& rZoomY,
2002 bool bWidth, bool bTotalSize = false,
2003 bool bInPrintTwips = false );
2005 SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
2006 SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
2007 SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
2008 SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
2009 SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
2011 SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
2012 SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
2014 SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2015 SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2018 SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2019 SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2020 void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2021 void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2022 css::uno::Sequence<
2023 css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
2025 SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2026 SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2027 SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
2028 SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
2029 SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
2030 SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2031 SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2032 SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2034 SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2035 bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2036 bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
2037 SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
2038 SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2039 SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2040 SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2042 SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
2044 bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
2051 void SyncColRowFlags();
2065 // returns whether to export a Default style for this col or not
2066 // nDefault is set to one position in the current row where the Default style is
2067 void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
2069 bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
2070 bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
2072 void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2073 void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2078 void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
2080 // PageStyle:
2081 SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
2082 SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
2083 Size GetPageSize( SCTAB nTab ) const;
2084 void SetPageSize( SCTAB nTab, const Size& rSize );
2085 void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2086 void InvalidatePageBreaks(SCTAB nTab);
2087 void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2088 void RemoveManualBreaks( SCTAB nTab );
2089 bool HasManualBreaks( SCTAB nTab ) const;
2091 bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2092 bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2093 bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2094 void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2095 const SfxItemSet& rChanges );
2097 void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2099 SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2101 // Was stored in PageStyle previously. Now it exists for every table:
2103 SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2104 SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2105 SC_DLLPUBLIC std::optional<ScRange> GetRepeatColRange( SCTAB nTab );
2106 SC_DLLPUBLIC std::optional<ScRange> GetRepeatRowRange( SCTAB nTab );
2108 bool IsPrintEntireSheet( SCTAB nTab ) const;
2111 SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2113 SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2116 SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::optional<ScRange> oNew );
2117 SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::optional<ScRange> oNew );
2118 std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2119 void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2121 SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2122 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2123 SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2125 void UpdStlShtPtrsFrmNms();
2126 void StylesToNames();
2128 SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2130 static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2132 void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2133 void UpdateFontCharSet();
2135 void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2136 SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2137 double fRowScale, bool bPageMode, bool bFormulaMode,
2138 const ScMarkData* pMarkData = nullptr );
2143 void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2144 bool bKeepQuery, bool bUpdateRefs,
2145 ScProgress* pProgress, sc::ReorderParam* pUndo );
2147 void Reorder( const sc::ReorderParam& rParam );
2149 void PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
2150 SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2151 SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2152 OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab);
2160 void GetFilterEntries( SCCOL nCol, SCROW nRow,
2161 SCTAB nTab, ScFilterEntries& rFilterEntries );
2163 SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2164 SCTAB nTab, bool bCaseSens,
2165 ScFilterEntries& rFilterEntries );
2167 void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2168 std::vector<ScTypedStrData>& rStrings, bool bValidation = false );
2169 void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2171 bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2172 void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2174 SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2175 SCTAB nTab );
2176 SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2177 SCTAB nTab );
2179 SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2180 void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2182 SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2184 bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2185 bool bInSel, const ScMarkData& rMark) const;
2187 void ReplaceStyle( const SvxSearchItem& rSearchItem,
2188 SCCOL nCol, SCROW nRow, SCTAB nTab,
2189 const ScMarkData& rMark);
2191 void InvalidateTextWidth( std::u16string_view rStyleName );
2192 void InvalidateTextWidth( SCTAB nTab );
2193 void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2195 bool IdleCalcTextWidth();
2197 void RepaintRange( const ScRange& rRange );
2198 void RepaintRange( const ScRangeList& rRange );
2200 bool IsIdleEnabled() const { return mbIdleEnabled; }
2201 void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2203 bool IsDetectiveDirty() const { return bDetectiveDirty; }
2204 void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2215 // for broadcasting/listening
2218 void SetLoadingMedium( bool bVal );
2219 SC_DLLPUBLIC void SetImportingXML( bool bVal );
2220 bool IsImportingXML() const { return bImportingXML; }
2221 bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2222 void SetNoListening( bool bVal ) { bNoListening = bVal; }
2223 bool GetNoListening() const { return bNoListening; }
2224 ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2227 void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2228 bool bSetChartRangeLists );
2229 void UpdateChart( const OUString& rName );
2230 void RestoreChartListener( const OUString& rName );
2234 void AddOLEObjectToCollection(const OUString& rName);
2239 const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2240 void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2243 bool IsValidAsianCompression() const;
2246 bool GetAsianKerning() const;
2247 bool IsValidAsianKerning() const;
2248 void SetAsianKerning(bool bNew);
2251 EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2254 void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2258 void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2259 SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2260 svl::SharedStringPool* pPool = nullptr) const;
2270 void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2272 void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2273 void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2280 void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2281 void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2283 std::set<Color> GetDocColors();
2286 std::set<SCCOL> QueryColumnsWithFormulaCells( SCTAB nTab ) const;
2294 void CheckIntegrity( SCTAB nTab ) const;
2297 ScDocument(const ScDocument& r) = delete;
2299 void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2300 SCCOL nX1, SCCOL nX2 ) const;
2302 sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2303 ScDocument& rOtherDoc,
2304 SCROW nOtherRow, SCTAB nOtherTab,
2305 SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2306 sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2307 ScDocument& rOtherDoc,
2308 SCCOL nOtherCol, SCTAB nOtherTab,
2309 SCROW nMaxRow, const SCCOLROW* pOtherRows );
2310 void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2311 bool bColumns,
2312 ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2313 SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2314 ScProgress* pProgress, sal_uInt64 nProAdd );
2316 DECL_LINK(TrackTimeHdl, Timer *, void);
2333 bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2334 bool& o_bEntirelyOutOfBounds ) const;
2337 void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2339 void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2345 void Broadcast( const ScHint& rHint );
2347 void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2350 void AreaBroadcast( const ScHint& rHint );
2351 void DelBroadcastAreasInRange( const ScRange& rRange );
2352 void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2353 const ScRange& rRange,
2354 SCCOL nDx, SCROW nDy, SCTAB nDz );
2356 void StartListeningCell( const ScAddress& rAddress,
2357 SvtListener* pListener );
2358 void EndListeningCell( const ScAddress& rAddress,
2359 SvtListener* pListener );
2361 void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2362 void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2364 void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2366 void PutInFormulaTree( ScFormulaCell* pCell );
2367 void RemoveFromFormulaTree( ScFormulaCell* pCell );
2382 SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2383 void ClearFormulaTree();
2384 void AppendToFormulaTrack( ScFormulaCell* pCell );
2386 void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2389 void FinalTrackFormulas( SfxHintId nHintId );
2391 inline bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2392 inline bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2395 void StartAllListeners();
2396 void StartNeededListeners();
2397 void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2398 SC_DLLPUBLIC void StartAllListeners( const ScRange& rRange );
2400 void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2401 sal_uInt64 GetFormulaCodeInTree() const { return nFormulaCodeInTree; }
2403 bool IsInInterpreter() const { return nInterpretLevel != 0; }
2406 {
2408 if ( nInterpretLevel < USHRT_MAX )
2410 }
2412 {
2414 if ( nInterpretLevel )
2416 }
2417 sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2419 {
2421 if ( nMacroInterpretLevel < USHRT_MAX )
2423 }
2425 {
2429 }
2432 {
2433 if ( nInterpreterTableOpLevel < USHRT_MAX )
2435 }
2437 {
2440 }
2442 // add a formula to be remembered for TableOp broadcasts
2446 bool IsInDtorClear() const { return bInDtorClear; }
2447 void SetExpandRefs( bool bVal );
2448 bool IsExpandRefs() const { return bExpandRefs; }
2451 void IncXMLImportedFormulaCount( sal_uInt64 nVal )
2452 {
2455 }
2456 void DecXMLImportedFormulaCount( sal_uInt64 nVal )
2457 {
2458 if ( nVal <= nXMLImportedFormulaCount )
2460 else
2462 }
2464 void StartTrackTimer();
2466 void CompileDBFormula();
2473 sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2474 SCROW nRowStart, SCROW nRowEnd,
2475 rtl_TextEncoding eCharSet ) const;
2479 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2480 SCTAB nTab, SCCOL nCol,
2481 SCROW nRowStart, SCROW nRowEnd ) const;
2483 void KeyInput(); // TimerDelays etc.
2485 ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2489 SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2491 void StartChangeTracking();
2492 void EndChangeTracking();
2494 SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2496 void AddUnoObject( SfxListener& rObject );
2497 void RemoveUnoObject( SfxListener& rObject );
2498 void BroadcastUno( const SfxHint &rHint );
2499 void AddUnoListenerCall( const css::uno::Reference<
2500 css::util::XModifyListener >& rListener,
2501 const css::lang::EventObject& rEvent );
2503 void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2504 bool IsInLinkUpdate() const; // including DdeLink
2511 std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2512 { return pRefreshTimerControl; }
2515 { bPastingDrawFromOtherDoc = bVal; }
2517 { return bPastingDrawFromOtherDoc; }
2520 sal_uInt32 GetDocumentID() const;
2523 void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2524 void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2526 void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2527 { mxVbaEvents = rxVbaEvents; }
2528 const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2535 bool IsInVBAMode() const;
2538 void AddSubTotalCell(ScFormulaCell* pCell);
2539 void RemoveSubTotalCell(ScFormulaCell* pCell);
2540 void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2542 sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2544 SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2545 void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2546 void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2558 void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2559 void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2560 SC_DLLPUBLIC void RegroupFormulaCells( const ScRange& range );
2566 bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2567#ifdef DBG_UTIL
2568 void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2575 void PrepareFormulaCalc();
2591 SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2593 SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2594 const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2595 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2597 std::optional<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2598 void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2600 SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2601 SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2604 SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2608 SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2611 SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2612 const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2613 void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2614 void SwapNonEmpty( sc::TableValues& rValues );
2615 void finalizeOutlineImport();
2616 bool TableExists( SCTAB nTab ) const;
2618 // Returns the given column range, first allocating all the columns if necessary.
2620 // Returns a column range, clamped to the allocated columns.
2621 SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2622 // Returns the given range, without any adjustments. One of the variants above may return
2623 // a smaller range (better performance) if the use case is known.
2624 SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2626 bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2627 void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2629 bool IsInLayoutStrings() const { return mbLayoutStrings; }
2630 void SetLayoutStrings(bool bSet) { mbLayoutStrings = bSet; }
2640 OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2642 SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2643 SCROW GetLOKFreezeRow(SCTAB nTab) const;
2644 bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2645 bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2655 {
2656 public:
2657 explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2660 private:
2662 };
2664 void MergeNumberFormatter(const ScDocument& rSrcDoc);
2666 void ImplCreateOptions(); // Suggestion: switch to on-demand?
2667 void ImplDeleteOptions();
2669 void DeleteDrawLayer();
2670 SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2672 void UpdateDrawPrinter();
2673 void UpdateDrawLanguages();
2674 SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2676 void LoadDdeLinks(SvStream& rStream);
2677 void SaveDdeLinks(SvStream& rStream) const;
2679 void DeleteAreaLinksOnTab( SCTAB nTab );
2680 void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2681 const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2683 void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2685 bool HasPartOfMerged( const ScRange& rRange );
2688 ScTable* FetchTable( SCTAB nTab );
2689 const ScTable* FetchTable( SCTAB nTab ) const;
2695 std::map< SCTAB, ScSortParam > mSheetSortParams;
2697 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2698 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2699 void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2701 void SharePooledResources( const ScDocument* pSrcDoc );
2704 sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2707 sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2709 void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2710 void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2712 bool BroadcastHintInternal( const ScHint &rHint );
2715typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2724#ifndef NDEBUG
2726 : mnFlagRestore(rDocument.mnMutationGuardFlags)
2727 , mrDocument(rDocument)
2728 {
2729 assert((mnFlagRestore & nFlags) == 0);
2730 mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2731 }
2733 {
2735 }
2740 {
2741 (void)rDocument; (void)nFlags;
2742 }
2757#ifndef NDEBUG
2759 : mnFlags(static_cast<size_t>(nFlags))
2760 , mrDocument(rDocument)
2761 {
2762 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2763 }
2766 {
2767 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2768 }
2769 size_t mnFlags;
2773 {
2774 (void)rDocument; (void)nFlags;
2775 }
2785 : mrDoc(rDoc)
2786 {
2787 assert(!mrDoc.IsInDocShellRecalc());
2789 }
2792 {
2793 mrDoc.SetDocShellRecalc(false);
2794 }
2797/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool ValidColRow(SCCOL nCol, SCROW nRow, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:121
SCROW SanitizeRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:139
bool ValidAddress(const ScAddress &rAddress, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:488
bool ValidRange(const ScRange &rRange, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:786
Definition: address.hxx:95
SCCOL SanitizeCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:133
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab, SCCOL nMaxCol, SCROW nMaxRow)
Definition: address.hxx:127
bool ValidRow(SCROW nRow, SCROW nMaxRow)
Definition: address.hxx:105
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
Definition: address.hxx:99
Definition: attrib.hxx:34
SCTAB Tab() const
Definition: address.hxx:283
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
BroadcastAreaSlots and their management, once per document.
Definition: bcaslot.hxx:246
Walk through all cells in an area.
Definition: dociter.hxx:208
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:22
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2784
ScDocument & mrDoc
Definition: document.hxx:2781
Accessor class to ScDocument.
Use this class as a locale variable to merge number formatter from another document,...
Definition: document.hxx:2655
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2474
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:505
void StartAllListeners()
Definition: documen7.cxx:588
bool IsInFormulaTree(const ScFormulaCell *pCell) const
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4128
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
Definition: documen3.cxx:432
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4604
void SetEmptyCell(const ScAddress &rPos)
Definition: document.cxx:3507
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2150
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd) const
Maximum string length of numerical cells of a column, e.g.
Definition: documen4.cxx:598
void UpdateAreaLinks()
Definition: documen8.cxx:1049
bool IsValidAsianKerning() const
Definition: documen9.cxx:652
std::unique_ptr< sc::ExternalDataMapper > mpDataMapper
Definition: document.hxx:402
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
Definition: documen7.cxx:530
void CompileAll()
Definition: document.cxx:4014
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:471
void FinalTrackFormulas(SfxHintId nHintId)
Definition: documen7.cxx:509
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:905
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4548
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:628
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:3451
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1417
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5087
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:897
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4976
bool IsUndo() const
Definition: document.hxx:1589
SC_DLLPUBLIC ScColumnsRange GetWritableColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd)
Definition: document.cxx:2559
SCTAB GetVisibleTab() const
Definition: document.hxx:878
bool bAutoCalc
Definition: document.hxx:486
bool SetDdeLinkResultMatrix(size_t nDdePos, const ScMatrixRef &pResults)
Sets a result matrix for the specified DDE link.
Definition: documen8.cxx:1024
std::shared_ptr< svl::SharedStringPool > mpCellStringPool
Definition: document.hxx:359
Definition: document.hxx:482
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4218
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
Definition: documen3.cxx:1143
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
Definition: document.cxx:6618
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:196
void SetTrackFormulasPending()
Definition: document.hxx:2387
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:583
SC_DLLPUBLIC void CopyFromClip(const ScRange &rDestRange, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pRefUndoDoc, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipEmptyCells=false, const ScRangeList *pDestRanges=nullptr)
Paste data from a clipboard document into this document.
Definition: document.cxx:2850
bool bDelayedDeletingBroadcasters
Definition: document.hxx:530
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:378
void ModifyStyleSheet(SfxStyleSheetBase &rPageStyle, const SfxItemSet &rChanges)
Definition: documen8.cxx:210
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4588
SC_DLLPUBLIC ~ScDocument()
Definition: documen2.cxx:339
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3684
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:146
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1418
std::set< SCCOL > QueryColumnsWithFormulaCells(SCTAB nTab) const
css::uno::Reference< css::chart2::XChartDocument > GetChartByName(std::u16string_view rChartName)
Definition: documen5.cxx:138
bool IsPrintEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bLeftIsEmpty=false, ScRange *pLastRange=nullptr, tools::Rectangle *pLastMM=nullptr) const
Definition: documen9.cxx:435
sc::MultiDataCellState HasMultipleDataCells(const ScRange &rRange) const
Check if the specified range contains either: 1) one non-empty cell, 2) more than one non-empty cells...
Definition: document10.cxx:41
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:404
void GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: documen3.cxx:1202
OUString maFileURL
Definition: document.hxx:418
bool GetAsianKerning() const
Definition: documen9.cxx:657
bool BroadcastHintInternal(const ScHint &rHint)
Definition: documen7.cxx:137
void EnableDelayStartListeningFormulaCells(ScColumn *column, bool delay)
If set, ScColumn::StartListeningFormulaCells() calls may be delayed using CanDelayStartListeningFormu...
Definition: document10.cxx:401
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1275
bool IsInFormulaTrack(const ScFormulaCell *pCell) const
void IncInterpreterTableOpLevel()
Definition: document.hxx:2431
ScFormulaCell * pFormulaTree
Definition: document.hxx:385
void InvalidateTextWidth(std::u16string_view rStyleName)
Definition: documen8.cxx:295
void AddOLEObjectToCollection(const OUString &rName)
Definition: documen5.cxx:648
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:5830
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:622
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
Definition: document.cxx:5529
void SC_DLLPUBLIC SetFormulaResults(const ScAddress &rTopPos, const double *pResults, size_t nLen)
Set an array of numerical formula results to a group of contiguous formula cells.
Definition: documen8.cxx:402
void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc)
Definition: document.cxx:2082
std::unique_ptr< SvMemoryStream > pClipData
Definition: document.hxx:391
bool bInLinkUpdate
Definition: document.hxx:509
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:426
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1805
const OUString & GetFileURL() const
Definition: document.hxx:610
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5773
bool IsStreamValidLocked() const
Definition: document.hxx:989
SC_DLLPUBLIC void SetChangeTrack(std::unique_ptr< ScChangeTrack > pTrack)
only for import filter, deletes any existing ChangeTrack via EndChangeTracking() and takes ownership ...
Definition: documen2.cxx:287
ScLkUpdMode eLinkMode
Definition: document.hxx:484
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1716
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
Definition: documen2.cxx:1107
bool bForcedFormulaPending
Definition: document.hxx:491
void IncMacroInterpretLevel()
Definition: document.hxx:2418
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:440
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:568
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2492
bool IsCalcingAfterLoad() const
Definition: document.hxx:2221
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4177
SC_DLLPUBLIC sal_uInt64 GetCellCount() const
Definition: document.cxx:6244
void ClosingClipboardSource()
To be called at the clipboard document when closing a document that is the current clipboard source t...
Definition: documen2.cxx:331
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:747
bool bPastingDrawFromOtherDoc
Definition: document.hxx:537
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
Definition: document.cxx:6158
bool IsInInterpreterTableOp() const
Definition: document.hxx:2430
void SetValues(const ScAddress &rPos, const std::vector< double > &rVals)
Definition: document10.cxx:158
static sal_uInt16 GetSrcVersion()
Definition: document.hxx:2130
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3558
bool IsInDocShellRecalc() const
Definition: document.hxx:2626
void SC_DLLPUBLIC GetSortParam(ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2135
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:368
SC_DLLPUBLIC OUString GetLinkTab(SCTAB nTab) const
Definition: documen3.cxx:532
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2510
bool ValidRow(SCROW nRow) const
Definition: document.hxx:899
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) const
Definition: documen3.cxx:1922
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1083
void UpdateDrawPrinter()
Definition: documen9.cxx:185
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:501
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6882
SC_DLLPUBLIC void EnableUserInteraction(bool bVal)
Definition: document.cxx:6595
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:960
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1750
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:325
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6330
SCTAB nVisibleTab
Definition: document.hxx:480
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5964
SC_DLLPUBLIC void CopyUpdated(ScDocument *pPosDoc, ScDocument *pDestDoc)
From this document this method copies the cells of positions at which there are also cells in pPosDoc...
Definition: documen3.cxx:803
bool FindRangeNamesReferencingSheet(sc::UpdatedRangeNames &rIndexes, SCTAB nTokenTab, const sal_uInt16 nTokenIndex, SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement, bool bSameDoc, int nRecursion) const
Recursively find all named expressions that directly or indirectly (nested) reference a given sheet,...
Definition: document10.cxx:594
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4710
bool bInDtorClear
Definition: document.hxx:514
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:757
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1483
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:176
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:930
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2543
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:656
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1902
bool IsFinalTrackFormulas() const
Definition: document.hxx:2390
void SetRangeName(SCTAB nTab, std::unique_ptr< ScRangeName > pNew)
Definition: documen3.cxx:183
std::unique_ptr< ScUnoListenerCalls > pUnoListenerCalls
Definition: document.hxx:395
bool HasSelectionData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Returns true, if there is any data to create a selection list for rPos.
Definition: document.cxx:3837
SC_DLLPUBLIC void Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScProgress *pProgress, const ScMarkData &rMark, sal_uInt64 nFillCount, FillDir eFillDir=FILL_TO_BOTTOM, FillCmd eFillCmd=FILL_LINEAR, FillDateCmd eFillDateCmd=FILL_DAY, double nStepValue=1.0, double nMaxValue=1E307)
Definition: documen3.cxx:1156
svl::SharedString GetSharedString(const ScAddress &rPos) const
Definition: document.cxx:3566
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5669
bool IsDetectiveDirty() const
Definition: document.hxx:2203
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
Definition: documen2.cxx:1089
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6737
bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab)
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:259
void CopyBlockFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW nDy)
Definition: document.cxx:2669
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1210
ScClipParam & GetClipParam()
Definition: document.cxx:2599
SC_DLLPUBLIC void UpdateChartListenerCollection()
Definition: documen5.cxx:573
SC_DLLPUBLIC tools::Long GetColOffset(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4281
SCROW CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow, SCROW nClipEndRow)
Definition: document.cxx:2772
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:593
std::unique_ptr< ScClipOptions > mpClipOptions
Definition: document.hxx:425
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:448
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2612
bool bLinkFormulaNeedingCheck
Definition: document.hxx:532
void PrepareQuery(SCTAB nTab, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1461
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:262
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:438
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(ScAddress const &rAddress) const
Definition: document.hxx:843
std::unique_ptr< ScDocOptions > pDocOptions
Definition: document.hxx:423
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:371
EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const
Definition: documen8.cxx:355
SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
Definition: document.cxx:2569
bool HasStringWeakCharacters(const OUString &rString)
Definition: documen6.cxx:51
SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam &rParam, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark)
Definition: documen4.cxx:356
tools::Long GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale) const
Definition: document.cxx:4255
std::unique_ptr< ScDBData > mpAnonymousDBData
Definition: document.hxx:401
void InvalidateTableArea()
Definition: documen4.cxx:577
void BeginDrawUndo()
Definition: documen9.cxx:60
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
Definition: document10.cxx:319
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4067
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1913
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:98
sal_uInt64 GetFormulaCodeInTree() const
Definition: document.hxx:2401
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:6783
void SetDetectiveDirty(bool bSet)
Definition: document.hxx:2204
bool IsIdleEnabled() const
Definition: document.hxx:2200
LanguageType eCtlLanguage
Definition: document.hxx:453
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:7011
ScRange aEmbedRange
Definition: document.hxx:437
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:375
ScRangePairList * GetRowNameRanges()
Definition: document.hxx:819
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:61
ScStyleSheet * pPreviewCellStyle
Definition: document.hxx:431
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
Definition: document.cxx:4524
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:855
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:774
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:966
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
Definition: document.cxx:1042
void DecInterpreterTableOpLevel()
Definition: document.hxx:2436
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:510
void EnableDelayDeletingBroadcasters(bool set)
If set, cells will not delete their empty broadcasters, avoiding possible extensive mdds vector chang...
Definition: document10.cxx:449
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6324
bool SetFormulaCells(const ScAddress &rPos, std::vector< ScFormulaCell * > &rCells)
Definition: documen2.cxx:1118
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
Definition: document.cxx:5453
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:466
Definition: document.hxx:891
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2526
void IncInDdeLinkUpdate()
Definition: document.hxx:1041
bool mbFinalTrackFormulas
Definition: document.hxx:570
std::unique_ptr< SfxItemSet > pPreviewFont
Definition: document.hxx:430
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:879
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:391
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:382
void finalizeOutlineImport()
Definition: document10.cxx:585
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:520
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:464
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:437
std::vector< ScTableUniquePtr > TableContainer
Definition: document.hxx:346
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: documen2.cxx:641
size_t GetNoteCount(SCTAB nTab, SCCOL nCol) const
Definition: document.cxx:6846
void SharePooledResources(const ScDocument *pSrcDoc)
Definition: document10.cxx:330
bool IsClipboard() const
Definition: document.hxx:1590
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
Definition: documen3.cxx:322
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:346
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4629
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6342
std::unique_ptr< ScSortedRangeCacheMap > mxScSortedRangeCache
Definition: document.hxx:475
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:863
const ScSheetEvents * GetSheetEvents(SCTAB nTab) const
Definition: documen3.cxx:663
ScInterpreterTableOpParams aLastTableOpParams
Definition: document.hxx:447
void EnsureGraphicNames()
Definition: documen9.cxx:393
std::unique_ptr< ScFormulaParserPool > mxFormulaParserPool
Definition: document.hxx:414
SC_DLLPUBLIC SCROW GetMaxRowCount() const
Definition: document.hxx:894
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:926
SC_DLLPUBLIC void DoMergeContents(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:2036
static const sal_uInt16 nSrcVer
Definition: document.hxx:477
void AppendTabOnLoad(const OUString &rName)
Definition: document.cxx:473
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2393
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:592
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:544
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:525
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4564
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4556
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1791
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi)
Definition: document.cxx:4323
rtl::Reference< ScPoolHelper > mxPoolHelper
Definition: document.hxx:357
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:377
void DiscardFormulaGroupContext()
Definition: document.cxx:3583
SC_DLLPUBLIC void CopyStaticToDocument(const ScRange &rSrcRange, SCTAB nDestTab, ScDocument &rDestDoc)
Copy only raw cell values to another document.
Definition: document.cxx:2243
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6418
SCROW GetRowForHeight(SCTAB nTab, tools::Long nHeight) const
Given the height i.e.
Definition: document.cxx:4250
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3354
sal_uInt8 nAsianKerning
Definition: document.hxx:535
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:3488
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:218
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2132
sal_uInt16 nInterpretLevel
Definition: document.hxx:462
ScInterpreterContext maInterpreterContext
Definition: document.hxx:472
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
Definition: document.cxx:336
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6163
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:559
sal_Int32 mnImagePreferredDPI
Definition: document.hxx:565
DECL_LINK(TrackTimeHdl, Timer *, void)
bool IsCutMode()
Definition: document.cxx:2059
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4857
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1216
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:903
const SfxPoolItem * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: documen4.cxx:758
void InvalidateLastTableOpParams()
Definition: document.hxx:2444
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:320
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:724
void DecXMLImportedFormulaCount(sal_uInt64 nVal)
Definition: document.hxx:2456
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:494
ScRangeData * FindRangeNameBySheetAndIndex(SCTAB nTab, sal_uInt16 nIndex) const
Find a named expression / range name in either global or a local scope.
Definition: documen3.cxx:269
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:389
Definition: document.hxx:892
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4968
bool IsAdjustHeightLocked() const
Definition: document.hxx:1595
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:360
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4572
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:901
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6412
void BeginUnoRefUndo()
Definition: documen3.cxx:990
SC_DLLPUBLIC void CompareDocument(ScDocument &rOtherDoc)
Definition: documen4.cxx:1103
bool IsPageStyleInUse(std::u16string_view rStrPageStyle, SCTAB *pInTab)
Definition: documen8.cxx:310
SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow)
Definition: document.cxx:4361
SC_DLLPUBLIC void CopyStdStylesFrom(const ScDocument &rSrcDoc)
Definition: documen8.cxx:288
void RemoveFromFormulaTree(ScFormulaCell *pCell)
Definition: documen7.cxx:287
std::unique_ptr< ScChangeViewSettings > pChangeViewSettings
Definition: document.hxx:397
ScValidationDataList * GetValidationList()
Definition: document.hxx:1873
SC_DLLPUBLIC void CheckLinkFormulaNeedingCheck(const ScTokenArray &rCode)
Check token array and set link check if ocDde/ocWebservice is contained.
Definition: documen8.cxx:1154
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
Definition: documen2.cxx:113
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
Definition: document.cxx:331
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3574
SC_DLLPUBLIC void GetChartRanges(std::u16string_view rChartName, std::vector< ScRangeList > &rRanges, const ScDocument &rSheetNameDoc)
Definition: documen5.cxx:168
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
Definition: documen2.cxx:476
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
Definition: document.cxx:4478
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1845
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:554
rtl::Reference< XColorList > pColorList
Definition: document.hxx:374
std::unique_ptr< ScMacroManager > mpMacroMgr
Definition: document.hxx:410
SCROW GetLastChangedRowFlagsWidth(SCTAB nTab) const
Definition: document.cxx:4643
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:1002
void SetTableOpDirty(const ScRange &)
Definition: document.cxx:3918
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4083
std::vector< ScInterpreterTableOpParams * > m_TableOpList
list of ScInterpreterTableOpParams currently in use
Definition: document.hxx:446
SC_DLLPUBLIC void DoMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bDeleteCaptions=true)
Definition: documen3.cxx:2073
bool mbEmbedUsedFontsOnly
Definition: document.hxx:560
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3670
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:288
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
Definition: document.hxx:2226
bool ContainsNotesInRange(const ScRangeList &rRange) const
Definition: document.cxx:7016
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:1008
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:158
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6723
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:780
ScSortedRangeCache & GetSortedRangeCache(const ScRange &rRange, const ScQueryParam &param, ScInterpreterContext *pContext)
Definition: documen2.cxx:1199
bool IsEmbedFonts() const
Definition: document.hxx:582
bool HasDetectiveOperations() const
Definition: documen4.cxx:895
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:900
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:72
bool bHasForcedFormulas
Definition: document.hxx:512
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2511
bool mbFormulaGroupCxtBlockDiscard
Definition: document.hxx:363
SC_DLLPUBLIC sc::Sparkline * CreateSparkline(ScAddress const &rPosition, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
Definition: document.cxx:6634
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:889
void CompileXML()
Definition: document.cxx:4027
SC_DLLPUBLIC const ScDrawLayer * GetDrawLayer() const
Definition: document.hxx:1083
std::unique_ptr< ScAutoNameCache > pAutoNameCache
Definition: document.hxx:428
bool HasClipFilteredRows()
Definition: document.cxx:3245
SCROW GetNextDifferentChangedRowFlagsWidth(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4668
SC_DLLPUBLIC void TransposeClip(ScDocument *pTransClip, InsertDeleteFlags nFlags, bool bAsLink, bool bIncludeFiltered)
Definition: document.cxx:2324
SC_DLLPUBLIC void SetPrintEntireSheet(SCTAB nTab)
Marks the specified sheet to be printed completely.
Definition: document.cxx:6424
SC_DLLPUBLIC bool CreateDdeLink(const OUString &rAppl, const OUString &rTopic, const OUString &rItem, sal_uInt8 nMode, const ScMatrixRef &pResults)
Tries to find a DDE link or creates a new, if not extant.
Definition: documen8.cxx:993
CharCompressType GetAsianCompression() const
Definition: documen9.cxx:635
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:992
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:338
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:354
SC_DLLPUBLIC sal_Int16 GetNamedRangesLockCount() const
Definition: document.hxx:1604
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1043
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6388
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2661
SC_DLLPUBLIC void EnableUndo(bool bVal)
Definition: document.cxx:6579
SfxBindings * GetViewBindings()
Definition: documen8.cxx:1188
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1825
std::unique_ptr< ScPatternAttr > pSelectionAttr
Definition: document.hxx:384
std::set< Color > GetDocColors()
Definition: document10.cxx:185
ScLookupCache & GetLookupCache(const ScRange &rRange, ScInterpreterContext *pContext)
Creates a ScLookupCache cache for the range if it doesn't already exist.
Definition: documen2.cxx:1176
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1384
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:394
bool IsDelayedDeletingBroadcasters() const
Definition: document.hxx:1435
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated.
Definition: document.cxx:2486
void KeyInput()
Definition: documen8.cxx:1180
void MergeContextBackIntoNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7061
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:6034
bool HasFormulaCell(const ScRange &rRange) const
Check if there is at least one formula cell in specified range.
Definition: document10.cxx:462
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6283
SC_DLLPUBLIC void PreprocessDBDataUpdate()
Definition: document10.cxx:307
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
Definition: documen3.cxx:1952
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:867
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4454
void AddTableOpFormulaCell(ScFormulaCell *)
Definition: document.cxx:3970
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1004
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4930
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
Definition: documen2.cxx:250
bool mbExecuteLinkEnabled
Definition: document.hxx:549
void DelayFormulaGrouping(bool delay)
If set, joining cells into shared formula groups will be delayed until reset again (RegroupFormulaCel...
Definition: document10.cxx:380
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5076
void RepaintRange(const ScRange &rRange)
Definition: documen8.cxx:689
SC_DLLPUBLIC double RoundValueAsShown(double fVal, sal_uInt32 nFormat, const ScInterpreterContext *pContext=nullptr) const
Definition: documen4.cxx:634
SC_DLLPUBLIC SCROW GetLastDataRow(SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow) const
Return the last non-empty row position in given columns that's no greater than the initial last row p...
Definition: document.cxx:1087
ScInterpreterContext & GetNonThreadedContext() const
Definition: document.hxx:616
SC_DLLPUBLIC void PreprocessRangeNameUpdate()
Definition: document10.cxx:295
void SetLayoutStrings(bool bSet)
Definition: document.hxx:2630
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3161
bool IsEmbedFontScriptComplex() const
Definition: document.hxx:586
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:516
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2532
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:375
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:811
bool IsDocEditable() const
Definition: documen3.cxx:1907
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1130
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Shrink a range to only include used data area.
Definition: document.cxx:1073
void RemoveLookupCache(ScLookupCache &rCache)
Only ScLookupCache dtor uses RemoveLookupCache(), do not use elsewhere!
Definition: documen2.cxx:1229
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4416
ScRangePairListRef xRowNameRanges
Definition: document.hxx:420
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
Definition: document.cxx:6500
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6533
SC_DLLPUBLIC SvtScriptType GetStringScriptType(const OUString &rString)
Definition: documen6.cxx:76
bool bImportingXML
Definition: document.hxx:504
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:627
SC_DLLPUBLIC sal_uInt16 GetOriginalHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4210
bool IsInLayoutStrings() const
Definition: document.hxx:2629
sal_Int32 GetMaxStringLen(SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Maximum string length of a column, e.g.
Definition: documen4.cxx:589
SC_DLLPUBLIC OutputDevice * GetRefDevice()
Definition: documen8.cxx:199
SC_DLLPUBLIC OUString MaxRowAsString() const
Definition: document.hxx:895
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx:485
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:686
void UpdateExternalRefLinks(weld::Window *pWin)
Definition: documen8.cxx:789
SC_DLLPUBLIC bool DeleteSparkline(ScAddress const &rPosition)
Definition: document.cxx:6646
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1135
size_t mnMutationGuardFlags
Definition: document.hxx:576
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:7032
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:996
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:468
SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap &rRangeNames) const
Get all range names that are local to each table.
Definition: documen3.cxx:102
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:276
bool IsEmbedded() const
Definition: document.hxx:951
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
Definition: document.hxx:360
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1421
sal_uInt32 nAdjustHeightLock
Definition: document.hxx:543
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1599
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1117
ScFormulaCell * pEOFormulaTree
Definition: document.hxx:386
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.
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2090
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:505
SCROW GetHiddenRowCount(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4273
bool mbIdleEnabled
Definition: document.hxx:508
SC_DLLPUBLIC void GetFilterEntriesArea(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, ScFilterEntries &rFilterEntries)
Entries for Filter dialog.
Definition: documen3.cxx:1613
ScRangePairListRef & GetRowNameRangesRef()
Definition: document.hxx:821
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1938
void UnshareFormulaCells(SCTAB nTab, SCCOL nCol, std::vector< SCROW > &rRows)
Make specified formula cells non-grouped.
Definition: document10.cxx:355
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
Definition: document.cxx:935
void AddDelayedFormulaGroupingCell(const ScFormulaCell *cell)
To be used only by SharedFormulaUtil::joinFormulaCells().
Definition: document10.cxx:395
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:229
void StylesToNames()
Definition: document.cxx:6231
void ReservePatternCount(SCTAB nTab, SCCOL nCol, SCSIZE nReserve)
Definition: documen3.cxx:2129
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3286
SC_DLLPUBLIC void CopyToClip(const ScClipParam &rClipParam, ScDocument *pClipDoc, const ScMarkData *pMarks, bool bKeepScenarioFlags, bool bIncludeObjects)
Definition: document.cxx:2171
bool IsInLinkUpdate() const
Definition: documen8.cxx:784
bool mbTrackFormulasPending
Definition: document.hxx:569
ScDocument(const ScDocument &r)=delete
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1961
SC_DLLPUBLIC void DoEmptyBlock(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:2060
SC_DLLPUBLIC const ScMatrix * GetDdeLinkResultMatrix(size_t nDdePos) const
Returns the result matrix of the specified DDE link.
Definition: documen8.cxx:987
void AddUnoObject(SfxListener &rObject)
Definition: documen3.cxx:901
bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab)
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4158
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1602
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6218
bool GetNoListening() const
Definition: document.hxx:2223
void SetDocShellRecalc(bool bSet)
Definition: document.hxx:2627
void AddSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6507
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:7039
bool mbUserInteractionEnabled
Definition: document.hxx:552
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4834
void ResetCalcNotifications()
Definition: documen3.cxx:731
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:412
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2206
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:776
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:591
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
Definition: documen2.cxx:466
std::unique_ptr< ScDetOpList > pDetOpList
Definition: document.hxx:392
void SetCondFormList(ScConditionalFormatList *pList, SCTAB nTab)
Definition: documen4.cxx:875
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
Definition: documen2.cxx:1143
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4355
void Broadcast(const ScHint &rHint)
Broadcast wrapper, calls rHint.GetCell()->Broadcast() and AreaBroadcast() and TrackFormulas() Preferr...
Definition: documen7.cxx:117
SC_DLLPUBLIC bool CreateQueryParam(const ScRange &rRange, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1489
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1409
SCCOL GetLastChangedColFlagsWidth(SCTAB nTab) const
Definition: document.cxx:4636
OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1481
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3796
void SetCodeName(const OUString &r)
Definition: document.hxx:609
SC_DLLPUBLIC void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6979
bool IsValidAsianCompression() const
Definition: documen9.cxx:630
void SetEmbedFonts(bool bUse)
Definition: document.hxx:588
bool IsInVBAMode() const
Definition: document.cxx:6600
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uLong nIndex) const
Definition: documen4.cxx:881
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4821
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
Definition: documen3.cxx:1980
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5125
SC_DLLPUBLIC void InitUndoSelected(const ScDocument &rSrcDoc, const ScMarkData &rTabSelection, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:1972
SC_DLLPUBLIC void CalcFormulaTree(bool bOnlyForced=false, bool bProgressBar=true, bool bSetAllDirty=true)
Calculate formula cells that are on the formula tree either partially, or in full.
Definition: documen7.cxx:334
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: document.cxx:5044
bool bLoadingMedium
Definition: document.hxx:503
ScChangeViewSettings * GetChangeViewSettings() const
Definition: document.hxx:2236
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:424
bool HasRangeOverflow() const
Definition: document.hxx:2212
SC_DLLPUBLIC std::unique_ptr< ScPostIt > ReleaseNote(const ScAddress &rPos)
Definition: document.cxx:6822
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3730
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3420
void StartTrackTimer()
Definition: documen2.cxx:325
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6452
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:549
ScRangePairList * GetColNameRanges()
Definition: document.hxx:818
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1561
void StartChangeTracking()
Definition: documen2.cxx:276
bool bExpandRefs
Definition: document.hxx:519
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4952
TableContainer maTabs
Definition: document.hxx:377
SC_DLLPUBLIC bool HasSparkline(ScAddress const &rPosition)
Definition: document.cxx:6629
ScExtDocOptions * GetExtDocOptions()
Definition: document.hxx:643
SCCOL GetLOKFreezeCol(SCTAB nTab) const
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:490
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
Definition: documen5.cxx:529
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6295
void SetName(const OUString &r)
Definition: document.hxx:607
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:499
bool HasAnyCalcNotification() const
Definition: documen3.cxx:708
LanguageType eLanguage
Definition: document.hxx:451
bool bIsClip
Definition: document.hxx:493
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:927
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1125
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2004
bool IsFunctionAccess() const
Definition: document.hxx:1593
SC_DLLPUBLIC bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:81
void CopyRangeNamesToClip(ScDocument *pClipDoc, const ScRange &rClipRange, const ScMarkData *pMarks)
Definition: document.cxx:2455
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6359
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:665
bool bDetectiveDirty
Definition: document.hxx:521
void DeleteSelectionTab(SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData &rMark)
Definition: document.cxx:6092
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1338
bool mbLayoutStrings
Definition: document.hxx:574
SC_DLLPUBLIC void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: document.cxx:1888
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1534
std::unique_ptr< ScExternalRefManager > pExternalRefMgr
Definition: document.hxx:409
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3875
bool UpdateOutlineRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow)
Definition: documen3.cxx:1427
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
Definition: document.hxx:458
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:1372
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5719
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:215
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4202
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4120
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
Definition: documen2.cxx:619
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:267
sal_uInt8 nInDdeLinkUpdate
Definition: document.hxx:539
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2224
void GetSelectionFrame(const ScMarkData &rMark, SvxBoxItem &rLineOuter, SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5174
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1967
bool SearchAndReplace(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, SCTAB &rTab, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc=nullptr)
Definition: documen3.cxx:1310
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4431
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2528
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:195
void DeleteObjectsInSelection(const ScMarkData &rMark)
Definition: documen9.cxx:268
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1082
SC_DLLPUBLIC void ApplySelectionPattern(const ScPatternAttr &rAttr, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *pIsChanged=nullptr)
Definition: document.cxx:5977
SC_DLLPUBLIC bool GetHashCode(SCTAB nTab, sal_Int64 &rHashCode) const
Definition: document.cxx:202
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4367
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4596
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:946
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:4297
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4486
bool bIsFunctionAccess
Definition: document.hxx:495
void RemoveFromFormulaTrack(ScFormulaCell *pCell)
Definition: documen7.cxx:475
void ExtendMergeSel(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, const ScMarkData &rMark, bool bRefresh=false)
Definition: document.cxx:5641
bool bAutoCalcShellDisabled
Definition: document.hxx:487
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:393
HardRecalcState eHardRecalcState
Definition: document.hxx:479
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:368
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
Definition: document.cxx:4763
void SetDetOpList(std::unique_ptr< ScDetOpList > pNew)
Definition: documen4.cxx:913
sal_Int32 GetImagePreferredDPI()
Definition: document.hxx:595
void GetDataEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, std::vector< ScTypedStrData > &rStrings, bool bValidation=false)
Entries for selection list listbox (no numbers/formulas)
Definition: documen3.cxx:1627
SC_DLLPUBLIC CRFlags GetRowFlags(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4393
std::unique_ptr< ScChangeTrack > pChangeTrack
Definition: document.hxx:393
void SetPrinter(VclPtr< SfxPrinter > const &pNewPrinter)
Definition: documen8.cxx:142
SC_DLLPUBLIC std::shared_ptr< sc::SparklineGroup > SearchSparklineGroup(tools::Guid const &rGuid)
Definition: document.cxx:6702
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6915
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
Definition: documen2.cxx:1165
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6748
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:872
SC_DLLPUBLIC ScConditionalFormat * GetCondFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen4.cxx:844
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:762
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:616
SvNumberFormatterIndexTable * pFormatExchangeList
Definition: document.hxx:376
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4408
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::optional< ScRange > oNew)
Definition: document.cxx:6436
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4446
SC_DLLPUBLIC SfxUndoManager * GetUndoManager()
Definition: document.cxx:6485
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3740
OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType)
Serializes the specified sheet's geometry data.
std::unique_ptr< sc::IconSetBitmapMap > m_pIconSetBitmapMap
Definition: document.hxx:567
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1598
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
Definition: document10.cxx:203
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5271
void DeleteDrawLayer()
Definition: documen9.cxx:229
void SC_DLLPUBLIC SetSortParam(const ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2140
void AddUndoTab(SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2029
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:1008
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4385
void InvalidateStreamOnSave()
Definition: document.cxx:496
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:337
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1449
bool IdleCalcTextWidth()
Definition: documen8.cxx:532
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:364
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5429
void MarkUsedExternalReferences()
Definition: documen3.cxx:641
void StartListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:35
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:584
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2211
void EndListeningFormulaCells(std::vector< ScFormulaCell * > &rCells)
Definition: documen7.cxx:259
static thread_local ScDocumentThreadSpecific maThreadSpecific
Definition: document.hxx:470
SfxBroadcaster * GetDrawBroadcaster()
Definition: documen9.cxx:55
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2644
void EndListeningCell(const ScAddress &rAddress, SvtListener *pListener)
Definition: documen7.cxx:230
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
Definition: document.cxx:1031
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
Definition: document.hxx:396
SC_DLLPUBLIC const ScRangeData * GetRangeAtBlock(const ScRange &rBlock, OUString &rName, bool *pSheetLocal=nullptr) const
Definition: documen3.cxx:238
bool HasUnoRefUndo() const
Definition: document.hxx:1088
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1711
std::shared_mutex mScLookupMutex
Definition: document.hxx:474
bool IsClipOrUndo() const
Definition: document.hxx:1588
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1431
SC_DLLPUBLIC OUString GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bForceSystemLocale=false) const
Definition: document.cxx:3590
void DeleteObjectsInArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, bool bAnchored=false)
Definition: documen9.cxx:252
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:593
SCROW GetLOKFreezeRow(SCTAB nTab) const
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:717
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1082
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:2070
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4865
const ScConsolidateParam * GetConsolidateDlgData() const
Definition: document.hxx:653
SC_DLLPUBLIC void SetDocVisible(bool bSet)
Definition: documen2.cxx:260
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2516
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2113
ErrCode nRangeOverflowType
Definition: document.hxx:435
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:826
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3515
bool bIsEmbedded
Definition: document.hxx:498
SC_DLLPUBLIC void CopyDdeLinks(ScDocument &rDestDoc) const
Definition: documen8.cxx:866
void FindAreaPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, ScMoveDirection eDirection) const
Definition: document.cxx:6197
sal_uInt64 GetXMLImportedFormulaCount() const
Definition: document.hxx:2450
bool bIsUndo
Definition: document.hxx:494
bool IsChangeReadOnlyEnabled() const
Definition: document.hxx:1600
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:377
bool GetDdeLinkMode(size_t nDdePos, sal_uInt8 &rnMode) const
Returns the link mode of the specified DDE link.
Definition: documen8.cxx:977
void FindOrder(SCCOLROW *pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, bool bColumns, ScDocument &rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, SCCOLROW nEndCol, const SCCOLROW *pTranslate, ScProgress *pProgress, sal_uInt64 nProAdd)
Definition: documen4.cxx:1005
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4900
const OUString & GetCodeName() const
Definition: document.hxx:608
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:4840
bool IsEmbedFontScriptAsian() const
Definition: document.hxx:585
void GetDocStat(ScDocStat &rDocStat)
Definition: document.cxx:6351
void MergeNumberFormatter(const ScDocument &rSrcDoc)
Definition: document.cxx:2583
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:6022
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1194
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7055
ScMarkData maPreviewSelection
Definition: document.hxx:432
void EnableIdle(bool bDo)
Definition: document.hxx:2201
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
Definition: document.cxx:5856
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
Definition: document.cxx:170
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4146
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2217
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1856
void RemoveSortedRangeCache(ScSortedRangeCache &rCache)
Definition: documen2.cxx:1248
void SetPageSize(SCTAB nTab, const Size &rSize)
Definition: document.cxx:6303
sal_uInt64 nXMLImportedFormulaCount
Definition: document.hxx:461
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:66
void StopTemporaryChartLock()
Definition: documen3.cxx:406
bool IsForcedFormulaPending() const
Definition: document.hxx:1415
SC_DLLPUBLIC bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:788
void ConvertFormulaToValue(const ScRange &rRange, sc::TableValues *pUndo)
Definition: document10.cxx:209
void ImplDeleteOptions()
Definition: documen8.cxx:107
void UpdateBroadcastAreas(UpdateRefMode eUpdateRefMode, const ScRange &rRange, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen7.cxx:596
SC_DLLPUBLIC OUString MaxColAsString() const
Definition: document.hxx:896
void SaveDdeLinks(SvStream &rStream) const
Definition: documen8.cxx:709
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
Definition: document.cxx:4828
void CheckIntegrity(SCTAB nTab) const
Check the integrity of the internal table state.
SC_DLLPUBLIC ScDocProtection * GetDocProtection() const
Definition: documen3.cxx:1889
SfxObjectShell * GetDocumentShell() const
Definition: document.hxx:1081