LibreOffice Module sw (master)  1
ndcopy.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #include <doc.hxx>
21 #include <IDocumentUndoRedo.hxx>
22 #include <node.hxx>
23 #include <frmfmt.hxx>
24 #include <swtable.hxx>
25 #include <ndtxt.hxx>
26 #include <swtblfmt.hxx>
27 #include <cellatr.hxx>
28 #include <ddefld.hxx>
29 #include <swddetbl.hxx>
30 #include <ndindex.hxx>
31 #include <frameformats.hxx>
32 #include <vector>
33 #include <osl/diagnose.h>
34 #include <svl/numformat.hxx>
35 
36 
37 #ifdef DBG_UTIL
38 #define CHECK_TABLE(t) (t).CheckConsistency();
39 #else
40 #define CHECK_TABLE(t)
41 #endif
42 
43 namespace {
44 
45 // Structure for the mapping from old and new frame formats to the
46 // boxes and lines of a table
47 struct MapTableFrameFormat
48 {
49  const SwFrameFormat *pOld;
50  SwFrameFormat *pNew;
51  MapTableFrameFormat( const SwFrameFormat *pOldFormat, SwFrameFormat*pNewFormat )
52  : pOld( pOldFormat ), pNew( pNewFormat )
53  {}
54 };
55 
56 }
57 
58 typedef std::vector<MapTableFrameFormat> MapTableFrameFormats;
59 
60 SwContentNode* SwTextNode::MakeCopy(SwDoc& rDoc, const SwNodeIndex& rIdx, bool const bNewFrames) const
61 {
62  // the Copy-Textnode is the Node with the Text, the Copy-Attrnode is the
63  // node with the collection and hard attributes. Normally is the same
64  // node, but if insert a glossary without formatting, then the Attrnode
65  // is the prev node of the destination position in dest. document.
66  SwTextNode* pCpyTextNd = const_cast<SwTextNode*>(this);
67  SwTextNode* pCpyAttrNd = pCpyTextNd;
68 
69  // Copy the formats to the other document
70  SwTextFormatColl* pColl = nullptr;
71  if( rDoc.IsInsOnlyTextGlossary() )
72  {
73  SwNodeIndex aIdx( rIdx, -1 );
74  if( aIdx.GetNode().IsTextNode() )
75  {
76  pCpyAttrNd = aIdx.GetNode().GetTextNode();
77  pColl = &pCpyAttrNd->GetTextColl()->GetNextTextFormatColl();
78  }
79  }
80  if( !pColl )
81  pColl = rDoc.CopyTextColl( *GetTextColl() );
82 
83  SwTextNode* pTextNd = rDoc.GetNodes().MakeTextNode(rIdx, pColl, bNewFrames);
84 
85  // METADATA: register copy
86  pTextNd->RegisterAsCopyOf(*pCpyTextNd);
87 
88  // Copy Attribute/Text
89  if( !pCpyAttrNd->HasSwAttrSet() )
90  // An AttrSet was added for numbering, so delete it
91  pTextNd->ResetAllAttr();
92 
93  // if Copy-Textnode unequal to Copy-Attrnode, then copy first
94  // the attributes into the new Node.
95  if( pCpyAttrNd != pCpyTextNd )
96  {
97  pCpyAttrNd->CopyAttr( pTextNd, 0, 0 );
98  if( pCpyAttrNd->HasSwAttrSet() )
99  {
100  SwAttrSet aSet( *pCpyAttrNd->GetpSwAttrSet() );
101  aSet.ClearItem( RES_PAGEDESC );
102  aSet.ClearItem( RES_BREAK );
103  aSet.CopyToModify( *pTextNd );
104  }
105  }
106 
107  // Is that enough? What about PostIts/Fields/FieldTypes?
108  // #i96213# - force copy of all attributes
109  pCpyTextNd->CopyText( pTextNd, SwIndex( pCpyTextNd ),
110  pCpyTextNd->GetText().getLength(), true );
111 
112  if( RES_CONDTXTFMTCOLL == pColl->Which() )
113  pTextNd->ChkCondColl();
114 
115  return pTextNd;
116 }
117 
118 static bool lcl_SrchNew( const MapTableFrameFormat& rMap, SwFrameFormat** pPara )
119 {
120  if( rMap.pOld != *pPara )
121  return true;
122  *pPara = rMap.pNew;
123  return false;
124 }
125 
126 namespace {
127 
128 struct CopyTable
129 {
130  SwDoc& m_rDoc;
131  sal_uLong m_nOldTableSttIdx;
132  MapTableFrameFormats& m_rMapArr;
133  SwTableLine* m_pInsLine;
134  SwTableBox* m_pInsBox;
135  SwTableNode *m_pTableNd;
136  const SwTable *m_pOldTable;
137 
138  CopyTable(SwDoc& rDc, MapTableFrameFormats& rArr, sal_uLong nOldStt,
139  SwTableNode& rTableNd, const SwTable* pOldTable)
140  : m_rDoc(rDc), m_nOldTableSttIdx(nOldStt), m_rMapArr(rArr),
141  m_pInsLine(nullptr), m_pInsBox(nullptr), m_pTableNd(&rTableNd), m_pOldTable(pOldTable)
142  {}
143 };
144 
145 }
146 
147 static void lcl_CopyTableLine( const SwTableLine* pLine, CopyTable* pCT );
148 
149 static void lcl_CopyTableBox( SwTableBox* pBox, CopyTable* pCT )
150 {
151  SwTableBoxFormat * pBoxFormat = static_cast<SwTableBoxFormat*>(pBox->GetFrameFormat());
152  for (const auto& rMap : pCT->m_rMapArr)
153  if ( !lcl_SrchNew( rMap, reinterpret_cast<SwFrameFormat**>(&pBoxFormat) ) )
154  break;
155 
156  if (pBoxFormat == pBox->GetFrameFormat()) // Create a new one?
157  {
158  const SfxPoolItem* pItem;
159  if( SfxItemState::SET == pBoxFormat->GetItemState( RES_BOXATR_FORMULA, false,
160  &pItem ) && static_cast<const SwTableBoxFormula*>(pItem)->IsIntrnlName() )
161  {
162  const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->PtrToBoxNm(pCT->m_pOldTable);
163  }
164 
165  pBoxFormat = pCT->m_rDoc.MakeTableBoxFormat();
166  pBoxFormat->CopyAttrs( *pBox->GetFrameFormat() );
167 
168  if( pBox->GetSttIdx() )
169  {
170  SvNumberFormatter* pN = pCT->m_rDoc.GetNumberFormatter(false);
171  if( pN && pN->HasMergeFormatTable() && SfxItemState::SET == pBoxFormat->
172  GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
173  {
174  sal_uLong nOldIdx = static_cast<const SwTableBoxNumFormat*>(pItem)->GetValue();
175  sal_uLong nNewIdx = pN->GetMergeFormatIndex( nOldIdx );
176  if( nNewIdx != nOldIdx )
177  pBoxFormat->SetFormatAttr( SwTableBoxNumFormat( nNewIdx ));
178 
179  }
180  }
181 
182  pCT->m_rMapArr.emplace_back(pBox->GetFrameFormat(), pBoxFormat);
183  }
184 
185  sal_uInt16 nLines = pBox->GetTabLines().size();
186  SwTableBox* pNewBox;
187  if( nLines )
188  pNewBox = new SwTableBox(pBoxFormat, nLines, pCT->m_pInsLine);
189  else
190  {
191  SwNodeIndex aNewIdx(*pCT->m_pTableNd, pBox->GetSttIdx() - pCT->m_nOldTableSttIdx);
192  assert(aNewIdx.GetNode().IsStartNode() && "Index is not on the start node");
193 
194  pNewBox = new SwTableBox(pBoxFormat, aNewIdx, pCT->m_pInsLine);
195  pNewBox->setRowSpan( pBox->getRowSpan() );
196  }
197 
198  pCT->m_pInsLine->GetTabBoxes().push_back( pNewBox );
199 
200  if (nLines)
201  {
202  CopyTable aPara(*pCT);
203  aPara.m_pInsBox = pNewBox;
204  for( const SwTableLine* pLine : pBox->GetTabLines() )
205  lcl_CopyTableLine( pLine, &aPara );
206  }
207  else if (pNewBox->IsInHeadline(&pCT->m_pTableNd->GetTable()))
208  {
209  // In the headline, the paragraphs must match conditional styles
210  pNewBox->GetSttNd()->CheckSectionCondColl();
211  }
212 }
213 
214 static void lcl_CopyTableLine( const SwTableLine* pLine, CopyTable* pCT )
215 {
216  SwTableLineFormat * pLineFormat = static_cast<SwTableLineFormat*>(pLine->GetFrameFormat());
217  for (const auto& rMap : pCT->m_rMapArr)
218  if ( !lcl_SrchNew( rMap, reinterpret_cast<SwFrameFormat**>(&pLineFormat) ) )
219  break;
220 
221  if( pLineFormat == pLine->GetFrameFormat() ) // Create a new one?
222  {
223  pLineFormat = pCT->m_rDoc.MakeTableLineFormat();
224  pLineFormat->CopyAttrs( *pLine->GetFrameFormat() );
225  pCT->m_rMapArr.emplace_back(pLine->GetFrameFormat(), pLineFormat);
226  }
227 
228  SwTableLine* pNewLine = new SwTableLine(pLineFormat, pLine->GetTabBoxes().size(), pCT->m_pInsBox);
229  // Insert the new row into the table
230  if (pCT->m_pInsBox)
231  {
232  pCT->m_pInsBox->GetTabLines().push_back(pNewLine);
233  }
234  else
235  {
236  pCT->m_pTableNd->GetTable().GetTabLines().push_back(pNewLine);
237  }
238 
239  pCT->m_pInsLine = pNewLine;
240  for( auto& rpBox : const_cast<SwTableLine*>(pLine)->GetTabBoxes() )
241  lcl_CopyTableBox(rpBox, pCT);
242 }
243 
245 {
246  // In which array are we? Nodes? UndoNodes?
247  SwNodes& rNds = const_cast<SwNodes&>(GetNodes());
248 
249  {
250  if( rIdx < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
251  rIdx >= rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex() )
252  return nullptr;
253  }
254 
255  // Copy the TableFrameFormat
256  OUString sTableName( GetTable().GetFrameFormat()->GetName() );
257  if( !rDoc.IsCopyIsMove() )
258  {
259  const SwFrameFormats& rTableFormats = *rDoc.GetTableFrameFormats();
260  for( size_t n = rTableFormats.size(); n; )
261  if( rTableFormats[ --n ]->GetName() == sTableName )
262  {
263  sTableName = rDoc.GetUniqueTableName();
264  break;
265  }
266  }
267 
268  SwFrameFormat* pTableFormat = rDoc.MakeTableFrameFormat( sTableName, rDoc.GetDfltFrameFormat() );
269  pTableFormat->CopyAttrs( *GetTable().GetFrameFormat() );
270  SwTableNode* pTableNd = new SwTableNode( rIdx );
271  SwEndNode* pEndNd = new SwEndNode( rIdx, *pTableNd );
272  SwNodeIndex aInsPos( *pEndNd );
273 
274  SwTable& rTable = pTableNd->GetTable();
275  rTable.SetTableStyleName(GetTable().GetTableStyleName());
276  rTable.RegisterToFormat( *pTableFormat );
277 
278  rTable.SetRowsToRepeat( GetTable().GetRowsToRepeat() );
279  rTable.SetTableChgMode( GetTable().GetTableChgMode() );
280  rTable.SetTableModel( GetTable().IsNewModel() );
281 
282  SwDDEFieldType* pDDEType = nullptr;
283  if( auto pSwDDETable = dynamic_cast<const SwDDETable*>( &GetTable() ) )
284  {
285  // We're copying a DDE table
286  // Is the field type available in the new document?
287  pDDEType = const_cast<SwDDETable*>(pSwDDETable)->GetDDEFieldType();
288  if( pDDEType->IsDeleted() )
289  rDoc.getIDocumentFieldsAccess().InsDeletedFieldType( *pDDEType );
290  else
291  pDDEType = static_cast<SwDDEFieldType*>(rDoc.getIDocumentFieldsAccess().InsertFieldType( *pDDEType ));
292  OSL_ENSURE( pDDEType, "unknown FieldType" );
293 
294  // Swap the table pointers in the node
295  std::unique_ptr<SwDDETable> pNewTable(new SwDDETable( pTableNd->GetTable(), pDDEType ));
296  pTableNd->SetNewTable( std::move(pNewTable), false );
297  }
298  // First copy the content of the tables, we will later assign the
299  // boxes/lines and create the frames
300  SwNodeRange aRg( *this, +1, *EndOfSectionNode() );
301 
302  // If there is a table in this table, the table format for the outer table
303  // does not seem to be used, because the table does not have any contents yet
304  // (see IsUsed). Therefore the inner table gets the same name as the outer table.
305  // We have to make sure that the table node of the SwTable is accessible, even
306  // without any content in m_TabSortContentBoxes. #i26629#
307  pTableNd->GetTable().SetTableNode( pTableNd );
308  rNds.Copy_( aRg, aInsPos, false );
309  pTableNd->GetTable().SetTableNode( nullptr );
310 
311  // Special case for a single box
312  if( 1 == GetTable().GetTabSortBoxes().size() )
313  {
314  aRg.aStart.Assign( *pTableNd, 1 );
315  aRg.aEnd.Assign( *pTableNd->EndOfSectionNode() );
316  rDoc.GetNodes().SectionDown( &aRg, SwTableBoxStartNode );
317  }
318 
319  // Delete all frames from the copied area, they will be created
320  // during the generation of the table frame
321  pTableNd->DelFrames();
322 
323  MapTableFrameFormats aMapArr;
324  CopyTable aPara( rDoc, aMapArr, GetIndex(), *pTableNd, &GetTable() );
325 
326  for( const SwTableLine* pLine : GetTable().GetTabLines() )
327  lcl_CopyTableLine( pLine, &aPara );
328 
329  if( pDDEType )
330  pDDEType->IncRefCnt();
331 
332  CHECK_TABLE( GetTable() );
333  return pTableNd;
334 }
335 
336 void SwTextNode::CopyCollFormat(SwTextNode& rDestNd, bool const bUndoForChgFormatColl)
337 {
338  // Copy the formats into the other document:
339  // Special case for PageBreak/PageDesc/ColBrk
340  SwDoc& rDestDoc = rDestNd.GetDoc();
341  SwAttrSet aPgBrkSet( rDestDoc.GetAttrPool(), aBreakSetRange );
342  const SwAttrSet* pSet;
343 
344  pSet = rDestNd.GetpSwAttrSet();
345  if( nullptr != pSet )
346  {
347  // Special cases for Break-Attributes
348  const SfxPoolItem* pAttr;
349  if( SfxItemState::SET == pSet->GetItemState( RES_BREAK, false, &pAttr ) )
350  aPgBrkSet.Put( *pAttr );
351 
352  if( SfxItemState::SET == pSet->GetItemState( RES_PAGEDESC, false, &pAttr ) )
353  aPgBrkSet.Put( *pAttr );
354  }
355 
356  // this may create undo action SwUndoFormatCreate
357  auto const pCopy( rDestDoc.CopyTextColl( *GetTextColl() ) );
358  if (bUndoForChgFormatColl)
359  {
360  rDestNd.ChgFormatColl(pCopy);
361  }
362  else // tdf#138897
363  {
364  ::sw::UndoGuard const ug(rDestDoc.GetIDocumentUndoRedo());
365  rDestNd.ChgFormatColl(pCopy);
366  }
367  pSet = GetpSwAttrSet();
368  if( nullptr != pSet )
369  {
370  // note: this may create undo actions but not for setting the items
371  pSet->CopyToModify( rDestNd );
372  }
373 
374  if( aPgBrkSet.Count() )
375  rDestNd.SetAttr( aPgBrkSet );
376 }
377 
378 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwTableFormat * MakeTableFrameFormat(const OUString &rFormatName, SwFrameFormat *pDerivedFrom)
Definition: docfmt.cxx:813
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:683
constexpr TypedWhichId< SwFormatPageDesc > RES_PAGEDESC(93)
SwNode & GetEndOfInserts() const
Section for all footnotes.
Definition: ndarr.hxx:154
sal_uLong GetIndex() const
Definition: node.hxx:291
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
Definition: swtable.hxx:197
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
void RegisterToFormat(SwFormat &rFormat)
Definition: swtable.cxx:2793
void RegisterAsCopyOf(Metadatable const &i_rSource, const bool i_bCopyPrecedesSource=false)
sal_uLong StartOfSectionIndex() const
Definition: node.hxx:674
void DelFrames(SwRootFrame const *pLayout=nullptr)
Method deletes all views of document for the node.
Definition: ndtbl.cxx:2446
constexpr TypedWhichId< SwTableBoxNumFormat > RES_BOXATR_FORMAT(RES_BOXATR_BEGIN)
const OUString & GetText() const
Definition: ndtxt.hxx:215
sal_uLong GetSttIdx() const
Definition: swtable.cxx:1916
virtual sal_uInt16 ResetAllAttr() override
Definition: ndtxt.cxx:5095
virtual bool SetAttr(const SfxPoolItem &) override
overriding to handle change of certain paragraph attributes
Definition: ndtxt.cxx:4834
std::string GetValue
const SwFrameFormats * GetTableFrameFormats() const
Definition: doc.hxx:811
sal_uIntPtr sal_uLong
OUString GetUniqueTableName() const
Definition: ndtbl.cxx:3900
bool IsDeleted() const
Definition: ddefld.hxx:86
sal_Int64 n
Definition: doc.hxx:188
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
SwTableLine is one table row in the document model.
Definition: swtable.hxx:357
SwNode & GetNode() const
Definition: ndindex.hxx:119
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
IDocumentUndoRedo & GetIDocumentUndoRedo()
Definition: doc.cxx:144
bool IsInHeadline(const SwTable *pTable) const
Definition: swtable.cxx:1900
void CheckSectionCondColl() const
Call ChkCondcoll to all ContentNodes of section.
Definition: node.cxx:975
void Copy_(const SwNodeRange &rRg, const SwNodeIndex &rInsPos, bool bNewFrames=true) const
Definition: ndarr.hxx:176
bool IsInsOnlyTextGlossary() const
Definition: doc.hxx:657
static bool lcl_SrchNew(const MapTableFrameFormat &rMap, SwFrameFormat **pPara)
Definition: ndcopy.cxx:118
size_type size() const
Definition: swtable.hxx:76
sal_Int32 getRowSpan() const
Definition: swtable.cxx:76
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:357
SwDoc & m_rDoc
Definition: docbm.cxx:1204
SwNodeIndex aStart
Definition: ndindex.hxx:132
void SetTableModel(bool bNew)
Definition: swtable.hxx:187
#define CHECK_TABLE(t)
Definition: ndcopy.cxx:38
SwTextFormatColl * CopyTextColl(const SwTextFormatColl &rColl)
copy TextNodes
Definition: docfmt.cxx:1178
const SwTable & GetTable() const
Definition: node.hxx:499
SwTableNode * MakeCopy(SwDoc &, const SwNodeIndex &) const
Definition: ndcopy.cxx:244
void ChkCondColl(const SwTextFormatColl *pColl=nullptr)
Definition: node.cxx:1981
void SetTableNode(SwTableNode *pNode)
Definition: swtable.hxx:323
void CopyText(SwTextNode *const pDest, const SwIndex &rStart, const sal_Int32 nLen, const bool bForceCopyOfAllAttrs)
Actions on text and attributes.
Definition: ndtxt.cxx:1951
void PtrToBoxNm(const SwTable *pTable)
create from the internal formula (for CORE) the external formula (for UI)
Definition: cellfml.cxx:581
Specific frame formats (frames, DrawObjects).
const SwAttrSet * GetpSwAttrSet() const
Definition: node.hxx:450
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
Style of a layout element.
Definition: frmfmt.hxx:59
void SectionDown(SwNodeRange *pRange, SwStartNodeType=SwNormalStartNode)
create a start/end section pair
Definition: nodes.cxx:905
SwDoc & GetDoc()
Definition: node.hxx:212
static void lcl_CopyTableLine(const SwTableLine *pLine, CopyTable *pCT)
Definition: ndcopy.cxx:214
SAL_DLLPRIVATE void CopyAttr(SwTextNode *pDest, const sal_Int32 nStart, const sal_Int32 nOldPos)
Copies the attributes at nStart to pDest.
Definition: ndtxt.cxx:1891
virtual SwFormatColl * ChgFormatColl(SwFormatColl *) override
Definition: ndtxt.cxx:3885
WhichRangesContainer const aBreakSetRange(svl::Items< RES_PAGEDESC, RES_BREAK >)
virtual void InsDeletedFieldType(SwFieldType &)=0
SwFrameFormat * GetFrameFormat()
Definition: swtable.hxx:379
size
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
Definition: format.cxx:388
Marks a node in the document model.
Definition: ndindex.hxx:31
SwFrameFormat * GetFrameFormat()
Definition: swtable.hxx:444
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:694
bool HasSwAttrSet() const
Definition: node.hxx:451
SwTableNode(const SwNodeIndex &)
Definition: ndtbl.cxx:2346
bool HasMergeFormatTable() const
SwTable is one table in the document model, containing rows (which contain cells).
Definition: swtable.hxx:112
SwTableLines & GetTabLines()
Definition: swtable.hxx:437
const SwFrameFormat * GetDfltFrameFormat() const
Definition: doc.hxx:747
virtual bool SetFormatAttr(const SfxPoolItem &rAttr)
Definition: format.cxx:450
sal_uInt16 Which() const
for Querying of Writer-functions.
Definition: format.hxx:82
void SetTableChgMode(TableChgMode eMode)
Definition: swtable.hxx:334
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
SwTableBoxes & GetTabBoxes()
Definition: swtable.hxx:367
friend class SwIndex
Definition: index.hxx:108
const SwStartNode * GetSttNd() const
Definition: swtable.hxx:458
std::vector< MapTableFrameFormat > MapTableFrameFormats
Definition: ndcopy.cxx:58
void CopyAttrs(const SwFormat &)
Copy attributes even among documents.
Definition: format.cxx:174
sal_uInt32 GetMergeFormatIndex(sal_uInt32 nOldFmt) const
virtual SwFieldType * InsertFieldType(const SwFieldType &)=0
void SetTableStyleName(const OUString &rName)
Set the new table style name for this table.
Definition: swtable.hxx:194
bool IsCopyIsMove() const
Definition: doc.hxx:1372
friend class SwEndNode
to set the theEndOfSection !!
Definition: node.hxx:316
SwNodes & GetNodes()
Definition: doc.hxx:409
constexpr TypedWhichId< SwTableBoxFormula > RES_BOXATR_FORMULA(151)
SwNodeIndex aEnd
Definition: ndindex.hxx:133
SwTableBox is one table cell in the document model.
Definition: swtable.hxx:405
static void lcl_CopyTableBox(SwTableBox *pBox, CopyTable *pCT)
Definition: ndcopy.cxx:149
void CopyCollFormat(SwTextNode &rDestNd, bool bUndoForChgFormatColl=true)
Copy collection with all auto formats to dest-node.
Definition: ndcopy.cxx:336
size_t size() const
Ends a section of nodes in the document model.
Definition: node.hxx:342
void SetNewTable(std::unique_ptr< SwTable >, bool bNewFrames=true)
Definition: ndtbl.cxx:2489
bool IsTextNode() const
Definition: node.hxx:637
void IncRefCnt()
Definition: ddefld.hxx:98
SwTextFormatColl & GetNextTextFormatColl() const
Definition: fmtcol.hxx:104
const SwAttrPool & GetAttrPool() const
Definition: doc.hxx:1319
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
Definition: ndtxt.hxx:850
SwTextNode * MakeTextNode(const SwNodeIndex &rWhere, SwTextFormatColl *pColl, bool bNewFrames=true)
Implementations of "Make...Node" are in the given .cxx-files.
Definition: ndtxt.cxx:105
SwNodeIndex & Assign(SwNodes const &rNds, sal_uLong)
Definition: ndindex.hxx:272
virtual SwContentNode * MakeCopy(SwDoc &, const SwNodeIndex &, bool bNewFrames) const override
Definition: ndcopy.cxx:60
SwTextFormatColl * GetTextColl() const
Definition: ndtxt.hxx:844