LibreOffice Module sw (master)  1
node2lay.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 
20 #include <calbck.hxx>
21 #include <node.hxx>
22 #include <ndindex.hxx>
23 #include <pam.hxx>
24 #include <swtable.hxx>
25 #include <ftnfrm.hxx>
26 #include <sectfrm.hxx>
27 #include <cntfrm.hxx>
28 #include <tabfrm.hxx>
29 #include <frmtool.hxx>
30 #include <section.hxx>
31 #include <node2lay.hxx>
32 #include <osl/diagnose.h>
33 
39 {
40  std::unique_ptr<SwIterator<SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti>> mpIter;
42  std::vector<SwFrame*> mvUpperFrames; // To collect the Upper
43  SwNodeOffset mnIndex; // The Index of the to-be-inserted Nodes
44  bool mbMaster : 1; // true => only Master, false => only Frames without Follow
45  bool mbInit : 1; // Did we already call First() at SwClient?
46 
47  SwNode2LayImpl(const SwNode2LayImpl&) = delete;
48  SwNode2LayImpl& operator=(const SwNode2LayImpl&) = delete;
49 
50 public:
51  SwNode2LayImpl( const SwNode& rNode, SwNodeOffset nIdx, bool bSearch );
52  SwFrame* NextFrame(); // Returns the next "useful" Frame
53  SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode &rNode );
54  void SaveUpperFrames(); // Saves (and locks if needed) the pUpper
55  // Inserts a Frame under every pUpper of the array
56  void RestoreUpperFrames( SwNodes& rNds, SwNodeOffset nStt, SwNodeOffset nEnd );
57 
58  SwFrame* GetFrame( const Point* pDocPos ) const;
59 };
60 
61 static SwNode* GoNextWithFrame(const SwNodes& rNodes, SwNodeIndex *pIdx, SwFlowFrame const**const ppFrame)
62 {
63  if( pIdx->GetIndex() >= rNodes.Count() - 1 )
64  return nullptr;
65 
66  SwNodeIndex aTmp(*pIdx, +1);
67  SwNode* pNd = nullptr;
68  while( aTmp < rNodes.Count()-1 )
69  {
70  pNd = &aTmp.GetNode();
71  SwFrame const* pFound(nullptr);
72  if ( pNd->IsContentNode() )
73  // sw_redlinehide: assume that it's OK to find a node with the same
74  // frame as the caller's one
75  pFound = SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti>(*static_cast<SwContentNode*>(pNd)).First();
76  else if ( pNd->IsTableNode() )
77  pFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First() ;
78  else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() )
79  {
80  pNd = nullptr;
81  break;
82  }
83  if (pFound != nullptr)
84  {
85  if (ppFrame)
86  {
87  *ppFrame = SwFlowFrame::CastFlowFrame(pFound);
88  assert(*ppFrame);
89  }
90  break;
91  }
92  ++aTmp;
93  }
94 
95  if( aTmp == rNodes.Count()-SwNodeOffset(1) )
96  pNd = nullptr;
97  else if( pNd )
98  (*pIdx) = aTmp;
99  return pNd;
100 }
101 
102 static SwNode* GoPreviousWithFrame(SwNodeIndex *pIdx, SwFlowFrame const**const ppFrame)
103 {
104  if( !pIdx->GetIndex() )
105  return nullptr;
106 
107  SwNodeIndex aTmp( *pIdx, -1 );
108  SwNode* pNd(nullptr);
109  while( aTmp.GetIndex() )
110  {
111  pNd = &aTmp.GetNode();
112  SwFrame const* pFound(nullptr);
113  if ( pNd->IsContentNode() )
114  // sw_redlinehide: assume that it's OK to find a node with the same
115  // frame as the caller's one
116  pFound = SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti>(*static_cast<SwContentNode*>(pNd)).First();
117  else if ( pNd->IsTableNode() )
118  pFound = SwIterator<SwFrame,SwFormat>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrameFormat()).First();
119  else if( pNd->IsStartNode() && !pNd->IsSectionNode() )
120  {
121  pNd = nullptr;
122  break;
123  }
124  if (pFound != nullptr)
125  {
126  if (ppFrame)
127  {
128  *ppFrame = SwFlowFrame::CastFlowFrame(pFound);
129  assert(*ppFrame);
130  }
131  break;
132  }
133  --aTmp;
134  }
135 
136  if( !aTmp.GetIndex() )
137  pNd = nullptr;
138  else if( pNd )
139  (*pIdx) = aTmp;
140  return pNd;
141 }
142 
143 namespace sw {
144 
146 {
147  SwNodeIndex idx(rNode);
148  SwFlowFrame const* pFlow(nullptr);
149  if (SwNode *const pNode = GoPreviousWithFrame(&idx, &pFlow))
150  {
151  if (::CheckNodesRange(rNode, idx, true))
152  {
153  while (pFlow->HasFollow())
154  { // try to get the one on the current page
155  pFlow = pFlow->GetFollow();
156  }
157  return &pFlow->GetFrame();
158  }
159  }
160  idx = rNode;
161  if (SwNode *const pNode = GoNextWithFrame(idx.GetNodes(), &idx, &pFlow))
162  {
163  if (::CheckNodesRange(rNode, idx, true))
164  {
165  while (pFlow->IsFollow())
166  { // try to get the one on the current page
167  pFlow = pFlow->GetPrecede();
168  }
169  return &pFlow->GetFrame();
170  }
171  }
172  return nullptr;
173 }
174 
175 }
176 
186 SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, SwNodeOffset nIdx, bool bSearch )
187  : mnIndex( nIdx ), mbInit( false )
188 {
189  const SwNode* pNd;
190  if( bSearch || rNode.IsSectionNode() )
191  {
192  // Find the next Content/TableNode that contains a Frame, so that we can add
193  // ourselves before/after it
194  if( !bSearch && rNode.GetIndex() < mnIndex )
195  {
196  SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 );
197  pNd = GoPreviousWithFrame(&aTmp, nullptr);
198  if( pNd && rNode.GetIndex() > pNd->GetIndex() )
199  pNd = nullptr; // Do not go over the limits
200  mbMaster = false;
201  }
202  else
203  {
204  SwNodeIndex aTmp( rNode, -1 );
205  pNd = GoNextWithFrame(rNode.GetNodes(), &aTmp, nullptr);
206  mbMaster = true;
207  if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
208  pNd = nullptr; // Do not go over the limits
209  }
210  }
211  else
212  {
213  pNd = &rNode;
214  mbMaster = mnIndex < rNode.GetIndex();
215  }
216  if( pNd )
217  {
218  if( pNd->IsContentNode() )
219  mpMod = const_cast<sw::BroadcastingModify*>(static_cast<sw::BroadcastingModify const *>(pNd->GetContentNode()));
220  else
221  {
222  assert(pNd->IsTableNode());
224  }
226  }
227  else
228  {
229  mpIter = nullptr;
230  mpMod = nullptr;
231  }
232 }
233 
249 {
250  SwFrame* pRet;
251  if( !mpIter )
252  return nullptr;
253  if( !mbInit )
254  {
255  pRet = mpIter->First();
256  mbInit = true;
257  }
258  else
259  pRet = mpIter->Next();
260  while( pRet )
261  {
262  SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet );
263  assert(pFlow);
264  // Follows are pretty volatile, thus we ignore them.
265  // Even if we insert after the Frame, we start from the Master
266  // and iterate through it until the last Follow
267  if( !pFlow->IsFollow() )
268  {
269  if( !mbMaster )
270  {
271  while( pFlow->HasFollow() )
272  pFlow = pFlow->GetFollow();
273  pRet = &(pFlow->GetFrame());
274  }
275  if( pRet->IsInSct() )
276  {
277  SwSectionFrame* pSct = pRet->FindSctFrame();
278  // ATTENTION: If we are in a Footnote, from a Layout point of view
279  // it could be located in a Section with columns, although it
280  // should be outside of it when looking at the Nodes.
281  // Thus, when dealing with Footnotes, we need to check whether the
282  // SectionFrame is also located within the Footnote and not outside of it.
283  if( !pRet->IsInFootnote() || pSct->IsInFootnote() )
284  {
285  assert(pSct && pSct->GetSection());
286  SwSectionNode* pNd = pSct->GetSection()->GetFormat()->GetSectionNode();
287  assert(pNd);
288  // If the result Frame is located within a Section Frame
289  // whose Section does not contain the Node, we return with
290  // the SectionFrame, else we return with the Content/TabFrame
291  if( mbMaster )
292  {
293  if( pNd->GetIndex() >= mnIndex )
294  pRet = pSct;
295  }
296  else if( pNd->EndOfSectionIndex() < mnIndex )
297  pRet = pSct;
298  }
299  }
300  return pRet;
301  }
302  pRet = mpIter->Next();
303  }
304  return nullptr;
305 }
306 
308 {
309  SwFrame* pFrame;
310  while( nullptr != (pFrame = NextFrame()) )
311  {
312  SwFrame* pPrv = pFrame->GetPrev();
313  pFrame = pFrame->GetUpper();
314  if( pFrame )
315  {
316  if( pFrame->IsFootnoteFrame() )
317  static_cast<SwFootnoteFrame*>(pFrame)->ColLock();
318  else if( pFrame->IsInSct() )
319  pFrame->FindSctFrame()->ColLock();
320  if( pPrv && pPrv->IsSctFrame() )
321  static_cast<SwSectionFrame*>(pPrv)->LockJoin();
322  mvUpperFrames.push_back( pPrv );
323  mvUpperFrames.push_back( pFrame );
324  }
325  }
326  mpIter.reset();
327  mpMod = nullptr;
328 }
329 
331 {
332  rpFrame = NextFrame();
333  if( !rpFrame )
334  return nullptr;
335  SwLayoutFrame* pUpper = rpFrame->GetUpper();
336  if( rpFrame->IsSctFrame() )
337  {
338  const SwNode* pNode = rNode.StartOfSectionNode();
339  if( pNode->IsSectionNode() )
340  {
341  SwFrame* pFrame = mbMaster ? rpFrame->FindPrev() : rpFrame->FindNext();
342  if( pFrame && pFrame->IsSctFrame() )
343  {
344  // pFrame could be a "dummy"-section
345  if( static_cast<SwSectionFrame*>(pFrame)->GetSection() &&
346  (&static_cast<const SwSectionNode*>(pNode)->GetSection() ==
347  static_cast<SwSectionFrame*>(pFrame)->GetSection()) )
348  {
349  // #i22922# - consider columned sections
350  // 'Go down' the section frame as long as the layout frame
351  // is found, which would contain content.
352  while ( pFrame->IsLayoutFrame() &&
353  static_cast<SwLayoutFrame*>(pFrame)->Lower() &&
354  !static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsFlowFrame() &&
355  static_cast<SwLayoutFrame*>(pFrame)->Lower()->IsLayoutFrame() )
356  {
357  pFrame = static_cast<SwLayoutFrame*>(pFrame)->Lower();
358  }
359  assert(pFrame->IsLayoutFrame());
360  rpFrame = mbMaster ? nullptr
361  : static_cast<SwLayoutFrame*>(pFrame)->Lower();
362  assert((!rpFrame || rpFrame->IsFlowFrame()) &&
363  "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." );
364  return static_cast<SwLayoutFrame*>(pFrame);
365  }
366 
367  pUpper = new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame);
368  pUpper->Paste( rpFrame->GetUpper(),
369  mbMaster ? rpFrame : rpFrame->GetNext() );
370  static_cast<SwSectionFrame*>(pUpper)->Init();
371  rpFrame = nullptr;
372  // 'Go down' the section frame as long as the layout frame
373  // is found, which would contain content.
374  while ( pUpper->Lower() &&
375  !pUpper->Lower()->IsFlowFrame() &&
376  pUpper->Lower()->IsLayoutFrame() )
377  {
378  pUpper = static_cast<SwLayoutFrame*>(pUpper->Lower());
379  }
380  return pUpper;
381  }
382  }
383  }
384  if( !mbMaster )
385  rpFrame = rpFrame->GetNext();
386  return pUpper;
387 }
388 
390 {
391  SwNode* pNd;
392  SwDoc& rDoc = rNds.GetDoc();
393  bool bFirst = true;
394  for( ; nStt < nEnd; ++nStt )
395  {
396  SwFrame* pNew = nullptr;
397  SwFrame* pNxt;
398  SwLayoutFrame* pUp;
399  if( (pNd = rNds[nStt])->IsContentNode() )
400  for( std::vector<SwFrame*>::size_type n = 0; n < mvUpperFrames.size(); )
401  {
402  pNxt = mvUpperFrames[n++];
403  if( bFirst && pNxt && pNxt->IsSctFrame() )
404  static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
405  pUp = static_cast<SwLayoutFrame*>(mvUpperFrames[n++]);
406  if( pNxt )
407  pNxt = pNxt->GetNext();
408  else
409  pNxt = pUp->Lower();
410  pNew = static_cast<SwContentNode*>(pNd)->MakeFrame( pUp );
411  pNew->Paste( pUp, pNxt );
412  mvUpperFrames[n-2] = pNew;
413  }
414  else if( pNd->IsTableNode() )
415  for( std::vector<SwFrame*>::size_type x = 0; x < mvUpperFrames.size(); )
416  {
417  pNxt = mvUpperFrames[x++];
418  if( bFirst && pNxt && pNxt->IsSctFrame() )
419  static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
420  pUp = static_cast<SwLayoutFrame*>(mvUpperFrames[x++]);
421  if( pNxt )
422  pNxt = pNxt->GetNext();
423  else
424  pNxt = pUp->Lower();
425  pNew = static_cast<SwTableNode*>(pNd)->MakeFrame( pUp );
426  assert(pNew->IsTabFrame());
427  pNew->Paste( pUp, pNxt );
428  static_cast<SwTabFrame*>(pNew)->RegistFlys();
429  mvUpperFrames[x-2] = pNew;
430  }
431  else if( pNd->IsSectionNode() )
432  {
433  nStt = pNd->EndOfSectionIndex();
434  for( std::vector<SwFrame*>::size_type x = 0; x < mvUpperFrames.size(); )
435  {
436  pNxt = mvUpperFrames[x++];
437  if( bFirst && pNxt && pNxt->IsSctFrame() )
438  static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
439  pUp = static_cast<SwLayoutFrame*>(mvUpperFrames[x++]);
440  OSL_ENSURE( pUp->GetUpper() || pUp->IsFlyFrame(), "Lost Upper" );
441  ::InsertCnt_( pUp, &rDoc, pNd->GetIndex(), false, nStt+1, pNxt );
442  pNxt = pUp->GetLastLower();
443  mvUpperFrames[x-2] = pNxt;
444  }
445  }
446  bFirst = false;
447  }
448  for( std::vector<SwFrame*>::size_type x = 0; x < mvUpperFrames.size(); ++x )
449  {
450  SwFrame* pTmp = mvUpperFrames[++x];
451  if( pTmp->IsFootnoteFrame() )
452  static_cast<SwFootnoteFrame*>(pTmp)->ColUnlock();
453  else if ( pTmp->IsInSct() )
454  {
455  SwSectionFrame* pSctFrame = pTmp->FindSctFrame();
456  pSctFrame->ColUnlock();
457  // #i18103# - invalidate size of section in order to
458  // assure, that the section is formatted, unless it was 'Collocked'
459  // from its 'collection' until its 'restoration'.
460  pSctFrame->InvalidateSize_();
461  }
462  }
463 }
464 
465 SwFrame* SwNode2LayImpl::GetFrame( const Point* pDocPos ) const
466 {
467  // test if change of member pIter -> pMod broke anything
468  std::pair<Point, bool> tmp;
469  if (pDocPos)
470  {
471  tmp.first = *pDocPos;
472  tmp.second = false;
473  }
474  return mpMod ? ::GetFrameOfModify(nullptr, *mpMod, FRM_ALL, nullptr, pDocPos ? &tmp : nullptr) : nullptr;
475 }
476 
478  : m_pImpl( new SwNode2LayImpl( rNd, nIdx, false ) )
479 {
480 }
481 
483  : m_pImpl( new SwNode2LayImpl( rNd, rNd.GetIndex(), true ) )
484 {
485  m_pImpl->SaveUpperFrames();
486 }
487 
489  SwNodes& rNds, SwNodeOffset const nStt, SwNodeOffset const nEnd)
490 {
491  m_pImpl->RestoreUpperFrames( rNds, nStt, nEnd );
492 }
493 
495 {
496  return m_pImpl->NextFrame();
497 }
498 
500 {
501  return m_pImpl->UpperFrame( rpFrame, rNode );
502 }
503 
505 {
506 }
507 
509 {
510 }
511 
512 SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos ) const
513 {
514  return m_pImpl->GetFrame( pDocPos );
515 }
516 
517 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SwEndNode * EndOfSectionNode() const
Definition: node.hxx:692
Base class of the Writer layout elements.
Definition: frame.hxx:314
Base class that provides the general functionalities for frames that are allowed at page breaks (flow...
Definition: flowfrm.hxx:58
bool IsFollow() const
Definition: flowfrm.hxx:166
SwNodeOffset EndOfSectionIndex() const
Definition: node.hxx:687
SwNode2Layout(const SwNode &rNd, SwNodeOffset nIdx)
Use this ctor for inserting before/after rNd.
Definition: node2lay.cxx:477
bool IsSectionNode() const
Definition: node.hxx:654
void Init()
bool IsInSct() const
Definition: frame.hxx:967
void ColLock()
Definition: sectfrm.hxx:99
SwDoc & GetDoc()
Which Doc contains the nodes-array?
Definition: ndarr.hxx:301
bool IsInFootnote() const
Definition: frame.hxx:949
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:46
sal_Int64 n
void InvalidateSize_()
Definition: frame.hxx:771
SwFrame * GetFrame(const Point *pDocPos) const
Definition: node2lay.cxx:512
Definition: doc.hxx:187
SwFrame * FindPrev()
Definition: frame.hxx:1155
bool HasFollow() const
Definition: flowfrm.hxx:165
SwFrame * NextFrame()
Returns the next "useful" Frame.
Definition: node2lay.cxx:248
void SaveUpperFrames()
Definition: node2lay.cxx:307
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr) override
Definition: wsfrm.cxx:1337
SwNode & GetNode() const
Definition: ndindex.hxx:119
SwSectionFormat * GetFormat()
Definition: section.hxx:336
Dialog to specify the properties of date form field.
SwFrame * FindNext()
Definition: frame.hxx:1141
static SwFlowFrame * CastFlowFrame(SwFrame *pFrame)
Definition: flowfrm.cxx:2709
float x
bool IsFootnoteFrame() const
Definition: frame.hxx:1202
SwTableFormat * GetFrameFormat()
Definition: swtable.hxx:204
bool IsFlyFrame() const
Definition: frame.hxx:1210
SwTableNode * GetTableNode()
Definition: node.hxx:609
std::vector< SwFrame * > mvUpperFrames
Definition: node2lay.cxx:42
SwSectionNode * GetSectionNode()
Definition: section.cxx:922
bool IsStartNode() const
Definition: node.hxx:634
#define FRM_ALL
Definition: frame.hxx:102
bool CheckNodesRange(const SwNodeIndex &rStt, const SwNodeIndex &rEnd, bool bChkSection)
Check if the given range is inside one of the defined top-level sections.
Definition: pam.cxx:257
const SwTable & GetTable() const
Definition: node.hxx:506
SwNodeOffset GetIndex() const
Definition: ndindex.hxx:152
bool IsSctFrame() const
Definition: frame.hxx:1214
bool IsFlowFrame() const
Definition: frame.hxx:1242
static SwNode * GoPreviousWithFrame(SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
Definition: node2lay.cxx:102
const SwFrame & GetFrame() const
Definition: flowfrm.hxx:151
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
bool IsContentNode() const
Definition: node.hxx:638
SwNode2LayImpl & operator=(const SwNode2LayImpl &)=delete
SwFrame * NextFrame()
Definition: node2lay.cxx:494
const SwFrame * GetLastLower() const
Definition: findfrm.cxx:1885
const SwStartNode * StartOfSectionNode() const
Definition: node.hxx:133
SwNode2LayoutSaveUpperFrames(const SwNode &rNd)
Use this ctor for collecting the UpperFrames.
Definition: node2lay.cxx:482
SwFrame * GetFrameOfModify(const SwRootFrame *pLayout, sw::BroadcastingModify const &, SwFrameType const nFrameType, const SwPosition *pPos=nullptr, std::pair< Point, bool > const *pViewPosAndCalcFrame=nullptr)
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
Definition: node2lay.cxx:389
const SwFrame * Lower() const
Definition: layfrm.hxx:101
SwContentNode * GetContentNode()
Definition: node.hxx:625
SwNodeOffset GetIndex() const
Definition: node.hxx:292
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
Definition: node2lay.cxx:330
SwSection * GetSection()
Definition: sectfrm.hxx:97
std::unique_ptr< SwIterator< SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti > > mpIter
Definition: node2lay.cxx:40
SwLayoutFrame * GetUpper()
Definition: frame.hxx:678
SwFrame * GetPrev()
Definition: frame.hxx:677
std::unique_ptr< SwNode2LayImpl > m_pImpl
Definition: node2lay.hxx:72
Marks a node in the document model.
Definition: ndindex.hxx:30
bool IsEndNode() const
Definition: node.hxx:642
SwNodes & GetNodes()
Node is in which nodes-array/doc?
Definition: node.hxx:703
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
Definition: node2lay.cxx:499
const sal_uInt16 idx[]
SwSectionFrame * FindSctFrame()
Definition: frame.hxx:1115
bool IsLayoutFrame() const
Definition: frame.hxx:1170
std::unique_ptr< SwNode2LayImpl > m_pImpl
Definition: node2lay.hxx:57
void InsertCnt_(SwLayoutFrame *pLay, SwDoc *pDoc, SwNodeOffset nIndex, bool bPages=false, SwNodeOffset nEndIndex=SwNodeOffset(0), SwFrame *pPrv=nullptr, sw::FrameMode eMode=sw::FrameMode::New)
Definition: frmtool.cxx:1485
SwNodeOffset mnIndex
Definition: node2lay.cxx:43
const SwFlowFrame * GetPrecede() const
Definition: flowfrm.hxx:172
bool IsTabFrame() const
Definition: frame.hxx:1218
void ColUnlock()
Definition: sectfrm.hxx:100
const SwNodes & GetNodes() const
Definition: ndindex.hxx:156
The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface...
Definition: node2lay.cxx:38
sw::BroadcastingModify * mpMod
Definition: node2lay.cxx:41
static SwNode * GoNextWithFrame(const SwNodes &rNodes, SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
Definition: node2lay.cxx:61
SwFrame * GetFrame(const Point *pDocPos) const
Definition: node2lay.cxx:465
SwFrame const * FindNeighbourFrameForNode(SwNode const &rNode)
Definition: node2lay.cxx:145
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
Definition: nodeoffset.hxx:16
SwNodeOffset Count() const
Definition: ndarr.hxx:141
bool IsTableNode() const
Definition: node.hxx:650
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
Definition: layfrm.hxx:35
void RegistFlys(SwPageFrame *, const SwLayoutFrame *)
Definition: frmtool.cxx:3226
SwNode2LayImpl(const SwNode2LayImpl &)=delete
int mnIndex
::std::unique_ptr< XmlIdRegistry_Impl > m_pImpl
const SwFlowFrame * GetFollow() const
Definition: flowfrm.hxx:168
void ColLock()
Definition: frame.hxx:448
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
Definition: node2lay.cxx:488
bool m_bDetectedRangeSegmentation false
SwFrame * GetNext()
Definition: frame.hxx:676
Base class of the Writer document model elements.
Definition: node.hxx:81