58 #include <strings.hrc>
68 #define CHECK_TABLE(t) (t).CheckConsistency();
70 #define CHECK_TABLE(t)
74 #define DEBUG_REDLINE( pDoc ) sw_DebugRedline( pDoc );
76 #define DEBUG_REDLINE( pDoc )
79 typedef std::vector<std::shared_ptr<SfxItemSet> >
SfxItemSets;
126 bool bSaveFormula =
true );
135 bool bRestoreChart =
true );
144 friend class SaveBox;
150 SaveLine(
const SaveLine&) =
delete;
151 SaveLine& operator=(
const SaveLine&) =
delete;
158 void SaveContentAttrs(
SwDoc* pDoc );
165 friend class SaveLine;
182 void SaveContentAttrs(
SwDoc* pDoc );
189 #if OSL_DEBUG_LEVEL > 0
191 #define CHECKTABLE(t) CheckTable( t );
193 #define CHECKTABLE(t)
231 const std::vector<sal_uInt16> *pColArr,
232 const OUString & rName)
234 m_aInsTableOptions( rInsTableOpts ),
235 m_nStartNode( rPos.nNode.GetIndex() ), m_nRows( nRw ), m_nColumns( nCl ), m_nAdjust( nAdj )
269 OSL_ENSURE( pTableNd,
"no TableNode" );
270 pTableNd->DelFrames();
280 SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
292 m_sTableName = pTableNd->GetTable().GetFrameFormat()->GetName();
293 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&pTableNd->GetTable()) )
294 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
297 aIdx.GetIndex() + 1 );
301 rPam.GetPoint()->nNode = aIdx;
302 rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 );
321 std::unique_ptr<SwDDETable> pDDETable(
new SwDDETable( pTableNode->
GetTable(), pNewType ));
334 aPam.GetMark()->nContent.Assign( pCNd, 0 );
367 : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nContent( nCnt )
379 pNd->
GetText().getLength(), false );
396 if ( nEndIdx - 1 > nNd )
410 m_nStartNode( 0 ), m_nEndNode( 0 ),
411 m_cSeparator( cCh ), m_nHeadlineRepeat( rTable.GetRowsToRepeat() )
416 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&rTable) )
417 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
426 for(
size_t n = 0;
n < rFrameFormatTable.
size(); ++
n )
432 ((RndStdIds::FLY_AT_CHAR == pAnchor->
GetAnchorId()) ||
433 (RndStdIds::FLY_AT_PARA == pAnchor->
GetAnchorId())) &&
463 pPam->GetPoint()->nNode = aFrameIdx;
465 pPam->GetPoint()->nNode = aEndIdx;
486 std::unique_ptr<SwDDETable> pDDETable(
new SwDDETable( pTableNd->GetTable(), pNewType ) );
487 pTableNd->SetNewTable( std::move(pDDETable),
false );
494 for (
size_t nBoxes = rBxs.
size(); nBoxes; )
507 aNode2Layout.RestoreUpperFrames( rDoc.
GetNodes(),
508 pTableNd->GetIndex(), pTableNd->GetIndex()+1 );
512 pPam->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
514 pPam->GetPoint()->nNode = *pPam->GetNode().StartOfSectionNode();
539 for( n = pTableNd->
GetIndex() + 1; n < nTmpEnd; ++n )
541 if( ( pNd = (*
this)[ n ] )->IsContentNode() )
542 static_cast<SwContentNode*>(pNd)->DelFrames(
nullptr);
555 for(
size_t n = rSavedData.size();
n; )
566 OSL_ENSURE( pTextNd,
"Where is my TextNode?" );
571 std::function<void (SwTextNode *, sw::mark::RestoreMode)> restoreFunc(
574 if (!pContentStore->Empty())
584 pContentStore->Clear();
604 sal_uInt16 nTmpEnd = pSave->
m_pHstry->GetTmpEnd();
606 pSave->
m_pHstry->SetTmpEnd( nTmpEnd );
646 pPam->GetPoint()->nContent.Assign(
nullptr, 0 );
647 SwNodeIndex aSaveIdx( pPam->GetPoint()->nNode, -1 );
653 OSL_ENSURE( pTableNd,
"Could not find any TableNode" );
655 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&pTableNd->
GetTable()) )
656 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
662 if( !pCNd &&
nullptr == ( pCNd = rDoc.
GetNodes().
GoNext( &aSaveIdx ) ) &&
665 OSL_FAIL(
"Where is the TextNode now?" );
668 pPam->GetPoint()->nNode = aSaveIdx;
669 pPam->GetPoint()->nContent.Assign( pCNd, 0 );
699 m_vBoxSaves.push_back(std::make_unique<SwTableToTextSave>(rDoc, nNdIdx, nEndIdx, nContentIdx));
707 m_pHistory( nullptr ), m_cSeparator( cCh ), m_nAdjust( nAdj )
733 OSL_ENSURE( pTNd,
"Could not find a TableNode" );
737 m_sTableName = pTNd->GetTable().GetFrameFormat()->GetName();
748 SwTable& rTable = pTNd->GetTable();
755 OSL_ENSURE(
false,
"Where is my box?" );
767 pPos->
nNode = nTableNd;
768 pPos->nContent.
Assign(pPos->nNode.GetNode().GetContentNode(), 0);
788 aPam.GetMark()->nContent.Assign(
nullptr, 0 );
789 aPam.GetPoint()->nContent.Assign(
nullptr, 0 );
792 pPos->nContent.Assign(pTextNd, pTextNd->
GetText().getLength());
839 m_nOldHeadline( nOldHdl ),
840 m_nNewHeadline( nNewHdl )
844 OSL_ENSURE( pSttNd,
"Box without content" );
853 OSL_ENSURE( pTNd,
"could not find any TableNode" );
863 OSL_ENSURE( pTNd,
"could not find any TableNode" );
879 : m_aTableSet(*rTable.GetFrameFormat()->GetAttrSet().GetPool(),
aTableSetRange),
880 m_pSwTable(&rTable), m_nLineCount(nLnCnt), m_bSaveFormula(bSaveFormula)
890 for( sal_uInt16
n = 1;
n < nLnCnt; ++
n )
900 if( SIZE_MAX == nRet )
927 return static_cast<sal_uInt16
>(nRet);
949 if( pLast->GetTable() == &rTable )
951 pLast->InvalidateAll();
952 pLast->SetCompletePaint();
965 for(
size_t n = 0;
n < nLnCnt; ++
n, pLn = pLn->pNext )
969 OSL_ENSURE(
false,
"Number of lines changed" );
982 m_pLine->SaveContentAttrs(pDoc);
988 FndBox_ aTmpBox(
nullptr,
nullptr );
1012 m_pLine->CreateNew(rTable, aParent, *
this);
1023 for( ; n < aParent.GetTabLines().size(); ++n )
1033 const size_t nBoxes = rBoxes.size();
1034 for (
size_t k = 0; k < nBoxes; ++k)
1051 for (
size_t k1 = 0; k1 < nOldLines - n; ++k1)
1054 const size_t nBoxes = rBoxes.
size();
1055 for (
size_t k2 = 0; k2 < nBoxes; ++k2)
1070 aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n );
1071 assert(aParent.GetTabLines().empty());
1095 pFormat->
Add(const_cast<SwTableLine*>(&rTableLn));
1096 KillEmptyFrameFormat(*pOldFormat);
1106 KillEmptyFrameFormat(*pOldFormat);
1113 pPrev->pNext =
this;
1123 SaveLine::~SaveLine()
1133 SaveBox* pBx = pBox;
1134 for(
size_t n = 0;
n < rLine.
GetTabBoxes().size(); ++
n, pBx = pBx->pNext )
1138 OSL_ENSURE(
false,
"Number of boxes changed" );
1141 pBx->RestoreAttr( *rLine.
GetTabBoxes()[
n ], rSTable );
1145 void SaveLine::SaveContentAttrs(
SwDoc* pDoc )
1147 pBox->SaveContentAttrs( pDoc );
1149 pNext->SaveContentAttrs( pDoc );
1166 pBox->CreateNew( rTable, *pNew, rSTable );
1169 pNext->CreateNew( rTable, rParent, rSTable );
1173 : pNext( nullptr ), nSttNode( ULONG_MAX ), nRowSpan(0)
1175 Ptrs.pLine =
nullptr;
1178 pPrev->pNext =
this;
1199 if( ULONG_MAX == nSttNode )
1202 delete Ptrs.pContentAttrs;
1210 if( ULONG_MAX == nSttNode )
1214 OSL_ENSURE(
false,
"Number of lines changed" );
1218 SaveLine* pLn = Ptrs.pLine;
1223 OSL_ENSURE(
false,
"Number of lines changed" );
1233 if( Ptrs.pContentAttrs )
1236 sal_uInt16 nSet = 0;
1243 std::shared_ptr<SfxItemSet> pSet( (*Ptrs.pContentAttrs)[ nSet++ ] );
1249 pCNd->
ResetAttr( *pRstAttr, *(pRstAttr+1) );
1262 OSL_ENSURE(
false,
"Box not anymore at the same node" );
1266 void SaveBox::SaveContentAttrs(
SwDoc* pDoc )
1268 if( ULONG_MAX == nSttNode )
1271 Ptrs.pLine->SaveContentAttrs( pDoc );
1282 std::shared_ptr<SfxItemSet> pSet;
1285 pSet = std::make_shared<SfxItemSet>( pDoc->
GetAttrPool(),
1290 Ptrs.pContentAttrs->push_back( pSet );
1295 pNext->SaveContentAttrs( pDoc );
1309 if( ULONG_MAX == nSttNode )
1314 Ptrs.pLine->CreateNew( rTable, *pNew, rSTable );
1330 pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
1334 pTBoxes->push_back( pBox );
1339 pNext->CreateNew( rTable, rParent, rSTable );
1345 m_nStartNode( rTableNd.GetIndex() )
1359 OSL_ENSURE( pTableNd,
"no TableNode" );
1383 , m_TableStyleName(rTableNd.GetTable().GetTableStyleName())
1384 , m_nStartNode( rTableNd.GetIndex() )
1385 , m_bSaveContentAttr( false )
1386 , m_nRepeatHeading(rTableNd.GetTable().GetRowsToRepeat())
1405 m_Undos.push_back(std::make_shared<SwUndoTableNumFormat>(rBox));
1413 OSL_ENSURE( pTableNd,
"no TableNode" );
1432 m_Undos.at(
n-1)->UndoImpl(rContext);
1456 sal_uInt16 nCnt,
bool bFlg,
bool bSmHght )
1457 :
SwUndo( nAction, &rTableNd.GetDoc() ),
1458 m_nMin( nMn ), m_nMax( nMx ),
1459 m_nSttNode( rTableNd.GetIndex() ),
1462 m_bSameHeight( bSmHght )
1476 for (
size_t n = 0;
n < rBoxes.
size(); ++
n)
1478 m_Boxes.insert( rBoxes[
n]->GetSttIdx() );
1493 OSL_ENSURE( !
IsDelBox(),
"wrong Action" );
1497 for (
size_t n = 0;
n < rOld.
size(); ++i)
1499 if( rOld[
n ] == rTableBoxes[ i ] )
1506 for( ; i < rTableBoxes.
size(); ++i )
1520 sal_uInt16 nLineNo = rTableLines.
GetPos( pLine );
1521 pRet = rTableLines[nLineNo - 1];
1540 const std::vector<sal_uLong> &rNodeCnts )
1545 OSL_ENSURE( !
IsDelBox(),
"wrong Action" );
1549 "unexpected boxes" );
1550 OSL_ENSURE( rOld.
size() <= rTableBoxes.
size(),
"more unexpected boxes" );
1551 for (
size_t n = 0,
i = 0;
i < rTableBoxes.
size(); ++
i)
1553 if( (
n < rOld.
size() ) &&
1554 ( rOld[
n ] == rTableBoxes[
i ] ) )
1572 sal_uInt16 nLineNo = 0;
1573 for (
size_t j = 0; j < rBoxes.
size(); ++j)
1575 pCheckBox = rBoxes[j];
1580 GetPos( pCheckLine );
1581 if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff )
1583 nLineNo = nCheckLine;
1584 pSourceBox = pCheckBox;
1591 nLineDiff = nLineDiff - nLineNo;
1592 OSL_ENSURE( pSourceBox,
"Split source box not found!" );
1596 while( rBoxes[ nNdsPos ] != pSourceBox )
1598 sal_uLong nNodes = rNodeCnts[ nNdsPos ];
1609 bool bNodesMoved = pSourceBox &&
1612 && ( nNodes - 1 > nLineDiff );
1620 OSL_ENSURE(
IsDelBox(),
"wrong Action" );
1625 std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>> pSave(
new SwUndoSaveSection);
1638 OSL_ENSURE( pTableNd,
"no TableNode" );
1646 FndBox_ aTmpBox(
nullptr,
nullptr );
1651 std::vector< std::pair<SwTableBox *, sal_uLong> > aDelNodes;
1656 SwTableBox* pCpyBox = pTableNd->GetTable().GetTabSortBoxes()[0];
1668 rLnBoxes.push_back( pBox );
1679 for (
size_t n = aTmp.size();
n > 0 ; )
1684 SwTableBox* pBox = pTableNd->GetTable().GetTableBox( nIdx );
1685 OSL_ENSURE( pBox,
"Where is my TableBox?" );
1689 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1695 if( aTmp[
n].hasMoved )
1701 SwNodeIndex aInsPos( *(pLine->GetTabBoxes()[0]->GetSttNd()), 2 );
1705 sal_uLong nSttIdx = aInsPos.GetIndex() - 2,
1706 nNdCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
1707 while( i && aTmp[ --i ].
index > nSttIdx )
1708 aTmp[ i ].index += nNdCnt;
1717 aDelNodes.emplace_back(pBox, nIdx);
1724 std::set<BoxMove>::reverse_iterator it;
1728 SwTableBox* pBox = pTableNd->GetTable().GetTableBox( nIdx );
1729 OSL_ENSURE( pBox,
"Where's my table box?" );
1732 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1734 aDelNodes.emplace_back(pBox, nIdx);
1739 aTmpBox.SetTableLines(aDelBoxes, pTableNd->GetTable());
1740 aTmpBox.DelFrames(pTableNd->GetTable());
1744 for (
const std::pair<SwTableBox *, sal_uLong> & rDelNode : aDelNodes)
1748 rDelNode.first->RemoveFromTable();
1753 for(
size_t n = 0;
n < aDelBoxes.
size(); ++
n )
1757 pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pCurrBox ) );
1761 m_pSaveTable->CreateNew( pTableNd->GetTable(),
true, false );
1764 rDoc.
UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() );
1777 OSL_ENSURE( pTableNd,
"no TableNode" );
1781 for (
const auto& rBox :
m_Boxes)
1784 aSelBoxes.insert( pBox );
1811 rTable.
DeleteSel( &rDoc, aSelBoxes,
nullptr,
this,
true,
true );
1826 OSL_ENSURE( pTableNd,
"Where is the TableNode?" );
1828 m_nTableNode = pTableNd->
GetIndex();
1844 OSL_ENSURE( pTableNd,
"no TableNode" );
1855 SwTableBox *pBox, *pCpyBox = pTableNd->GetTable().GetTabSortBoxes()[0];
1863 for (
const auto& rBox : m_Boxes)
1870 rLnBoxes.push_back( pBox );
1872 aSelBoxes.insert( pBox );
1880 for(
size_t n = m_aNewStartNodes.size();
n; )
1887 nIdx = m_aNewStartNodes[ --
n ];
1888 pBox = pTableNd->GetTable().GetTableBox( nIdx );
1889 OSL_ENSURE( pBox,
"Where is my TableBox?" );
1896 for (
size_t i = m_vMoves.size();
i; )
1899 sal_Int32 nDelPos = 0;
1924 SwIndex aTmpIdx( pTextNd, nDelPos );
1934 pBox = pTableNd->GetTable().GetTableBox( nIdx );
1940 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1943 pTBoxes->erase( std::find(pTBoxes->begin(), pTBoxes->end(), pBox ) );
1949 SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
1959 m_pSaveTable->CreateNew( pTableNd->GetTable(),
true, false );
1962 rDoc.
UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() );
1966 m_pHistory->TmpRollback( &rDoc, 0 );
1967 m_pHistory->SetTmpEnd( m_pHistory->Count() );
1972 pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), m_nSttContent );
1983 SwPaM & rPam( AddUndoRedoPaM(rContext) );
1990 std::unique_ptr<SwUndoMove> pUndo(
new SwUndoMove( rDoc, rRg, rPos ));
1997 pUndo->SetDestRange( aTmp2, rPos, aTmp );
1999 m_vMoves.push_back(std::move(pUndo));
2005 for (
size_t n = 0;
n < rBoxes.
size(); ++
n)
2007 m_Boxes.insert(rBoxes[
n]->GetSttIdx());
2011 m_aNewStartNodes.push_back(
sal_uLong(0) );
2015 if( !rBoxes.
empty() )
2016 m_nTableNode = rBoxes[ 0 ]->GetSttNd()->FindTableNode()->GetIndex();
2029 m_pHistory->
Add( pCNd->GetFormatColl(), aIdx.GetIndex(), pCNd->GetNodeType());
2030 if( pCNd->HasSwAttrSet() )
2031 m_pHistory->CopyFormatAttr( *pCNd->GetpSwAttrSet(), aIdx.GetIndex() );
2038 , m_nNewFormatIdx(0)
2041 , m_bNewFormat(false)
2042 , m_bNewFormula(false)
2043 , m_bNewValue(false)
2059 pTNd->
GetText().getLength(), true );
2110 OSL_ENSURE(
m_pBoxSet,
"Where's the stored item set?" );
2115 OSL_ENSURE( pSttNd,
"without StartNode no TableBox" );
2118 OSL_ENSURE( pBox,
"found no TableBox" );
2153 sal_uInt16 nTmpEnd =
m_pHistory->GetTmpEnd();
2160 pPam->GetPoint()->nNode =
m_nNode + 1;
2161 pPam->GetPoint()->nContent.Assign( pTextNd, 0 );
2171 class RedlineFlagsInternGuard
2177 RedlineFlagsInternGuard(
2182 ~RedlineFlagsInternGuard();
2187 RedlineFlagsInternGuard::RedlineFlagsInternGuard(
2192 meOldRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() )
2194 mrDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( ( meOldRedlineFlags & ~eRedlineFlagsMask ) |
2195 ( eNewRedlineFlags & eRedlineFlagsMask ) );
2198 RedlineFlagsInternGuard::~RedlineFlagsInternGuard()
2200 mrDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( meOldRedlineFlags );
2213 pPam->GetPoint()->nNode =
m_nNode;
2215 SwNode * pNd = & pPam->GetPoint()->nNode.GetNode();
2217 assert(pSttNd &&
"without StartNode no TableBox");
2220 OSL_ENSURE( pBox,
"found no TableBox" );
2292 pPam->GetPoint()->nContent.Assign( static_cast<SwContentNode*>(pNd), 0 );
2301 : nBoxIdx( rBox.GetSttIdx() ), nOffset( 0 ),
2323 for (
size_t n =
m_vArr.size();
n; )
2338 SwPaM aPam( aInsIdx.GetNode(), *pEndNode );
2339 std::unique_ptr<SwUndoDelete> pUndo;
2343 bool bDeleteCompleteParagraph =
false;
2344 bool bShiftPam =
false;
2352 assert(pUndoDelete || pUndoRedlineDelete);
2353 if (pUndoRedlineDelete)
2356 bDeleteCompleteParagraph = !pEntry->
bJoin;
2359 pUndoRedlineDelete->
NodeDiff()-1 );
2363 aPam.GetPoint()->nNode = *pText;
2364 aPam.GetPoint()->nContent.Assign( pText,
2377 bDeleteCompleteParagraph =
true;
2383 aPam.GetPoint()->nNode = *pText;
2384 aPam.GetPoint()->nContent.Assign( pText, 0 );
2394 pEntry->
pUndo->UndoImpl(rContext);
2395 pEntry->
pUndo.reset();
2405 aPam.GetPoint()->nNode = *pText;
2406 aPam.GetPoint()->nContent.Assign( pText, 0 );
2411 pUndo = std::make_unique<SwUndoDelete>( aPam, bDeleteCompleteParagraph, true );
2415 pUndo = std::make_unique<SwUndoDelete>( aPam, true );
2418 pEntry->
pUndo->UndoImpl(rContext);
2419 pEntry->
pUndo.reset();
2422 pEntry->
pUndo = std::move(pUndo);
2433 if( aTmpSet.Count() )
2446 if( aTmpSet.Count() )
2448 pEntry->
pBoxNumAttr = std::make_unique<SfxItemSet>(
2477 for (
size_t n = 0;
n <
m_vArr.size(); ++
n)
2495 pEntry->
pUndo->UndoImpl(rContext);
2504 SwPaM const& rLastPam =
2507 pEntry->
bJoin, true );
2515 pEntry->
pUndo.reset();
2517 pEntry->
pUndo = std::move(pUndo);
2529 if( aTmpSet.Count() )
2541 if( aTmpSet.Count() )
2543 pEntry->
pBoxNumAttr = std::make_unique<SfxItemSet>(
2558 if (!
m_vArr.empty() && !bDelContent)
2562 m_vArr.push_back(std::unique_ptr<UndoTableCpyTable_Entry>(pEntry));
2573 pEntry->
pUndo = std::make_unique<SwUndoDelete>( aPam,
true );
2576 pEntry->
pBoxNumAttr = std::make_unique<SfxItemSet>(
2619 const SwPosition& rPos,
bool& rJoin,
bool bRedo )
2621 std::unique_ptr<SwUndo> pUndo;
2651 SwPosition aDeleteStart( rJoin ? aInsertEnd : rPos );
2662 if( aDeleteStart != aCellEnd )
2664 SwPaM aDeletePam( aDeleteStart, aCellEnd );
2665 pUndo = std::make_unique<SwUndoRedlineDelete>( aDeletePam,
SwUndoId::DELETE );
2672 SwPaM aTmpPam( aDeleteStart, aCellEnd );
2673 pUndo = std::make_unique<SwUndoDelete>( aTmpPam, true );
2679 if( aCellStart != aInsertEnd )
2681 SwPaM aTmpPam( aCellStart, aInsertEnd );
2693 GetSttNd()->FindTableNode());
2696 0, 0, nCnt,
true,
false ) );
2757 m_nTableNode( rTableNd.GetIndex() ), m_nOffset( 0 ), mpSaveRowSpan(
std::move(pRowSp) ),
2758 m_nMode( eMode ), m_nFormulaEnd( 0 ), m_bCalcNewSize( bNewSize )
2787 pPam->GetPoint()->nContent.Assign(rIdx.GetNode().GetContentNode(), 0);
2788 assert(rIdx.GetNode().GetContentNode()->Len() == 0);
2831 FndBox_ aTmpBox(
nullptr,
nullptr );
2834 rTable.
DeleteSel( pDoc, aSelBoxes,
nullptr,
nullptr,
false,
false );
2888 bool bWithPrv, sal_uInt16 nMd )
2890 m_nMode( nMd ), m_bWithPrev( bWithPrv )
2929 FndBox_ aFndBox(
nullptr,
nullptr );
2964 pPam->GetPoint()->nContent.Assign( pCNd, 0 );
3010 void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx )
3012 size_t nO = rArr.size();
3019 const size_t nM = nU + ( nO - nU ) / 2;
3020 if ( rArr[nM] == nIdx )
3022 OSL_FAIL(
"Index already exists. This should never happen." );
3025 if( rArr[nM] < nIdx )
3033 rArr.insert( rArr.begin() + nU, nIdx );
3036 #if OSL_DEBUG_LEVEL > 0
3041 for (
size_t n = 0;
n < rSrtArr.
size(); ++
n)
3045 OSL_ENSURE( rNds[ pBox->
GetSttIdx() ] == pNd,
"Box with wrong StartNode" );
3085 m_pAutoFormat(
std::move(pAutoFormat)),
3086 m_rAffectedTables(rAffectedTables)
SwStartNode * FindSttNodeByType(SwStartNodeType eTyp)
SwTableFormat * MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
const SwEndNode * EndOfSectionNode() const
Starts a section of nodes in the document model.
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
virtual sal_Int32 Len() const
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
virtual void RepeatImpl(::sw::RepeatContext &) override
virtual void UndoImpl(::sw::UndoRedoContext &) override
std::unique_ptr< SaveTable > m_pSaveHdl
sal_uLong GetIndex() const
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwNode & GetNode(bool bPoint=true) const
virtual ~SwUndoAttrTable() override
SwTableLineFormat * MakeTableLineFormat()
SwStartNode * m_pStartOfSection
SwUndoTextToTable(const SwPaM &, const SwInsertTableOptions &, sal_Unicode, sal_uInt16, const SwTableAutoFormat *pAFormat)
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
void Add(SwClient *pDepend)
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
virtual void UndoImpl(::sw::UndoRedoContext &) override
Represents the style of a paragraph.
Marks a position in the document model.
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual ~SwUndoTableMerge() override
std::unique_ptr< SaveTable > m_pSaveTable
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwUndoTableCpyTable(const SwDoc &rDoc)
virtual void UndoImpl(::sw::UndoRedoContext &) override
const SwTableBox * GetTableBox(const OUString &rName, const bool bPerformValidCheck=false) const
virtual void RepeatImpl(::sw::RepeatContext &) override
SwInsertTableOptions m_aInsTableOptions
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
bool IsInsTableFormatNum() const
bool TableToText(const SwTableNode *pTableNd, sal_Unicode cCh)
Table to Text.
const OUString & GetText() const
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
sal_uLong GetSttIdx() const
virtual sal_uInt16 ResetAllAttr() override
SwpHints * GetpSwpHints()
virtual void RedoImpl(::sw::UndoRedoContext &) override
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(150)
virtual SwPaM & CreateNewShellCursor()=0
virtual AppendResult AppendRedline(SwRangeRedline *pNewRedl, bool bCallDelete)=0
Append a new redline.
std::unique_ptr< SwTableAutoFormat > m_pNewFormat
bool Rollback(SwDoc *pDoc, sal_uInt16 nStart=0)
virtual void RepeatImpl(::sw::RepeatContext &) override
virtual void SetRedlineFlags_intern(RedlineFlags eMode)=0
Set a new redline mode.
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwDoc & GetDoc()
Which Doc contains the nodes-array?
void ReNewBoxes(const SwSelBoxes &rBoxes)
std::vector< SwTable * > m_rAffectedTables
std::vector< sal_uLong > mvDelBoxes
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
SwUndoTableToText(const SwTable &rTable, sal_Unicode cCh)
static SwCache & GetCache()
SwTabFrame is one table in the document layout, containing rows (which contain cells).
SwUndoSplitTable(const SwTableNode &rTableNd, std::unique_ptr< SwSaveRowSpan > pRowSp, SplitTable_HeadlineOption nMode, bool bCalcNewSize)
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
std::unique_ptr< SwHistory > m_pHstry
void DelFrames(SwTable &rTable)
exports com.sun.star. table
virtual void RedoImpl(::sw::UndoRedoContext &) override
void SetRedlineFlags(RedlineFlags eMode)
void SetInCache(bool bNew)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
SwUndoTableHeadline(const SwTable &, sal_uInt16 nOldHdl, sal_uInt16 nNewHdl)
void push_back(SwTableLine *pLine)
static SwContentNode * GoPrevious(SwNodeIndex *)
SwTableLine is one table row in the document model.
std::unique_ptr< SwUndoDelete > m_pDelete
void PrepareDeleteCol(tools::Long nMin, tools::Long nMax)
SwTable::PrepareDeleteCol(..) adjusts the widths of the neighbour cells of a cell selection for an up...
const SwHistory * GetHistory() const
bool TmpRollback(SwDoc *pDoc, sal_uInt16 nStart, bool ToFirst=true)
SwTextNode * SplitContentNode(const SwPosition &, std::function< void(SwTextNode *, sw::mark::RestoreMode)> const *pContentIndexRestore)
IDocumentUndoRedo & GetIDocumentUndoRedo()
SwInsertTableOptions m_aInsertTableOpts
std::unique_ptr< SwHistory > m_pHistory
static void RemoveIdxFromSection(SwDoc &, sal_uLong nSttIdx, const sal_uLong *pEndIdx=nullptr)
std::unique_ptr< SwUndo > pUndo
bool InsertRow(SwDoc *, const SwSelBoxes &rBoxes, sal_uInt16 nCnt, bool bBehind)
SwTable::InsertRow(..) inserts one or more rows before or behind the selected boxes.
IDocumentContentOperations const & getIDocumentContentOperations() const
bool HasWriterListeners() const
bool CanJoinNext(SwNodeIndex *pIdx=nullptr) const
Is it possible to join two nodes? In pIdx the second position can be returned.
virtual SwContentNode * JoinNext() override
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
SwTableFormat * GetFrameFormat()
sal_uInt16 m_nNewHeadline
const SwFrameFormats * GetSpzFrameFormats() const
IShellCursorSupplier & GetCursorSupplier()
virtual ~SwUndoTableStyleUpdate() override
virtual void UndoImpl(::sw::UndoRedoContext &) override
void UpdateCharts(std::u16string_view rName) const
void RegisterToFormat(SwFormat &rFormat)
virtual void RedoImpl(::sw::UndoRedoContext &) override
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
std::unique_ptr< SwTableAutoFormat > m_pOldFormat
sal_Int32 getRowSpan() const
void SaveNewBoxes(const SwTableNode &rTableNd, const SwTableSortBoxes &rOld)
SaveTable(const SaveTable &)=delete
std::unique_ptr< SwSaveRowSpan > mpSaveRowSpan
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
sal_uInt16 m_nOldHeadline
void Delete(const SwNodeIndex &rPos, sal_uLong nNodes=1)
delete nodes
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwFrameFormatsV m_aFrameFormats
bool IsDelFullPara() const
SwTableNode * GetTableNode()
void MoveTo(SwIndexReg &rArr)
virtual ~SwUndoTableNdsChg() override
sal_uInt16 const aSave_BoxContentSet[]
SwTableNode * SplitTable(const SwNodeIndex &rPos, bool bAfter=true, bool bCalcNewSize=false)
Splits a table at the base-line which contains the index.
const SwTable * m_pSwTable
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
sal_Int32 GetDestSttContent() const
const SwTextFormatColl * GetDfltTextFormatColl() const
static bool IsRedlineOn(const RedlineFlags eM)
void SetTableModel(bool bNew)
sal_uLong GetIndex() const
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
virtual void UpdateTableFields(SfxPoolItem *pHt)=0
void AddBoxPos(SwDoc &rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, sal_Int32 nContentIdx=SAL_MAX_INT32)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwUndoMergeTable(const SwTableNode &rTableNd, const SwTableNode &rDelTableNd, bool bWithPrev, sal_uInt16 nMode)
iterator insert(iterator aIt, SwTableLine *pLine)
virtual ~SwUndoSplitTable() override
const SwTable & GetTable() const
virtual void DeleteSection(SwNode *pNode)=0
Delete section containing the node.
const SfxPoolItem * GetDfltAttr(sal_uInt16 nWhich)
Get the default attribute from corresponding default attribute table.
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd
const OUString & GetTableStyleName() const
Return the table style name of this table.
void NewFrameFormatForBox(const SwTableBox &, sal_uInt16 nFormatPos, SwFrameFormat *pOldFormat)
std::unique_ptr< SaveTable > m_pSaveTable
static void RemoveIdxFromRange(SwPaM &rPam, bool bMoveNext)
SwAttrPool * GetPool() const
RedlineFlags GetRedlineFlags() const
std::vector< SwTableLine * >::const_iterator const_iterator
sal_uLong IsValidNumTextNd(bool bCheckAttr=true) const
UndoTableCpyTable_Entry(const SwTableBox &rBox)
void InsertRow(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
void MakeFrames(SwTable &rTable)
SwNode & GetEndOfContent() const
Regular ContentSection (i.e. the BodyText).
static const SwTableLines & lcl_FindParentLines(const SwTable &rTable, const SwTableBox &rBox)
virtual bool ResetAttr(sal_uInt16 nWhich1, sal_uInt16 nWhich2=0)
SwStartNode * MakeTextSection(const SwNodeIndex &rWhere, SwStartNodeType eSttNdTyp, SwTextFormatColl *pColl)
SplitTable_HeadlineOption const m_nMode
void DelNumRules(const SwPaM &, SwRootFrame const *pLayout=nullptr)
SwTableSortBoxes & GetTabSortBoxes()
virtual std::size_t GetRedlineAuthor()=0
sal_uInt16 const aTableSetRange[]
bool IsContentNode() const
PaM is Point and Mark: a selection of the document model.
const SwAttrSet * GetpSwAttrSet() const
bool Move(SwMoveFnCollection const &fnMove=fnMoveForward, SwGoInDoc fnGo=GoInContent)
Movement of cursor.
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
virtual ~SwUndoCpyTable() override
void RstTextAttr(const SwIndex &rIdx, const sal_Int32 nLen, const sal_uInt16 nWhich=0, const SfxItemSet *pSet=nullptr, const bool bInclRefToxMark=false, const bool bExactRange=false)
delete all attributes.
virtual void RedoImpl(::sw::UndoRedoContext &) override
void DeRegister()
deregister the currently registered History
void RestoreRowSpan(const SwSaveRowSpan &)
sal_Int32 ContentStart() const
SwFrameFormat & CreateNewFormat(SwFrameFormat &rFormat, sal_uInt16 nFormatPos)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
void SetTableLines(const SwSelBoxes &rBoxes, const SwTable &rTable)
SwUndoTableStyleMake(const OUString &rName, const SwDoc &rDoc)
bool InsertRow(SwTable &rTable, const SwSelBoxes &rBoxes, sal_uInt16 nCnt)
const SwPosition * GetPoint() const
#define DEBUG_REDLINE(pDoc)
static SwSelBoxes & SelLineFromBox(const SwTableBox *pBox, SwSelBoxes &rBoxes, bool bToTop=true)
sal_uInt16 AddFormat(SwFrameFormat *pFormat, bool bIsLine)
SwTableToTextSave(SwDoc &rDoc, sal_uLong nNd, sal_uLong nEndIdx, sal_Int32 nContent)
bool DeleteSel(SwDoc *, const SwSelBoxes &rBoxes, const SwSelBoxes *pMerged, SwUndo *pUndo, const bool bDelMakeFrames, const bool bCorrBorder)
SwIndex & Assign(SwIndexReg *, sal_Int32)
SwEditShell const * GetEditShell() const
virtual ~SwUndoTableToText() override
std::vector< std::unique_ptr< SwTableToTextSave >> SwTableToTextSaves
SwUndoTableStyleDelete(std::unique_ptr< SwTableAutoFormat > pAutoFormat, const std::vector< SwTable * > &rAffectedTables, const SwDoc &rDoc)
virtual SwChartDataProvider * GetChartDataProvider(bool bCreate=false) const =0
returns or creates the data-provider for chart
virtual ~SwUndoTableCpyTable() override
void MoveBoxContent(SwDoc &rDoc, SwNodeRange &rRg, SwNodeIndex &rPos)
std::unique_ptr< SwHistory > m_pHistory
void SaveFormula(SwHistory &rHistory)
virtual bool DeleteRedline(const SwPaM &rPam, bool bSaveInUndo, RedlineType nDelType)=0
void CreateNew(SwTable &rTable, bool bCreateFrames=true, bool bRestoreChart=true)
SwContentNode * GetContentNode()
void SetSelBoxes(const SwSelBoxes &rBoxes)
SplitTable_HeadlineOption
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc &rDoc)
static std::unique_ptr< SwUndo > PrepareRedline(SwDoc *pDoc, const SwTableBox &rBox, const SwPosition &rPos, bool &rJoin, bool bRedo)
void ChgTableStyle(const OUString &rName, const SwTableAutoFormat &rNewFormat)
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
Marks a character position inside a document model node.
void AddRule(SwUndoArg eWhat, const OUString &rWith)
tools::Long NodeDiff() const
SwFrameFormat * GetFrameFormat()
sal_uInt16 const aTableBoxSetRange[]
void SaveContentAttrs(SwDoc *pDoc)
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
void MakeOwnFrames(SwNodeIndex *pIdxBehind)
Creates the frms for the table node (i.e. the TabFrames).
std::unique_ptr< SwHistory > m_pHistory
Marks a node in the document model.
SwFrameFormat * GetFrameFormat()
SwNodes & GetNodes()
Node is in which nodes-array/doc?
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart
virtual sal_uInt16 ResetAllAttr()
bool HasSwAttrSet() const
const SwTable * TextToTable(const SwInsertTableOptions &rInsTableOpts, const SwPaM &rRange, sal_Unicode cCh, sal_Int16 eAdjust, const SwTableAutoFormat *)
Text to Table.
OUString SwResId(const char *pId)
std::unique_ptr< SwUndoTableNdsChg > m_pInsRowUndo
IDocumentChartDataProviderAccess const & getIDocumentChartDataProviderAccess() const
SwUndoCpyTable(const SwDoc &rDoc)
virtual bool MoveNodeRange(SwNodeRange &, SwNodeIndex &, SwMoveFlags)=0
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwTableNode * UndoTableToText(sal_uLong nStt, sal_uLong nEnd, const SwTableToTextSaves &rSavedData)
Is in untbl.cxx and may called only by Undo-object.
SwTableLines & GetTabLines()
std::unique_ptr< SwTableAutoFormat > DelTableStyle(const OUString &rName, bool bBroadcast=false)
SwTable is one table in the document model, containing rows (which contain cells).
sal_uInt16 const aTableLineSetRange[]
void AddBoxBefore(const SwTableBox &rBox, bool bDelContent)
std::unique_ptr< SfxItemSet > pBoxNumAttr
virtual void RepeatImpl(::sw::RepeatContext &) override
iterator insert(iterator aIt, Value const &rVal)
SwTableLines & GetTabLines()
void push_back(Value const &rVal)
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
TableMergeErr MergeTable(SwPaM &rPam)
const SwFrameFormat * GetDfltFrameFormat() const
std::unique_ptr< SaveTable > m_pTableSave
std::unique_ptr< std::set< BoxMove > > m_pNewSttNds
virtual void RedoImpl(::sw::UndoRedoContext &) override
std::unique_ptr< SaveTable > m_pSavedTable
virtual ~SwUndoTableStyleDelete() override
void Delete(const void *pOwner, sal_uInt16 nIndex)
virtual void RedoImpl(::sw::UndoRedoContext &) override
void SaveSection(SwStartNode *pSttNd)
void NewFrameFormatForLine(const SwTableLine &, sal_uInt16 nFormatPos, SwFrameFormat *pOldFormat)
std::unique_ptr< SaveLine > m_pLine
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
void EraseText(const SwIndex &rIdx, const sal_Int32 nCount=SAL_MAX_INT32, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
delete text content ATTENTION: must not be called with a range that overlaps the start of an attribut...
OUString InsertText(const OUString &rStr, const SwIndex &rIdx, const SwInsertFlags nMode=SwInsertFlags::DEFAULT)
insert text content
std::vector< std::unique_ptr< SwUndoSaveSection, o3tl::default_delete< SwUndoSaveSection >>> SwUndoSaveSections
void ClearSwpHintsArr(bool bDelFields)
sal_uLong EndOfSectionIndex() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SwTextNode is a paragraph in the document model.
virtual bool SplitRedline(const SwPaM &rPam)=0
void RestoreAttr(SwTable &rTable, bool bModifyBox=false)
void RestoreSection(SwDoc *pDoc, SwNodeIndex *pIdx, sal_uInt16 nSectType)
SwTableBoxes & GetTabBoxes()
sal_uInt16 const m_nAdjust
SaveTable & operator=(const SaveTable &)=delete
std::vector< SwTableBox * > SwTableBoxes
IDocumentRedlineAccess const & getIDocumentRedlineAccess() const
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(149)
static void CheckTable(const SwTable &)
const SwStartNode * GetSttNd() const
virtual bool SetAttr(const SfxPoolItem &)
made virtual
virtual void UndoImpl(::sw::UndoRedoContext &) override
void SetPaM(SwPaM &, bool bCorrToContent=false) const
void ChgFrameFormat(SwTableBoxFormat *pNewFormat, bool bNeedToReregister=true)
SwMoveFnCollection const & fnTableStart
virtual void UndoImpl(::sw::UndoRedoContext &) override
std::unique_ptr< SaveTable > m_pSaveTable
std::vector< std::unique_ptr< UndoTableCpyTable_Entry > > m_vArr
void CorrAbs(const SwNodeIndex &rOldNode, const SwPosition &rNewPos, const sal_Int32 nOffset=0, bool bMoveCursor=false)
virtual SwPaM & GetCurrentShellCursor()=0
bool SplitTable(const SwSelBoxes &rBoxes, bool bVert, sal_uInt16 nCnt, bool bSameHeight=false)
Split up/merge Boxes in the Table.
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
SwUndoTableMerge(const SwPaM &rTableSel)
bool MoveTable(SwWhichTable, SwMoveFnCollection const &)
static std::shared_ptr< ContentIdxStore > Create()
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
SwMoveFnCollection const & fnMoveForward
SwPam::Move()/Find() default argument.
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
SwUndoTableNdsChg(SwUndoTableNdsChg const &)=delete
sal_Int32 GetIndex() const
sal_uLong GetEndNode() const
void SaveCollection(const SwTableBox &rBox)
virtual bool IsRedlineOn() const =0
Query if redlining is on.
virtual SwTextFormatColl * GetTextCollFromPool(sal_uInt16 nId, bool bRegardLanguage=true)=0
Return "Auto-Collection with ID.
static SwTableLine * lcl_FindTableLine(const SwTable &rTable, const SwTableBox &rBox)
SwUndo(SwUndoId const nId, const SwDoc *pDoc)
const SwPosition * End() const
void ClearFEShellTabCols(SwDoc &rDoc, SwTabFrame const *const pFrame)
sal_uInt16 SetTmpEnd(sal_uInt16 nTmpEnd)
SwTableBox is one table cell in the document model.
void PaMCorrAbs(const SwPaM &rRange, const SwPosition &rNewPos)
Function declarations so that everything below the CursorShell can move the Cursor once in a while...
std::vector< std::shared_ptr< SfxItemSet > > SfxItemSets
virtual void RedoImpl(::sw::UndoRedoContext &) override
void InsertCol(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
Inserting Columns/Rows.
virtual SwContentNode * JoinNext()
virtual ~SwUndoTableStyleMake() override
SwFrameFormat * ClaimFrameFormat()
static void RemoveIdxRel(sal_uLong, const SwPosition &)
void SetRowsToRepeat(SwTable &rTable, sal_uInt16 nSet)
std::unique_ptr< SwRedlineData > m_pRedlineData
virtual void CallSwClientNotify(const SfxHint &rHint) const override
SwMoveFnCollection const & fnMoveBackward
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwTableNode * FindTableNode()
Search table node, in which it is.
virtual ~SwUndoInsTable() override
virtual ~SwUndoMergeTable() override
void SetUpper(SwTableBox *pNew)
bool MergeTable(const SwNodeIndex &rPos, bool bWithPrev=true, sal_uInt16 nMode=0)
Two Tables that are following one another are merged.
void DeleteBox_(SwTable &rTable, SwTableBox *pBox, SwUndo *pUndo, bool bCalcNewSize, const bool bCorrBorder, SwShareBoxFormats *pShareFormats)
void SetUpper(SwTableLine *pNew)
virtual RedlineFlags GetRedlineFlags() const =0
Query the currently set redline mode.
void setRowSpan(sal_Int32 nNewRowSpan)
SwTableToTextSave & operator=(const SwTableToTextSave &)=delete
sal_uInt16 GetPos(const SwTableLine *pBox) const
std::set< sal_uLong > m_Boxes
SwUndoInsTable(const SwPosition &, sal_uInt16 nCols, sal_uInt16 nRows, sal_uInt16 eAdjust, const SwInsertTableOptions &rInsTableOpts, const SwTableAutoFormat *pTAFormat, const std::vector< sal_uInt16 > *pColArr, const OUString &rName)
Ends a section of nodes in the document model.
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void RepeatImpl(::sw::RepeatContext &) override
virtual void SetMark()
Unless this is called, the getter method of Mark will return Point.
std::unique_ptr< SwUndoSaveSections > m_pDelSects
virtual void UndoImpl(::sw::UndoRedoContext &) override
virtual void RedoImpl(::sw::UndoRedoContext &) override
virtual const SwRedlineTable & GetRedlineTable() const =0
void SetNewTable(std::unique_ptr< SwTable >, bool bNewFrames=true)
std::pair< const_iterator, bool > insert(Value &&x)
void DeleteBox(const SwTable *pTable, const SwTableBox &rBox)
virtual ~SwUndoTextToTable() override
virtual SwRewriter GetRewriter() const override
Returns the rewriter for this object.
virtual void UndoImpl(::sw::UndoRedoContext &) override
sal_uLong GetDestSttNode() const
const SwTable * InsertTable(const SwInsertTableOptions &rInsTableOpts, const SwPosition &rPos, sal_uInt16 nRows, sal_uInt16 nCols, sal_Int16 eAdjust, const SwTableAutoFormat *pTAFormat=nullptr, const std::vector< sal_uInt16 > *pColArr=nullptr, bool bCalledFromShell=false, bool bNewModel=true)
Insert new table at position.
void SetRange(const SwNodeRange &)
void AddFillBox(const SwTableBox &rBox)
void SaveFormula(SwHistory &rHistory)
virtual void RepeatImpl(::sw::RepeatContext &) override
sal_uInt16 m_nHeadlineRepeat
SwContentNode * GoNext(SwNodeIndex *) const
std::unique_ptr< std::vector< sal_uInt16 > > m_pColumnWidth
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr sal_uInt32 getSwDefaultTextFormat()
The number formatter's default locale's @ Text format.
constexpr TypedWhichId< SvxAdjustItem > RES_PARATR_ADJUST(64)
SwTableAutoFormat * MakeTableStyle(const OUString &rName, bool bBroadcast=false)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwTableToTextSaves m_vBoxSaves
SwTableBoxFormat * MakeTableBoxFormat()
iterator erase(iterator aIt)
void AddBoxAfter(const SwTableBox &rBox, const SwNodeIndex &rIdx, bool bDelContent)
const SwAttrPool & GetAttrPool() const
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
void ChkBoxNumFormat(SwTableBox &rCurrentBox, bool bCallUpdate)
SwTextNode * MakeTextNode(const SwNodeIndex &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
bool MoveNodes(const SwNodeRange &, SwNodes &rNodes, const SwNodeIndex &, bool bNewFrames=true)
move the node pointer
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
SwTableNode * GetTableNode() const
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwUndoAttrTable(const SwTableNode &rTableNd, bool bClearTabCols=false)
Base class of the Writer document model elements.
SwTextFormatColl * GetTextColl() const