33#include <osl/diagnose.h>
38#define CHECK_TABLE(t) (t).CheckConsistency();
47struct MapTableFrameFormat
52 : pOld( pOldFormat ), pNew( pNewFormat )
86 pTextNd->RegisterAsCopyOf(*pCpyTextNd);
95 if( pCpyAttrNd != pCpyTextNd )
97 pCpyAttrNd->
CopyAttr( pTextNd, 0, 0 );
110 pCpyTextNd->
GetText().getLength(),
true );
120 if( rMap.pOld != *pPara )
140 :
m_rDoc(rDc), m_nOldTableSttIdx(nOldStt), m_rMapArr(rArr),
141 m_pInsLine(nullptr), m_pInsBox(nullptr), m_pTableNd(&rTableNd), m_pOldTable(pOldTable)
152 for (
const auto& rMap : pCT->m_rMapArr)
164 pBoxFormat = pCT->m_rDoc.MakeTableBoxFormat();
176 if( nNewIdx != nOldIdx )
188 pNewBox =
new SwTableBox(pBoxFormat, nLines, pCT->m_pInsLine);
194 pNewBox =
new SwTableBox(pBoxFormat, aNewIdx, pCT->m_pInsLine);
198 pCT->m_pInsLine->GetTabBoxes().push_back( pNewBox );
202 CopyTable aPara(*pCT);
203 aPara.m_pInsBox = pNewBox;
207 else if (pNewBox->
IsInHeadline(&pCT->m_pTableNd->GetTable()))
217 for (
const auto& rMap : pCT->m_rMapArr)
223 pLineFormat = pCT->m_rDoc.MakeTableLineFormat();
225 pCT->m_rMapArr.emplace_back(pLine->
GetFrameFormat(), pLineFormat);
232 pCT->m_pInsBox->GetTabLines().push_back(pNewLine);
236 pCT->m_pTableNd->GetTable().GetTabLines().push_back(pNewLine);
239 pCT->m_pInsLine = pNewLine;
240 for(
auto& rpBox :
const_cast<SwTableLine*
>(pLine)->GetTabBoxes() )
260 for(
size_t n = rTableFormats.
size();
n; )
263 if (pFormat->
GetName() == sTableName && rDoc.
IsUsed(*pFormat))
290 pDDEType =
const_cast<SwDDETable*
>(pSwDDETable)->GetDDEFieldType();
295 OSL_ENSURE( pDDEType,
"unknown FieldType" );
298 std::unique_ptr<SwDDETable> pNewTable(
new SwDDETable( pTableNd->
GetTable(), pDDEType ));
299 pTableNd->
SetNewTable( std::move(pNewTable),
false );
348 if(
nullptr != pSet )
353 aPgBrkSet.
Put( *pAttr );
356 aPgBrkSet.
Put( *pAttr );
361 if (bUndoForChgFormatColl)
371 if(
nullptr != pSet )
377 if( aPgBrkSet.
Count() )
sal_uInt32 GetValue() const
virtual void InsDeletedFieldType(SwFieldType &)=0
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void CopyToModify(sw::BroadcastingModify &rMod) const
Marks a character position inside a document model content node (SwContentNode)
bool HasSwAttrSet() const
void ChkCondColl(const SwTextFormatColl *pColl=nullptr)
const SwAttrSet * GetpSwAttrSet() const
SwTextFormatColl * CopyTextColl(const SwTextFormatColl &rColl)
copy TextNodes
bool IsCopyIsMove() const
const sw::TableFrameFormats * GetTableFrameFormats() const
bool IsUsed(const sw::BroadcastingModify &) const
SwTableFormat * MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
IDocumentUndoRedo & GetIDocumentUndoRedo()
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
OUString GetUniqueTableName() const
const SwAttrPool & GetAttrPool() const
const SwFrameFormat * GetDfltFrameFormat() const
bool IsInsOnlyTextGlossary() const
Ends a section of nodes in the document model.
Marks a node in the document model.
SwNodeIndex & Assign(SwNodes const &rNds, SwNodeOffset nIdx)
Base class of the Writer document model elements.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
SwNodeOffset StartOfSectionIndex() const
const SwEndNode * EndOfSectionNode() const
SwTextNode * MakeTextNode(SwNode &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
void SectionDown(SwNodeRange *pRange, SwStartNodeType=SwNormalStartNode)
create a start/end section pair
void Copy_(const SwNodeRange &rRg, SwNode &rInsPos, bool bNewFrames=true) const
SwNode & GetEndOfInserts() const
Section for all footnotes.
void CheckSectionCondColl() const
Call ChkCondcoll to all ContentNodes of section.
friend class SwEndNode
to set the theEndOfSection !!
SwTableBox is one table cell in the document model.
sal_Int32 getRowSpan() const
SwNodeOffset GetSttIdx() const
void setRowSpan(sal_Int32 nNewRowSpan)
SwFrameFormat * GetFrameFormat()
SwTableLines & GetTabLines()
bool IsInHeadline(const SwTable *pTable) const
const SwStartNode * GetSttNd() const
SwTableLine is one table row in the document model.
SwFrameFormat * GetFrameFormat()
SwTableBoxes & GetTabBoxes()
SwTableNode * MakeCopy(SwDoc &, const SwNodeIndex &) const
void SetNewTable(std::unique_ptr< SwTable >, bool bNewFrames=true)
const SwTable & GetTable() const
SwTableNode(const SwNode &)
void DelFrames(SwRootFrame const *pLayout=nullptr)
Method deletes all views of document for the node.
SwTable is one table in the document model, containing rows (which contain cells).
void SetTableModel(bool bNew)
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
void RegisterToFormat(SwFormat &rFormat)
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
void SetTableChgMode(TableChgMode eMode)
void SetTableNode(SwTableNode *pNode)
Represents the style of a paragraph.
SwTextFormatColl & GetNextTextFormatColl() const
SwTextNode is a paragraph in the document model.
virtual SwContentNode * MakeCopy(SwDoc &, SwNode &rWhere, bool bNewFrames) const override
SAL_DLLPRIVATE void CopyAttr(SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos)
Copies the attributes at nStart to pDest.
void CopyText(SwTextNode *const pDest, const SwContentIndex &rStart, const sal_Int32 nLen, const bool bForceCopyOfAllAttrs)
Actions on text and attributes.
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
virtual SwFormatColl * ChgFormatColl(SwFormatColl *) override
void CopyCollFormat(SwTextNode &rDestNd, bool bUndoForChgFormatColl=true)
Copy collection with all auto formats to dest-node.
const OUString & GetText() const
SwTextFormatColl * GetTextColl() const
virtual sal_uInt16 ResetAllAttr() override
virtual OUString GetName() const override
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(166)
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(99)
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(157)
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(100)
WhichRangesContainer const aBreakSetRange(svl::Items< RES_PAGEDESC, RES_BREAK >)
std::vector< MapTableFrameFormat > MapTableFrameFormats
static void lcl_CopyTableLine(const SwTableLine *pLine, CopyTable *pCT)
static bool lcl_SrchNew(const MapTableFrameFormat &rMap, SwFrameFormat **pPara)
static void lcl_CopyTableBox(SwTableBox *pBox, CopyTable *pCT)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset