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>
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 ScUndoManager;
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, 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, 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 // Returns false if some couldn't be interpreted (i.e. they still have NeedsInterpret()).
1367 // Useful to ensure that the given cells will not need interpreting.
1368 bool InterpretCellsIfNeeded( const ScRangeList& rRanges );
1369 SC_DLLPUBLIC void CalcAll();
1370 SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1371 void CompileAll();
1372 void CompileXML();
1384 bool CompileErrorCells(FormulaError nErrCode);
1387 void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1389 SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1391 void SetPreviewSelection( const ScMarkData& rSel );
1393 ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1395 SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1399 ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1400 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const ScQueryParam& param,
1401 ScInterpreterContext* pContext );
1404 void RemoveLookupCache( ScLookupCache & rCache );
1407 void ClearLookupCaches();
1409 // calculate automatically
1410 SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1411 SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1412 // calculate automatically in/from/for ScDocShell disabled
1415 // ForcedFormulas are to be calculated
1418 // if CalcFormulaTree() is currently running
1422 void DelayFormulaGrouping( bool delay );
1425 void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1429 void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1433 bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1436 void EnableDelayDeletingBroadcasters(bool set);
1439 FormulaError GetErrCode( const ScAddress& ) const;
1453 bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1474 bool ShrinkToUsedDataArea( bool& o_bShrunk,
1475 SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1476 SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1477 bool bStickyTopRow = false, bool bStickyLeftCol = false,
1478 ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
1490 SC_DLLPUBLIC SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1505 SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1506 SCCOL& rEndCol, SCROW& rEndRow,
1507 bool bIncludeOld, bool bOnlyDown ) const;
1516 bool GetDataAreaSubrange(ScRange& rRange) const;
1518 SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1519 SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1520 bool bCalcHiddens = false) const;
1521 SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1522 bool bNotes = true) const;
1523 SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1524 SCCOL& rEndCol ) const;
1525 SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1526 SCROW& rEndRow, bool bNotes ) const;
1527 void InvalidateTableArea();
1530 SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1532 SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1539 void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1540 SCCOL nStartCol, SCROW nStartRow,
1541 SCCOL& rEndCol, SCROW nEndRow ) const;
1542 SC_DLLPUBLIC bool IsEmptyData(SCCOL nStartCol, SCROW nStartRow,
1543 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const;
1544 // I think this returns the number of empty cells starting from the given direction.
1545 SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1546 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1547 ScDirection eDir );
1549 void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1550 SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1551 bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1552 SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1554 bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1555 const ScMarkData& rMark );
1557 void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1558 SCCOL& rEndCol, SCROW& rEndRow );
1559 void LimitChartIfAll( ScRangeListRef& rRangeList );
1561 bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1562 SCCOL nEndCol, SCTAB nEndTab,
1563 SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1564 const ScMarkData* pTabMark = nullptr );
1565 SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1566 void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1567 SCCOL nEndCol, SCTAB nEndTab,
1568 SCROW nStartRow, SCSIZE nSize,
1569 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1570 const ScMarkData* pTabMark = nullptr );
1571 SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1572 bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1573 SCROW nEndRow, SCTAB nEndTab,
1574 SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1575 const ScMarkData* pTabMark = nullptr );
1576 SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1577 void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1578 SCROW nEndRow, SCTAB nEndTab,
1579 SCCOL nStartCol, SCSIZE nSize,
1580 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1581 const ScMarkData* pTabMark = nullptr );
1582 void DeleteCol( const ScRange& rRange );
1584 bool CanInsertRow( const ScRange& rRange ) const;
1585 bool CanInsertCol( const ScRange& rRange ) const;
1587 void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1588 bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1590 bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1591 bool IsUndo() const { return bIsUndo; }
1592 bool IsClipboard() const { return bIsClip; }
1593 bool IsUndoEnabled() const { return mbUndoEnabled; }
1594 SC_DLLPUBLIC void EnableUndo( bool bVal );
1595 bool IsFunctionAccess() const { return bIsFunctionAccess; }
1597 bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1601 void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1603 void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1605 SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1608 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1609 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1610 void SetCutMode( bool bCut );
1611 bool IsCutMode();
1612 void SetClipArea( const ScRange& rArea, bool bCut = false );
1614 SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1615 SC_DLLPUBLIC void SetDocVisible( bool bSet );
1617 bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1619 void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1620 const ScMarkData& rMark, bool bAnchored = false );
1621 void DeleteObjectsInSelection( const ScMarkData& rMark );
1623 SC_DLLPUBLIC void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1624 InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1625 sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1627 SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1628 SCTAB nTab, InsertDeleteFlags nDelFlag);
1629 void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1631 SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1632 const ScMarkData* pMarks, bool bKeepScenarioFlags,
1633 bool bIncludeObjects );
1644 SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1653 void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1655 void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1656 SCTAB nTab, ScDocument* pClipDoc);
1661 sc::ColumnSpanSet& rBroadcastSpans );
1664 SCCOL nCol2, SCROW nRow2 );
1665 void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1666 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1667 SCCOL nDx, SCROW nDy );
1672 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, SCCOL nDx,
1673 SCROW& rClipStartRow, SCROW nClipEndRow);
1675 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1676 SCCOL nCol2, SCROW nRow2,
1677 const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1679 void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1680 const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1681 sc::ColumnSpanSet& rBroadcastSpans );
1695 const ScRange& rDestRange, const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1696 ScDocument* pRefUndoDoc, ScDocument* pClipDoc,
1697 bool bResetCut = true, bool bAsLink = false,
1698 bool bIncludeFiltered = true, bool bSkipEmptyCells = false,
1699 const ScRangeList* pDestRanges = nullptr );
1701 void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1702 InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1703 bool bResetCut = true, bool bAsLink = false,
1704 bool bIncludeFiltered = true,
1705 bool bSkipAttrForEmpty = false);
1707 void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1708 void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1710 bool HasClipFilteredRows();
1712 bool IsClipboardSource() const;
1714 SC_DLLPUBLIC void TransposeClip(ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink,
1715 bool bIncludeFiltered);
1718 void SetClipParam(const ScClipParam& rParam);
1727 void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1728 ScDocument& rSrcDoc );
1730 void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1731 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1732 bool bSkipEmpty, bool bAsLink );
1733 void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1734 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1735 bool bSkipEmpty, bool bAsLink );
1737 void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1739 SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1740 bool bColInfo = false, bool bRowInfo = false );
1741 void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1742 bool bColInfo = false, bool bRowInfo = false );
1743 SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1744 bool bColInfo = false, bool bRowInfo = false );
1746 // don't use anymore:
1747 void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1748 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1749 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1750 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1751 void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1752 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1753 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1755 SC_DLLPUBLIC void CopyToDocument(const ScRange& rRange,
1756 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1757 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1758 void UndoToDocument(const ScRange& rRange,
1759 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1761 void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1762 bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1763 void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1764 ScMarkData& rDestMark, bool bResetMark = true,
1765 ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1766 bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1767 SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1769 SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1772 pUndoDoc = nullptr, bool bIncludeDraw = true,
1773 bool bUpdateNoteCaptionPos = true );
1778 SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1779 const ScMarkData& rMark, ScDocument* pUndoDoc );
1781 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1783 SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1784 ScProgress* pProgress, const ScMarkData& rMark,
1785 sal_uInt64 nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1786 FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1787 double nStepValue = 1.0, double nMaxValue = 1E307 );
1788 OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1791 const ScAddress& rCursor, const ScMarkData& rMark,
1792 double& rResult );
1794 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1795 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1796 {
1797 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1798 }
1799 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich,
1800 SCROW& nStartRow, SCROW& nEndRow ) const;
1801 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich,
1802 SCROW& nStartRow, SCROW& nEndRow ) const
1803 {
1804 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich), nStartRow, nEndRow));
1805 }
1806 SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1807 template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1808 {
1809 return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1810 }
1811 SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1812 SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1813 SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1814 const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1815 std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1816 SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1817 void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1820 // pCell is an optimization, must point to rPos
1821 SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1822 ScRefCellValue* pCell = nullptr ) const;
1823 const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1824 const ScConditionalFormatList& rList,
1825 const ScCondFormatIndexes& rIndex ) const;
1826 const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1827 template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1828 {
1829 return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1830 }
1832 SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1833 bool HasStringWeakCharacters( const OUString& rString );
1834 SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1835 // pCell is an optimization, must point to rPos
1836 SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1837 const ScRefCellValue* pCell = nullptr );
1838 // pCell is an optimization, must point to nCol,nRow,nTab
1840 const ScRefCellValue* pCell = nullptr );
1841 SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1844 bool HasDetectiveOperations() const;
1845 void AddDetectiveOperation( const ScDetOpData& rData );
1847 ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1848 void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1850 bool HasDetectiveObjects(SCTAB nTab) const;
1852 void GetSelectionFrame( const ScMarkData& rMark,
1853 SvxBoxItem& rLineOuter,
1854 SvxBoxInfoItem& rLineInner );
1855 void ApplySelectionFrame(const ScMarkData& rMark,
1856 const SvxBoxItem& rLineOuter,
1857 const SvxBoxInfoItem* pLineInner);
1858 void ApplyFrameAreaTab(const ScRange& rRange,
1859 const SvxBoxItem& rLineOuter,
1860 const SvxBoxInfoItem& rLineInner);
1862 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1863 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1865 SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1866 void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1868 void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1870 SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uInt32 nIndex ) const;
1877 SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1878 const SfxPoolItem& rAttr );
1879 SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1880 const ScPatternAttr& rAttr );
1881 SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1882 SCCOL nEndCol, SCROW nEndRow,
1883 const ScMarkData& rMark, const ScPatternAttr& rAttr,
1884 ScEditDataArray* pDataArray = nullptr,
1885 bool* const pIsChanged = nullptr );
1886 SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1887 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1888 const ScPatternAttr& rAttr );
1891 const ScMarkData& rMark,
1892 const ScPatternAttr& rPattern,
1893 SvNumFormatType nNewType );
1895 void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1896 const ScStyleSheet& rStyle);
1897 void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1898 SCCOL nEndCol, SCROW nEndRow,
1899 const ScMarkData& rMark, const ScStyleSheet& rStyle);
1900 SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1901 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1902 const ScStyleSheet& rStyle);
1904 SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1905 void ApplySelectionLineStyle( const ScMarkData& rMark,
1906 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1908 const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1909 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1911 void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1912 OutputDevice* pDev,
1913 double nPPTX, double nPPTY,
1914 const Fraction& rZoomX, const Fraction& rZoomY );
1916 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1918 SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1919 SCCOL nEndCol, SCROW nEndRow,
1920 SCTAB nTab, ScMF nFlags );
1921 SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1922 SCCOL nEndCol, SCROW nEndRow,
1923 SCTAB nTab, ScMF nFlags );
1925 SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1926 SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> pAttr );
1927 SC_DLLPUBLIC const ScPatternAttr* SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> pAttr );
1928 SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1930 void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1931 sal_uInt16 nFormatNo, const ScMarkData& rMark );
1932 void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1933 ScAutoFormatData& rData );
1934 bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1935 SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1936 const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1937 OUString& rUndoStr, ScDocument* pUndoDoc, bool& bMatchedRangesWereClamped );
1938 static bool IsEmptyCellSearch( const SvxSearchItem& rSearchItem );
1940 // determine Col/Row of subsequent calls
1941 // (e.g. not found from the beginning, or subsequent tables)
1942 // meaning of explanation in "()" was already unclear in German
1943 void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1944 SCCOL& rCol, SCROW& rRow );
1946 bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1947 SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1948 const OUString& sValStr, double& nX);
1950 SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1951 ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1952 SC_DLLPUBLIC void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1953 void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1955 SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1956 SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1957 SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1958 SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1959 sal_uInt16 nNewHeight );
1961 SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1962 sal_uInt16 nNewHeight );
1963 SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1965 SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1966 SC_DLLPUBLIC tools::Long GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1967 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1968 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
1969 SC_DLLPUBLIC tools::Long GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1976 SCROW GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const;
1977 tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
1978 SC_DLLPUBLIC tools::Long GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1979 SC_DLLPUBLIC tools::Long GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1981 SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1982 SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1984 sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1986 SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1988 sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1989 double nPPTX, double nPPTY,
1990 const Fraction& rZoomX, const Fraction& rZoomY,
1991 bool bFormula,
1992 const ScMarkData* pMarkData = nullptr,
1993 const ScColWidthParam* pParam = nullptr );
1996 SCROW nEndRow, SCTAB nTab, bool bApi );
1998 void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
2000 tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
2001 OutputDevice* pDev,
2002 double nPPTX, double nPPTY,
2003 const Fraction& rZoomX, const Fraction& rZoomY,
2004 bool bWidth, bool bTotalSize = false,
2005 bool bInPrintTwips = false );
2007 SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
2008 SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
2009 SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
2010 SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
2011 SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
2013 SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
2014 SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
2016 SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2017 SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2020 SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2021 SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2022 void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2023 void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2024 css::uno::Sequence<
2025 css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
2027 SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2028 SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2029 SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
2030 SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
2031 SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
2032 SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2033 SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2034 SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2036 SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2037 bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2038 bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
2039 SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
2040 SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2041 SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2042 SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2044 SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
2046 bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
2053 void SyncColRowFlags();
2067 // returns whether to export a Default style for this col or not
2068 // nDefault is set to one position in the current row where the Default style is
2069 void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
2071 bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
2072 bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
2074 void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2075 void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2080 void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
2082 // PageStyle:
2083 SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
2084 SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
2085 Size GetPageSize( SCTAB nTab ) const;
2086 void SetPageSize( SCTAB nTab, const Size& rSize );
2087 void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2088 void InvalidatePageBreaks(SCTAB nTab);
2089 void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2090 void RemoveManualBreaks( SCTAB nTab );
2091 bool HasManualBreaks( SCTAB nTab ) const;
2093 bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2094 bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2095 bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2096 void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2097 const SfxItemSet& rChanges );
2099 void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2101 SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2103 // Was stored in PageStyle previously. Now it exists for every table:
2105 SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2106 SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2107 SC_DLLPUBLIC std::optional<ScRange> GetRepeatColRange( SCTAB nTab );
2108 SC_DLLPUBLIC std::optional<ScRange> GetRepeatRowRange( SCTAB nTab );
2110 bool IsPrintEntireSheet( SCTAB nTab ) const;
2113 SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2115 SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2118 SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::optional<ScRange> oNew );
2119 SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::optional<ScRange> oNew );
2120 std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2121 void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2123 SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2124 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2125 SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2127 void UpdStlShtPtrsFrmNms();
2128 void StylesToNames();
2130 SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2132 static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2134 void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2135 void UpdateFontCharSet();
2137 void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2138 SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2139 double fRowScale, bool bPageMode, bool bFormulaMode,
2140 const ScMarkData* pMarkData = nullptr );
2145 void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2146 bool bKeepQuery, bool bUpdateRefs,
2147 ScProgress* pProgress, sc::ReorderParam* pUndo );
2149 void Reorder( const sc::ReorderParam& rParam );
2151 void PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
2152 SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2153 SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2154 OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab);
2162 void GetFilterEntries( SCCOL nCol, SCROW nRow,
2163 SCTAB nTab, ScFilterEntries& rFilterEntries );
2165 SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2166 SCTAB nTab, bool bCaseSens,
2167 ScFilterEntries& rFilterEntries );
2169 void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2170 std::vector<ScTypedStrData>& rStrings, bool bValidation = false );
2171 void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2173 bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2174 void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2176 SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2177 SCTAB nTab );
2178 SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2179 SCTAB nTab );
2181 SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2182 void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2184 SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2186 bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2187 bool bInSel, const ScMarkData& rMark) const;
2189 void ReplaceStyle( const SvxSearchItem& rSearchItem,
2190 SCCOL nCol, SCROW nRow, SCTAB nTab,
2191 const ScMarkData& rMark);
2193 void InvalidateTextWidth( std::u16string_view rStyleName );
2194 void InvalidateTextWidth( SCTAB nTab );
2195 void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2197 bool IdleCalcTextWidth();
2199 void RepaintRange( const ScRange& rRange );
2200 void RepaintRange( const ScRangeList& rRange );
2202 bool IsIdleEnabled() const { return mbIdleEnabled; }
2203 void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2205 bool IsDetectiveDirty() const { return bDetectiveDirty; }
2206 void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2217 // for broadcasting/listening
2220 void SetLoadingMedium( bool bVal );
2221 SC_DLLPUBLIC void SetImportingXML( bool bVal );
2222 bool IsImportingXML() const { return bImportingXML; }
2223 bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2224 void SetNoListening( bool bVal ) { bNoListening = bVal; }
2225 bool GetNoListening() const { return bNoListening; }
2226 ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2229 void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2230 bool bSetChartRangeLists );
2231 void UpdateChart( const OUString& rName );
2232 void RestoreChartListener( const OUString& rName );
2236 void AddOLEObjectToCollection(const OUString& rName);
2241 const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2242 void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2245 bool IsValidAsianCompression() const;
2248 bool GetAsianKerning() const;
2249 bool IsValidAsianKerning() const;
2250 void SetAsianKerning(bool bNew);
2253 EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2256 void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2260 void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2261 SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2262 svl::SharedStringPool* pPool = nullptr) const;
2272 void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2274 void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2275 void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2282 void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2283 void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2285 std::set<Color> GetDocColors();
2288 std::set<SCCOL> QueryColumnsWithFormulaCells( SCTAB nTab ) const;
2296 void CheckIntegrity( SCTAB nTab ) const;
2299 ScDocument(const ScDocument& r) = delete;
2301 void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2302 SCCOL nX1, SCCOL nX2 ) const;
2304 sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2305 ScDocument& rOtherDoc,
2306 SCROW nOtherRow, SCTAB nOtherTab,
2307 SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2308 sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2309 ScDocument& rOtherDoc,
2310 SCCOL nOtherCol, SCTAB nOtherTab,
2311 SCROW nMaxRow, const SCCOLROW* pOtherRows );
2312 void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2313 bool bColumns,
2314 ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2315 SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2316 ScProgress* pProgress, sal_uInt64 nProAdd );
2318 DECL_LINK(TrackTimeHdl, Timer *, void);
2335 bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2336 bool& o_bEntirelyOutOfBounds ) const;
2339 void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2341 void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2347 void Broadcast( const ScHint& rHint );
2349 void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2352 void AreaBroadcast( const ScHint& rHint );
2353 void DelBroadcastAreasInRange( const ScRange& rRange );
2354 void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2355 const ScRange& rRange,
2356 SCCOL nDx, SCROW nDy, SCTAB nDz );
2358 void StartListeningCell( const ScAddress& rAddress,
2359 SvtListener* pListener );
2360 void EndListeningCell( const ScAddress& rAddress,
2361 SvtListener* pListener );
2363 void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2364 void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2366 void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2368 void PutInFormulaTree( ScFormulaCell* pCell );
2369 void RemoveFromFormulaTree( ScFormulaCell* pCell );
2384 SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2385 void ClearFormulaTree();
2386 void AppendToFormulaTrack( ScFormulaCell* pCell );
2388 void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2391 void FinalTrackFormulas( SfxHintId nHintId );
2393 inline bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2394 inline bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2397 void StartAllListeners();
2398 void StartNeededListeners();
2399 void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2400 SC_DLLPUBLIC void StartAllListeners( const ScRange& rRange );
2402 void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2403 sal_uInt64 GetFormulaCodeInTree() const { return nFormulaCodeInTree; }
2405 bool IsInInterpreter() const { return nInterpretLevel != 0; }
2408 {
2410 if ( nInterpretLevel < USHRT_MAX )
2412 }
2414 {
2416 if ( nInterpretLevel )
2418 }
2419 sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2421 {
2423 if ( nMacroInterpretLevel < USHRT_MAX )
2425 }
2427 {
2431 }
2434 {
2435 if ( nInterpreterTableOpLevel < USHRT_MAX )
2437 }
2439 {
2442 }
2444 // add a formula to be remembered for TableOp broadcasts
2448 bool IsInDtorClear() const { return bInDtorClear; }
2449 void SetExpandRefs( bool bVal );
2450 bool IsExpandRefs() const { return bExpandRefs; }
2453 void IncXMLImportedFormulaCount( sal_uInt64 nVal )
2454 {
2457 }
2458 void DecXMLImportedFormulaCount( sal_uInt64 nVal )
2459 {
2460 if ( nVal <= nXMLImportedFormulaCount )
2462 else
2464 }
2466 void StartTrackTimer();
2468 void CompileDBFormula();
2475 sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2476 SCROW nRowStart, SCROW nRowEnd,
2477 rtl_TextEncoding eCharSet ) const;
2481 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2482 SCTAB nTab, SCCOL nCol,
2483 SCROW nRowStart, SCROW nRowEnd ) const;
2485 void KeyInput(); // TimerDelays etc.
2487 ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2491 SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2493 void StartChangeTracking();
2494 void EndChangeTracking();
2496 SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2498 void AddUnoObject( SfxListener& rObject );
2499 void RemoveUnoObject( SfxListener& rObject );
2500 void BroadcastUno( const SfxHint &rHint );
2501 void AddUnoListenerCall( const css::uno::Reference<
2502 css::util::XModifyListener >& rListener,
2503 const css::lang::EventObject& rEvent );
2505 void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2506 bool IsInLinkUpdate() const; // including DdeLink
2513 std::unique_ptr<EditTextObject> CreateSharedStringTextObject( const svl::SharedString& rSS );
2515 std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2516 { return pRefreshTimerControl; }
2519 { bPastingDrawFromOtherDoc = bVal; }
2521 { return bPastingDrawFromOtherDoc; }
2524 sal_uInt32 GetDocumentID() const;
2527 void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2528 void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2530 void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2531 { mxVbaEvents = rxVbaEvents; }
2532 const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2539 bool IsInVBAMode() const;
2542 void AddSubTotalCell(ScFormulaCell* pCell);
2543 void RemoveSubTotalCell(ScFormulaCell* pCell);
2544 void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2546 sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2548 SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2549 void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2550 void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2562 void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2563 void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2564 SC_DLLPUBLIC void RegroupFormulaCells( const ScRange& range );
2570 bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2571#ifdef DBG_UTIL
2572 void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2579 void PrepareFormulaCalc();
2595 SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2597 SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2598 const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2599 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2601 std::optional<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2602 void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2604 SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2605 SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2608 SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2612 SC_DLLPUBLIC void DumpAreaBroadcasters() const;
2615 SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2616 const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2617 void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2618 void SwapNonEmpty( sc::TableValues& rValues );
2619 void finalizeOutlineImport();
2620 bool TableExists( SCTAB nTab ) const;
2622 // Returns the given column range, first allocating all the columns if necessary.
2624 // Returns a column range, clamped to the allocated columns.
2625 SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2626 // Returns the given range, without any adjustments. One of the variants above may return
2627 // a smaller range (better performance) if the use case is known.
2628 SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2630 bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2631 void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2633 bool IsInLayoutStrings() const { return mbLayoutStrings; }
2634 void SetLayoutStrings(bool bSet) { mbLayoutStrings = bSet; }
2644 OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2646 SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2647 SCROW GetLOKFreezeRow(SCTAB nTab) const;
2648 bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2649 bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2659 {
2660 public:
2661 explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2664 private:
2666 };
2668 void MergeNumberFormatter(const ScDocument& rSrcDoc);
2670 void ImplCreateOptions(); // Suggestion: switch to on-demand?
2671 void ImplDeleteOptions();
2673 void DeleteDrawLayer();
2674 SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2676 void UpdateDrawPrinter();
2677 void UpdateDrawLanguages();
2678 SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2680 void LoadDdeLinks(SvStream& rStream);
2681 void SaveDdeLinks(SvStream& rStream) const;
2683 void DeleteAreaLinksOnTab( SCTAB nTab );
2684 void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2685 const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2687 void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2689 bool HasPartOfMerged( const ScRange& rRange );
2692 ScTable* FetchTable( SCTAB nTab );
2693 const ScTable* FetchTable( SCTAB nTab ) const;
2699 std::map< SCTAB, ScSortParam > mSheetSortParams;
2701 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2702 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2703 void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2705 void SharePooledResources( const ScDocument* pSrcDoc );
2708 sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2711 sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2713 void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2714 void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2716 bool BroadcastHintInternal( const ScHint &rHint );
2719typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2728#ifndef NDEBUG
2730 : mnFlagRestore(rDocument.mnMutationGuardFlags)
2731 , mrDocument(rDocument)
2732 {
2733 assert((mnFlagRestore & nFlags) == 0);
2734 mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2735 }
2737 {
2739 }
2744 {
2745 (void)rDocument; (void)nFlags;
2746 }
2761#ifndef NDEBUG
2763 : mnFlags(static_cast<size_t>(nFlags))
2764 , mrDocument(rDocument)
2765 {
2766 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2767 }
2770 {
2771 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2772 }
2773 size_t mnFlags;
2777 {
2778 (void)rDocument; (void)nFlags;
2779 }
2789 : mrDoc(rDoc)
2790 {
2791 assert(!mrDoc.IsInDocShellRecalc());
2793 }
2796 {
2797 mrDoc.SetDocShellRecalc(false);
2798 }
2801/* 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:206
Stores options which are only relevant for clipboard documents.
Definition: clipoptions.hxx:22
ScDocShellRecalcGuard(ScDocument &rDoc)
Definition: document.hxx:2788
ScDocument & mrDoc
Definition: document.hxx:2785
Accessor class to ScDocument.
Use this class as a locale variable to merge number formatter from another document,...
Definition: document.hxx:2659
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2476
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:507
void StartAllListeners()
Definition: documen7.cxx:588
bool IsInFormulaTree(const ScFormulaCell *pCell) const
void ResetChanged(const ScRange &rRange)
Definition: document.cxx:4135
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
Definition: documen3.cxx:438
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4611
void SetEmptyCell(const ScAddress &rPos)
Definition: document.cxx:3509
SC_DLLPUBLIC SCCOL GetAllocatedColumnsCount(SCTAB nTab) const
Definition: documen3.cxx:2156
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:4021
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
Definition: documen2.cxx:478
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:4555
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:3453
bool IsCalculatingFormulaTree() const
Definition: document.hxx:1419
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5094
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:897
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4983
bool IsUndo() const
Definition: document.hxx:1591
SC_DLLPUBLIC ScColumnsRange GetWritableColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd)
Definition: document.cxx:2561
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:4225
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
Definition: documen3.cxx:1149
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
Definition: document.cxx:6625
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:202
void SetTrackFormulasPending()
Definition: document.hxx:2389
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:2852
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:4595
SC_DLLPUBLIC ~ScDocument()
Definition: documen2.cxx:346
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3686
SC_DLLPUBLIC void GetRangeNameMap(std::map< OUString, ScRangeName * > &rRangeName)
Definition: documen3.cxx:152
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1424
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:1208
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:399
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1297
bool IsInFormulaTrack(const ScFormulaCell *pCell) const
void IncInterpreterTableOpLevel()
Definition: document.hxx:2433
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:5837
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:622
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
Definition: document.cxx:5536
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:2084
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:1811
const OUString & GetFileURL() const
Definition: document.hxx:610
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5780
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:294
ScLkUpdMode eLinkMode
Definition: document.hxx:484
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1722
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
Definition: documen2.cxx:1125
bool bForcedFormulaPending
Definition: document.hxx:491
void IncMacroInterpretLevel()
Definition: document.hxx:2420
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:442
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:574
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2494
bool IsCalcingAfterLoad() const
Definition: document.hxx:2223
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4184
SC_DLLPUBLIC sal_uInt64 GetCellCount() const
Definition: document.cxx:6251
void ClosingClipboardSource()
To be called at the clipboard document when closing a document that is the current clipboard source t...
Definition: documen2.cxx:338
void LoadDdeLinks(SvStream &rStream)
Definition: documen8.cxx:747
bool bPastingDrawFromOtherDoc
Definition: document.hxx:537
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
Definition: document.cxx:6165
bool IsInInterpreterTableOp() const
Definition: document.hxx:2432
void SetValues(const ScAddress &rPos, const std::vector< double > &rVals)
Definition: document10.cxx:158
static sal_uInt16 GetSrcVersion()
Definition: document.hxx:2132
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
Definition: document.cxx:3560
bool IsInDocShellRecalc() const
Definition: document.hxx:2630
void SC_DLLPUBLIC GetSortParam(ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2141
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:368
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, ScRangeName > &rRangeMap)
Definition: documen3.cxx:129
SC_DLLPUBLIC OUString GetLinkTab(SCTAB nTab) const
Definition: documen3.cxx:538
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2512
bool ValidRow(SCROW nRow) const
Definition: document.hxx:899
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) const
Definition: documen3.cxx:1928
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:6897
SC_DLLPUBLIC void EnableUserInteraction(bool bVal)
Definition: document.cxx:6602
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:962
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1752
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:325
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6337
SCTAB nVisibleTab
Definition: document.hxx:480
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5971
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:809
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:592
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4717
bool bInDtorClear
Definition: document.hxx:514
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:763
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1485
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:182
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:948
ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2545
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:662
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1908
bool IsFinalTrackFormulas() const
Definition: document.hxx:2392
void SetRangeName(SCTAB nTab, std::unique_ptr< ScRangeName > pNew)
Definition: documen3.cxx:189
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:3839
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:1162
svl::SharedString GetSharedString(const ScAddress &rPos) const
Definition: document.cxx:3568
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5676
bool IsDetectiveDirty() const
Definition: document.hxx:2205
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
Definition: documen2.cxx:1107
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6744
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:2671
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1210
ScClipParam & GetClipParam()
Definition: document.cxx:2601
SC_DLLPUBLIC void UpdateChartListenerCollection()
Definition: documen5.cxx:573
SC_DLLPUBLIC tools::Long GetColOffset(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4288
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:2774
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:595
std::unique_ptr< ScClipOptions > mpClipOptions
Definition: document.hxx:425
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:454
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2616
bool bLinkFormulaNeedingCheck
Definition: document.hxx:532
void PrepareQuery(SCTAB nTab, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1467
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:264
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:2571
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:4262
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:317
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4074
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1919
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:98
sal_uInt64 GetFormulaCodeInTree() const
Definition: document.hxx:2403
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:6798
void SetDetectiveDirty(bool bSet)
Definition: document.hxx:2206
bool IsIdleEnabled() const
Definition: document.hxx:2202
LanguageType eCtlLanguage
Definition: document.hxx:453
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:7026
ScRange aEmbedRange
Definition: document.hxx:437
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:377
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:4531
void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab, ScMarkData &rDestMark, bool bResetMark=true, ScScenarioFlags nNeededBits=ScScenarioFlags::NONE) const
Definition: documen3.cxx:861
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:780
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:964
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
Definition: document.cxx:1044
void DecInterpreterTableOpLevel()
Definition: document.hxx:2438
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:447
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6331
bool SetFormulaCells(const ScAddress &rPos, std::vector< ScFormulaCell * > &rCells)
Definition: documen2.cxx:1136
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
Definition: document.cxx:5460
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:466
Definition: document.hxx:891
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2530
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:397
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:382
void finalizeOutlineImport()
Definition: document10.cxx:583
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:518
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:464
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:443
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
Definition: documen4.cxx:881
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:659
size_t GetNoteCount(SCTAB nTab, SCCOL nCol) const
Definition: document.cxx:6861
void SharePooledResources(const ScDocument *pSrcDoc)
Definition: document10.cxx:328
bool IsClipboard() const
Definition: document.hxx:1592
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
Definition: documen3.cxx:328
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:344
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4636
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6349
std::unique_ptr< ScSortedRangeCacheMap > mxScSortedRangeCache
Definition: document.hxx:475
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:865
const ScSheetEvents * GetSheetEvents(SCTAB nTab) const
Definition: documen3.cxx:669
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:2042
static const sal_uInt16 nSrcVer
Definition: document.hxx:477
void AppendTabOnLoad(const OUString &rName)
Definition: document.cxx:475
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2395
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:592
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:544
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:531
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4571
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4563
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
Definition: document.cxx:1793
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi)
Definition: document.cxx:4330
rtl::Reference< ScPoolHelper > mxPoolHelper
Definition: document.hxx:357
SC_DLLPUBLIC ScMacroManager * GetMacroManager()
Definition: documen8.cxx:377
void DiscardFormulaGroupContext()
Definition: document.cxx:3585
SC_DLLPUBLIC void CopyStaticToDocument(const ScRange &rSrcRange, SCTAB nDestTab, ScDocument &rDestDoc)
Copy only raw cell values to another document.
Definition: document.cxx:2245
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6425
SCROW GetRowForHeight(SCTAB nTab, tools::Long nHeight) const
Given the height i.e.
Definition: document.cxx:4257
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3356
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:3490
bool InsertNewRangeName(const OUString &rName, const ScAddress &rPos, const OUString &rExpr)
Insert a new named expression to the global scope.
Definition: documen3.cxx:224
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2134
sal_uInt16 nInterpretLevel
Definition: document.hxx:462
ScInterpreterContext maInterpreterContext
Definition: document.hxx:472
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
Definition: document.cxx:338
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6170
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:577
sal_Int32 mnImagePreferredDPI
Definition: document.hxx:565
DECL_LINK(TrackTimeHdl, Timer *, void)
bool IsCutMode()
Definition: document.cxx:2061
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4864
void GetSearchAndReplaceStart(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Definition: documen3.cxx:1222
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:2446
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:327
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:730
void DecXMLImportedFormulaCount(sal_uInt64 nVal)
Definition: document.hxx:2458
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:500
ScRangeData * FindRangeNameBySheetAndIndex(SCTAB nTab, sal_uInt16 nIndex) const
Find a named expression / range name in either global or a local scope.
Definition: documen3.cxx:275
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:4975
bool IsAdjustHeightLocked() const
Definition: document.hxx:1597
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:366
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4579
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:6419
void BeginUnoRefUndo()
Definition: documen3.cxx:996
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:4368
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:1875
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:114
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
Definition: document.cxx:333
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
Definition: document.cxx:3576
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:483
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
Definition: document.cxx:4485
ScDetOpList * GetDetOpList() const
Definition: document.hxx:1847
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:560
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:4650
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:1008
void SetTableOpDirty(const ScRange &)
Definition: document.cxx:3920
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
Definition: document.cxx:4090
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:2079
bool mbEmbedUsedFontsOnly
Definition: document.hxx:560
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3672
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:290
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
Definition: document.hxx:2228
bool ContainsNotesInRange(const ScRangeList &rRange) const
Definition: document.cxx:7031
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:1014
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:158
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6730
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:786
ScSortedRangeCache & GetSortedRangeCache(const ScRange &rRange, const ScQueryParam &param, ScInterpreterContext *pContext)
Definition: documen2.cxx:1217
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:2515
bool mbFormulaGroupCxtBlockDiscard
Definition: document.hxx:363
SC_DLLPUBLIC sc::Sparkline * CreateSparkline(ScAddress const &rPosition, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
Definition: document.cxx:6641
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:889
void CompileXML()
Definition: document.cxx:4034
SC_DLLPUBLIC const ScDrawLayer * GetDrawLayer() const
Definition: document.hxx:1083
std::unique_ptr< ScAutoNameCache > pAutoNameCache
Definition: document.hxx:428
bool HasClipFilteredRows()
Definition: document.cxx:3247
SCROW GetNextDifferentChangedRowFlagsWidth(SCTAB nTab, SCROW nStart) const
Definition: document.cxx:4675
SC_DLLPUBLIC void TransposeClip(ScDocument *pTransClip, InsertDeleteFlags nFlags, bool bAsLink, bool bIncludeFiltered)
Definition: document.cxx:2326
SC_DLLPUBLIC void SetPrintEntireSheet(SCTAB nTab)
Marks the specified sheet to be printed completely.
Definition: document.cxx:6431
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:990
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:344
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:1606
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1043
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6395
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2663
SC_DLLPUBLIC void EnableUndo(bool bVal)
Definition: document.cxx:6586
SfxBindings * GetViewBindings()
Definition: documen8.cxx:1188
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1827
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:1194
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1386
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:394
bool IsDelayedDeletingBroadcasters() const
Definition: document.hxx:1437
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated.
Definition: document.cxx:2488
void KeyInput()
Definition: documen8.cxx:1180
void MergeContextBackIntoNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7076
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:6041
bool HasFormulaCell(const ScRange &rRange) const
Check if there is at least one formula cell in specified range.
Definition: document10.cxx:460
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6290
SC_DLLPUBLIC void PreprocessDBDataUpdate()
Definition: document10.cxx:305
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
Definition: documen3.cxx:1958
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:873
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4461
void AddTableOpFormulaCell(ScFormulaCell *)
Definition: document.cxx:3977
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1006
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: document.cxx:4937
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
Definition: documen2.cxx:251
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:378
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5083
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:1089
ScInterpreterContext & GetNonThreadedContext() const
Definition: document.hxx:616
SC_DLLPUBLIC void PreprocessRangeNameUpdate()
Definition: document10.cxx:293
void SetLayoutStrings(bool bSet)
Definition: document.hxx:2634
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3163
bool IsEmbedFontScriptComplex() const
Definition: document.hxx:586
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:516
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2536
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:375
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:817
bool IsDocEditable() const
Definition: documen3.cxx:1913
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1148
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:1075
void RemoveLookupCache(ScLookupCache &rCache)
Only ScLookupCache dtor uses RemoveLookupCache(), do not use elsewhere!
Definition: documen2.cxx:1251
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4423
ScRangePairListRef xRowNameRanges
Definition: document.hxx:420
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
Definition: document.cxx:6507
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6540
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:633
SC_DLLPUBLIC sal_uInt16 GetOriginalHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4217
bool IsInLayoutStrings() const
Definition: document.hxx:2633
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:487
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:704
void UpdateExternalRefLinks(weld::Window *pWin)
Definition: documen8.cxx:789
SC_DLLPUBLIC bool DeleteSparkline(ScAddress const &rPosition)
Definition: document.cxx:6653
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1153
size_t mnMutationGuardFlags
Definition: document.hxx:576
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:7047
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:1002
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:474
SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap &rRangeNames) const
Get all range names that are local to each table.
Definition: documen3.cxx:110
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:1423
sal_uInt32 nAdjustHeightLock
Definition: document.hxx:543
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1601
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1119
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.
Definition: document10.cxx:999
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2096
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:503
SCROW GetHiddenRowCount(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4280
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:1619
ScRangePairListRef & GetRowNameRangesRef()
Definition: document.hxx:821
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1944
void UnshareFormulaCells(SCTAB nTab, SCCOL nCol, std::vector< SCROW > &rRows)
Make specified formula cells non-grouped.
Definition: document10.cxx:353
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
Definition: document.cxx:937
void AddDelayedFormulaGroupingCell(const ScFormulaCell *cell)
To be used only by SharedFormulaUtil::joinFormulaCells().
Definition: document10.cxx:393
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:231
void StylesToNames()
Definition: document.cxx:6238
void ReservePatternCount(SCTAB nTab, SCCOL nCol, SCSIZE nReserve)
Definition: documen3.cxx:2135
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
Definition: document.cxx:3288
SC_DLLPUBLIC void CopyToClip(const ScClipParam &rClipParam, ScDocument *pClipDoc, const ScMarkData *pMarks, bool bKeepScenarioFlags, bool bIncludeObjects)
Definition: document.cxx:2173
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:1967
SC_DLLPUBLIC void DoEmptyBlock(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:2066
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:907
bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab)
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
Definition: document.cxx:4165
SC_DLLPUBLIC bool IsUserInteractionEnabled() const
Definition: document.hxx:1604
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6225
bool GetNoListening() const
Definition: document.hxx:2225
void SetDocShellRecalc(bool bSet)
Definition: document.hxx:2631
void AddSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6514
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:7054
bool mbUserInteractionEnabled
Definition: document.hxx:552
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4841
void ResetCalcNotifications()
Definition: documen3.cxx:737
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:418
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2208
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:776
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:591
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
Definition: documen2.cxx:473
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:1161
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
Definition: document.cxx:4362
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:1495
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1411
SCCOL GetLastChangedColFlagsWidth(SCTAB nTab) const
Definition: document.cxx:4643
OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1487
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3798
void SetCodeName(const OUString &r)
Definition: document.hxx:609
SC_DLLPUBLIC void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6994
bool IsValidAsianCompression() const
Definition: documen9.cxx:630
void SetEmbedFonts(bool bUse)
Definition: document.hxx:588
bool IsInVBAMode() const
Definition: document.cxx:6607
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4828
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
Definition: documen3.cxx:1986
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5132
SC_DLLPUBLIC void InitUndoSelected(const ScDocument &rSrcDoc, const ScMarkData &rTabSelection, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:1974
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:5051
bool bLoadingMedium
Definition: document.hxx:503
ScChangeViewSettings * GetChangeViewSettings() const
Definition: document.hxx:2238
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:424
bool HasRangeOverflow() const
Definition: document.hxx:2214
SC_DLLPUBLIC std::unique_ptr< ScPostIt > ReleaseNote(const ScAddress &rPos)
Definition: document.cxx:6837
void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
Definition: document.cxx:3732
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: document.cxx:3422
void StartTrackTimer()
Definition: documen2.cxx:332
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
Definition: document.cxx:6459
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:1567
void StartChangeTracking()
Definition: documen2.cxx:277
bool bExpandRefs
Definition: document.hxx:519
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4959
TableContainer maTabs
Definition: document.hxx:377
SC_DLLPUBLIC bool HasSparkline(ScAddress const &rPosition)
Definition: document.cxx:6636
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:488
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
Definition: documen5.cxx:529
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6302
void SetName(const OUString &r)
Definition: document.hxx:607
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:505
bool HasAnyCalcNotification() const
Definition: documen3.cxx:714
LanguageType eLanguage
Definition: document.hxx:451
bool bIsClip
Definition: document.hxx:493
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:929
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1127
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2006
bool IsFunctionAccess() const
Definition: document.hxx:1595
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:2457
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6366
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:6099
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1360
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:1890
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1540
std::unique_ptr< ScExternalRefManager > pExternalRefMgr
Definition: document.hxx:409
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3877
bool UpdateOutlineRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow)
Definition: documen3.cxx:1433
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:1374
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5726
void DelBroadcastAreasInRange(const ScRange &rRange)
Definition: documen7.cxx:215
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
Definition: document.cxx:4209
FormulaError GetErrCode(const ScAddress &) const
Definition: document.cxx:4127
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
Definition: documen2.cxx:637
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
Definition: documen2.cxx:268
sal_uInt8 nInDdeLinkUpdate
Definition: document.hxx:539
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2226
void GetSelectionFrame(const ScMarkData &rMark, SvxBoxItem &rLineOuter, SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5181
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1973
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4438
const css::uno::Reference< css::script::vba::XVBAEventProcessor > & GetVbaEventProcessor() const
Definition: document.hxx:2532
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:5984
SC_DLLPUBLIC bool GetHashCode(SCTAB nTab, sal_Int64 &rHashCode) const
Definition: document.cxx:204
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
Definition: document.cxx:4374
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4603
bool IsPendingRowHeights(SCTAB nTab) const
Definition: document.cxx:948
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:4304
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: document.cxx:4493
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:5648
bool bAutoCalcShellDisabled
Definition: document.hxx:487
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:395
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:4770
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:1633
SC_DLLPUBLIC CRFlags GetRowFlags(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4400
std::unique_ptr< EditTextObject > CreateSharedStringTextObject(const svl::SharedString &rSS)
Definition: documen2.cxx:514
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:6709
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6930
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
Definition: documen2.cxx:1183
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6763
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:878
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:768
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:616
SvNumberFormatterIndexTable * pFormatExchangeList
Definition: document.hxx:376
ScUndoManager * mpUndoManager
Definition: document.hxx:367
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
Definition: document.cxx:4415
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::optional< ScRange > oNew)
Definition: document.cxx:6443
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
Definition: document.cxx:4453
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
Definition: document.cxx:3742
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:1600
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:5278
void DeleteDrawLayer()
Definition: documen9.cxx:229
void SC_DLLPUBLIC SetSortParam(const ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2146
void AddUndoTab(SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2031
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:1008
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4392
void InvalidateStreamOnSave()
Definition: document.cxx:498
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:335
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1455
bool IdleCalcTextWidth()
Definition: documen8.cxx:532
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:362
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5436
void MarkUsedExternalReferences()
Definition: documen3.cxx:647
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:2213
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:2646
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:1033
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:244
bool HasUnoRefUndo() const
Definition: document.hxx:1088
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1717
std::shared_mutex mScLookupMutex
Definition: document.hxx:474
bool IsClipOrUndo() const
Definition: document.hxx:1590
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1453
SC_DLLPUBLIC OUString GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bForceSystemLocale=false) const
Definition: document.cxx:3592
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:723
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1100
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:2072
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: document.cxx:4872
const ScConsolidateParam * GetConsolidateDlgData() const
Definition: document.hxx:653
SC_DLLPUBLIC void SetDocVisible(bool bSet)
Definition: documen2.cxx:261
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2520
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2119
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:3517
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:6204
sal_uInt64 GetXMLImportedFormulaCount() const
Definition: document.hxx:2452
bool bIsUndo
Definition: document.hxx:494
bool IsChangeReadOnlyEnabled() const
Definition: document.hxx:1602
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:383
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:4907
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:4847
bool IsEmbedFontScriptAsian() const
Definition: document.hxx:585
void GetDocStat(ScDocStat &rDocStat)
Definition: document.cxx:6358
void MergeNumberFormatter(const ScDocument &rSrcDoc)
Definition: document.cxx:2585
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:6029
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1196
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7070
ScMarkData maPreviewSelection
Definition: document.hxx:432
void EnableIdle(bool bDo)
Definition: document.hxx:2203
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
Definition: document.cxx:5863
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
Definition: document.cxx:172
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4153
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2219
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1858
void RemoveSortedRangeCache(ScSortedRangeCache &rCache)
Definition: documen2.cxx:1270
void SetPageSize(SCTAB nTab, const Size &rSize)
Definition: document.cxx:6310
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:412
bool IsForcedFormulaPending() const
Definition: document.hxx:1417
SC_DLLPUBLIC bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
Definition: documen2.cxx:806
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:4835
void CheckIntegrity(SCTAB nTab) const
Check the integrity of the internal table state.