36#include <osl/diagnose.h>
38#include <com/sun/star/text/WritingMode2.hpp>
39#include <com/sun/star/script/vba/XVBACompatibility.hpp>
40#include <com/sun/star/sheet/TablePageBreakData.hpp>
41#include <com/sun/star/lang/NotInitializedException.hpp>
43#include <document.hxx>
55#include <stlsheet.hxx>
71#include <progress.hxx>
91#include <undomanager.hxx>
108using ::editeng::SvxBorderLine;
111namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
112using ::com::sun::star::uno::Sequence;
113using ::com::sun::star::sheet::TablePageBreakData;
118std::pair<SCTAB,SCTAB> getMarkedTableRange(
const std::vector<ScTableUniquePtr>& rTables,
const ScMarkData& rMark)
122 SCTAB nMax =
static_cast<SCTAB>(rTables.size());
123 for (
const auto& rTab : rMark)
131 if (rTab < nTabStart)
136 return std::pair<SCTAB,SCTAB>(nTabStart,nTabEnd);
139void collectUIInformation(std::map<OUString, OUString>&& aParameters,
const OUString& rAction)
142 aDescription.
aID =
"grid_window";
143 aDescription.
aAction = rAction;
145 aDescription.
aParent =
"MainWindow";
146 aDescription.
aKeyWord =
"ScGridWinUIObject";
156 explicit ScDefaultAttr(
const ScPatternAttr* pPatAttr) : pAttr(pPatAttr), nFirst(0),
nCount(0) {}
159struct ScLessDefaultAttr
161 bool operator() (
const ScDefaultAttr& rValue1,
const ScDefaultAttr& rValue2)
const
163 return rValue1.pAttr < rValue2.pAttr;
179 if ( _bNeedsNameCheck )
188 maTabs.push_back(
nullptr);
198 rHashCode = pTable->GetHashCode();
208 rName = pTable->GetName();
226 pTable->SetCodeName(rName);
229 SAL_WARN(
"sc",
"can't set code name " << rName );
237 rName = pTable->GetCodeName();
246 static OUString aCacheName, aCacheUpperName;
249 if (aCacheName != rName)
255 const OUString aUpperName = aCacheUpperName;
260 if (aUpperName ==
maTabs[
i]->GetUpperName())
272 std::vector<OUString> aNames;
273 aNames.reserve(
maTabs.size());
284 aNames.push_back(
aName);
293 return pTable->GetAnonymousDBData();
305 pTable->SetAnonymousDBData(std::move(pDBData));
322 sal_Int32 nLen = rName.getLength();
330 for (sal_Int32
i = 0;
i < nLen; ++
i)
345 if (
i == 0 ||
i == nLen - 1)
367 const OUString& rOldName =
a->GetUpperName();
368 bValid = rOldName != aUpperName;
389 OSL_ENSURE(bPrefix,
"Invalid Table Name");
394 rName = aStrTable + OUString::number(
static_cast<sal_Int32
>(
i));
412 aName = rName +
"_" + OUString::number(
static_cast<sal_Int32
>(
i));
428 OUStringBuffer rName;
432 OSL_ENSURE(bPrefix,
"Invalid Table Name");
442 rName.append(
static_cast<sal_Int32
>(
i));
446 bOk = !
GetTable( rName.toString(), nDummy );
449 aNames.push_back(rName.makeStringAndClear());
460 OUString
aName = rName;
473 maTabs[nTab]->SetName(rName);
481 a->SetStreamValid(
false);
486 SCTAB nPos,
const OUString& rName,
bool bExternalDocument,
bool bUndoDeleteTab )
490 if ( !bExternalDocument )
498 if ( bExternalDocument )
499 maTabs[nTabCount]->SetVisible(
false );
526 a->UpdateInsertTab(aCxt);
576 SCTAB nNewSheets =
static_cast<SCTAB>(rNames.size());
578 bool bValid = bNamesValid ||
ValidTab(nTabCount+nNewSheets);
584 for (
SCTAB i = 0;
i < nNewSheets; ++
i )
586 maTabs.emplace_back(
new ScTable(*
this, nTabCount +
i, rNames.at(
i)) );
613 a->UpdateInsertTab(aCxt);
615 for (
SCTAB i = 0;
i < nNewSheets; ++
i)
704 for (
auto & pTab :
maTabs)
706 pTab->UpdateDeleteTab(aCxt);
714 delete pErasedTab.release();
753 if (nTabCount > nSheets)
759 for (
SCTAB aTab = 0; aTab < nSheets; ++aTab)
801 for (
auto & pTab :
maTabs)
803 pTab->UpdateDeleteTab(aCxt);
843 if ( bExternalDocument )
851 OUString aOldName =
maTabs[
i]->GetName();
861 maTabs[nTab]->SetName(rName);
865 for (
const auto& pTable :
maTabs)
868 pTable->SetStreamValid(
false );
879 collectUIInformation({{
"NewName", rName}},
"Rename_Sheet");
893 return pTable->IsVisible();
900 return pTable->IsStreamValid();
907 pTable->SetStreamValid( bSet, bIgnoreLock );
918 return pTable->IsPendingRowHeights();
925 pTable->SetPendingRowHeights(bSet);
961 OSL_ENSURE(pPage,
"Page ?");
969 pObject->SetContextWritingMode( bRTL ? WritingMode2::RL_TB : WritingMode2::LR_TB );
977 return pTable->IsLayoutRTL();
1001 return maTabs[nTab]->GetCellArea(rEndCol, rEndRow);
1011 return pTable->GetTableArea(rEndCol, rEndRow, bCalcHiddens);
1025 maTabs[nTab]->GetFirstDataPos(nCol1, nRow1);
1026 maTabs[nTab]->GetLastDataPos(nCol2, nRow2);
1028 if (nCol1 > nCol2 || nRow1 > nRow2)
1033 if (rStartCol < nCol1)
1035 if (nCol2 < rEndCol)
1037 if (rStartRow < nRow1)
1039 if (nRow2 < rEndRow)
1042 if (rStartCol > rEndCol || rStartRow > rEndRow)
1051 bool bStickyTopRow,
bool bStickyLeftCol,
ScDataAreaExtras* pDataAreaExtras )
const
1055 return pTable->ShrinkToUsedDataArea(
1056 o_bShrunk, rStartCol, rStartRow, rEndCol, rEndRow, bColumnsOnly, bStickyTopRow,
1057 bStickyLeftCol, pDataAreaExtras);
1066 return pTable->GetLastDataRow(nCol1, nCol2, nLastRow);
1073 SCCOL& rEndCol,
SCROW& rEndRow,
bool bIncludeOld,
bool bOnlyDown )
const
1076 pTable->GetDataArea( rStartCol, rStartRow, rEndCol, rEndRow, bIncludeOld, bOnlyDown );
1082 if (nTab != rRange.
aEnd.
Tab())
1086 return pTable->GetDataAreaSubrange(rRange);
1095 pTable->LimitChartArea( rStartCol, rStartRow, rEndCol, rEndRow);
1101 if (rRangeList.
is())
1105 ScRange aRange( (*rRangeList)[
i] );
1115 pTable->LimitChartArea(nStartCol, nStartRow, nEndCol, nEndRow);
1121 aNew->push_back(aRange);
1126 OSL_FAIL(
"LimitChartIfAll: Ref==0");
1137 for (
SCTAB nTab=0; nTab< aMaxTab; ++nTab)
1144 rTabRangeEnd = nTab;
1154 for (
SCTAB nTab=rTabRangeEnd+1; nTab< aMaxTab; ++nTab)
1157 rTabRangeStart = nTab;
1160 rTabRangeEnd = nTab;
1178 SCSIZE nSize =
static_cast<SCSIZE>(nEndRow - nStartRow + 1);
1183 bTest &=
maTabs[
i]->TestInsertRow( nStartCol, nEndCol, nStartRow, nSize );
1190struct SetDirtyIfPostponedHandler
1195 p->SetDirtyIfPostponed();
1199struct BroadcastRecalcOnRefMoveHandler
1204 p->BroadcastRecalcOnRefMove();
1208struct BroadcastRecalcOnRefMoveGuard
1210 explicit BroadcastRecalcOnRefMoveGuard(
ScDocument* pDoc ) :
1211 aSwitch( *pDoc, false),
1246 bTest &=
maTabs[
i]->TestInsertRow(nStartCol, nEndCol, nStartRow, nSize);
1253 SCTAB nTabRangeStart = nStartTab;
1254 SCTAB nTabRangeEnd = nEndTab;
1256 ScRange aShiftedRange(nStartCol, nStartRow, nTabRangeStart, nEndCol,
MaxRow(), nTabRangeEnd);
1259 std::vector<ScAddress> aGroupPos;
1303 nStartCol, nStartRow, nStartTab, nEndCol,
MaxRow(), nEndTab,
1304 0,
static_cast<SCROW>(nSize), 0 );
1321 a->SetDirtyIfPostponed();
1325 BroadcastRecalcOnRefMoveGuard g(
this);
1326 std::for_each(
maTabs.begin(),
maTabs.end(), BroadcastRecalcOnRefMoveHandler());
1364 SCTAB nTabRangeStart = nStartTab;
1365 SCTAB nTabRangeEnd = nEndTab;
1372 ScAddress( nStartCol, nStartRow, nTabRangeStart ),
1373 ScAddress( nEndCol, nStartRow+nSize-1, nTabRangeEnd ) ) );
1375 ScAddress( nStartCol, nStartRow+nSize, nTabRangeStart ),
1380 ScAddress( nStartCol, nStartRow, nTabRangeStart ),
1387 if (
ValidRow(nStartRow+nSize) || bLastRowIncluded )
1392 if (bLastRowIncluded)
1399 aCxt.
maRange =
ScRange( nStartCol, nStartRow+nSize, nTabRangeStart, nEndCol,
MaxRow(), nTabRangeEnd);
1409 *pUndoOutline =
false;
1413 std::vector<ScAddress> aGroupPos;
1426 if (
ValidRow(nStartRow+nSize) || bLastRowIncluded )
1436 a->SetDirtyIfPostponed();
1440 BroadcastRecalcOnRefMoveGuard g(
this);
1441 std::for_each(
maTabs.begin(),
maTabs.end(), BroadcastRecalcOnRefMoveHandler());
1467 SCSIZE nSize =
static_cast<SCSIZE>(nEndCol - nStartCol + 1);
1472 bTest &=
maTabs[
i]->TestInsertCol( nStartRow, nEndRow, nSize );
1500 bTest &=
maTabs[
i]->TestInsertCol( nStartRow, nEndRow, nSize );
1504 SCTAB nTabRangeStart = nStartTab;
1505 SCTAB nTabRangeEnd = nEndTab;
1510 ScAddress( nStartCol, nStartRow, nTabRangeStart ),
1545 std::for_each(
maTabs.begin(),
maTabs.end(), SetDirtyIfPostponedHandler());
1550 BroadcastRecalcOnRefMoveGuard g(
this);
1551 std::for_each(
maTabs.begin(),
maTabs.end(), BroadcastRecalcOnRefMoveHandler());
1572 bool* pUndoOutline,
const ScMarkData* pTabMark )
1588 SCTAB nTabRangeStart = nStartTab;
1589 SCTAB nTabRangeEnd = nEndTab;
1593 if (
ValidCol(sal::static_int_cast<SCCOL>(nStartCol+nSize)) )
1596 ScAddress( nStartCol, nStartRow, nTabRangeStart ),
1597 ScAddress( sal::static_int_cast<SCCOL>(nStartCol+nSize-1), nEndRow, nTabRangeEnd ) ) );
1599 ScAddress( sal::static_int_cast<SCCOL>(nStartCol+nSize), nStartRow, nTabRangeStart ),
1604 ScAddress( nStartCol, nStartRow, nTabRangeStart ),
1611 if (
ValidCol(sal::static_int_cast<SCCOL>(nStartCol+nSize)) || bLastColIncluded )
1616 if (bLastColIncluded)
1623 aCxt.
maRange =
ScRange( sal::static_int_cast<SCCOL>(nStartCol+nSize), nStartRow, nTabRangeStart,
1624 MaxCol(), nEndRow, nTabRangeEnd);
1634 *pUndoOutline =
false;
1642 if (
ValidCol(sal::static_int_cast<SCCOL>(nStartCol+nSize)) || bLastColIncluded )
1652 a->SetDirtyIfPostponed();
1656 BroadcastRecalcOnRefMoveGuard g(
this);
1657 std::for_each(
maTabs.begin(),
maTabs.end(), BroadcastRecalcOnRefMoveHandler());
1676 ScRange& rColRange,
bool& rInsCol,
bool& rDelCol,
1677 ScRange& rRowRange,
bool& rInsRow,
bool& rDelRow )
1679 OSL_ENSURE( rOld.
aStart == rNew.
aStart,
"FitBlock: Beginning is different" );
1681 rInsCol = rDelCol = rInsRow = rDelRow =
false;
1692 bool bGrowY = ( nNewEndY > nOldEndY );
1693 SCROW nColEndY = bGrowY ? nOldEndY : nNewEndY;
1694 SCCOL nRowEndX = bGrowY ? nNewEndX : nOldEndX;
1698 if ( nNewEndX > nOldEndX )
1700 rColRange =
ScRange( nOldEndX+1, nStartY, nTab, nNewEndX, nColEndY, nTab );
1703 else if ( nNewEndX < nOldEndX )
1705 rColRange =
ScRange( nNewEndX+1, nStartY, nTab, nOldEndX, nColEndY, nTab );
1711 if ( nNewEndY > nOldEndY )
1713 rRowRange =
ScRange( nStartX, nOldEndY+1, nTab, nRowEndX, nNewEndY, nTab );
1716 else if ( nNewEndY < nOldEndY )
1718 rRowRange =
ScRange( nStartX, nNewEndY+1, nTab, nRowEndX, nOldEndY, nTab );
1733 if (
HasAttrib( nStartX, nStartY, nTab, nEndX, nEndY, nTab,
1736 ExtendMerge( nStartX, nStartY, nEndX, nEndY, nTab );
1749 return pTable->ResolveStaticReference(rPos.
Col(), rPos.
Row());
1759 return maTabs[nTab]->ResolveStaticReference(
1767 return pTable->FetchVectorRefArray(rPos.
Col(), rPos.
Row(), rPos.
Row()+
nLength-1);
1777 return pTable->AssertNoInterpretNeeded(rPos.
Col(), rPos.
Row(), rPos.
Row()+
nLength-1);
1792 return pTable->HandleRefArrayForParallelism(rPos.
Col(), rPos.
Row(), rPos.
Row()+
nLength-1, mxGroup);
1802 bool bInsCol,bDelCol,bInsRow,bDelRow;
1811 if ( bInsCol || bDelCol )
1817 if ( bInsRow || bDelRow )
1832 bool bInsCol,bDelCol,bInsRow,bDelRow;
1848 if ( bInsCol || bInsRow )
1868 std::vector<ScAddress> aGroupPos;
1876 ScRange aRange(nCol1, nRow1, 0, nCol2, nRow2, 0);
1893 maTabs[
i]->
DeleteArea(nCol1, nRow1, nCol2, nRow2, nDelFlag, bBroadcast, pBroadcastSpans);
1905 if (aGroupPos.empty())
1908 ScRange aRange(nCol1, nRow1, 0, nCol2, nRow2, 0);
1930 pTable->DeleteArea(nCol1, nRow1, nCol2, nRow2, nDelFlag);
1944 bool bColInfo,
bool bRowInfo )
1957 maTabs[nTab] = std::move(pTable);
1959 maTabs.push_back(std::move(pTable));
1966 maTabs.push_back(
nullptr);
1971 OSL_FAIL(
"InitUndo");
1976 bool bColInfo,
bool bRowInfo )
1980 OSL_FAIL(
"InitUndo");
1993 maTabs.resize(nTab2 + 1);
1994 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
1996 maTabs[nTab].reset(
new ScTable(*
this, nTab, OUString(), bColInfo, bRowInfo));
2004 OSL_FAIL(
"AddUndoTab");
2013 for (
SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
2016 maTabs[nTab].reset(
new ScTable(*
this, nTab, OUString(), bColInfo, bRowInfo) );
2026 OSL_FAIL(
"SetCutMode without bIsClip");
2036 OSL_FAIL(
"IsCutMode without bIsClip");
2044 const ScMarkData* pMarks,
bool bColRowFlags )
2048 ScRange aThisRange(nCol1, nRow1, nTab1, nCol2, nRow2, nTab2);
2049 CopyToDocument(aThisRange, nFlags, bOnlyMarked, rDestDoc, pMarks, bColRowFlags);
2070 for (
SCTAB i = nTab1;
i <= nTab2;
i++)
2073 maTabs[
i]->UndoToTable(aCxt, nCol1, nRow1, nCol2, nRow2, nFlags,
2074 bOnlyMarked, rDestDoc.
maTabs[
i].get());
2103 if (!pTab || !pDestTab)
2108 nFlags, bOnlyMarked, pDestTab, pMarks,
false, bColRowFlags,
2130 for (
SCTAB i = nTab1;
i <= nTab2 &&
i < nMinSizeBothTabs;
i++)
2135 nFlags, bOnlyMarked, rDestDoc.
maTabs[
i].get());
2144 bool bKeepScenarioFlags,
bool bIncludeObjects )
2146 OSL_ENSURE( pMarks,
"CopyToClip: ScMarkData fails" );
2153 SAL_WARN(
"sc",
"CopyToClip: no ClipDoc");
2170 for (
const auto& rxTab :
maTabs)
2174 OUString aTabName = rxTab->GetName();
2191 for (
SCTAB i = 0;
i < nEndTab; ++
i)
2219 if (!pSrcTab || !pDestTab)
2250 SAL_WARN(
"sc",
"CopyTabToClip: no ClipDoc");
2267 for (
const auto& rxTab :
maTabs)
2271 OUString aTabName = rxTab->GetName();
2290 maTabs[nTab]->CopyToClip(aCxt, nCol1, nRow1, nCol2, nRow2, pClipDoc->
maTabs[nTab].get());
2296 bool bIncludeFiltered)
2299 "TransposeClip with wrong Document" );
2313 sal_uInt16
nIndex = rEntry.second->GetIndex();
2324 SAL_WARN(
"sc",
"TransposeClip: Too big");
2334 const bool bIsMultiRangeRowFilteredTranspose
2341 if (bIsMultiRangeRowFilteredTranspose)
2348 SCROW nRowCount = 0;
2349 for (
size_t j = 0,
n = aClipRanges.
size(); j <
n; ++j)
2351 aClipRange = aClipRanges[j];
2353 SCROW nRowOffset = 0;
2354 if (bIsMultiRangeRowFilteredTranspose)
2357 nRowOffset = nRowCount;
2362 assert(!bIncludeFiltered &&
"bIsMultiRangeRowFilteredTranspose can only be true if bIncludeFiltered is false");
2363 nRowCount += nRowCountNonFiltered;
2370 OSL_ENSURE(pTransClip->
maTabs[
i],
"TransposeClip: Table not there");
2374 pTransClip->
maTabs[
i].get(), nFlags, bAsLink, bIncludeFiltered);
2399 bIsMultiRangeRowFilteredTranspose);
2411 pClipRangeName->
clear();
2412 for (
const auto& rEntry : *pRangeName)
2414 sal_uInt16
nIndex = rEntry.second->GetIndex();
2415 bool bInUse = (rUsedNames.count(nIndex) > 0);
2420 if (pClipRangeName->
insert(pData))
2421 pData->SetIndex(nIndex);
2434 for (
SCTAB i = 0;
i < nMinSizeBothTabs; ++
i)
2437 maTabs[
i]->FindRangeNamesInUse(
2455 mrDoc.pFormatExchangeList =
nullptr;
2491#if DUMP_COLUMN_STORAGE
2514 return maTabs[nTab].get();
2522 return maTabs[nTab].get();
2528 return pTable->GetWritableColumnsRange(nColBegin, nColEnd);
2530 SAL_WARN(
"sc",
"GetWritableColumnsRange() called for non-existent table");
2537 return pTable->GetAllocatedColumnsRange(nColBegin, nColEnd);
2544 return pTable->GetColumnsRange(nColBegin, nColEnd);
2552 if (pOtherFormatter && pOtherFormatter != pThisFormatter)
2556 if (!pExchangeList->empty())
2592 pTable->StartListeningFormulaCells(rStartCxt, rEndCxt, nCol1, nRow1, nCol2, nRow2);
2602 auto pSet = std::make_shared<sc::ColumnBlockPositionSet>(*
this);
2607 for (
SCTAB nTab : rMark)
2618 for (
const auto& rTab : rMark)
2623 maTabs[rTab]->SetDirtyFromClip(nCol1, nRow1, nCol2, nRow2, rBroadcastSpans);
2631 return pTable->InitColumnBlockPosition(rBlockPos, nCol);
2646 while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) %
static_cast<SCTAB>(rClipTabs.size());
2649 rCxt, nCol1, nRow1, nCol2, nRow2, nDx, nDy, rClipTabs[nClipTab].
get());
2657 OSL_ENSURE(
mpDrawLayer,
"CopyBlockFromClip: No drawing layer" );
2663 ScRange aSourceRange(nCol1 - nDx, nRow1 - nDy, nClipTab, nCol2 - nDx, nRow2 - nDy, nClipTab);
2664 ScRange aDestRange(nCol1, nRow1,
i, nCol2, nRow2,
i);
2670 nClipTab = (nClipTab+1) %
static_cast<SCTAB>(rClipTabs.size());
2681 while (!rClipTabs[nClipTab]) nClipTab = (nClipTab+1) %
static_cast<SCTAB>(rClipTabs.size());
2682 SCTAB nDz =
i - nClipTab;
2687 while (
i + nFollow < nTabEnd
2689 && nClipTab + nFollow <
MAXTAB
2690 && rClipTabs[(nClipTab + nFollow + 1) %
static_cast<SCTAB>(rClipTabs.size())] )
2717 auto pColSet = std::make_shared<sc::ColumnSet>( aRefCxt.
maRegroupCols);
2730 nClipTab = (nClipTab+nFollow+1) %
static_cast<SCTAB>(rClipTabs.size());
2731 i = sal::static_int_cast<SCTAB>(
i + nFollow );
2746 while ( nFlagTab <
static_cast<SCTAB>(rClipTabs.size()) && !rClipTabs[nFlagTab] )
2749 SCROW nSourceRow = rClipStartRow;
2750 SCROW nSourceEnd = nClipEndRow;
2751 SCROW nDestRow = nRow1;
2752 SCROW nFilteredRows = 0;
2754 while ( nSourceRow <= nSourceEnd && nDestRow <= nRow2 )
2757 SCROW nSourceRowOriginal = nSourceRow;
2759 nFilteredRows += nSourceRow - nSourceRowOriginal;
2761 if ( nSourceRow <= nSourceEnd )
2764 SCROW nLastRow = nSourceRow;
2766 SCROW nFollow = nLastRow - nSourceRow;
2768 if (nFollow > nSourceEnd - nSourceRow)
2769 nFollow = nSourceEnd - nSourceRow;
2770 if (nFollow > nRow2 - nDestRow)
2771 nFollow = nRow2 - nDestRow;
2773 SCROW nNewDy = nDestRow - nSourceRow;
2775 rCxt, nCol1, nDestRow, nCol2, nDestRow + nFollow, rMark, nDx, nNewDy);
2777 nSourceRow += nFollow + 1;
2778 nDestRow += nFollow + 1;
2781 rClipStartRow = nSourceRow;
2782 return nFilteredRows;
2793 explicit BroadcastAction(
ScDocument& rDoc ) : mrDoc(rDoc), mpCol(nullptr) {}
2795 virtual void startColumn(
ScColumn* pCol )
override
2800 virtual void execute(
SCROW nRow1,
SCROW nRow2,
bool bVal )
override
2807 aRange.aEnd.SetRow(nRow2);
2817 bool bAsLink,
bool bIncludeFiltered,
bool bSkipEmptyCells,
2825 OSL_FAIL(
"CopyFromClip: no ClipDoc");
2845 if (pClipDoc->
maTabs[nTab])
2851 nThisEndX, nThisEndY, nTab );
2853 nThisEndX = sal::static_int_cast<SCCOL>( nThisEndX - aClipRange.
aEnd.
Col() );
2854 nThisEndY = sal::static_int_cast<SCROW>( nThisEndY - aClipRange.
aEnd.
Row() );
2855 if ( nThisEndX > nXw )
2857 if ( nThisEndY > nYw )
2863 pClipDoc->
GetClipArea( nDestAddX, nDestAddY, bIncludeFiltered );
2864 nXw = sal::static_int_cast<SCCOL>( nXw + nDestAddX );
2865 nYw = sal::static_int_cast<SCROW>( nYw + nDestAddY );
2885 std::pair<SCTAB,SCTAB> aTabRanges = getMarkedTableRange(
maTabs, rMark);
2886 aCxt.
setTabRange(aTabRanges.first, aTabRanges.second);
2893 pDestRanges = &aLocalRangeList;
2903 for (
size_t nRange = 0; nRange < pDestRanges->
size(); ++nRange )
2905 const ScRange & rRange = (*pDestRanges)[nRange];
2919 SCCOL nC2 = nC1 + nXw;
2922 SCROW nR2 = nR1 + nYw;
2928 std::vector< SCTAB > vTables;
2930 if (bPreallocatePattern)
2934 vTables.push_back(
i );
2944 SCROW nSaveClipStartRow = nClipStartRow;
2947 nClipStartRow = nSaveClipStartRow;
2948 SCCOL nDx = nC1 - nClipStartCol;
2949 SCROW nDy = nR1 - nClipStartRow;
2950 if ( bIncludeFiltered )
2953 aCxt, nC1, nR1, nC2, nR2, rMark, nDx, nDy);
2954 nClipStartRow += nR2 - nR1 + 1;
2962 nC2 = std::min(
static_cast<SCCOL>(nC1 + nXw), nCol2);
2963 }
while (nC1 <= nCol2);
2964 if (nClipStartRow > nClipEndRow)
2965 nClipStartRow = aClipRange.
aStart.
Row();
2972 if (bPreallocatePattern && (nR2+1) <= nRow2)
2974 SCROW nR3 = nR2 + 1;
2975 for (
SCTAB nTab : vTables)
2977 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
2988 SCSIZE nNeeded = nChunk * (nRow2 - nR3 + 1) / (nYw + 1);
2990 if (nNeeded > nRemain)
2998 bPreallocatePattern =
false;
3002 nR2 = std::min(
static_cast<SCROW>(nR1 + nYw), nRow2);
3003 }
while (nR1 <= nRow2);
3010 for (
SCTAB nTab : rMark)
3022 SetDirtyFromClip(nAllCol1, nAllRow1, nAllCol2, nAllRow2, rMark, nInsFlag, aBroadcastSpans);
3024 BroadcastAction aAction(*
this);
3034 bool bResetCut,
bool bAsLink,
bool bIncludeFiltered,
3035 bool bSkipAttrForEmpty)
3059 if (!bSkipAttrForEmpty)
3069 std::pair<SCTAB,SCTAB> aTabRanges = getMarkedTableRange(
maTabs, rMark);
3070 aCxt.
setTabRange(aTabRanges.first, aTabRanges.second);
3080 SCROW nEndRow = nRow1 + nRowCount - 1;
3081 SCROW nFilteredRows = 0;
3083 if (bIncludeFiltered)
3092 nClipStartRow, nClipEndRow);
3093 nRowCount -= nFilteredRows;
3122 rMark, nInsFlag, aBroadcastSpans);
3124 BroadcastAction aAction(*
this);
3143 OSL_FAIL(
"SetClipArea: No Clip");
3151 OSL_FAIL(
"GetClipArea: No Clip");
3156 if (rClipRanges.
empty())
3165 for (
size_t i = 1,
n = rClipRanges.
size();
i <
n; ++
i )
3167 ScRange const & rRange2 = rClipRanges[
i ];
3172 if (rRange2.
aEnd.
Col() > nEndCol)
3174 if (rRange2.
aEnd.
Row() > nEndRow)
3178 nClipX = nEndCol - nStartCol;
3180 if ( bIncludeFiltered )
3181 nClipY = nEndRow - nStartRow;
3186 SCTAB nCountTab = 0;
3193 nClipY = nResult - 1;
3204 if ( !rClipRanges.
empty() )
3212 OSL_FAIL(
"GetClipStart: No Clip");
3219 SCTAB nCountTab = 0;
3224 if ( rClipRanges.
empty() )
3227 for (
size_t i = 0,
n = rClipRanges.
size();
i <
n; ++
i )
3229 ScRange & rRange = rClipRanges[
i ];
3244 for (
SCTAB i = nTab1;
i <= nTab2 &&
i < nMinSizeBothTabs;
i++)
3248 if (!pTab || !pSrcTab)
3253 nFunction, bSkipEmpty, pSrcTab);
3259 bool bSkipEmpty,
bool bAsLink )
3283 for (
const SCTAB&
i : rMark)
3294 pMixDoc->InitUndo( *
this,
i,
i );
3297 pMixDoc->AddUndoTab(
i,
i );
3301 maTabs[
i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow,
3303 nullptr,
false,
true,
3306 maTabs[
i]->DeleteArea( nStartCol,nStartRow, nEndCol,nEndRow, nDelFlags);
3307 pSourceTable->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow,
3308 nFlags,
false,
maTabs[
i].
get(),
nullptr, bAsLink,
3309 true,
false,
true );
3312 maTabs[
i]->MixData(aMixDocCxt, nStartCol,nStartRow, nEndCol,nEndRow,
3313 nFunction, bSkipEmpty, pMixDoc->maTabs[
i].get() );
3321 OSL_FAIL(
"wrong table");
3327 bool bSkipEmpty,
bool bAsLink )
3350 for (
const SCTAB&
i : rMark)
3361 pMixDoc->InitUndo( *
this,
i,
i );
3364 pMixDoc->AddUndoTab(
i,
i );
3367 maTabs[
i]->CopyToTable(aMixCxt, nStartCol,nStartRow, nEndCol,nEndRow,
3373 maTabs[
i]->DeleteSelection( nDelFlags, rMark );
3374 pSourceTable->CopyToTable(aCxt, nStartCol,nStartRow, nEndCol,nEndRow,
3375 nFlags,
true,
maTabs[
i].
get(), &rMark, bAsLink,
3376 true,
false,
true );
3379 maTabs[
i]->MixMarked(aMixDocCxt, rMark, nFunction, bSkipEmpty, pMixDoc->maTabs[
i].get());
3387 OSL_FAIL(
"wrong table");
3399 if (pCurCellFormula && pCurCellFormula->
IsShared())
3413 return pTab->
SetString(nCol, nRow, nTab, rString, pParam);
3425 return pTable->SetEditText(rPos.
Col(), rPos.
Row(), std::move(pEditText));
3432 pTable->SetEditText(rPos.
Col(), rPos.
Row(), rEditText, pEditPool);
3466 pTable->SetString(rPos.
Col(), rPos.
Row(), rPos.
Tab(), rStr, &aParam);
3474 pTable->SetEmptyCell(rPos.
Col(), rPos.
Row());
3489 if (pCurCellFormula && pCurCellFormula->
IsShared())
3508 return pTable->GetString(nCol, nRow, pContext);
3515 return pTable->GetString(rPos.
Col(), rPos.
Row(), pContext);
3522 return pTable->GetValueCell(rPos.
Col(), rPos.
Row());
3529 return pTable->GetSharedString(rPos.
Col(), rPos.
Row());
3552 return pTable->GetInputString(nCol, nRow, bForceSystemLocale);
3567 return FormulaError::NONE;
3587 SvNumFormatType::NUMBER,
3599 SvNumFormatType::NUMBER,
3616 return pTable->GetEditText(rPos.
Col(), rPos.
Row());
3623 return pTable->RemoveEditTextCharAttribs(rPos.
Col(), rPos.
Row(), rAttr);
3630 return pTable->GetValue(rPos.
Col(), rPos.
Row());
3643 return pTable->GetNumberFormat(nCol, nRow);
3656 sal_uInt32 nFormat = 0;
3657 bool bFirstItem =
true;
3659 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
3661 sal_uInt32 nThisFormat =
maTabs[nTab]->GetNumberFormat(nCol, nRow1, nRow2);
3664 nFormat = nThisFormat;
3667 else if (nThisFormat != nFormat)
3678 return pTable->GetNumberFormat( rContext, rPos );
3687 pTable->SetNumberFormat(rPos.
Col(), rPos.
Row(), nNumberFormat);
3696 nIndex =
maTabs[nTab]->GetNumberFormat( rContext, rPos );
3701 nType = SvNumFormatType::UNDEFINED;
3709 return pTable->GetFormula(nCol, nRow);
3717 return pTable->GetFormulaCell(rPos.
Col(), rPos.
Row());
3724 return pTable->GetFormulaCell(rPos.
Col(), rPos.
Row());
3732 return pTable->GetCellType(rPos);
3739 return pTable->GetCellType( nCol, nRow );
3746 return pTable->HasStringData(nCol, nRow);
3753 return pTable->HasValueData( nCol, nRow );
3813 a->CheckVectorizationState();
3828 a->SetAllFormulasDirty(rCxt);
3856 if (bIncludeEmptyCells)
3879 for (
size_t nPos=0, nRangeCount = rRanges.
size();
nPos < nRangeCount;
nPos++)
3899 bool allInterpreted =
true;
3900 for (
size_t nPos=0, nRangeCount = rRanges.
size();
nPos < nRangeCount;
nPos++)
3912 allInterpreted =
false;
3916 return allInterpreted;
3925 if (
p->bCollectNotifications )
3929 p->aNotifiedFormulaCells.push_back( pCell );
3933 p->aNotifiedFormulaCells.push_back( pCell );
3934 p->aNotifiedFormulaPos.push_back( pCell->
aPos );
3969 a->CompileAll(aCxt);
3996 pTab->CompileXML(aCxt, aProgress);
4018 bool bCompiled =
false;
4020 for (
const auto& pTab :
maTabs)
4037 for (
const auto& pTable :
maTabs)
4040 pTable->CalcAfterLoad(aCxt, bStartListening);
4042 for (
const auto& pTable :
maTabs)
4045 pTable->SetDirtyAfterLoad();
4058 for (
auto const& it : rListeners)
4070 return pTable->GetErrCode( rPos );
4071 return FormulaError::NONE;
4079 for (
SCTAB nTab = nTab1; nTab1 <= nTab2 && nTab <
nTabSize; ++nTab)
4081 maTabs[nTab]->ResetChanged(rRange);
4089 pTable->SetColWidth(nCol, nNewWidth);
4095 pTable->SetColWidthOnly(nCol, nNewWidth);
4101 pTable->SetRowHeight(nRow, nNewHeight);
4107 pTable->SetRowHeightRange(nStartRow, nEndRow, nNewHeight, 1.0,
true);
4113 pTable->SetRowHeightOnly( nStartRow, nEndRow, nNewHeight );
4119 pTable->SetManualHeight( nStartRow, nEndRow, bManual );
4125 return pTable->GetColWidth( nCol, bHiddenAsZero );
4126 OSL_FAIL(
"wrong table number");
4133 return pTable->GetColWidth(nStartCol, nEndCol);
4140 return pTable->GetOriginalWidth( nCol );
4141 OSL_FAIL(
"wrong table number");
4148 return pTable->GetCommonWidth( nEndCol );
4149 OSL_FAIL(
"Wrong table number");
4156 return pTable->GetOriginalHeight( nRow );
4157 OSL_FAIL(
"Wrong table number");
4164 return pTable->GetRowHeight( nRow,
nullptr,
nullptr, bHiddenAsZero );
4165 OSL_FAIL(
"Wrong sheet number");
4172 return pTable->GetRowHeight( nRow, pStartRow, pEndRow, bHiddenAsZero );
4173 OSL_FAIL(
"Wrong sheet number");
4179 if (nStartRow == nEndRow)
4183 if (nStartRow > nEndRow)
4187 return pTable->GetRowHeight( nStartRow, nEndRow, bHiddenAsZero );
4189 OSL_FAIL(
"wrong sheet number");
4195 return maTabs[nTab]->GetRowForHeight(nHeight);
4199 SCTAB nTab,
double fScale )
const
4202 if (nStartRow == nEndRow)
4206 if (nStartRow > nEndRow)
4210 return pTable->GetScaledRowHeight( nStartRow, nEndRow, fScale);
4212 OSL_FAIL(
"wrong sheet number");
4219 return pTable->GetHiddenRowCount( nRow );
4220 OSL_FAIL(
"wrong table number");
4227 return pTable->GetColOffset( nCol, bHiddenAsZero );
4228 OSL_FAIL(
"wrong table number");
4235 return pTable->GetRowOffset( nRow, bHiddenAsZero );
4236 OSL_FAIL(
"wrong table number");
4247 return pTable->GetOptimalColWidth(nCol, pDev,
nPPTX,
nPPTY, rZoomX,
4248 rZoomY, bFormula, pMarkData, pParam);
4249 OSL_FAIL(
"wrong table number");
4257 bool bWidth,
bool bTotalSize,
bool bInPrintTwips )
4260 return pTable->GetNeededSize(nCol, nRow, pDev,
nPPTX,
nPPTY,
4261 rZoomX, rZoomY, bWidth, bTotalSize,
4263 OSL_FAIL(
"wrong table number");
4270 return pTable->SetOptimalHeight(rCxt, nStartRow, nEndRow, bApi);
4278 sal_uInt64 nCellCount = 0;
4281 nCellCount +=
maTabs[nTab]->GetWeightedCount();
4285 sal_uInt64 nProgressStart = 0;
4289 maTabs[nTab]->SetOptimalHeightOnly(rCxt, 0,
MaxRow(), &aProgress, nProgressStart);
4290 maTabs[nTab]->SetDrawPageSize();
4291 nProgressStart +=
maTabs[nTab]->GetWeightedCount();
4300 pTable->ShowCol(nCol, bShow);
4306 pTable->ShowRow(nRow, bShow);
4312 pTable->ShowRows( nRow1, nRow2, bShow );
4318 pTable->SetRowFlags( nRow, nNewFlags );
4324 pTable->SetRowFlags( nStartRow, nEndRow, nNewFlags );
4330 return pTable->GetColFlags( nCol );
4331 OSL_FAIL(
"wrong table number");
4338 return pTable->GetRowFlags( nRow );
4339 OSL_FAIL(
"wrong table number");
4346 pTable->GetAllRowBreaks(rBreaks, bPage, bManual);
4352 pTable->GetAllColBreaks(rBreaks, bPage, bManual);
4360 if (pTable->HasRowPageBreak(nRow))
4363 if (pTable->HasRowManualBreak(nRow))
4375 if (pTable->HasColPageBreak(nCol))
4378 if (pTable->HasColManualBreak(nCol))
4387 pTable->SetRowBreak(nRow, bPage, bManual);
4393 pTable->SetColBreak(nCol, bPage, bManual);
4399 pTable->RemoveRowBreak(nRow, bPage, bManual);
4405 pTable->RemoveColBreak(nCol, bPage, bManual);
4411 return pTable->GetRowBreakData();
4413 return Sequence<TablePageBreakData>();
4419 return pTable->RowHidden(nRow, pFirstRow, pLastRow);
4426 return pTable->HasHiddenRows(nStartRow, nEndRow);
4433 return pTable->ColHidden(nCol, pFirstCol, pLastCol);
4445 pTable->SetRowHidden(nStartRow, nEndRow, bHidden);
4451 pTable->SetColHidden(nStartCol, nEndCol, bHidden);
4457 return pTable->FirstVisibleRow(nStartRow, nEndRow);
4464 return pTable->LastVisibleRow(nStartRow, nEndRow);
4465 return ::std::numeric_limits<SCROW>::max();
4471 return pTable->CountVisibleRows(nStartRow, nEndRow);
4478 return pTable->RowFiltered(nRow, pFirstRow, pLastRow);
4485 return pTable->HasFilteredRows(nStartRow, nEndRow);
4492 return pTable->ColFiltered(nCol);
4499 pTable->SetRowFiltered(nStartRow, nEndRow, bFiltered);
4505 return pTable->FirstNonFilteredRow(nStartRow, nEndRow);
4506 return std::numeric_limits<SCROW>::max();
4512 return pTable->LastNonFilteredRow(nStartRow, nEndRow);
4513 return std::numeric_limits<SCROW>::max();
4519 return pTable->CountNonFilteredRows(nStartRow, nEndRow);
4526 return pTable->IsManualRowHeight(nRow);
4532 for (
const auto& pTable :
maTabs)
4535 pTable->SyncColRowFlags();
4542 return pTable->GetLastFlaggedRow();
4549 return pTable->GetLastChangedColFlagsWidth();
4556 return pTable->GetLastChangedRowFlagsWidth();
4564 CRFlags nStartFlags = pTable->GetColFlags(nStart);
4565 sal_uInt16 nStartWidth = pTable->GetOriginalWidth(nStart);
4566 for (
SCCOL nCol : pTable->GetColumnsRange( nStart + 1,
MaxCol()))
4569 (nStartWidth != pTable->GetOriginalWidth(nCol)) ||
4587 if (!pRowFlagsArray)
4595 SCROW nHiddenEndRow;
4596 SCROW nHeightEndRow;
4601 bool bStartHidden = bHidden = pTable->
RowHidden( nStart,
nullptr, &nHiddenEndRow);
4602 sal_uInt16 nStartHeight = nHeight = pTable->
GetRowHeight( nStart,
nullptr, &nHeightEndRow,
false);
4604 while ((nRow = std::min( nHiddenEndRow, std::min( nFlagsEndRow, nHeightEndRow)) + 1) <=
MaxRow())
4606 if (nFlagsEndRow < nRow)
4608 if (nHiddenEndRow < nRow)
4609 bHidden = pTable->
RowHidden( nRow,
nullptr, &nHiddenEndRow);
4610 if (nHeightEndRow < nRow)
4611 nHeight = pTable->
GetRowHeight( nRow,
nullptr, &nHeightEndRow,
false);
4615 (bStartHidden != bHidden) ||
4616 (nStartHeight != nHeight))
4631 if (nEndRow >= nLastRow)
4635 ScDefaultAttrSet::iterator aItr = aSet.end();
4638 ScDefaultAttr aAttr(pAttr);
4639 aItr = aSet.find(aAttr);
4640 if (aItr == aSet.end())
4642 aAttr.nCount =
static_cast<SCSIZE>(nEndRow - nStartRow + 1);
4643 aAttr.nFirst = nStartRow;
4648 aAttr.nCount = aItr->nCount +
static_cast<SCSIZE>(nEndRow - nStartRow + 1);
4649 aAttr.nFirst = aItr->nFirst;
4653 pAttr = aDocAttrItr.
GetNext(nColumn, nStartRow, nEndRow);
4655 ScDefaultAttrSet::iterator aDefaultItr = aSet.begin();
4658 while (aItr != aSet.end())
4662 if ( aItr->nCount > aDefaultItr->nCount ||
4663 ( aItr->nCount == aDefaultItr->nCount && aItr->nFirst < aDefaultItr->nFirst ) )
4667 nDefault = aDefaultItr->nFirst;
4673 pTable->StripHidden( rX1, rY1, rX2, rY2 );
4679 pTable->ExtendHidden( rX1, rY1, rX2, rY2 );
4688 const SfxPoolItem* pTemp = pTable->GetAttr( nCol, nRow, nWhich );
4693 OSL_FAIL(
"Attribute Null" );
4696 return &
mxPoolHelper->GetDocPool()->GetDefaultItem( nWhich );
4703 const SfxPoolItem* pTemp = pTable->GetAttr( nCol, nRow, nWhich, nStartRow, nEndRow );
4708 OSL_FAIL(
"Attribute Null" );
4711 return &
mxPoolHelper->GetDocPool()->GetDefaultItem( nWhich );
4722 return pTable->GetPattern( nCol, nRow );
4729 return pTable->GetPattern(rPos.
Col(), rPos.
Row());
4737 return pTable->GetMostUsedPattern(nCol, nStartRow, nEndRow);
4744 pTable->ApplyAttr( nCol, nRow, rAttr );
4750 pTable->ApplyPattern(nCol, nRow, rAttr);
4758 bool*
const pIsChanged )
4761 for (
const auto& rTab : rMark)
4766 maTabs[rTab]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr, pDataArray, pIsChanged );
4774 pTable->ApplyPatternArea(nStartCol, nStartRow, nEndCol, nEndRow, rAttr);
4781 for (
const auto& rTab : rMark)
4786 maTabs[rTab]->ApplyPatternIfNumberformatIncompatible( rRange, rPattern, nNewType );
4793 pTable->AddCondFormatData(rRange,
nIndex);
4799 pTable->RemoveCondFormatData(rRange,
nIndex);
4805 pTable->ApplyStyle(nCol, nRow, &rStyle);
4814 for (
const auto& rTab : rMark)
4819 maTabs[rTab]->ApplyStyleArea( nStartCol, nStartRow, nEndCol, nEndRow, rStyle );
4827 pTable->ApplyStyleArea( nStartCol, nStartRow, nEndCol, nEndRow, rStyle );
4842 for (
const auto& rTab : rMark)
4847 maTabs[rTab]->ApplySelectionStyle( rStyle, rMark );
4853 const SvxBorderLine* pLine,
bool bColorOnly )
4855 if ( bColorOnly && !pLine )
4859 for (
const auto& rTab : rMark)
4864 maTabs[rTab]->ApplySelectionLineStyle( rMark, pLine, bColorOnly );
4871 return pTable->GetStyle(nCol, nRow);
4886 for (
const auto& rTab : rMark)
4893 pNewStyle =
maTabs[rTab]->GetSelectionStyle( rMark, bFound );
4896 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
4909 pNewStyle =
maTabs[
i]->GetAreaStyle( bFound,
4914 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
4921 return bEqual ? pStyle :
nullptr;
4929 for (
const auto& rTab :
maTabs)
4933 rTab->StyleSheetChanged(pStyleSheet, bRemoved, pDev,
nPPTX,
nPPTY, rZoomX, rZoomY);
4943 SfxStyleFamily::Para );
4945 pStyle = aIter.
Next() )
4947 if (pStyle->isScStyleSheet())
4954 bool bIsUsed =
false;
4956 for (
const auto& pTable :
maTabs)
4958 if (pTable && pTable->IsStyleSheetUsed(rStyle))
4974 return pTable->ApplyFlags(nStartCol, nStartRow, nEndCol, nEndRow, nFlags);
4976 OSL_FAIL(
"ApplyFlags: wrong table");
4984 return pTable->RemoveFlags(nStartCol, nStartRow, nEndCol, nEndRow, nFlags);
4986 OSL_FAIL(
"RemoveFlags: wrong table");
4993 return pTable->SetPattern(nCol, nRow, std::move(pAttr));
5005 pTable->SetPattern(nCol, nRow, rAttr);
5012 pTable->SetPattern(rPos, rAttr);
5022 for (
const auto& rTab : rMark)
5027 maTabs[rTab]->MergeSelectionPattern( aState, rMark, bDeep );
5034 for (
const auto& rTab : rMark)
5039 maTabs[rTab]->MergePatternArea( aState,
5045 OSL_ENSURE( aState.
pItemSet,
"SelectionPattern Null" );
5068 rLineOuter.
SetLine(
nullptr, SvxBoxItemLine::TOP);
5069 rLineOuter.
SetLine(
nullptr, SvxBoxItemLine::BOTTOM);
5070 rLineOuter.
SetLine(
nullptr, SvxBoxItemLine::LEFT);
5071 rLineOuter.
SetLine(
nullptr, SvxBoxItemLine::RIGHT);
5074 rLineInner.
SetLine(
nullptr, SvxBoxInfoItemLine::HORI);
5075 rLineInner.
SetLine(
nullptr, SvxBoxInfoItemLine::VERT);
5086 size_t nRangeCount = aRangeList.
size();
5087 bool bMultipleRows =
false, bMultipleCols =
false;
5088 for(
size_t nRangeIdx = 0; nRangeIdx < nRangeCount; ++nRangeIdx )
5090 const ScRange & rRange = aRangeList[ nRangeIdx ];
5091 bMultipleRows = ( bMultipleRows || ( rRange.
aStart.
Row() != rRange.
aEnd.
Row() ) );
5092 bMultipleCols = ( bMultipleCols || ( rRange.
aStart.
Col() != rRange.
aEnd.
Col() ) );
5094 for (
const auto& rTab : rMark)
5100 maTabs[rTab]->MergeBlockFrame( &rLineOuter, &rLineInner, aFlags,
5114 for (
const auto& rTab : rMark)
5120 maTabs[rTab]->MergeBlockFrame( &rLineOuter, &rLineInner, aFlags,
5143 bool bAnyItem =
false;
5149 if ( nAngle && nAngle != 9000_deg100 && nAngle != 27000_deg100 )
5218 return maTabs[nTab]->HasAttrib( nCol, nRow, nMask, nStartRow, nEndRow );
5233 maTabs[nTab]->FindMaxRotCol(pRowInfo, nArrCount, nX1, nX2);
5236 OSL_FAIL(
"FindMaxRotCol: wrong table");
5240 const SvxBorderLine** ppLeft,
const SvxBorderLine** ppTop,
5241 const SvxBorderLine** ppRight,
const SvxBorderLine** ppBottom )
const
5246 OSL_ENSURE(pThisAttr,
"where is the attribute?");
5248 const SvxBorderLine* pLeftLine = pThisAttr->
GetLeft();
5249 const SvxBorderLine* pTopLine = pThisAttr->
GetTop();
5250 const SvxBorderLine* pRightLine = pThisAttr->
GetRight();
5251 const SvxBorderLine* pBottomLine = pThisAttr->
GetBottom();
5269 pRightLine = pOther;
5275 pBottomLine = pOther;
5279 *ppLeft = pLeftLine;
5283 *ppRight = pRightLine;
5285 *ppBottom = pBottomLine;
5292 return maTabs[nTab]->IsBlockEmpty(nStartCol, nStartRow, nEndCol, nEndRow);
5293 OSL_FAIL(
"wrong table number");
5300 pTable->LockTable();
5303 OSL_FAIL(
"wrong table number");
5310 pTable->UnlockTable();
5313 OSL_FAIL(
"wrong table number");
5319 bool* pOnlyNotBecauseOfMatrix ,
5320 bool bNoMatrixAtAll )
const
5325 if ( pOnlyNotBecauseOfMatrix )
5326 *pOnlyNotBecauseOfMatrix =
false;
5331 return pTable->IsBlockEditable(nStartCol, nStartRow, nEndCol, nEndRow,
5332 pOnlyNotBecauseOfMatrix, bNoMatrixAtAll);
5334 OSL_FAIL(
"wrong table number");
5335 if ( pOnlyNotBecauseOfMatrix )
5336 *pOnlyNotBecauseOfMatrix =
false;
5341 bool* pOnlyNotBecauseOfMatrix )
const
5346 if ( pOnlyNotBecauseOfMatrix )
5347 *pOnlyNotBecauseOfMatrix =
false;
5354 bool bMatrix = ( pOnlyNotBecauseOfMatrix != nullptr );
5356 for (
const auto& rTab : rMark)
5367 aRange.
aEnd.
Row(), pOnlyNotBecauseOfMatrix ) )
5370 if ( pOnlyNotBecauseOfMatrix )
5371 bMatrix = *pOnlyNotBecauseOfMatrix;
5379 if ( pOnlyNotBecauseOfMatrix )
5380 bMatrix = *pOnlyNotBecauseOfMatrix;
5385 if (!bOk && !bMatrix)
5389 if ( pOnlyNotBecauseOfMatrix )
5390 *pOnlyNotBecauseOfMatrix = ( !bOk && bMatrix );
5401 for (
const auto& rTab : rMark)
5406 if (
maTabs[rTab] &&
maTabs[rTab]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow ))
5430 if (aOrigin != rCellPos)
5441 if (nSizeX <= 0 || nSizeY <= 0)
5452 if (nSizeX <= 0 || nSizeY <= 0)
5457 aOrigin.
Row() + nSizeY - 1,
5460 rMatrix.
aStart = aOrigin;
5461 rMatrix.
aEnd = aEnd;
5474 SCCOL nOldCol = rStartCol;
5475 SCROW nOldRow = rStartRow;
5476 for (nCol=nOldCol; nCol<=nEndCol; nCol++)
5482 const ScAttrArray& pAttrArray = pTable->ColumnData(nOldCol).AttrArray();
5484 if ( pAttrArray.
Count() )
5488 SCROW nAttrPos = nOldRow;
5489 while (nAttrPos<=nEndRow)
5491 OSL_ENSURE(
nIndex < pAttrArray.
Count(),
"Wrong index in AttrArray" );
5493 bool bHorOverlapped;
5494 if ( pAttrArray.
Count() )
5498 if ( bHorOverlapped )
5501 SCROW nLoopEndRow = std::min( nEndRow, nEndRowSeg );
5502 for (
SCROW nAttrRow = nAttrPos; nAttrRow <= nLoopEndRow; nAttrRow++)
5504 SCCOL nTempCol = nOldCol;
5508 if (nTempCol < rStartCol)
5509 rStartCol = nTempCol;
5512 if ( pAttrArray.
Count() )
5524 OSL_FAIL(
"ExtendOverlapped: invalid range");
5534 SCCOL nOldEndCol = rEndCol;
5535 SCROW nOldEndRow = rEndRow;
5538 for (
const auto& rTab : rMark)
5545 SCCOL nThisEndCol = nOldEndCol;
5546 SCROW nThisEndRow = nOldEndRow;
5547 ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, rTab, bRefresh );
5548 if ( nThisEndCol > rEndCol )
5549 rEndCol = nThisEndCol;
5550 if ( nThisEndRow > rEndRow )
5551 rEndRow = nThisEndRow;
5558 SCTAB nTab,
bool bRefresh )
5560 bool bFound =
false;
5564 bFound = pTable->ExtendMerge( nStartCol, nStartRow, rEndCol, rEndRow, bRefresh );
5571 OSL_FAIL(
"ExtendMerge: invalid range");
5579 bool bFound =
false;
5591 nExtendCol, nExtendRow,
5595 if (nExtendCol > nEndCol) nEndCol = nExtendCol;
5596 if (nExtendRow > nEndRow) nEndRow = nExtendRow;
5646 if (nExtendCol < nStartCol)
5648 nStartCol = nExtendCol;
5650 if (nExtendRow < nStartRow)
5652 nStartRow = nExtendRow;
5677 for (
const auto& rxDB : rDBs)
5679 if (rxDB->HasAutoFilter())
5681 rxDB->GetArea(nDBTab, nDBStartCol,nDBStartRow, nDBEndCol,nDBEndRow);
5682 if ( nDBTab==nTab && nDBStartRow<=nEndRow && nDBEndRow>=nStartRow &&
5683 nDBStartCol<=nEndCol && nDBEndCol>=nStartCol )
5685 if (
ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
5692 pData = pTable->GetAnonymousDBData();
5697 pData->GetArea( nDBTab, nDBStartCol,nDBStartRow, nDBEndCol,nDBEndRow );
5698 if ( nDBTab==nTab && nDBStartRow<=nEndRow && nDBEndRow>=nStartRow &&
5699 nDBStartCol<=nEndCol && nDBEndCol>=nStartCol )
5701 if (
ApplyFlagsTab( nDBStartCol,nDBStartRow, nDBEndCol,nDBStartRow,
5724 OSL_FAIL(
"Overlapped: Attr==0");
5733 nStartRow ? *nStartRow : dummy, nEndRow ? *nEndRow : dummy );
5738 OSL_FAIL(
"Overlapped: Attr==0");
5749 size_t nRangeCount = aRangeList.
size();
5751 for (
const auto& rTab : rMark)
5758 for (
size_t j=0; j < nRangeCount; j++ )
5760 const ScRange & rRange = aRangeList[ j ];
5761 maTabs[rTab]->ApplyBlockFrame( rLineOuter, pLineInner,
5771 aTmp0.
SetLine(
nullptr, SvxBoxItemLine::TOP );
5772 aTmp0.
SetLine(
nullptr, SvxBoxItemLine::BOTTOM );
5773 aTmp0.
SetLine(
nullptr, SvxBoxItemLine::LEFT );
5774 aTmp0.
SetLine(
nullptr, SvxBoxItemLine::RIGHT );
5782 aTmp1.
SetLine(
nullptr, SvxBoxInfoItemLine::HORI );
5783 aTmp1.
SetLine(
nullptr, SvxBoxInfoItemLine::VERT );
5784 aTmp1.
SetValid( SvxBoxInfoItemValidFlags::ALL,
false );
5785 aTmp1.
SetValid( SvxBoxInfoItemValidFlags::DISTANCE );
5791 if (pLineInner->
IsValid( SvxBoxInfoItemValidFlags::TOP ) && !rLineOuter.
GetTop())
5792 aTopInfo.
SetValid( SvxBoxInfoItemValidFlags::BOTTOM );
5794 if (pLineInner->
IsValid( SvxBoxInfoItemValidFlags::BOTTOM ) && !rLineOuter.
GetBottom())
5795 aBottomInfo.
SetValid( SvxBoxInfoItemValidFlags::TOP );
5797 if (pLineInner->
IsValid( SvxBoxInfoItemValidFlags::LEFT ) && !rLineOuter.
GetLeft())
5798 aLeftInfo.
SetValid( SvxBoxInfoItemValidFlags::RIGHT );
5800 if (pLineInner->
IsValid( SvxBoxInfoItemValidFlags::RIGHT ) && !rLineOuter.
GetRight())
5801 aRightInfo.
SetValid( SvxBoxInfoItemValidFlags::LEFT );
5808 for (
const auto& rTab : rMark)
5815 size_t nEnvelopeRangeCount = rRangeListTopEnvelope.
size();
5816 for (
size_t j=0; j < nEnvelopeRangeCount; j++ )
5818 const ScRange & rRange = rRangeListTopEnvelope[ j ];
5819 maTabs[rTab]->ApplyBlockFrame( aTop, &aTopInfo,
5823 nEnvelopeRangeCount = rRangeListBottomEnvelope.
size();
5824 for (
size_t j=0; j < nEnvelopeRangeCount; j++ )
5826 const ScRange & rRange = rRangeListBottomEnvelope[ j ];
5827 maTabs[rTab]->ApplyBlockFrame( aBottom, &aBottomInfo,
5831 nEnvelopeRangeCount = rRangeListLeftEnvelope.
size();
5832 for (
size_t j=0; j < nEnvelopeRangeCount; j++ )
5834 const ScRange & rRange = rRangeListLeftEnvelope[ j ];
5835 maTabs[rTab]->ApplyBlockFrame( aLeft, &aLeftInfo,
5839 nEnvelopeRangeCount = rRangeListRightEnvelope.
size();
5840 for (
size_t j=0; j < nEnvelopeRangeCount; j++ )
5842 const ScRange & rRange = rRangeListRightEnvelope[ j ];
5843 maTabs[rTab]->ApplyBlockFrame( aRight, &aRightInfo,
5859 maTabs[nTab]->ApplyBlockFrame(rLineOuter, &rLineInner,
5881 aRange.
aEnd.
Col(), aRange.
aEnd.
Row(), rMark, rAttr, pDataArray, pIsChanged );
5887 for (
const auto& rTab : rMark)
5892 maTabs[rTab]->ApplySelectionCache( &aCache, rMark, pDataArray, pIsChanged );
5900 for (
const auto& rTab : rMark)
5905 maTabs[rTab]->ChangeSelectionIndent( bIncrement, rMark );
5912 for (
const auto& rTab : rMark)
5917 maTabs[rTab]->ClearSelectionItems( pWhich, rMark );
5925 std::vector<ScAddress> aGroupPos;
5935 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
5937 const ScRange & rRange = aRangeList[
i];
5944 for (
const auto& rTab : rMark)
5949 maTabs[rTab]->DeleteSelection(nDelFlag, rMark, bBroadcast);
5962 if (aGroupPos.empty())
5967 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
5972 for (
size_t i = 0;
i < aGroupPos.size(); ++
i) {
5986 std::vector<ScAddress> aGroupPos;
5996 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
5998 const ScRange & rRange = aRangeList[
i];
6010 pTable->DeleteSelection(nDelFlag, rMark);
6021 if (!aGroupPos.empty())
6025 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
6027 const ScRange & rRange = aRangeList[
i];
6041 OSL_FAIL(
"wrong table");
6063 return pTable->IsEmptyData(nStartCol, nStartRow, nEndCol, nEndRow);
6074 return pTable->GetEmptyLinesInBlock(nStartCol, nStartRow, nEndCol, nEndRow, eDir);
6081 pTable->FindAreaPos(rCol, rRow, eDirection);
6085 bool bMarked,
bool bUnprotected,
const ScMarkData& rMark,
SCCOL nTabStartCol )
const
6087 OSL_ENSURE( !nMovX || !nMovY,
"GetNextPos: only X or Y" );
6094 pTable->GetNextPos(rCol, rRow, nMovX, nMovY, bMarked, bUnprotected, aCopyMark, nTabStartCol);
6127 sal_uInt64 nCellCount = 0;
6132 nCellCount +=
a->GetCellCount();
6140 sal_uInt64 nFormulaGroupCount = 0;
6145 nFormulaGroupCount++;
6148 return nFormulaGroupCount;
6153 sal_uInt64 nCodeCount = 0;
6158 nCodeCount +=
a->GetCodeCount();
6167 pTable->PageStyleModified( rNewName );
6173 pTable->SetPageStyle( rName );
6179 return pTable->GetPageStyle();
6186 pTable->SetPageSize( rSize );
6192 return pTable->GetPageSize();
6194 OSL_FAIL(
"invalid tab");
6201 pTable->SetRepeatArea( nStartCol, nEndCol, nStartRow, nEndRow );
6207 pTable->InvalidatePageBreaks();
6213 pTable->UpdatePageBreaks( pUserArea );
6219 pTable->RemoveManualBreaks();
6225 return pTable->HasManualBreaks();
6227 OSL_FAIL(
"invalid tab");
6241 bool bResult =
false;
6247 bResult =
a->IsPrintEntireSheet() || (
a->GetPrintRangeCount() > 0);
6264 return pTable->GetPrintRangeCount();
6271 return pTable->GetPrintRange(
nPos);
6279 return pTable->GetRepeatColRange();
6281 return std::nullopt;
6287 return pTable->GetRepeatRowRange();
6288 return std::nullopt;
6294 pTable->ClearPrintRanges();
6300 pTable->AddPrintRange(rNew);
6306 pTable->SetPrintEntireSheet();
6312 pTable->SetRepeatColRange(std::move(oNew));
6318 pTable->SetRepeatRowRange(std::move(oNew));
6327 maTabs[
i]->FillPrintSaver( pNew->GetTabData(
i) );
6347 const OUString & rNew =
maTabs[nTab+1]->GetPageStyle();
6402 while (aRefIter.GetNextRef(aRange))
6415 set<ScFormulaCell*> aNewSet;
6423 aNewSet.insert(pCell);
6424 if (lcl_hasDirtyRange(*
this, pCell, rDirtyRange))
6437 return pTable->GetTextWidth(rPos.
Col(), rPos.
Row());
6445 return pTable->GetScriptType(rPos.
Col(), rPos.
Row());
6446 return SvtScriptType::NONE;
6453 pTable->SetScriptType(rPos.
Col(), rPos.
Row(),
nType);
6484 uno::Reference<script::vba::XVBACompatibility> xVBA(
6487 return xVBA.is() && xVBA->getVBACompatibilityMode();
6489 catch (
const lang::NotInitializedException&) {}
6499 return pTable->GetSparkline(rPosition.
Col(), rPosition.
Row());
6500 return std::shared_ptr<sc::Sparkline>();
6512 return pTable->CreateSparkline(rPosition.
Col(), rPosition.
Row(), pSparklineGroup);
6520 return pTable->DeleteSparkline(rPosition.
Col(), rPosition.
Row());
6527 return &pTable->GetSparklineList();
6533 std::shared_ptr<sc::SparklineGroup> pSparklineGroup;
6539 std::shared_ptr<sc::SparklineGroup> pFoundGroup;
6551 else if (!pFoundGroup)
6553 pFoundGroup = pSparkline->getSparklineGroup();
6555 else if (pFoundGroup != pSparkline->getSparklineGroup())
6562 rGroup = pFoundGroup;
6568 for (
auto const& rTable :
maTabs)
6573 auto& rSparklineList = rTable->GetSparklineList();
6575 for (
auto const& pSparklineGroup : rSparklineList.getSparklineGroups())
6577 if (pSparklineGroup->getID() == rGuid)
6578 return pSparklineGroup;
6582 return std::shared_ptr<sc::SparklineGroup>();
6595 return pTable->GetNote(nCol, nRow);
6608 pTable->SetNote(nCol, nRow, std::move(pNote));
6613 *pDocSh,
ScRange(nCol, nRow, nTab),
"note");
6635 const ScPostIt* pNote = pTab->
aCol[nCol].GetCellNote(nRow);
6636 return pNote !=
nullptr;
6643 nStartCol = pTable->ClampToAllocatedColumns(nStartCol);
6644 nEndCol = pTable->ClampToAllocatedColumns(nEndCol);
6645 for (
SCCOL nCol = nStartCol; nCol < nEndCol; ++nCol)
6646 if (pTable->aCol[nCol].HasCellNote(nStartRow, nEndRow))
6659 if (nCol >= pTable->GetAllocatedColumnsCount())
6662 return pTable->aCol[nCol].HasCellNotes();
6672 for (
SCCOL nCol=0, nColSize = pTable->aCol.size(); nCol < nColSize; ++nCol)
6692 return pTable->ReleaseNote(rPos.
Col(), rPos.
Row());
6707 SetNote(rPos, std::unique_ptr<ScPostIt>(pPostIt));
6714 return pTable->GetNoteCount(nCol);
6720 for (
const auto& pTable :
maTabs)
6723 pTable->CreateAllNoteCaptions();
6729 for (
size_t i = 0,
n = rRanges.
size();
i <
n; ++
i)
6731 const ScRange & rRange = rRanges[
i];
6734 for (
SCTAB nTab = s.
Tab(); nTab <= e.
Tab(); ++nTab)
6737 pTable->ForgetNoteCaptions(s.
Col(), s.
Row(), e.
Col(), e.
Row(), bPreserveData);
6746 bool bFirstControl =
true;
6747 std::vector<sc::NoteEntry> aNotes;
6749 for (
size_t i = 0,
n = rRanges.
size();
i <
n; ++
i)
6751 const ScRange & rRange = rRanges[
i];
6755 aState =
maTabs[nTab]->GetAllNoteCaptionsState( rRange, aNotes );
6763 bFirstControl =
false;
6765 else if(aTmpState != aState)
6777 for (
size_t nTab = 0; nTab <
maTabs.size(); ++nTab)
6785 if (
nIndex >= nColNoteCount)
6795 OSL_FAIL(
"note not found");
6800 OSL_FAIL(
"note not found");
6812 if (
nIndex >= nColNoteCount)
6822 OSL_FAIL(
"note not found");
6826 OSL_FAIL(
"note not found");
6833 return pTable->GetNotePosition(nCol,
nIndex);
6839 for (
const auto & pTable :
maTabs)
6842 pTable->GetAllNoteEntries(rNotes);
6849 pTable->GetAllNoteEntries(rNotes);
6854 for(
size_t i = 0;
i < rRangeList.
size(); ++
i)
6856 const ScRange & rRange = rRangeList[
i];
6859 maTabs[nTab]->GetNotesInRange( rRange, rNotes );
6867 pTable->GetUnprotectedCells(rRangeList);
6872 for(
size_t i = 0;
i < rRangeList.
size(); ++
i)
6874 const ScRange & rRange = rRangeList[
i];
6877 bool bContainsNote =
maTabs[nTab]->ContainsNotesInRange( rRange );
bool ValidTab(SCTAB nTab)
const SCTAB SC_TAB_APPEND
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
void PutInOrder(T &nStart, T &nEnd)
bool ScHasPriority(const ::editeng::SvxBorderLine *pThis, const ::editeng::SvxBorderLine *pOther)
General Help Function.
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
std::unique_ptr< EditTextObject > CreateTextObject()
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool Search(SCROW nRow, SCSIZE &nIndex) const
std::vector< ScAttrEntry > mvData
Cache for faster lookup of automatic names during CompileXML (during CompileXML, no document content ...
The data type represents bits, manageable by bitwise operations.
std::map< OUString, std::unique_ptr< ScChartListener > > ListenersType
@ BROADCAST_DATA_POSITIONS
broadcast existing cells with position => does AreaBroadcast
@ BROADCAST_BROADCASTERS
broadcast only existing cell broadcasters => no AreaBroadcast of range!
const D & GetValue(A nPos) const
Stores global named database ranges.
const OUString & GetInitTabPrefix() const
Iterator for references in a formula cell.
const ScPatternAttr * GetNext(SCCOL &rCol, SCROW &rRow1, SCROW &rRow2)
Use this class as a locale variable to merge number formatter from another document,...
NumFmtMergeHandler(ScDocument &rDoc, const ScDocument &rSrcDoc)
SC_DLLPUBLIC bool InsertTab(SCTAB nPos, const OUString &rName, bool bExternalDocument=false, bool bUndoDeleteTab=false)
void ResetChanged(const ScRange &rRange)
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
void SetEmptyCell(const ScAddress &rPos)
void TrackFormulas(SfxHintId nHintId=SfxHintId::ScDataChanged)
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool SetEditText(const ScAddress &rPos, std::unique_ptr< EditTextObject > pEditText)
This method manages the lifecycle of the passed edit text object.
SC_DLLPUBLIC bool RemoveFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark) const
SC_DLLPUBLIC ScColumnsRange GetWritableColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
SC_DLLPUBLIC void CopyFromClip(const ScRange &rDestRange, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pRefUndoDoc, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipEmptyCells=false, const ScRangeList *pDestRanges=nullptr)
Paste data from a clipboard document into this document.
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC sal_uInt32 GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void DumpColumnStorage(SCTAB nTab, SCCOL nCol) const
bool IsHorOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
void UndoToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc)
bool RefreshAutoFilter(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
SC_DLLPUBLIC void CreateValidTabNames(std::vector< OUString > &aNames, SCTAB nCount) const
SvtBroadcaster * GetBroadcaster(const ScAddress &rPos)
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC sal_uInt64 GetCellCount() const
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
SC_DLLPUBLIC double * GetValueCell(const ScAddress &rPos)
Return a pointer to the double value stored in value cell.
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, const ScAddress &rTopPos, SCROW nLength)
bool ValidRow(SCROW nRow) const
void UpdateRefAreaLinks(UpdateRefMode eUpdateRefMode, const ScRange &r, SCCOL nDx, SCROW nDy, SCTAB nDz)
void Clear(bool bFromDestructor=false)
CommentCaptionState GetAllNoteCaptionsState(const ScRangeList &rRanges)
SC_DLLPUBLIC void EnableUserInteraction(bool bVal)
SC_DLLPUBLIC void SetLayoutRTL(SCTAB nTab, bool bRTL, ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
bool HasPartOfMerged(const ScRange &rRange)
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
void ApplyFrameAreaTab(const ScRange &rRange, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem &rLineInner)
void GetColDefault(SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW &nDefault)
bool CanInsertCol(const ScRange &rRange) const
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
bool HasSelectionData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
Returns true, if there is any data to create a selection list for rPos.
svl::SharedString GetSharedString(const ScAddress &rPos) const
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
void CopyBlockFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW nDy)
ScClipParam & GetClipParam()
SC_DLLPUBLIC tools::Long GetColOffset(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
SCROW CopyNonFilteredFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, SCCOL nDx, SCROW &rClipStartRow, SCROW nClipEndRow)
SC_DLLPUBLIC bool InsertTabs(SCTAB nPos, const std::vector< OUString > &rNames, bool bNamesValid=false)
SC_DLLPUBLIC bool GetTable(const OUString &rName, SCTAB &rTab) const
SC_DLLPUBLIC ScColumnsRange GetAllocatedColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
tools::Long GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale) const
std::unique_ptr< ScDBData > mpAnonymousDBData
bool CompileErrorCells(FormulaError nErrCode)
Re-compile formula cells with error.
SC_DLLPUBLIC void InitDrawLayer(SfxObjectShell *pDocShell=nullptr)
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
void SetDetectiveDirty(bool bSet)
void GetUnprotectedCells(ScRangeList &rRange, SCTAB nTab) const
SC_DLLPUBLIC bool ValidNewTabName(const OUString &rName) const
SC_DLLPUBLIC void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bHidden)
bool ShrinkToDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Shrink a range to only include data area.
void EnableDelayDeletingBroadcasters(bool set)
If set, cells will not delete their empty broadcasters, avoiding possible extensive mdds vector chang...
void InvalidatePageBreaks(SCTAB nTab)
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
ScDocumentThreadSpecific maNonThreaded
SC_DLLPUBLIC SCCOL MaxCol() const
std::unique_ptr< ScDPCollection > pDPCollection
void SetNeedsListeningGroups(const std::vector< ScAddress > &rPosArray)
SC_DLLPUBLIC const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
std::vector< ScTableUniquePtr > TableContainer
size_t GetNoteCount(SCTAB nTab, SCCOL nCol) const
void SharePooledResources(const ScDocument *pSrcDoc)
SC_DLLPUBLIC SCROW GetLastFlaggedRow(SCTAB nTab) const
bool HasManualBreaks(SCTAB nTab) const
SC_DLLPUBLIC bool RenameTab(SCTAB nTab, const OUString &rName, bool bExternalDocument=false)
SC_DLLPUBLIC SCROW GetMaxRowCount() const
void AppendTabOnLoad(const OUString &rName)
HardRecalcState GetHardRecalcState() const
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
formula::VectorRefArray FetchVectorRefArray(const ScAddress &rPos, SCROW nLength)
SC_DLLPUBLIC bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi)
rtl::Reference< ScPoolHelper > mxPoolHelper
void DiscardFormulaGroupContext()
SC_DLLPUBLIC void CopyStaticToDocument(const ScRange &rSrcRange, SCTAB nDestTab, ScDocument &rDestDoc)
Copy only raw cell values to another document.
SC_DLLPUBLIC void AddPrintRange(SCTAB nTab, const ScRange &rNew)
Adds a new print ranges.
SCROW GetRowForHeight(SCTAB nTab, tools::Long nHeight) const
Given the height i.e.
void FillTabMarked(SCTAB nSrcTab, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
SC_DLLPUBLIC void SetTextCell(const ScAddress &rPos, const OUString &rStr)
Call this if you are not sure whether to put this as an edit text or a simple text.
ScInterpreterContext maInterpreterContext
static SC_DLLPUBLIC bool ValidTabName(const OUString &rName)
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
const SfxPoolItem * GetEffItem(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SC_DLLPUBLIC SCROW MaxRow() const
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow, SCTAB nTab) const
bool ColFiltered(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC void ClearPrintRanges(SCTAB nTab)
Removes all print ranges.
SC_DLLPUBLIC void ShowRow(SCROW nRow, SCTAB nTab, bool bShow)
SC_DLLPUBLIC ScDocument(ScDocumentMode eMode=SCDOCMODE_DOCUMENT, SfxObjectShell *pDocShell=nullptr)
SC_DLLPUBLIC ScDBData * GetAnonymousDBData()
std::shared_ptr< sc::FormulaGroupContext > & GetFormulaGroupContext()
SC_DLLPUBLIC ScFieldEditEngine & GetEditEngine()
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData(SCTAB nTab) const
SCROW GetLastChangedRowFlagsWidth(SCTAB nTab) const
void SetTableOpDirty(const ScRange &)
SC_DLLPUBLIC void CalcAfterLoad(bool bStartListening=true)
std::vector< ScInterpreterTableOpParams * > m_TableOpList
list of ScInterpreterTableOpParams currently in use
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
SC_DLLPUBLIC std::vector< OUString > GetAllTableNames() const
bool ContainsNotesInRange(const ScRangeList &rRange) const
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
void BroadcastCells(const ScRange &rRange, SfxHintId nHint, bool bBroadcastSingleBroadcasters=true)
SC_DLLPUBLIC ScPostIt * GetNote(const ScAddress &rPos)
bool mbFormulaGroupCxtBlockDiscard
SC_DLLPUBLIC sc::Sparkline * CreateSparkline(ScAddress const &rPosition, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
std::unique_ptr< ScAutoNameCache > pAutoNameCache
bool HasClipFilteredRows()
SCROW GetNextDifferentChangedRowFlagsWidth(SCTAB nTab, SCROW nStart) const
SC_DLLPUBLIC void TransposeClip(ScDocument *pTransClip, InsertDeleteFlags nFlags, bool bAsLink, bool bIncludeFiltered)
SC_DLLPUBLIC void SetPrintEntireSheet(SCTAB nTab)
Marks the specified sheet to be printed completely.
SC_DLLPUBLIC const ScRange * GetPrintRange(SCTAB nTab, sal_uInt16 nPos)
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
SC_DLLPUBLIC void EnableUndo(bool bVal)
std::unique_ptr< ScPatternAttr > pSelectionAttr
std::unique_ptr< SfxBroadcaster > pUnoBroadcaster
bool IsDelayedDeletingBroadcasters() const
void PrepareFormulaCalc()
Call this before any operations that might trigger one or more formula cells to get calculated.
void MergeContextBackIntoNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
SC_DLLPUBLIC void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
sal_uInt16 GetSheetOptimalMinRowHeight(SCTAB nTab) const
void PageStyleModified(SCTAB nTab, const OUString &rNewName)
SC_DLLPUBLIC void SetColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
void AddTableOpFormulaCell(ScFormulaCell *)
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
SC_DLLPUBLIC void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
SC_DLLPUBLIC SCROW GetLastDataRow(SCTAB nTab, SCCOL nCol1, SCCOL nCol2, SCROW nLastRow) const
Return the last non-empty row position in given columns that's no greater than the initial last row p...
void SetClipArea(const ScRange &rArea, bool bCut=false)
std::unique_ptr< ScValidationDataList > pValidationList
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow=false, bool bStickyLeftCol=false, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Shrink a range to only include used data area.
SC_DLLPUBLIC ScBreakType HasRowBreak(SCROW nRow, SCTAB nTab) const
ScRangePairListRef xRowNameRanges
ScRowBreakIterator * GetRowBreakIterator(SCTAB nTab) const
void SetSubTotalCellsDirty(const ScRange &rDirtyRange)
SC_DLLPUBLIC sal_uInt16 GetOriginalHeight(SCROW nRow, SCTAB nTab) const
void SetTabNameOnLoad(SCTAB nTab, const OUString &rName)
SC_DLLPUBLIC bool DeleteSparkline(ScAddress const &rPosition)
SC_DLLPUBLIC void SetAutoNameCache(std::unique_ptr< ScAutoNameCache > pCache)
sal_uInt32 nAdjustHeightLock
void LimitChartArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
void EndListeningGroups(const std::vector< ScAddress > &rPosArray)
SCROW GetHiddenRowCount(SCROW nRow, SCTAB nTab) const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
OUString GetCopyTabName(SCTAB nTab) const
void ReservePatternCount(SCTAB nTab, SCCOL nCol, SCSIZE nReserve)
void FillTab(const ScRange &rSrcArea, const ScMarkData &rMark, InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool bSkipEmpty, bool bAsLink)
SC_DLLPUBLIC void CopyToClip(const ScClipParam &rClipParam, ScDocument *pClipDoc, const ScMarkData *pMarks, bool bKeepScenarioFlags, bool bIncludeObjects)
SC_DLLPUBLIC void SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
void UpdStlShtPtrsFrmNms()
void AddSubTotalCell(ScFormulaCell *pCell)
ScRecursionHelper & GetRecursionHelper()
bool mbUserInteractionEnabled
SC_DLLPUBLIC void ApplyPattern(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScPatternAttr &rAttr)
std::unique_ptr< ScDetOpList > pDetOpList
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
SC_DLLPUBLIC bool GetAutoCalc() const
SCCOL GetLastChangedColFlagsWidth(SCTAB nTab) const
SC_DLLPUBLIC bool HasStringData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void SetCodeName(const OUString &r)
SC_DLLPUBLIC void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
SC_DLLPUBLIC const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
std::unique_ptr< ScPatternAttr > CreateSelectionPattern(const ScMarkData &rMark, bool bDeep=true)
SC_DLLPUBLIC void InitUndoSelected(const ScDocument &rSrcDoc, const ScMarkData &rTabSelection, bool bColInfo=false, bool bRowInfo=false)
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
SC_DLLPUBLIC std::unique_ptr< ScPostIt > ReleaseNote(const ScAddress &rPos)
SC_DLLPUBLIC void SetNumberFormat(const ScAddress &rPos, sal_uInt32 nNumberFormat)
SC_DLLPUBLIC bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
void RestorePrintRanges(const ScPrintRangeSaver &rSaver)
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
SC_DLLPUBLIC bool HasSparkline(ScAddress const &rPosition)
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const ScRange &rRange, std::vector< ScAddress > *pGroupPos)
SC_DLLPUBLIC OUString GetPageStyle(SCTAB nTab) const
bool IsStreamValid(SCTAB nTab) const
void LimitChartIfAll(ScRangeListRef &rRangeList)
SC_DLLPUBLIC void InitUndo(const ScDocument &rSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
SC_DLLPUBLIC bool CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void CopyRangeNamesToClip(ScDocument *pClipDoc, const ScRange &rClipRange, const ScMarkData *pMarks)
SC_DLLPUBLIC bool HasPrintRange()
void DeleteSelectionTab(SCTAB nTab, InsertDeleteFlags nDelFlag, const ScMarkData &rMark)
SC_DLLPUBLIC void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
void DeleteRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC void ExtendTotalMerge(ScRange &rRange) const
void DelBroadcastAreasInRange(const ScRange &rRange)
sal_uInt16 GetCommonWidth(SCCOL nEndCol, SCTAB nTab) const
FormulaError GetErrCode(const ScAddress &) const
ScBroadcastAreaSlotMachine * GetBASM() const
void GetSelectionFrame(const ScMarkData &rMark, SvxBoxItem &rLineOuter, SvxBoxInfoItem &rLineInner)
SC_DLLPUBLIC ScBreakType HasColBreak(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
SC_DLLPUBLIC void ApplySelectionPattern(const ScPatternAttr &rAttr, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *pIsChanged=nullptr)
SC_DLLPUBLIC bool GetHashCode(SCTAB nTab, sal_Int64 &rHashCode) const
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
bool IsPendingRowHeights(SCTAB nTab) const
sal_uInt16 GetOptimalColWidth(SCCOL nCol, SCTAB nTab, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bFormula, const ScMarkData *pMarkData=nullptr, const ScColWidthParam *pParam=nullptr)
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
void ExtendMergeSel(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, const ScMarkData &rMark, bool bRefresh=false)
SC_DLLPUBLIC void CreateValidTabName(OUString &rName) const
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
SC_DLLPUBLIC CRFlags GetRowFlags(SCROW nRow, SCTAB nTab) const
std::unique_ptr< ScChangeTrack > pChangeTrack
SC_DLLPUBLIC std::shared_ptr< sc::SparklineGroup > SearchSparklineGroup(tools::Guid const &rGuid)
ScAddress GetNotePosition(size_t nIndex) const
SC_DLLPUBLIC bool HasNote(const ScAddress &rPos) const
SvNumberFormatterIndexTable * pFormatExchangeList
ScUndoManager * mpUndoManager
SC_DLLPUBLIC void GetAllColBreaks(std::set< SCCOL > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
SC_DLLPUBLIC void SetRepeatRowRange(SCTAB nTab, std::optional< ScRange > oNew)
SC_DLLPUBLIC void SetRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
void GetNumberFormatInfo(const ScInterpreterContext &rContext, SvNumFormatType &nType, sal_uInt32 &nIndex, const ScAddress &rPos) const
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
void AddUndoTab(SCTAB nTab1, SCTAB nTab2, bool bColInfo=false, bool bRowInfo=false)
SC_DLLPUBLIC CRFlags GetColFlags(SCCOL nCol, SCTAB nTab) const
void InvalidateStreamOnSave()
bool IsBlockEditable(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
@ ETERNAL
CalcAll() without broadcast/notify but setting up new listeners.
static thread_local ScDocumentThreadSpecific maThreadSpecific
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, sc::ColumnSpanSet &rBroadcastSpans)
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
SC_DLLPUBLIC OUString GetInputString(SCCOL nCol, SCROW nRow, SCTAB nTab, bool bForceSystemLocale=false) const
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
SC_DLLPUBLIC void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScMarkData &rMark, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
SCSIZE GetPatternCount(SCTAB nTab, SCCOL nCol) const
SC_DLLPUBLIC void SetValue(SCCOL nCol, SCROW nRow, SCTAB nTab, const double &rVal)
void FindAreaPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, ScMoveDirection eDirection) const
sal_uInt64 GetXMLImportedFormulaCount() const
void ApplyStyle(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScStyleSheet &rStyle)
const OUString & GetCodeName() const
SC_DLLPUBLIC void ApplyPatternArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark, const ScPatternAttr &rAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
void GetDocStat(ScDocStat &rDocStat)
void MergeNumberFormatter(const ScDocument &rSrcDoc)
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
bool CanInsertRow(const ScRange &rRange) const
void SetupContextFromNonThreadedContext(ScInterpreterContext &threadedContext, int threadNumber)
void ApplySelectionFrame(const ScMarkData &rMark, const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner)
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
SC_DLLPUBLIC void SetColWidthOnly(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
bool IsInsertingFromOtherDoc() const
void FitBlock(const ScRange &rOld, const ScRange &rNew, bool bClear=true)
void SetPageSize(SCTAB nTab, const Size &rSize)
void UpdateBroadcastAreas(UpdateRefMode eUpdateRefMode, const ScRange &rRange, SCCOL nDx, SCROW nDy, SCTAB nDz)
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
SfxObjectShell * GetDocumentShell() const
std::vector< OUString > maTabNames
SC_DLLPUBLIC std::optional< ScRange > GetRepeatColRange(SCTAB nTab)
bool InterpretCellsIfNeeded(const ScRangeList &rRanges)
SC_DLLPUBLIC bool HasTabNotes(SCTAB nTab) const
SC_DLLPUBLIC bool HasOneSparklineGroup(ScRange const &rRange)
std::unique_ptr< ScClipParam > mpClipParam
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
void GetClipArea(SCCOL &nClipX, SCROW &nClipY, bool bIncludeFiltered)
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
bool ValidCol(SCCOL nCol) const
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
SC_DLLPUBLIC void ResetClip(ScDocument *pSourceDoc, const ScMarkData *pMarks)
SC_DLLPUBLIC void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight)
void RemoveEditTextCharAttribs(const ScAddress &rPos, const ScPatternAttr &rAttr)
SC_DLLPUBLIC void SetRowHidden(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bHidden)
SC_DLLPUBLIC void AddCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
SC_DLLPUBLIC bool HasValueData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC void GetNextPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData &rMark, SCCOL nTabStartCol=SC_TABSTART_NONE) const
SC_DLLPUBLIC const EditTextObject * GetEditText(const ScAddress &rPos) const
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScMarkData &rMark, sc::ColumnSpanSet &rBroadcastSpans)
SC_DLLPUBLIC bool NeedPageResetAfterTab(SCTAB nTab) const
SC_DLLPUBLIC void ExtendOverlapped(SCCOL &rStartCol, SCROW &rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool IsManualRowHeight(SCROW nRow, SCTAB nTab) const
bool HasValidationData(SCCOL nCol, SCROW nRow, SCTAB nTab) const
void RemoveSubTotalCell(ScFormulaCell *pCell)
SC_DLLPUBLIC void GetBorderLines(SCCOL nCol, SCROW nRow, SCTAB nTab, const ::editeng::SvxBorderLine **ppLeft, const ::editeng::SvxBorderLine **ppTop, const ::editeng::SvxBorderLine **ppRight, const ::editeng::SvxBorderLine **ppBottom) const
sal_uInt16 GetTextWidth(const ScAddress &rPos) const
bool IsVerOverlapped(SCCOL nCol, SCROW nRow, SCTAB nTab, SCROW *nStartRow=nullptr, SCROW *nEndRow=nullptr) const
SC_DLLPUBLIC void SetPageStyle(SCTAB nTab, const OUString &rName)
void DeleteCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, bool *pUndoOutline=nullptr, const ScMarkData *pTabMark=nullptr)
SC_DLLPUBLIC bool GetCellArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow) const
SC_DLLPUBLIC OUString GetFormula(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SCCOL GetNextDifferentChangedColFlagsWidth(SCTAB nTab, SCCOL nStart) const
void SetCutMode(bool bCut)
SC_DLLPUBLIC void SetRowFlags(SCROW nRow, SCTAB nTab, CRFlags nNewFlags)
void DeleteAreaLinksOnTab(SCTAB nTab)
SC_DLLPUBLIC SvtScriptType GetScriptType(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScRefCellValue *pCell=nullptr)
void SetInsertingFromOtherDoc(bool bVal)
SC_DLLPUBLIC sc::SparklineList * GetSparklineList(SCTAB nTab)
bool IsThreadedGroupCalcInProgress() const
SC_DLLPUBLIC std::optional< ScRange > GetRepeatRowRange(SCTAB nTab)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
bool HasStringCells(const ScRange &rRange) const
std::unique_ptr< ScDBCollection > pDBCollection
SC_DLLPUBLIC SCROW GetFirstEditTextRow(const ScRange &rRange) const
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC ScPostIt * GetOrCreateNote(const ScAddress &rPos)
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
void SkipOverlapped(SCCOL &rCol, SCROW &rRow, SCTAB nTab) const
void LockStreamValid(bool bLock)
SC_DLLPUBLIC void SetAutoCalc(bool bNewAutoCalc)
void CopyTabToClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, ScDocument *pClipDoc)
bool bStyleSheetUsageInvalid
SC_DLLPUBLIC bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
void CopyCellToDocument(const ScAddress &rSrcPos, const ScAddress &rDestPos, ScDocument &rDestDoc)
Copy only cell, nothing but cell to another document.
SC_DLLPUBLIC ScUndoManager * GetUndoManager()
SC_DLLPUBLIC ScPostIt * CreateNote(const ScAddress &rPos)
SC_DLLPUBLIC void SetRowHeight(SCROW nRow, SCTAB nTab, sal_uInt16 nNewHeight)
void ApplyStyleArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark, const ScStyleSheet &rStyle)
std::unique_ptr< ScPrintRangeSaver > CreatePrintRangeSaver() const
SC_DLLPUBLIC bool IsEmptyData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC void DeleteAreaTab(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCTAB nTab, InsertDeleteFlags nDelFlag)
SC_DLLPUBLIC void CalcAll()
SC_DLLPUBLIC void GetAllRowBreaks(std::set< SCROW > &rBreaks, SCTAB nTab, bool bPage, bool bManual) const
SC_DLLPUBLIC OUString GetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const ScInterpreterContext *pContext=nullptr) const
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
SC_DLLPUBLIC bool GetSparklineGroupInRange(ScRange const &rRange, std::shared_ptr< sc::SparklineGroup > &rGroup)
Returns true if the whole range covers one and the same sparkline group and returns the group via out...
void LockTable(SCTAB nTab)
void SetPendingRowHeights(SCTAB nTab, bool bSet)
SC_DLLPUBLIC sal_uInt16 GetOriginalWidth(SCCOL nCol, SCTAB nTab) const
void UpdateChartRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz)
bool bInsertingFromOtherDoc
bool HandleRefArrayForParallelism(const ScAddress &rPos, SCROW nLength, const ScFormulaCellGroupRef &mxGroup)
void RemoveCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
SC_DLLPUBLIC void SetManualHeight(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bManual)
SC_DLLPUBLIC void SetColWidth(SCCOL nCol, SCTAB nTab, sal_uInt16 nNewWidth)
SC_DLLPUBLIC const ScFormulaCell * GetFormulaCell(const ScAddress &rPos) const
void SyncColRowFlags()
Write all column row flags to table's flag data, because not all column row attributes are stored in ...
SC_DLLPUBLIC CellType GetCellType(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
bool IsBlockEmpty(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab) const
void GetNotesInRange(const ScRangeList &rRange, std::vector< sc::NoteEntry > &rNotes) const
SC_DLLPUBLIC bool DeleteTab(SCTAB nTab)
SC_DLLPUBLIC void SetRepeatColRange(SCTAB nTab, std::optional< ScRange > oNew)
void ForgetNoteCaptions(const ScRangeList &rRanges, bool bPreserveData)
SC_DLLPUBLIC void ApplyStyleAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScStyleSheet &rStyle)
SC_DLLPUBLIC bool DeleteTabs(SCTAB nTab, SCTAB nSheets)
bool IsUndoEnabled() const
std::unique_ptr< ScDrawLayer > mpDrawLayer
void CopyMultiRangeFromClip(const ScAddress &rDestPos, const ScMarkData &rMark, InsertDeleteFlags nInsFlag, ScDocument *pClipDoc, bool bResetCut=true, bool bAsLink=false, bool bIncludeFiltered=true, bool bSkipAttrForEmpty=false)
SC_DLLPUBLIC sal_uInt16 GetPrintRangeCount(SCTAB nTab)
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 SetScriptType(const ScAddress &rPos, SvtScriptType nType)
const ScPatternAttr * GetSelectionPattern(const ScMarkData &rMark)
bool HasSelectedBlockMatrixFragment(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScMarkData &rMark) const
sal_uInt64 GetCodeCount() const
void SetClipParam(const ScClipParam &rParam)
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
bool IsClipboardSource() const
void StartListeningFromClip(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void SetRepeatArea(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
SC_DLLPUBLIC void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bFiltered)
void UnlockTable(SCTAB nTab)
bool mbChangeReadOnlyEnabled
void MixDocument(const ScRange &rRange, ScPasteFunc nFunction, bool bSkipEmpty, ScDocument &rSrcDoc)
void CheckVectorizationState()
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
ScRangePairListRef xColNameRanges
SC_DLLPUBLIC ScColumnsRange GetColumnsRange(SCTAB nTab, SCCOL nColBegin, SCCOL nColEnd) const
SC_DLLPUBLIC SCSIZE GetEmptyLinesInBlock(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, ScDirection eDir)
void CreateAllNoteCaptions()
Ensure that all note objects have an associated sdr object.
tools::Long GetNeededSize(SCCOL nCol, SCROW nRow, SCTAB nTab, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bWidth, bool bTotalSize=false, bool bInPrintTwips=false)
void UpdateAllRowHeights(sc::RowHeightContext &rCxt, const ScMarkData *pTabMark)
void InterpretDirtyCells(const ScRangeList &rRanges)
void StartNeededListeners()
void RemoveManualBreaks(SCTAB nTab)
SC_DLLPUBLIC void UnlockAdjustHeight()
void FindMaxRotCol(SCTAB nTab, RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2) const
formula::FormulaTokenRef ResolveStaticReference(const ScAddress &rPos)
bool CanFitBlock(const ScRange &rOld, const ScRange &rNew)
std::shared_ptr< sc::FormulaGroupContext > mpFormulaGroupCxt
SC_DLLPUBLIC const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow, SCTAB nTab) const
SC_DLLPUBLIC SCCOL GetMaxColCount() const
bool InsertCol(SCROW nStartRow, SCTAB nStartTab, SCROW nEndRow, SCTAB nEndTab, SCCOL nStartCol, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
Size GetPageSize(SCTAB nTab) const
bool InsertRow(SCCOL nStartCol, SCTAB nStartTab, SCCOL nEndCol, SCTAB nEndTab, SCROW nStartRow, SCSIZE nSize, ScDocument *pRefUndoDoc=nullptr, const ScMarkData *pTabMark=nullptr)
void GetClipStart(SCCOL &nClipX, SCROW &nClipY)
SC_DLLPUBLIC sal_uInt64 GetFormulaGroupCount() const
void AssertNoInterpretNeeded(const ScAddress &rPos, SCROW nLength)
std::unique_ptr< ScRangeName > pRangeName
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, const ScAddress &rPos, std::vector< ScAddress > *pGroupPos)
OUString aDocName
Pool for all external formula parsers used by this document.
FormulaError GetStringForFormula(const ScAddress &rPos, OUString &rString)
void RemoveRowBreak(SCROW nRow, SCTAB nTab, bool bPage, bool bManual)
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC tools::Rectangle GetMMRect(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC tools::Long GetRowOffset(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC void SetAnonymousDBData(SCTAB nTab, std::unique_ptr< ScDBData > pDBData)
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2, SCTAB nTab)
SC_DLLPUBLIC SCTAB GetTableCount() const
std::unique_ptr< ScChartListenerCollection > pChartListenerCollection
std::set< ScFormulaCell * > maSubTotalCells
void RemoveColBreak(SCCOL nCol, SCTAB nTab, bool bPage, bool bManual)
bool ValidColRow(SCCOL nCol, SCROW nRow) const
void SetTextCurrentDefaults(const EditTextObject &rTextObject)
SetText and apply defaults already set.
static SC_DLLPUBLIC sal_uInt16 nStdRowHeight
static SC_DLLPUBLIC ::utl::TransliterationWrapper & GetTransliteration()
static SC_DLLPUBLIC LanguageType eLnge
static SC_DLLPUBLIC const CharClass & getCharClass()
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
const ScRange & GetMultiMarkArea() const
const ScRange & GetMarkArea() const
SCTAB GetFirstSelected() const
bool IsMultiMarked() const
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
SCTAB GetLastSelected() const
void SetMarking(bool bFlag)
bool GetTableSelect(SCTAB nTab) const
const ScRangeList & GetLeftEnvelope() const
const ScRangeList & GetBottomEnvelope() const
const ScRangeList & GetTopEnvelope() const
const ScRangeList & GetRightEnvelope() const
bool IsHorOverlapped() const
bool IsVerOverlapped() const
static ScDocument * GetClipDoc()
void UpdateStyleSheet(const ScDocument &rDoc)
SfxItemSet & GetItemSet()
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
Additional class containing cell annotation data.
ScPrintSaverTab & GetTabData(SCTAB nTab)
SCTAB GetTabCount() const
void push_back(const ScRange &rRange)
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
bool Intersects(const ScRange &rRange) const
static bool SC_DLLPUBLIC isMultiline(std::u16string_view rStr)
ScStyleSheet::Usage GetUsage() const
void SetUsage(ScStyleSheet::Usage eUse) const
void CopyStaticToDocument(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScTable *pDestTab)
void CopyCellToDocument(SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, SCROW nDestRow, ScTable &rDestTab)
void SetDrawPageSize(bool bResetStreamValid=true, bool bUpdateNoteCaptionPos=true, const ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
bool InterpretCellsIfNeeded(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
sal_uInt16 GetRowHeight(SCROW nRow, SCROW *pStartRow, SCROW *pEndRow, bool bHiddenAsZero=true) const
void MixData(sc::MixDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty, const ScTable *pSrcTab)
void SetLoadingRTL(bool bSet)
const ScFormulaCell * GetFormulaCell(SCCOL nCol, SCROW nRow) const
void CopyToTable(sc::CopyToDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScTable *pDestTab, const ScMarkData *pMarkData, bool bAsLink, bool bColRowFlags, bool bGlobalNamesToLocal, bool bCopyCaptions)
bool CompileErrorCells(sc::CompileFormulaContext &rCxt, FormulaError nErrCode)
void SetValue(SCCOL nCol, SCROW nRow, const double &rVal)
void DumpColumnStorage(SCCOL nCol) const
void InterpretDirtyCells(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
bool RowHidden(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
const ScBitMaskCompressedArray< SCROW, CRFlags > * GetRowFlagsArray() const
sal_uInt16 GetOptimalMinRowHeight() const
SCCOL GetAllocatedColumnsCount() const
void SetLayoutRTL(bool bSet)
std::unique_ptr< ScFlatBoolRowSegments > mpHiddenRows
std::unique_ptr< ScFlatUInt16RowSegments > mpRowHeights
SvtBroadcaster * GetBroadcaster(SCCOL nCol, SCROW nRow)
bool IsPrintEntireSheet() const
Returns true, if the sheet is always printed.
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2)
const OUString & GetName() const
void SetDocShell(SfxObjectShell *pDocShell)
Item2Range GetItemSurrogates(sal_uInt16 nWhich) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static void notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable *pDoc, bool bInvalidateAll=true)
const INetURLObject & GetURLObject() const
css::uno::Reference< css::script::XLibraryContainer > GetBasicContainer()
SfxMedium * GetMedium() const
const OUString & GetName() const
virtual SfxItemSet & GetItemSet()
virtual SfxStyleSheetBase * Next()
virtual SfxStyleSheetBase * First()
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
void EnableVer(bool bEnable)
void SetMinDist(bool bNew)
void EnableHor(bool bEnable)
void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid=true)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxInfoItemLine nLine)
const editeng::SvxBorderLine * GetTop() const
bool IsRemoveAdjacentCellBorder() const
const editeng::SvxBorderLine * GetRight() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
const editeng::SvxBorderLine * GetLeft() const
const editeng::SvxBorderLine * GetBottom() const
void SetAllDistances(sal_Int16 nNew)
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
Temporarily switch on/off auto calculation mode.
ColumnBlockPositionSet * getBlockPositionSet()
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
void executeColumnAction(ScDocument &rDoc, ColumnAction &ac) const
void setDeleteFlag(InsertDeleteFlags nFlag)
void startListeningFormulas()
Have the formula cells in the recorded ranges start listening.
void setDestRange(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void setListeningFormulaSpans(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Record a range of formula cells that need to start listening after the copy-from-clip is complete.
InsertDeleteFlags getInsertFlag() const
void setTabRange(SCTAB nStart, SCTAB nEnd)
SCTAB getTabStart() const
ScDocument * getUndoDoc()
ScDocument * getClipDoc()
void setStartListening(bool b)
Wrapper for ScDocument::EnableDelayDeletingBroadcasters()
void purgeEmptyBroadcasters()
Tracks and gathers all created sparklines and sparkline groups.
Sparkline data, used for rendering the content of a cell.
Keep track of all named expressions that have been updated during reference update.
std::unordered_set< sal_uInt16 > NameIndicesType
NameIndicesType getUpdatedNames(SCTAB nTab) const
const OUString & getString() const
bool isEqual(const OUString &rStr1, const OUString &rStr2) const
static void lcl_GetFirstTabRange(SCTAB &rTabRangeStart, SCTAB &rTabRangeEnd, const ScMarkData *pTabMark, SCTAB aMaxTab)
static bool lcl_GetNextTabRange(SCTAB &rTabRangeStart, SCTAB &rTabRangeEnd, const ScMarkData *pTabMark, SCTAB aMaxTab)
std::set< ScDefaultAttr, ScLessDefaultAttr > ScDefaultAttrSet
static HasAttrFlags OptimizeHasAttrib(HasAttrFlags nMask, const ScDocumentPool *pPool)
static void lcl_GetInsDelRanges(const ScRange &rOld, const ScRange &rNew, ScRange &rColRange, bool &rInsCol, bool &rDelCol, ScRange &rRowRange, bool &rInsRow, bool &rDelRow)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
std::unique_ptr< ScTable, o3tl::default_delete< ScTable > > ScTableUniquePtr
EmbeddedObjectRef * pObject
@ NOTE
Strings (and string results if InsertDeleteFlags::FORMULA is not set).
@ ADDNOTES
Internal use only (undo etc.): do not copy/delete caption objects of cell notes.
@ ATTRIB
Internal use only (d&d undo): do not delete caption objects of cell notes.
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType=OUString("cell-change"))
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
HashMap_OWString_Interface aMap
OUString ScResId(TranslateId aId)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
constexpr TypedWhichId< SfxUInt16Item > ATTR_PAGE_FIRSTPAGENO(177)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
constexpr sal_uInt16 ATTR_PATTERN_START(100)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr sal_uInt16 ATTR_PATTERN_END(155)
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
std::map< OUString, OUString > aParameters
This struct stores general clipboard parameters associated with a ScDocument instance created in clip...
bool isMultiRange() const
SCCOL getPasteColSize()
Get the column size of a pasted range.
SCROW getPasteRowSize(const ScDocument &rSrcDoc, bool bIncludeFiltered)
Same as the above method, but returns the row size of the compressed range.
void transpose(const ScDocument &rSrcDoc, bool bIncludeFiltered, bool bIsMultiRangeRowFilteredTranspose)
Transpose the clip parameters.
ScRange getWholeRange() const
Return a single range that encompasses all individual ranges.
For usage in FindDdeLink() only!
std::unique_ptr< ScRecursionHelper > xRecursionHelper
SvNumFormatType GetNumberFormatType(sal_uInt32 nFIndex) const
std::vector< DelayedSetNumberFormat > maDelayedSetNumberFormat
std::optional< SfxItemSet > pItemSet
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 ...
ScFormulaCell * getFormula() const
OUString getString(const ScDocument *pDoc) const
Retrieve string value.
Store parameters used in the ScDocument::SetString() method.
void setTextInput()
Call this whenever you need to unconditionally set input as text, no matter what the input is.
Store position data for column array storage.
Context for reference update during shifting, moving or copying of cell ranges.
SCROW mnRowDelta
Amount and direction of movement in the row direction.
UpdateRefMode meMode
update mode - insert/delete, copy, or move.
void setBlockPositionReference(ColumnBlockPositionSet *blockPos)
SCCOL mnColDelta
Amount and direction of movement in the column direction.
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.
bool mbClearTabDeletedFlag
When true, go through all reference tokens and clears "sheet deleted" flag if its corresponding index...
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
std::unordered_map< sal_uInt16, sal_uInt32 > SvNumberFormatterIndexTable
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap