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");
 
  535                    OUString aString = pSourceDoc->
maTabs[
i]->GetName();
 
  554        OSL_FAIL(
"ResetClip");
 
  569            maTabs[nTab]->SetLayoutRTL( pSourceDoc->
maTabs[nTab]->IsLayoutRTL() );
 
  573        OSL_FAIL(
"ResetClip");
 
  584        maTabs[nTab].reset( 
new ScTable(*
this, nTab, 
"temp", bExtras, bExtras) );
 
  590        return pTable->GetRefCellValue(rPos.
Col(), rPos.
Row());
 
  597        return pTable->GetRefCellValue(rPos.
Col(), rPos.
Row(), rBlockPos);
 
  616        bool bAny = pTable->GetPrintArea( rEndCol, rEndRow, bNotes, 
false);
 
  636                                        SCCOL& rEndCol )
 const 
  640        bool bAny = pTable->GetPrintAreaHor( nStartRow, nEndRow, rEndCol );
 
  658                                        SCROW& rEndRow, 
bool bNotes )
 const 
  662        bool bAny = pTable->GetPrintAreaVer( nStartCol, nEndCol, rEndRow, bNotes );
 
  683        bool bAny = pTable->GetDataStart( rStartCol, rStartRow );
 
  704    bool bHasPrintArea = 
GetPrintArea(nTab, rEndCol, rEndRow, 
false);
 
  721    else if (!bHasPrintArea)
 
  735    if (nOldPos == nNewPos)
 
  743    if (
ValidTab(nOldPos) && nOldPos < nTabCount )
 
  752                nNewPos = nTabCount-1;
 
  759            SCTAB nDz = nNewPos - nOldPos;
 
  778                            aSourceRange, 0,0,nDz ) );
 
  782            maTabs.insert(
maTabs.begin()+nNewPos, std::move(pSaveTab));
 
  783            for (
SCTAB i = 0; 
i < nTabCount; 
i++)
 
  785                    maTabs[
i]->UpdateMoveTab(aCxt, 
i, pProgress);
 
  786            for (
auto& rxTab : 
maTabs)
 
  788                    rxTab->UpdateCompile();
 
  796                mpDrawLayer->ScMovePage( 
static_cast<sal_uInt16
>(nOldPos), 
static_cast<sal_uInt16
>(nNewPos) );
 
  813    OSL_ENSURE(bPrefix, 
"invalid table name");
 
  857                for (TableContainer::iterator it = 
maTabs.begin(); it != 
maTabs.end(); ++it)
 
  858                    if (*it && it != (
maTabs.begin() + nOldPos))
 
  859                        (*it)->UpdateInsertTab(aCxt);
 
  860                if (nNewPos <= nOldPos)
 
  864                for (TableContainer::iterator it = 
maTabs.begin(); it != 
maTabs.end(); ++it)
 
  865                    if (*it && it != 
maTabs.begin()+nOldPos && it != 
maTabs.begin() + nNewPos)
 
  866                        (*it)->UpdateCompile();
 
  869                for (TableContainer::iterator it = 
maTabs.begin(); it != 
maTabs.end(); ++it)
 
  870                    if (*it && it != 
maTabs.begin()+nOldPos && it != 
maTabs.begin()+nNewPos)
 
  871                        (*it)->StartListeners(aSLCxt, 
true);
 
  885        const bool bGlobalNamesToLocal = 
true;
 
  886        const SCTAB nRealOldPos = (nNewPos < nOldPos) ? nOldPos - 1 : nOldPos;
 
  889            pNames->
CopyUsedNames( nOldPos, nRealOldPos, nNewPos, *
this, *
this, bGlobalNamesToLocal);
 
  895                (pOnlyMarked != 
nullptr), 
maTabs[nNewPos].
get(), pOnlyMarked,
 
  896                false , 
true , bGlobalNamesToLocal, 
false  );
 
  899        SCTAB nDz = nNewPos - nOldPos;
 
  904        maTabs[nNewPos]->UpdateReference(aRefCxt);
 
  906        maTabs[nNewPos]->UpdateInsertTabAbs(nNewPos); 
 
  907        maTabs[nOldPos]->UpdateInsertTab(aCxt);
 
  909        maTabs[nOldPos]->UpdateCompile();
 
  910        maTabs[nNewPos]->UpdateCompile( 
true ); 
 
  913        maTabs[nOldPos]->StartListeners(aSLCxt, 
true);
 
  914        maTabs[nNewPos]->StartListeners(aSLCxt, 
true);
 
  921            mpDrawLayer->ScCopyPage( 
static_cast<sal_uInt16
>(nOldPos), 
static_cast<sal_uInt16
>(nNewPos) );
 
  934        maTabs[nNewPos]->SetLoadingRTL(
maTabs[nOldPos]->IsLoadingRTL());
 
  947                                SCTAB nDestPos, 
bool bInsertNew,
 
  975        maTabs[nDestPos]->SetLayoutRTL(rSrcDoc.
maTabs[nSrcPos]->IsLayoutRTL());
 
  976        maTabs[nDestPos]->SetLoadingRTL(rSrcDoc.
maTabs[nSrcPos]->IsLoadingRTL());
 
  990        bool bOldAutoCalcSrc = 
false;
 
 1009                    const bool bGlobalNamesToLocal = 
false;
 
 1012                        pNames->
CopyUsedNames( nSrcPos, nSrcPos, nDestPos, rSrcDoc, *
this, bGlobalNamesToLocal);
 
 1017                        false, 
maTabs[nDestPos].
get(), 
nullptr, 
false, 
true,
 
 1021        maTabs[nDestPos]->SetTabNo(nDestPos);
 
 1022        maTabs[nDestPos]->SetTabBgColor(rSrcDoc.
maTabs[nSrcPos]->GetTabBgColor());
 
 1025        if (
auto aRepeatColRange = rSrcDoc.
maTabs[nSrcPos]->GetRepeatColRange())
 
 1027            aRepeatColRange->aStart.SetTab(nDestPos);
 
 1028            aRepeatColRange->aEnd.SetTab(nDestPos);
 
 1029            maTabs[nDestPos]->SetRepeatColRange(aRepeatColRange);
 
 1032        if (
auto aRepeatRowRange = rSrcDoc.
maTabs[nSrcPos]->GetRepeatRowRange())
 
 1034            aRepeatRowRange->aStart.SetTab(nDestPos);
 
 1035            aRepeatRowRange->aEnd.SetTab(nDestPos);
 
 1036            maTabs[nDestPos]->SetRepeatRowRange(aRepeatRowRange);
 
 1040            maTabs[nDestPos]->SetPrintEntireSheet();
 
 1043            const auto nPrintRangeCount = rSrcDoc.
maTabs[nSrcPos]->GetPrintRangeCount();
 
 1050                maTabs[nDestPos]->AddPrintRange(aSrcPrintRange);
 
 1054        if ( !bResultsOnly )
 
 1060            maTabs[nDestPos]->UpdateReference(aRefCxt);
 
 1063            maTabs[nDestPos]->TestTabRefAbs(nSrcPos);
 
 1065            maTabs[nDestPos]->CompileAll(aFormulaCxt);
 
 1069        if ( !bResultsOnly )
 
 1072            maTabs[nDestPos]->StartListeners(aSLCxt, 
true);
 
 1085        maTabs[nDestPos]->SetPendingRowHeights( rSrcDoc.
maTabs[nSrcPos]->IsPendingRowHeights() );
 
 1096            OUString aLibName(
"Standard");
 
 1097#if HAVE_FEATURE_SCRIPTING 
 1099            if (pBasicManager && !pBasicManager->
GetName().isEmpty())
 
 1105            uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->
GetBasicContainer();
 
 1106            uno::Reference< container::XNameContainer > xLib;
 
 1107            if( xLibContainer.is() )
 
 1109                uno::Any aLibAny = xLibContainer->getByName(aLibName);
 
 1115                OUString sSrcCodeName;
 
 1117                OUString sRTLSource;
 
 1118                if (xLib->hasByName( sSrcCodeName ))
 
 1119                    xLib->getByName( sSrcCodeName ) >>= sRTLSource;
 
 1120                sSource = sRTLSource;
 
 1132        pTable->SetError(nCol, nRow, nError);
 
 1146        pTable->SetFormula(rPos.
Col(), rPos.
Row(), rFormula, eGram);
 
 1152        return pTable->SetFormulaCell(rPos.
Col(), rPos.
Row(), pCell);
 
 1164        return pTable->SetFormulaCells(rPos.
Col(), rPos.
Row(), rCells);
 
 1183    std::unique_ptr<ScFieldEditEngine> pNewEditEngine;
 
 1200    return pNewEditEngine;
 
 1211        rpEditEngine.reset();
 
 1221    auto [findIt, bInserted] = pCacheMap->
aCacheMap.emplace(rRange, 
nullptr);
 
 1224        findIt->second = std::make_unique<ScLookupCache>(
this, rRange, *pCacheMap);
 
 1225        pCache = findIt->second.get();
 
 1232        pCache = (*findIt).second.get();
 
 1250        return *findIt->second;
 
 1265        findIt->second = std::make_unique<ScSortedRangeCache>(
this, rRange, param, pContext, 
invalid);
 
 1268    return *findIt->second;
 
 1278    auto it(cacheMap.aCacheMap.find(rCache.
getRange()));
 
 1279    if (it != cacheMap.aCacheMap.end())
 
 1281        std::unique_ptr<ScLookupCache> xCache = std::move(it->second);
 
 1282        cacheMap.aCacheMap.erase(it);
 
 1287    OSL_FAIL( 
"ScDocument::RemoveLookupCache: range not found in hash map");
 
 1299        std::unique_ptr<ScSortedRangeCache> xCache = std::move(it->second);
 
 1305    OSL_FAIL( 
"ScDocument::RemoveSortedRangeCache: range not found in hash map");
 
 1344                        if (pColCellBorder != 
nullptr)
 
 1346                            aColorChanger.
Update( *pAction );
 
 1348                            *pColCellBorder = aColor;
 
 1356                GetFromRange().aStart.Tab() == cell.
Col() )
 
 1359                    GetFromRange().MakeRange( *
this );
 
 1364                        if (pColCellBorder != 
nullptr)
 
 1366                            aColorChanger.
Update( *pAction );
 
 1368                            *pColCellBorder = aColor;
 
 1413                            pFoundContent = pAction;
 
 1416                            pFoundMove = pAction;
 
 1427                    GetFromRange().MakeRange( *
this );
 
 1440        pFound = pFoundContent;     
 
 1444        pFound = pFoundMove;        
 
 1449    aTrackText  = pFound->
GetUser();
 
 1454    aTrackText += 
":\n";
 
 1456    if(!aComStr.isEmpty())
 
 1458        aTrackText += aComStr;
 
 1459        aTrackText += 
"\n( ";
 
 1462    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()
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)
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
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.