30 #include <section.hxx>
32 #include <osl/diagnose.h>
40 std::unique_ptr<SwIterator<SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti>>
mpIter;
68 while( aTmp < rNodes.
Count()-1 )
83 if (pFound !=
nullptr)
112 SwFrame const* pFound(
nullptr);
124 if (pFound !=
nullptr)
198 if( pNd && rNode.
GetIndex() > pNd->GetIndex() )
219 mpMod = const_cast<sw::BroadcastingModify*>(static_cast<sw::BroadcastingModify const *>(pNd->
GetContentNode()));
293 if( pNd->GetIndex() >=
mnIndex )
296 else if( pNd->EndOfSectionIndex() <
mnIndex )
310 while(
nullptr != (pFrame =
NextFrame()) )
317 static_cast<SwFootnoteFrame*>(pFrame)->
ColLock();
321 static_cast<SwSectionFrame*>(pPrv)->LockJoin();
345 if( static_cast<SwSectionFrame*>(pFrame)->GetSection() &&
362 assert((!rpFrame || rpFrame->IsFlowFrame()) &&
363 "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." );
367 pUpper =
new SwSectionFrame(const_cast<SwSectionNode*>(static_cast<const SwSectionNode*>(pNode))->GetSection(), rpFrame);
374 while ( pUpper->
Lower() &&
394 for( ; nStt < nEnd; ++nStt )
399 if( (pNd = rNds[nStt])->IsContentNode() )
400 for( std::vector<SwFrame*>::size_type
n = 0;
n <
mvUpperFrames.size(); )
404 static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
411 pNew->
Paste( pUp, pNxt );
415 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); )
419 static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
425 pNew =
static_cast<SwTableNode*
>(pNd)->MakeFrame( pUp );
427 pNew->
Paste( pUp, pNxt );
434 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); )
438 static_cast<SwSectionFrame*>(pNxt)->UnlockJoin();
448 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); ++
x )
452 static_cast<SwFootnoteFrame*>(pTmp)->ColUnlock();
468 std::pair<Point, bool> tmp;
471 tmp.first = *pDocPos;
491 m_pImpl->RestoreUpperFrames( rNds, nStt, nEnd );
501 return m_pImpl->UpperFrame( rpFrame, rNode );
514 return m_pImpl->GetFrame( pDocPos );
const SwEndNode * EndOfSectionNode() const
Base class of the Writer layout elements.
Base class that provides the general functionalities for frames that are allowed at page breaks (flow...
SwNodeOffset EndOfSectionIndex() const
SwNode2Layout(const SwNode &rNd, SwNodeOffset nIdx)
Use this ctor for inserting before/after rNd.
bool IsSectionNode() const
SwDoc & GetDoc()
Which Doc contains the nodes-array?
bool IsInFootnote() const
SwTabFrame is one table in the document layout, containing rows (which contain cells).
SwFrame * GetFrame(const Point *pDocPos) const
SwFrame * NextFrame()
Returns the next "useful" Frame.
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr) override
SwSectionFormat * GetFormat()
Dialog to specify the properties of date form field.
static SwFlowFrame * CastFlowFrame(SwFrame *pFrame)
bool IsFootnoteFrame() const
SwTableFormat * GetFrameFormat()
SwTableNode * GetTableNode()
std::vector< SwFrame * > mvUpperFrames
bool CheckNodesRange(const SwNodeIndex &rStt, const SwNodeIndex &rEnd, bool bChkSection)
Check if the given range is inside one of the defined top-level sections.
const SwTable & GetTable() const
SwNodeOffset GetIndex() const
static SwNode * GoPreviousWithFrame(SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
const SwFrame & GetFrame() const
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
bool IsContentNode() const
SwNode2LayImpl & operator=(const SwNode2LayImpl &)=delete
const SwFrame * GetLastLower() const
const SwStartNode * StartOfSectionNode() const
SwNode2LayoutSaveUpperFrames(const SwNode &rNd)
Use this ctor for collecting the UpperFrames.
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
const SwFrame * Lower() const
SwContentNode * GetContentNode()
SwNodeOffset GetIndex() const
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
std::unique_ptr< SwIterator< SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti > > mpIter
SwLayoutFrame * GetUpper()
std::unique_ptr< SwNode2LayImpl > m_pImpl
Marks a node in the document model.
SwNodes & GetNodes()
Node is in which nodes-array/doc?
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
SwSectionFrame * FindSctFrame()
bool IsLayoutFrame() const
std::unique_ptr< SwNode2LayImpl > m_pImpl
const SwFlowFrame * GetPrecede() const
const SwNodes & GetNodes() const
The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface...
sw::BroadcastingModify * mpMod
static SwNode * GoNextWithFrame(const SwNodes &rNodes, SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
SwFrame * GetFrame(const Point *pDocPos) const
SwFrame const * FindNeighbourFrameForNode(SwNode const &rNode)
o3tl::strong_int< sal_Int32, struct Tag_SwNodeOffset > SwNodeOffset
~SwNode2LayoutSaveUpperFrames()
SwNodeOffset Count() const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame...
SwNode2LayImpl(const SwNode2LayImpl &)=delete
const SwFlowFrame * GetFollow() const
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
bool m_bDetectedRangeSegmentation false
Base class of the Writer document model elements.