24#include <osl/thread.h>
38#include <osl/diagnose.h>
42#include <document.hxx>
93#include <config_features.h>
101#if HAVE_FEATURE_JUMBO_SHEETS
102 bool jumboSheets =
false;
104 jumboSheets =
SC_MOD()->GetDefaultsOptions().GetInitJumboSheets();
106 assert( getenv(
"LO_TESTNAME") !=
nullptr );
116 mpDocLinkMgr(new
sc::DocumentLinkManager(pDocShell)),
117 mbFormulaGroupCxtBlockDiscard(false),
119 mpUndoManager( nullptr ),
120 mpShell( pDocShell ),
121 mpPrinter( nullptr ),
122 mpVirtualDevice_100th_mm( nullptr ),
123 pFormatExchangeList( nullptr ),
125 pFormulaTree( nullptr ),
126 pEOFormulaTree( nullptr ),
127 pFormulaTrack( nullptr ),
128 pEOFormulaTrack( nullptr ),
129 pPreviewCellStyle( nullptr ),
130 maPreviewSelection(*mxSheetLimits),
132 nRangeOverflowType( 0 ),
133 aCurTextWidthCalcPos(MaxCol(),0,0),
134 aTrackIdle(
"sc ScDocument Track Idle"),
135 nFormulaCodeInTree(0),
136 nXMLImportedFormulaCount( 0 ),
138 nMacroInterpretLevel(0),
139 nInterpreterTableOpLevel(0),
140 maInterpreterContext( *this, nullptr ),
142 nFormulaTrackCount(0),
149 bAutoCalcShellDisabled( false ),
150 bForcedFormulaPending( false ),
151 bCalculatingFormulaTree( false ),
156 bIsEmbedded( false ),
157 bInsertingFromOtherDoc( false ),
158 bLoadingMedium( false ),
159 bImportingXML( false ),
160 bCalcingAfterLoad( false ),
161 bNoListening( false ),
163 bInLinkUpdate( false ),
164 bChartListenerCollectionNeedsUpdate( false ),
165 bHasForcedFormulas( false ),
166 bInDtorClear( false ),
167 bExpandRefs( false ),
168 bDetectiveDirty( false ),
169 bDelayedDeletingBroadcasters( false ),
170 bLinkFormulaNeedingCheck( false ),
173 bPastingDrawFromOtherDoc( false ),
174 nInDdeLinkUpdate( 0 ),
175 bInUnoBroadcast( false ),
176 bInUnoListenerCall( false ),
177 nAdjustHeightLock(0),
178 eGrammar(
formula::FormulaGrammar::GRAM_NATIVE ),
179 bStyleSheetUsageInvalid( true ),
180 mbUndoEnabled( true ),
181 mbExecuteLinkEnabled( true ),
182 mbChangeReadOnlyEnabled( false ),
183 mbStreamValidLocked( false ),
184 mbUserInteractionEnabled(true),
185 mnNamedRangesLockCount(0),
187 mbEmbedUsedFontsOnly(false),
188 mbEmbedFontScriptLatin(true),
189 mbEmbedFontScriptAsian(true),
190 mbEmbedFontScriptComplex(true),
191 mnImagePreferredDPI(0),
192 mbTrackFormulasPending(false),
193 mbFinalTrackFormulas(false),
194 mbDocShellRecalc(false),
195 mbLayoutStrings(false),
196 mnMutationGuardFlags(0)
203 eSrcSet = osl_getThreadTextEncoding();
256 "ScDocument::SetStorageGrammar: wrong storage grammar");
271 sal_uInt32 nCrc = rtl_crc32( 0, &pThis,
sizeof(
ScDocument*) );
296 OSL_ENSURE( &pTrack->GetDocument() ==
this,
"SetChangeTrack: different documents" );
297 if ( !pTrack || pTrack ==
pChangeTrack || &pTrack->GetDocument() !=
this )
312 mpShell->Broadcast(
SfxHint( SfxHintId::ScDataChanged ) );
314 if (!mpShell->IsModified())
316 mpShell->SetModified();
437 OSL_ENSURE(
bIsClip,
"InitClipPtrs and not bIsClip");
531 for (
SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->
maTabs.size());
i++)
535 OUString aString = pSourceDoc->
maTabs[
i]->GetName();
554 OSL_FAIL(
"ResetClip");
568 if (nTab <
static_cast<SCTAB>(pSourceDoc->
maTabs.size()) && pSourceDoc->
maTabs[nTab])
569 maTabs[nTab]->SetLayoutRTL( pSourceDoc->
maTabs[nTab]->IsLayoutRTL() );
573 OSL_FAIL(
"ResetClip");
584 maTabs[nTab].reset(
new ScTable(*
this, nTab,
"temp", bExtras, bExtras) );
600 return maTabs[rPos.
Tab()]->GetRefCellValue(rPos.
Col(), rPos.
Row(), rBlockPos);
618 bool bAny =
maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes,
false);
638 SCCOL& rEndCol )
const
642 bool bAny =
maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol );
660 SCROW& rEndRow,
bool bNotes )
const
664 bool bAny =
maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
685 bool bAny =
maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
706 bool bHasPrintArea =
GetPrintArea(nTab, rEndCol, rEndRow,
false);
723 else if (!bHasPrintArea)
737 if (nOldPos == nNewPos)
745 if (
ValidTab(nOldPos) && nOldPos < nTabCount )
754 nNewPos = nTabCount-1;
761 SCTAB nDz = nNewPos - nOldPos;
780 aSourceRange, 0,0,nDz ) );
784 maTabs.insert(
maTabs.begin()+nNewPos, std::move(pSaveTab));
785 for (
SCTAB i = 0;
i < nTabCount;
i++)
787 maTabs[
i]->UpdateMoveTab(aCxt,
i, pProgress);
788 for (
auto& rxTab :
maTabs)
790 rxTab->UpdateCompile();
798 mpDrawLayer->ScMovePage(
static_cast<sal_uInt16
>(nOldPos),
static_cast<sal_uInt16
>(nNewPos) );
815 OSL_ENSURE(bPrefix,
"invalid table name");
838 if (
ValidTab(nNewPos) && (nNewPos < static_cast<SCTAB>(
maTabs.size())))
859 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
860 if (*it && it != (
maTabs.begin() + nOldPos))
861 (*it)->UpdateInsertTab(aCxt);
862 if (nNewPos <= nOldPos)
866 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
867 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin() + nNewPos)
868 (*it)->UpdateCompile();
871 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
872 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin()+nNewPos)
873 (*it)->StartListeners(aSLCxt,
true);
887 const bool bGlobalNamesToLocal =
true;
888 const SCTAB nRealOldPos = (nNewPos < nOldPos) ? nOldPos - 1 : nOldPos;
891 pNames->
CopyUsedNames( nOldPos, nRealOldPos, nNewPos, *
this, *
this, bGlobalNamesToLocal);
897 (pOnlyMarked !=
nullptr),
maTabs[nNewPos].
get(), pOnlyMarked,
898 false ,
true , bGlobalNamesToLocal,
false );
901 SCTAB nDz = nNewPos - nOldPos;
906 maTabs[nNewPos]->UpdateReference(aRefCxt);
908 maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos);
909 maTabs[nOldPos]->UpdateInsertTab(aCxt);
911 maTabs[nOldPos]->UpdateCompile();
912 maTabs[nNewPos]->UpdateCompile(
true );
915 maTabs[nOldPos]->StartListeners(aSLCxt,
true);
916 maTabs[nNewPos]->StartListeners(aSLCxt,
true);
923 mpDrawLayer->ScCopyPage(
static_cast<sal_uInt16
>(nOldPos),
static_cast<sal_uInt16
>(nNewPos) );
936 maTabs[nNewPos]->SetLoadingRTL(
maTabs[nOldPos]->IsLoadingRTL());
949 SCTAB nDestPos,
bool bInsertNew,
977 maTabs[nDestPos]->SetLayoutRTL(rSrcDoc.
maTabs[nSrcPos]->IsLayoutRTL());
978 maTabs[nDestPos]->SetLoadingRTL(rSrcDoc.
maTabs[nSrcPos]->IsLoadingRTL());
992 bool bOldAutoCalcSrc =
false;
1011 const bool bGlobalNamesToLocal =
false;
1014 pNames->
CopyUsedNames( nSrcPos, nSrcPos, nDestPos, rSrcDoc, *
this, bGlobalNamesToLocal);
1019 false,
maTabs[nDestPos].
get(),
nullptr,
false,
true,
1023 maTabs[nDestPos]->SetTabNo(nDestPos);
1024 maTabs[nDestPos]->SetTabBgColor(rSrcDoc.
maTabs[nSrcPos]->GetTabBgColor());
1027 if (
auto aRepeatColRange = rSrcDoc.
maTabs[nSrcPos]->GetRepeatColRange())
1029 aRepeatColRange->aStart.SetTab(nDestPos);
1030 aRepeatColRange->aEnd.SetTab(nDestPos);
1031 maTabs[nDestPos]->SetRepeatColRange(aRepeatColRange);
1034 if (
auto aRepeatRowRange = rSrcDoc.
maTabs[nSrcPos]->GetRepeatRowRange())
1036 aRepeatRowRange->aStart.SetTab(nDestPos);
1037 aRepeatRowRange->aEnd.SetTab(nDestPos);
1038 maTabs[nDestPos]->SetRepeatRowRange(aRepeatRowRange);
1042 maTabs[nDestPos]->SetPrintEntireSheet();
1045 const auto nPrintRangeCount = rSrcDoc.
maTabs[nSrcPos]->GetPrintRangeCount();
1052 maTabs[nDestPos]->AddPrintRange(aSrcPrintRange);
1056 if ( !bResultsOnly )
1062 maTabs[nDestPos]->UpdateReference(aRefCxt);
1065 maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
1067 maTabs[nDestPos]->CompileAll(aFormulaCxt);
1071 if ( !bResultsOnly )
1074 maTabs[nDestPos]->StartListeners(aSLCxt,
true);
1087 maTabs[nDestPos]->SetPendingRowHeights( rSrcDoc.
maTabs[nSrcPos]->IsPendingRowHeights() );
1098 OUString aLibName(
"Standard");
1099#if HAVE_FEATURE_SCRIPTING
1101 if (pBasicManager && !pBasicManager->
GetName().isEmpty())
1107 uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->
GetBasicContainer();
1108 uno::Reference< container::XNameContainer > xLib;
1109 if( xLibContainer.is() )
1111 uno::Any aLibAny = xLibContainer->getByName(aLibName);
1117 OUString sSrcCodeName;
1119 OUString sRTLSource;
1120 xLib->getByName( sSrcCodeName ) >>= sRTLSource;
1121 sSource = sRTLSource;
1134 maTabs[nTab]->SetError( nCol, nRow, nError );
1152 maTabs[rPos.
Tab()]->SetFormula(rPos.
Col(), rPos.
Row(), rFormula, eGram);
1163 return maTabs[rPos.
Tab()]->SetFormulaCell(rPos.
Col(), rPos.
Row(), pCell);
1193 std::unique_ptr<ScFieldEditEngine> pNewEditEngine;
1210 return pNewEditEngine;
1221 rpEditEngine.reset();
1231 auto [findIt, bInserted] = pCacheMap->
aCacheMap.emplace(rRange,
nullptr);
1234 findIt->second = std::make_unique<ScLookupCache>(
this, rRange, *pCacheMap);
1235 pCache = findIt->second.get();
1242 pCache = (*findIt).second.get();
1260 return *findIt->second;
1275 findIt->second = std::make_unique<ScSortedRangeCache>(
this, rRange, param, pContext,
invalid);
1278 return *findIt->second;
1288 auto it(cacheMap.aCacheMap.find(rCache.
getRange()));
1289 if (it != cacheMap.aCacheMap.end())
1291 std::unique_ptr<ScLookupCache> xCache = std::move(it->second);
1292 cacheMap.aCacheMap.erase(it);
1297 OSL_FAIL(
"ScDocument::RemoveLookupCache: range not found in hash map");
1309 std::unique_ptr<ScSortedRangeCache> xCache = std::move(it->second);
1315 OSL_FAIL(
"ScDocument::RemoveSortedRangeCache: range not found in hash map");
1354 if (pColCellBorder !=
nullptr)
1356 aColorChanger.
Update( *pAction );
1358 *pColCellBorder = aColor;
1366 GetFromRange().aStart.Tab() == cell.
Col() )
1369 GetFromRange().MakeRange( *
this );
1374 if (pColCellBorder !=
nullptr)
1376 aColorChanger.
Update( *pAction );
1378 *pColCellBorder = aColor;
1423 pFoundContent = pAction;
1426 pFoundMove = pAction;
1437 GetFromRange().MakeRange( *
this );
1450 pFound = pFoundContent;
1454 pFound = pFoundMove;
1459 aTrackText = pFound->
GetUser();
1464 aTrackText +=
":\n";
1466 if(!aComStr.isEmpty())
1468 aTrackText += aComStr;
1469 aTrackText +=
"\n( ";
1472 if (!aComStr.isEmpty())
bool ValidTab(SCTAB nTab)
const SCTAB SC_TAB_APPEND
const OUString & GetName() const
std::unique_ptr< EditTextObject > CreateTextObject()
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)
SC_DLLPUBLIC 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< EditTextObject > CreateSharedStringTextObject(const svl::SharedString &rSS)
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
bool InterpretCellsIfNeeded(const ScRangeList &rRanges)
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
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
bool IsPrintEntireSheet(SCTAB nTab) const
Returns true, if the specified sheet is always printed.
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
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
static SC_DLLPUBLIC LanguageType eLnge
static SC_DLLPUBLIC const LocaleDataWrapper & getLocaleData()
static sc::SharedStringPoolPurge & GetSharedStringPoolPurge()
static void ClearLookupCaches(const ScDocument *pDoc)
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)
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
virtual void SetModified(bool bModified=true)
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)
const OUString & getString() const
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.