24#include <osl/thread.h>
38#include <osl/diagnose.h>
42#include <document.hxx>
92#include <config_features.h>
100#if HAVE_FEATURE_JUMBO_SHEETS
101 bool jumboSheets =
false;
103 jumboSheets =
SC_MOD()->GetDefaultsOptions().GetInitJumboSheets();
105 assert( getenv(
"LO_TESTNAME") !=
nullptr );
115 mpDocLinkMgr(new
sc::DocumentLinkManager(pDocShell)),
116 mbFormulaGroupCxtBlockDiscard(false),
118 mpUndoManager( nullptr ),
119 mpShell( pDocShell ),
120 mpPrinter( nullptr ),
121 mpVirtualDevice_100th_mm( nullptr ),
122 pFormatExchangeList( nullptr ),
124 pFormulaTree( nullptr ),
125 pEOFormulaTree( nullptr ),
126 pFormulaTrack( nullptr ),
127 pEOFormulaTrack( nullptr ),
128 pPreviewCellStyle( nullptr ),
129 maPreviewSelection(*mxSheetLimits),
131 nRangeOverflowType( 0 ),
132 aCurTextWidthCalcPos(MaxCol(),0,0),
133 aTrackIdle(
"sc ScDocument Track Idle"),
134 nFormulaCodeInTree(0),
135 nXMLImportedFormulaCount( 0 ),
137 nMacroInterpretLevel(0),
138 nInterpreterTableOpLevel(0),
139 maInterpreterContext( *this, nullptr ),
141 nFormulaTrackCount(0),
148 bAutoCalcShellDisabled( false ),
149 bForcedFormulaPending( false ),
150 bCalculatingFormulaTree( false ),
155 bIsEmbedded( false ),
156 bInsertingFromOtherDoc( false ),
157 bLoadingMedium( false ),
158 bImportingXML( false ),
159 bCalcingAfterLoad( false ),
160 bNoListening( false ),
162 bInLinkUpdate( false ),
163 bChartListenerCollectionNeedsUpdate( false ),
164 bHasForcedFormulas( false ),
165 bInDtorClear( false ),
166 bExpandRefs( false ),
167 bDetectiveDirty( false ),
168 bDelayedDeletingBroadcasters( false ),
169 bLinkFormulaNeedingCheck( false ),
172 bPastingDrawFromOtherDoc( false ),
173 nInDdeLinkUpdate( 0 ),
174 bInUnoBroadcast( false ),
175 bInUnoListenerCall( false ),
176 nAdjustHeightLock(0),
177 eGrammar(
formula::FormulaGrammar::GRAM_NATIVE ),
178 bStyleSheetUsageInvalid( true ),
179 mbUndoEnabled( true ),
180 mbExecuteLinkEnabled( true ),
181 mbChangeReadOnlyEnabled( false ),
182 mbStreamValidLocked( false ),
183 mbUserInteractionEnabled(true),
184 mnNamedRangesLockCount(0),
186 mbEmbedUsedFontsOnly(false),
187 mbEmbedFontScriptLatin(true),
188 mbEmbedFontScriptAsian(true),
189 mbEmbedFontScriptComplex(true),
190 mnImagePreferredDPI(0),
191 mbTrackFormulasPending(false),
192 mbFinalTrackFormulas(false),
193 mbDocShellRecalc(false),
194 mbLayoutStrings(false),
195 mnMutationGuardFlags(0)
202 eSrcSet = osl_getThreadTextEncoding();
255 "ScDocument::SetStorageGrammar: wrong storage grammar");
270 sal_uInt32 nCrc = rtl_crc32( 0, &pThis,
sizeof(
ScDocument*) );
289 OSL_ENSURE( &pTrack->GetDocument() ==
this,
"SetChangeTrack: different documents" );
290 if ( !pTrack || pTrack ==
pChangeTrack || &pTrack->GetDocument() !=
this )
305 mpShell->Broadcast(
SfxHint( SfxHintId::ScDataChanged ) );
307 if (!mpShell->IsModified())
309 mpShell->SetModified();
430 OSL_ENSURE(
bIsClip,
"InitClipPtrs and not bIsClip");
513 for (
SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->
maTabs.size());
i++)
517 OUString aString = pSourceDoc->
maTabs[
i]->GetName();
536 OSL_FAIL(
"ResetClip");
550 if (nTab <
static_cast<SCTAB>(pSourceDoc->
maTabs.size()) && pSourceDoc->
maTabs[nTab])
551 maTabs[nTab]->SetLayoutRTL( pSourceDoc->
maTabs[nTab]->IsLayoutRTL() );
555 OSL_FAIL(
"ResetClip");
566 maTabs[nTab].reset(
new ScTable(*
this, nTab,
"temp", bExtras, bExtras) );
582 return maTabs[rPos.
Tab()]->GetRefCellValue(rPos.
Col(), rPos.
Row(), rBlockPos);
600 bool bAny =
maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes,
false);
620 SCCOL& rEndCol )
const
624 bool bAny =
maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol );
642 SCROW& rEndRow,
bool bNotes )
const
646 bool bAny =
maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
667 bool bAny =
maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
688 bool bHasPrintArea =
GetPrintArea(nTab, rEndCol, rEndRow,
false);
705 else if (!bHasPrintArea)
719 if (nOldPos == nNewPos)
727 if (
ValidTab(nOldPos) && nOldPos < nTabCount )
736 nNewPos = nTabCount-1;
743 SCTAB nDz = nNewPos - nOldPos;
762 aSourceRange, 0,0,nDz ) );
766 maTabs.insert(
maTabs.begin()+nNewPos, std::move(pSaveTab));
767 for (
SCTAB i = 0;
i < nTabCount;
i++)
769 maTabs[
i]->UpdateMoveTab(aCxt,
i, pProgress);
770 for (
auto& rxTab :
maTabs)
772 rxTab->UpdateCompile();
780 mpDrawLayer->ScMovePage(
static_cast<sal_uInt16
>(nOldPos),
static_cast<sal_uInt16
>(nNewPos) );
797 OSL_ENSURE(bPrefix,
"invalid table name");
820 if (
ValidTab(nNewPos) && (nNewPos < static_cast<SCTAB>(
maTabs.size())))
841 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
842 if (*it && it != (
maTabs.begin() + nOldPos))
843 (*it)->UpdateInsertTab(aCxt);
844 if (nNewPos <= nOldPos)
848 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
849 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin() + nNewPos)
850 (*it)->UpdateCompile();
853 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
854 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin()+nNewPos)
855 (*it)->StartListeners(aSLCxt,
true);
869 const bool bGlobalNamesToLocal =
true;
870 const SCTAB nRealOldPos = (nNewPos < nOldPos) ? nOldPos - 1 : nOldPos;
873 pNames->
CopyUsedNames( nOldPos, nRealOldPos, nNewPos, *
this, *
this, bGlobalNamesToLocal);
879 (pOnlyMarked !=
nullptr),
maTabs[nNewPos].
get(), pOnlyMarked,
880 false ,
true , bGlobalNamesToLocal,
false );
883 SCTAB nDz = nNewPos - nOldPos;
888 maTabs[nNewPos]->UpdateReference(aRefCxt);
890 maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos);
891 maTabs[nOldPos]->UpdateInsertTab(aCxt);
893 maTabs[nOldPos]->UpdateCompile();
894 maTabs[nNewPos]->UpdateCompile(
true );
897 maTabs[nOldPos]->StartListeners(aSLCxt,
true);
898 maTabs[nNewPos]->StartListeners(aSLCxt,
true);
905 mpDrawLayer->ScCopyPage(
static_cast<sal_uInt16
>(nOldPos),
static_cast<sal_uInt16
>(nNewPos) );
918 maTabs[nNewPos]->SetLoadingRTL(
maTabs[nOldPos]->IsLoadingRTL());
931 SCTAB nDestPos,
bool bInsertNew,
959 maTabs[nDestPos]->SetLayoutRTL(rSrcDoc.
maTabs[nSrcPos]->IsLayoutRTL());
960 maTabs[nDestPos]->SetLoadingRTL(rSrcDoc.
maTabs[nSrcPos]->IsLoadingRTL());
974 bool bOldAutoCalcSrc =
false;
993 const bool bGlobalNamesToLocal =
false;
996 pNames->
CopyUsedNames( nSrcPos, nSrcPos, nDestPos, rSrcDoc, *
this, bGlobalNamesToLocal);
1001 false,
maTabs[nDestPos].
get(),
nullptr,
false,
true,
1005 maTabs[nDestPos]->SetTabNo(nDestPos);
1006 maTabs[nDestPos]->SetTabBgColor(rSrcDoc.
maTabs[nSrcPos]->GetTabBgColor());
1008 if ( !bResultsOnly )
1014 maTabs[nDestPos]->UpdateReference(aRefCxt);
1017 maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
1019 maTabs[nDestPos]->CompileAll(aFormulaCxt);
1023 if ( !bResultsOnly )
1026 maTabs[nDestPos]->StartListeners(aSLCxt,
true);
1039 maTabs[nDestPos]->SetPendingRowHeights( rSrcDoc.
maTabs[nSrcPos]->IsPendingRowHeights() );
1050 OUString aLibName(
"Standard");
1051#if HAVE_FEATURE_SCRIPTING
1053 if (pBasicManager && !pBasicManager->GetName().isEmpty())
1059 uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->
GetBasicContainer();
1060 uno::Reference< container::XNameContainer > xLib;
1061 if( xLibContainer.is() )
1063 uno::Any aLibAny = xLibContainer->getByName(aLibName);
1069 OUString sSrcCodeName;
1071 OUString sRTLSource;
1072 xLib->getByName( sSrcCodeName ) >>= sRTLSource;
1073 sSource = sRTLSource;
1086 maTabs[nTab]->SetError( nCol, nRow, nError );
1104 maTabs[rPos.
Tab()]->SetFormula(rPos.
Col(), rPos.
Row(), rFormula, eGram);
1115 return maTabs[rPos.
Tab()]->SetFormulaCell(rPos.
Col(), rPos.
Row(), pCell);
1145 std::unique_ptr<ScFieldEditEngine> pNewEditEngine;
1162 return pNewEditEngine;
1173 rpEditEngine.reset();
1183 auto [findIt, bInserted] = pCacheMap->
aCacheMap.emplace(rRange,
nullptr);
1186 findIt->second = std::make_unique<ScLookupCache>(
this, rRange, *pCacheMap);
1187 pCache = findIt->second.get();
1194 pCache = (*findIt).second.get();
1212 return *findIt->second;
1223 findIt->second = std::make_unique<ScSortedRangeCache>(
this, rRange, param, pContext);
1226 return *findIt->second;
1236 auto it(cacheMap.aCacheMap.find(rCache.
getRange()));
1237 if (it != cacheMap.aCacheMap.end())
1240 cacheMap.aCacheMap.erase(it);
1245 OSL_FAIL(
"ScDocument::RemoveLookupCache: range not found in hash map");
1263 OSL_FAIL(
"ScDocument::RemoveSortedRangeCache: range not found in hash map");
1302 if (pColCellBorder !=
nullptr)
1304 aColorChanger.
Update( *pAction );
1306 *pColCellBorder = aColor;
1314 GetFromRange().aStart.Tab() == cell.
Col() )
1317 GetFromRange().MakeRange( *
this );
1322 if (pColCellBorder !=
nullptr)
1324 aColorChanger.
Update( *pAction );
1326 *pColCellBorder = aColor;
1371 pFoundContent = pAction;
1374 pFoundMove = pAction;
1385 GetFromRange().MakeRange( *
this );
1398 pFound = pFoundContent;
1402 pFound = pFoundMove;
1407 aTrackText = pFound->
GetUser();
1412 aTrackText +=
":\n";
1414 if(!aComStr.isEmpty())
1416 aTrackText += aComStr;
1417 aTrackText +=
"\n( ";
1420 if (!aComStr.isEmpty())
bool ValidTab(SCTAB nTab)
const SCTAB SC_TAB_APPEND
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
virtual void Start(bool bStartTimer=true) override
OUString getDate(const Date &rDate) const
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
void Update(const ScChangeAction &rAction)
static void RemoveDocument(ScDocument *pDocument)
static void RemoveDocument(ScDocument *pDocument)
ScRange MakeRange(const ScDocument &rDoc) const
BroadcastAreaSlots and their management, once per document.
const OUString & GetComment() const
ScBigRange & GetBigRange()
sal_uLong GetActionNumber() const
ScChangeActionType GetType() const
virtual OUString GetDescription(ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const
ScChangeAction * GetNext() const
SC_DLLPUBLIC DateTime GetDateTime() const
const OUString & GetUser() const
ScChangeAction * GetFirst() const
static ScViewData * GetViewData()
Use this class as a locale variable to merge number formatter from another document,...
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
std::shared_ptr< svl::SharedStringPool > mpCellStringPool
rtl::Reference< ScSheetLimits > mxSheetLimits
SC_DLLPUBLIC ~ScDocument()
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
std::unique_ptr< SvMemoryStream > pClipData
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
SC_DLLPUBLIC void SetChangeTrack(std::unique_ptr< ScChangeTrack > pTrack)
only for import filter, deletes any existing ChangeTrack via EndChangeTracking() and takes ownership ...
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
void ClosingClipboardSource()
To be called at the clipboard document when closing a document that is the current clipboard source t...
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
std::unique_ptr< ScFieldEditEngine > mpEditEngine
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
void Clear(bool bFromDestructor=false)
SC_DLLPUBLIC ScRangeName * GetRangeName() const
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
ScTable * FetchTable(SCTAB nTab)
std::unique_ptr< ScUnoListenerCalls > pUnoListenerCalls
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
ScAddress aCurTextWidthCalcPos
VclPtr< SfxPrinter > mpPrinter
std::unique_ptr< ScDBData > mpAnonymousDBData
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
ScStyleSheet * pPreviewCellStyle
bool SetFormulaCells(const ScAddress &rPos, std::vector< ScFormulaCell * > &rCells)
ScDocumentThreadSpecific maNonThreaded
SC_DLLPUBLIC SCCOL MaxCol() const
std::unique_ptr< SfxItemSet > pPreviewFont
std::unique_ptr< ScDPCollection > pDPCollection
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
void SharePooledResources(const ScDocument *pSrcDoc)
std::unique_ptr< ScSortedRangeCacheMap > mxScSortedRangeCache
std::unique_ptr< ScFormulaParserPool > mxFormulaParserPool
static const sal_uInt16 nSrcVer
rtl::Reference< ScPoolHelper > mxPoolHelper
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
void SetExpandRefs(bool bVal)
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
SC_DLLPUBLIC SCROW MaxRow() const
std::unique_ptr< ScChangeViewSettings > pChangeViewSettings
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
ScSortedRangeCache & GetSortedRangeCache(const ScRange &rRange, const ScQueryParam ¶m, ScInterpreterContext *pContext)
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
std::unique_ptr< ScAutoNameCache > pAutoNameCache
std::unique_ptr< ScPatternAttr > pSelectionAttr
ScLookupCache & GetLookupCache(const ScRange &rRange, ScInterpreterContext *pContext)
Creates a ScLookupCache cache for the range if it doesn't already exist.
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
ScInterpreterContext & GetNonThreadedContext() const
std::unique_ptr< ScValidationDataList > pValidationList
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
void RemoveLookupCache(ScLookupCache &rCache)
Only ScLookupCache dtor uses RemoveLookupCache(), do not use elsewhere!
ScRangePairListRef xRowNameRanges
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.
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
std::unique_ptr< ScDetOpList > pDetOpList
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
SC_DLLPUBLIC bool GetAutoCalc() const
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
ScChangeViewSettings * GetChangeViewSettings() const
void StartChangeTracking()
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
std::unique_ptr< ScExternalRefManager > pExternalRefMgr
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
SC_DLLPUBLIC void SetViewOptions(const ScViewOptions &rOpt)
bool IsPendingRowHeights(SCTAB nTab) const
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
std::unique_ptr< ScChangeTrack > pChangeTrack
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
std::unique_ptr< sc::IconSetBitmapMap > m_pIconSetBitmapMap
void StartListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
static thread_local ScDocumentThreadSpecific maThreadSpecific
friend struct ScRefCellValue
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
std::shared_mutex mScLookupMutex
bool IsClipOrUndo() const
void SetPreviewSelection(const ScMarkData &rSel)
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
SC_DLLPUBLIC void SetDocVisible(bool bSet)
const OUString & GetCodeName() const
ScMarkData maPreviewSelection
void RemoveSortedRangeCache(ScSortedRangeCache &rCache)
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
SC_DLLPUBLIC bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
void SaveDdeLinks(SvStream &rStream) const
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
bool TableExists(SCTAB nTab) const
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
std::unordered_map< ScColumn *, std::pair< SCROW, SCROW > > pDelayedStartListeningFormulaCells
void InterpretCellsIfNeeded(const ScRangeList &rRanges)
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
SfxItemSet * GetPreviewFont()
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
bool IsThreadedGroupCalcInProgress() const
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
std::unique_ptr< ScDBCollection > pDBCollection
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
SC_DLLPUBLIC bool DrawGetPrintArea(ScRange &rRange, bool bSetHor, bool bSetVer) const
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
sc::DocumentLinkManager & GetDocLinkManager()
std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
void UpdateChartRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz)
const ScMarkData & GetPreviewSelection() const
sc::IconSetBitmapMap & GetIconSetBitmapMap()
ScStyleSheet * GetPreviewCellStyle()
ScChangeTrack * GetChangeTrack() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
std::unique_ptr< ScScriptTypeData > pScriptTypeData
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
std::unique_ptr< ScDrawLayer > mpDrawLayer
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
void SetDirty(const ScRange &, bool bIncludeEmptyCells)
void ClearLookupCaches()
Zap all caches.
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
void SetNoListening(bool bVal)
ScRangePairListRef xColNameRanges
std::unique_ptr< ScRange > pDelayedFormulaGrouping
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
bool MoveTab(SCTAB nOldPos, SCTAB nNewPos, ScProgress *pProgress=nullptr)
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
std::unique_ptr< ScRangeName > pRangeName
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
SC_DLLPUBLIC void InitClipPtrs(ScDocument *pSourceDoc)
SC_DLLPUBLIC SCTAB GetTableCount() const
std::unique_ptr< ScChartListenerCollection > pChartListenerCollection
static SC_DLLPUBLIC LanguageType eLnge
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
static sc::SharedStringPoolPurge & GetSharedStringPoolPurge()
static void ClearLookupCaches()
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
const ScRange & getRange() const
ScLookupCacheMap & getCacheMap() const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
SCTAB GetFirstSelected() const
bool GetTableSelect(SCTAB nTab) const
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
static void FillToEditItemSet(SfxItemSet &rEditSet, const SfxItemSet &rSrcSet, const SfxItemSet *pCondSet=nullptr)
Converts all Calc items contained in rSrcSet to edit engine items and puts them into rEditSet.
SfxItemSet & GetItemSet()
void CopyUsedNames(const SCTAB nLocalTab, const SCTAB nOldTab, const SCTAB nNewTab, const ScDocument &rOldDoc, ScDocument &rNewDoc, const bool bGlobalNamesToLocal) const
Copy names while copying a sheet if they reference the sheet to be copied.
bool Contains(const ScAddress &) const
is Address& fully in Range?
Sorted cache for one range used with interpreter functions such as VLOOKUP and MATCH.
HashKey getHashKey() const
static HashKey makeHashKey(const ScRange &range, const ScQueryParam ¶m)
const ScRange & getRange() const
bool SetFormulaCells(SCCOL nCol, SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Use this to lock all charts in the calc for a little time.
SCROW GetMaxTiledRow() const
SCCOL GetMaxTiledCol() const
static bool IsActionShown(const ScChangeAction &rAction, const ScChangeViewSettings &rSettings, ScDocument &rDocument)
void Invalidate(sal_uInt16 nId)
const INetURLObject & GetURLObject() const
css::uno::Reference< css::script::XLibraryContainer > GetBasicContainer()
BasicManager * GetBasicManager() const
SfxMedium * GetMedium() const
const OUString & GetName() const
void SetInvokeHandler(const Link< Timer *, void > &rLink)
static ThreadPool & getSharedOptimalPool()
Temporarily switch on/off auto calculation mode.
Wrapper for ScDocument::EnableDelayDeletingBroadcasters()
const sfx2::LinkManager * getExistingLinkManager() const
sfx2::LinkManager * getLinkManager(bool bCreate=true)
void delayedPurge(const std::shared_ptr< svl::SharedStringPool > &pool)
void VBA_InsertModule(ScDocument &rDoc, SCTAB nTab, const OUString &sSource)
IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Timer *, void)
#define SC_ASIANKERNING_INVALID
std::unique_ptr< ScTable, o3tl::default_delete< ScTable > > ScTableUniquePtr
@ SCDOCMODE_FUNCTIONACCESS
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
std::unique_ptr< sal_Int32[]> pData
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::shared_ptr< T > make_shared(Args &&... args)
PyRef getCharClass(const Runtime &)
CAUTION! The following defines must be in the same namespace as the respective type.
std::map< OUString, BitmapEx > IconSetBitmapMap
These need to be in global namespace just like their respective types are.
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
#define SC_CURRENT_VERSION
std::unique_ptr< ScRecursionHelper > xRecursionHelper
std::unique_ptr< ScLookupCacheMap > mxScLookupCache
std::unordered_map< ScRange, std::unique_ptr< ScLookupCache >, ScLookupCache::Hash > aCacheMap
A pretty assertion that checks that the relevant bits in the @nFlags are not set on the document at e...
This is very similar to ScCellValue, except that it references the original value instead of copying ...
static SC_DLLPUBLIC ScSheetLimits CreateDefault()
ScSheetLimits(SCCOL nMaxCol, SCROW nMaxRow)
Maximum addressable row.
Store position data for column array storage.
Context for reference update during shifting, moving or copying of cell ranges.
UpdateRefMode meMode
update mode - insert/delete, copy, or move.
SCTAB mnTabDelta
Amount and direction of movement in the sheet direction.
ScRange maRange
Range of cells that are about to be moved for insert/delete/move modes.