20 #include <libxml/xmlwriter.h>
60 #include <strings.hrc>
65 #include <osl/diagnose.h>
73 #define CHECK_TABLE(t) (t).CheckConsistency();
75 #define CHECK_TABLE(t)
79 #define DEBUG_REDLINE( pDoc ) sw_DebugRedline( pDoc );
81 #define DEBUG_REDLINE( pDoc )
84 typedef std::vector<std::shared_ptr<SfxItemSet> >
SfxItemSets;
133 bool bSaveFormula =
true );
142 bool bRestoreChart =
true );
151 friend class SaveBox;
155 sal_uInt16 m_nItemSet;
157 SaveLine(
const SaveLine&) =
delete;
158 SaveLine& operator=(
const SaveLine&) =
delete;
165 void SaveContentAttrs(
SwDoc* pDoc );
172 friend class SaveLine;
176 sal_Int32 m_nRowSpan;
177 sal_uInt16 m_nItemSet;
189 void SaveContentAttrs(
SwDoc* pDoc );
196 #if OSL_DEBUG_LEVEL > 0
198 #define CHECKTABLE(t) CheckTable( t );
200 #define CHECKTABLE(t)
237 const std::vector<sal_uInt16> *pColArr,
238 const OUString & rName)
240 m_aInsTableOptions( rInsTableOpts ),
241 m_nStartNode( rPos.nNode.GetIndex() ), m_nRows( nRw ), m_nColumns( nCl ), m_nAdjust( nAdj )
275 OSL_ENSURE( pTableNd,
"no TableNode" );
276 pTableNd->DelFrames();
286 SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
297 m_sTableName = pTableNd->GetTable().GetFrameFormat()->GetName();
298 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&pTableNd->GetTable()) )
299 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
302 aIdx.GetIndex() + 1 );
306 rPam.GetPoint()->nNode = aIdx;
307 rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 );
326 std::unique_ptr<SwDDETable> pDDETable(
new SwDDETable( pTableNode->
GetTable(), pNewType ));
339 aPam.GetMark()->nContent.Assign( pCNd, 0 );
372 : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nContent( nCnt )
401 if ( nEndIdx - 1 > nNd )
415 m_nStartNode( 0 ), m_nEndNode( 0 ),
416 m_cSeparator( cCh ), m_nHeadlineRepeat( rTable.GetRowsToRepeat() )
421 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&rTable) )
422 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
431 for(
size_t n = 0;
n < rFrameFormatTable.
size(); ++
n )
437 ((RndStdIds::FLY_AT_CHAR == pAnchor->
GetAnchorId()) ||
438 (RndStdIds::FLY_AT_PARA == pAnchor->
GetAnchorId())) &&
468 pPam->GetPoint()->nNode = aFrameIdx;
470 pPam->GetPoint()->nNode = aEndIdx;
491 std::unique_ptr<SwDDETable> pDDETable(
new SwDDETable( pTableNd->GetTable(), pNewType ) );
492 pTableNd->SetNewTable( std::move(pDDETable),
false );
499 for (
size_t nBoxes = rBxs.
size(); nBoxes; )
512 aNode2Layout.RestoreUpperFrames( rDoc.
GetNodes(),
513 pTableNd->GetIndex(), pTableNd->GetIndex()+1 );
517 pPam->GetPoint()->nNode = *pTableNd->EndOfSectionNode();
519 pPam->GetPoint()->nNode = *pPam->GetNode().StartOfSectionNode();
544 for( n = pTableNd->
GetIndex() + 1; n < nTmpEnd; ++n )
546 if( ( pNd = (*
this)[ n ] )->IsContentNode() )
547 static_cast<SwContentNode*>(pNd)->DelFrames(
nullptr);
560 for(
size_t n = rSavedData.size();
n; )
571 OSL_ENSURE( pTextNd,
"Where is my TextNode?" );
576 std::function<void (SwTextNode *, sw::mark::RestoreMode, bool)> restoreFunc(
579 if (!pContentStore->Empty())
589 pContentStore->Clear();
609 sal_uInt16 nTmpEnd = pSave->
m_pHstry->GetTmpEnd();
611 pSave->
m_pHstry->SetTmpEnd( nTmpEnd );
651 pPam->GetPoint()->nContent.Assign(
nullptr, 0 );
652 SwNodeIndex aSaveIdx( pPam->GetPoint()->nNode, -1 );
658 OSL_ENSURE( pTableNd,
"Could not find any TableNode" );
660 if(
auto pDDETable = dynamic_cast<const SwDDETable *>(&pTableNd->
GetTable()) )
661 m_pDDEFieldType.reset(static_cast<SwDDEFieldType*>(pDDETable->GetDDEFieldType()->Copy().release()));
667 if( !pCNd &&
nullptr == ( pCNd = rDoc.
GetNodes().
GoNext( &aSaveIdx ) ) &&
670 OSL_FAIL(
"Where is the TextNode now?" );
673 pPam->GetPoint()->nNode = aSaveIdx;
674 pPam->GetPoint()->nContent.Assign( pCNd, 0 );
704 m_vBoxSaves.push_back(std::make_unique<SwTableToTextSave>(rDoc, nNdIdx, nEndIdx, nContentIdx));
712 m_pHistory( nullptr ), m_cSeparator( cCh ), m_nAdjust( nAdj )
738 OSL_ENSURE( pTNd,
"Could not find a TableNode" );
742 m_sTableName = pTNd->GetTable().GetFrameFormat()->GetName();
753 SwTable& rTable = pTNd->GetTable();
760 OSL_ENSURE(
false,
"Where is my box?" );
772 pPos->
nNode = nTableNd;
773 pPos->nContent.Assign(pPos->nNode.GetNode().GetContentNode(), 0);
793 aPam.GetMark()->nContent.Assign(
nullptr, 0 );
794 aPam.GetPoint()->nContent.Assign(
nullptr, 0 );
797 pPos->nContent.Assign(pTextNd, pTextNd->
GetText().getLength());
844 m_nOldHeadline( nOldHdl ),
845 m_nNewHeadline( nNewHdl )
849 OSL_ENSURE( pSttNd,
"Box without content" );
858 OSL_ENSURE( pTNd,
"could not find any TableNode" );
868 OSL_ENSURE( pTNd,
"could not find any TableNode" );
884 : m_aTableSet(*rTable.GetFrameFormat()->GetAttrSet().GetPool(),
aTableSetRange),
885 m_pSwTable(&rTable), m_nLineCount(nLnCnt), m_bSaveFormula(bSaveFormula)
893 if( USHRT_MAX == nLnCnt )
895 for( sal_uInt16
n = 1;
n < nLnCnt; ++
n )
905 if( SIZE_MAX == nRet )
931 return o3tl::narrowing<sal_uInt16>(nRet);
938 FndBox_ aTmpBox(
nullptr,
nullptr );
953 bool bHiddenTable =
true;
959 if( pLast->GetTable() == &rTable )
961 pLast->InvalidateAll();
962 pLast->SetCompletePaint();
963 bHiddenTable =
false;
977 for (
size_t n = 0;
n < nLnCnt; ++
n, pLn = pLn->m_pNext)
981 OSL_ENSURE(
false,
"Number of lines changed" );
1009 m_pLine->SaveContentAttrs(pDoc);
1013 bool bRestoreChart )
1015 FndBox_ aTmpBox(
nullptr,
nullptr );
1035 m_pLine->CreateNew(rTable, aParent, *
this);
1046 for( ; n < aParent.GetTabLines().size(); ++n )
1056 const size_t nBoxes = rBoxes.size();
1057 for (
size_t k = 0; k < nBoxes; ++k)
1074 for (
size_t k1 = 0; k1 < nOldLines - n; ++k1)
1077 const size_t nBoxes = rBoxes.
size();
1078 for (
size_t k2 = 0; k2 < nBoxes; ++k2)
1093 aParent.GetTabLines().erase( aParent.GetTabLines().begin(), aParent.GetTabLines().begin() + n );
1094 assert(aParent.GetTabLines().empty());
1118 pFormat->
Add(const_cast<SwTableLine*>(&rTableLn));
1119 KillEmptyFrameFormat(*pOldFormat);
1129 KillEmptyFrameFormat(*pOldFormat);
1136 pPrev->m_pNext =
this;
1146 SaveLine::~SaveLine()
1156 SaveBox* pBx = m_pBox;
1157 for (
size_t n = 0;
n < rLine.
GetTabBoxes().size(); ++
n, pBx = pBx->m_pNext)
1161 OSL_ENSURE(
false,
"Number of boxes changed" );
1164 pBx->RestoreAttr( *rLine.
GetTabBoxes()[
n ], rSTable );
1168 void SaveLine::SaveContentAttrs(
SwDoc* pDoc )
1170 m_pBox->SaveContentAttrs(pDoc);
1172 m_pNext->SaveContentAttrs(pDoc);
1190 m_pBox->CreateNew(rTable, *pNew, rSTable);
1193 m_pNext->CreateNew(rTable, rParent, rSTable);
1201 m_Ptrs.pLine =
nullptr;
1204 pPrev->m_pNext =
this;
1226 delete m_Ptrs.pLine;
1228 delete m_Ptrs.pContentAttrs;
1240 OSL_ENSURE(
false,
"Number of lines changed" );
1244 SaveLine* pLn = m_Ptrs.pLine;
1249 OSL_ENSURE(
false,
"Number of lines changed" );
1259 if (m_Ptrs.pContentAttrs)
1262 sal_uInt16 nSet = 0;
1269 std::shared_ptr<SfxItemSet> pSet((*m_Ptrs.pContentAttrs)[nSet++]);
1273 pCNd->
ResetAttr( rPair.first, rPair.second );
1284 OSL_ENSURE(
false,
"Box not anymore at the same node" );
1288 void SaveBox::SaveContentAttrs(
SwDoc* pDoc )
1293 m_Ptrs.pLine->SaveContentAttrs(pDoc);
1304 std::shared_ptr<SfxItemSet> pSet;
1307 pSet = std::make_shared<SfxItemSet>( pDoc->
GetAttrPool(),
1312 m_Ptrs.pContentAttrs->push_back(pSet);
1317 m_pNext->SaveContentAttrs(pDoc);
1336 m_Ptrs.pLine->CreateNew(rTable, *pNew, rSTable);
1352 pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pBox ) );
1356 pTBoxes->push_back( pBox );
1361 m_pNext->CreateNew(rTable, rParent, rSTable);
1367 m_nStartNode( rTableNd.GetIndex() )
1381 OSL_ENSURE( pTableNd,
"no TableNode" );
1405 , m_TableStyleName(rTableNd.GetTable().GetTableStyleName())
1406 , m_nStartNode( rTableNd.GetIndex() )
1407 , m_bSaveContentAttr(
false )
1408 , m_nRepeatHeading(rTableNd.GetTable().GetRowsToRepeat())
1427 m_Undos.push_back(std::make_shared<SwUndoTableNumFormat>(rBox));
1435 OSL_ENSURE( pTableNd,
"no TableNode" );
1454 m_Undos.at(
n-1)->UndoImpl(rContext);
1478 sal_uInt16 nCnt,
bool bFlg,
bool bSmHght )
1479 :
SwUndo( nAction, &rTableNd.GetDoc() ),
1480 m_nMin( nMn ), m_nMax( nMx ),
1481 m_nSttNode( rTableNd.GetIndex() ),
1484 m_bSameHeight( bSmHght )
1498 for (
size_t n = 0;
n < rBoxes.
size(); ++
n)
1500 m_Boxes.insert( rBoxes[
n]->GetSttIdx() );
1515 OSL_ENSURE( !
IsDelBox(),
"wrong Action" );
1519 for (
size_t n = 0;
n < rOld.
size(); ++i)
1521 if( rOld[
n ] == rTableBoxes[ i ] )
1528 for( ; i < rTableBoxes.
size(); ++i )
1542 sal_uInt16 nLineNo = rTableLines.
GetPos( pLine );
1543 pRet = rTableLines[nLineNo - 1];
1562 const std::vector<SwNodeOffset> &rNodeCnts )
1567 OSL_ENSURE( !
IsDelBox(),
"wrong Action" );
1571 "unexpected boxes" );
1572 OSL_ENSURE( rOld.
size() <= rTableBoxes.
size(),
"more unexpected boxes" );
1573 for (
size_t n = 0,
i = 0;
i < rTableBoxes.
size(); ++
i)
1575 if( (
n < rOld.
size() ) &&
1576 ( rOld[
n ] == rTableBoxes[
i ] ) )
1594 sal_uInt16 nLineNo = 0;
1595 for (
size_t j = 0; j < rBoxes.
size(); ++j)
1597 pCheckBox = rBoxes[j];
1602 GetPos( pCheckLine );
1603 if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff )
1605 nLineNo = nCheckLine;
1606 pSourceBox = pCheckBox;
1613 nLineDiff = nLineDiff - nLineNo;
1614 OSL_ENSURE( pSourceBox,
"Split source box not found!" );
1618 while( rBoxes[ nNdsPos ] != pSourceBox )
1631 bool bNodesMoved = pSourceBox &&
1642 OSL_ENSURE(
IsDelBox(),
"wrong Action" );
1647 std::unique_ptr<SwUndoSaveSection, o3tl::default_delete<SwUndoSaveSection>> pSave(
new SwUndoSaveSection);
1660 OSL_ENSURE( pTableNd,
"no TableNode" );
1668 FndBox_ aTmpBox(
nullptr,
nullptr );
1673 std::vector< std::pair<SwTableBox *, SwNodeOffset> > aDelNodes;
1678 SwTableBox* pCpyBox = pTableNd->GetTable().GetTabSortBoxes()[0];
1690 rLnBoxes.push_back( pBox );
1701 for (
size_t n = aTmp.size();
n > 0 ; )
1706 SwTableBox* pBox = pTableNd->GetTable().GetTableBox( nIdx );
1707 OSL_ENSURE( pBox,
"Where is my TableBox?" );
1711 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1717 if( aTmp[
n].hasMoved )
1723 SwNodeIndex aInsPos( *(pLine->GetTabBoxes()[0]->GetSttNd()), 2 );
1728 nNdCnt = aRg.aEnd.GetIndex() - aRg.aStart.GetIndex();
1729 while( i && aTmp[ --i ].
index > nSttIdx )
1730 aTmp[ i ].index += nNdCnt;
1739 aDelNodes.emplace_back(pBox, nIdx);
1746 std::set<BoxMove>::reverse_iterator it;
1750 SwTableBox* pBox = pTableNd->GetTable().GetTableBox( nIdx );
1751 OSL_ENSURE( pBox,
"Where's my table box?" );
1754 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1756 aDelNodes.emplace_back(pBox, nIdx);
1761 aTmpBox.SetTableLines(aDelBoxes, pTableNd->GetTable());
1762 aTmpBox.DelFrames(pTableNd->GetTable());
1766 for (
const std::pair<SwTableBox *, SwNodeOffset> & rDelNode : aDelNodes)
1770 rDelNode.first->RemoveFromTable();
1775 for(
size_t n = 0;
n < aDelBoxes.
size(); ++
n )
1779 pTBoxes->erase( std::find( pTBoxes->begin(), pTBoxes->end(), pCurrBox ) );
1786 rDoc.
UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() );
1799 OSL_ENSURE( pTableNd,
"no TableNode" );
1803 for (
const auto& rBox :
m_Boxes)
1806 aSelBoxes.insert( pBox );
1833 rTable.
DeleteSel( &rDoc, aSelBoxes,
nullptr,
this,
true,
true );
1848 OSL_ENSURE( pTableNd,
"Where is the TableNode?" );
1850 m_nTableNode = pTableNd->
GetIndex();
1866 OSL_ENSURE( pTableNd,
"no TableNode" );
1877 SwTableBox *pBox, *pCpyBox = pTableNd->GetTable().GetTabSortBoxes()[0];
1885 for (
const auto& rBox : m_Boxes)
1892 rLnBoxes.push_back( pBox );
1894 aSelBoxes.insert( pBox );
1902 for(
size_t n = m_aNewStartNodes.size();
n; )
1909 nIdx = m_aNewStartNodes[ --
n ];
1910 pBox = pTableNd->GetTable().GetTableBox( nIdx );
1911 OSL_ENSURE( pBox,
"Where is my TableBox?" );
1918 for (
size_t i = m_vMoves.size();
i; )
1921 sal_Int32 nDelPos = 0;
1946 SwIndex aTmpIdx( pTextNd, nDelPos );
1956 pBox = pTableNd->GetTable().GetTableBox( nIdx );
1962 pPCD->
DeleteBox( &pTableNd->GetTable(), *pBox );
1965 pTBoxes->erase( std::find(pTBoxes->begin(), pTBoxes->end(), pBox ) );
1971 SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ),
1984 rDoc.
UpdateCharts( pTableNd->GetTable().GetFrameFormat()->GetName() );
1988 m_pHistory->TmpRollback( &rDoc, 0 );
1989 m_pHistory->SetTmpEnd( m_pHistory->Count() );
1994 pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), m_nSttContent );
2005 SwPaM & rPam( AddUndoRedoPaM(rContext) );
2012 std::unique_ptr<SwUndoMove> pUndo(
new SwUndoMove( rDoc, rRg, rPos ));
2019 pUndo->SetDestRange( aTmp2, rPos, aTmp );
2021 m_vMoves.push_back(std::move(pUndo));
2027 for (
size_t n = 0;
n < rBoxes.
size(); ++
n)
2029 m_Boxes.insert(rBoxes[
n]->GetSttIdx());
2037 if( !rBoxes.
empty() )
2038 m_nTableNode = rBoxes[ 0 ]->GetSttNd()->FindTableNode()->GetIndex();
2051 m_pHistory->
Add( pCNd->GetFormatColl(), aIdx.GetIndex(), pCNd->GetNodeType());
2052 if( pCNd->HasSwAttrSet() )
2053 m_pHistory->CopyFormatAttr( *pCNd->GetpSwAttrSet(), aIdx.GetIndex() );
2060 , m_nNewFormatIdx(0)
2063 , m_bNewFormat(
false)
2064 , m_bNewFormula(
false)
2065 , m_bNewValue(
false)
2081 pTNd->
GetText().getLength(), true );
2131 OSL_ENSURE(
m_pBoxSet,
"Where's the stored item set?" );
2136 OSL_ENSURE( pSttNd,
"without StartNode no TableBox" );
2139 OSL_ENSURE( pBox,
"found no TableBox" );
2174 sal_uInt16 nTmpEnd =
m_pHistory->GetTmpEnd();
2181 pPam->GetPoint()->nNode =
m_nNode + 1;
2182 pPam->GetPoint()->nContent.Assign( pTextNd, 0 );
2192 class RedlineFlagsInternGuard
2198 RedlineFlagsInternGuard(
2203 ~RedlineFlagsInternGuard();
2208 RedlineFlagsInternGuard::RedlineFlagsInternGuard(
2213 meOldRedlineFlags( rDoc.getIDocumentRedlineAccess().GetRedlineFlags() )
2215 mrDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( ( meOldRedlineFlags & ~eRedlineFlagsMask ) |
2216 ( eNewRedlineFlags & eRedlineFlagsMask ) );
2219 RedlineFlagsInternGuard::~RedlineFlagsInternGuard()
2221 mrDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( meOldRedlineFlags );
2234 pPam->GetPoint()->nNode =
m_nNode;
2236 SwNode * pNd = & pPam->GetPoint()->nNode.GetNode();
2238 assert(pSttNd &&
"without StartNode no TableBox");
2241 OSL_ENSURE( pBox,
"found no TableBox" );
2311 pPam->GetPoint()->nContent.Assign( static_cast<SwContentNode*>(pNd), 0 );
2320 : nBoxIdx( rBox.GetSttIdx() ), nOffset( 0 ),
2327 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"UndoTableCpyTable_Entry"));
2329 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"nBoxIdx"));
2330 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"),
2331 BAD_CAST(OString::number(sal_Int32(
nBoxIdx)).getStr()));
2332 (
void)xmlTextWriterEndElement(pWriter);
2334 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"nOffset"));
2335 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"),
2336 BAD_CAST(OString::number(sal_Int32(
nOffset)).getStr()));
2337 (
void)xmlTextWriterEndElement(pWriter);
2341 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"pBoxNumAttr"));
2343 (
void)xmlTextWriterEndElement(pWriter);
2348 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"pUndo"));
2349 pUndo->dumpAsXml(pWriter);
2350 (
void)xmlTextWriterEndElement(pWriter);
2353 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"bJoin"));
2354 (
void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST(
"value"),
2355 BAD_CAST(OString::boolean(
bJoin).getStr()));
2356 (
void)xmlTextWriterEndElement(pWriter);
2358 (
void)xmlTextWriterEndElement(pWriter);
2378 for (
size_t n =
m_vArr.size();
n; )
2390 "SwUndoTableCpyTable::UndoImpl: invalid start node index for table box");
2401 SwPaM aPam( aInsIdx.GetNode(), *pEndNode );
2402 std::unique_ptr<SwUndoDelete> pUndo;
2406 bool bDeleteCompleteParagraph =
false;
2407 bool bShiftPam =
false;
2415 assert(pUndoDelete || pUndoRedlineDelete);
2416 if (pUndoRedlineDelete)
2419 bDeleteCompleteParagraph = !pEntry->
bJoin;
2422 pUndoRedlineDelete->
NodeDiff()-1 );
2426 aPam.GetPoint()->nNode = *pText;
2427 aPam.GetPoint()->nContent.Assign( pText,
2440 bDeleteCompleteParagraph =
true;
2446 aPam.GetPoint()->nNode = *pText;
2447 aPam.GetPoint()->nContent.Assign( pText, 0 );
2457 pEntry->
pUndo->UndoImpl(rContext);
2458 pEntry->
pUndo.reset();
2468 aPam.GetPoint()->nNode = *pText;
2469 aPam.GetPoint()->nContent.Assign( pText, 0 );
2474 pUndo = std::make_unique<SwUndoDelete>( aPam, bDeleteCompleteParagraph, true );
2478 pUndo = std::make_unique<SwUndoDelete>( aPam, true );
2481 pEntry->
pUndo->UndoImpl(rContext);
2482 pEntry->
pUndo.reset();
2485 pEntry->
pUndo = std::move(pUndo);
2495 if( aTmpSet.Count() )
2508 if( aTmpSet.Count() )
2537 for (
size_t n = 0;
n <
m_vArr.size(); ++
n)
2555 pEntry->
pUndo->UndoImpl(rContext);
2567 pEntry->
bJoin, true );
2575 pEntry->
pUndo.reset();
2577 pEntry->
pUndo = std::move(pUndo);
2587 if( aTmpSet.Count() )
2599 if( aTmpSet.Count() )
2614 if (!
m_vArr.empty() && !bDelContent)
2618 m_vArr.push_back(std::unique_ptr<UndoTableCpyTable_Entry>(pEntry));
2629 pEntry->
pUndo = std::make_unique<SwUndoDelete>( aPam,
true );
2675 std::unique_ptr<SwUndo> pUndo;
2709 SwPosition aDeleteStart( rJoin ? aInsertEnd : rPos );
2720 if( aDeleteStart != aCellEnd )
2722 SwPaM aDeletePam( aDeleteStart, aCellEnd );
2723 pUndo = std::make_unique<SwUndoRedlineDelete>( aDeletePam,
SwUndoId::DELETE );
2730 SwPaM aTmpPam( aDeleteStart, aCellEnd );
2731 pUndo = std::make_unique<SwUndoDelete>( aTmpPam, true );
2737 if( aCellStart != aInsertEnd )
2739 SwPaM aTmpPam( aCellStart, aInsertEnd );
2751 GetSttNd()->FindTableNode());
2754 0, 0, nCnt,
true,
false ) );
2769 (
void)xmlTextWriterStartElement(pWriter, BAD_CAST(
"SwUndoTableCpyTable"));
2771 for (
const auto& pEntry :
m_vArr)
2773 pEntry->dumpAsXml(pWriter);
2781 (
void)xmlTextWriterEndElement(pWriter);
2831 m_nTableNode( rTableNd.GetIndex() ), m_nOffset( 0 ), mpSaveRowSpan(
std::move(pRowSp) ),
2832 m_nMode( eMode ), m_nFormulaEnd( 0 ), m_bCalcNewSize( bNewSize )
2861 pPam->GetPoint()->nContent.Assign(rIdx.GetNode().GetContentNode(), 0);
2862 assert(rIdx.GetNode().GetContentNode()->Len() == 0);
2905 FndBox_ aTmpBox(
nullptr,
nullptr );
2908 rTable.
DeleteSel( pDoc, aSelBoxes,
nullptr,
nullptr,
false,
false );
2962 bool bWithPrv, sal_uInt16 nMd )
2964 m_nMode( nMd ), m_bWithPrev( bWithPrv )
3003 FndBox_ aFndBox(
nullptr,
nullptr );
3038 pPam->GetPoint()->nContent.Assign( pCNd, 0 );
3084 void InsertSort( std::vector<sal_uInt16>& rArr, sal_uInt16 nIdx )
3086 size_t nO = rArr.size();
3093 const size_t nM = nU + ( nO - nU ) / 2;
3094 if ( rArr[nM] == nIdx )
3096 OSL_FAIL(
"Index already exists. This should never happen." );
3099 if( rArr[nM] < nIdx )
3107 rArr.insert( rArr.begin() + nU, nIdx );
3110 #if OSL_DEBUG_LEVEL > 0
3115 for (
size_t n = 0;
n < rSrtArr.
size(); ++
n)
3119 OSL_ENSURE( rNds[ pBox->
GetSttIdx() ] == pNd,
"Box with wrong StartNode" );
3159 m_pAutoFormat(
std::move(pAutoFormat)),
3160 m_rAffectedTables(
std::move(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.
virtual SwCursor & CreateNewShellCursor()=0
SwPaM & AddUndoRedoPaM(::sw::UndoRedoContext &, bool const bCorrToContent=false) const
SwTableToTextSave(SwDoc &rDoc, SwNodeOffset nNd, SwNodeOffset nEndIdx, sal_Int32 nContent)
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
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)
void dumpAsXml(xmlTextWriterPtr pWriter) const
std::unique_ptr< SwDDEFieldType > m_pDDEFieldType
SwNodeOffset EndOfSectionIndex() const
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
virtual void UndoImpl(::sw::UndoRedoContext &) override
Represents the style of a paragraph.
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
Marks a position in the document model.
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwNodeOffset m_nTableNode
virtual ~SwUndoTableMerge() override
std::unique_ptr< SaveTable > m_pSaveTable
virtual void RedoImpl(::sw::UndoRedoContext &) override
SwUndoTableCpyTable(const SwDoc &rDoc)
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
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
void DelFrames(SwRootFrame const *pLayout=nullptr)
Method deletes all views of document for the node.
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
virtual const SwRootFrame * GetCurrentLayout() const =0
static constexpr auto Items
bool GotoPrevTable(SwPaM &rCurrentCursor, SwMoveFnCollection const &fnPosTable, bool bInReadOnly)
constexpr SwNodeOffset NODE_OFFSET_MAX(SAL_MAX_INT32)
virtual sal_uInt16 ResetAllAttr() override
SwDocShell * GetDocShell()
std::pair< sal_uInt16, sal_uInt16 > WhichPair
SwpHints * GetpSwpHints()
virtual void RedoImpl(::sw::UndoRedoContext &) override
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.
static void RemoveIdxFromSection(SwDoc &, SwNodeOffset nSttIdx, const SwNodeOffset *pEndIdx=nullptr)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwTableNode * UndoTableToText(SwNodeOffset nStt, SwNodeOffset nEnd, const SwTableToTextSaves &rSavedData)
Is in untbl.cxx and may called only by Undo-object.
SwDoc & GetDoc()
Which Doc contains the nodes-array?
void ReNewBoxes(const SwSelBoxes &rBoxes)
std::vector< SwTable * > m_rAffectedTables
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
SwUndoTableToText(const SwTable &rTable, sal_Unicode cCh)
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)
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...
static std::unique_ptr< SwUndo > PrepareRedline(SwDoc *pDoc, const SwTableBox &rBox, SwPosition &rPos, bool &rJoin, bool bRedo)
const SwHistory * GetHistory() const
bool TmpRollback(SwDoc *pDoc, sal_uInt16 nStart, bool ToFirst=true)
IDocumentUndoRedo & GetIDocumentUndoRedo()
SwUndoTableStyleDelete(std::unique_ptr< SwTableAutoFormat > pAutoFormat, std::vector< SwTable * > &&rAffectedTables, const SwDoc &rDoc)
SwInsertTableOptions m_aInsertTableOpts
std::unique_ptr< SwHistory > m_pHistory
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.
constexpr TypedWhichId< SwTableBoxValue > RES_BOXATR_VALUE(152)
SwNodeOffset m_nStartNode
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
SwNodeOffset GetSttIdx() const
virtual void UndoImpl(::sw::UndoRedoContext &) override
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
OUString SwResId(TranslateId aId)
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
sal_uInt16 m_nOldHeadline
constexpr TypedWhichId< SwFormatVertOrient > RES_VERT_ORIENT(102)
virtual void UndoImpl(::sw::UndoRedoContext &) override
SwFrameFormatsV m_aFrameFormats
bool IsDelFullPara() const
SwTableNode * GetTableNode()
SwNodeOffset m_nStartNode
void MoveTo(SwIndexReg &rArr)
virtual ~SwUndoTableNdsChg() override
bool UpdateTableStyleFormatting(SwTableNode *pTableNode=nullptr, bool bResetDirect=false, OUString const *pStyleName=nullptr)
Update the direct formatting according to the current table style.
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
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
sal_Int32 GetDestSttContent() const
const SwTextFormatColl * GetDfltTextFormatColl() const
SwNodeOffset m_nTableNode
static bool IsRedlineOn(const RedlineFlags eM)
void SetTableModel(bool bNew)
std::unique_ptr< SwTableAutoFormat > m_pAutoFormat
virtual void UpdateTableFields(SfxPoolItem *pHt)=0
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::vector< SwNodeOffset > mvDelBoxes
std::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd
SwNodeOffset GetIndex() const
const OUString & GetTableStyleName() const
Return the table style name of this table.
virtual OUString GetName() const override
void NewFrameFormatForBox(const SwTableBox &, sal_uInt16 nFormatPos, SwFrameFormat *pOldFormat)
std::unique_ptr< SaveTable > m_pSaveTable
void UpdateCharts(const OUString &rName) const
static void RemoveIdxFromRange(SwPaM &rPam, bool bMoveNext)
SwAttrPool * GetPool() const
RedlineFlags GetRedlineFlags() const
std::vector< SwTableLine * >::const_iterator const_iterator
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
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)
WhichRangesContainer const aTableLineSetRange(svl::Items< RES_FILL_ORDER, RES_FRM_SIZE, RES_LR_SPACE, RES_UL_SPACE, RES_PRINT, RES_PRINT, RES_PROTECT, RES_PROTECT, RES_VERT_ORIENT, RES_VERT_ORIENT, RES_BACKGROUND, RES_SHADOW, RES_ROW_SPLIT, RES_ROW_SPLIT, RES_FRMATR_GRABBAG, RES_FRMATR_GRABBAG, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1 >)
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)
SwNodeOffset GetEndNode() const
static SwSelBoxes & SelLineFromBox(const SwTableBox *pBox, SwSelBoxes &rBoxes, bool bToTop=true)
sal_uInt16 AddFormat(SwFrameFormat *pFormat, bool bIsLine)
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
void dumpAsXml(xmlTextWriterPtr pWriter) const override
std::optional< std::set< BoxMove > > m_xNewSttNds
virtual ~SwUndoTableToText() override
std::vector< std::unique_ptr< SwTableToTextSave >> SwTableToTextSaves
SwNodeOffset IsValidNumTextNd(bool bCheckAttr=true) const
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)
SwNodeOffset m_nTableNode
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()
SwNodeOffset GetIndex() const
void SetSelBoxes(const SwSelBoxes &rBoxes)
SplitTable_HeadlineOption
SwUndoTableStyleUpdate(const SwTableAutoFormat &rNewFormat, const SwTableAutoFormat &rOldFormat, const SwDoc &rDoc)
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
void InvalidateInSwCache(const sal_uInt16)
constexpr TypedWhichId< SwAttrSetChg > RES_ATTRSET_CHG(163)
Marks a character position inside a document model node.
void AddRule(SwUndoArg eWhat, const OUString &rWith)
SwFrameFormat * GetFrameFormat()
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.
SwNodeOffset GetDestSttNode() const
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
SwTableLines & GetTabLines()
IDocumentLayoutAccess const & getIDocumentLayoutAccess() const
std::unique_ptr< SwTableAutoFormat > DelTableStyle(const OUString &rName, bool bBroadcast=false)
SwTable is one table in the document model, containing rows (which contain cells).
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
virtual void RedoImpl(::sw::UndoRedoContext &) override
std::unique_ptr< SaveTable > m_pSavedTable
virtual ~SwUndoTableStyleDelete() override
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)
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
void AddBoxPos(SwDoc &rDoc, SwNodeOffset nNdIdx, SwNodeOffset nEndIdx, sal_Int32 nContentIdx=SAL_MAX_INT32)
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)
WhichRangesContainer const aTableSetRange(svl::Items< RES_FILL_ORDER, RES_FRM_SIZE, RES_LR_SPACE, RES_BREAK, RES_HORI_ORIENT, RES_HORI_ORIENT, RES_BACKGROUND, RES_SHADOW, RES_KEEP, RES_KEEP, RES_LAYOUT_SPLIT, RES_LAYOUT_SPLIT, RES_FRAMEDIR, RES_FRAMEDIR, RES_COLLAPSING_BORDERS, RES_COLLAPSING_BORDERS, RES_FRMATR_GRABBAG, RES_FRMATR_GRABBAG, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1 >)
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)
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()
SwTextNode * SplitContentNode(const SwPosition &, std::function< void(SwTextNode *, sw::mark::RestoreMode, bool AtStart)> const *pContentIndexRestore)
void InsertSort(std::vector< sal_uInt16 > &rArr, sal_uInt16 nIdx)
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
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.
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
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...
void Delete(const SwNodeIndex &rPos, SwNodeOffset nNodes=SwNodeOffset(1))
delete nodes
WhichRangesContainer const aSave_BoxContentSet(svl::Items< RES_CHRATR_COLOR, RES_CHRATR_CROSSEDOUT, RES_CHRATR_FONT, RES_CHRATR_FONTSIZE, RES_CHRATR_POSTURE, RES_CHRATR_POSTURE, RES_CHRATR_SHADOWED, RES_CHRATR_WEIGHT, RES_PARATR_ADJUST, RES_PARATR_ADJUST >)
std::vector< std::shared_ptr< SfxItemSet > > SfxItemSets
virtual void RedoImpl(::sw::UndoRedoContext &) override
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
void InsertCol(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
Inserting Columns/Rows.
virtual SwContentNode * JoinNext()
SwNodeOffset m_nTableNode
virtual ~SwUndoTableStyleMake() override
bool IsHideRedlines() const
Replacement for sw::DocumentRedlineManager::GetRedlineFlags() (this is layout-level redline hiding)...
SwFrameFormat * ClaimFrameFormat()
static void RemoveIdxRel(SwNodeOffset, const SwPosition &)
virtual SwCursor & GetCurrentShellCursor()=0
void SetRowsToRepeat(SwTable &rTable, sal_uInt16 nSet)
SwFEShell * GetFEShell()
For Core - it knows the DocShell but not the WrtShell!
std::unique_ptr< SwRedlineData > m_pRedlineData
WhichRangesContainer const aTableBoxSetRange(svl::Items< RES_FILL_ORDER, RES_FRM_SIZE, RES_LR_SPACE, RES_UL_SPACE, RES_PROTECT, RES_PROTECT, RES_VERT_ORIENT, RES_VERT_ORIENT, RES_BACKGROUND, RES_SHADOW, RES_FRAMEDIR, RES_FRAMEDIR, RES_FRMATR_GRABBAG, RES_FRMATR_GRABBAG, RES_BOXATR_BEGIN, RES_BOXATR_END-1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1 >)
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.
#define SAL_WARN(area, stream)
std::set< SwNodeOffset > m_Boxes
SwNodeOffset NodeDiff() const
void setRowSpan(sal_Int32 nNewRowSpan)
SwTableToTextSave & operator=(const SwTableToTextSave &)=delete
struct _xmlTextWriter * xmlTextWriterPtr
sal_uInt16 GetPos(const SwTableLine *pBox) const
SwNodeOffset m_nStartNode
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
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
bool m_bDetectedRangeSegmentation false
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