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)
87 *ppFrame = SwFlowFrame::CastFlowFrame(pFound);
112 SwFrame const* pFound(
nullptr);
124 if (pFound !=
nullptr)
128 *ppFrame = SwFlowFrame::CastFlowFrame(pFound);
148 SwFlowFrame
const* pFlow(
nullptr);
153 while (pFlow->HasFollow())
155 pFlow = pFlow->GetFollow();
157 return &pFlow->GetFrame();
165 while (pFlow->IsFollow())
167 pFlow = pFlow->GetPrecede();
169 return &pFlow->GetFrame();
187 :
mnIndex( nIdx ), mbInit( false )
219 mpMod =
const_cast<sw::BroadcastingModify*
>(
static_cast<sw::BroadcastingModify
const *
>(pNd->
GetContentNode()));
262 SwFlowFrame* pFlow = SwFlowFrame::CastFlowFrame( pRet );
267 if( !pFlow->IsFollow() )
271 while( pFlow->HasFollow() )
272 pFlow = pFlow->GetFollow();
273 pRet = &(pFlow->GetFrame());
310 while(
nullptr != (pFrame =
NextFrame()) )
363 "<SwNode2LayImpl::UpperFrame(..)> - expected sibling isn't a flow frame." );
375 while ( pUpper->
Lower() &&
395 for( ; nStt < nEnd; ++nStt )
400 if( (pNd = rNds[nStt])->IsContentNode() )
401 for( std::vector<SwFrame*>::size_type
n = 0;
n <
mvUpperFrames.size(); )
412 pNew->
Paste( pUp, pNxt );
416 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); )
426 pNew =
static_cast<SwTableNode*
>(pNd)->MakeFrame( pUp );
428 pNew->
Paste( pUp, pNxt );
435 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); )
449 for( std::vector<SwFrame*>::size_type
x = 0;
x <
mvUpperFrames.size(); ++
x )
469 std::pair<Point, bool> tmp;
472 tmp.first = *pDocPos;
492 m_pImpl->RestoreUpperFrames( rNds, nStt, nEnd );
502 return m_pImpl->UpperFrame( rpFrame, rNode );
515 return m_pImpl->GetFrame( pDocPos );
Base class of the Writer layout elements.
SwSectionFrame * FindSctFrame()
bool IsInFootnote() const
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr)=0
bool IsFootnoteFrame() const
SwLayoutFrame * GetUpper()
bool IsLayoutFrame() const
A layout frame is a frame that contains other frames (m_pLower), e.g. SwPageFrame or SwTabFrame.
virtual void Paste(SwFrame *pParent, SwFrame *pSibling=nullptr) override
const SwFrame * GetLastLower() const
const SwFrame * Lower() const
The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface.
SwFrame * NextFrame()
Returns the next "useful" Frame.
sw::BroadcastingModify * mpMod
SwNode2LayImpl & operator=(const SwNode2LayImpl &)=delete
std::unique_ptr< SwIterator< SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti > > mpIter
SwFrame * GetFrame(const Point *pDocPos) const
std::vector< SwFrame * > mvUpperFrames
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
SwNode2LayImpl(const SwNode2LayImpl &)=delete
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
void RestoreUpperFrames(SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd)
std::unique_ptr< SwNode2LayImpl > m_pImpl
SwNode2LayoutSaveUpperFrames(const SwNode &rNd)
Use this ctor for collecting the UpperFrames.
~SwNode2LayoutSaveUpperFrames()
SwNode2Layout(const SwNode &rNd, SwNodeOffset nIdx)
Use this ctor for inserting before/after rNd.
SwFrame * GetFrame(const Point *pDocPos) const
std::unique_ptr< SwNode2LayImpl > m_pImpl
SwLayoutFrame * UpperFrame(SwFrame *&rpFrame, const SwNode &rNode)
Marks a node in the document model.
SwNodeOffset GetIndex() const
Base class of the Writer document model elements.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
bool IsContentNode() const
bool IsSectionNode() const
const SwStartNode * StartOfSectionNode() const
SwNodeOffset EndOfSectionIndex() const
SwContentNode * GetContentNode()
SwTableNode * GetTableNode()
const SwEndNode * EndOfSectionNode() const
SwDoc & GetDoc()
Which Doc contains the nodes-array?
SwNodeOffset Count() const
A section node represents the start of a section on the UI, i.e.
SwSectionFormat * GetFormat()
SwTabFrame is one table in the document layout, containing rows (which contain cells).
const SwTable & GetTable() const
SwTableFormat * GetFrameFormat()
Dialog to specify the properties of date form field.
SwFrame const * FindNeighbourFrameForNode(SwNode const &rNode)
static SwNode * GoPreviousWithFrame(SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
static SwNode * GoNextWithFrame(const SwNodes &rNodes, SwNodeIndex *pIdx, SwFlowFrame const **const ppFrame)
bool CheckNodesRange(const SwNode &rStt, const SwNode &rEnd, bool bChkSection)
Check if the given range is inside one of the defined top-level sections.