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 BroadcasterState;
81struct FormulaGroupContext;
82class StartListeningContext;
83class EndListeningContext;
84class CopyFromClipContext;
85class ColumnSpanSet;
86class RangeColumnSpanSet;
87struct ColumnBlockPosition;
88struct RefUpdateContext;
89class EditTextIterator;
90struct NoteEntry;
91class DocumentStreamAccess;
92class DocumentLinkManager;
93class CellValues;
94class TableValues;
95class RowHeightContext;
96struct SetFormulaDirtyContext;
97class RefMovedHint;
98struct ReorderParam;
99class FormulaGroupAreaListener;
100class ColumnSet;
101class UpdatedRangeNames;
102class TableColumnBlockPositionSet;
103class ColumnIterator;
104class ExternalDataMapper;
105class Sparkline;
106class SparklineGroup;
107class SparklineList;
111class Fraction;
113class OutputDevice;
114class SdrObject;
115class SfxBroadcaster;
116class SfxListener;
117class SfxItemSet;
118class SfxObjectShell;
119class SfxBindings;
120class SfxPoolItem;
121class SfxItemPool;
122class SfxPrinter;
124class SvMemoryStream;
125class SvxBoxInfoItem;
126class SvxBoxItem;
128namespace sfx2 {
129 class LinkManager;
130 }
131class SvxSearchItem;
132class XColorList;
134class ScAutoFormatData;
138class ScClipOptions;
139class ScColumn;
142class ScDBCollection;
143class ScDBData;
144class ScDetOpData;
145class ScDetOpList;
146class ScDocOptions;
147class ScDocProtection;
148class ScDocumentPool;
149class ScDrawLayer;
150class ScExtDocOptions;
152class ScFormulaCell;
153class ScMacroManager;
154class ScOutlineTable;
156class ScStyleSheet;
157class ScStyleSheetPool;
158class ScTable;
160class ScTokenArray;
161class ScValidationData;
163class ScViewOptions;
164class ScChangeTrack;
167class ScNoteEditEngine;
168class ScDPObject;
169class ScDPCollection;
170class ScMatrix;
171class ScScriptTypeData;
172class ScPoolHelper;
173struct ScSortParam;
176class ScUnoRefList;
178struct RowInfo;
179struct ScTableInfo;
180struct ScTabOpParam;
181class VirtualDevice;
182class ScAutoNameCache;
184class ScLookupCache;
185struct ScLookupCacheMap;
188class ScUndoManager;
190struct ScClipParam;
192struct ScSetStringParam;
193struct ScColWidthParam;
194class ScSheetEvents;
195class ScProgress;
196class SvtListener;
197class ScEditDataArray;
198class EditTextObject;
199struct ScRefCellValue;
200class ScPostIt;
201struct ScSubTotalParam;
202struct ScQueryParam;
203class ScHint;
204class SvtBroadcaster;
205enum class ScDBDataPortion;
206enum class ScSheetEventId;
207class BitmapEx;
208class ScColumnsRange;
209struct ScFilterEntries;
211struct ScSheetLimits;
212struct ScDataAreaExtras;
215namespace sc {
217typedef std::map<OUString, BitmapEx> IconSetBitmapMap;
221namespace com::sun::star {
222 namespace lang {
223 struct EventObject;
224 }
225 namespace i18n {
226 class XBreakIterator;
227 }
228 namespace util {
229 class XModifyListener;
230 }
231 namespace embed {
232 class XEmbeddedObject;
233 }
234 namespace script::vba {
235 class XVBAEventProcessor;
236 }
237 namespace sheet {
238 struct TablePageBreakData;
239 }
242namespace weld {
244class Window;
248#define SC_DOC_NEW 0xFFFF
264 ALLSHOWN, // All comments captions are shown
265 ALLHIDDEN, // All comments captions are hidden
266 MIXED // There are comments in shown and hidden.
271 GLOBAL, // A range name can be defined
272 SHEET // with two scope on Manage Names dialog.
278 SIZES, // Column widths or row heights.
279 HIDDEN, // Hidden columns/rows.
280 FILTERED, // Filtered columns/rows.
281 GROUPS // Grouping of columns/rows.
286 OUString aDocName;
288 sal_uInt64 nCellCount;
289 sal_uInt64 nFormulaCount;
290 sal_uInt16 nPageCount;
292 : nTableCount(0)
293 , nCellCount(0)
294 , nFormulaCount(0)
295 , nPageCount(0)
296 {
297 }
300// DDE link modes
306// During threaded calculation fields being mutated are kept in this struct
309 std::unique_ptr<ScRecursionHelper> xRecursionHelper; // information for recursive and iterative cell formulas
310 ScInterpreterContext* pContext = nullptr; // references the context passed around for easier access
316 // Bit mask bits
317 CORE = 0x0001,
320typedef std::unique_ptr<ScTable, o3tl::default_delete<ScTable>> ScTableUniquePtr;
324friend class ScValueIterator;
327friend class ScCellIterator;
328template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType >
330template< ScQueryCellIteratorAccess accessType >
334friend class ScDocAttrIterator;
336friend class ScDocShell;
339friend class ScTable;
340friend class ScColumn;
341friend struct ScRefCellValue;
342friend class ScDocumentImport;
344friend struct ScMutationGuard;
345friend struct ScMutationDisable;
347 typedef std::vector<ScTableUniquePtr> TableContainer;
351 {
352 OFF,
355 };
360 std::shared_ptr<svl::SharedStringPool> mpCellStringPool;
361 std::unique_ptr<sc::DocumentLinkManager> mpDocLinkMgr;
363 std::shared_ptr<sc::FormulaGroupContext> mpFormulaGroupCxt;
369 std::unique_ptr<ScFieldEditEngine> mpEditEngine; // uses pEditPool from xPoolHelper
370 std::unique_ptr<ScNoteEditEngine> mpNoteEngine; // uses pEditPool from xPoolHelper
374 std::unique_ptr<ScDrawLayer> mpDrawLayer; // SdrModel
376 std::unique_ptr<ScValidationDataList> pValidationList; // validity
377 SvNumberFormatterIndexTable* pFormatExchangeList; // for application of number formats
380 std::vector<OUString> maTabNames; // for undo document, we need the information tab name <-> index
381 mutable std::unique_ptr<ScRangeName> pRangeName;
382 std::unique_ptr<ScDBCollection> pDBCollection;
383 std::unique_ptr<ScDPCollection> pDPCollection;
384 std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock;
385 std::unique_ptr<ScPatternAttr> pSelectionAttr; // Attributes of a block
386 ScFormulaCell* pFormulaTree; // formula tree (start)
387 ScFormulaCell* pEOFormulaTree; // formula tree (end), last cell
388 ScFormulaCell* pFormulaTrack; // BroadcastTrack (start)
389 ScFormulaCell* pEOFormulaTrack; // BroadcastTrack (end), last cell
390 std::unique_ptr<ScBroadcastAreaSlotMachine> pBASM; // BroadcastAreas
391 std::unique_ptr<ScChartListenerCollection> pChartListenerCollection;
392 std::unique_ptr<SvMemoryStream> pClipData;
393 std::unique_ptr<ScDetOpList> pDetOpList;
394 std::unique_ptr<ScChangeTrack> pChangeTrack;
395 std::unique_ptr<SfxBroadcaster> pUnoBroadcaster;
396 std::unique_ptr<ScUnoListenerCalls> pUnoListenerCalls;
397 std::unique_ptr<ScUnoRefList> pUnoRefUndoList;
398 std::unique_ptr<ScChangeViewSettings> pChangeViewSettings;
399 std::unique_ptr<ScScriptTypeData> pScriptTypeData;
400 std::unique_ptr<ScRefreshTimerControl> pRefreshTimerControl;
401 std::shared_ptr<SvxForbiddenCharactersTable> xForbiddenCharacters;
402 std::unique_ptr<ScDBData> mpAnonymousDBData;
403 std::unique_ptr<sc::ExternalDataMapper> mpDataMapper;
405 std::unique_ptr<ScFieldEditEngine> pCacheFieldEditEngine;
407 std::unique_ptr<ScDocProtection> pDocProtection;
408 std::unique_ptr<ScClipParam> mpClipParam;
410 std::unique_ptr<ScExternalRefManager> pExternalRefMgr;
411 std::unique_ptr<ScMacroManager> mpMacroMgr;
413 // mutable for lazy construction
414 mutable std::unique_ptr< ScFormulaParserPool >
417 OUString aDocName; // optional: name of document
418 OUString aDocCodeName; // optional: name of document (twice?)
419 OUString maFileURL; // file URL for copy & paste
423 std::unique_ptr<ScViewOptions> pViewOptions; // view options
424 std::unique_ptr<ScDocOptions> pDocOptions; // document options
425 std::unique_ptr<ScExtDocOptions> pExtDocOptions; // for import etc.
426 std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options
427 std::unique_ptr<ScConsolidateParam> pConsolidateDlgData;
429 std::unique_ptr<ScAutoNameCache> pAutoNameCache; // for automatic name lookup during CompileXML
431 std::unique_ptr<SfxItemSet> pPreviewFont; // convert to std::unique_ptr or whatever
434 sal_Int64 nUnoObjectId; // counted up for UNO objects
436 ErrCode nRangeOverflowType; // used in (xml) loading for overflow warnings
443 css::uno::Reference< css::script::vba::XVBAEventProcessor >
447 std::vector<ScInterpreterTableOpParams*> m_TableOpList;
452 LanguageType eLanguage; // default language
453 LanguageType eCjkLanguage; // default language for asian text
454 LanguageType eCtlLanguage; // default language for complex text
455 rtl_TextEncoding eSrcSet; // during reading: source character set
461 sal_uInt64 nFormulaCodeInTree; // formula RPN in the formula tree
462 sal_uInt64 nXMLImportedFormulaCount; // progress count during XML import
463 sal_uInt16 nInterpretLevel; // >0 if in interpreter
464 sal_uInt16 nMacroInterpretLevel; // >0 if macro in interpreter
465 sal_uInt16 nInterpreterTableOpLevel; // >0 if in interpreter TableOp
469 // There can be only one ScDocument being calculated in a thread at a time, so we can use a
470 // plain thread_local static member.
475 std::shared_mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup
476 std::unique_ptr<ScSortedRangeCacheMap> mxScSortedRangeCache; // cache for unsorted lookups
478 static const sal_uInt16 nSrcVer; // file version (load/save)
480 HardRecalcState eHardRecalcState; // off, temporary, eternal
481 SCTAB nVisibleTab; // for OLE etc., don't use inside ScDocument
482 SCCOL nPosLeft; // for OLE etc., don't use inside ScDocument
483 SCROW nPosTop; // for OLE etc., don't use inside ScDocument
487 bool bAutoCalc; // calculate automatically
488 bool bAutoCalcShellDisabled; // in/from/for ScDocShell disabled
489 // are there ForcedFormulas which have to be calculated
490 // in interaction with ScDocShell SetDocumentModified,
491 // AutoCalcShellDisabled and TrackFormulas
497 bool bIsVisible; // set from view ctor
499 bool bIsEmbedded; // display/adjust Embedded area?
501 // no broadcast, construct no listener during insert from a different
502 // Doc (per filter or the like ), not until CompileAll / CalcAfterLoad
505 bool bImportingXML; // special handling of formula text
506 bool bCalcingAfterLoad; // in CalcAfterLoad TRUE
507 // don't construct/destruct listeners temporarily
510 bool bInLinkUpdate; // TableLink or AreaLink
512 // are/were there RC_FORCED formula cells in the document (if set once to TRUE then set forever)
514 // is the Doc being destroyed? (no Notify-Tracking etc. needed anymore)
516 // expand reference if insert column/row takes place at the border
517 // of a reference
518 // is fetched in each UpdateReference from InputOptions,
519 // assigned, and restored at the end of UpdateReference
521 // for detective update, is set for each change of a formula
523 // If the pointer is set, formula cells will not be automatically grouped into shared formula groups,
524 // instead the range will be extended to contain all such cells.
525 std::unique_ptr< ScRange > pDelayedFormulaGrouping;
526 // If non-empty, ScColumn::StartListeningFormulaCells() calls may be delayed using this,
527 // avoiding repeated calling for the same cells in the given range. The function will be called once
528 // later for all the cells in the range.
529 std::unordered_map< ScColumn*, std::pair<SCROW, SCROW>> pDelayedStartListeningFormulaCells;
530 // Cells will not delete their broadcasters if delayed, avoiding possible extensive mdds vector changes.
533 bool bLinkFormulaNeedingCheck; // valid only after loading, for ocDde and ocWebservice
540 sal_uInt8 nInDdeLinkUpdate; // originating DDE links (stacked bool)
551 bool mbChangeReadOnlyEnabled:1; // allow changes in read-only document (for API import filters)
553 bool mbUserInteractionEnabled:1; // whether or not to launch any kind of interactive dialogs.
557 std::set<ScFormulaCell*> maSubTotalCells;
560 bool mbEmbedFonts : 1;
568 std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
572 // This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
574 // This indicates if a ScOutputData::LayoutStrings() is in progress.
580 bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
581 void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
583 bool IsEmbedFonts() const { return mbEmbedFonts; }
589 void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
590 void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
595 void SetImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = nValue; }
598 SC_DLLPUBLIC sal_uInt64 GetCellCount() const; // all cells
599 SC_DLLPUBLIC sal_uInt64 GetFormulaGroupCount() const; // all cells
600 sal_uInt64 GetCodeCount() const; // RPN-Code in formulas
601 DECL_LINK( GetUserDefinedColor, sal_uInt16, Color* );
602 // number formatter
605 SfxObjectShell* pDocShell = nullptr );
608 void SetName( const OUString& r ) { aDocName = r; }
609 const OUString& GetCodeName() const { return aDocCodeName; }
610 void SetCodeName( const OUString& r ) { aDocCodeName = r; }
611 const OUString& GetFileURL() const { return maFileURL; }
613 void GetDocStat( ScDocStat& rDocStat );
615 SC_DLLPUBLIC void InitDrawLayer( SfxObjectShell* pDocShell = nullptr );
618 {
621 }
622 // Uses thread_local.
624 {
626 }
627 void SetupContextFromNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
628 void MergeContextBackIntoNonThreadedContext( ScInterpreterContext& threadedContext, int threadNumber );
639 SC_DLLPUBLIC void SetDocOptions( const ScDocOptions& rOpt );
641 SC_DLLPUBLIC void SetViewOptions( const ScViewOptions& rOpt );
642 void SetPrintOptions();
645 SC_DLLPUBLIC void SetExtDocOptions( std::unique_ptr<ScExtDocOptions> pNewOptions );
648 void SetClipOptions(std::unique_ptr<ScClipOptions> pClipOptions);
650 SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const;
651 void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl );
653 void SetConsolidateDlgData( std::unique_ptr<ScConsolidateParam> pData );
656 void Clear( bool bFromDestructor = false );
658 std::unique_ptr<ScFieldEditEngine> CreateFieldEditEngine();
659 void DisposeFieldEditEngine(std::unique_ptr<ScFieldEditEngine>& rpEditEngine);
666 SC_DLLPUBLIC void SetAllRangeNames(const std::map<OUString, ScRangeName>& rRangeMap);
667 SC_DLLPUBLIC void GetRangeNameMap(std::map<OUString, ScRangeName*>& rRangeName);
670 void SetRangeName(SCTAB nTab, std::unique_ptr<ScRangeName> pNew);
671 void SetRangeName( std::unique_ptr<ScRangeName> pNewRangeName );
672 bool IsAddressInRangeName( RangeNameScope eScope, const ScAddress& rAddress);
681 ScRangeData* FindRangeNameBySheetAndIndex( SCTAB nTab, sal_uInt16 nIndex ) const;
727 SCTAB nTokenTab, const sal_uInt16 nTokenIndex,
728 SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement,
729 bool bSameDoc, int nRecursion ) const;
771 bool CopyAdjustRangeName( SCTAB& rSheet, sal_uInt16& rIndex, ScRangeData*& rpRangeData, ScDocument& rNewDoc,
772 const ScAddress& rNewPos, const ScAddress& rOldPos, const bool bGlobalNamesToLocal,
773 const bool bUsedByFormula ) const;
778 SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate( const std::map<OUString, ScRangeName>& rRangeMap );
796 bool InsertNewRangeName( const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
809 bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
817 SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
828 void SetDBCollection( std::unique_ptr<ScDBCollection> pNewDBCollection,
829 bool bRemoveAutoFilter = false );
830 const ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const;
831 ScDBData* GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion);
832 SC_DLLPUBLIC const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
833 SC_DLLPUBLIC ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
837 SC_DLLPUBLIC const ScRangeData* GetRangeAtBlock( const ScRange& rBlock, OUString& rName,
838 bool* pSheetLocal = nullptr ) const;
840 SC_DLLPUBLIC bool HasPivotTable() const;
843 SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
845 {
846 return GetDPAtCursor(rAddress.Col(), rAddress.Row(), rAddress.Tab());
847 }
849 {
850 return GetDPAtCursor(rAddress) != nullptr;
851 }
852 ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const;
856 void EnsureGraphicNames();
858 SdrObject* GetObjectAtPoint( SCTAB nTab, const Point& rPos );
859 bool HasChartAtPoint( SCTAB nTab, const Point& rPos, OUString& rName );
861 css::uno::Reference< css::chart2::XChartDocument > GetChartByName( std::u16string_view rChartName );
863 SC_DLLPUBLIC void GetChartRanges( std::u16string_view rChartName, std::vector< ScRangeList >& rRanges, const ScDocument& rSheetNameDoc );
864 void SetChartRanges( std::u16string_view rChartName, const std::vector< ScRangeList >& rRanges );
866 void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea,
867 bool bColHeaders, bool bRowHeaders, bool bAdd );
868 void UpdateChartArea( const OUString& rChartName,
869 const ScRangeListRef& rNewList,
870 bool bColHeaders, bool bRowHeaders, bool bAdd );
871 void GetOldChartParameters( std::u16string_view rName,
872 ScRangeList& rRanges, bool& rColHeaders, bool& rRowHeaders );
873 css::uno::Reference<
874 css::embed::XEmbeddedObject >
875 FindOleObjectByName( std::u16string_view rName );
877 SC_DLLPUBLIC void MakeTable( SCTAB nTab,bool _bNeedsNameCheck = true );
879 SCTAB GetVisibleTab() const { return nVisibleTab; }
881 SCCOL GetPosLeft() const { return nPosLeft; }
882 SC_DLLPUBLIC void SetPosLeft(SCCOL nCol) { nPosLeft = nCol; }
883 SCROW GetPosTop() const { return nPosTop; }
884 SC_DLLPUBLIC void SetPosTop(SCROW nRow) { nPosTop = nRow; }
886 SC_DLLPUBLIC bool HasTable( SCTAB nTab ) const;
887 SC_DLLPUBLIC bool GetHashCode( SCTAB nTab, sal_Int64& rHashCode) const;
888 SC_DLLPUBLIC bool GetName( SCTAB nTab, OUString& rName ) const;
889 SC_DLLPUBLIC bool GetCodeName( SCTAB nTab, OUString& rName ) const;
890 SC_DLLPUBLIC bool SetCodeName( SCTAB nTab, const OUString& rName );
891 SC_DLLPUBLIC bool GetTable( const OUString& rName, SCTAB& rTab ) const;
892 SC_DLLPUBLIC SCCOL MaxCol() const { return mxSheetLimits->mnMaxCol; }
893 SC_DLLPUBLIC SCROW MaxRow() const { return mxSheetLimits->mnMaxRow; }
894 SC_DLLPUBLIC SCCOL GetMaxColCount() const { return mxSheetLimits->GetMaxColCount(); }
895 SC_DLLPUBLIC SCROW GetMaxRowCount() const { return mxSheetLimits->GetMaxRowCount(); }
896 SC_DLLPUBLIC OUString MaxRowAsString() const { return mxSheetLimits->MaxRowAsString(); }
897 SC_DLLPUBLIC OUString MaxColAsString() const { return mxSheetLimits->MaxColAsString(); }
899 [[nodiscard]] bool ValidCol(SCCOL nCol) const { return ::ValidCol(nCol, mxSheetLimits->mnMaxCol); }
900 [[nodiscard]] bool ValidRow(SCROW nRow) const { return ::ValidRow(nRow, mxSheetLimits->mnMaxRow); }
901 [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return ::ValidColRow(nCol, nRow, MaxCol(), MaxRow()); }
902 [[nodiscard]] bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const { return ::ValidColRowTab(nCol, nRow, nTab, MaxCol(), MaxRow()); }
903 [[nodiscard]] bool ValidRange(const ScRange& rRange) const { return ::ValidRange(rRange, MaxCol(), MaxRow()); }
904 [[nodiscard]] bool ValidAddress(const ScAddress& rAddress) const { return ::ValidAddress(rAddress, MaxCol(), MaxRow()); }
905 [[nodiscard]] SCCOL SanitizeCol( SCCOL nCol ) const { return ::SanitizeCol(nCol, MaxCol()); }
906 [[nodiscard]] SCROW SanitizeRow( SCROW nRow ) const { return ::SanitizeRow(nRow, MaxRow()); }
908 SC_DLLPUBLIC std::vector<OUString> GetAllTableNames() const;
910 OUString GetCopyTabName(SCTAB nTab) const;
912 SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr<ScDBData> pDBData);
919 SC_DLLPUBLIC void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
926 SC_DLLPUBLIC void SetDocProtection(const ScDocProtection* pProtect);
927 SC_DLLPUBLIC bool IsDocProtected() const;
928 bool IsDocEditable() const;
929 SC_DLLPUBLIC bool IsTabProtected( SCTAB nTab ) const;
931 SC_DLLPUBLIC void SetTabProtection(SCTAB nTab, const ScTableProtection* pProtect);
932 void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest);
934 void LockTable(SCTAB nTab);
935 void UnlockTable(SCTAB nTab);
937 bool IsBlockEditable( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow,
938 SCCOL nEndCol, SCROW nEndRow,
939 bool* pOnlyNotBecauseOfMatrix = nullptr,
940 bool bNoMatrixAtAll = false ) const;
941 bool IsSelectionEditable( const ScMarkData& rMark,
942 bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
943 bool HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nStartRow,
944 SCCOL nEndCol, SCROW nEndRow,
945 const ScMarkData& rMark ) const;
947 bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd ) const;
948 bool IsEditActionAllowed( sc::ColRowEditAction eAction, const ScMarkData& rMark, SCCOLROW nStart, SCCOLROW nEnd ) const;
950 SC_DLLPUBLIC bool GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMatrix );
952 bool IsEmbedded() const { return bIsEmbedded;}
953 void GetEmbedded( ScRange& rRange ) const;
954 void SetEmbedded( const ScRange& rRange );
955 void ResetEmbedded();
956 tools::Rectangle GetEmbeddedRect() const; // 1/100 mm
957 void SetEmbedded( SCTAB nTab, const tools::Rectangle& rRect ); // from VisArea (1/100 mm)
959 static SC_DLLPUBLIC bool ValidTabName( const OUString& rName );
961 SC_DLLPUBLIC bool ValidNewTabName( const OUString& rName ) const;
962 SC_DLLPUBLIC void CreateValidTabName(OUString& rName) const;
963 SC_DLLPUBLIC void CreateValidTabNames(std::vector<OUString>& aNames, SCTAB nCount) const;
965 void AppendTabOnLoad(const OUString& rName);
966 void SetTabNameOnLoad(SCTAB nTab, const OUString& rName);
969 SC_DLLPUBLIC bool InsertTab( SCTAB nPos, const OUString& rName,
970 bool bExternalDocument = false, bool bUndoDeleteTab = false );
972 SC_DLLPUBLIC bool InsertTabs( SCTAB nPos, const std::vector<OUString>& rNames,
973 bool bNamesValid = false );
974 SC_DLLPUBLIC bool DeleteTabs( SCTAB nTab, SCTAB nSheets );
975 SC_DLLPUBLIC bool DeleteTab( SCTAB nTab );
976 SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
977 bool bExternalDocument = false );
978 bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
979 SC_DLLPUBLIC bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
980 const ScMarkData* pOnlyMarked = nullptr );
981 SC_DLLPUBLIC sal_uLong TransferTab(ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
982 bool bInsertNew = true,
983 bool bResultsOnly = false );
984 SC_DLLPUBLIC void TransferDrawPage(const ScDocument& rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos);
985 SC_DLLPUBLIC void SetVisible( SCTAB nTab, bool bVisible );
986 SC_DLLPUBLIC bool IsVisible( SCTAB nTab ) const;
987 bool IsStreamValid( SCTAB nTab ) const;
988 void SetStreamValid( SCTAB nTab, bool bSet, bool bIgnoreLock = false );
989 void LockStreamValid( bool bLock );
991 bool IsPendingRowHeights( SCTAB nTab ) const;
992 void SetPendingRowHeights( SCTAB nTab, bool bSet );
993 SC_DLLPUBLIC void SetLayoutRTL( SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
994 SC_DLLPUBLIC bool IsLayoutRTL( SCTAB nTab ) const;
995 SC_DLLPUBLIC bool IsNegativePage( SCTAB nTab ) const;
996 SC_DLLPUBLIC void SetScenario( SCTAB nTab, bool bFlag );
997 SC_DLLPUBLIC bool IsScenario( SCTAB nTab ) const;
998 SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString& rComment,
999 Color& rColor, ScScenarioFlags &rFlags) const;
1000 SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString& rComment,
1001 const Color& rColor, ScScenarioFlags nFlags);
1002 SC_DLLPUBLIC Color GetTabBgColor( SCTAB nTab ) const;
1003 SC_DLLPUBLIC void SetTabBgColor( SCTAB nTab, const Color& rColor );
1004 SC_DLLPUBLIC bool IsDefaultTabBgColor( SCTAB nTab ) const;
1005 void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const;
1006 SC_DLLPUBLIC bool IsActiveScenario( SCTAB nTab ) const;
1007 SC_DLLPUBLIC void SetActiveScenario( SCTAB nTab, bool bActive ); // only for Undo etc.
1012 bool IsLinked( SCTAB nTab ) const;
1013 SC_DLLPUBLIC OUString GetLinkDoc( SCTAB nTab ) const;
1014 OUString GetLinkFlt( SCTAB nTab ) const;
1015 OUString GetLinkOpt( SCTAB nTab ) const;
1016 SC_DLLPUBLIC OUString GetLinkTab( SCTAB nTab ) const;
1017 sal_uLong GetLinkRefreshDelay( SCTAB nTab ) const;
1018 void SetLink( SCTAB nTab, ScLinkMode nMode, const OUString& rDoc,
1019 const OUString& rFilter, const OUString& rOptions,
1020 const OUString& rTabName, sal_uLong nRefreshDelay );
1021 bool HasLink( std::u16string_view rDoc,
1022 std::u16string_view rFilter, std::u16string_view rOptions ) const;
1023 SC_DLLPUBLIC bool LinkExternalTab( SCTAB& nTab, const OUString& aDocTab,
1024 const OUString& aFileName,
1025 const OUString& aTabName );
1027 bool HasExternalRefManager() const { return bool(pExternalRefMgr); }
1029 bool IsInExternalReferenceMarking() const;
1031 bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos );
1037 bool HasAreaLinks() const;
1039 void UpdateAreaLinks();
1041 // originating DDE links
1044 bool IsInDdeLinkUpdate() const { return nInDdeLinkUpdate != 0; }
1046 SC_DLLPUBLIC void CopyDdeLinks( ScDocument& rDestDoc ) const;
1051 SC_DLLPUBLIC bool FindDdeLink( std::u16string_view rAppl, std::u16string_view rTopic,
1052 std::u16string_view rItem, sal_uInt8 nMode, size_t& rnDdePos );
1060 bool GetDdeLinkData( size_t nDdePos, OUString& rAppl, OUString& rTopic, OUString& rItem ) const;
1065 bool GetDdeLinkMode( size_t nDdePos, sal_uInt8& rnMode ) const;
1069 SC_DLLPUBLIC const ScMatrix* GetDdeLinkResultMatrix( size_t nDdePos ) const;
1074 SC_DLLPUBLIC bool CreateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem, sal_uInt8 nMode, const ScMatrixRef& pResults );
1079 bool SetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults );
1084 SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return mpDrawLayer.get(); }
1085 SfxBroadcaster* GetDrawBroadcaster(); // to avoid header
1086 void BeginDrawUndo();
1088 void BeginUnoRefUndo();
1089 bool HasUnoRefUndo() const { return ( pUnoRefUndoList != nullptr ); }
1090 [[nodiscard]]
1091 std::unique_ptr<ScUnoRefList> EndUnoRefUndo(); // must be deleted by caller!
1092 sal_Int64 GetNewUnoId() { return ++nUnoObjectId; }
1093 void AddUnoRefChange( sal_Int64 nId, const ScRangeList& rOldRanges );
1095 static bool IsChart( const SdrObject* pObject );
1097 void UpdateChartRef( UpdateRefMode eUpdateRefMode,
1098 SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1099 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1100 SCCOL nDx, SCROW nDy, SCTAB nDz );
1102 void SetChartRangeList( std::u16string_view rChartName,
1103 const ScRangeListRef& rNewRangeListRef );
1105 void StartAnimations( SCTAB nTab );
1107 bool HasBackgroundDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1108 bool HasAnyDraw( SCTAB nTab, const tools::Rectangle& rMMRect ) const;
1110 const ScSheetEvents* GetSheetEvents( SCTAB nTab ) const;
1111 void SetSheetEvents( SCTAB nTab, std::unique_ptr<ScSheetEvents> pNew );
1112 bool HasSheetEventScript( SCTAB nTab, ScSheetEventId nEvent, bool bWithVbaEvents = false ) const;
1113 bool HasAnySheetEventScript( ScSheetEventId nEvent, bool bWithVbaEvents = false ) const; // on any sheet
1115 bool HasAnyCalcNotification() const;
1116 bool HasCalcNotification( SCTAB nTab ) const;
1117 void SetCalcNotification( SCTAB nTab );
1120 SC_DLLPUBLIC ScOutlineTable* GetOutlineTable( SCTAB nTab, bool bCreate = false );
1121 bool SetOutlineTable( SCTAB nTab, const ScOutlineTable* pNewOutline );
1123 void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow,
1124 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1126 bool DoSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1127 void RemoveSubTotals( SCTAB nTab, ScSubTotalParam& rParam );
1128 bool TestRemoveSubTotals( SCTAB nTab, const ScSubTotalParam& rParam );
1129 bool HasSubTotalCells( const ScRange& rRange );
1131 SC_DLLPUBLIC void EnsureTable( SCTAB nTab );
1133 // return TRUE = number format is set
1134 SC_DLLPUBLIC bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
1135 const ScSetStringParam * pParam = nullptr );
1136 SC_DLLPUBLIC bool SetString( const ScAddress& rPos, const OUString& rString,
1137 const ScSetStringParam* pParam = nullptr );
1148 SC_DLLPUBLIC bool SetEditText( const ScAddress& rPos, std::unique_ptr<EditTextObject> pEditText );
1149 void SetEditText( const ScAddress& rPos, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
1150 SC_DLLPUBLIC void SetEditText( const ScAddress& rPos, const OUString& rStr );
1151 SC_DLLPUBLIC SCROW GetFirstEditTextRow( const ScRange& rRange ) const;
1157 SC_DLLPUBLIC void SetTextCell( const ScAddress& rPos, const OUString& rStr );
1158 void SetEmptyCell( const ScAddress& rPos );
1159 SC_DLLPUBLIC void SetValue( SCCOL nCol, SCROW nRow, SCTAB nTab, const double& rVal );
1160 SC_DLLPUBLIC void SetValue( const ScAddress& rPos, double fVal );
1161 void SetValues( const ScAddress& rPos, const std::vector<double>& rVals );
1162 void SetError( SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError);
1163 SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const ScTokenArray& rArray );
1164 SC_DLLPUBLIC void SetFormula( const ScAddress& rPos, const OUString& rFormula,
1176 bool SetFormulaCells( const ScAddress& rPos, std::vector<ScFormulaCell*>& rCells );
1181 bool HasFormulaCell( const ScRange& rRange ) const;
1182 SC_DLLPUBLIC void InsertMatrixFormula(SCCOL nCol1, SCROW nRow1,
1183 SCCOL nCol2, SCROW nRow2,
1184 const ScMarkData& rMark,
1185 const OUString& rFormula,
1186 const ScTokenArray* p = nullptr,
1188 SC_DLLPUBLIC void InsertTableOp(const ScTabOpParam& rParam, // multi-operation
1189 SCCOL nCol1, SCROW nRow1,
1190 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark);
1192 SC_DLLPUBLIC OUString GetString( SCCOL nCol, SCROW nRow, SCTAB nTab,
1193 const ScInterpreterContext* pContext = nullptr ) const;
1194 SC_DLLPUBLIC OUString GetString( const ScAddress& rPos,
1195 const ScInterpreterContext* pContext = nullptr ) const;
1205 SC_DLLPUBLIC double* GetValueCell( const ScAddress& rPos );
1210 svl::SharedString GetSharedString( const ScAddress& rPos ) const;
1212 std::shared_ptr<sc::FormulaGroupContext>& GetFormulaGroupContext();
1217 // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
1218 SC_DLLPUBLIC OUString GetInputString( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bForceSystemLocale = false ) const;
1219 FormulaError GetStringForFormula( const ScAddress& rPos, OUString& rString );
1220 SC_DLLPUBLIC double GetValue( const ScAddress& rPos ) const;
1221 SC_DLLPUBLIC double GetValue( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1222 SC_DLLPUBLIC const EditTextObject* GetEditText( const ScAddress& rPos ) const;
1223 void RemoveEditTextCharAttribs( const ScAddress& rPos, const ScPatternAttr& rAttr );
1224 SC_DLLPUBLIC double RoundValueAsShown( double fVal, sal_uInt32 nFormat, const ScInterpreterContext* pContext = nullptr ) const;
1225 SC_DLLPUBLIC sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1226 sal_uInt32 GetNumberFormat( const ScRange& rRange ) const;
1227 SC_DLLPUBLIC sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& ) const;
1228 SC_DLLPUBLIC void SetNumberFormat( const ScAddress& rPos, sal_uInt32 nNumberFormat );
1230 void GetNumberFormatInfo( const ScInterpreterContext& rContext, SvNumFormatType& nType, sal_uInt32& nIndex, const ScAddress& rPos ) const;
1231 SC_DLLPUBLIC const ScFormulaCell* GetFormulaCell( const ScAddress& rPos ) const;
1233 SC_DLLPUBLIC OUString GetFormula( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1234 SC_DLLPUBLIC CellType GetCellType( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1235 SC_DLLPUBLIC CellType GetCellType( const ScAddress& rPos ) const;
1237 SC_DLLPUBLIC bool HasData( SCCOL nCol, SCROW nRow, SCTAB nTab );
1238 SC_DLLPUBLIC bool HasStringData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1239 SC_DLLPUBLIC bool HasValueData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1240 SC_DLLPUBLIC bool HasValueData( const ScAddress& rPos ) const;
1241 bool HasStringCells( const ScRange& rRange ) const;
1244 bool HasSelectionData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1245 bool HasValidationData( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1255 // Spaklines
1257 SC_DLLPUBLIC std::shared_ptr<sc::Sparkline> GetSparkline(ScAddress const & rPosition);
1258 SC_DLLPUBLIC bool HasSparkline(ScAddress const & rPosition);
1259 SC_DLLPUBLIC sc::Sparkline* CreateSparkline(ScAddress const & rPosition, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup);
1261 SC_DLLPUBLIC bool DeleteSparkline(ScAddress const& rPosition);
1267 SC_DLLPUBLIC bool GetSparklineGroupInRange(ScRange const& rRange, std::shared_ptr<sc::SparklineGroup>& rGroup);
1268 SC_DLLPUBLIC bool HasOneSparklineGroup(ScRange const& rRange);
1269 SC_DLLPUBLIC std::shared_ptr<sc::SparklineGroup> SearchSparklineGroup(tools::Guid const& rGuid);
1271 // Notes
1272 SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
1273 SC_DLLPUBLIC ScPostIt* GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab);
1274 void SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote);
1275 void SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote);
1276 SC_DLLPUBLIC bool HasNote(const ScAddress& rPos) const;
1277 bool HasNote(SCCOL nCol, SCROW nRow, SCTAB nTab) const;
1278 bool HasNote(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const;
1279 SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const;
1280 SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const;
1281 bool HasNotes() const;
1282 SC_DLLPUBLIC std::unique_ptr<ScPostIt> ReleaseNote(const ScAddress& rPos);
1285 size_t GetNoteCount( SCTAB nTab, SCCOL nCol ) const;
1291 void CreateAllNoteCaptions();
1292 void ForgetNoteCaptions( const ScRangeList& rRanges, bool bPreserveData );
1295 ScAddress GetNotePosition( size_t nIndex ) const;
1296 ScAddress GetNotePosition( size_t nIndex, SCTAB nTab ) const;
1297 SCROW GetNotePosition( SCTAB nTab, SCCOL nCol, size_t nIndex ) const;
1299 SC_DLLPUBLIC void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
1300 SC_DLLPUBLIC void GetAllNoteEntries( SCTAB nTab, std::vector<sc::NoteEntry>& rNotes ) const;
1301 void GetNotesInRange( const ScRangeList& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
1303 bool ContainsNotesInRange( const ScRangeList& rRange ) const;
1307 bool IsMerged( const ScAddress& rPos ) const;
1309 void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow,
1310 SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark,
1311 bool bRefresh = false );
1312 SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
1313 SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab,
1314 bool bRefresh = false );
1315 bool ExtendMerge( ScRange& rRange, bool bRefresh = false );
1316 SC_DLLPUBLIC void ExtendTotalMerge( ScRange& rRange ) const;
1317 SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
1318 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1319 SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const;
1321 bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow,
1322 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1324 SC_DLLPUBLIC void DoMergeContents( SCCOL nStartCol, SCROW nStartRow,
1325 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1326 SC_DLLPUBLIC void DoEmptyBlock( SCCOL nStartCol, SCROW nStartRow,
1327 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab );
1328 // without checking:
1329 SC_DLLPUBLIC void DoMerge( SCCOL nStartCol, SCROW nStartRow,
1330 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bDeleteCaptions = true );
1331 void RemoveMerge( SCCOL nCol, SCROW nRow, SCTAB nTab );
1333 // This also includes e.g. notes. Use IsEmptyData() for cell data only.
1334 bool IsBlockEmpty( SCCOL nStartCol, SCROW nStartRow,
1335 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const;
1336 bool IsPrintEmpty( SCCOL nStartCol, SCROW nStartRow,
1337 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1338 bool bLeftIsEmpty = false,
1339 ScRange* pLastRange = nullptr,
1340 tools::Rectangle* pLastMM = nullptr ) const;
1342 void SkipOverlapped( SCCOL& rCol, SCROW& rRow, SCTAB nTab ) const;
1343 bool IsHorOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1344 bool IsVerOverlapped( SCCOL nCol, SCROW nRow, SCTAB nTab,
1345 SCROW* nStartRow = nullptr, SCROW* nEndRow = nullptr ) const;
1347 SC_DLLPUBLIC bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1348 SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask ) const;
1349 SC_DLLPUBLIC bool HasAttrib( const ScRange& rRange, HasAttrFlags nMask ) const;
1350 bool HasAttrib( SCCOL nCol, SCROW nRow, SCTAB nTab, HasAttrFlags nMask,
1351 SCROW* nStartRow = nullptr, SCROW* nEndRow = nullptr ) const;
1353 SC_DLLPUBLIC void GetBorderLines( SCCOL nCol, SCROW nRow, SCTAB nTab,
1354 const ::editeng::SvxBorderLine** ppLeft,
1355 const ::editeng::SvxBorderLine** ppTop,
1356 const ::editeng::SvxBorderLine** ppRight,
1357 const ::editeng::SvxBorderLine** ppBottom ) const;
1359 void ResetChanged( const ScRange& rRange );
1363 void SetDirty( const ScRange&, bool bIncludeEmptyCells );
1364 void SetTableOpDirty( const ScRange& ); // for Interpreter TableOp
1365 void InterpretDirtyCells( const ScRangeList& rRanges );
1366 // Interprets cells that have NeedsInterpret(), i.e. the same like calling MaybeInterpret() on them.
1367 // Returns false if some couldn't be interpreted (i.e. they still have NeedsInterpret()).
1368 // Useful to ensure that the given cells will not need interpreting.
1369 bool InterpretCellsIfNeeded( const ScRangeList& rRanges );
1370 SC_DLLPUBLIC void CalcAll();
1371 SC_DLLPUBLIC void CalcAfterLoad( bool bStartListening = true );
1372 void CompileAll();
1373 void CompileXML();
1385 bool CompileErrorCells(FormulaError nErrCode);
1388 void SetPreviewFont( std::unique_ptr<SfxItemSet> pFontSet );
1390 SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab );
1392 void SetPreviewSelection( const ScMarkData& rSel );
1394 ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab );
1396 SC_DLLPUBLIC void SetAutoNameCache( std::unique_ptr<ScAutoNameCache> pCache );
1400 ScLookupCache & GetLookupCache( const ScRange & rRange, ScInterpreterContext* pContext );
1401 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const ScQueryParam& param,
1402 ScInterpreterContext* pContext );
1405 void RemoveLookupCache( ScLookupCache & rCache );
1408 void ClearLookupCaches();
1410 // calculate automatically
1411 SC_DLLPUBLIC void SetAutoCalc( bool bNewAutoCalc );
1412 SC_DLLPUBLIC bool GetAutoCalc() const { return bAutoCalc; }
1413 // calculate automatically in/from/for ScDocShell disabled
1416 // ForcedFormulas are to be calculated
1419 // if CalcFormulaTree() is currently running
1423 void DelayFormulaGrouping( bool delay );
1426 void AddDelayedFormulaGroupingCell( const ScFormulaCell* cell );
1430 void EnableDelayStartListeningFormulaCells( ScColumn* column, bool delay );
1434 bool CanDelayStartListeningFormulaCells( ScColumn* column, SCROW row1, SCROW row2 );
1437 void EnableDelayDeletingBroadcasters(bool set);
1440 FormulaError GetErrCode( const ScAddress& ) const;
1454 bool ShrinkToDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
1475 bool ShrinkToUsedDataArea( bool& o_bShrunk,
1476 SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1477 SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
1478 bool bStickyTopRow = false, bool bStickyLeftCol = false,
1479 ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
1491 SC_DLLPUBLIC SCROW GetLastDataRow( SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow ) const;
1506 SC_DLLPUBLIC void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1507 SCCOL& rEndCol, SCROW& rEndRow,
1508 bool bIncludeOld, bool bOnlyDown ) const;
1517 bool GetDataAreaSubrange(ScRange& rRange) const;
1519 SC_DLLPUBLIC bool GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const;
1520 SC_DLLPUBLIC bool GetTableArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1521 bool bCalcHiddens = false) const;
1522 SC_DLLPUBLIC bool GetPrintArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow,
1523 bool bNotes = true) const;
1524 SC_DLLPUBLIC bool GetPrintAreaHor( SCTAB nTab, SCROW nStartRow, SCROW nEndRow,
1525 SCCOL& rEndCol ) const;
1526 SC_DLLPUBLIC bool GetPrintAreaVer( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol,
1527 SCROW& rEndRow, bool bNotes ) const;
1528 void InvalidateTableArea();
1531 SC_DLLPUBLIC void GetTiledRenderingArea(SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow) const;
1533 SC_DLLPUBLIC bool GetDataStart( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow ) const;
1540 void ExtendPrintArea( OutputDevice* pDev, SCTAB nTab,
1541 SCCOL nStartCol, SCROW nStartRow,
1542 SCCOL& rEndCol, SCROW nEndRow ) const;
1543 SC_DLLPUBLIC bool IsEmptyData(SCCOL nStartCol, SCROW nStartRow,
1544 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const;
1545 // I think this returns the number of empty cells starting from the given direction.
1546 SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab,
1547 SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab,
1548 ScDirection eDir );
1550 void FindAreaPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, ScMoveDirection eDirection ) const;
1551 SC_DLLPUBLIC void GetNextPos( SCCOL& rCol, SCROW& rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY,
1552 bool bMarked, bool bUnprotected, const ScMarkData& rMark,
1553 SCCOL nTabStartCol = SC_TABSTART_NONE ) const;
1555 bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab,
1556 const ScMarkData& rMark );
1558 void LimitChartArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow,
1559 SCCOL& rEndCol, SCROW& rEndRow );
1560 void LimitChartIfAll( ScRangeListRef& rRangeList );
1562 bool InsertRow( SCCOL nStartCol, SCTAB nStartTab,
1563 SCCOL nEndCol, SCTAB nEndTab,
1564 SCROW nStartRow, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1565 const ScMarkData* pTabMark = nullptr );
1566 SC_DLLPUBLIC bool InsertRow( const ScRange& rRange );
1567 void DeleteRow( SCCOL nStartCol, SCTAB nStartTab,
1568 SCCOL nEndCol, SCTAB nEndTab,
1569 SCROW nStartRow, SCSIZE nSize,
1570 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1571 const ScMarkData* pTabMark = nullptr );
1572 SC_DLLPUBLIC void DeleteRow( const ScRange& rRange );
1573 bool InsertCol( SCROW nStartRow, SCTAB nStartTab,
1574 SCROW nEndRow, SCTAB nEndTab,
1575 SCCOL nStartCol, SCSIZE nSize, ScDocument* pRefUndoDoc = nullptr,
1576 const ScMarkData* pTabMark = nullptr );
1577 SC_DLLPUBLIC bool InsertCol( const ScRange& rRange );
1578 void DeleteCol( SCROW nStartRow, SCTAB nStartTab,
1579 SCROW nEndRow, SCTAB nEndTab,
1580 SCCOL nStartCol, SCSIZE nSize,
1581 ScDocument* pRefUndoDoc = nullptr, bool* pUndoOutline = nullptr,
1582 const ScMarkData* pTabMark = nullptr );
1583 void DeleteCol( const ScRange& rRange );
1585 bool CanInsertRow( const ScRange& rRange ) const;
1586 bool CanInsertCol( const ScRange& rRange ) const;
1588 void FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear = true );
1589 bool CanFitBlock( const ScRange& rOld, const ScRange& rNew );
1591 bool IsClipOrUndo() const { return bIsClip || bIsUndo; }
1592 bool IsUndo() const { return bIsUndo; }
1593 bool IsClipboard() const { return bIsClip; }
1594 bool IsUndoEnabled() const { return mbUndoEnabled; }
1595 SC_DLLPUBLIC void EnableUndo( bool bVal );
1596 bool IsFunctionAccess() const { return bIsFunctionAccess; }
1598 bool IsAdjustHeightLocked() const { return nAdjustHeightLock != 0; }
1602 void EnableExecuteLink( bool bVal ) { mbExecuteLinkEnabled = bVal; }
1604 void EnableChangeReadOnly( bool bVal ) { mbChangeReadOnlyEnabled = bVal; }
1606 SC_DLLPUBLIC void EnableUserInteraction( bool bVal );
1609 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, const ScMarkData* pMarks );
1610 SC_DLLPUBLIC void ResetClip( ScDocument* pSourceDoc, SCTAB nTab );
1611 void SetCutMode( bool bCut );
1612 bool IsCutMode();
1613 void SetClipArea( const ScRange& rArea, bool bCut = false );
1615 SC_DLLPUBLIC bool IsDocVisible() const { return bIsVisible; }
1616 SC_DLLPUBLIC void SetDocVisible( bool bSet );
1618 bool HasOLEObjectsInArea( const ScRange& rRange, const ScMarkData* pTabMark = nullptr );
1620 void DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1621 const ScMarkData& rMark, bool bAnchored = false );
1622 void DeleteObjectsInSelection( const ScMarkData& rMark );
1624 SC_DLLPUBLIC void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1625 InsertDeleteFlags nDelFlag, bool bBroadcast = true,
1626 sc::ColumnSpanSet* pBroadcastSpans = nullptr );
1628 SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1629 SCTAB nTab, InsertDeleteFlags nDelFlag);
1630 void DeleteAreaTab(const ScRange& rRange, InsertDeleteFlags nDelFlag);
1632 SC_DLLPUBLIC void CopyToClip( const ScClipParam& rClipParam, ScDocument* pClipDoc,
1633 const ScMarkData* pMarks, bool bKeepScenarioFlags,
1634 bool bIncludeObjects );
1645 SC_DLLPUBLIC void CopyStaticToDocument(const ScRange& rSrcRange, SCTAB nDestTab, ScDocument& rDestDoc);
1654 void CopyCellToDocument( const ScAddress& rSrcPos, const ScAddress& rDestPos, ScDocument& rDestDoc );
1656 void CopyTabToClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1657 SCTAB nTab, ScDocument* pClipDoc);
1662 sc::ColumnSpanSet& rBroadcastSpans );
1665 SCCOL nCol2, SCROW nRow2 );
1666 void CopyBlockFromClip( sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1,
1667 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark,
1668 SCCOL nDx, SCROW nDy );
1673 SCCOL nCol2, SCROW nRow2, const ScMarkData& rMark, SCCOL nDx,
1674 SCROW& rClipStartRow, SCROW nClipEndRow);
1678 SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1679 void StartListeningFromClip( SCCOL nCol1, SCROW nRow1,
1680 SCCOL nCol2, SCROW nRow2,
1681 const ScMarkData& rMark, InsertDeleteFlags nInsFlag );
1683 void SetDirtyFromClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1684 const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1685 sc::ColumnSpanSet& rBroadcastSpans );
1699 const ScRange& rDestRange, const ScMarkData& rMark, InsertDeleteFlags nInsFlag,
1700 ScDocument* pRefUndoDoc, ScDocument* pClipDoc,
1701 bool bResetCut = true, bool bAsLink = false,
1702 bool bIncludeFiltered = true, bool bSkipEmptyCells = false,
1703 const ScRangeList* pDestRanges = nullptr );
1705 void CopyMultiRangeFromClip(const ScAddress& rDestPos, const ScMarkData& rMark,
1706 InsertDeleteFlags nInsFlag, ScDocument* pClipDoc,
1707 bool bResetCut = true, bool bAsLink = false,
1708 bool bIncludeFiltered = true,
1709 bool bSkipAttrForEmpty = false);
1711 void GetClipArea(SCCOL& nClipX, SCROW& nClipY, bool bIncludeFiltered);
1712 void GetClipStart(SCCOL& nClipX, SCROW& nClipY);
1714 bool HasClipFilteredRows();
1716 bool IsClipboardSource() const;
1718 SC_DLLPUBLIC void TransposeClip(ScDocument* pTransClip, InsertDeleteFlags nFlags, bool bAsLink,
1719 bool bIncludeFiltered);
1722 void SetClipParam(const ScClipParam& rParam);
1731 void MixDocument( const ScRange& rRange, ScPasteFunc nFunction, bool bSkipEmpty,
1732 ScDocument& rSrcDoc );
1734 void FillTab( const ScRange& rSrcArea, const ScMarkData& rMark,
1735 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1736 bool bSkipEmpty, bool bAsLink );
1737 void FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark,
1738 InsertDeleteFlags nFlags, ScPasteFunc nFunction,
1739 bool bSkipEmpty, bool bAsLink );
1741 void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType );
1743 SC_DLLPUBLIC void InitUndo( const ScDocument& rSrcDoc, SCTAB nTab1, SCTAB nTab2,
1744 bool bColInfo = false, bool bRowInfo = false );
1745 void AddUndoTab( SCTAB nTab1, SCTAB nTab2,
1746 bool bColInfo = false, bool bRowInfo = false );
1747 SC_DLLPUBLIC void InitUndoSelected( const ScDocument& rSrcDoc, const ScMarkData& rTabSelection,
1748 bool bColInfo = false, bool bRowInfo = false );
1750 // don't use anymore:
1751 void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1752 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1753 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1754 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1755 void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
1756 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
1757 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1759 SC_DLLPUBLIC void CopyToDocument(const ScRange& rRange,
1760 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc,
1761 const ScMarkData* pMarks = nullptr, bool bColRowFlags = true);
1762 void UndoToDocument(const ScRange& rRange,
1763 InsertDeleteFlags nFlags, bool bMarked, ScDocument& rDestDoc);
1765 void CopyScenario( SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario = false );
1766 bool TestCopyScenario( SCTAB nSrcTab, SCTAB nDestTab ) const;
1767 void MarkScenario(SCTAB nSrcTab, SCTAB nDestTab,
1768 ScMarkData& rDestMark, bool bResetMark = true,
1769 ScScenarioFlags nNeededBits = ScScenarioFlags::NONE) const;
1770 bool HasScenarioRange( SCTAB nTab, const ScRange& rRange ) const;
1771 SC_DLLPUBLIC const ScRangeList* GetScenarioRanges( SCTAB nTab ) const;
1773 SC_DLLPUBLIC void CopyUpdated( ScDocument* pPosDoc, ScDocument* pDestDoc );
1776 pUndoDoc = nullptr, bool bIncludeDraw = true,
1777 bool bUpdateNoteCaptionPos = true );
1782 SC_DLLPUBLIC void UpdateTranspose( const ScAddress& rDestPos, ScDocument* pClipDoc,
1783 const ScMarkData& rMark, ScDocument* pUndoDoc );
1785 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
1787 SC_DLLPUBLIC void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1788 ScProgress* pProgress, const ScMarkData& rMark,
1789 sal_uInt64 nFillCount, FillDir eFillDir = FILL_TO_BOTTOM,
1790 FillCmd eFillCmd = FILL_LINEAR, FillDateCmd eFillDateCmd = FILL_DAY,
1791 double nStepValue = 1.0, double nMaxValue = 1E307 );
1792 OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
1795 const ScAddress& rCursor, const ScMarkData& rMark,
1796 double& rResult );
1798 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1799 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1800 {
1801 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich)));
1802 }
1803 SC_DLLPUBLIC const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich,
1804 SCROW& nStartRow, SCROW& nEndRow ) const;
1805 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich,
1806 SCROW& nStartRow, SCROW& nEndRow ) const
1807 {
1808 return static_cast<const T*>(GetAttr(nCol, nRow, nTab, sal_uInt16(nWhich), nStartRow, nEndRow));
1809 }
1810 SC_DLLPUBLIC const SfxPoolItem* GetAttr( const ScAddress& rPos, sal_uInt16 nWhich ) const;
1811 template<class T> const T* GetAttr( const ScAddress& rPos, TypedWhichId<T> nWhich ) const
1812 {
1813 return static_cast<const T*>(GetAttr(rPos, sal_uInt16(nWhich)));
1814 }
1815 SC_DLLPUBLIC const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1816 SC_DLLPUBLIC const ScPatternAttr* GetPattern( const ScAddress& rPos ) const;
1817 SC_DLLPUBLIC const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
1818 const ScPatternAttr* GetSelectionPattern( const ScMarkData& rMark );
1819 std::unique_ptr<ScPatternAttr> CreateSelectionPattern( const ScMarkData& rMark, bool bDeep = true );
1820 SC_DLLPUBLIC void AddCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1821 void RemoveCondFormatData( const ScRangeList& rRange, SCTAB nTab, sal_uInt32 nIndex );
1824 // pCell is an optimization, must point to rPos
1825 SC_DLLPUBLIC const SfxItemSet* GetCondResult( SCCOL nCol, SCROW nRow, SCTAB nTab,
1826 ScRefCellValue* pCell = nullptr ) const;
1827 const SfxItemSet* GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos,
1828 const ScConditionalFormatList& rList,
1829 const ScCondFormatIndexes& rIndex ) const;
1830 const SfxPoolItem* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich ) const;
1831 template<class T> const T* GetEffItem( SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId<T> nWhich ) const
1832 {
1833 return static_cast<const T*>(GetEffItem(nCol, nRow, nTab, sal_uInt16(nWhich)));
1834 }
1836 SC_DLLPUBLIC const css::uno::Reference< css::i18n::XBreakIterator >& GetBreakIterator();
1837 bool HasStringWeakCharacters( const OUString& rString );
1838 SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
1839 // pCell is an optimization, must point to rPos
1840 SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
1841 const ScRefCellValue* pCell = nullptr );
1842 // pCell is an optimization, must point to nCol,nRow,nTab
1844 const ScRefCellValue* pCell = nullptr );
1845 SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
1848 bool HasDetectiveOperations() const;
1849 void AddDetectiveOperation( const ScDetOpData& rData );
1851 ScDetOpList* GetDetOpList() const { return pDetOpList.get(); }
1852 void SetDetOpList(std::unique_ptr<ScDetOpList> pNew);
1854 bool HasDetectiveObjects(SCTAB nTab) const;
1856 void GetSelectionFrame( const ScMarkData& rMark,
1857 SvxBoxItem& rLineOuter,
1858 SvxBoxInfoItem& rLineInner );
1859 void ApplySelectionFrame(const ScMarkData& rMark,
1860 const SvxBoxItem& rLineOuter,
1861 const SvxBoxInfoItem* pLineInner);
1862 void ApplyFrameAreaTab(const ScRange& rRange,
1863 const SvxBoxItem& rLineOuter,
1864 const SvxBoxInfoItem& rLineInner);
1866 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
1867 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
1869 SC_DLLPUBLIC sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew, SCTAB nTab );
1870 void DeleteConditionalFormat( sal_uLong nIndex, SCTAB nTab );
1872 void SetCondFormList( ScConditionalFormatList* pList, SCTAB nTab );
1874 SC_DLLPUBLIC const ScValidationData* GetValidationEntry( sal_uInt32 nIndex ) const;
1881 SC_DLLPUBLIC void ApplyAttr( SCCOL nCol, SCROW nRow, SCTAB nTab,
1882 const SfxPoolItem& rAttr );
1883 SC_DLLPUBLIC void ApplyPattern( SCCOL nCol, SCROW nRow, SCTAB nTab,
1884 const ScPatternAttr& rAttr );
1885 SC_DLLPUBLIC void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow,
1886 SCCOL nEndCol, SCROW nEndRow,
1887 const ScMarkData& rMark, const ScPatternAttr& rAttr,
1888 ScEditDataArray* pDataArray = nullptr,
1889 bool* const pIsChanged = nullptr );
1890 SC_DLLPUBLIC void ApplyPatternAreaTab( SCCOL nStartCol, SCROW nStartRow,
1891 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1892 const ScPatternAttr& rAttr );
1895 const ScMarkData& rMark,
1896 const ScPatternAttr& rPattern,
1897 SvNumFormatType nNewType );
1899 void ApplyStyle( SCCOL nCol, SCROW nRow, SCTAB nTab,
1900 const ScStyleSheet& rStyle);
1901 void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow,
1902 SCCOL nEndCol, SCROW nEndRow,
1903 const ScMarkData& rMark, const ScStyleSheet& rStyle);
1904 SC_DLLPUBLIC void ApplyStyleAreaTab( SCCOL nStartCol, SCROW nStartRow,
1905 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab,
1906 const ScStyleSheet& rStyle);
1908 SC_DLLPUBLIC void ApplySelectionStyle( const ScStyleSheet& rStyle, const ScMarkData& rMark );
1909 void ApplySelectionLineStyle( const ScMarkData& rMark,
1910 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
1912 const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ) const;
1913 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark ) const;
1915 void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
1916 OutputDevice* pDev,
1917 double nPPTX, double nPPTY,
1918 const Fraction& rZoomX, const Fraction& rZoomY );
1920 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
1922 SC_DLLPUBLIC bool ApplyFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1923 SCCOL nEndCol, SCROW nEndRow,
1924 SCTAB nTab, ScMF nFlags );
1925 SC_DLLPUBLIC bool RemoveFlagsTab( SCCOL nStartCol, SCROW nStartRow,
1926 SCCOL nEndCol, SCROW nEndRow,
1927 SCTAB nTab, ScMF nFlags );
1929 SC_DLLPUBLIC void SetPattern( const ScAddress&, const ScPatternAttr& rAttr );
1930 SC_DLLPUBLIC const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPatternAttr> pAttr );
1931 SC_DLLPUBLIC const ScPatternAttr* SetPattern( const ScAddress& rPos, std::unique_ptr<ScPatternAttr> pAttr );
1932 SC_DLLPUBLIC void SetPattern( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr& rAttr );
1934 void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1935 sal_uInt16 nFormatNo, const ScMarkData& rMark );
1936 void GetAutoFormatData( SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1937 ScAutoFormatData& rData );
1938 bool SearchAndReplace( const SvxSearchItem& rSearchItem,
1939 SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
1940 const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1941 OUString& rUndoStr, ScDocument* pUndoDoc, bool& bMatchedRangesWereClamped );
1942 static bool IsEmptyCellSearch( const SvxSearchItem& rSearchItem );
1944 // determine Col/Row of subsequent calls
1945 // (e.g. not found from the beginning, or subsequent tables)
1946 // meaning of explanation in "()" was already unclear in German
1947 void GetSearchAndReplaceStart( const SvxSearchItem& rSearchItem,
1948 SCCOL& rCol, SCROW& rRow );
1950 bool Solver( SCCOL nFCol, SCROW nFRow, SCTAB nFTab,
1951 SCCOL nVCol, SCROW nVRow, SCTAB nVTab,
1952 const OUString& sValStr, double& nX);
1954 SC_DLLPUBLIC void ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMarkData& rMark,
1955 ScEditDataArray* pDataArray = nullptr, bool* pIsChanged = nullptr );
1956 SC_DLLPUBLIC void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
1957 void DeleteSelectionTab( SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData& rMark );
1959 SC_DLLPUBLIC void SetColWidth( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1960 SC_DLLPUBLIC void SetColWidthOnly( SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth );
1961 SC_DLLPUBLIC void SetRowHeight( SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight );
1962 SC_DLLPUBLIC void SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1963 sal_uInt16 nNewHeight );
1965 SC_DLLPUBLIC void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
1966 sal_uInt16 nNewHeight );
1967 SC_DLLPUBLIC void SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual );
1969 SC_DLLPUBLIC sal_uInt16 GetColWidth( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1970 SC_DLLPUBLIC tools::Long GetColWidth( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab ) const;
1971 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1972 SC_DLLPUBLIC sal_uInt16 GetRowHeight( SCROW nRow, SCTAB nTab, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
1973 SC_DLLPUBLIC tools::Long GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1980 SCROW GetRowForHeight( SCTAB nTab, tools::Long nHeight ) const;
1981 tools::Long GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
1982 SC_DLLPUBLIC tools::Long GetColOffset( SCCOL nCol, SCTAB nTab, bool bHiddenAsZero = true ) const;
1983 SC_DLLPUBLIC tools::Long GetRowOffset( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
1985 SC_DLLPUBLIC sal_uInt16 GetOriginalWidth( SCCOL nCol, SCTAB nTab ) const;
1986 SC_DLLPUBLIC sal_uInt16 GetOriginalHeight( SCROW nRow, SCTAB nTab ) const;
1988 sal_uInt16 GetCommonWidth( SCCOL nEndCol, SCTAB nTab ) const;
1990 SCROW GetHiddenRowCount( SCROW nRow, SCTAB nTab ) const;
1992 sal_uInt16 GetOptimalColWidth( SCCOL nCol, SCTAB nTab, OutputDevice* pDev,
1993 double nPPTX, double nPPTY,
1994 const Fraction& rZoomX, const Fraction& rZoomY,
1995 bool bFormula,
1996 const ScMarkData* pMarkData = nullptr,
1997 const ScColWidthParam* pParam = nullptr );
2000 SCROW nEndRow, SCTAB nTab, bool bApi );
2002 void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
2004 tools::Long GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
2005 OutputDevice* pDev,
2006 double nPPTX, double nPPTY,
2007 const Fraction& rZoomX, const Fraction& rZoomY,
2008 bool bWidth, bool bTotalSize = false,
2009 bool bInPrintTwips = false );
2011 SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow);
2012 SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow);
2013 SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow);
2014 SC_DLLPUBLIC void SetRowFlags( SCROW nRow, SCTAB nTab, CRFlags nNewFlags );
2015 SC_DLLPUBLIC void SetRowFlags( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, CRFlags nNewFlags );
2017 SC_DLLPUBLIC CRFlags GetColFlags( SCCOL nCol, SCTAB nTab ) const;
2018 SC_DLLPUBLIC CRFlags GetRowFlags( SCROW nRow, SCTAB nTab ) const;
2020 SC_DLLPUBLIC void GetAllRowBreaks(std::set<SCROW>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2021 SC_DLLPUBLIC void GetAllColBreaks(std::set<SCCOL>& rBreaks, SCTAB nTab, bool bPage, bool bManual) const;
2024 SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2025 SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2026 void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual);
2027 void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual);
2028 css::uno::Sequence<
2029 css::sheet::TablePageBreakData> GetRowBreakData(SCTAB nTab) const;
2031 SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2032 SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2033 SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
2034 SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden);
2035 SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden);
2036 SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2037 SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2038 SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2040 SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
2041 bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2042 bool ColFiltered(SCCOL nCol, SCTAB nTab) const;
2043 SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered);
2044 SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2045 SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2046 SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const;
2048 SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const;
2050 bool HasUniformRowHeight( SCTAB nTab, SCROW nRow1, SCROW nRow2 ) const;
2057 void SyncColRowFlags();
2071 // returns whether to export a Default style for this col or not
2072 // nDefault is set to one position in the current row where the Default style is
2073 void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault);
2075 bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow );
2076 bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow );
2078 void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2079 void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab );
2084 void GetUnprotectedCells( ScRangeList& rRange, SCTAB nTab ) const;
2086 // PageStyle:
2087 SC_DLLPUBLIC OUString GetPageStyle( SCTAB nTab ) const;
2088 SC_DLLPUBLIC void SetPageStyle( SCTAB nTab, const OUString& rName );
2089 Size GetPageSize( SCTAB nTab ) const;
2090 void SetPageSize( SCTAB nTab, const Size& rSize );
2091 void SetRepeatArea( SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
2092 void InvalidatePageBreaks(SCTAB nTab);
2093 void UpdatePageBreaks( SCTAB nTab, const ScRange* pUserArea = nullptr );
2094 void RemoveManualBreaks( SCTAB nTab );
2095 bool HasManualBreaks( SCTAB nTab ) const;
2097 bool IsPageStyleInUse( std::u16string_view rStrPageStyle, SCTAB* pInTab );
2098 bool RemovePageStyleInUse( std::u16string_view rStrPageStyle );
2099 bool RenamePageStyleInUse( std::u16string_view rOld, const OUString& rNew );
2100 void ModifyStyleSheet( SfxStyleSheetBase& rPageStyle,
2101 const SfxItemSet& rChanges );
2103 void PageStyleModified( SCTAB nTab, const OUString& rNewName );
2105 SC_DLLPUBLIC bool NeedPageResetAfterTab( SCTAB nTab ) const;
2107 // Was stored in PageStyle previously. Now it exists for every table:
2109 SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount( SCTAB nTab );
2110 SC_DLLPUBLIC const ScRange* GetPrintRange( SCTAB nTab, sal_uInt16 nPos );
2111 SC_DLLPUBLIC std::optional<ScRange> GetRepeatColRange( SCTAB nTab );
2112 SC_DLLPUBLIC std::optional<ScRange> GetRepeatRowRange( SCTAB nTab );
2114 bool IsPrintEntireSheet( SCTAB nTab ) const;
2117 SC_DLLPUBLIC void ClearPrintRanges( SCTAB nTab );
2119 SC_DLLPUBLIC void AddPrintRange( SCTAB nTab, const ScRange& rNew );
2122 SC_DLLPUBLIC void SetRepeatColRange( SCTAB nTab, std::optional<ScRange> oNew );
2123 SC_DLLPUBLIC void SetRepeatRowRange( SCTAB nTab, std::optional<ScRange> oNew );
2124 std::unique_ptr<ScPrintRangeSaver> CreatePrintRangeSaver() const;
2125 void RestorePrintRanges( const ScPrintRangeSaver& rSaver );
2127 SC_DLLPUBLIC tools::Rectangle GetMMRect( SCCOL nStartCol, SCROW nStartRow,
2128 SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
2129 SC_DLLPUBLIC ScRange GetRange( SCTAB nTab, const tools::Rectangle& rMMRect, bool bHiddenAsZero = true ) const;
2131 void UpdStlShtPtrsFrmNms();
2132 void StylesToNames();
2134 SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument& rSrcDoc );
2136 static sal_uInt16 GetSrcVersion() { return nSrcVer; }
2138 void SetSrcCharSet( rtl_TextEncoding eNew ) { eSrcSet = eNew; }
2139 void UpdateFontCharSet();
2141 void FillInfo( ScTableInfo& rTabInfo, SCCOL nCol1, SCROW nRow1,
2142 SCCOL nCol2, SCROW nRow2, SCTAB nTab, double fColScale,
2143 double fRowScale, bool bPageMode, bool bFormulaMode,
2144 const ScMarkData* pMarkData = nullptr );
2149 void Sort( SCTAB nTab, const ScSortParam& rSortParam,
2150 bool bKeepQuery, bool bUpdateRefs,
2151 ScProgress* pProgress, sc::ReorderParam* pUndo );
2153 void Reorder( const sc::ReorderParam& rParam );
2155 void PrepareQuery( SCTAB nTab, ScQueryParam& rQueryParam );
2156 SCSIZE Query( SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub );
2157 SC_DLLPUBLIC bool CreateQueryParam( const ScRange& rRange, ScQueryParam& rQueryParam );
2158 OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab);
2166 void GetFilterEntries( SCCOL nCol, SCROW nRow,
2167 SCTAB nTab, ScFilterEntries& rFilterEntries );
2169 SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
2170 SCTAB nTab, bool bCaseSens,
2171 ScFilterEntries& rFilterEntries );
2173 void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab,
2174 std::vector<ScTypedStrData>& rStrings, bool bValidation = false );
2175 void GetFormulaEntries( ScTypedCaseStrSet& rStrings );
2177 bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab );
2178 void GetFilterSelCount( SCCOL nCol, SCROW nRow, SCTAB nTab, SCSIZE& nSelected, SCSIZE& nTotal );
2180 SC_DLLPUBLIC bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2181 SCTAB nTab );
2182 SC_DLLPUBLIC bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
2183 SCTAB nTab );
2185 SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
2186 void SetPrinter( VclPtr<SfxPrinter> const & pNewPrinter );
2188 SC_DLLPUBLIC OutputDevice* GetRefDevice(); // WYSIWYG: Printer, otherwise VirtualDevice...
2190 bool GetNextSpellingCell( SCCOL& nCol, SCROW& nRow, SCTAB nTab,
2191 bool bInSel, const ScMarkData& rMark) const;
2193 void ReplaceStyle( const SvxSearchItem& rSearchItem,
2194 SCCOL nCol, SCROW nRow, SCTAB nTab,
2195 const ScMarkData& rMark);
2197 void InvalidateTextWidth( std::u16string_view rStyleName );
2198 void InvalidateTextWidth( SCTAB nTab );
2199 void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo, bool bNumFormatChanged );
2201 bool IdleCalcTextWidth();
2203 void RepaintRange( const ScRange& rRange );
2204 void RepaintRange( const ScRangeList& rRange );
2206 bool IsIdleEnabled() const { return mbIdleEnabled; }
2207 void EnableIdle(bool bDo) { mbIdleEnabled = bDo; }
2209 bool IsDetectiveDirty() const { return bDetectiveDirty; }
2210 void SetDetectiveDirty(bool bSet) { bDetectiveDirty = bSet; }
2221 // for broadcasting/listening
2224 void SetLoadingMedium( bool bVal );
2225 SC_DLLPUBLIC void SetImportingXML( bool bVal );
2226 bool IsImportingXML() const { return bImportingXML; }
2227 bool IsCalcingAfterLoad() const { return bCalcingAfterLoad; }
2228 void SetNoListening( bool bVal ) { bNoListening = bVal; }
2229 bool GetNoListening() const { return bNoListening; }
2230 ScBroadcastAreaSlotMachine* GetBASM() const { return pBASM.get(); }
2233 void SetChartListenerCollection( std::unique_ptr<ScChartListenerCollection>,
2234 bool bSetChartRangeLists );
2235 void UpdateChart( const OUString& rName );
2236 void RestoreChartListener( const OUString& rName );
2240 void AddOLEObjectToCollection(const OUString& rName);
2245 const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
2246 void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
2249 bool IsValidAsianCompression() const;
2252 bool GetAsianKerning() const;
2253 bool IsValidAsianKerning() const;
2254 void SetAsianKerning(bool bNew);
2257 EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const; // EEHorizontalTextDirection values
2260 void SetLinkMode( ScLkUpdMode nSet ) { eLinkMode = nSet;}
2264 void FillMatrix( ScMatrix& rMat, SCTAB nTab, SCCOL nCol1,
2265 SCROW nRow1, SCCOL nCol2, SCROW nRow2,
2266 svl::SharedStringPool* pPool = nullptr) const;
2276 void SC_DLLPUBLIC SetFormulaResults( const ScAddress& rTopPos, const double* pResults, size_t nLen );
2278 void CalculateInColumnInThread( ScInterpreterContext& rContext, const ScRange& rCalcRange, unsigned nThisThread, unsigned nThreadsTotal);
2279 void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, SCTAB nTab, ScInterpreter* pInterpreter );
2286 void TransferCellValuesTo( const ScAddress& rTopPos, size_t nLen, sc::CellValues& rDest );
2287 void CopyCellValuesFrom( const ScAddress& rTopPos, const sc::CellValues& rSrc );
2289 std::set<Color> GetDocColors();
2292 std::set<SCCOL> QueryColumnsWithFormulaCells( SCTAB nTab ) const;
2300 void CheckIntegrity( SCTAB nTab ) const;
2303 ScDocument(const ScDocument& r) = delete;
2305 void FindMaxRotCol( SCTAB nTab, RowInfo* pRowInfo, SCSIZE nArrCount,
2306 SCCOL nX1, SCCOL nX2 ) const;
2308 sal_uInt16 RowDifferences( SCROW nThisRow, SCTAB nThisTab,
2309 ScDocument& rOtherDoc,
2310 SCROW nOtherRow, SCTAB nOtherTab,
2311 SCCOL nMaxCol, const SCCOLROW* pOtherCols );
2312 sal_uInt16 ColDifferences( SCCOL nThisCol, SCTAB nThisTab,
2313 ScDocument& rOtherDoc,
2314 SCCOL nOtherCol, SCTAB nOtherTab,
2315 SCROW nMaxRow, const SCCOLROW* pOtherRows );
2316 void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow,
2317 bool bColumns,
2318 ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab,
2319 SCCOLROW nEndCol, const SCCOLROW* pTranslate,
2320 ScProgress* pProgress, sal_uInt64 nProAdd );
2322 DECL_LINK(TrackTimeHdl, Timer *, void);
2339 bool LimitRangeToAvailableSheets( const ScRange& rRange, ScRange& o_rRange,
2340 bool& o_bEntirelyOutOfBounds ) const;
2343 void StartListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2345 void EndListeningArea( const ScRange& rRange, bool bGroupListening, SvtListener* pListener );
2351 void Broadcast( const ScHint& rHint );
2353 void BroadcastCells( const ScRange& rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters = true );
2356 void AreaBroadcast( const ScHint& rHint );
2357 void DelBroadcastAreasInRange( const ScRange& rRange );
2358 void UpdateBroadcastAreas( UpdateRefMode eUpdateRefMode,
2359 const ScRange& rRange,
2360 SCCOL nDx, SCROW nDy, SCTAB nDz );
2362 void StartListeningCell( const ScAddress& rAddress,
2363 SvtListener* pListener );
2364 void EndListeningCell( const ScAddress& rAddress,
2365 SvtListener* pListener );
2367 void StartListeningCell( sc::StartListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2368 void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& rPos, SvtListener& rListener );
2370 void EndListeningFormulaCells( std::vector<ScFormulaCell*>& rCells );
2374 void PutInFormulaTree( ScFormulaCell* pCell );
2375 void RemoveFromFormulaTree( ScFormulaCell* pCell );
2390 SC_DLLPUBLIC void CalcFormulaTree( bool bOnlyForced = false, bool bProgressBar = true, bool bSetAllDirty = true );
2391 void ClearFormulaTree();
2392 void AppendToFormulaTrack( ScFormulaCell* pCell );
2394 void TrackFormulas( SfxHintId nHintId = SfxHintId::ScDataChanged );
2397 void FinalTrackFormulas( SfxHintId nHintId );
2399 inline bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
2400 inline bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
2403 void StartAllListeners();
2404 void StartNeededListeners();
2405 void StartNeededListeners( const std::shared_ptr<const sc::ColumnSet>& rpColSet );
2406 SC_DLLPUBLIC void StartAllListeners( const ScRange& rRange );
2408 void SetForcedFormulas( bool bVal ) { bHasForcedFormulas = bVal; }
2409 sal_uInt64 GetFormulaCodeInTree() const { return nFormulaCodeInTree; }
2411 bool IsInInterpreter() const { return nInterpretLevel != 0; }
2414 {
2416 if ( nInterpretLevel < USHRT_MAX )
2418 }
2420 {
2422 if ( nInterpretLevel )
2424 }
2425 sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
2427 {
2429 if ( nMacroInterpretLevel < USHRT_MAX )
2431 }
2433 {
2437 }
2440 {
2441 if ( nInterpreterTableOpLevel < USHRT_MAX )
2443 }
2445 {
2448 }
2450 // add a formula to be remembered for TableOp broadcasts
2454 bool IsInDtorClear() const { return bInDtorClear; }
2455 void SetExpandRefs( bool bVal );
2456 bool IsExpandRefs() const { return bExpandRefs; }
2459 void IncXMLImportedFormulaCount( sal_uInt64 nVal )
2460 {
2463 }
2464 void DecXMLImportedFormulaCount( sal_uInt64 nVal )
2465 {
2466 if ( nVal <= nXMLImportedFormulaCount )
2468 else
2470 }
2472 void StartTrackTimer();
2474 void CompileDBFormula();
2481 sal_Int32 GetMaxStringLen( SCTAB nTab, SCCOL nCol,
2482 SCROW nRowStart, SCROW nRowEnd,
2483 rtl_TextEncoding eCharSet ) const;
2487 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
2488 SCTAB nTab, SCCOL nCol,
2489 SCROW nRowStart, SCROW nRowEnd ) const;
2491 void KeyInput(); // TimerDelays etc.
2493 ScChangeTrack* GetChangeTrack() const { return pChangeTrack.get(); }
2497 SC_DLLPUBLIC void SetChangeTrack( std::unique_ptr<ScChangeTrack> pTrack );
2499 void StartChangeTracking();
2500 void EndChangeTracking();
2502 SC_DLLPUBLIC void CompareDocument( ScDocument& rOtherDoc );
2504 void AddUnoObject( SfxListener& rObject );
2505 void RemoveUnoObject( SfxListener& rObject );
2506 void BroadcastUno( const SfxHint &rHint );
2507 void AddUnoListenerCall( const css::uno::Reference<
2508 css::util::XModifyListener >& rListener,
2509 const css::lang::EventObject& rEvent );
2511 void SetInLinkUpdate(bool bSet); // TableLink or AreaLink
2512 bool IsInLinkUpdate() const; // including DdeLink
2519 std::unique_ptr<EditTextObject> CreateSharedStringTextObject( const svl::SharedString& rSS );
2521 std::unique_ptr<ScRefreshTimerControl> const & GetRefreshTimerControlAddress() const
2522 { return pRefreshTimerControl; }
2525 { bPastingDrawFromOtherDoc = bVal; }
2527 { return bPastingDrawFromOtherDoc; }
2530 sal_uInt32 GetDocumentID() const;
2533 void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab );
2534 void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab );
2536 void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents )
2537 { mxVbaEvents = rxVbaEvents; }
2538 const css::uno::Reference< css::script::vba::XVBAEventProcessor >& GetVbaEventProcessor() const { return mxVbaEvents; }
2545 bool IsInVBAMode() const;
2548 void AddSubTotalCell(ScFormulaCell* pCell);
2549 void RemoveSubTotalCell(ScFormulaCell* pCell);
2550 void SetSubTotalCellsDirty(const ScRange& rDirtyRange);
2552 sal_uInt16 GetTextWidth( const ScAddress& rPos ) const;
2554 SvtScriptType GetScriptType( const ScAddress& rPos ) const;
2555 void SetScriptType( const ScAddress& rPos, SvtScriptType nType );
2556 void UpdateScriptTypes( const ScAddress& rPos, SCCOL nColSize, SCROW nRowSize );
2568 void UnshareFormulaCells( SCTAB nTab, SCCOL nCol, std::vector<SCROW>& rRows );
2569 void RegroupFormulaCells( SCTAB nTab, SCCOL nCol );
2570 SC_DLLPUBLIC void RegroupFormulaCells( const ScRange& range );
2576 bool HandleRefArrayForParallelism( const ScAddress& rPos, SCROW nLength, const ScFormulaCellGroupRef& mxGroup );
2577#ifdef DBG_UTIL
2578 void AssertNoInterpretNeeded( const ScAddress& rPos, SCROW nLength );
2585 void PrepareFormulaCalc();
2601 SC_DLLPUBLIC bool EnsureFormulaCellResults( const ScRange& rRange, bool bSkipRunning = false );
2603 SvtBroadcaster* GetBroadcaster( const ScAddress& rPos );
2604 const SvtBroadcaster* GetBroadcaster( const ScAddress& rPos ) const;
2605 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rTopPos, SCROW nLength );
2607 std::optional<sc::ColumnIterator> GetColumnIterator( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2608 void CreateColumnIfNotExists( SCTAB nTab, SCCOL nCol );
2610 SC_DLLPUBLIC void StoreTabToCache(SCTAB nTab, SvStream& rStrm) const;
2611 SC_DLLPUBLIC void RestoreTabFromCache(SCTAB nTab, SvStream& rStream);
2614 SC_DLLPUBLIC void DumpColumnStorage( SCTAB nTab, SCCOL nCol ) const;
2617 SC_DLLPUBLIC void SetCalcConfig( const ScCalcConfig& rConfig );
2618 const ScCalcConfig& GetCalcConfig() const { return maCalcConfig; }
2619 void ConvertFormulaToValue( const ScRange& rRange, sc::TableValues* pUndo );
2620 void SwapNonEmpty( sc::TableValues& rValues );
2621 void finalizeOutlineImport();
2622 bool TableExists( SCTAB nTab ) const;
2624 // Returns the given column range, first allocating all the columns if necessary.
2626 // Returns a column range, clamped to the allocated columns.
2627 SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2628 // Returns the given range, without any adjustments. One of the variants above may return
2629 // a smaller range (better performance) if the use case is known.
2630 SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const;
2632 bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
2633 void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
2635 bool IsInLayoutStrings() const { return mbLayoutStrings; }
2636 void SetLayoutStrings(bool bSet) { mbLayoutStrings = bSet; }
2646 OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType);
2648 SCCOL GetLOKFreezeCol(SCTAB nTab) const;
2649 SCROW GetLOKFreezeRow(SCTAB nTab) const;
2650 bool SetLOKFreezeCol(SCCOL nFreezeCol, SCTAB nTab);
2651 bool SetLOKFreezeRow(SCROW nFreezeRow, SCTAB nTab);
2661 {
2662 public:
2663 explicit NumFmtMergeHandler(ScDocument& rDoc, const ScDocument& rSrcDoc);
2666 private:
2668 };
2670 void MergeNumberFormatter(const ScDocument& rSrcDoc);
2672 void ImplCreateOptions(); // Suggestion: switch to on-demand?
2673 void ImplDeleteOptions();
2675 SC_DLLPUBLIC bool DrawGetPrintArea( ScRange& rRange, bool bSetHor, bool bSetVer ) const;
2677 void UpdateDrawPrinter();
2678 void UpdateDrawLanguages();
2679 SC_DLLPUBLIC void InitClipPtrs( ScDocument* pSourceDoc );
2681 void LoadDdeLinks(SvStream& rStream);
2682 void SaveDdeLinks(SvStream& rStream) const;
2684 void DeleteAreaLinksOnTab( SCTAB nTab );
2685 void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode,
2686 const ScRange& r, SCCOL nDx, SCROW nDy, SCTAB nDz );
2688 void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks);
2690 bool HasPartOfMerged( const ScRange& rRange );
2694 const ScTable* FetchTable( SCTAB nTab ) const;
2700 std::map< SCTAB, ScSortParam > mSheetSortParams;
2702 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const;
2703 SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
2704 void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve );
2706 void SharePooledResources( const ScDocument* pSrcDoc );
2709 sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos );
2712 sc::EndListeningContext& rCxt, const ScRange& rRange, std::vector<ScAddress>* pGroupPos );
2714 void EndListeningGroups( const std::vector<ScAddress>& rPosArray );
2715 void SetNeedsListeningGroups( const std::vector<ScAddress>& rPosArray );
2717 bool BroadcastHintInternal( const ScHint &rHint );
2720typedef std::unique_ptr<ScDocument, o3tl::default_delete<ScDocument>> ScDocumentUniquePtr;
2729#ifndef NDEBUG
2731 : mnFlagRestore(rDocument.mnMutationGuardFlags)
2732 , mrDocument(rDocument)
2733 {
2734 assert((mnFlagRestore & nFlags) == 0);
2735 mrDocument.mnMutationGuardFlags |= static_cast<size_t>(nFlags);
2736 }
2738 {
2740 }
2745 {
2746 (void)rDocument; (void)nFlags;
2747 }
2762#ifndef NDEBUG
2764 : mnFlags(static_cast<size_t>(nFlags))
2765 , mrDocument(rDocument)
2766 {
2767 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2768 }
2771 {
2772 assert((mrDocument.mnMutationGuardFlags & mnFlags) == 0);
2773 }
2774 size_t mnFlags;
2778 {
2779 (void)rDocument; (void)nFlags;
2780 }
2790 : mrDoc(rDoc)
2791 {
2792 assert(!mrDoc.IsInDocShellRecalc());
2794 }
2797 {
2798 mrDoc.SetDocShellRecalc(false);
2799 }
2802/* 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:249
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:2789
ScDocument & mrDoc
Definition: document.hxx:2786
Accessor class to ScDocument.
Use this class as a locale variable to merge number formatter from another document,...
Definition: document.hxx:2661
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
Definition: document.cxx:2474
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
Definition: document.cxx:504
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:434
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:2152
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd) const
Maximum string length of numerical cells of a column, e.g.
Definition: documen4.cxx:597
void UpdateAreaLinks()
Definition: documen8.cxx:1049
bool IsValidAsianKerning() const
Definition: documen9.cxx:642
std::unique_ptr< sc::ExternalDataMapper > mpDataMapper
Definition: document.hxx:403
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:906
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
Definition: document.cxx:4555
void SetThreadedGroupCalcInProgress(bool set)
Definition: document.hxx:629
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:1420
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5089
ScSheetLimits & GetSheetLimits() const
Definition: document.hxx:898
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
Definition: document.cxx:4983
bool IsUndo() const
Definition: document.hxx:1592
SC_DLLPUBLIC ScColumnsRange GetWritableColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd)
Definition: document.cxx:2551
SCTAB GetVisibleTab() const
Definition: document.hxx:879
bool bAutoCalc
Definition: document.hxx:487
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:360
Definition: document.hxx:483
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:1145
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
Definition: document.cxx:6620
bool IsAddressInRangeName(RangeNameScope eScope, const ScAddress &rAddress)
Definition: documen3.cxx:198
void SetTrackFormulasPending()
Definition: document.hxx:2395
bool IsEmbedUsedFontsOnly() const
Definition: document.hxx:584
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:2845
bool bDelayedDeletingBroadcasters
Definition: document.hxx:531
rtl::Reference< ScSheetLimits > mxSheetLimits
Definition: document.hxx:379
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:148
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow)
Adapt Outline.
Definition: documen3.cxx:1420
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:425
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:43
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
Definition: document.hxx:405
void GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: documen3.cxx:1204
OUString maFileURL
Definition: document.hxx:419
bool GetAsianKerning() const
Definition: documen9.cxx:647
bool BroadcastHintInternal(const ScHint &rHint)
Definition: documen7.cxx:137
void EnableDelayStartListeningFormulaCells(ScColumn *column, bool delay)
If set, ScColumn::StartListeningFormulaCells() calls may be delayed using CanDelayStartListeningFormu...
Definition: document10.cxx:401
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
Definition: documen2.cxx:1328
bool IsInFormulaTrack(const ScFormulaCell *pCell) const
void IncInterpreterTableOpLevel()
Definition: document.hxx:2439
ScFormulaCell * pFormulaTree
Definition: document.hxx:386
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:5832
ScInterpreterContext & GetThreadedContext() const
Definition: document.hxx:623
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
Definition: document.cxx:5531
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:2081
std::unique_ptr< SvMemoryStream > pClipData
Definition: document.hxx:392
bool bInLinkUpdate
Definition: document.hxx:510
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
Definition: document.hxx:427
SC_DLLPUBLIC ScRange GetRange(SCTAB nTab, const tools::Rectangle &rMMRect, bool bHiddenAsZero=true) const
Definition: documen3.cxx:1807
const OUString & GetFileURL() const
Definition: document.hxx:611
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: document.cxx:5775
bool IsStreamValidLocked() const
Definition: document.hxx:990
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:485
tools::Rectangle GetEmbeddedRect() const
Definition: documen3.cxx:1718
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
Definition: documen2.cxx:1156
bool bForcedFormulaPending
Definition: document.hxx:492
void IncMacroInterpretLevel()
Definition: document.hxx:2426
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
Definition: document.cxx:439
SC_DLLPUBLIC bool LinkExternalTab(SCTAB &nTab, const OUString &aDocTab, const OUString &aFileName, const OUString &aTabName)
Definition: documen3.cxx:570
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
Definition: document.cxx:2492
bool IsCalcingAfterLoad() const
Definition: document.hxx:2227
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:6246
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:538
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
Definition: document.cxx:6160
bool IsInInterpreterTableOp() const
Definition: document.hxx:2438
void SetValues(const ScAddress &rPos, const std::vector< double > &rVals)
Definition: document10.cxx:160
static sal_uInt16 GetSrcVersion()
Definition: document.hxx:2136
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:2632
void SC_DLLPUBLIC GetSortParam(ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2137
std::unique_ptr< ScFieldEditEngine > mpEditEngine
Definition: document.hxx:369
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, ScRangeName > &rRangeMap)
Definition: documen3.cxx:125
SC_DLLPUBLIC OUString GetLinkTab(SCTAB nTab) const
Definition: documen3.cxx:534
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
Definition: document.cxx:2510
bool ValidRow(SCROW nRow) const
Definition: document.hxx:900
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) const
Definition: documen3.cxx:1924
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
Definition: documen8.cxx:1083
void UpdateDrawPrinter()
Definition: documen9.cxx:193
void Clear(bool bFromDestructor=false)
Definition: documen9.cxx:491
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
Definition: document.cxx:6892
SC_DLLPUBLIC void EnableUserInteraction(bool bVal)
Definition: document.cxx:6597
sc::BroadcasterState GetBroadcasterState() const
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: document.cxx:959
bool HasPartOfMerged(const ScRange &rRange)
Definition: document.cxx:1749
bool RemovePageStyleInUse(std::u16string_view rStrPageStyle)
Definition: documen8.cxx:325
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
Definition: document.cxx:6332
SCTAB nVisibleTab
Definition: document.hxx:481
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5966
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:805
bool FindRangeNamesReferencingSheet(sc::UpdatedRangeNames &rIndexes, SCTAB nTokenTab, const sal_uInt16 nTokenIndex, SCTAB nGlobalRefTab, SCTAB nLocalRefTab, SCTAB nOldTokenTab, SCTAB nOldTokenTabReplacement, bool bSameDoc, int nRecursion) const
Recursively find all named expressions that directly or indirectly (nested) reference a given sheet,...
Definition: document10.cxx:594
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
Definition: document.cxx:4717
bool bInDtorClear
Definition: document.hxx:515
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
Definition: documen3.cxx:759
bool CanInsertCol(const ScRange &rRange) const
Definition: document.cxx:1482
SC_DLLPUBLIC ScRangeName * GetRangeName() const
Definition: documen3.cxx:178
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
Definition: documen2.cxx:948
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
Definition: document.cxx:2535
ScFormulaParserPool & GetFormulaParserPool() const
Returns the pool containing external formula parsers.
Definition: documen3.cxx:658
SC_DLLPUBLIC bool IsDocProtected() const
Definition: documen3.cxx:1904
bool IsFinalTrackFormulas() const
Definition: document.hxx:2398
void SetRangeName(SCTAB nTab, std::unique_ptr< ScRangeName > pNew)
Definition: documen3.cxx:185
std::unique_ptr< ScUnoListenerCalls > pUnoListenerCalls
Definition: document.hxx:396
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:1158
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:5671
bool IsDetectiveDirty() const
Definition: document.hxx:2209
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
Definition: documen2.cxx:1138
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
Definition: document.cxx:6739
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:2666
void TransliterateText(const ScMarkData &rMultiMark, TransliterationFlags nType)
Definition: documen8.cxx:1210
ScClipParam & GetClipParam()
Definition: document.cxx:2591
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:2767
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
Definition: document.cxx:592
std::unique_ptr< ScClipOptions > mpClipOptions
Definition: document.hxx:426
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
Definition: documen3.cxx:450
const ScCalcConfig & GetCalcConfig() const
Definition: document.hxx:2618
bool bLinkFormulaNeedingCheck
Definition: document.hxx:533
void PrepareQuery(SCTAB nTab, ScQueryParam &rQueryParam)
Definition: documen3.cxx:1463
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
Definition: document.cxx:263
ScAddress aCurTextWidthCalcPos
Definition: document.hxx:439
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(ScAddress const &rAddress) const
Definition: document.hxx:844
std::unique_ptr< ScDocOptions > pDocOptions
Definition: document.hxx:424
VclPtr< SfxPrinter > mpPrinter
Definition: document.hxx:372
EEHorizontalTextDirection GetEditTextDirection(SCTAB nTab) const
Definition: documen8.cxx:355
SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
Definition: document.cxx:2561
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:402
void InvalidateTableArea()
Definition: documen4.cxx:576
void BeginDrawUndo()
Definition: documen9.cxx:61
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
Definition: document10.cxx:319
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
Definition: document.cxx:4074
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1915
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
Definition: documen9.cxx:105
sal_uInt64 GetFormulaCodeInTree() const
Definition: document.hxx:2409
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:6793
void SetDetectiveDirty(bool bSet)
Definition: document.hxx:2210
bool IsIdleEnabled() const
Definition: document.hxx:2206
LanguageType eCtlLanguage
Definition: document.hxx:454
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
Definition: document.cxx:7021
ScRange aEmbedRange
Definition: document.hxx:438
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
Definition: document.cxx:376
ScRangePairList * GetRowNameRanges()
Definition: document.hxx:820
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:61
ScStyleSheet * pPreviewCellStyle
Definition: document.hxx:432
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:857
void RemoveSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:776
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCTAB nTab, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: document10.cxx:966
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
Definition: document.cxx:1041
void DecInterpreterTableOpLevel()
Definition: document.hxx:2444
bool bChartListenerCollectionNeedsUpdate
Definition: document.hxx:511
void EnableDelayDeletingBroadcasters(bool set)
If set, cells will not delete their empty broadcasters, avoiding possible extensive mdds vector chang...
Definition: document10.cxx:449
void InvalidatePageBreaks(SCTAB nTab)
Definition: document.cxx:6326
bool SetFormulaCells(const ScAddress &rPos, std::vector< ScFormulaCell * > &rCells)
Definition: documen2.cxx:1167
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
Definition: document.cxx:5455
ScDocumentThreadSpecific maNonThreaded
Definition: document.hxx:467
Definition: document.hxx:892
void SetVbaEventProcessor(const css::uno::Reference< css::script::vba::XVBAEventProcessor > &rxVbaEvents)
Definition: document.hxx:2536
void IncInDdeLinkUpdate()
Definition: document.hxx:1042
bool mbFinalTrackFormulas
Definition: document.hxx:571
std::unique_ptr< SfxItemSet > pPreviewFont
Definition: document.hxx:431
SC_DLLPUBLIC void SetVisibleTab(SCTAB nTab)
Definition: document.hxx:880
ScDPObject * GetDPAtBlock(const ScRange &rBlock) const
Definition: documen3.cxx:393
std::unique_ptr< ScDPCollection > pDPCollection
Definition: document.hxx:383
void finalizeOutlineImport()
Definition: document10.cxx:585
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:520
sal_uInt16 nInterpreterTableOpLevel
Definition: document.hxx:465
SC_DLLPUBLIC void SetScenarioData(SCTAB nTab, const OUString &rComment, const Color &rColor, ScScenarioFlags nFlags)
Definition: documen3.cxx:439
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
Definition: documen4.cxx:880
std::vector< ScTableUniquePtr > TableContainer
Definition: document.hxx:347
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:6856
void SharePooledResources(const ScDocument *pSrcDoc)
Definition: document10.cxx:330
bool IsClipboard() const
Definition: document.hxx:1593
const ScDBData * GetDBAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) const
Definition: documen3.cxx:324
bool HasUniformRowHeight(SCTAB nTab, SCROW nRow1, SCROW nRow2) const
Definition: document10.cxx:346
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
Definition: document.cxx:4636
bool HasManualBreaks(SCTAB nTab) const
Definition: document.cxx:6344
std::unique_ptr< ScSortedRangeCacheMap > mxScSortedRangeCache
Definition: document.hxx:476
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
Definition: document.cxx:862
const ScSheetEvents * GetSheetEvents(SCTAB nTab) const
Definition: documen3.cxx:665
ScInterpreterTableOpParams aLastTableOpParams
Definition: document.hxx:448
void EnsureGraphicNames()
Definition: documen9.cxx:383
std::unique_ptr< ScFormulaParserPool > mxFormulaParserPool
Definition: document.hxx:415
SC_DLLPUBLIC SCROW GetMaxRowCount() const
Definition: document.hxx:895
sal_uInt16 RowDifferences(SCROW nThisRow, SCTAB nThisTab, ScDocument &rOtherDoc, SCROW nOtherRow, SCTAB nOtherTab, SCCOL nMaxCol, const SCCOLROW *pOtherCols)
Definition: documen4.cxx:925
SC_DLLPUBLIC void DoMergeContents(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:2038
static const sal_uInt16 nSrcVer
Definition: document.hxx:478
void AppendTabOnLoad(const OUString &rName)
Definition: document.cxx:472
HardRecalcState GetHardRecalcState() const
Definition: document.hxx:2401
void SetEmbedFontScriptComplex(bool bUse)
Definition: document.hxx:593
formula::FormulaGrammar::Grammar eGrammar
Definition: document.hxx:545
OUString GetLinkOpt(SCTAB nTab) const
Definition: documen3.cxx:527
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:1790
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:358
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:2242
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
Definition: document.cxx:6420
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:536
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:220
void SetSrcCharSet(rtl_TextEncoding eNew)
Definition: document.hxx:2138
sal_uInt16 nInterpretLevel
Definition: document.hxx:463
ScInterpreterContext maInterpreterContext
Definition: document.hxx:473
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
Definition: document.cxx:337
SC_DLLPUBLIC ScDocumentPool * GetPool()
Definition: document.cxx:6165
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
Definition: documen2.cxx:577
sal_Int32 mnImagePreferredDPI
Definition: document.hxx:566
DECL_LINK(TrackTimeHdl, Timer *, void)
bool IsCutMode()
Definition: document.cxx:2058
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:1218
bool ValidAddress(const ScAddress &rAddress) const
Definition: document.hxx:904
const SfxPoolItem * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
Definition: documen4.cxx:757
void InvalidateLastTableOpParams()
Definition: document.hxx:2452
void SetExpandRefs(bool bVal)
Definition: documen2.cxx:327
void SetCalcNotification(SCTAB nTab)
Definition: documen3.cxx:726
void DecXMLImportedFormulaCount(sal_uInt64 nVal)
Definition: document.hxx:2464
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
Definition: documen3.cxx:496
ScRangeData * FindRangeNameBySheetAndIndex(SCTAB nTab, sal_uInt16 nIndex) const
Find a named expression / range name in either global or a local scope.
Definition: documen3.cxx:271
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
Definition: document.hxx:390
Definition: document.hxx:893
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4975
bool IsAdjustHeightLocked() const
Definition: document.hxx:1598
SC_DLLPUBLIC bool HasPivotTable() const
Definition: documen3.cxx:362
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4579
bool ValidColRowTab(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.hxx:902
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
Definition: document.cxx:6414
void BeginUnoRefUndo()
Definition: documen3.cxx:992
SC_DLLPUBLIC void CompareDocument(ScDocument &rOtherDoc)
Definition: documen4.cxx:1102
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:398
ScValidationDataList * GetValidationList()
Definition: document.hxx:1879
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:332
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:1851
bool HasLink(std::u16string_view rDoc, std::u16string_view rFilter, std::u16string_view rOptions) const
Definition: documen3.cxx:556
rtl::Reference< XColorList > pColorList
Definition: document.hxx:375
std::unique_ptr< ScMacroManager > mpMacroMgr
Definition: document.hxx:411
SCROW GetLastChangedRowFlagsWidth(SCTAB nTab) const
Definition: document.cxx:4650
void AddUnoRefChange(sal_Int64 nId, const ScRangeList &rOldRanges)
Definition: documen3.cxx:1004
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:447
SC_DLLPUBLIC void DoMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bDeleteCaptions=true)
Definition: documen3.cxx:2075
bool mbEmbedUsedFontsOnly
Definition: document.hxx:561
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3672
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
Definition: document.cxx:289
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
Definition: document.hxx:2232
bool ContainsNotesInRange(const ScRangeList &rRange) const
Definition: document.cxx:7026
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: documen3.cxx:1010
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
Definition: documen7.cxx:158
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
Definition: document.cxx:6725
bool DoSubTotals(SCTAB nTab, ScSubTotalParam &rParam)
Definition: documen3.cxx:782
ScSortedRangeCache & GetSortedRangeCache(const ScRange &rRange, const ScQueryParam &param, ScInterpreterContext *pContext)
Definition: documen2.cxx:1248
bool IsEmbedFonts() const
Definition: document.hxx:583
bool HasDetectiveOperations() const
Definition: documen4.cxx:894
void AddDetectiveOperation(const ScDetOpData &rData)
Definition: documen4.cxx:899
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:513
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
Definition: document.hxx:2521
bool mbFormulaGroupCxtBlockDiscard
Definition: document.hxx:364
SC_DLLPUBLIC sc::Sparkline * CreateSparkline(ScAddress const &rPosition, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
Definition: document.cxx:6636
void DeleteConditionalFormat(sal_uLong nIndex, SCTAB nTab)
Definition: documen4.cxx:888
void CompileXML()
Definition: document.cxx:4034
SC_DLLPUBLIC const ScDrawLayer * GetDrawLayer() const
Definition: document.hxx:1084
std::unique_ptr< ScAutoNameCache > pAutoNameCache
Definition: document.hxx:429
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:2323
SC_DLLPUBLIC void SetPrintEntireSheet(SCTAB nTab)
Marks the specified sheet to be printed completely.
Definition: document.cxx:6426
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:625
void CreateColumnIfNotExists(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:992
SC_DLLPUBLIC const ScDBData * GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: documen3.cxx:340
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:355
SC_DLLPUBLIC sal_Int16 GetNamedRangesLockCount() const
Definition: document.hxx:1607
bool IsInDdeLinkUpdate() const
Definition: document.hxx:1044
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
Definition: document.cxx:6390
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
Definition: document.cxx:2658
SC_DLLPUBLIC void EnableUndo(bool bVal)
Definition: document.cxx:6581
SfxBindings * GetViewBindings()
Definition: documen8.cxx:1188
const T * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, TypedWhichId< T > nWhich) const
Definition: document.hxx:1831
std::unique_ptr< ScPatternAttr > pSelectionAttr
Definition: document.hxx:385
std::set< Color > GetDocColors()
Definition: document10.cxx:187
ScLookupCache & GetLookupCache(const ScRange &rRange, ScInterpreterContext *pContext)
Creates a ScLookupCache cache for the range if it doesn't already exist.
Definition: documen2.cxx:1225
ScAutoNameCache * GetAutoNameCache()
Definition: document.hxx:1387
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
Definition: document.hxx:395
bool IsDelayedDeletingBroadcasters() const
Definition: document.hxx:1438
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated.
Definition: document.cxx:2486
void KeyInput()
Definition: documen8.cxx:1180
void MergeContextBackIntoNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7071
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: document.cxx:6036
bool HasFormulaCell(const ScRange &rRange) const
Check if there is at least one formula cell in specified range.
Definition: document10.cxx:462
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
Definition: document.cxx:6285
SC_DLLPUBLIC void PreprocessDBDataUpdate()
Definition: document10.cxx:307
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
Definition: documen3.cxx:1954
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
Definition: documen3.cxx:869
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:1003
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:550
void DelayFormulaGrouping(bool delay)
If set, joining cells into shared formula groups will be delayed until reset again (RegroupFormulaCel...
Definition: document10.cxx:380
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
Definition: document.cxx:5078
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:633
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:1086
ScInterpreterContext & GetNonThreadedContext() const
Definition: document.hxx:617
SC_DLLPUBLIC void PreprocessRangeNameUpdate()
Definition: document10.cxx:295
void SetLayoutStrings(bool bSet)
Definition: document.hxx:2636
void SetClipArea(const ScRange &rArea, bool bCut=false)
Definition: document.cxx:3163
bool IsEmbedFontScriptComplex() const
Definition: document.hxx:587
bool HasDetectiveObjects(SCTAB nTab) const
Definition: documen9.cxx:506
formula::FormulaGrammar::Grammar GetStorageGrammar() const
Definition: document.hxx:2542
std::unique_ptr< ScValidationDataList > pValidationList
Definition: document.hxx:376
void CopyScenario(SCTAB nSrcTab, SCTAB nDestTab, bool bNewScenario=false)
Definition: documen3.cxx:813
bool IsDocEditable() const
Definition: documen3.cxx:1909
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
Definition: documen2.cxx:1179
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:1072
void RemoveLookupCache(ScLookupCache &rCache)
Only ScLookupCache dtor uses RemoveLookupCache(), do not use elsewhere!
Definition: documen2.cxx:1282
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4423
ScRangePairListRef xRowNameRanges
Definition: document.hxx:421
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
Definition: document.cxx:6502
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
Definition: document.cxx:6535
SC_DLLPUBLIC SvtScriptType GetStringScriptType(const OUString &rString)
Definition: documen6.cxx:76
bool bImportingXML
Definition: document.hxx:505
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:629
SC_DLLPUBLIC sal_uInt16 GetOriginalHeight(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4217
bool IsInLayoutStrings() const
Definition: document.hxx:2635
sal_Int32 GetMaxStringLen(SCTAB nTab, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Maximum string length of a column, e.g.
Definition: documen4.cxx:588
SC_DLLPUBLIC OutputDevice * GetRefDevice()
Definition: documen8.cxx:199
SC_DLLPUBLIC OUString MaxRowAsString() const
Definition: document.hxx:896
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
Definition: document.cxx:484
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:6648
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
Definition: documen2.cxx:1184
size_t mnMutationGuardFlags
Definition: document.hxx:577
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
Definition: document.cxx:7042
std::unique_ptr< ScUnoRefList > EndUnoRefUndo()
Definition: documen3.cxx:998
SC_DLLPUBLIC void GetScenarioData(SCTAB nTab, OUString &rComment, Color &rColor, ScScenarioFlags &rFlags) const
Definition: documen3.cxx:470
SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap &rRangeNames) const
Get all range names that are local to each table.
Definition: documen3.cxx:106
bool HasOLEObjectsInArea(const ScRange &rRange, const ScMarkData *pTabMark=nullptr)
Definition: documen9.cxx:266
bool IsEmbedded() const
Definition: document.hxx:952
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
Definition: document.hxx:361
bool IsDelayedFormulaGrouping() const
Definition: document.hxx:1424
sal_uInt32 nAdjustHeightLock
Definition: document.hxx:544
void EnableExecuteLink(bool bVal)
Definition: document.hxx:1602
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
Definition: document.cxx:1116
ScFormulaCell * pEOFormulaTree
Definition: document.hxx:387
SC_DLLPUBLIC bool EnsureFormulaCellResults(const ScRange &rRange, bool bSkipRunning=false)
Make sure all of the formula cells in the specified range have been fully calculated.
void RemoveMerge(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:2092
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
Definition: document10.cxx:505
SCROW GetHiddenRowCount(SCROW nRow, SCTAB nTab) const
Definition: document.cxx:4280
bool mbIdleEnabled
Definition: document.hxx:509
SC_DLLPUBLIC void GetFilterEntriesArea(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, ScFilterEntries &rFilterEntries)
Entries for Filter dialog.
Definition: documen3.cxx:1615
ScRangePairListRef & GetRowNameRangesRef()
Definition: document.hxx:822
void CopyTabProtection(SCTAB nTabSrc, SCTAB nTabDest)
Definition: documen3.cxx:1940
void UnshareFormulaCells(SCTAB nTab, SCCOL nCol, std::vector< SCROW > &rRows)
Make specified formula cells non-grouped.
Definition: document10.cxx:355
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
Definition: document.cxx:934
void AddDelayedFormulaGroupingCell(const ScFormulaCell *cell)
To be used only by SharedFormulaUtil::joinFormulaCells().
Definition: document10.cxx:395
OUString GetCopyTabName(SCTAB nTab) const
Definition: document.cxx:230
void StylesToNames()
Definition: document.cxx:6233
void ReservePatternCount(SCTAB nTab, SCCOL nCol, SCSIZE nReserve)
Definition: documen3.cxx:2131
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:2170
bool IsInLinkUpdate() const
Definition: documen8.cxx:784
bool mbTrackFormulasPending
Definition: document.hxx:570
ScDocument(const ScDocument &r)=delete
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
Definition: documen3.cxx:1963
SC_DLLPUBLIC void DoEmptyBlock(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:2062
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:903
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:1605
void UpdStlShtPtrsFrmNms()
Definition: document.cxx:6220
bool GetNoListening() const
Definition: document.hxx:2229
void SetDocShellRecalc(bool bSet)
Definition: document.hxx:2633
void AddSubTotalCell(ScFormulaCell *pCell)
Definition: document.cxx:6509
ScRecursionHelper & GetRecursionHelper()
Definition: document.cxx:7049
bool mbUserInteractionEnabled
Definition: document.hxx:553
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
Definition: document.cxx:4841
void ResetCalcNotifications()
Definition: documen3.cxx:733
void SetChartListenerCollection(std::unique_ptr< ScChartListenerCollection >, bool bSetChartRangeLists)
Definition: documen3.cxx:414
bool HasLinkFormulaNeedingCheck() const
Definition: document.hxx:2212
void SetInLinkUpdate(bool bSet)
Definition: documen8.cxx:776
void SetEmbedFontScriptAsian(bool bUse)
Definition: document.hxx:592
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
Definition: documen2.cxx:473
std::unique_ptr< ScDetOpList > pDetOpList
Definition: document.hxx:393
void SetCondFormList(ScConditionalFormatList *pList, SCTAB nTab)
Definition: documen4.cxx:874
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
Definition: documen2.cxx:1192
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:1491
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1412
SCCOL GetLastChangedColFlagsWidth(SCTAB nTab) const
Definition: document.cxx:4643
OUString GetUpperCellString(SCCOL nCol, SCROW nRow, SCTAB nTab)
Definition: documen3.cxx:1483
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: document.cxx:3798
void SetCodeName(const OUString &r)
Definition: document.hxx:610
SC_DLLPUBLIC void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: document.cxx:6989
bool IsValidAsianCompression() const
Definition: documen9.cxx:620
void SetEmbedFonts(bool bUse)
Definition: document.hxx:589
bool IsInVBAMode() const
Definition: document.cxx:6602
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:1982
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
Definition: document.cxx:5127
SC_DLLPUBLIC void InitUndoSelected(const ScDocument &rSrcDoc, const ScMarkData &rTabSelection, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:1971
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:5046
bool bLoadingMedium
Definition: document.hxx:504
ScChangeViewSettings * GetChangeViewSettings() const
Definition: document.hxx:2242
std::unique_ptr< ScExtDocOptions > pExtDocOptions
Definition: document.hxx:425
bool HasRangeOverflow() const
Definition: document.hxx:2218
SC_DLLPUBLIC std::unique_ptr< ScPostIt > ReleaseNote(const ScAddress &rPos)
Definition: document.cxx:6832
SC_DLLPUBLIC 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:6454
void ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, const ScMarkData &rMark)
Definition: documen4.cxx:548
ScRangePairList * GetColNameRanges()
Definition: document.hxx:819
void GetFilterEntries(SCCOL nCol, SCROW nRow, SCTAB nTab, ScFilterEntries &rFilterEntries)
Get a list of unique strings to use in filtering criteria.
Definition: documen3.cxx:1563
void StartChangeTracking()
Definition: documen2.cxx:277
bool bExpandRefs
Definition: document.hxx:520
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: document.cxx:4959
TableContainer maTabs
Definition: document.hxx:378
SC_DLLPUBLIC bool HasSparkline(ScAddress const &rPosition)
Definition: document.cxx:6631
ScExtDocOptions * GetExtDocOptions()
Definition: document.hxx:644
SCCOL GetLOKFreezeCol(SCTAB nTab) const
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
Definition: document10.cxx:490
SC_DLLPUBLIC sc::ExternalDataMapper & GetExternalDataMapper()
Definition: documen5.cxx:529
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
Definition: document.cxx:6297
void SetName(const OUString &r)
Definition: document.hxx:608
SC_DLLPUBLIC void SetGrammar(formula::FormulaGrammar::Grammar eGram)
Definition: documen3.cxx:501
bool HasAnyCalcNotification() const
Definition: documen3.cxx:710
LanguageType eLanguage
Definition: document.hxx:452
bool bIsClip
Definition: document.hxx:494
bool IsStreamValid(SCTAB nTab) const
Definition: document.cxx:926
void LimitChartIfAll(ScRangeListRef &rRangeList)
Definition: document.cxx:1124
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2003
bool IsFunctionAccess() const
Definition: document.hxx:1596
SC_DLLPUBLIC bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: document10.cxx:83
void CopyRangeNamesToClip(ScDocument *pClipDoc, const ScRange &rClipRange, const ScMarkData *pMarks)
Definition: document.cxx:2455
SC_DLLPUBLIC bool HasPrintRange()
Definition: document.cxx:6361
void SetAsianKerning(bool bNew)
Definition: documen9.cxx:655
bool bDetectiveDirty
Definition: document.hxx:522
void DeleteSelectionTab(SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData &rMark)
Definition: document.cxx:6094
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
Definition: documen2.cxx:1391
bool mbLayoutStrings
Definition: document.hxx:575
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:1887
SC_DLLPUBLIC bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:1536
std::unique_ptr< ScExternalRefManager > pExternalRefMgr
Definition: document.hxx:410
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: document.cxx:3877
bool UpdateOutlineRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow)
Definition: documen3.cxx:1429
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
Definition: document.hxx:459
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:1371
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
Definition: document.cxx:5721
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:540
ScBroadcastAreaSlotMachine * GetBASM() const
Definition: document.hxx:2230
void GetSelectionFrame(const ScMarkData &rMark, SvxBoxItem &rLineOuter, SvxBoxInfoItem &rLineInner)
Definition: document.cxx:5176
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
Definition: documen3.cxx:1969
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:2538
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
Definition: documen9.cxx:203
void DeleteObjectsInSelection(const ScMarkData &rMark)
Definition: documen9.cxx:258
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1083
SC_DLLPUBLIC void ApplySelectionPattern(const ScPatternAttr &rAttr, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *pIsChanged=nullptr)
Definition: document.cxx:5979
SC_DLLPUBLIC bool GetHashCode(SCTAB nTab, sal_Int64 &rHashCode) const
Definition: document.cxx:203
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:945
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:496
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:5643
bool bAutoCalcShellDisabled
Definition: document.hxx:488
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
Definition: document.cxx:394
HardRecalcState eHardRecalcState
Definition: document.hxx:480
bool HasAnyDraw(SCTAB nTab, const tools::Rectangle &rMMRect) const
Definition: documen9.cxx:358
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:912
sal_Int32 GetImagePreferredDPI()
Definition: document.hxx:596
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:1629
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:394
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:6704
ScAddress GetNotePosition(size_t nIndex) const
Definition: document.cxx:6925
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
Definition: documen2.cxx:1214
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
Definition: document.cxx:6758
SC_DLLPUBLIC const ScRangeList * GetScenarioRanges(SCTAB nTab) const
Definition: documen3.cxx:874
SC_DLLPUBLIC ScConditionalFormat * GetCondFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen4.cxx:843
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
Definition: documen3.cxx:764
const std::shared_ptr< SvxForbiddenCharactersTable > & GetForbiddenCharacters() const
Definition: documen9.cxx:606
SvNumberFormatterIndexTable * pFormatExchangeList
Definition: document.hxx:377
ScUndoManager * mpUndoManager
Definition: document.hxx:368
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:6438
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:568
bool IsExecuteLinkEnabled() const
Definition: document.hxx:1601
SC_DLLPUBLIC void SetCalcConfig(const ScCalcConfig &rConfig)
Definition: document10.cxx:205
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
Definition: document.cxx:5273
void SC_DLLPUBLIC SetSortParam(const ScSortParam &rParam, SCTAB nTab)
Definition: documen3.cxx:2142
void AddUndoTab(SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
Definition: document.cxx:2028
SC_DLLPUBLIC formula::FormulaGrammar::Grammar GetGrammar() const
Definition: document.hxx:1009
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
Definition: document.cxx:4392
void InvalidateStreamOnSave()
Definition: document.cxx:495
void UpdateScriptTypes(const ScAddress &rPos, SCCOL nColSize, SCROW nRowSize)
Definition: document10.cxx:337
void Reorder(const sc::ReorderParam &rParam)
Definition: documen3.cxx:1451
bool IdleCalcTextWidth()
Definition: documen8.cxx:532
void RegroupFormulaCells(SCTAB nTab, SCCOL nCol)
Definition: document10.cxx:364
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: document.cxx:5431
void MarkUsedExternalReferences()
Definition: documen3.cxx:643
void StartListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
Definition: documen7.cxx:35
bool IsEmbedFontScriptLatin() const
Definition: document.hxx:585
void SetRangeOverflowType(ErrCode nType)
Definition: document.hxx:2217
void EndListeningFormulaCells(std::vector< ScFormulaCell * > &rCells)
Definition: documen7.cxx:259
static thread_local ScDocumentThreadSpecific maThreadSpecific
Definition: document.hxx:471
SfxBroadcaster * GetDrawBroadcaster()
Definition: documen9.cxx:56
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
Definition: document.cxx:2641
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:1030
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
Definition: document.hxx:397
SC_DLLPUBLIC const ScRangeData * GetRangeAtBlock(const ScRange &rBlock, OUString &rName, bool *pSheetLocal=nullptr) const
Definition: documen3.cxx:240
bool HasUnoRefUndo() const
Definition: document.hxx:1089
void GetEmbedded(ScRange &rRange) const
Definition: documen3.cxx:1713
std::shared_mutex mScLookupMutex
Definition: document.hxx:475
bool IsClipOrUndo() const
Definition: document.hxx:1591
void SetPreviewSelection(const ScMarkData &rSel)
Definition: documen2.cxx:1484
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:242
SC_DLLPUBLIC void SetImportingXML(bool bVal)
Definition: documen9.cxx:583
SCROW GetLOKFreezeRow(SCTAB nTab) const
bool HasCalcNotification(SCTAB nTab) const
Definition: documen3.cxx:719
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
Definition: documen2.cxx:1131
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:2069
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:654
SC_DLLPUBLIC void SetDocVisible(bool bSet)
Definition: documen2.cxx:261
bool PastingDrawFromOtherDoc() const
Definition: document.hxx:2526
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
Definition: documen3.cxx:2115
ErrCode nRangeOverflowType
Definition: document.hxx:436
SC_DLLPUBLIC ScDBCollection * GetDBCollection() const
Definition: document.hxx:827
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
Definition: document.cxx:3517
bool bIsEmbedded
Definition: document.hxx:499
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:6199
sal_uInt64 GetXMLImportedFormulaCount() const
Definition: document.hxx:2458
bool bIsUndo
Definition: document.hxx:495
bool IsChangeReadOnlyEnabled() const
Definition: document.hxx:1603
SC_DLLPUBLIC ScDPObject * GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Definition: documen3.cxx:379
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:1004
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
Definition: document.cxx:4907
const OUString & GetCodeName() const
Definition: document.hxx:609
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:586
void GetDocStat(ScDocStat &rDocStat)
Definition: document.cxx:6353
void MergeNumberFormatter(const ScDocument &rSrcDoc)
Definition: document.cxx:2575
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: document.cxx:6024
bool CanInsertRow(const ScRange &rRange) const
Definition: document.cxx:1193
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
Definition: document.cxx:7065
ScMarkData maPreviewSelection
Definition: document.hxx:433
void EnableIdle(bool bDo)
Definition: document.hxx:2207
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
Definition: document.cxx:5858
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
Definition: document.cxx:171
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
Definition: document.cxx:4153
bool IsInsertingFromOtherDoc() const
Definition: document.hxx:2223
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
Definition: document.cxx:1855
void RemoveSortedRangeCache(ScSortedRangeCache &rCache)
Definition: documen2.cxx:1301
void SetPageSize(SCTAB nTab, const Size &rSize)
Definition: document.cxx:6305
sal_uInt64 nXMLImportedFormulaCount
Definition: document.hxx:462
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
Definition: documen9.cxx:67
void StopTemporaryChartLock()
Definition: documen3.cxx:408
bool IsForcedFormulaPending() const
Definition: document.hxx:1418
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:211
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:897