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)