24 #include <osl/thread.h>
38 #include <osl/diagnose.h>
42 #include <document.hxx>
106 mpDocLinkMgr(new
sc::DocumentLinkManager(pDocShell)),
107 mbFormulaGroupCxtBlockDiscard(false),
109 mpUndoManager( nullptr ),
110 mpShell( pDocShell ),
111 mpPrinter( nullptr ),
112 mpVirtualDevice_100th_mm( nullptr ),
113 pFormatExchangeList( nullptr ),
115 pFormulaTree( nullptr ),
116 pEOFormulaTree( nullptr ),
117 pFormulaTrack( nullptr ),
118 pEOFormulaTrack( nullptr ),
119 pPreviewCellStyle( nullptr ),
120 maPreviewSelection(*mxSheetLimits),
122 nRangeOverflowType( 0 ),
123 aCurTextWidthCalcPos(MaxCol(),0,0),
124 aTrackIdle(
"sc ScDocument Track Idle"),
125 nFormulaCodeInTree(0),
126 nXMLImportedFormulaCount( 0 ),
128 nMacroInterpretLevel(0),
129 nInterpreterTableOpLevel(0),
130 maInterpreterContext( *this, nullptr ),
131 nFormulaTrackCount(0),
138 bAutoCalcShellDisabled( false ),
139 bForcedFormulaPending( false ),
140 bCalculatingFormulaTree( false ),
145 bIsEmbedded( false ),
146 bInsertingFromOtherDoc( false ),
147 bLoadingMedium( false ),
148 bImportingXML( false ),
149 bCalcingAfterLoad( false ),
150 bNoListening( false ),
152 bInLinkUpdate( false ),
153 bChartListenerCollectionNeedsUpdate( false ),
154 bHasForcedFormulas( false ),
155 bInDtorClear( false ),
156 bExpandRefs( false ),
157 bDetectiveDirty( false ),
158 bLinkFormulaNeedingCheck( false ),
161 bPastingDrawFromOtherDoc( false ),
162 nInDdeLinkUpdate( 0 ),
163 bInUnoBroadcast( false ),
164 bInUnoListenerCall( false ),
165 nAdjustHeightLock(0),
166 eGrammar(
formula::FormulaGrammar::GRAM_NATIVE ),
167 bStyleSheetUsageInvalid( true ),
168 mbUndoEnabled( true ),
169 mbExecuteLinkEnabled( true ),
170 mbChangeReadOnlyEnabled( false ),
171 mbStreamValidLocked( false ),
172 mbUserInteractionEnabled(true),
173 mnNamedRangesLockCount(0),
175 mbEmbedUsedFontsOnly(false),
176 mbEmbedFontScriptLatin(true),
177 mbEmbedFontScriptAsian(true),
178 mbEmbedFontScriptComplex(true),
179 mbTrackFormulasPending(false),
180 mbFinalTrackFormulas(false),
181 mbDocShellRecalc(false),
182 mnMutationGuardFlags(0)
189 eSrcSet = osl_getThreadTextEncoding();
242 "ScDocument::SetStorageGrammar: wrong storage grammar");
257 sal_uInt32 nCrc = rtl_crc32( 0, &pThis,
sizeof(
ScDocument*) );
276 OSL_ENSURE( &pTrack->GetDocument() ==
this,
"SetChangeTrack: different documents" );
277 if ( !pTrack || pTrack ==
pChangeTrack || &pTrack->GetDocument() != this )
292 mpShell->Broadcast(
SfxHint( SfxHintId::ScDataChanged ) );
294 if (!mpShell->IsModified())
296 mpShell->SetModified();
410 OSL_ENSURE(
bIsClip,
"InitClipPtrs and not bIsClip");
493 for (
SCTAB i = 0; i < static_cast<SCTAB>(pSourceDoc->
maTabs.size());
i++)
497 OUString aString = pSourceDoc->
maTabs[
i]->GetName();
498 if (
i < static_cast<SCTAB>(
maTabs.size()) )
505 if(
i > static_cast<SCTAB>(
maTabs.size()) )
516 OSL_FAIL(
"ResetClip");
525 if (nTab >= static_cast<SCTAB>(
maTabs.size()))
530 if (nTab < static_cast<SCTAB>(pSourceDoc->
maTabs.size()) && pSourceDoc->
maTabs[nTab])
531 maTabs[nTab]->SetLayoutRTL( pSourceDoc->
maTabs[nTab]->IsLayoutRTL() );
535 OSL_FAIL(
"ResetClip");
546 maTabs[nTab].reset(
new ScTable(*
this, nTab,
"temp", bExtras, bExtras) );
562 return maTabs[rPos.
Tab()]->GetRefCellValue(rPos.
Col(), rPos.
Row(), rBlockPos);
580 bool bAny =
maTabs[nTab]->GetPrintArea( rEndCol, rEndRow, bNotes,
false);
600 SCCOL& rEndCol )
const
604 bool bAny =
maTabs[nTab]->GetPrintAreaHor( nStartRow, nEndRow, rEndCol );
622 SCROW& rEndRow,
bool bNotes )
const
626 bool bAny =
maTabs[nTab]->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
647 bool bAny =
maTabs[nTab]->GetDataStart( rStartCol, rStartRow );
668 bool bHasPrintArea =
GetPrintArea(nTab, rEndCol, rEndRow,
false);
685 else if (!bHasPrintArea)
699 if (nOldPos == nNewPos)
707 if (
ValidTab(nOldPos) && nOldPos < nTabCount )
715 nNewPos = nTabCount-1;
722 SCTAB nDz = nNewPos - nOldPos;
741 aSourceRange, 0,0,nDz ) );
745 maTabs.insert(
maTabs.begin()+nNewPos, std::move(pSaveTab));
746 for (
SCTAB i = 0;
i < nTabCount;
i++)
748 maTabs[i]->UpdateMoveTab(aCxt, i, pProgress);
749 for (
auto& rxTab :
maTabs)
751 rxTab->UpdateCompile();
759 mpDrawLayer->ScMovePage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
776 OSL_ENSURE(bPrefix,
"invalid table name");
785 bValid = !
GetTable( aName, nDummy );
792 if (nNewPos >= static_cast<SCTAB>(
maTabs.size()))
799 if (
ValidTab(nNewPos) && (nNewPos < static_cast<SCTAB>(
maTabs.size())))
820 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
821 if (*it && it != (
maTabs.begin() + nOldPos))
822 (*it)->UpdateInsertTab(aCxt);
823 if (nNewPos <= nOldPos)
827 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
828 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin() + nNewPos)
829 (*it)->UpdateCompile();
832 for (TableContainer::iterator it =
maTabs.begin(); it !=
maTabs.end(); ++it)
833 if (*it && it !=
maTabs.begin()+nOldPos && it !=
maTabs.begin()+nNewPos)
834 (*it)->StartListeners(aSLCxt,
true);
848 const bool bGlobalNamesToLocal =
true;
849 const SCTAB nRealOldPos = (nNewPos < nOldPos) ? nOldPos - 1 : nOldPos;
852 pNames->
CopyUsedNames( nOldPos, nRealOldPos, nNewPos, *
this, *
this, bGlobalNamesToLocal);
857 (pOnlyMarked !=
nullptr),
maTabs[nNewPos].
get(), pOnlyMarked,
858 false ,
true , bGlobalNamesToLocal,
false );
861 SCTAB nDz = nNewPos - nOldPos;
866 maTabs[nNewPos]->UpdateReference(aRefCxt);
868 maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos);
869 maTabs[nOldPos]->UpdateInsertTab(aCxt);
871 maTabs[nOldPos]->UpdateCompile();
872 maTabs[nNewPos]->UpdateCompile(
true );
875 maTabs[nOldPos]->StartListeners(aSLCxt,
true);
876 maTabs[nNewPos]->StartListeners(aSLCxt,
true);
883 mpDrawLayer->ScCopyPage( static_cast<sal_uInt16>(nOldPos), static_cast<sal_uInt16>(nNewPos) );
896 maTabs[nNewPos]->SetLoadingRTL(
maTabs[nOldPos]->IsLoadingRTL());
909 SCTAB nDestPos,
bool bInsertNew,
932 rSrcDoc.
GetName(nSrcPos, aName);
937 maTabs[nDestPos]->SetLayoutRTL(rSrcDoc.
maTabs[nSrcPos]->IsLayoutRTL());
938 maTabs[nDestPos]->SetLoadingRTL(rSrcDoc.
maTabs[nSrcPos]->IsLoadingRTL());
952 bool bOldAutoCalcSrc =
false;
966 nDestPos = std::min(nDestPos, static_cast<SCTAB>(
GetTableCount() - 1));
971 const bool bGlobalNamesToLocal =
false;
974 pNames->
CopyUsedNames( nSrcPos, nSrcPos, nDestPos, rSrcDoc, *
this, bGlobalNamesToLocal);
979 false,
maTabs[nDestPos].
get(),
nullptr,
false,
true,
983 maTabs[nDestPos]->SetTabNo(nDestPos);
984 maTabs[nDestPos]->SetTabBgColor(rSrcDoc.
maTabs[nSrcPos]->GetTabBgColor());
992 maTabs[nDestPos]->UpdateReference(aRefCxt);
995 maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
997 maTabs[nDestPos]->CompileAll(aFormulaCxt);
1001 if ( !bResultsOnly )
1004 maTabs[nDestPos]->StartListeners(aSLCxt,
true);
1017 maTabs[nDestPos]->SetPendingRowHeights( rSrcDoc.
maTabs[nSrcPos]->IsPendingRowHeights() );
1028 OUString aLibName(
"Standard");
1030 if (pBasicManager && !pBasicManager->
GetName().isEmpty())
1035 uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->
GetBasicContainer();
1036 uno::Reference< container::XNameContainer > xLib;
1037 if( xLibContainer.is() )
1039 uno::Any aLibAny = xLibContainer->getByName(aLibName);
1045 OUString sSrcCodeName;
1047 OUString sRTLSource;
1048 xLib->getByName( sSrcCodeName ) >>= sRTLSource;
1049 sSource = sRTLSource;
1062 maTabs[nTab]->SetError( nCol, nRow, nError );
1080 maTabs[rPos.
Tab()]->SetFormula(rPos.
Col(), rPos.
Row(), rFormula, eGram);
1091 return maTabs[rPos.
Tab()]->SetFormulaCell(rPos.
Col(), rPos.
Row(), pCell);
1121 std::unique_ptr<ScFieldEditEngine> pNewEditEngine;
1139 return pNewEditEngine;
1150 rpEditEngine.reset();
1160 auto [findIt, bInserted] = pCacheMap->
aCacheMap.emplace(rRange,
nullptr);
1163 findIt->second = std::make_unique<ScLookupCache>(
this, rRange, *pCacheMap);
1164 pCache = findIt->second.get();
1171 pCache = (*findIt).second.get();
1183 auto it(cacheMap.aCacheMap.find(rCache.
getRange()));
1184 if (it != cacheMap.aCacheMap.end())
1187 cacheMap.aCacheMap.erase(it);
1192 OSL_FAIL(
"ScDocument::RemoveLookupCache: range not found in hash map");
1228 if (aRange.
In(cell))
1230 if (pColCellBorder !=
nullptr)
1232 aColorChanger.
Update( *pAction );
1234 *pColCellBorder = aColor;
1241 static_cast<const ScChangeActionMove*>(pAction)->
1242 GetFromRange().aStart.Tab() == cell.
Col() )
1245 GetFromRange().MakeRange();
1248 if (aRange.
In(cell))
1250 if (pColCellBorder !=
nullptr)
1252 aColorChanger.
Update( *pAction );
1254 *pColCellBorder = aColor;
1293 if ( aRange.
In( aCellPos ) )
1299 pFoundContent = pAction;
1302 pFoundMove = pAction;
1313 GetFromRange().MakeRange();
1314 if ( aRange.
In( aCellPos ) )
1326 pFound = pFoundContent;
1330 pFound = pFoundMove;
1335 aTrackText = pFound->
GetUser();
1340 aTrackText +=
":\n";
1342 if(!aComStr.isEmpty())
1344 aTrackText += aComStr;
1345 aTrackText +=
"\n( ";
1348 if (!aComStr.isEmpty())
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
#define LINK(Instance, Class, Member)
std::unique_ptr< ScFieldEditEngine > mpEditEngine
IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Timer *, void)
void ClearLookupCaches()
Zap all caches.
VclPtr< SfxPrinter > mpPrinter
Temporarily switch on/off auto calculation mode.
SfxItemSet * GetPreviewFont()
SC_DLLPUBLIC bool GetDataStart(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow) const
std::unique_ptr< ScChangeTrack > pChangeTrack
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
void SetConsolidateDlgData(std::unique_ptr< ScConsolidateParam > pData)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
ScChangeActionType GetType() const
VclPtr< VirtualDevice > mpVirtualDevice_100th_mm
static bool IsActionShown(const ScChangeAction &rAction, const ScChangeViewSettings &rSettings, ScDocument &rDocument)
Use this to lock all charts in the calc for a little time.
SC_DLLPUBLIC ScRangeName * GetRangeName() const
ScChangeAction * GetNext() const
std::unique_ptr< ScRefreshTimerControl > const & GetRefreshTimerControlAddress() const
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings &rNew)
void SetPreviewSelection(const ScMarkData &rSel)
ScTable * FetchTable(SCTAB nTab)
std::unique_ptr< ScFieldEditEngine > pCacheFieldEditEngine
sc::IconSetBitmapMap & GetIconSetBitmapMap()
Context for reference update during shifting, moving or copying of cell ranges.
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
static const sal_uInt16 nSrcVer
SCROW GetMaxTiledRow() const
const ScMarkData & GetPreviewSelection() const
Store position data for column array storage.
const SfxItemSet & GetItemSet() const
ScDocumentThreadSpecific maNonThreaded
const sfx2::LinkManager * getExistingLinkManager() const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
void UpdateReference(UpdateRefMode, const ScDocument *, const ScRange &rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz)
std::shared_ptr< T > make_shared(Args &&...args)
std::unique_ptr< ScValidationDataList > pValidationList
void Invalidate(sal_uInt16 nId)
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...
void SetPreviewFont(std::unique_ptr< SfxItemSet > pFontSet)
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
void ApplyAsianEditSettings(ScEditEngineDefaulter &rEngine)
sc::DocumentLinkManager & GetDocLinkManager()
bool TableExists(SCTAB nTab) const
sfx2::LinkManager * getLinkManager(bool bCreate=true)
SC_DLLPUBLIC ScNoteEditEngine & GetNoteEngine()
ScAddress aCurTextWidthCalcPos
bool IsCellMarked(SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
SC_DLLPUBLIC bool GetPrintAreaVer(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
virtual void GetDescription(OUString &rStr, ScDocument &rDoc, bool bSplitRange=false, bool bWarning=true) const
bool IsPendingRowHeights(SCTAB nTab) const
std::unordered_map< ScColumn *, std::pair< SCROW, SCROW > > pDelayedStartListeningFormulaCells
SC_DLLPUBLIC SCROW MaxRow() const
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
#define SC_ASIANKERNING_INVALID
SC_DLLPUBLIC SCTAB GetTableCount() const
void SetExpandRefs(bool bVal)
std::unique_ptr< ScRefreshTimerControl > pRefreshTimerControl
std::unique_ptr< ScBroadcastAreaSlotMachine > pBASM
std::unique_ptr< ScConsolidateParam > pConsolidateDlgData
#define SC_CURRENT_VERSION
void SetNoListening(bool bVal)
virtual void Start() override
SC_DLLPUBLIC void TransferDrawPage(const ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos)
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
ScChangeAction * GetFirst() const
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.
std::map< OUString, BitmapEx > IconSetBitmapMap
bool GetInitJumboSheets() const
void SetError(SCCOL nCol, SCROW nRow, SCTAB nTab, const FormulaError nError)
void Clear(bool bFromDestructor=false)
void EndListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
SC_DLLPUBLIC ~ScDocument()
std::unique_ptr< ScDBData > mpAnonymousDBData
const OUString & GetName() const
SCCOL GetMaxTiledCol() const
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
ScChangeTrack * GetChangeTrack() const
std::unique_ptr< ScDrawLayer > mpDrawLayer
ScStyleSheet * GetPreviewCellStyle()
ScRangePairListRef xColNameRanges
static ThreadPool & getSharedOptimalPool()
SC_DLLPUBLIC const ScDocOptions & GetDocOptions() const
const ScRange & getRange() const
A pretty assertion that checks that the relevant bits in the are not set on the document at entry an...
ScRefCellValue GetRefCellValue(const ScAddress &rPos)
bool SetFormulaCells(SCCOL nCol, SCROW nRow, std::vector< ScFormulaCell * > &rCells)
bool IsCellInChangeTrack(const ScAddress &cell, Color *pColCellBorder)
formula::FormulaGrammar::Grammar eStorageGrammar
The compiler grammar used in document storage.
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
bool CopyTab(SCTAB nOldPos, SCTAB nNewPos, const ScMarkData *pOnlyMarked=nullptr)
void SetStorageGrammar(formula::FormulaGrammar::Grammar eGrammar)
Should only be GRAM_PODF or GRAM_ODFF.
std::unique_ptr< ScDPCollection > pDPCollection
const SCTAB SC_TAB_APPEND
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge)
rtl::Reference< ScSheetLimits > mxSheetLimits
UpdateRefMode meMode
update mode - insert/delete, copy, or move.
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
static void ClearLookupCaches()
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
const OUString & GetComment() const
ScMarkData maPreviewSelection
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 SetViewOptions(const ScViewOptions &rOpt)
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
SC_DLLPUBLIC SfxItemPool * GetEnginePool() const
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument &rSrcDoc, SCTAB nSrcPos, SCTAB nDestPos, bool bInsertNew=true, bool bResultsOnly=false)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
void SharePooledResources(const ScDocument *pSrcDoc)
std::unique_ptr< ScLookupCacheMap > mxScLookupCache
ScLookupCacheMap & getCacheMap() const
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
BroadcastAreaSlots and their management, once per document.
ScBigRange & GetBigRange()
void SaveDdeLinks(SvStream &rStream) const
bool In(const ScAddress &) const
is Address& in Range?
static SC_DLLPUBLIC LanguageType eLnge
void Update(const ScChangeAction &rAction)
std::unique_ptr< ScScriptTypeData > pScriptTypeData
std::unique_ptr< sc::DocumentLinkManager > mpDocLinkMgr
static ScViewData * GetViewData()
Use this class as a locale variable to merge number formatter from another document, and set NULL pointer to pFormatExchangeList when done.
std::unique_ptr< ScNoteEditEngine > mpNoteEngine
void UpdateChartRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz)
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
ScRange maRange
Range of cells that are about to be moved for insert/delete/move modes.
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
sal_uInt32 GetDocumentID() const
an ID unique to each document instance
friend struct ScRefCellValue
SC_DLLPUBLIC void EnsureTable(SCTAB nTab)
SC_DLLPUBLIC const ScViewOptions & GetViewOptions() const
std::unique_ptr< ScUnoRefList > pUnoRefUndoList
std::unique_ptr< SvMemoryStream > pClipData
sal_uLong GetActionNumber() const
void VBA_InsertModule(ScDocument &rDoc, SCTAB nTab, const OUString &sSource)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
std::unordered_map< ScRange, std::unique_ptr< ScLookupCache >, ScLookupCache::Hash > aCacheMap
static thread_local ScDocumentThreadSpecific maThreadSpecific
static SC_DLLPUBLIC const LocaleDataWrapper * getLocaleDataPtr()
OUString getDate(const Date &rDate) const
SC_DLLPUBLIC Color GetTabBgColor(SCTAB nTab) const
ScRange MakeRange() const
SC_DLLPUBLIC void SetDocVisible(bool bSet)
bool IsThreadedGroupCalcInProgress() const
void SetDirty(const ScRange &, bool bIncludeEmptyCells)
SC_DLLPUBLIC ScFormulaCell * SetFormulaCell(const ScAddress &rPos, ScFormulaCell *pCell)
Set formula cell, and transfer its ownership to the document.
ScStyleSheet * pPreviewCellStyle
SC_DLLPUBLIC void InitClipPtrs(ScDocument *pSourceDoc)
SC_DLLPUBLIC void SetDocOptions(const ScDocOptions &rOpt)
bool MoveTab(SCTAB nOldPos, SCTAB nNewPos, ScProgress *pProgress=nullptr)
#define SAL_WARN_IF(condition, area, stream)
SC_DLLPUBLIC bool GetPrintAreaHor(SCTAB nTab, SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
std::unique_ptr< sc::IconSetBitmapMap > m_pIconSetBitmapMap
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
static void RemoveDocument(ScDocument *pDocument)
std::unique_ptr< ScTable, o3tl::default_delete< ScTable > > ScTableUniquePtr
SCTAB mnTabDelta
Amount and direction of movement in the sheet direction.
std::unique_ptr< ScFieldEditEngine > CreateFieldEditEngine()
SC_DLLPUBLIC void SetChangeTrack(std::unique_ptr< ScChangeTrack > pTrack)
only for import filter, deletes any existing ChangeTrack via EndChangeTracking() and takes ownership ...
const OUString & GetName() const
SCTAB GetFirstSelected() const
std::unique_ptr< ScUnoListenerCalls > pUnoListenerCalls
void DisposeFieldEditEngine(std::unique_ptr< ScFieldEditEngine > &rpEditEngine)
ScChangeViewSettings * GetChangeViewSettings() const
std::unique_ptr< SfxItemSet > pPreviewFont
static ScSheetLimits * CreateSheetLimits()
osl::Mutex mScLookupMutex
const INetURLObject & GetURLObject() const
std::unique_ptr< ScPatternAttr > pSelectionAttr
void SetLanguage(LanguageType eLatin, LanguageType eCjk, LanguageType eCtl)
ScRangePairListRef xRowNameRanges
std::unique_ptr< ScChangeViewSettings > pChangeViewSettings
These need to be in global namespace just like their respective types are.
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
void SetInvokeHandler(const Link< Timer *, void > &rLink)
std::unique_ptr< ScAutoNameCache > pAutoNameCache
static void RemoveDocument(ScDocument *pDocument)
std::unique_ptr< ScFormulaParserPool > mxFormulaParserPool
SC_DLLPUBLIC SfxItemPool * GetEditPool() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
const OUString & GetUser() const
std::shared_ptr< svl::SharedStringPool > mpCellStringPool
void ClosingClipboardSource()
To be called at the clipboard document when closing a document that is the current clipboard source t...
ScInterpreterContext & GetNonThreadedContext() const
std::unique_ptr< ScRangeName > pRangeName
rtl::Reference< ScPoolHelper > mxPoolHelper
SfxObjectShell * GetDocumentShell() const
const OUString & GetCodeName() const
void StartListeningArea(const ScRange &rRange, bool bGroupListening, SvtListener *pListener)
void StartChangeTracking()
bool SetFormulaCells(const ScAddress &rPos, std::vector< ScFormulaCell * > &rCells)
bool GetTableSelect(SCTAB nTab) const
std::unique_ptr< ScRecursionHelper > xRecursionHelper
OUString getTime(const tools::Time &rTime, bool bSec=true, bool b100Sec=false) const
SC_DLLPUBLIC sfx2::LinkManager * GetLinkManager()
std::unique_ptr< ScChartListenerCollection > pChartListenerCollection
SC_DLLPUBLIC bool DrawGetPrintArea(ScRange &rRange, bool bSetHor, bool bSetVer) const
SC_DLLPUBLIC bool GetName(SCTAB nTab, OUString &rName) const
std::unique_ptr< ScRange > pDelayedFormulaGrouping
std::unique_ptr< ScDetOpList > pDetOpList
SC_DLLPUBLIC void SetFormula(const ScAddress &rPos, const ScTokenArray &rArray)
bool ValidTab(SCTAB nTab)
std::unique_ptr< ScTemporaryChartLock > apTemporaryChartLock
void RemoveLookupCache(ScLookupCache &rCache)
Only ScLookupCache dtor uses RemoveLookupCache(), do not use elsewhere!
SC_DLLPUBLIC DateTime GetDateTime() const
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
BasicManager * GetBasicManager() const
css::uno::Reference< css::script::XLibraryContainer > GetBasicContainer()
std::unique_ptr< ScDBCollection > pDBCollection
SC_DLLPUBLIC bool GetAutoCalc() const
std::unique_ptr< ScExternalRefManager > pExternalRefMgr
ScLookupCache & GetLookupCache(const ScRange &rRange, ScInterpreterContext *pContext)
Creates a ScLookupCache cache for the range if it doesn't already exist.
SfxMedium * GetMedium() const