28 #include <osl/diagnose.h>
33 #include <document.hxx>
36 #include <stlsheet.hxx>
37 #include <stlpool.hxx>
39 #include <globstr.hrc>
48 using ::editeng::SvxBorderLine;
55 if (
nCol == -1 || !pDefaultColAttrArray || pDefaultColAttrArray->
mvData.empty() )
61 for (
size_t nIdx = 0; nIdx < pDefaultColAttrArray->
mvData.size(); ++nIdx )
63 mvData[nIdx].nEndRow = pDefaultColAttrArray->
mvData[nIdx].nEndRow;
66 bool bNumFormatChanged =
false;
79 #if DEBUG_SC_TESTATTRARRAY
84 for (
auto const & rEntry :
mvData)
85 pDocPool->
Remove(*rEntry.pPattern);
88 #if DEBUG_SC_TESTATTRARRAY
89 void ScAttrArray::TestData()
const
94 for (nPos=0; nPos<
nCount; nPos++)
105 SAL_WARN_IF( nErr,
"sc", nErr <<
" errors in attribute array, column " <<
nCol );
115 mvData.reserve( nNewLimit );
133 bool bNumFormatChanged;
142 pDocPool->
Remove(*pOldPattern);
151 mvData[0].pPattern = pNewPattern;
170 if (nPos + 1 <
mvData.size())
217 if (
mvData[i].nEndRow < nRow)
222 else if ((i > 0) && (
mvData[i - 1].nEndRow >= nRow))
230 nIndex=
static_cast<SCSIZE>(i);
249 return mvData[i].pPattern;
266 if (
Search( nRow, nIndex ) )
269 rStartRow =
mvData[nIndex-1].nEndRow + 1;
272 rEndRow =
mvData[nIndex].nEndRow;
273 return mvData[nIndex].pPattern;
283 if(nEndRow < nStartRow)
286 SCROW nTempStartRow = nStartRow;
287 SCROW nTempEndRow = nEndRow;
293 std::unique_ptr<ScPatternAttr> pNewPattern;
297 SCROW nPatternStartRow;
298 SCROW nPatternEndRow;
301 nTempEndRow = std::min<SCROW>( nPatternEndRow, nEndRow );
305 if (rCondFormatData.
find(nIndex) == rCondFormatData.
end())
308 aNewCondFormatData.
reserve(rCondFormatData.
size()+1);
309 aNewCondFormatData = rCondFormatData;
310 aNewCondFormatData.
insert(nIndex);
312 pNewPattern->GetItemSet().Put( aItem );
318 pNewPattern->GetItemSet().Put( aItem );
325 pNewPattern->GetItemSet().Put( aItem );
326 nTempEndRow = nEndRow;
329 SetPatternArea( nTempStartRow, nTempEndRow, std::move(pNewPattern),
true );
330 nTempStartRow = nTempEndRow + 1;
332 while(nTempEndRow < nEndRow);
341 if(nEndRow < nStartRow)
344 SCROW nTempStartRow = nStartRow;
345 SCROW nTempEndRow = nEndRow;
353 SCROW nPatternStartRow;
354 SCROW nPatternEndRow;
357 nTempEndRow = std::min<SCROW>( nPatternEndRow, nEndRow );
360 auto pPatternAttr = std::make_unique<ScPatternAttr>( *pPattern );
364 pPatternAttr->GetItemSet().Put( aItem );
365 SetPatternArea( nTempStartRow, nTempEndRow, std::move(pPatternAttr),
true );
370 auto itr = rCondFormatData.
find(nIndex);
371 if(itr != rCondFormatData.
end())
374 aNewCondFormatData.
erase_at(std::distance(rCondFormatData.
begin(), itr));
376 pPatternAttr->GetItemSet().Put( aItem );
377 SetPatternArea( nTempStartRow, nTempEndRow, std::move(pPatternAttr),
true );
387 nTempStartRow = nTempEndRow + 1;
389 while(nTempEndRow < nEndRow);
396 assert(
nCol != -1 );
400 for (
SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
407 std::unique_ptr<EditTextObject> pOldData;
418 pDataArray->
AddItem(
nTab,
nCol, nRow, std::move(pOldData), std::move(pNewData));
425 if (
mvData.empty() && nReserve )
433 }
catch (std::bad_alloc
const &) {
437 else if (
mvData.capacity() < nReserve )
442 }
catch (std::bad_alloc
const &) {
457 if (bPassingOwnership)
458 pPattern = &
rDocument.
GetPool()->
Put(std::unique_ptr<ScPatternAttr>(const_cast<ScPatternAttr*>(pPattern)));
479 Search( nStartRow, nIndex );
485 ns =
mvData[ni-1].nEndRow+1;
492 while ( ns <= nEndRow )
494 if (
nCol != -1 && !bIsLoading )
498 bool bNumFormatChanged;
502 aAdrStart.
SetRow( std::max(nStartRow,ns) );
503 aAdrEnd .
SetRow( std::min(nEndRow,
mvData[nx].nEndRow) );
507 ns =
mvData[nx].nEndRow + 1;
514 bool bCombined =
false;
519 if (
mvData[ni].pPattern != pPattern )
521 if ( ni == 0 || (
mvData[ni-1].nEndRow < nStartRow - 1) )
524 if (
mvData[ni].nEndRow > nEndRow )
529 else if (
mvData[ni - 1].nEndRow == nStartRow - 1)
532 if ( ni > 0 &&
mvData[ni-1].pPattern == pPattern )
534 mvData[ni-1].nEndRow = nEndRow;
543 while ( nj <
mvData.size() &&
mvData[nj].nEndRow <= nEndRow )
547 if ( nj <
mvData.size() &&
mvData[nj].pPattern == pPattern )
551 if (
mvData[ni-1].pPattern == pPattern )
556 else if ( ni == nInsert )
557 mvData[ni-1].nEndRow = nStartRow - 1;
562 else if ( ni > 0 && ni == nInsert )
563 mvData[ni-1].nEndRow = nStartRow - 1;
572 for (
SCSIZE nk=ni; nk<nj; nk++)
578 mvData[ni].nEndRow = nEndRow;
579 mvData[ni].pPattern = pPattern;
591 if ( nInsert <=
mvData.size() )
602 mvData[nInsert-1].nEndRow = nStartRow - 1;
603 mvData[nInsert].nEndRow = nEndRow;
604 mvData[nInsert].pPattern = pPattern;
608 if (pDataArray &&
nCol != -1)
616 #if DEBUG_SC_TESTATTRARRAY
630 if (!
Search( nStartRow, nPos ))
632 OSL_FAIL(
"Search Failure");
642 std::unique_ptr<ScPatternAttr> pNewPattern(
new ScPatternAttr(*pOldPattern));
643 pNewPattern->SetStyleSheet(const_cast<ScStyleSheet*>(&rStyle));
646 nStart =
mvData[nPos].nEndRow + 1;
648 if ( *pNewPattern == *pOldPattern )
654 else if ( nY1 < nStartRow || nY2 > nEndRow )
656 if (nY1 < nStartRow) nY1=nStartRow;
657 if (nY2 > nEndRow) nY2=nEndRow;
667 const SfxItemSet& rNewSet = pNewPattern->GetItemSet();
670 bool bNumFormatChanged;
674 aAdrStart.
SetRow( nPos ?
mvData[nPos-1].nEndRow+1 : 0 );
688 while ((nStart <= nEndRow) && (nPos <
mvData.size()));
692 #if DEBUG_SC_TESTATTRARRAY
702 const_cast<SvxBorderLine*
>(dest)->SetColor(c);
706 static void SetLine(
const SvxBorderLine* dest,
const SvxBorderLine* src)
710 SvxBorderLine* pCast =
const_cast<SvxBorderLine*
>(dest);
711 pCast->SetBorderLineStyle( src->GetBorderLineStyle() );
712 pCast->SetWidth( src->GetWidth() );
717 const SvxBorderLine* pLine,
bool bColorOnly )
719 if ( bColorOnly && !pLine )
728 if (!
Search( nStartRow, nPos ))
730 OSL_FAIL(
"Search failure");
742 if ( pBoxItem || pTLBRItem || pBLTRItem )
744 std::unique_ptr<ScPatternAttr> pNewPattern(
new ScPatternAttr(*pOldPattern));
745 SfxItemSet& rNewSet = pNewPattern->GetItemSet();
749 std::unique_ptr<SvxBoxItem> pNewBoxItem( pBoxItem ? pBoxItem->
Clone() :
nullptr);
750 std::unique_ptr<SvxLineItem> pNewTLBRItem( pTLBRItem ? pTLBRItem->
Clone() :
nullptr);
751 std::unique_ptr<SvxLineItem> pNewBLTRItem(pBLTRItem ? pBLTRItem->
Clone() :
nullptr);
759 if ( pNewBoxItem->GetTop() ) pNewBoxItem->SetLine(
nullptr, SvxBoxItemLine::TOP );
760 if ( pNewBoxItem->GetBottom() ) pNewBoxItem->SetLine(
nullptr, SvxBoxItemLine::BOTTOM );
761 if ( pNewBoxItem->GetLeft() ) pNewBoxItem->SetLine(
nullptr, SvxBoxItemLine::LEFT );
762 if ( pNewBoxItem->GetRight() ) pNewBoxItem->SetLine(
nullptr, SvxBoxItemLine::RIGHT );
764 if( pNewTLBRItem && pNewTLBRItem->GetLine() )
765 pNewTLBRItem->SetLine(
nullptr );
766 if( pNewBLTRItem && pNewBLTRItem->GetLine() )
767 pNewBLTRItem->SetLine(
nullptr );
773 Color aColor( pLine->GetColor() );
790 SetLine( pNewBoxItem->GetTop(), pLine );
791 SetLine( pNewBoxItem->GetBottom(), pLine );
792 SetLine( pNewBoxItem->GetLeft(), pLine );
793 SetLine( pNewBoxItem->GetRight(), pLine );
796 SetLine( pNewTLBRItem->GetLine(), pLine );
798 SetLine( pNewBLTRItem->GetLine(), pLine );
801 if( pNewBoxItem ) rNewSet.
Put( *pNewBoxItem );
802 if( pNewTLBRItem ) rNewSet.
Put( *pNewTLBRItem );
803 if( pNewBLTRItem ) rNewSet.
Put( *pNewBLTRItem );
805 nStart =
mvData[nPos].nEndRow + 1;
807 if ( nY1 < nStartRow || nY2 > nEndRow )
809 if (nY1 < nStartRow) nY1=nStartRow;
810 if (nY2 > nEndRow) nY2=nEndRow;
829 nStart =
mvData[nPos].nEndRow + 1;
833 while ((nStart <= nEndRow) && (nPos <
mvData.size()));
838 #if DEBUG_SC_TESTATTRARRAY
848 if (!
Search( nStartRow, nPos ))
850 OSL_FAIL(
"Search Failure");
861 if (pNewPattern != pOldPattern)
865 nStart =
mvData[nPos].nEndRow + 1;
870 if ( nY1 < nStartRow || nY2 > nEndRow )
872 if (nY1 < nStartRow) nY1=nStartRow;
873 if (nY2 > nEndRow) nY2=nEndRow;
886 bool bNumFormatChanged;
890 aAdrStart.
SetRow( nPos ?
mvData[nPos-1].nEndRow+1 : 0 );
897 mvData[nPos].pPattern = pNewPattern;
906 nStart =
mvData[nPos].nEndRow + 1;
910 while (nStart <= nEndRow);
914 #if DEBUG_SC_TESTATTRARRAY
922 for (
auto const & rEntry :
mvData)
923 pDocPool->
Remove(*rEntry.pPattern);
925 mvData = std::move(vNewData);
928 SCROW lastEndRow = -1;
929 for(
const auto& entry : mvData)
931 assert(entry.nEndRow > lastEndRow);
932 lastEndRow = entry.nEndRow;
946 if ( eOldState == SfxItemState::DEFAULT )
949 if ( eNewState == SfxItemState::SET )
955 else if ( eOldState == SfxItemState::SET )
958 if ( eNewState == SfxItemState::SET )
960 if ( pNewItem != pOldItem )
983 OSL_FAIL(
"Search failure");
992 pPattern =
mvData[nPos].pPattern;
995 if ( pPattern != rState.
pOld1 && pPattern != rState.
pOld2 )
1004 rState.
pItemSet->MergeValues( rThisSet );
1010 rState.
pItemSet->Set( rThisSet, bDeep );
1015 rState.
pOld1 = pPattern;
1019 nStart =
mvData[nPos].nEndRow + 1;
1024 while (nStart <= nEndRow);
1029 static bool lcl_TestAttr(
const SvxBorderLine* pOldLine,
const SvxBorderLine* pNewLine,
1030 sal_uInt8& rModified,
const SvxBorderLine*& rpNew )
1042 if (pOldLine == pNewLine)
1048 if (pOldLine && pNewLine)
1049 if (*pOldLine == *pNewLine)
1062 bool bLeft,
SCCOL nDistRight,
bool bTop,
SCROW nDistBottom )
1072 const SvxBorderLine* pLeftAttr = pCellFrame->
GetLeft();
1073 const SvxBorderLine* pRightAttr = pCellFrame->
GetRight();
1074 const SvxBorderLine* pTopAttr = pCellFrame->
GetTop();
1075 const SvxBorderLine* pBottomAttr = pCellFrame->
GetBottom();
1076 const SvxBorderLine* pNew;
1081 pLineOuter->
SetLine( pNew, SvxBoxItemLine::TOP );
1086 pLineInner->
SetLine( pNew, SvxBoxInfoItemLine::HORI );
1089 if (nDistBottom == 0)
1092 pLineOuter->
SetLine( pNew, SvxBoxItemLine::BOTTOM );
1097 pLineInner->
SetLine( pNew, SvxBoxInfoItemLine::HORI );
1103 pLineOuter->
SetLine( pNew, SvxBoxItemLine::LEFT );
1108 pLineInner->
SetLine( pNew, SvxBoxInfoItemLine::VERT );
1111 if (nDistRight == 0)
1114 pLineOuter->
SetLine( pNew, SvxBoxItemLine::RIGHT );
1119 pLineInner->
SetLine( pNew, SvxBoxInfoItemLine::VERT );
1129 if (nStartRow == nEndRow)
1132 lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight,
true, 0 );
1134 else if ( !
mvData.empty() )
1137 lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight,
true,
1138 nEndRow-nStartRow );
1142 Search( nStartRow+1, nStartIndex );
1143 Search( nEndRow-1, nEndIndex );
1144 for (
SCSIZE i=nStartIndex;
i<=nEndIndex;
i++)
1146 pPattern =
mvData[
i].pPattern;
1147 lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight,
false,
1148 nEndRow - std::min(
mvData[
i].nEndRow, static_cast<SCROW>(nEndRow-1) ) );
1153 lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight,
false, 0 );
1168 bool bLeft,
SCCOL nDistRight,
bool bTop,
SCROW nDistBottom )
1170 OSL_ENSURE( pBoxItem && pBoxInfoItem,
"Missing line attributes!" );
1187 if( bLeft && nDistRight==0)
1189 if ( pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::LEFT) )
1191 if ( pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::RIGHT) )
1196 if ( (nDistRight==0) ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::LEFT) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::VERT) )
1198 SvxBoxItemLine::RIGHT );
1199 if ( bLeft ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::RIGHT) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::VERT) )
1201 SvxBoxItemLine::LEFT );
1206 if ( bLeft ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::LEFT) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::VERT) )
1208 SvxBoxItemLine::LEFT );
1209 if ( (nDistRight==0) ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::RIGHT) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::VERT) )
1211 SvxBoxItemLine::RIGHT );
1213 if ( bTop ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::TOP) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::HORI) )
1215 SvxBoxItemLine::TOP );
1216 if ( (nDistBottom==0) ? pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::BOTTOM) : pBoxInfoItem->
IsValid(SvxBoxInfoItemValidFlags::HORI) )
1218 SvxBoxItemLine::BOTTOM );
1220 if (aNewFrame == *pOldFrame)
1237 if (nStartRow == nEndRow)
1238 ApplyFrame(&rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight,
true, 0);
1239 else if ( !
mvData.empty() )
1241 ApplyFrame(&rLineOuter, pLineInner, nStartRow, nStartRow, bLeft, nDistRight,
1242 true, nEndRow-nStartRow);
1244 if ( nEndRow > nStartRow+1 )
1248 Search( nStartRow+1, nStartIndex );
1249 Search( nEndRow-1, nEndIndex );
1250 SCROW nTmpStart = nStartRow+1;
1252 for (
SCSIZE i=nStartIndex;
i<=nEndIndex;)
1254 nTmpEnd = std::min( static_cast<SCROW>(nEndRow-1),
mvData[
i].nEndRow );
1255 bool bChanged =
ApplyFrame(&rLineOuter, pLineInner, nTmpStart, nTmpEnd,
1256 bLeft, nDistRight,
false, nEndRow - nTmpEnd);
1257 nTmpStart = nTmpEnd+1;
1261 Search(nEndRow-1, nEndIndex);
1268 ApplyFrame(&rLineOuter, pLineInner, nEndRow, nEndRow, bLeft, nDistRight,
false, 0);
1272 ApplyFrame(&rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight,
true, 0);
1278 bool bFound =
false;
1304 if ( pShadow->
GetLocation() != SvxShadowLocation::NONE )
1315 bool bFoundTemp =
false;
1319 bool bContainsCondFormat = !
mvData.empty() &&
1321 if ( bContainsCondFormat &&
nCol != -1 )
1323 SCROW nRowStartCond = std::max<SCROW>( nRow1, i ?
mvData[i-1].nEndRow + 1: 0 );
1324 SCROW nRowEndCond = std::min<SCROW>( nRow2,
mvData[i].nEndRow );
1325 bool bFoundCond =
false;
1326 for(
SCROW nRowCond = nRowStartCond; nRowCond <= nRowEndCond && !bFoundCond; ++nRowCond)
1344 bFoundCond = bFoundTemp;
1347 bFoundTemp = bFoundCond;
1359 if ( nAngle && nAngle != 9000_deg100 && nAngle != 27000_deg100 )
1381 if ( eLoc == SvxShadowLocation::TopRight || eLoc == SvxShadowLocation::BottomRight )
1384 if ( eLoc == SvxShadowLocation::BottomLeft || eLoc == SvxShadowLocation::BottomRight )
1391 if ( eHorJust == SvxCellHorJustify::Right || eHorJust == SvxCellHorJustify::Center )
1408 Search( nRow1, nStartIndex );
1410 Search( nRow2, nEndIndex );
1412 nEndIndex = nStartIndex;
1413 bool bFound =
false;
1415 for (
SCSIZE i=nStartIndex;
i<=nEndIndex && !bFound;
i++)
1438 *nStartRow = nIndex > 0 ?
mvData[nIndex-1].nEndRow+1 : 0;
1440 *nEndRow =
mvData[nIndex].nEndRow;
1466 assert(
nCol != -1 );
1472 Search( nStartRow, nStartIndex );
1473 Search( nEndRow, nEndIndex );
1474 bool bFound =
false;
1476 for (
SCSIZE i=nStartIndex;
i<=nEndIndex;
i++)
1478 pPattern =
mvData[
i].pPattern;
1482 if (nCountX>1 || nCountY>1)
1485 SCCOL nMergeEndCol = nThisCol + nCountX - 1;
1486 SCROW nMergeEndRow = nThisRow + nCountY - 1;
1488 rPaintCol = nMergeEndCol;
1490 rPaintRow = nMergeEndRow;
1495 if ( nMergeEndCol > nThisCol )
1498 if ( nMergeEndRow > nThisRow )
1501 if ( nMergeEndCol > nThisCol && nMergeEndRow > nThisRow )
1506 Search( nStartRow, nStartIndex );
1507 Search( nEndRow, nEndIndex );
1517 assert(
nCol != -1 );
1523 Search( nStartRow, nIndex );
1524 SCROW nThisStart = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1525 if (nThisStart < nStartRow)
1526 nThisStart = nStartRow;
1528 while ( nThisStart <= nEndRow )
1531 if (nThisEnd > nEndRow)
1534 pPattern =
mvData[nIndex].pPattern;
1538 if (nCountX>1 || nCountY>1)
1543 OSL_ENSURE( nCountY==1 || nThisStart==nThisEnd,
"What's up?" );
1546 SCCOL nMergeEndCol = nThisCol + nCountX - 1;
1547 SCROW nMergeEndRow = nThisEnd + nCountY - 1;
1550 for (
SCROW nThisRow = nThisStart; nThisRow <= nThisEnd; nThisRow++)
1554 SfxItemSet* pSet = &aNewPattern.GetItemSet();
1555 pSet->
Put( *pFlagAttr );
1557 nTab, aNewPattern );
1559 Search( nThisEnd, nIndex );
1563 if ( nIndex <
mvData.size() )
1564 nThisStart =
mvData[nIndex-1].nEndRow+1;
1580 bool bFirstUse =
true;
1582 Search( nStartRow, nIndex );
1583 nThisRow = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1584 while ( nThisRow <= nEndRow )
1586 pOldPattern =
mvData[nIndex].pPattern;
1587 if (pOldPattern != pWantedPattern)
1589 if (nThisRow < nStartRow) nThisRow = nStartRow;
1590 nRow =
mvData[nIndex].nEndRow;
1591 SCROW nAttrRow = std::min( nRow, nEndRow );
1600 std::unique_ptr<ScPatternAttr> pNewPattern(
new ScPatternAttr( *pWantedPattern ));
1601 pNewPattern->GetItemSet().Put( *pItem );
1602 SetPatternArea( nThisRow, nAttrRow, std::move(pNewPattern),
true );
1617 Search( nThisRow, nIndex );
1621 nThisRow =
mvData[nIndex-1].nEndRow+1;
1634 bool bChanged =
false;
1636 Search( nStartRow, nIndex );
1637 nThisRow = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1638 if (nThisRow < nStartRow) nThisRow = nStartRow;
1640 while ( nThisRow <= nEndRow )
1642 pOldPattern =
mvData[nIndex].pPattern;
1644 if ( (nOldValue | nFlags) != nOldValue )
1646 nRow =
mvData[nIndex].nEndRow;
1647 SCROW nAttrRow = std::min( nRow, nEndRow );
1648 auto pNewPattern = std::make_unique<ScPatternAttr>(*pOldPattern);
1649 pNewPattern->GetItemSet().Put(
ScMergeFlagAttr( nOldValue | nFlags ) );
1650 SetPatternArea( nThisRow, nAttrRow, std::move(pNewPattern),
true );
1651 Search( nThisRow, nIndex );
1656 nThisRow =
mvData[nIndex-1].nEndRow+1;
1671 bool bChanged =
false;
1673 Search( nStartRow, nIndex );
1674 nThisRow = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1675 if (nThisRow < nStartRow) nThisRow = nStartRow;
1677 while ( nThisRow <= nEndRow )
1679 pOldPattern =
mvData[nIndex].pPattern;
1681 if ( (nOldValue & ~nFlags) != nOldValue )
1683 nRow =
mvData[nIndex].nEndRow;
1684 SCROW nAttrRow = std::min( nRow, nEndRow );
1685 auto pNewPattern = std::make_unique<ScPatternAttr>(*pOldPattern);
1686 pNewPattern->GetItemSet().Put(
ScMergeFlagAttr( nOldValue & ~nFlags ) );
1687 SetPatternArea( nThisRow, nAttrRow, std::move(pNewPattern),
true );
1688 Search( nThisRow, nIndex );
1693 nThisRow =
mvData[nIndex-1].nEndRow+1;
1706 Search( nStartRow, nIndex );
1707 nThisRow = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1708 if (nThisRow < nStartRow) nThisRow = nStartRow;
1710 while ( nThisRow <= nEndRow )
1715 auto pNewPattern = std::make_unique<ScPatternAttr>(*pOldPattern);
1716 pNewPattern->ClearItems( pWhich );
1718 nRow =
mvData[nIndex].nEndRow;
1719 SCROW nAttrRow = std::min( nRow, nEndRow );
1720 SetPatternArea( nThisRow, nAttrRow, std::move(pNewPattern),
true );
1721 Search( nThisRow, nIndex );
1725 nThisRow =
mvData[nIndex-1].nEndRow+1;
1733 Search( nStartRow, nIndex );
1734 SCROW nThisStart = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
1735 if (nThisStart < nStartRow) nThisStart = nStartRow;
1737 while ( nThisStart <= nEndRow )
1744 || (pItem->GetValue() != SvxCellHorJustify::Left &&
1745 pItem->GetValue() != SvxCellHorJustify::Right );
1747 sal_uInt16 nNewValue = nOldValue;
1762 if ( nNewValue > 0 )
1771 if ( bNeedJust || nNewValue != nOldValue )
1774 SCROW nAttrRow = std::min( nThisEnd, nEndRow );
1775 auto pNewPattern = std::make_unique<ScPatternAttr>(*pOldPattern);
1776 pNewPattern->GetItemSet().Put(
ScIndentItem( nNewValue ) );
1778 pNewPattern->GetItemSet().Put(
1780 SetPatternArea( nThisStart, nAttrRow, std::move(pNewPattern),
true );
1782 nThisStart = nThisEnd + 1;
1783 Search( nThisStart, nIndex );
1787 nThisStart =
mvData[nIndex].nEndRow + 1;
1808 while (
mvData[nIndex].pPattern->
1816 nRet =
mvData[nIndex].nEndRow;
1820 nRet =
mvData[nIndex].nEndRow+1;
1822 if (nIndex >=
mvData.size())
1835 while (nPos <
mvData.size())
1838 if (
mvData[nPos].pPattern->GetStyleSheet() == pStyleSheet)
1840 rUsedRows.
setTrue(nStart, nEnd);
1848 Find(
ScResId(STR_STYLENAME_STANDARD),
1849 SfxStyleFamily::Para,
1850 SfxStyleSearchBits::Auto | SfxStyleSearchBits::ScStandard ) ) );
1873 if ( pStyle == &rStyle )
1879 bool bIsUsed =
false;
1882 while ( nPos <
mvData.size() )
1888 if ( pStyle == &rStyle )
1917 bool bFound =
false;
1924 while ( nVisStart <
mvData.size() &&
mvData[nVisStart].pPattern->IsVisibleEqual(*
mvData[nVisStart-1].pPattern) )
1926 if ( nVisStart >=
mvData.size() ||
mvData[nVisStart-1].nEndRow > 0 )
1929 while ( nStart <
mvData.size() && !bFound )
1931 if (
mvData[nStart].pPattern->IsVisible() )
1933 rFirstRow = nStart ? (
mvData[nStart-1].nEndRow + 1 ) : 0;
1952 rLastRow = nLastData;
1969 SCROW nStartRow = (nPos ?
mvData[nPos-1].nEndRow + 1 : 0);
1970 if (nStartRow <= nLastData + 1)
1974 rLastRow = nLastData;
1979 bool bFound =
false;
1980 Search( nLastData, nPos );
1981 while ( nPos <
mvData.size() )
1985 while ( nEndPos <
mvData.size()-1 &&
1986 mvData[nEndPos].pPattern->IsVisibleEqual( *
mvData[nEndPos+1].pPattern))
1988 SCROW nAttrStartRow = ( nPos > 0 ) ? (
mvData[nPos-1].nEndRow + 1 ) : 0;
1989 if ( nAttrStartRow <= nLastData )
1990 nAttrStartRow = nLastData + 1;
1991 SCROW nAttrSize =
mvData[nEndPos].nEndRow + 1 - nAttrStartRow;
1992 if ( nAttrSize >= SC_VISATTR_STOP )
1994 else if (
mvData[nEndPos].pPattern->IsVisible() )
1996 rLastRow =
mvData[nEndPos].nEndRow;
2011 Search( nStartRow, nIndex );
2012 SCROW nThisStart = nStartRow;
2013 bool bFound =
false;
2014 while ( nIndex <
mvData.size() && nThisStart <= nEndRow && !bFound )
2016 if (
mvData[nIndex].pPattern->IsVisible() )
2019 nThisStart =
mvData[nIndex].nEndRow + 1;
2033 return ( pDefPattern1 == pDefPattern2 || pDefPattern1->
IsVisibleEqual( *pDefPattern2 ) );
2039 bool bDefNonDefCase =
false;
2042 pNonDefault = &rOther;
2044 bDefNonDefCase =
true;
2050 bDefNonDefCase =
true;
2053 if ( bDefNonDefCase )
2057 if ( nStartRow > 0 )
2058 pNonDefault->
Search( nStartRow, nPos );
2060 while ( nPos < pNonDefault->
Count() && bEqual )
2063 bEqual = ( pNonDefPattern == pDefPattern ||
2066 if ( pNonDefault->
mvData[nPos].nEndRow >= nEndRow )
break;
2076 if ( nStartRow > 0 )
2078 Search( nStartRow, nThisPos );
2079 rOther.
Search( nStartRow, nOtherPos );
2082 while ( nThisPos<
mvData.size() && nOtherPos<rOther.
Count() && bEqual )
2085 SCROW nOtherRow = rOther.
mvData[nOtherPos].nEndRow;
2088 bEqual = ( pThisPattern == pOtherPattern ||
2091 if ( nThisRow >= nOtherRow )
2093 if ( nOtherRow >= nEndRow )
break;
2096 if ( nThisRow <= nOtherRow )
2098 if ( nThisRow >= nEndRow )
break;
2113 return ( pDefPattern1 == pDefPattern2 );
2119 bool bDefNonDefCase =
false;
2122 pNonDefault = &rOther;
2124 bDefNonDefCase =
true;
2130 bDefNonDefCase =
true;
2133 if ( bDefNonDefCase )
2137 if ( nStartRow > 0 )
2138 pNonDefault->
Search( nStartRow, nPos );
2140 while ( nPos < pNonDefault->
Count() && bEqual )
2143 bEqual = ( pNonDefPattern == pDefPattern );
2145 if ( pNonDefault->
mvData[nPos].nEndRow >= nEndRow )
break;
2155 if ( nStartRow > 0 )
2157 Search( nStartRow, nThisPos );
2158 rOther.
Search( nStartRow, nOtherPos );
2161 while ( nThisPos<
mvData.size() && nOtherPos<rOther.
Count() && bEqual )
2164 SCROW nOtherRow = rOther.
mvData[nOtherPos].nEndRow;
2167 bEqual = ( pThisPattern == pOtherPattern );
2169 if ( nThisRow >= nOtherRow )
2171 if ( nOtherRow >= nEndRow )
break;
2174 if ( nThisRow <= nOtherRow )
2176 if ( nThisRow >= nEndRow )
break;
2193 if ( nStartRow > 0 )
2194 Search( nStartRow, nIndex );
2196 for ( ; nIndex <
mvData.size(); nIndex++ )
2198 if (
mvData[nIndex].pPattern->
2204 if (
mvData[nIndex].nEndRow >= nEndRow )
2222 while ( nFirstLost &&
mvData[nFirstLost-1].nEndRow >= sal::static_int_cast<SCROW>(
rDocument.
MaxRow() + 1 - nSize) )
2225 return !
mvData[nFirstLost].pPattern->
2233 SCROW nSearch = nStartRow > 0 ? nStartRow - 1 : 0;
2235 Search( nSearch, nIndex );
2241 assert( !bDoMerge ||
nCol != -1 );
2245 for (i = nIndex; i <
mvData.size()-1; i++)
2254 mvData[i].nEndRow = nNew;
2259 if (nRemove && nRemove <
mvData.size())
2267 for (
SCSIZE nAdd=0; nAdd<nSize; nAdd++)
2286 for ( i = 0; i <
mvData.size()-1; i++)
2287 if (
mvData[i].nEndRow >= nStartRow &&
mvData[i].nEndRow <= sal::static_int_cast<SCROW>(nStartRow+nSize-1))
2302 nStart =
mvData[nStartIndex-1].nEndRow + 1;
2304 if (nStart < nStartRow)
2306 mvData[nStartIndex].nEndRow = nStartRow - 1;
2309 if (nEndIndex >= nStartIndex)
2312 if (nStartIndex > 0)
2313 if (
mvData[nStartIndex-1].pPattern ==
mvData[nStartIndex].pPattern )
2317 for (i = 0; i <
mvData.size()-1; i++)
2318 if (
mvData[i].nEndRow >= nStartRow)
2319 mvData[i].nEndRow -= nSize;
2330 for (
SCSIZE i = nStartIndex;
i <= nEndIndex;
i++)
2357 Search( nStartRow, nIndex );
2358 nThisRow = (nIndex>0) ?
mvData[nIndex-1].nEndRow+1 : 0;
2359 if (nThisRow < nStartRow) nThisRow = nStartRow;
2361 while ( nThisRow <= nEndRow )
2367 nRow =
mvData[nIndex].nEndRow;
2368 SCROW nAttrRow = std::min( nRow, nEndRow );
2370 auto pNewPattern = std::make_unique<ScPatternAttr>(*pOldPattern);
2371 SfxItemSet& rSet = pNewPattern->GetItemSet();
2376 if ( *pNewPattern == *pDefPattern )
2379 SetPatternArea( nThisRow, nAttrRow, std::move(pNewPattern),
true );
2381 Search( nThisRow, nIndex );
2385 nThisRow =
mvData[nIndex-1].nEndRow+1;
2395 SCROW nStart = nStartRow;
2398 if ((
mvData[
i].nEndRow >= nStartRow) && (
i == 0 ||
mvData[
i-1].nEndRow < nEndRow))
2404 nStart = std::max( nStart,
mvData[
i].nEndRow + 1 );
2418 SCROW nDestStart = std::max(static_cast<tools::Long>(static_cast<tools::Long>(nStartRow) + nDy),
tools::Long(0));
2423 bool bSamePool = (pSourceDocPool==pDestDocPool);
2432 for (
SCSIZE i = 0; (
i <
mvData.size()) && (nDestStart <= nDestEnd);
i++)
2434 if (
mvData[
i].nEndRow >= nStartRow)
2458 pNewPattern = &pDestDocPool->
Put(aTmpPattern);
2465 pNewPattern = &pDestDocPool->
Put(*pOldPattern);
2471 std::min(static_cast<SCROW>(
mvData[
i].nEndRow + nDy), nDestEnd), pNewPattern);
2476 nDestStart = std::max(static_cast<tools::Long>(nDestStart), static_cast<tools::Long>(
mvData[
i].nEndRow + nDy + 1));
2489 SCROW nDestStart = std::max(static_cast<tools::Long>(static_cast<tools::Long>(nStartRow) + nDy),
tools::Long(0));
2494 CopyArea( nStartRow+nDy, nEndRow+nDy, nDy, rAttrArray );
2500 bool bSamePool = (pSourceDocPool==pDestDocPool);
2515 for (
SCSIZE i = 0; (
i <
mvData.size()) && (nDestStart <= nDestEnd);
i++)
2517 if (
mvData[
i].nEndRow >= nStartRow)
2523 pNewPattern = &pDestDocPool->
Put(*pOldPattern);
2528 std::min(static_cast<SCROW>(
mvData[
i].nEndRow + nDy), nDestEnd), pNewPattern,
false);
2533 nDestStart = std::max(static_cast<tools::Long>(nDestStart), static_cast<tools::Long>(
mvData[
i].nEndRow + nDy + 1));
2541 bool bFound =
false;
2563 while (nIndex <
mvData.size() && !bFound)
2570 SCROW nStart = nIndex ?
mvData[nIndex-1].nEndRow+1 : 0;
2571 if (nRow >= nStart && nRow <=
mvData[nIndex].nEndRow)
2590 nRow =
mvData[nIndex].nEndRow;
2591 pPattern =
mvData[nIndex].pPattern;
2596 nRow =
mvData[nIndex].nEndRow+1;
2598 if (nIndex<
mvData.size())
2599 pPattern =
mvData[nIndex].pPattern;
2604 OSL_ENSURE( bFound || !
rDocument.
ValidRow(nRow),
"Internal failure in ScAttrArray::SearchStyle" );
2625 if (nMarkEnd>rEndRow)
2635 if (nMarkEnd<rEndRow)
2644 Search(nStartRow,nIndex);
2650 rEndRow =
mvData[nIndex-1].nEndRow + 1;
2656 if (nMarkEnd>rEndRow)
2662 rEndRow =
mvData[nIndex].nEndRow;
2666 if (nMarkEnd<rEndRow)
2684 if( !
Search( nStartRow, nIndex1 ) )
2687 if( !
Search( nEndRow, nIndex2 ) )
2688 nIndex2 =
mvData.size() - 1;
2690 return nIndex2 - nIndex1 + 1;
bool IsVisibleEqual(const ScAttrArray &rOther, SCROW nStartRow, SCROW nEndRow) const
void DeleteRange(SCSIZE nStartIndex, SCSIZE nEndIndex)
static void lcl_MergeToFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, const ScPatternAttr *pPattern, bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom)
SCCOL GetColMerge() const
bool TestInsertRow(SCSIZE nSize) const
sal_uInt64 GetKey() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
constexpr TypedWhichId< ScPatternAttr > ATTR_PATTERN(156)
OUString ScResId(TranslateId aId)
bool RemoveFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
constexpr TypedWhichId< SvxBoxItem > ATTR_BORDER(150)
constexpr sal_uInt16 ATTR_PATTERN_START(100)
bool ExtendMerge(SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
Area around any given summaries expand and adapt any MergeFlag (bRefresh)
void InsertRow(SCROW nStartRow, SCSIZE nSize)
bool IsMerged(SCROW nRow) const
static void SetLine(const SvxBorderLine *dest, const SvxBorderLine *src)
bool Reserve(SCSIZE nReserve)
const editeng::SvxBorderLine * GetVert() const
bool IsOverlapped() const
SC_DLLPUBLIC bool ApplyFlagsTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, ScMF nFlags)
SC_DLLPUBLIC bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCTAB nTab, SCCOL nCol)
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
const WhichRangesContainer & GetRanges() const
void InvalidateItem(sal_uInt16 nWhich)
Store position data for column array storage.
bool HasItemsSet(const sal_uInt16 *pWhich) const
void erase_at(size_t index)
const_iterator find(const Value &x) const
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
void SetUsage(ScStyleSheet::Usage eUse) const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
constexpr TypedWhichId< ScProtectionAttr > ATTR_PROTECTION(149)
ScAttrArray(const ScAttrArray &)=delete
void Remove(const SfxPoolItem &)
SC_DLLPUBLIC void ApplyAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, const SfxPoolItem &rAttr)
const editeng::SvxBorderLine * GetRight() const
void SetPatternAreaSafe(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pWantedPattern, bool bDefault)
void SetDefaultIfNotInit(SCSIZE nNeeded=1)
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
const SfxSetItem & ApplyTo(const SfxSetItem &rSetItem)
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
constexpr TypedWhichId< ScIndentItem > ATTR_INDENT(131)
SC_DLLPUBLIC ScDocumentPool * GetPool()
void SetAttrEntries(std::vector< ScAttrEntry > &&vNewData)
void DeleteRow(SCROW nStartRow, SCSIZE nSize)
constexpr TypedWhichId< ScRotateValueItem > ATTR_ROTATE_VALUE(135)
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
bool HasVisibleAttrIn(SCROW nStartRow, SCROW nEndRow) const
SvxShadowLocation GetLocation() const
virtual SvxLineItem * Clone(SfxItemPool *pPool=nullptr) const override
const EditTextObject * mpEditText
void DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
SC_DLLPUBLIC SCROW MaxRow() const
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 ...
constexpr TypedWhichId< SvxShadowItem > ATTR_SHADOW(152)
This is a rather odd datastructure.
bool setTrue(SCROW nRow1, SCROW nRow2)
void reserve(size_type amount)
bool SearchStyleRange(SCROW &rRow, SCROW &rEndRow, const ScStyleSheet *pSearchStyle, bool bUp, const ScMarkArray *pMarkArray=nullptr) const
void CopyAreaSafe(SCROW nStartRow, SCROW nEndRow, tools::Long nDy, ScAttrArray &rAttrArray)
Leave flags summarized with CopyArea.
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow) const
bool Search(SCROW nRow, SCSIZE &nIndex) const
const SfxPoolItem & GetItem(sal_uInt16 nWhichP) const
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_TLBR(141)
std::vector< ScAttrEntry > mvData
const editeng::SvxBorderLine * GetHori() const
void MergePatternArea(SCROW nStartRow, SCROW nEndRow, ScMergePatternState &rState, bool bDeep) const
const editeng::SvxBorderLine * GetTop() const
SC_DLLPUBLIC SCCOL MaxCol() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const editeng::SvxBorderLine * GetLeft() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void ApplyCacheArea(SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache *pCache, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
const SCROW SC_VISATTR_STOP
static bool lcl_TestAttr(const SvxBorderLine *pOldLine, const SvxBorderLine *pNewLine, sal_uInt8 &rModified, const SvxBorderLine *&rpNew)
void ClearItems(SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
void CopyArea(SCROW nStartRow, SCROW nEndRow, tools::Long nDy, ScAttrArray &rAttrArray, ScMF nStripFlags=ScMF::NONE) const
Copy between documents (Clipboard)
void ApplyStyleArea(SCROW nStartRow, SCROW nEndRow, const ScStyleSheet &rStyle)
const ScStyleSheet * GetStyleSheet() const
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxInfoItemLine nLine)
SfxItemSet & GetItemSet()
SCROW GetMarkEnd(SCROW nRow, bool bUp) const
SC_DLLPUBLIC void ApplyPatternAreaTab(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab, const ScPatternAttr &rAttr)
bool HasAttrib_Impl(const ScPatternAttr *pPattern, HasAttrFlags nMask, SCROW nRow1, SCROW nRow2, SCSIZE i) const
SCROW SearchStyle(SCROW nRow, const ScStyleSheet *pSearchStyle, bool bUp, const ScMarkArray *pMarkArray=nullptr) const
May return -1 if not found.
virtual SvxBoxItem * Clone(SfxItemPool *pPool=nullptr) const override
void RemoveCellCharAttribs(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, ScEditDataArray *pDataArray)
const_iterator end() const
bool IsAllEqual(const ScAttrArray &rOther, SCROW nStartRow, SCROW nEndRow) const
void SetPatternArea(SCROW nStartRow, SCROW nEndRow, std::unique_ptr< ScPatternAttr > pPattern, bool bPutToPool=false, ScEditDataArray *pDataArray=nullptr)
SC_DLLPUBLIC const SfxItemSet * GetCondResult(SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue *pCell=nullptr) const
const SfxPoolItem & GetDefaultItem(sal_uInt16 nWhich) const
static SvxCellOrientation GetCellOrientation(const SfxItemSet &rItemSet, const SfxItemSet *pCondSet)
SfxItemPool * GetPool() const
void SetStyleSheet(ScStyleSheet *pNewStyle, bool bClearDirectFormat=true)
void MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray &rAttrArray)
Move within a document.
bool IsValid(SvxBoxInfoItemValidFlags nValid) const
const_iterator begin() const
bool GetFirstVisibleAttr(SCROW &rFirstRow) const
const ScPatternAttr * pOld2
void InvalidateTextWidth(std::u16string_view rStyleName)
void ChangeIndent(SCROW nStartRow, SCROW nEndRow, bool bIncrement)
static void SetLineColor(SvxBorderLine const *dest, Color c)
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const ScPatternAttr * SetPatternAreaImpl(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr *pPattern, bool bPutToPool=false, ScEditDataArray *pDataArray=nullptr, bool bPassingPatternOwnership=false)
bool ValidRow(SCROW nRow) const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
#define SC_ATTRARRAY_DELTA
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
#define SAL_WARN_IF(condition, area, stream)
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
ScPatternAttr * PutInPool(ScDocument *pDestDoc, ScDocument *pSrcDoc) const
bool GetProtection() const
void DeleteArea(SCROW nStartRow, SCROW nEndRow)
virtual std::unique_ptr< EditTextObject > Clone() const =0
static bool CheckWidthInvalidate(bool &bNumFormatChanged, const SfxItemSet &rNewAttrs, const SfxItemSet &rOldAttrs)
const T & Put(std::unique_ptr< T > xItem, sal_uInt16 nWhich=0)
constexpr TypedWhichId< SvxHorJustifyItem > ATTR_HOR_JUSTIFY(129)
Degree100 GetValue() const
constexpr TypedWhichId< ScCondFormatItem > ATTR_CONDITIONAL(154)
SC_DLLPUBLIC ScPatternAttr * GetDefPattern() const
constexpr sal_uInt16 ATTR_PATTERN_END(155)
SCROW GetNextUnprotected(SCROW nRow, bool bUp) const
Including current, may return -1.
static void RemoveCharAttribs(EditTextObject &rEditText, const ScPatternAttr &rAttr)
SC_DLLPUBLIC ScStyleSheetPool * GetStyleSheetPool() const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
void ApplyLineStyleArea(SCROW nStartRow, SCROW nEndRow, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
bool GetLastVisibleAttr(SCROW &rLastRow, SCROW nLastData) const
void Reset(const ScPatternAttr *pPattern)
void FindStyleSheet(const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
bool IsVisibleEqual(const ScPatternAttr &rOther) const
const ScPatternAttr * pOld1
existing objects, temporary
void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
if nIndex == 0, remove all conditional format data
const ScPatternAttr * GetPatternRange(SCROW &rStartRow, SCROW &rEndRow, SCROW nRow) const
Returns if you search for attributes at nRow the range from rStartRow to rEndRow where that attribute...
SfxObjectShell * GetDocumentShell() const
void AddItem(SCTAB nTab, SCCOL nCol, SCROW nRow, std::unique_ptr< EditTextObject > pOldData, std::unique_ptr< EditTextObject > pNewData)
bool ApplyFrame(const SvxBoxItem *pLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight, bool bTop, SCROW nDistBottom)
void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
SCROW GetRowMerge() const
void RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow)
bool HasAutoFilter() const
std::pair< const_iterator, bool > insert(Value &&x)
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
std::optional< SfxItemSet > pItemSet
static void lcl_MergeDeep(SfxItemSet &rMergeSet, const SfxItemSet &rSource)
SCROW GetNextMarked(SCROW nRow, bool bUp) const
Including current row, may return -1 if bUp and not found.
const editeng::SvxBorderLine * GetBottom() const
constexpr TypedWhichId< SvxLineItem > ATTR_BORDER_BLTR(142)
const ScPatternAttr * GetPattern(SCROW nRow) const
bool IsDefaultItem(const SfxPoolItem *pItem)
void SetLine(const editeng::SvxBorderLine *pNew, SvxBoxItemLine nLine)