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]);
407 aCol[nStartCol + nSize +
i].MoveTo(nStartRow, nEndRow,
aCol[nStartCol +
i]);
410 std::vector<SCCOL> aRegroupCols;
412 std::for_each(aRegroupCols.begin(), aRegroupCols.end(), ColumnRegroupFormulaCells(
aCol,
nullptr));
431 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
432 aCol[
i].
DeleteArea(nRow1, nRow2, nDelFlag, bBroadcast, pBroadcastSpans);
464 for (
size_t i = 0;
i < aRangeList.
size(); ++
i)
466 const ScRange & rRange = aRangeList[
i];
503 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
529 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
530 pTable->
aCol[
i].RemoveProtected(nRow1, nRow2);
541 for (
size_t i = 0, nListSize = rRanges.
size();
i < nListSize; ++
i )
551 if (nCol1 > nCol2 || nRow1 > nRow2)
555 if (nFirstUnallocated > nCol1)
558 for (
SCCOL i = nCol1;
i < nFirstUnallocated; ++
i)
567 for (
SCCOL i = nFirstUnallocated;
i <= nLastInDest; ++
i)
571 rDestCol.
maCells.set_empty(nRow1, nRow2);
572 for (
SCROW nRow = nRow1; nRow <= nRow2; ++nRow)
576 SvNumberFormatterMergeMap::const_iterator itNum = rMap.find(nNumFmt);
577 if (itNum != rMap.end())
578 nNumFmt = itNum->second;
596 rDestCol.
maCells.set_empty(nDestRow, nDestRow);
598 rDestCol.
maCellNotes.set_empty(nDestRow, nDestRow);
620 for (
size_t i = 0;
i < rNewRangeList.
size(); ++
i)
622 rDstRangeList.
Join(rNewRangeList[i]);
636 ScRange aOldRange( nCol1 - nDx, nRow1 - nDy, pTable->
nTab, nCol2 - nDx, nRow2 - nDy, pTable->
nTab);
642 const ScRangeList& rCondFormatRange = rxCondFormat->GetRange();
647 std::unique_ptr<ScConditionalFormat> pNewFormat = rxCondFormat->
Clone(&
rDocument);
649 pNewFormat->SetRange(aIntersectedRange);
656 pNewFormat->UpdateReference(aRefCxt,
true);
663 bool bDuplicate =
false;
668 if (CheckAndDeduplicateCondFormat(
rDocument, rxCond.get(), pNewFormat.get(),
nTab))
674 if (rxCond->GetKey() > nMax)
675 nMax = rxCond->GetKey();
683 pNewFormat->SetKey(nMax + 1);
684 auto pNewFormatTmp = pNewFormat.get();
689 for(
size_t i = 0,
n = pNewFormatTmp->size();
700 if(!aStyleName.isEmpty())
734 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
737 aCol[
i].CopyFromClip(rCxt, nRow1, nRow2, nDy, pTable->
aCol[
i - nDx]);
743 sal_uInt16 nWhichArray[2];
746 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
747 aCol[
i].ClearItems(nRow1, nRow2, nWhichArray);
761 for (
SCROW j=nRow1; j<=nRow2; j++)
793 bool bSkipEmpty,
const ScTable* pSrcTab )
801class TransClipHandler
811 SCROW mnFilteredRows = 0;
812 SCROW mnRowDestOffset = 0;
815 bool mbIncludeFiltered;
820 return ScAddress(
static_cast<SCCOL>(mnCol1 + nRow - mnTopRow), mnTransRow,
826 ScAddress aSrcPos(mnSrcCol, nSrcRow, mnSrcTab);
832 aArr.AddSingleReference(aRef);
836 void setLink(
size_t nRow)
838 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
840 createRefCell(nRow, getDestPos(nRow)));
845 SCCOL nSrcCol,
size_t nTopRow,
size_t nEndRow,
SCROW nCombinedStartRow,
846 SCROW nRowDestOffset,
bool bAsLink,
bool bWasCut,
848 std::vector<SCROW>& rFilteredRows)
849 : mrClipTab(rClipTab)
856 , mnTransRow(nSrcCol - nCol1 + nCombinedStartRow)
857 , mnRowDestOffset(nRowDestOffset)
860 , mbIncludeFiltered(bIncludeFiltered)
864 if (!mbIncludeFiltered)
866 for (
SCROW curRow = nTopRow; curRow <= static_cast<SCROW>(mnEndRow); ++curRow)
869 bool bFiltered = mrSrcTab.
RowFiltered(curRow,
nullptr,
nullptr);
871 rFilteredRows.push_back(curRow);
876 void operator() (
size_t nRow,
double fVal)
878 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
879 if (!mbIncludeFiltered && bFiltered)
891 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
892 mrClipTab.
SetValue(nTransCol, mnTransRow, fVal);
897 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
898 if (!mbIncludeFiltered && bFiltered)
910 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
916 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
917 if (!mbIncludeFiltered && bFiltered)
929 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
935 bool bFiltered = mrSrcTab.
RowFiltered(nRow,
nullptr,
nullptr);
936 if (!mbIncludeFiltered && bFiltered)
949 getDestPos(nRow - mnFilteredRows + mnRowDestOffset),
958 SCCOL nTransCol = mnCol1 + nRow - mnTopRow - mnFilteredRows + mnRowDestOffset;
963 void operator()(
const int ,
size_t nRow,
size_t nDataSize)
965 for (
size_t curRow = nRow; curRow < nRow + nDataSize; ++curRow)
967 bool bFiltered = mrSrcTab.
RowFiltered(curRow,
nullptr,
nullptr);
968 if (!mbIncludeFiltered && bFiltered)
993 std::vector<SCROW> aFilteredRows;
995 TransClipHandler aFunc(*pTransClip, *
this,
nTab, nCol1, nCol, nRow1, nRow2,
996 nCombinedStartRow, nRowDestOffset, bAsLink, bWasCut, nFlags,
997 bIncludeFiltered, aFilteredRows);
1002 sc::ParseAll(rCells.begin(), rCells, nRow1, nRow2, aFunc,
1008 bIncludeFiltered, aFilteredRows, nRowDestOffset);
1013 bIncludeFiltered, nRowDestOffset);
1020 const std::vector<SCROW>& rFilteredRows,
1021 SCROW nRowDestOffset)
1023 for (
SCROW nRow = nAttrRow1; nRow <= nAttrRow2; nRow++)
1025 size_t nFilteredRowAdjustment = 0;
1026 if (!bIncludeFiltered)
1030 auto itRow1 = std::lower_bound(rFilteredRows.begin(), rFilteredRows.end(), nRow1);
1031 auto itRow = std::lower_bound(rFilteredRows.begin(), rFilteredRows.end(), nRow);
1032 bool bRefRowIsFiltered = itRow != rFilteredRows.end() && *itRow == nRow;
1033 if (bRefRowIsFiltered)
1038 nFilteredRowAdjustment = std::distance(itRow1, itRow);
1042 static_cast<SCCOL>(nCol1 + nRow - nRow1 - nFilteredRowAdjustment + nRowDestOffset),
1043 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), rPatternAttr);
1048 SCROW nRow2,
SCROW nCombinedStartRow,
bool bIncludeFiltered,
1049 const std::vector<SCROW>& rFilteredRows,
SCROW nRowDestOffset)
1051 SCROW nAttrRow1 = {};
1052 SCROW nAttrRow2 = {};
1054 std::unique_ptr<ScAttrIterator> pAttrIter(
aCol[nCol].CreateAttrIterator( nRow1, nRow2 ));
1055 while ( (pPattern = pAttrIter->Next( nAttrRow1, nAttrRow2 )) !=
nullptr )
1067 nCombinedStartRow, nCol, *pPattern,
1068 bIncludeFiltered, rFilteredRows, nRowDestOffset);
1080 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::TOP ), SvxBoxItemLine::LEFT );
1081 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::LEFT ), SvxBoxItemLine::TOP );
1082 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::BOTTOM ), SvxBoxItemLine::RIGHT );
1083 aNew.
SetLine( rOldBox.
GetLine( SvxBoxItemLine::RIGHT ), SvxBoxItemLine::BOTTOM );
1088 rNewSet.
Put( aNew );
1111 nCombinedStartRow, nCol, aNewPattern,
1112 bIncludeFiltered, rFilteredRows, nRowDestOffset);
1119 SCROW nRow2,
SCROW nCombinedStartRow,
bool bIncludeFiltered,
1120 SCROW nRowDestOffset)
1122 sc::CellNoteStoreType::const_iterator itBlk =
aCol[nCol].maCellNotes.
begin(), itBlkEnd =
aCol[nCol].maCellNotes.
end();
1125 size_t nOffsetInBlock = 0;
1126 size_t nBlockStart = 0, nBlockEnd = 0, nRowPos =
static_cast<size_t>(nRow1);
1127 for (; itBlk != itBlkEnd; ++itBlk, nBlockStart = nBlockEnd)
1129 nBlockEnd = nBlockStart + itBlk->size;
1130 if (nBlockStart <= nRowPos && nRowPos < nBlockEnd)
1133 nOffsetInBlock = nRowPos - nBlockStart;
1138 if (itBlk == itBlkEnd)
1142 nRowPos =
static_cast<size_t>(nRow2);
1143 SCCOL nFilteredRows = 0;
1146 sc::cellnote_block::const_iterator itData, itDataEnd;
1147 for (; itBlk != itBlkEnd; ++itBlk, nBlockStart = nBlockEnd, nOffsetInBlock = 0)
1149 nBlockEnd = nBlockStart + itBlk->size;
1153 itData = sc::cellnote_block::begin(*itBlk->data);
1154 std::advance(itData, nOffsetInBlock);
1157 if (nBlockStart <= nRowPos && nRowPos < nBlockEnd)
1160 size_t nOffsetEnd = nRowPos - nBlockStart + 1;
1161 itDataEnd = sc::cellnote_block::begin(*itBlk->data);
1162 std::advance(itDataEnd, nOffsetEnd);
1163 size_t curRow = nBlockStart + nOffsetInBlock;
1164 for (; itData != itDataEnd; ++itData, ++curRow)
1166 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1167 if (!bIncludeFiltered && bFiltered)
1174 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1175 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1188 itDataEnd = sc::cellnote_block::end(*itBlk->data);
1189 size_t curRow = nBlockStart + nOffsetInBlock;
1190 for (; itData != itDataEnd; ++itData, ++curRow)
1192 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1193 if (!bIncludeFiltered && bFiltered)
1200 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1201 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1214 for (
size_t curRow = nBlockStart + nOffsetInBlock;
1215 curRow <= nBlockEnd && curRow <= nRowPos; ++curRow)
1217 bool bFiltered = this->
RowFiltered(curRow,
nullptr,
nullptr);
1218 if (!bIncludeFiltered && bFiltered && curRow < nBlockEnd)
1225 static_cast<SCCOL>(nCol1 + curRow - nRow1 - nFilteredRows + nRowDestOffset),
1226 static_cast<SCROW>(nCombinedStartRow + nCol - nCol1), pTransClip->
nTab);
1251 std::shared_ptr<const sc::ColumnSet> pColSet = rCxt.
getColumnSet();
1257 else if (pColSet->hasTab(
nTab))
1259 std::vector<SCCOL> aColumns;
1260 pColSet->getColumns(
nTab, aColumns);
1261 for (
auto i : aColumns)
1264 aCol[
i].StartListeners(rCxt, bAll);
1273 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
1281 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
1292 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1304 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1311 bool bAsLink,
bool bColRowFlags,
bool bGlobalNamesToLocal,
bool bCopyCaptions )
1342 aCol[
i].CopyToColumn(rCxt, nRow1, nRow2, bToUndoDoc ? nFlags : nTempFlags, bMarked,
1360 pNewDBData->GetArea(aTab, aCol1, aRow1, aCol2, aRow2);
1361 pNewDBData->MoveTo(pDestTab->
nTab, aCol1, aRow1, aCol2, aRow2);
1367 bool bFlagChange =
false;
1372 if (bWidth || bHeight)
1376 auto destTabColWidthIt = pDestTab->
mpColWidth->begin() + nCol1;
1377 auto thisTabColWidthIt =
mpColWidth->begin() + nCol1;
1380 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1383 bool bHiddenChange = (pDestTab->
ColHidden(
i) != bThisHidden);
1384 bool bChange = bHiddenChange || (*destTabColWidthIt != *thisTabColWidthIt);
1387 if (bHiddenChange && pCharts)
1393 ++destTabColWidthIt;
1394 ++thisTabColWidthIt;
1410 for (
SCROW i = nRow1;
i <= nRow2; ++
i)
1413 bool bHidden =
RowHidden(
i,
nullptr, &nLastRow);
1414 if (nLastRow >= nRow2)
1418 bool bHiddenChanged = pDestTab->
SetRowHidden(
i, nLastRow, bHidden);
1419 if (bHiddenChanged && pCharts)
1431 for (
SCROW i = nRow1;
i <= nRow2; ++
i)
1435 if (nLastRow >= nRow2)
1475 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1482 bool bCloneCaption )
1488 for (
SCCOL i = nCol1;
i <= nCol2;
i++)
1491 pDestTab->
aCol[
i].UpdateNoteCaptions(nRow1, nRow2);
1523 if (
i >= nCol1 &&
i <= nCol2 )
1524 aCol[
i].UndoToColumn(rCxt, nRow1, nRow2, nFlags, bMarked, rDestCol);
1532 if (!(bWidth||bHeight))
1567 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1575 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1585 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1596 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1606 for (
size_t j = 0,
n = pList->
size(); j <
n; j++ )
1608 const ScRange & rR = (*pList)[j];
1624 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1638 OSL_ENSURE(
bScenario,
"bScenario == FALSE" );
1690 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1693 SCROW nThisFirst = -1;
1694 if (
const_cast<ScColumn&
>(rCol).HasEditCells(nRow1, nRow2, nThisFirst))
1696 if (nThisFirst == nRow1)
1699 if (nThisFirst < nFirst)
1700 nFirst = nThisFirst;
1712 aCol[nCol].Delete(nRow);
1757 return aCol[nCol].GetSharedString(nRow);
1775 return aCol[nCol].GetString( nRow, pContext );
1791 return aCol[nCol].GetInputString( nRow, bForceSystemLocale );
1799 return aCol[nCol].GetValue( nRow );
1808 return aCol[nCol].GetEditText(nRow);
1816 return aCol[nCol].RemoveEditTextCharAttribs(nRow, rAttr);
1822 return aCol[nCol].GetFormula( nRow );
1832 return aCol[nCol].GetFormulaCell(nRow);
1840 return aCol[nCol].GetFormulaCell(nRow);
1848 return std::shared_ptr<sc::Sparkline>();
1851 if (!pSparklineCell)
1852 return std::shared_ptr<sc::Sparkline>();
1864 std::shared_ptr<sc::Sparkline> pSparkline(
new sc::Sparkline(nCol, nRow, pSparklineGroup));
1867 return pSparkline.get();
1875 aCol[nCol].DeleteSparkline(nRow);
1892 return aCol[nCol].ReleaseNote(nRow);
1899 return aCol[nCol].GetCellNote(nRow);
1915 return aCol[nCol].GetNoteCount();
1937 for (
SCCOL i = nCol1;
i <= nCol2; ++
i)
1954 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1962 bool bIsFirstNoteShownState =
true;
1963 bool bFirstControl =
true;
1972 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1973 bIsFirstNoteShownState = rNotes.
begin()->mpNote->IsCaptionShown();
1974 bFirstControl =
false;
1979 aCol[nCol].GetNotesInRange(nStartRow, nEndRow, rNotes);
1981 bool bIsMixedState = std::any_of(rNotes.begin(), rNotes.end(), [bIsFirstNoteShownState](
const sc::NoteEntry& rNote) {
1983 return bIsFirstNoteShownState != rNote.mpNote->IsCaptionShown(); });
1993 for (
auto const & pCol :
aCol)
2004 bool bContainsNote = !
aCol[nCol].IsNotesEmptyBlock(nStartRow, nEndRow);
2015 return aCol[nCol].GetCellType( nRow );
2024 return aCol[nCol].GetCellValue(nRow);
2032 return aCol[nCol].GetCellValue(rBlockPos, nRow);
2039 while (rCol < (
aCol.
size() - 1) &&
aCol[rCol].IsEmptyData() )
2042 while (nCol <
aCol.
size() && rRow > 0)
2064 return aCol[nCol].HasDataAt( nRow );
2072 return aCol[nCol].HasStringData( nRow );
2080 return aCol[nCol].HasValueData( nRow );
2091 for (
SCCOL nCol = nStartCol; nCol <= nEndCol; nCol++)
2135 aCol[
i].SetTableOpDirty( rRange );
2162 bool bBroadcasted =
false;
2165 for (
SCCOL nCol = nCol1; nCol <= nCol2; ++nCol)
2167 return bBroadcasted;
2199 aCol[
i].CompileXML(rCxt, rProgress);
2208 bool bCompiled =
false;
2231 for (
SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
2295 for(
SCCOL nCol = nCol1; nCol <= nCol2 && nCol <
aCol.
size(); ++nCol )
2314 for (
SCCOLROW j = aSpan.mnStart; j <= aSpan.mnEnd; ++j)
2329 OSL_FAIL(
"ScTable::ExtendMerge: invalid column number");
2334 bool bFound =
false;
2336 SCROW nOldEndY = rEndRow;
2337 for (
SCCOL i=nStartCol;
i<=nOldEndX;
i++)
2338 bFound |=
aCol[
i].
ExtendMerge(
i, nStartRow, nOldEndY, rEndCol, rEndRow, bRefresh );
2353 if (nCol1 < nCol2 && nRow1 < nRow2)
2361 OSL_FAIL(
"ScTable::IsBlockEmpty: invalid column number");
2366 for (
SCCOL i=nCol1;
i<=nCol2 && bEmpty;
i++)
2368 bEmpty =
aCol[
i].IsEmptyData( nRow1, nRow2 );
2371 bEmpty =
aCol[
i].IsSparklinesEmptyBlock(nRow1, nRow2);
2375 bEmpty =
aCol[
i].IsNotesEmptyBlock(nRow1, nRow2);
2393 else if ( nCol > nX2+1 )
2398 double nFactor = 0.0;
2403 double nRealOrient =
toRadians(nRotVal);
2404 double nCos = cos( nRealOrient );
2405 double nSin = sin( nRealOrient );
2411 nFactor = -fabs( nCos / nSin );
2414 for (
SCROW nRow = nAttrRow1; nRow <= nAttrRow2; nRow++ )
2418 bool bHitOne =
true;
2423 SCCOL nTouchedCol = nCol;
2425 OSL_ENSURE(nWidth <= 0,
"Wrong direction");
2426 while ( nWidth < 0 && nTouchedCol > 0 )
2431 if ( nTouchedCol > nX2 )
2437 while ( nArrY<nArrCount && pRowInfo[nArrY].nRowNo < nRow )
2439 if ( nArrY<nArrCount && pRowInfo[nArrY].nRowNo == nRow )
2454 OSL_FAIL(
"Row/column info missing" );
2470 SCROW nAttrRow1, nAttrRow2;
2483 for(
const auto& rItem : rCondFormatData)
2488 size_t nEntryCount = pFormat->
size();
2489 for (
size_t nEntry=0; nEntry<nEntryCount; nEntry++)
2497 if (!aStyleName.isEmpty())
2500 pStylePool->
Find( aStyleName, SfxStyleFamily::Para );
2504 nCol, nAttrRow1, nAttrRow2,
2505 nArrY, pPattern, &pStyleSheet->
GetItemSet() );
2515 nArrY =
FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
2516 nCol, nAttrRow1, nAttrRow2,
2517 nArrY, pPattern,
nullptr );
2519 pPattern = aIter.
GetNext( nAttrCol, nAttrRow1, nAttrRow2 );
2526 bool bNoMatrixAtAll )
const
2533 const SCCOL nMaxCol2 = std::min<SCCOL>( nCol2,
aCol.
size() - 1 );
2537 if ( nCol1 == nMaxCol2 )
2540 nEdges =
aCol[nCol1].GetBlockMatrixEdges( nRow1, nRow2,
n, bNoMatrixAtAll );
2541 if ((nEdges != MatrixEdge::Nothing) && (((nEdges &
n)!=
n) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2547 if ((nEdges != MatrixEdge::Nothing) && ((!(nEdges &
MatrixEdge::Left)) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2551 if ((nEdges != MatrixEdge::Nothing) && ((!(nEdges &
MatrixEdge::Right)) || (nEdges & (MatrixEdge::Inside|MatrixEdge::Open))))
2557 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2559 nEdges =
aCol[
i].GetBlockMatrixEdges( nRow1, nRow2, MatrixEdge::Nothing, bNoMatrixAtAll);
2560 if (nEdges != MatrixEdge::Nothing
2565 else if ( nRow1 == nRow2 )
2568 const MatrixEdge n = MatrixEdge::Bottom | MatrixEdge::Top;
2569 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2571 nEdges =
aCol[
i].GetBlockMatrixEdges( nRow1, nRow1,
n, bNoMatrixAtAll );
2572 if (nEdges != MatrixEdge::Nothing)
2574 if ( (nEdges &
n) !=
n )
2593 for ( j=0,
n = MatrixEdge::Top, nR=nRow1; j<2;
2594 j++,
n = MatrixEdge::Bottom, nR=nRow2)
2597 for (
SCCOL i=nCol1;
i<=nMaxCol2;
i++)
2599 nEdges =
aCol[
i].GetBlockMatrixEdges( nR, nR,
n, bNoMatrixAtAll );
2600 if ( nEdges != MatrixEdge::Nothing)
2604 if ( (nEdges &
n) !=
n )
2629 for (
SCCOLROW j=aSpan.mnStart; j<=nEndCol; j++ )
2639 SCROW nRow2,
bool* pOnlyNotBecauseOfMatrix ,
2640 bool bNoMatrixAtAll )
const
2644 SAL_WARN(
"sc",
"IsBlockEditable: invalid column or row " << nCol2 <<
" " << nRow2);
2645 if (pOnlyNotBecauseOfMatrix)
2646 *pOnlyNotBecauseOfMatrix =
false;
2650 bool bIsEditable =
true;
2652 bIsEditable =
false;
2668 sal_uInt16 nScenTab =
nTab+1;
2671 ScRange aEditRange(nCol1, nRow1, nScenTab, nCol2, nRow2, nScenTab);
2708 bIsEditable =
false;
2709 if ( pOnlyNotBecauseOfMatrix )
2710 *pOnlyNotBecauseOfMatrix =
true;
2712 else if ( pOnlyNotBecauseOfMatrix )
2713 *pOnlyNotBecauseOfMatrix =
false;
2715 else if ( pOnlyNotBecauseOfMatrix )
2716 *pOnlyNotBecauseOfMatrix =
false;
2721 bool* pOnlyNotBecauseOfMatrix )
const
2723 bool bIsEditable =
true;
2725 bIsEditable =
false;
2747 for (
size_t i=0, nRange = aRanges.
size(); (
i < nRange) && bIsEditable;
i++ )
2749 const ScRange & rRange = aRanges[
i ];
2776 for (
size_t i = 0, nRange = aRanges.
size(); (
i < nRange) && bIsEditable;
i++)
2778 const ScRange & rRange = aRanges[
i ];
2792 bIsEditable =
false;
2793 if ( pOnlyNotBecauseOfMatrix )
2794 *pOnlyNotBecauseOfMatrix =
true;
2796 else if ( pOnlyNotBecauseOfMatrix )
2797 *pOnlyNotBecauseOfMatrix =
false;
2799 else if ( pOnlyNotBecauseOfMatrix )
2800 *pOnlyNotBecauseOfMatrix =
false;
2815 OSL_FAIL(
"UnlockTable without LockTable");
2826 for (
SCCOL i = rSpan.mnStart;
i <= maxCol; ++
i)
2828 aCol[
i].MergeSelectionPattern( rState, rMark, bDeep );
2837 for (
SCCOL i=nCol1;
i<=nEndCol;
i++)
2839 if (nEndCol != nCol2)
2851 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++)
2853 nStartRow, nEndRow, (
i==nStartCol), nEndCol-
i );
2865 for (
SCCOL i=nStartCol;
i<=nEndCol;
i++)
2867 nStartRow, nEndRow, (
i==nStartCol), nEndCol-
i);
2879 bool*
const pIsChanged )
2885 SCCOL maxCol = nEndCol;
2886 if( nEndCol ==
GetDoc().MaxCol())
2889 maxCol = std::max( nStartCol,
aCol.
size()) - 1;
2894 for (
SCCOL i = nStartCol;
i <= maxCol;
i++)
2900 std::vector<ScAttrEntry> duplicateScAttrEntries(
ScDocument& rDocument,
const std::vector<ScAttrEntry>& rOrigData)
2902 std::vector<ScAttrEntry>
aData(rOrigData);
2903 for (
size_t nIdx = 0; nIdx <
aData.size(); ++nIdx)
2905 aData[nIdx].pPattern = &rDocument.
GetPool()->
Put(*aData[nIdx].pPattern);
2921 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
2934 for (
SCCOL i = nStartCol;
i < nEndCol;
i++)
2936 aCol[nEndCol].SetAttrEntries( std::move(vNewData));
2946 for (
SCCOL nCol = rRange.
aStart.
Col(); nCol <= nEndCol; nCol++ )
2948 aCol[nCol].ApplyPatternIfNumberformatIncompatible( rRange, rPattern, nNewType );
2954 size_t n = rRangeList.
size();
2955 for(
size_t i = 0;
i <
n; ++
i)
2957 const ScRange & rRange = rRangeList[
i];
2962 for(
SCCOL nCol = nColStart; nCol <= nColEnd; ++nCol)
2971 size_t n = rRangeList.
size();
2972 for(
size_t i = 0;
i <
n; ++
i)
2974 const ScRange & rRange = rRangeList[
i];
2979 for(
SCCOL nCol = nColStart; nCol <= nColEnd; ++nCol)
2981 aCol[nCol].RemoveCondFormat(nRowStart, nRowEnd,
nIndex);
2991 for (
const auto& rIndex : rCondFormatIndexes)
3023 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3036 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3048 const ::editeng::SvxBorderLine* pLine,
bool bColorOnly )
3050 if ( bColorOnly && !pLine )
3077 pNewStyle =
aCol[
i].GetSelectionStyle( rMark, bColFound );
3081 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
3087 return bEqual ? pStyle :
nullptr;
3101 for (
SCCOL i=nCol1;
i<=nCol2 && bEqual;
i++)
3103 pNewStyle =
aCol[
i].GetAreaStyle(bColFound, nRow1, nRow2);
3107 if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) )
3113 return bEqual ? pStyle :
nullptr;
3118 bool bIsUsed =
false;
3138 aCol[
i].FindStyleSheet(pStyleSheet, aUsedRows, bRemoved);
3160 bool bChanged =
false;
3162 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3172 bool bChanged =
false;
3174 for (
SCCOL i = nStartCol;
i <= nEndCol;
i++)
3209 SCCOL lastChangeCol;
3214 if( lastChangeCol >= 0 )
3224 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3232 SCCOL lastChangeCol;
3237 if( lastChangeCol >= 0 )
3247 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3255 SCCOL lastChangeCol;
3260 if( lastChangeCol >= 0 )
3270 for (
SCCOL i=0;
i <= lastChangeCol;
i++)
3285 if ( nNewWidth !=
mpColWidth->GetValue(nCol) )
3293 OSL_FAIL(
"Invalid column number or no widths");
3315 OSL_FAIL(
"SetRowHeight: Row height zero");
3320 if ( nNewHeight != nOldHeight )
3328 OSL_FAIL(
"Invalid row number or no heights");
3338bool lcl_pixelSizeChanged(
3340 sal_uInt16 nNewHeight,
double nPPTY,
bool bApi)
3345 for (
SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
3348 if (!aFwdIter.getValue(nRow, nHeight))
3351 if (nHeight != nNewHeight)
3357 bool bChanged = (nNewPix != nOldPix) && (bApi || nEndRow - nStartRow > 0 || nNewPix > nOldPix);
3363 nRow = aFwdIter.getLastPos();
3371 double nPPTY,
bool bApi )
3373 bool bChanged =
false;
3378 OSL_FAIL(
"SetRowHeight: Row height zero");
3382 bool bSingle =
false;
3392 nNewHeight ==
aData.mnValue && nEndRow <=
aData.mnRow2)
3399 if (!bSingle || nEndRow - nStartRow < 20)
3401 bChanged = lcl_pixelSizeChanged(*
mpRowHeights, nStartRow, nEndRow, nNewHeight,
nPPTY, bApi);
3403 mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
3407 SCROW nMid = (nStartRow + nEndRow) / 2;
3420 OSL_FAIL(
"Invalid row number or no heights");
3434 mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
3448 OSL_FAIL(
"Invalid row number or no column flags");
3454 OSL_ENSURE(
ValidCol(nCol),
"wrong column number");
3473 bool bHidden =
false;
3474 SCCOL nLastHiddenCol = -1;
3475 auto colWidthIt =
mpColWidth->begin() + nStartCol;
3476 for (
SCCOL nCol = nStartCol; nCol <= nEndCol; (++nCol <= nEndCol) ? ++colWidthIt : (
void)
false)
3478 if (nCol > nLastHiddenCol)
3479 bHidden =
ColHidden(nCol,
nullptr, &nLastHiddenCol);
3491 OSL_ENSURE(
ValidCol(nCol),
"wrong column number");
3494 return mpColWidth->GetValue(nCol);
3505 OSL_FAIL(
"wrong column");
3509 sal_uInt16 nMaxWidth = 0;
3510 sal_uInt16 nMaxCount = 0;
3511 SCCOL nRangeStart = 0;
3512 while ( nRangeStart <= nEndCol )
3515 while ( nRangeStart <= nEndCol &&
ColHidden(nRangeStart) )
3517 if ( nRangeStart <= nEndCol )
3519 sal_uInt16 nThisCount = 0;
3520 auto colWidthIt =
mpColWidth->begin() + nRangeStart;
3521 sal_uInt16 nThisWidth = *colWidthIt;
3522 SCCOL nRangeEnd = nRangeStart;
3523 while ( nRangeEnd <= nEndCol && *colWidthIt == nThisWidth )
3530 while ( nRangeEnd <= nEndCol &&
ColHidden(nRangeEnd) )
3537 if ( nThisCount > nMaxCount )
3539 nMaxCount = nThisCount;
3540 nMaxWidth = nThisWidth;
3543 nRangeStart = nRangeEnd;
3556 if (bHiddenAsZero &&
RowHidden( nRow, pStartRow, pEndRow))
3576 *pStartRow = (bHiddenAsZero ? std::max( *pStartRow,
aData.mnRow1) :
aData.mnRow1);
3578 *pEndRow = (bHiddenAsZero ? std::min( *pEndRow,
aData.mnRow2) :
aData.mnRow2);
3579 return aData.mnValue;
3599 SCROW nRow = nStartRow;
3600 while (nRow <= nEndRow)
3602 SCROW nLastRow = -1;
3603 if (!( (
RowHidden(nRow,
nullptr, &nLastRow) ) && bHiddenAsZero ) )
3605 if (nLastRow > nEndRow)
3609 nRow = nLastRow + 1;
3624 SCROW nRow = nStartRow;
3625 while (nRow <= nEndRow)
3627 SCROW nLastRow = -1;
3628 if (!
RowHidden(nRow,
nullptr, &nLastRow))
3630 if (nLastRow > nEndRow)
3635 while (nRow <= nLastRow)
3638 if (!aSegmentIter.
getValue(nRow, nRowVal))
3645 nHeight += nOneHeight * ( nSegmentEnd + 1 - nRow );
3647 nRow = nSegmentEnd + 1;
3650 nRow = nLastRow + 1;
3660 OSL_ENSURE(
ValidRow(nRow),
"wrong row number");
3662 if (
ValidRow(nRow) && mpRowHeights)
3663 return mpRowHeights->getValue(nRow);
3675 SCROW nLastRow = -1;
3679 return nLastRow - nRow + 1;
3689 if (bWasVis != bShow)
3700 OSL_FAIL(
"Invalid column number or no flags");
3709 if (bWasVis != bShow)
3723 OSL_FAIL(
"Invalid row number or no flags");
3749 OSL_FAIL(
"Invalid row number or no flags");
3755 SCROW nStartRow = nRow1;
3756 while (nStartRow <= nRow2)
3759 bool bWasVis = !
RowHiddenLeaf(nStartRow,
nullptr, &nEndRow);
3760 if (nEndRow > nRow2)
3763 bool bChanged = ( bWasVis != bShow );
3775 nStartRow = nEndRow + 1;
3787 SCROW nStartRow = nRow1;
3793 while (nStartRow <= nRow2)
3796 bool bWasVis = !
RowHiddenLeaf(nStartRow,
nullptr, &nEndRow);
3797 if (nEndRow > nRow2)
3800 bool bChanged = ( bWasVis != bShow );
3815 nStartRow = nEndRow + 1;
3829 assert(nColStart <= nColEnd && nRowStart <= nRowEnd
3830 &&
"range must be normalized to obtain a valid result");
3831 for (
SCROW i = nRowStart;
i <= nRowEnd; ++
i)
3836 for (
SCCOL i = nColStart;
i <= nColEnd; ++
i)
3857 OSL_FAIL(
"Invalid row number or no flags");
3864 pRowFlags->SetValue( nStartRow, nEndRow, nNewFlags);
3867 OSL_FAIL(
"Invalid row number(s) or no flags");
3889 SCROW nLastFound = 0;
3904 nLastFound = ::std::max(nLastFound, nRow);
3911 nLastFound = ::std::max(nLastFound, nRow);
3922 SCCOL nLastFound = 0;
3945 return std::max( nLastFlags, nLastHeight);
3952 return pOutlineTable->GetColArray().ManualAction( nStartCol, nEndCol, bShow, *
this,
true );
3961 return pOutlineTable->GetRowArray().ManualAction( nStartRow, nEndRow, bShow, *
this,
false );
4009 if (
ValidRow(nStartRow) && nStartRow >= rY1)
4024template<
typename T >
4033class OutlineArrayFinder
4043 maRef(rRef),
mnCol(nCol), mnTab(nTab),
mpArray(pArray),
4044 mbSizeChanged(bSizeChanged) {}
4068 typedef mdds::flat_segment_tree<SCROW, bool> UsedRowsType;
4070 bool bSizeChanged =
false;
4084 for (nCol=nStartCol; nCol<=nEndCol; nCol++)
4085 aCol[nCol].FindUsed(nStartRow, nEndRow, aUsed);
4089 for (nRow=nStartRow; nRow<=nEndRow; nRow++)
4092 SCROW nLastRow = nRow;
4093 aUsed.search_tree(nRow, bUsed,
nullptr, &nLastRow);
4101 for (nCol=nStartCol; nCol<=nEndCol && !bFound; nCol++)
4126 for (nCol=nStartCol; nCol<=nEndCol; nCol++)
4131 OutlineArrayFinder aFunc(aRef, nCol,
nTab, &rColArray, bSizeChanged);
4144 ScAddress aDest( nDestCol, nDestRow, nDestTab );
4145 ScRange aRange( aSrc, aDest );
4146 bool bThisTab = ( nDestTab ==
nTab );
4147 SCROW nDestY = nDestRow;
4148 for (
SCROW nRow=nStartRow; nRow<=nEndRow; nRow++)
4152 SCCOL nDestX = nDestCol;
4153 for (
SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++)
4200 nEndRow = ::std::numeric_limits<SCROW>::max();
4224 const sal_Int64 nMax = ::std::numeric_limits<tools::Long>::max();
4243 if (bResetStreamValid)
4270 return GetRowHeight(0,
nullptr,
nullptr, bHiddenAsZero );
4273#if OSL_DEBUG_LEVEL > 0
4274 if (
n == ::std::numeric_limits<tools::Long>::max())
4275 OSL_FAIL(
"ScTable::GetRowOffset: row heights overflow");
4280 OSL_FAIL(
"GetRowOffset: Data missing");
4292 aRowHeightRange.
mnRow2 = -1;
4304 nRow =
aData.mnRow2;
4308 if (aRowHeightRange.
mnRow2 < nRow)
4310 if (!
mpRowHeights->getRangeData(nRow, aRowHeightRange))
4317 assert (nLastCommon >= nRow);
4318 SCROW nCommon = nLastCommon - nRow + 1;
4325 if (nCommonPixels > nPixelsLeft)
4327 nRow += (nPixelsLeft + aRowHeightRange.
mnValue - 1) / aRowHeightRange.
mnValue;
4340 nRow =
aData.mnRow2 + 1;
4346 nSum += nCommonPixels;
4358 for (
SCCOL i = 0;
i < nCol; (++
i < nCol) ? ++colWidthIt : (
void)
false)
4364 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 sal_uInt16 nStdRowHeight
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