26#include <document.hxx>
41#include <tokenarray.hxx>
61#include <osl/diagnose.h>
69class ColumnRegroupFormulaCells
72 std::vector<ScAddress>* mpGroupPos;
75 ColumnRegroupFormulaCells(
ScColContainer& rCols, std::vector<ScAddress>* pGroupPos ) :
76 mrCols(rCols), mpGroupPos(pGroupPos) {}
78 void operator() (
SCCOL nCol)
80 mrCols[nCol].RegroupFormulaCells(mpGroupPos);
88 return aCol[nCol].GetTextWidth(nRow);
93 sal_uInt16 nOldSizeX = 0;
94 sal_uInt16 nOldSizeY = 0;
95 sal_uInt16 nNewSizeX = 0;
96 sal_uInt16 nNewSizeY = 0;
112 return ( nNewSizeX != nOldSizeX || nNewSizeY != nOldSizeY );
142 for (
SCCOL i=nStartCol;
i<=maxCol;
i++)
146 if( maxCol != nEndCol )
163 pRowFlags->SetValue( nStartRow, nStartRow + nSize - 1,
182 for (; itr1 != itr2; ++itr1)
183 aNewBreaks.insert(
static_cast<SCROW>(*itr1 + nSize));
190 aCol[j].InsertRow( nStartRow, nSize );
204 bool* pUndoOutline, std::vector<ScAddress>* pGroupPos )
212 mpRowHeights->removeSegment(nStartRow, nStartRow+nSize);
217 *pUndoOutline =
true;
220 mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize);
226 std::set<SCROW>::iterator itr2 =
maRowManualBreaks.upper_bound(
static_cast<SCROW>(nStartRow + nSize - 1));
235 for (; itr1 != itr2; ++itr1)
236 aNewBreaks.insert(
static_cast<SCROW>(*itr1 - nSize));
248 std::vector<SCCOL> aRegroupCols;
251 aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(
aCol, pGroupPos));
270 for (
auto it = range.rbegin(); it != range.rend(); ++it )
305 for (; itr1 != itr2; ++itr1)
306 aNewBreaks.insert(
static_cast<SCCOL>(*itr1 + nSize));
317 for (
SCCOL nCol =
aCol.
size() - 1 - nSize; nCol >= nStartCol; --nCol)
318 aCol[nCol].SwapCol(
aCol[nCol+nSize]);
326 std::vector<SCCOL> aRegroupCols;
328 std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(
aCol,
nullptr));
332 sal_uInt16 nWhichArray[2];
340 false,
aCol[nStartCol+
i] );
341 aCol[nStartCol+
i].RemoveFlags( nStartRow, nEndRow,
343 aCol[nStartCol+
i].ClearItems( nStartRow, nEndRow, nWhichArray );
370 *pUndoOutline =
true;
372 SCCOL nRmSize = nStartCol +
static_cast<SCCOL>(nSize);
380 std::set<SCCOL>::iterator itr2 =
maColManualBreaks.upper_bound(
static_cast<SCCOL>(nStartCol + nSize - 1));
389 for (; itr1 != itr2; ++itr1)
390 aNewBreaks.insert(
static_cast<SCCOL>(*itr1 - nSize));
401 for (
SCCOL nCol = nStartCol + nSize; nCol <
aCol.
size(); ++nCol)
402 aCol[nCol].SwapCol(
aCol[nCol - nSize]);
410 aCol[nStartCol + nSize +
i].MoveTo(nStartRow, nEndRow,
aCol[nStartCol +
i]);
413 std::vector<SCCOL> aRegroupCols;
415 std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(
aCol,
nullptr));
434 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
435 aCol[
i].
DeleteArea(nRow1, nRow2, nDelFlag, bBroadcast, pBroadcastSpans);
467 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
469 const ScRange & rRange = aRangeList[
i];
506 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
532 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
533 pTable->
aCol[
i].RemoveProtected(nRow1, nRow2);
544 for (
size_t i = 0, nListSize = rRanges.
size();
i < nListSize; ++
i )
554 if (nCol1 > nCol2 || nRow1 > nRow2)
558 if (nFirstUnallocated > nCol1)
561 for (
SCCOL i = nCol1;
i < nFirstUnallocated; ++
i)
570 for (
SCCOL i = nFirstUnallocated;
i <= nLastInDest; ++
i)
574 rDestCol.
maCells.set_empty(nRow1, nRow2);
575 for (
SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
579 SvNumberFormatterMergeMap::const_iterator itNum = rMap.find(nNumFmt);
580 if (itNum != rMap.end())
581 nNumFmt = itNum->second;
599 rDestCol.
maCells.set_empty(nDestRow, nDestRow);
601 rDestCol.
maCellNotes.set_empty(nDestRow, nDestRow);
623 for (
size_t i = 0;
i < rNewRangeList.
size(); ++
i)
625 rDstRangeList.
Join(rNewRangeList[i]);
639 ScRange aOldRange( nCol1 - nDx, nRow1 - nDy, pTable->
nTab, nCol2 - nDx, nRow2 - nDy, pTable->
nTab);
645 const ScRangeList& rCondFormatRange = rxCondFormat->GetRange();
650 std::unique_ptr<ScConditionalFormat> pNewFormat = rxCondFormat->
Clone(&
rDocument);
652 pNewFormat->SetRange(aIntersectedRange);
659 pNewFormat->UpdateReference(aRefCxt,
true);
666 bool bDuplicate =
false;
671 if (CheckAndDeduplicateCondFormat(
rDocument, rxCond.get(), pNewFormat.get(),
nTab))
677 if (rxCond->GetKey() > nMax)
678 nMax = rxCond->GetKey();
686 pNewFormat->SetKey(nMax + 1);
687 auto pNewFormatTmp = pNewFormat.get();
692 for(
size_t i = 0,
n = pNewFormatTmp->size();
703 if(!aStyleName.isEmpty())
737 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
740 aCol[
i].CopyFromClip(rCxt, nRow1, nRow2, nDy, pTable->
aCol[
i - nDx]);
746 sal_uInt16 nWhichArray[2];
749 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
750 aCol[
i].ClearItems(nRow1, nRow2, nWhichArray);
764 for (
SCROW j=nRow1; j<=nRow2; j++)
796 bool bSkipEmpty,
const ScTable* pSrcTab )
804class TransClipHandler
814 SCROW mnFilteredRows = 0;
815 SCROW mnRowDestOffset = 0;
818 bool mbIncludeFiltered;
823 return ScAddress(
static_cast<SCCOL>(mnCol1 + nRow - mnTopRow), mnTransRow,
829 ScAddress aSrcPos(mnSrcCol, nSrcRow, mnSrcTab);
835 aArr.AddSingleReference(aRef);
839 void setLink(
size_t nRow)
841 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
843 createRefCell(nRow, getDestPos(nRow)));
848 SCCOL nSrcCol,
size_t nTopRow,
size_t nEndRow,
SCROW nCombinedStartRow,
849 SCROW nRowDestOffset,
bool bAsLink,
bool bWasCut,
851 std::vector<SCROW>& rFilteredRows)
852 : mrClipTab(rClipTab)
859 , mnTransRow(nSrcCol - nCol1 + nCombinedStartRow)
860 , mnRowDestOffset(nRowDestOffset)
863 , mbIncludeFiltered(bIncludeFiltered)
867 if (!mbIncludeFiltered)
869 for (
SCROW curRow = nTopRow; curRow <= static_cast<SCROW>(mnEndRow); ++curRow)
872 bool bFiltered = mrSrcTab.
RowFiltered(curRow,
nullptr,
nullptr);
874 rFilteredRows.push_back(curRow);
879 void operator() (
size_t nRow,
double fVal)
881 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
882 if (!mbIncludeFiltered && bFiltered)
894 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
895 mrClipTab.
SetValue(nTransCol, mnTransRow, fVal);
900 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
901 if (!mbIncludeFiltered && bFiltered)
913 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
919 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
920 if (!mbIncludeFiltered && bFiltered)
932 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
938 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
939 if (!mbIncludeFiltered && bFiltered)
952 getDestPos(nRow - mnFilteredRows + mnRowDestOffset),
961 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
966 void operator()(
const int ,
size_t nRow,
size_t nDataSize)
968 for (
size_t curRow = nRow; curRow < nRow + nDataSize; ++curRow)
970 bool bFiltered = mrSrcTab.
RowFiltered(curRow,
nullptr,
nullptr);
971 if (!mbIncludeFiltered && bFiltered)
996 std::vector<SCROW> aFilteredRows;
998 TransClipHandler aFunc(*pTransClip, *
this,
nTab, nCol1, nCol, nRow1, nRow2,
999 nCombinedStartRow, nRowDestOffset, bAsLink, bWasCut, nFlags,
1000 bIncludeFiltered, aFilteredRows);
1005 sc::ParseAll(rCells.begin(), rCells, nRow1, nRow2, aFunc,
1011 bIncludeFiltered, aFilteredRows, nRowDestOffset);
1016 bIncludeFiltered, nRowDestOffset);
1023 const std::vector<SCROW>& rFilteredRows,
1024 SCROW nRowDestOffset)
1026 for (
SCROW nRow = nAttrRow1; nRow <= nAttrRow2; nRow++)
1028 size_t nFilteredRowAdjustment = 0;
1029 if (!bIncludeFiltered)
1033 auto itRow1 = std::lower_bound(rFilteredRows.begin(), rFilteredRows.end(), nRow1);
1034 auto itRow = std::lower_bound(rFilteredRows.begin(), rFilteredRows.end(), nRow);
1035 bool bRefRowIsFiltered = itRow != rFilteredRows.end() && *itRow == nRow;
1036 if (bRefRowIsFiltered)
1041 nFilteredRowAdjustment = std::distance(itRow1, itRow);
1045 static_cast<SCCOL>(nCol1 + nRow - nRow1 - nFilteredRowAdjustment + nRowDestOffset),
1046 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), rPatternAttr);
1051 SCROW nRow2,
SCROW nCombinedStartRow,
bool bIncludeFiltered,
1052 const std::vector<SCROW>& rFilteredRows,
SCROW nRowDestOffset)
1054 SCROW nAttrRow1 = {};
1055 SCROW nAttrRow2 = {};
1057 std::unique_ptr<ScAttrIterator> pAttrIter(
aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
1058 while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) !=
nullptr )
1070 nCombinedStartRow, nCol, *pPattern,
1071 bIncludeFiltered, rFilteredRows, nRowDestOffset);
1083 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::TOP ), SvxBoxItemLine::LEFT );
1084 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::LEFT ), SvxBoxItemLine::TOP );
1085 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::BOTTOM ), SvxBoxItemLine::RIGHT );
1086 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::RIGHT ), SvxBoxItemLine::BOTTOM );
1091 rNewSet.
Put( aNew );
1114 nCombinedStartRow, nCol, aNewPattern,
1115 bIncludeFiltered, rFilteredRows, nRowDestOffset);
1122 SCROW nRow2,
SCROW nCombinedStartRow,
bool bIncludeFiltered,
1123 SCROW nRowDestOffset)
1125 sc::CellNoteStoreType::const_iterator itBlk =
aCol[nCol].maCellNotes.
begin(), itBlkEnd =
aCol[nCol].maCellNotes.
end();
1128 size_t nOffsetInBlock = 0;
1129 size_t nBlockStart = 0, nBlockEnd = 0, nRowPos =
static_cast<size_t>(nRow1);
1130 for (; itBlk != itBlkEnd; ++itBlk, nBlockStart = nBlockEnd)
1132 nBlockEnd = nBlockStart + itBlk->size;
1133 if (nBlockStart <= nRowPos && nRowPos < nBlockEnd)
1136 nOffsetInBlock = nRowPos - nBlockStart;
1141 if (itBlk == itBlkEnd)
1145 nRowPos =
static_cast<size_t>(nRow2);
1146 SCCOL nFilteredRows = 0;
1149 sc::cellnote_block::const_iterator itData, itDataEnd;
1150 for (; itBlk != itBlkEnd; ++itBlk, nBlockStart = nBlockEnd, nOffsetInBlock = 0)
1152 nBlockEnd = nBlockStart + itBlk->size;
1156 itData = sc::cellnote_block::begin(*itBlk->data);
1157 std::advance(itData, nOffsetInBlock);
1160 if (nBlockStart <= nRowPos && nRowPos < nBlockEnd)
1163 size_t nOffsetEnd = nRowPos - nBlockStart + 1;
1164 itDataEnd = sc::cellnote_block::begin(*itBlk->data);
1165 std::advance(itDataEnd, nOffsetEnd);
1166 size_t curRow = nBlockStart + nOffsetInBlock;
1167 for (; itData != itDataEnd; ++itData, ++curRow)
1169 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1170 if (!bIncludeFiltered && bFiltered)
1177 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1178 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1191 itDataEnd = sc::cellnote_block::end(*itBlk->data);
1192 size_t curRow = nBlockStart + nOffsetInBlock;
1193 for (; itData != itDataEnd; ++itData, ++curRow)
1195 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1196 if (!bIncludeFiltered && bFiltered)
1203 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1204 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1217 for (
size_t curRow = nBlockStart + nOffsetInBlock;
1218 curRow <= nBlockEnd && curRow <= nRowPos; ++curRow)
1220 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1221 if (!bIncludeFiltered && bFiltered && curRow < nBlockEnd)
1228 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1229 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1254 std::shared_ptr<const sc::ColumnSet> pColSet = rCxt.
getColumnSet();
1260 else if (pColSet->hasTab(
nTab))
1262 std::vector<SCCOL> aColumns;
1263 pColSet->getColumns(
nTab, aColumns);
1264 for (
auto i : aColumns)
1267 aCol[
i].StartListeners(rCxt, bAll);
1276 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
1284 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
1295 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1307 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1314 bool bAsLink,
bool bColRowFlags,
bool bGlobalNamesToLocal,
bool bCopyCaptions )
1345 aCol[
i].CopyToColumn(rCxt, nRow1, nRow2, bToUndoDoc ? nFlags : nTempFlags, bMarked,
1363 pNewDBData->GetArea(aTab, aCol1, aRow1, aCol2, aRow2);
1364 pNewDBData->MoveTo(pDestTab->
nTab, aCol1, aRow1, aCol2, aRow2);
1370 bool bFlagChange =
false;
1375 if (bWidth || bHeight)
1379 auto destTabColWidthIt = pDestTab->
mpColWidth->begin() + nCol1;
1380 auto thisTabColWidthIt =
mpColWidth->begin() + nCol1;
1383 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1386 bool bHiddenChange = (pDestTab->
ColHidden(
i) != bThisHidden);
1387 bool bChange = bHiddenChange || (*destTabColWidthIt != *thisTabColWidthIt);
1390 if (bHiddenChange && pCharts)
1396 ++destTabColWidthIt;
1397 ++thisTabColWidthIt;
1413 for (
SCROW i = nRow1;
i <= nRow2; ++
i)
1416 bool bHidden =
RowHidden(
i,
nullptr, &nLastRow);
1417 if (nLastRow >= nRow2)
1421 bool bHiddenChanged = pDestTab->
SetRowHidden(
i, nLastRow, bHidden);
1422 if (bHiddenChanged && pCharts)
1434 for (
SCROW i = nRow1;
i <= nRow2; ++
i)
1438 if (nLastRow >= nRow2)
1478 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1485 bool bCloneCaption )
1491 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1494 pDestTab->
aCol[
i].UpdateNoteCaptions(nRow1, nRow2);
1526 if (
i >= nCol1 &&
i <= nCol2 )
1527 aCol[
i].UndoToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, rDestCol);
1535 if (!(bWidth||bHeight))
1570 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1578 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1588 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1599 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1609 for (
size_t j = 0,
n = pList->
size(); j <
n; j++ )
1611 const ScRange & rR = (*pList)[j];
1627 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1641 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1693 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1696 SCROW nThisFirst = -1;
1697 if (
const_cast<ScColumn&
>(rCol).HasEditCells(nRow1, nRow2, nThisFirst))
1699 if (nThisFirst == nRow1)
1702 if (nThisFirst < nFirst)
1703 nFirst = nThisFirst;
1715 aCol[nCol].Delete(nRow);
1760 return aCol[nCol].GetSharedString(nRow);
1778 return aCol[nCol].GetString( nRow, pContext );
1794 return aCol[nCol].GetInputString( nRow, bForceSystemLocale );
1802 return aCol[nCol].GetValue( nRow );
1811 return aCol[nCol].GetEditText(nRow);
1819 return aCol[nCol].RemoveEditTextCharAttribs(nRow, rAttr);
1825 return aCol[nCol].GetFormula( nRow );
1835 return aCol[nCol].GetFormulaCell(nRow);
1843 return aCol[nCol].GetFormulaCell(nRow);
1851 return std::shared_ptr<sc::Sparkline>();
1854 if (!pSparklineCell)
1855 return std::shared_ptr<sc::Sparkline>();
1867 std::shared_ptr<sc::Sparkline> pSparkline(
new sc::Sparkline(nCol, nRow, pSparklineGroup));
1870 return pSparkline.get();
1878 aCol[nCol].DeleteSparkline(nRow);
1895 return aCol[nCol].ReleaseNote(nRow);
1902 return aCol[nCol].GetCellNote(nRow);
1918 return aCol[nCol].GetNoteCount();
1940 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1957 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1965 bool bIsFirstNoteShownState =
true;
1966 bool bFirstControl =
true;
1975 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1976 bIsFirstNoteShownState = rNotes.
begin()->mpNote->IsCaptionShown();
1977 bFirstControl =
false;
1982 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1984 bool bIsMixedState = std::any_of(rNotes.begin(), rNotes.end(), [bIsFirstNoteShownState](
const sc::NoteEntry& rNote) {
1986 return bIsFirstNoteShownState != rNote.mpNote->IsCaptionShown(); });
1996 for (
auto const & pCol :
aCol)
2007 bool bContainsNote = !
aCol[nCol].IsNotesEmptyBlock(nStartRow, nEndRow);
2018 return aCol[nCol].GetCellType( nRow );
2027 return aCol[nCol].GetCellValue(nRow);
2035 return aCol[nCol].GetCellValue(rBlockPos, nRow);
2042 while (rCol < (
aCol.
size() - 1) &&
aCol[rCol].IsEmptyData() )
2045 while (nCol <
aCol.
size() && rRow > 0)
2067 return aCol[nCol].HasDataAt( nRow );
2075 return aCol[nCol].HasStringData( nRow );
2083 return aCol[nCol].HasValueData( nRow );
2094 for (
SCCOL nCol = nStartCol; nCol <= nEndCol; nCol++)
2138 aCol[
i].SetTableOpDirty( rRange );
2165 bool bBroadcasted =
false;
2168 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
2170 return bBroadcasted;
2202 aCol[
i].CompileXML(rCxt, rProgress);
2211 bool bCompiled =
false;
2234 for (
SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
2298 for(
SCCOL nCol = nCol1; nCol <= nCol2 && nCol <
aCol.
size(); ++nCol )
2317 for (
SCCOLROW j = aSpan.mnStart; j <= aSpan.mnEnd; ++j)
2332 OSL_FAIL(
"ScTable::ExtendMerge: invalid column number");
2337 bool bFound =
false;
2339 SCROW nOldEndY = rEndRow;
2340 for (
SCCOL i=nStartCol;
i<=nOldEndX;
i++)
2341 bFound |=
aCol[
i].
ExtendMerge(
i, nStartRow, nOldEndY, rEndCol, rEndRow, bRefresh );
2356 if (nCol1 < nCol2 && nRow1 < nRow2)
2364 OSL_FAIL(
"ScTable::IsBlockEmpty: invalid column number");
2369 for (
SCCOL i=nCol1;
i<=nCol2 && bEmpty;
i++)
2371 bEmpty =
aCol[
i].IsEmptyData( nRow1, nRow2 );
2374 bEmpty =
aCol[
i].IsSparklinesEmptyBlock(nRow1, nRow2);
2378 bEmpty =
aCol[
i].IsNotesEmptyBlock(nRow1, nRow2);
2396 else if ( nCol > nX2+1 )
2401 double nFactor = 0.0;
2406 double nRealOrient =
toRadians(nRotVal);
2407 double nCos = cos( nRealOrient );
2408 double nSin = sin( nRealOrient );
2414 nFactor = -fabs( nCos / nSin );
2417 for (
SCROW nRow = nAttrRow1; nRow <= nAttrRow2; nRow++ )
2421 bool bHitOne =
true;
2426 SCCOL nTouchedCol = nCol;
2428 OSL_ENSURE(nWidth <= 0,
"Wrong direction");
2429 while ( nWidth < 0 && nTouchedCol > 0 )
2434 if ( nTouchedCol > nX2 )
2440 while ( nArrY<nArrCount && pRowInfo[nArrY].nRowNo < nRow )
2442 if ( nArrY<nArrCount && pRowInfo[nArrY].nRowNo == nRow )
2457 OSL_FAIL(
"Row/column info missing" );
2473 SCROW nAttrRow1, nAttrRow2;
2486 for(
const auto& rItem : rCondFormatData)
2491 size_t nEntryCount = pFormat->
size();
2492 for (
size_t nEntry=0; nEntry<nEntryCount; nEntry++)
2500 if (!aStyleName.isEmpty())
2503 pStylePool->
Find( aStyleName, SfxStyleFamily::Para );
2507 nCol, nAttrRow1, nAttrRow2,
2508 nArrY, pPattern, &pStyleSheet->
GetItemSet() );
2518 nArrY =
FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
2519 nCol, nAttrRow1, nAttrRow2,
2520 nArrY, pPattern,
nullptr );
2522 pPattern = aIter.
GetNext( nAttrCol, nAttrRow1, nAttrRow2 );
2529 bool bNoMatrixAtAll )
const
2536 const SCCOL nMaxCol2 = std::min<SCCOL>( nCol2,
aCol.
size() - 1 );
2540 if ( nCol1 == nMaxCol2 )
2543 nEdges =
aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2,
n, bNoMatrixAtAll );
2544 if ((nEdges != MatrixEdge::Nothing) && (((nEdges &
n)!=
n) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2550 if ((nEdges != MatrixEdge::Nothing) && ((!(nEdges &
MatrixEdge::Left)) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2554 if ((nEdges != MatrixEdge::Nothing) && ((!(nEdges &
MatrixEdge::Right)) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2560 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2562 nEdges =
aCol[
i].GetBlockMatrixEdges( nRow1, nRow2, MatrixEdge::Nothing, bNoMatrixAtAll);
2563 if (nEdges != MatrixEdge::Nothing
2568 else if ( nRow1 == nRow2 )
2571 const MatrixEdge n = MatrixEdge::Bottom | MatrixEdge::Top;
2572 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2574 nEdges =
aCol[
i].GetBlockMatrixEdges( nRow1, nRow1,
n, bNoMatrixAtAll );
2575 if (nEdges != MatrixEdge::Nothing)
2577 if ( (nEdges &
n) !=
n )
2596 for ( j=0,
n = MatrixEdge::Top, nR=nRow1; j<2;
2597 j++,
n = MatrixEdge::Bottom, nR=nRow2)
2600 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2602 nEdges =
aCol[
i].GetBlockMatrixEdges( nR, nR,
n, bNoMatrixAtAll );
2603 if ( nEdges != MatrixEdge::Nothing)
2607 if ( (nEdges &
n) !=
n )
2632 for (
SCCOLROW j=aSpan.mnStart; j<=nEndCol; j++ )
2642 SCROW nRow2,
bool* pOnlyNotBecauseOfMatrix ,
2643 bool bNoMatrixAtAll )
const
2647 SAL_WARN(
"sc",
"IsBlockEditable: invalid column or row " << nCol2 <<
" " << nRow2);
2648 if (pOnlyNotBecauseOfMatrix)
2649 *pOnlyNotBecauseOfMatrix =
false;
2653 bool bIsEditable =
true;
2655 bIsEditable =
false;
2671 sal_uInt16 nScenTab =
nTab+1;
2674 ScRange aEditRange(nCol1, nRow1, nScenTab, nCol2, nRow2, nScenTab);
2711 bIsEditable =
false;
2712 if ( pOnlyNotBecauseOfMatrix )
2713 *pOnlyNotBecauseOfMatrix =
true;
2715 else if ( pOnlyNotBecauseOfMatrix )
2716 *pOnlyNotBecauseOfMatrix =
false;
2718 else if ( pOnlyNotBecauseOfMatrix )
2719 *pOnlyNotBecauseOfMatrix =
false;
2724 bool* pOnlyNotBecauseOfMatrix )
const
2726 bool bIsEditable =
true;
2728 bIsEditable =
false;
2750 for (
size_t i=0, nRange = aRanges.
size(); (
i < nRange) && bIsEditable;
i++ )
2752 const ScRange & rRange = aRanges[
i ];
2779 for (
size_t i = 0, nRange = aRanges.
size(); (
i < nRange) && bIsEditable;
i++)
2781 const ScRange & rRange = aRanges[
i ];
2795 bIsEditable =
false;
2796 if ( pOnlyNotBecauseOfMatrix )
2797 *pOnlyNotBecauseOfMatrix =
true;
2799 else if ( pOnlyNotBecauseOfMatrix )
2800 *pOnlyNotBecauseOfMatrix =
false;
2802 else if ( pOnlyNotBecauseOfMatrix )
2803 *pOnlyNotBecauseOfMatrix =
false;
2818 OSL_FAIL(
"UnlockTable without LockTable");
2829 for (
SCCOL i = rSpan.mnStart;
i <= maxCol; ++
i)
2831 aCol[
i].MergeSelectionPattern( rState, rMark, bDeep );
2840 for (
SCCOL i=nCol1;
i<=nEndCol;
i++)
2842 if (nEndCol != nCol2)
2854 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++)
2856 nStartRow, nEndRow, (
i==nStartCol), nEndCol-
i );
2868 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++)
2870 nStartRow, nEndRow, (
i==nStartCol), nEndCol-
i);
2882 bool*
const pIsChanged )
2888 SCCOL maxCol = nEndCol;
2889 if( nEndCol ==
GetDoc().MaxCol())
2892 maxCol = std::max( nStartCol,
aCol.
size()) - 1;
2897 for (
SCCOL i = nStartCol;
i <= maxCol;
i++)
2903 std::vector<ScAttrEntry> duplicateScAttrEntries(
ScDocument& rDocument,
const std::vector<ScAttrEntry>& rOrigData)
2905 std::vector<ScAttrEntry>
aData(rOrigData);
2906 for (
size_t nIdx = 0; nIdx <
aData.size(); ++nIdx)
2908 aData[nIdx].pPattern = &rDocument.
GetPool()->
Put(*aData[nIdx].pPattern);
2924 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
2937 for (
SCCOL i = nStartCol;
i < nEndCol;
i++)
2939 aCol[nEndCol].SetAttrEntries( std::move(vNewData));
2949 for (
SCCOL nCol = rRange.
aStart.
Col(); nCol <= nEndCol; nCol++ )
2951 aCol[nCol].ApplyPatternIfNumberformatIncompatible( rRange, rPattern, nNewType );
2957 size_t n = rRangeList.
size();
2958 for(
size_t i = 0;
i <
n; ++
i)
2960 const ScRange & rRange = rRangeList[
i];
2965 for(
SCCOL nCol = nColStart; nCol <= nColEnd; ++nCol)
2974 size_t n = rRangeList.
size();
2975 for(
size_t i = 0;
i <
n; ++
i)
2977 const ScRange & rRange = rRangeList[
i];
2982 for(
SCCOL nCol = nColStart; nCol <= nColEnd; ++nCol)
2984 aCol[nCol].RemoveCondFormat(nRowStart, nRowEnd,
nIndex);
2994 for (
const auto& rIndex : rCondFormatIndexes)
3026 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3039 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3051 const ::editeng::SvxBorderLine* pLine,
bool bColorOnly )
3053 if ( bColorOnly && !pLine )
3080 pNewStyle =
aCol[
i].GetSelectionStyle( rMark, bColFound );
3084 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
3090 return bEqual ? pStyle :
nullptr;
3104 for (
SCCOL i=nCol1;
i<=nCol2 && bEqual;
i++)
3106 pNewStyle =
aCol[
i].GetAreaStyle(bColFound, nRow1, nRow2);
3110 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
3116 return bEqual ? pStyle :
nullptr;
3121 bool bIsUsed =
false;
3141 aCol[
i].FindStyleSheet(pStyleSheet, aUsedRows, bRemoved);
3163 bool bChanged =
false;
3165 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3175 bool bChanged =
false;
3177 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3212 SCCOL lastChangeCol;
3217 if( lastChangeCol >= 0 )
3227 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3235 SCCOL lastChangeCol;
3240 if( lastChangeCol >= 0 )
3250 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3258 SCCOL lastChangeCol;
3263 if( lastChangeCol >= 0 )
3273 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3288 if ( nNewWidth !=
mpColWidth->GetValue(nCol) )
3296 OSL_FAIL(
"Invalid column number or no widths");
3318 OSL_FAIL(
"SetRowHeight: Row height zero");
3323 if ( nNewHeight != nOldHeight )
3331 OSL_FAIL(
"Invalid row number or no heights");
3341bool lcl_pixelSizeChanged(
3343 sal_uInt16 nNewHeight,
double nPPTY,
bool bApi)
3348 for (
SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
3351 if (!aFwdIter.getValue(nRow, nHeight))
3354 if (nHeight != nNewHeight)
3360 bool bChanged = (nNewPix != nOldPix) && (bApi || nEndRow - nStartRow > 0 || nNewPix > nOldPix);
3366 nRow = aFwdIter.getLastPos();
3374 double nPPTY,
bool bApi )
3376 bool bChanged =
false;
3381 OSL_FAIL(
"SetRowHeight: Row height zero");
3385 bool bSingle =
false;
3395 nNewHeight ==
aData.mnValue && nEndRow <=
aData.mnRow2)
3402 if (!bSingle || nEndRow - nStartRow < 20)
3404 bChanged = lcl_pixelSizeChanged(*
mpRowHeights, nStartRow, nEndRow, nNewHeight,
nPPTY, bApi);
3406 mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
3410 SCROW nMid = (nStartRow + nEndRow) / 2;
3423 OSL_FAIL(
"Invalid row number or no heights");
3437 mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
3451 OSL_FAIL(
"Invalid row number or no column flags");
3457 OSL_ENSURE(
ValidCol(nCol),
"wrong column number");
3476 bool bHidden =
false;
3477 SCCOL nLastHiddenCol = -1;
3478 auto colWidthIt =
mpColWidth->begin() + nStartCol;
3479 for (
SCCOL nCol = nStartCol; nCol <= nEndCol; (++nCol <= nEndCol) ? ++colWidthIt : (
void)
false)
3481 if (nCol > nLastHiddenCol)
3482 bHidden =
ColHidden(nCol,
nullptr, &nLastHiddenCol);
3494 OSL_ENSURE(
ValidCol(nCol),
"wrong column number");
3497 return mpColWidth->GetValue(nCol);
3508 OSL_FAIL(
"wrong column");
3512 sal_uInt16 nMaxWidth = 0;
3513 sal_uInt16 nMaxCount = 0;
3514 SCCOL nRangeStart = 0;
3515 while ( nRangeStart <= nEndCol )
3518 while ( nRangeStart <= nEndCol &&
ColHidden(nRangeStart) )
3520 if ( nRangeStart <= nEndCol )
3522 sal_uInt16 nThisCount = 0;
3523 auto colWidthIt =
mpColWidth->begin() + nRangeStart;
3524 sal_uInt16 nThisWidth = *colWidthIt;
3525 SCCOL nRangeEnd = nRangeStart;
3526 while ( nRangeEnd <= nEndCol && *colWidthIt == nThisWidth )
3533 while ( nRangeEnd <= nEndCol &&
ColHidden(nRangeEnd) )
3540 if ( nThisCount > nMaxCount )
3542 nMaxCount = nThisCount;
3543 nMaxWidth = nThisWidth;
3546 nRangeStart = nRangeEnd;
3559 if (bHiddenAsZero &&
RowHidden( nRow, pStartRow, pEndRow))
3579 *pStartRow = (bHiddenAsZero ? std::max( *pStartRow,
aData.mnRow1) :
aData.mnRow1);
3581 *pEndRow = (bHiddenAsZero ? std::min( *pEndRow,
aData.mnRow2) :
aData.mnRow2);
3582 return aData.mnValue;
3602 SCROW nRow = nStartRow;
3603 while (nRow <= nEndRow)
3605 SCROW nLastRow = -1;
3606 if (!( (
RowHidden(nRow,
nullptr, &nLastRow) ) && bHiddenAsZero ) )
3608 if (nLastRow > nEndRow)
3612 nRow = nLastRow + 1;
3627 SCROW nRow = nStartRow;
3628 while (nRow <= nEndRow)
3630 SCROW nLastRow = -1;
3631 if (!
RowHidden(nRow,
nullptr, &nLastRow))
3633 if (nLastRow > nEndRow)
3638 while (nRow <= nLastRow)
3641 if (!aSegmentIter.
getValue(nRow, nRowVal))
3648 nHeight += nOneHeight * ( nSegmentEnd + 1 - nRow );
3650 nRow = nSegmentEnd + 1;
3653 nRow = nLastRow + 1;
3663 OSL_ENSURE(
ValidRow(nRow),
"wrong row number");
3665 if (
ValidRow(nRow) && mpRowHeights)
3666 return mpRowHeights->getValue(nRow);
3668 return GetOptimalMinRowHeight();
3678 SCROW nLastRow = -1;
3682 return nLastRow - nRow + 1;
3692 if (bWasVis != bShow)
3703 OSL_FAIL(
"Invalid column number or no flags");
3712 if (bWasVis != bShow)
3726 OSL_FAIL(
"Invalid row number or no flags");
3752 OSL_FAIL(
"Invalid row number or no flags");
3758 SCROW nStartRow = nRow1;
3759 while (nStartRow <= nRow2)
3762 bool bWasVis = !
RowHiddenLeaf(nStartRow,
nullptr, &nEndRow);
3763 if (nEndRow > nRow2)
3766 bool bChanged = ( bWasVis != bShow );
3778 nStartRow = nEndRow + 1;
3790 SCROW nStartRow = nRow1;
3796 while (nStartRow <= nRow2)
3799 bool bWasVis = !
RowHiddenLeaf(nStartRow,
nullptr, &nEndRow);
3800 if (nEndRow > nRow2)
3803 bool bChanged = ( bWasVis != bShow );
3818 nStartRow = nEndRow + 1;
3832 assert(nColStart <= nColEnd && nRowStart <= nRowEnd
3833 &&
"range must be normalized to obtain a valid result");
3834 for (
SCROW i = nRowStart;
i <= nRowEnd; ++
i)
3839 for (
SCCOL i = nColStart;
i <= nColEnd; ++
i)
3860 OSL_FAIL(
"Invalid row number or no flags");
3867 pRowFlags->SetValue( nStartRow, nEndRow, nNewFlags);
3870 OSL_FAIL(
"Invalid row number(s) or no flags");
3892 SCROW nLastFound = 0;
3907 nLastFound = ::std::max(nLastFound, nRow);
3914 nLastFound = ::std::max(nLastFound, nRow);
3925 SCCOL nLastFound = 0;
3948 return std::max( nLastFlags, nLastHeight);
3955 return pOutlineTable->GetColArray().ManualAction( nStartCol, nEndCol, bShow, *
this,
true );
3964 return pOutlineTable->GetRowArray().ManualAction( nStartRow, nEndRow, bShow, *
this,
false );
4012 if (
ValidRow(nStartRow) && nStartRow >= rY1)
4027template<
typename T >
4036class OutlineArrayFinder
4046 maRef(rRef),
mnCol(nCol), mnTab(nTab),
mpArray(pArray),
4047 mbSizeChanged(bSizeChanged) {}
4071 typedef mdds::flat_segment_tree<SCROW, bool> UsedRowsType;
4073 bool bSizeChanged =
false;
4087 for (nCol=nStartCol; nCol<=nEndCol; nCol++)
4088 aCol[nCol].FindUsed(nStartRow, nEndRow, aUsed);
4092 for (nRow=nStartRow; nRow<=nEndRow; nRow++)
4095 SCROW nLastRow = nRow;
4096 aUsed.search_tree(nRow, bUsed,
nullptr, &nLastRow);
4104 for (nCol=nStartCol; nCol<=nEndCol && !bFound; nCol++)
4129 for (nCol=nStartCol; nCol<=nEndCol; nCol++)
4134 OutlineArrayFinder aFunc(aRef, nCol,
nTab, &rColArray, bSizeChanged);
4147 ScAddress aDest( nDestCol, nDestRow, nDestTab );
4148 ScRange aRange( aSrc, aDest );
4149 bool bThisTab = ( nDestTab ==
nTab );
4150 SCROW nDestY = nDestRow;
4151 for (
SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
4155 SCCOL nDestX = nDestCol;
4156 for (
SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
4203 nEndRow = ::std::numeric_limits<SCROW>::max();
4227 const sal_Int64 nMax = ::std::numeric_limits<tools::Long>::max();
4246 if (bResetStreamValid)
4273 return GetRowHeight(0,
nullptr,
nullptr, bHiddenAsZero );
4276#if OSL_DEBUG_LEVEL > 0
4277 if (
n == ::std::numeric_limits<tools::Long>::max())
4278 OSL_FAIL(
"ScTable::GetRowOffset: row heights overflow");
4283 OSL_FAIL(
"GetRowOffset: Data missing");
4295 aRowHeightRange.
mnRow2 = -1;
4307 nRow =
aData.mnRow2;
4311 if (aRowHeightRange.
mnRow2 < nRow)
4313 if (!
mpRowHeights->getRangeData(nRow, aRowHeightRange))
4320 assert (nLastCommon >= nRow);
4321 SCROW nCommon = nLastCommon - nRow + 1;
4328 if (nCommonPixels > nPixelsLeft)
4330 nRow += (nPixelsLeft + aRowHeightRange.
mnValue - 1) / aRowHeightRange.
mnValue;
4343 nRow =
aData.mnRow2 + 1;
4349 nSum += nCommonPixels;
4361 for (
SCCOL i = 0;
i < nCol; (++
i < nCol) ? ++colWidthIt : (
void)
false)
4367 OSL_FAIL(
"GetColumnOffset: Data missing");
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 ...
bool ValidRow(SCROW nRow, SCROW nMaxRow)
bool ValidCol(SCCOL nCol, SCCOL nMaxCol)
void PutInOrder(T &nStart, T &nEnd)
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
void SetRangeDirty(const ScRange &rRange)
ScColumnVector::const_iterator begin() const
ScColumnVector::const_iterator end() const
void ApplyStyleArea(SCROW nStartRow, SCROW nEndRow, const ScStyleSheet &rStyle)
const ScPatternAttr * GetPattern(SCROW nRow) const
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
SCROW ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray, bool *const pIsChanged, SCCOL nCol)
void SetAttrEntries(std::vector< ScAttrEntry > &&vNewData)
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark, SCCOL nCol)
bool TestInsertRow(SCSIZE nSize) const
void MergePatternArea(ScMergePatternState &rState, SCROW nRow1, SCROW nRow2, bool bDeep) const
void InsertRow(SCROW nStartRow, SCSIZE nSize)
void ApplyPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &rPatAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
const ScStyleSheet * GetStyle(SCROW nRow) const
const ScPatternAttr * GetMostUsedPattern(SCROW nStartRow, SCROW nEndRow) const
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark, SCCOL nCol)
sal_uInt32 GetNumberFormat(const ScInterpreterContext &rContext, SCROW nRow) const
void CreateSparklineCell(SCROW nRow, std::shared_ptr< sc::Sparkline > const &pSparkline)
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
void CellStorageModified()
Called whenever the state of cell array gets modified i.e.
void ApplyPattern(SCROW nRow, const ScPatternAttr &rPatAttr)
void SetValue(SCROW nRow, double fVal)
sc::CellTextAttrStoreType maCellTextAttrs
void SetFormula(SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
ScFormulaCell * SetFormulaCell(SCROW nRow, ScFormulaCell *pCell, sc::StartListeningType eListenType=sc::SingleCellListening, bool bInheritNumFormatIfNeeded=true)
Takes ownership of pCell.
bool SetFormulaCells(SCROW nRow, std::vector< ScFormulaCell * > &rCells)
void InitBlockPosition(sc::ColumnBlockPosition &rBlockPos)
void SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &)
BroadcastMode
Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode).
sc::CellNoteStoreType maCellNotes
void SetNumberFormat(SCROW nRow, sal_uInt32 nNumberFormat)
void ApplyAttr(SCROW nRow, const SfxPoolItem &rAttr)
const ScPatternAttr * SetPattern(SCROW nRow, std::unique_ptr< ScPatternAttr >)
void ApplyStyle(SCROW nRow, const ScStyleSheet *rStyle)
sc::CellStoreType maCells
void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
void CopyStaticToDocument(SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScColumn &rDestCol)
void SetCellNote(SCROW nRow, std::unique_ptr< ScPostIt > pNote)
double * GetValueCell(SCROW nRow)
void SetEditText(SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
bool SetString(SCROW nRow, SCTAB nTab, const OUString &rString, formula::FormulaGrammar::AddressConvention eConv, const ScSetStringParam *pParam=nullptr)
Returns true if the cell format was set as well.
void CopyCellToDocument(SCROW nSrcRow, SCROW nDestRow, ScColumn &rDestCol)
void SetRawString(SCROW nRow, const OUString &rStr)
const OUString & GetStyleName() const
const ScPatternAttr * GetNext(SCCOL &rCol, SCROW &rRow1, SCROW &rRow2)
void SetAreasChangedNeedBroadcast()
SC_DLLPUBLIC bool IsScenario(SCTAB nTab) const
ScSheetLimits & GetSheetLimits() const
SC_DLLPUBLIC ScTable * FetchTable(SCTAB nTab)
void SetNote(const ScAddress &rPos, std::unique_ptr< ScPostIt > pNote)
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
SC_DLLPUBLIC bool HasColNotes(SCCOL nCol, SCTAB nTab) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC ScDocumentPool * GetPool()
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC ScChartListenerCollection * GetChartListenerCollection() const
bool HasScenarioRange(SCTAB nTab, const ScRange &rRange) const
ScInterpreterContext & GetNonThreadedContext() const
SC_DLLPUBLIC std::unique_ptr< ScPostIt > ReleaseNote(const ScAddress &rPos)
ScBroadcastAreaSlotMachine * GetBASM() const
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
bool IsClipOrUndo() const
SfxObjectShell * GetDocumentShell() const
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
SC_DLLPUBLIC void SetPattern(const ScAddress &, const ScPatternAttr &rAttr)
SC_DLLPUBLIC void AddCondFormatData(const ScRangeList &rRange, SCTAB nTab, sal_uInt32 nIndex)
void GetScenarioFlags(SCTAB nTab, ScScenarioFlags &rFlags) const
SC_DLLPUBLIC bool IsActiveScenario(SCTAB nTab) const
void SetPageSize(sal_uInt16 nPageNo, const Size &rSize, bool bUpdateNoteCaptionPos, const ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
bool HasObjectsInRows(SCTAB nTab, SCROW nStartRow, SCROW nEndRow)
static std::unique_ptr< EditTextObject > Clone(const EditTextObject &rSrc, ScDocument &rDestDoc)
bool getRangeData(SCROW nRow, RangeData &rData) const
bool getValue(SCROW nPos, sal_uInt16 &rVal)
virtual Type GetType() const =0
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 & GetArea() const
bool HasMultiMarks(SCCOL nCol) const
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
ScRangeList GetMarkedRanges() const
bool GetTableSelect(SCTAB nTab) const
std::vector< sc::ColRowSpan > GetMarkedColSpans() const
SCCOL GetStartOfEqualColumns(SCCOL nLastCol, SCCOL nMinCol=0) const
SCCOL GetColMerge() const
SCROW GetRowMerge() const
bool IsOverlapped() const
bool Insert(SCCOLROW nStartPos, SCCOLROW nEndPos, bool &rSizeChanged, bool bHidden=false)
sal_uInt32 GetNumberFormat(SvNumberFormatter *) const
ScRotateDir GetRotateDir(const SfxItemSet *pCondSet) const
SfxItemSet & GetItemSet()
Additional class containing cell annotation data.
std::unique_ptr< ScPostIt > Clone(const ScAddress &rOwnPos, ScDocument &rDestDoc, const ScAddress &rDestPos, bool bCloneCaption) const
Clones this note and its caption object, if specified.
bool Intersects(const ScRange &) const
void Join(const ScRange &, bool bIsInList=false)
ScRangeList GetIntersectedRange(const ScRange &rRange) const
bool Intersects(const ScRange &rRange) const
void CopyStyleFrom(SfxStyleSheetBasePool *pSrcPool, const OUString &rName, SfxStyleFamily eFamily, bool bNewStyleHierarchy=false)
std::unique_ptr< ScFlatBoolColSegments > mpHiddenCols
void CopyScenarioFrom(const ScTable *pSrcTab)
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark, bool &rFound) const
void ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
ScRangeName * GetRangeName() const
bool bTableAreaVisibleValid
bool ValidCol(SCCOL nCol) const
void ApplyStyleArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet &rStyle)
sal_uInt16 GetOriginalHeight(SCROW nRow) const
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, bool bShow)
bool IsBlockEditable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
ScRefCellValue GetCellValue(SCCOL nCol, sc::ColumnBlockPosition &rBlockPos, SCROW nRow)
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
void AddCondFormatData(const ScRangeList &rRange, sal_uInt32 nIndex)
bool HasBlockMatrixFragment(const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, bool bNoMatrixAtAll=false) const
sal_uInt32 GetNumberFormat(const ScInterpreterContext &rContext, const ScAddress &rPos) const
void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
std::unique_ptr< ScFlatBoolRowSegments > mpFilteredRows
ScColumnsRange GetAllocatedColumnsRange(SCCOL begin, SCCOL end) const
void ShowRow(SCROW nRow, bool bShow)
void SetAttrEntries(SCCOL nStartCol, SCCOL nEndCol, std::vector< ScAttrEntry > &&vNewData)
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
void CopyStaticToDocument(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScTable *pDestTab)
void ApplyAttr(SCCOL nCol, SCROW nRow, const SfxPoolItem &rAttr)
ScColumnsRange GetColumnsRange(SCCOL begin, SCCOL end) const
ScColumn * FetchColumn(SCCOL nCol)
bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, HasAttrFlags nMask) const
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
void CopyCellToDocument(SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, SCROW nDestRow, ScTable &rDestTab)
void InvalidateTableArea()
void CopyData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab)
void ShowCol(SCCOL nCol, bool bShow)
void SetDrawPageSize(bool bResetStreamValid=true, bool bUpdateNoteCaptionPos=true, const ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
std::unique_ptr< ScDBData > pDBDataNoName
void SetDirty(const ScRange &, ScColumn::BroadcastMode)
std::unique_ptr< ScConditionalFormatList > mpCondFormatList
bool TestCopyScenarioTo(const ScTable *pDestTab) const
void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered)
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
bool HasSelectionMatrixFragment(const ScMarkData &rMark) const
void SetNote(SCCOL nCol, SCROW nRow, std::unique_ptr< ScPostIt > pNote)
const ScStyleSheet * GetAreaStyle(bool &rFound, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
void DeleteRow(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize, bool *pUndoOutline, std::vector< ScAddress > *pGroupPos)
bool IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const
void DetachFormulaCells(sc::EndListeningContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void InvalidatePageBreaks()
bool HasScenarioRange(const ScRange &rRange) const
bool RowHiddenLeaf(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
void TransposeColPatterns(ScTable *pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered, const std::vector< SCROW > &rFilteredRows, SCROW nRowDestOffset)
Transpose clipboard patterns.
void CompileXML(sc::CompileFormulaContext &rCxt, ScProgress &rProgress)
bool IsBlockEmpty(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
::std::set< SCCOL > maColManualBreaks
sal_uInt16 GetColWidth(SCCOL nCol, bool bHiddenAsZero=true) const
void CopyRowFiltered(const ScTable &rTable, SCROW nStartRow, SCROW nEndRow)
sal_uInt16 GetRowHeight(SCROW nRow, SCROW *pStartRow, SCROW *pEndRow, bool bHiddenAsZero=true) const
ScFormulaCell * SetFormulaCell(SCCOL nCol, SCROW nRow, ScFormulaCell *pCell)
Takes ownership of pCell.
void SetColWidthOnly(SCCOL nCol, sal_uInt16 nNewWidth)
void UndoToTable(sc::CopyToDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScTable *pDestTab)
void MixData(sc::MixDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty, const ScTable *pSrcTab)
bool ValidColRow(SCCOL nCol, SCROW nRow) const
std::unique_ptr< ScBitMaskCompressedArray< SCROW, CRFlags > > pRowFlags
sal_uInt16 GetOriginalWidth(SCCOL nCol) const
CommentCaptionState GetAllNoteCaptionsState(const ScRange &rRange, std::vector< sc::NoteEntry > &rNotes)
void RemoveEditTextCharAttribs(SCCOL nCol, SCROW nRow, const ScPatternAttr &rAttr)
void FindMaxRotCol(RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2)
bool SetOutlineTable(const ScOutlineTable *pNewOutline)
OUString GetString(SCCOL nCol, SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
bool HasData(SCCOL nCol, SCROW nRow) const
void RemoveCondFormatData(const ScRangeList &rRange, sal_uInt32 nIndex)
void SetRangeName(std::unique_ptr< ScRangeName > pNew)
sal_uInt16 GetCommonWidth(SCCOL nEndCol) const
void SetRowFlags(SCROW nRow, CRFlags nNewFlags)
void MergeSelectionPattern(ScMergePatternState &rState, const ScMarkData &rMark, bool bDeep) const
const EditTextObject * GetEditText(SCCOL nCol, SCROW nRow) const
const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow) const
ScColumn & CreateColumnIfNotExists(const SCCOL nScCol)
const ScColumnData & ColumnData(SCCOL nCol) const
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
const ScFormulaCell * GetFormulaCell(SCCOL nCol, SCROW nRow) const
bool SetEditText(SCCOL nCol, SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
void TransposeColNotes(ScTable *pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered, SCROW nRowDestOffset)
Transpose clipboard notes.
bool IsColValid(const SCCOL nScCol) const
void CopyUpdated(const ScTable *pPosTab, ScTable *pDestTab) const
std::unique_ptr< ScBitMaskCompressedArray< SCCOL, CRFlags > > mpColFlags
void SetStreamValid(bool bSet, bool bIgnoreLock=false)
void CopyRowHeight(const ScTable &rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset)
SCCOL GetLastChangedColFlagsWidth() const
size_t GetNoteCount(SCCOL nCol) const
bool DeleteSparkline(SCCOL nCol, SCROW nRow)
void CopyScenarioTo(ScTable *pDestTab) const
tools::Long GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, double fScale) const
void SetTableOpDirty(const ScRange &)
bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
void DeleteCol(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool *pUndoOutline)
void ApplyStyle(SCCOL nCol, SCROW nRow, const ScStyleSheet *rStyle)
std::unique_ptr< ScFlatBoolColSegments > mpFilteredCols
tools::Long GetRowOffset(SCROW nRow, bool bHiddenAsZero=true) const
void SetDirtyIfPostponed()
Mark formula cells dirty that have the mbPostponedDirty flag set or contain named ranges with relativ...
void GetUnprotectedCells(ScRangeList &rRangeList) const
bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bRefresh)
void CheckVectorizationState()
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow) const
void SetColWidth(SCCOL nCol, sal_uInt16 nNewWidth)
void SetMergedCells(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool SetFormulaCells(SCCOL nCol, SCROW nRow, std::vector< ScFormulaCell * > &rCells)
ScPostIt * GetNote(SCCOL nCol, SCROW nRow)
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)
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
void CopyConditionalFormat(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCCOL nDx, SCROW nDy, const ScTable *pTable)
void SetRowHeight(SCROW nRow, sal_uInt16 nNewHeight)
void SetPatternAreaCondFormat(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &rAttr, const ScCondFormatIndexes &rCondFormatIndexes)
bool TestInsertRow(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize) const
CRFlags GetColFlags(SCCOL nCol) const
bool CompileErrorCells(sc::CompileFormulaContext &rCxt, FormulaError nErrCode)
bool ColHidden(SCCOL nCol, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
std::unique_ptr< ScRangeList > pScenarioRanges
std::unique_ptr< ScOutlineTable > pOutlineTable
void SetValue(SCCOL nCol, SCROW nRow, const double &rVal)
void MergePatternArea(ScMergePatternState &rState, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bDeep) const
bool RemoveFlags(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags)
tools::Long GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero=true) const
std::unique_ptr< ScPostIt > ReleaseNote(SCCOL nCol, SCROW nRow)
SCROW GetHiddenRowCount(SCROW nRow) const
void StartListeners(sc::StartListeningContext &rCxt, bool bAll)
Either start all formula cells as listeners unconditionally, or start those that are marked "needs li...
void SetNumberFormat(SCCOL nCol, SCROW nRow, sal_uInt32 nNumberFormat)
sal_uInt16 GetTextWidth(SCCOL nCol, SCROW nRow) const
void AttachFormulaCells(sc::StartListeningContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
bool HasStringData(SCCOL nCol, SCROW nRow) const
SCROW GetLastFlaggedRow() const
void SetManualHeight(SCROW nStartRow, SCROW nEndRow, bool bManual)
void SetRawString(SCCOL nCol, SCROW nRow, const svl::SharedString &rStr)
void CompileAll(sc::CompileFormulaContext &rCxt)
OUString GetInputString(SCCOL nCol, SCROW nRow, bool bForceSystemLocale=false) const
bool ContainsNotesInRange(const ScRange &rRange) const
void SetFormula(SCCOL nCol, SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
void GetLastDataPos(SCCOL &rCol, SCROW &rRow) const
void TransposeClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCROW nCombinedStartRow, SCROW nRowDestOffset, ScTable *pTransClip, InsertDeleteFlags nFlags, bool bAsLink, bool bIncludeFiltered)
void BroadcastRecalcOnRefMove()
Broadcast dirty formula cells that contain functions such as CELL(), COLUMN() or ROW() which may chan...
bool HasAttribSelection(const ScMarkData &rMark, HasAttrFlags nMask) const
std::shared_ptr< sc::Sparkline > GetSparkline(SCCOL nCol, SCROW nRow)
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow, SCSIZE nSize) const
bool HasValueData(SCCOL nCol, SCROW nRow) const
ScColumnData aDefaultColData
ScColumnsRange GetWritableColumnsRange(SCCOL begin, SCCOL end)
void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
void CreateAllNoteCaptions()
bool SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight, double nPPTY, bool bApi)
bool BroadcastBroadcasters(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SfxHintId nHint)
Broadcast single broadcasters in range, without explicitly setting anything dirty,...
void InsertRow(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize)
void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
void SetLoadingMedium(bool bLoading)
bool RowHidden(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
void DBShowRow(SCROW nRow, bool bShow)
bool IsEmptyData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
::std::set< SCROW > maRowManualBreaks
sal_uInt16 GetOptimalMinRowHeight() const
void SetAnonymousDBData(std::unique_ptr< ScDBData > pDBData)
std::unique_ptr< ScCompressedArray< SCCOL, sal_uInt16 > > mpColWidth
sc::Sparkline * CreateSparkline(SCCOL nCol, SCROW nRow, std::shared_ptr< sc::SparklineGroup > const &pSparklineGroup)
void CopyFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCCOL nDx, SCROW nDy, ScTable *pTable)
SCCOL GetAllocatedColumnsCount() const
void CopyColFiltered(const ScTable &rTable, SCCOL nStartCol, SCCOL nEndCol)
void CopyToClip(sc::CopyToClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable *pTable)
bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol)
OUString GetFormula(SCCOL nCol, SCROW nRow) const
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet &rBroadcastSpans)
void ResetChanged(const ScRange &rRange)
void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight)
Set specified row height to specified ranges.
void InvalidateScenarioRanges()
CRFlags GetRowFlags(SCROW nRow) const
std::unique_ptr< ScFlatBoolRowSegments > mpHiddenRows
sc::SparklineList maSparklineList
bool RowFiltered(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
svl::SharedString GetSharedString(SCCOL nCol, SCROW nRow) const
bool HasStringCells(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
std::unique_ptr< ScFlatUInt16RowSegments > mpRowHeights
CellType GetCellType(const ScAddress &rPos) const
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
void MixMarked(sc::MixDocContext &rCxt, const ScMarkData &rMark, ScPasteFunc nFunction, bool bSkipEmpty, const ScTable *pSrcTab)
void ForgetNoteCaptions(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bPreserveData)
SCSIZE FillMaxRot(RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2, SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY, const ScPatternAttr *pPattern, const SfxItemSet *pCondSet)
sc::SparklineList & GetSparklineList()
std::unique_ptr< ScRangeName > mpRangeName
ScScenarioFlags nScenarioFlags
const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow) const
bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, bool bApi, ScProgress *pOuterProgress=nullptr, sal_uInt64 nProgressStart=0)
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
void SetCalcNotification(bool bSet)
const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nWhich) const
tools::Long GetColOffset(SCCOL nCol, bool bHiddenAsZero=true) const
SCCOL ClampToAllocatedColumns(SCCOL nCol) const
void SetPattern(const ScAddress &rPos, const ScPatternAttr &rAttr)
void SetColManualBreaks(::std::set< SCCOL > &&rBreaks)
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
bool ApplyFlags(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags)
void CopyColHidden(const ScTable &rTable, SCCOL nStartCol, SCCOL nEndCol)
SCROW GetFirstEditTextRow(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
const ScRangeList * GetScenarioRanges() const
void MarkScenarioIn(ScMarkData &rMark, ScScenarioFlags nNeededBits) const
OUString GetUpperCellString(SCCOL nCol, SCROW nRow)
void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
double GetValue(SCCOL nCol, SCROW nRow) const
void SetSheetEvents(std::unique_ptr< ScSheetEvents > pNew)
void CopyCaptionsToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable *pDestTab, bool bCloneCaption)
bool RefVisible(const ScFormulaCell *pCell)
SCROW GetRowForHeight(tools::Long nHeight) const
Get the last row such that the height of row 0 to the end row is as high as possible without exceedin...
void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
void CopySparklinesToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable *pDestTab)
SCROW GetLastChangedRowFlagsWidth() const
std::unique_ptr< ScTableProtection > pTabProtection
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
bool UpdateOutlineRow(SCROW nStartRow, SCROW nEndRow, bool bShow)
void CopyRowHidden(const ScTable &rTable, SCROW nStartRow, SCROW nEndRow)
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
void GetFirstDataPos(SCCOL &rCol, SCROW &rRow) const
void CalcAfterLoad(sc::CompileFormulaContext &rCxt, bool bStartListening)
void SetRowManualBreaks(::std::set< SCROW > &&rBreaks)
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
SCROW GetNotePosition(SCCOL nCol, size_t nIndex) const
double * GetValueCell(SCCOL nCol, SCROW nRow)
void SetEmptyCell(SCCOL nCol, SCROW nRow)
void InsertCol(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize)
std::unique_ptr< ScSheetEvents > pSheetEvents
bool ValidRow(SCROW nRow) const
void ApplyPatternArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr &rAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
void ApplyPattern(SCCOL nCol, SCROW nRow, const ScPatternAttr &rAttr)
void GetNotesInRange(const ScRange &rRange, std::vector< sc::NoteEntry > &rNotes) const
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
virtual SfxStyleSheetBase * Find(const OUString &, SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
virtual SfxItemSet & GetItemSet()
const editeng::SvxBorderLine * GetTop() const
const editeng::SvxBorderLine * GetLine(SvxBoxItemLine nLine) const
const editeng::SvxBorderLine * GetRight() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)
const editeng::SvxBorderLine * GetLeft() const
sal_Int16 GetDistance(SvxBoxItemLine nLine, bool bAllowNegative=false) const
void SetDistance(sal_Int16 nNew, SvxBoxItemLine nLine)
const editeng::SvxBorderLine * GetBottom() const
Temporarily switch on/off auto calculation mode.
Simple container to keep track of sheet - column pair.
void getColumns(SCTAB nTab, std::vector< SCCOL > &rCols) const
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
InsertDeleteFlags getInsertFlag() const
Holder of a sparkline, that is connected to a cell specific.
std::shared_ptr< Sparkline > const & getSparkline() const
Tracks and gathers all created sparklines and sparkline groups.
Sparkline data, used for rendering the content of a cell.
const std::shared_ptr< const ColumnSet > & getColumnSet() const
@ SPARKLINES
Sheet / outlining (grouping) information.
@ NOTE
Strings (and string results if InsertDeleteFlags::FORMULA is not set).
@ NOCAPTIONS
Sparklines in a cell.
@ OUTLINE
Rich-text attributes.
@ 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.
@ StartListening
If set, cloned formula cells will start to listen to the document.
constexpr sal_Int32 STD_COL_WIDTH
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
if(aStr !=aBuf) UpdateName_Impl(m_xFollowLb.get()
RttiCompleteObjectLocator col
constexpr OUStringLiteral aData
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
CAUTION! The following defines must be in the same namespace as the respective type.
std::pair< CellStoreType::const_iterator, size_t > FindFormula(const CellStoreType &rStore, SCROW nRow1, SCROW nRow2, Func &rFunc)
mdds::mtv::soa::multi_type_vector< CellStoreTraits > CellStoreType
Cell container.
CellStoreType::const_iterator ParseAll(const typename CellStoreType::const_iterator &itPos, const CellStoreType &rCells, SCROW nRow1, SCROW nRow2, FuncElem &rFuncElem, FuncElse &rFuncElse)
@ ConvertToGroupListening
bool IsDefaultItem(const SfxPoolItem *pItem)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr TypedWhichId< ScCondFormatItem > ATTR_CONDITIONAL(154)
Store arbitrary cell value of any kind.
void assign(const ScDocument &rDoc, const ScAddress &rPos)
Take cell value from specified position in specified document.
ScFormulaCell * getFormula() const
void release(ScDocument &rDoc, const ScAddress &rPos)
Set cell value at specified position in specified document.
SvNumberFormatter * GetFormatTable() const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
Store parameters used in the ScDocument::SetString() method.
Single reference (one address) into the sheet.
void InitAddress(const ScAddress &rAdr)
InitAddress: InitFlags and set address.
void SetFlag3D(bool bVal)
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.
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.
static void lcl_SetTransposedPatternInRows(ScTable *pTransClip, SCROW nAttrRow1, SCROW nAttrRow2, SCCOL nCol1, SCROW nRow1, SCROW nCombinedStartRow, SCCOL nCol, const ScPatternAttr &rPatternAttr, bool bIncludeFiltered, const std::vector< SCROW > &rFilteredRows, SCROW nRowDestOffset)
static short DiffSign(T a, T b)
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap