LibreOffice Module sw (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SwNode2LayImpl Class Reference

The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface. More...

Collaboration diagram for SwNode2LayImpl:
[legend]

Public Member Functions

 SwNode2LayImpl (const SwNode &rNode, sal_uLong nIdx, bool bSearch)
 The main purpose of this ctor is to find the right SwModify to iterate over. More...
 
SwFrameNextFrame ()
 Returns the next "useful" Frame. More...
 
SwLayoutFrameUpperFrame (SwFrame *&rpFrame, const SwNode &rNode)
 
void SaveUpperFrames ()
 
void RestoreUpperFrames (SwNodes &rNds, sal_uLong nStt, sal_uLong nEnd)
 
SwFrameGetFrame (const Point *pDocPos) const
 

Private Member Functions

 SwNode2LayImpl (const SwNode2LayImpl &)=delete
 
SwNode2LayImploperator= (const SwNode2LayImpl &)=delete
 

Private Attributes

std::unique_ptr< SwIterator< SwFrame, SwModify, sw::IteratorMode::UnwrapMulti > > pIter
 
SwModifypMod
 
std::vector< SwFrame * > mvUpperFrames
 
sal_uLong const nIndex
 
bool bMaster: 1
 
bool bInit: 1
 

Detailed Description

The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface.

Definition at line 37 of file node2lay.cxx.

Constructor & Destructor Documentation

SwNode2LayImpl::SwNode2LayImpl ( const SwNode2LayImpl )
privatedelete
SwNode2LayImpl::SwNode2LayImpl ( const SwNode rNode,
sal_uLong  nIdx,
bool  bSearch 
)

The main purpose of this ctor is to find the right SwModify to iterate over.

Parameters
bSearchtrue: find the next Content or TableNode which contains Frames (to collect the pUpper). Else we assume that rNode points already to such a Content or TableNode. We insert before or after it.

Definition at line 137 of file node2lay.cxx.

References bMaster, SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), SwNode::GetContentNode(), SwTable::GetFrameFormat(), SwNode::GetIndex(), SwNode::GetNodes(), SwTableNode::GetTable(), SwNode::GetTableNode(), GoNextWithFrame(), GoPreviousWithFrame(), SwNode::IsContentNode(), SwNode::IsSectionNode(), SwNode::IsTableNode(), nIndex, pIter, and pMod.

Member Function Documentation

SwFrame * SwNode2LayImpl::GetFrame ( const Point pDocPos) const

Definition at line 416 of file node2lay.cxx.

References FRM_ALL, GetFrameOfModify(), and pMod.

SwFrame * SwNode2LayImpl::NextFrame ( )

Returns the next "useful" Frame.

When calling this method for the first time, a First is triggered at the actual Iterator. The result is check for suitability: Follows are not accepted, a Master is accepted when collecting the pUpper and when inserting before it. When inserting after it, we find and return the last Follow starting from the Master.

If the Frame is located in a SectionFrame, we check to see whether the SectionFrame is the suitable return value (instead of the Frame itself). This is the case if the to-be-inserted Node is outside of the Section.

Definition at line 199 of file node2lay.cxx.

References bInit, bMaster, SwFlowFrame::CastFlowFrame(), SwFrame::FindSctFrame(), SwFlowFrame::GetFollow(), SwSection::GetFormat(), SwFlowFrame::GetFrame(), SwSectionFrame::GetSection(), SwSectionFormat::GetSectionNode(), SwFlowFrame::HasFollow(), SwFlowFrame::IsFollow(), SwFrame::IsInFootnote(), SwFrame::IsInSct(), nIndex, and pIter.

Referenced by SaveUpperFrames(), and UpperFrame().

SwNode2LayImpl& SwNode2LayImpl::operator= ( const SwNode2LayImpl )
privatedelete
void SwNode2LayImpl::RestoreUpperFrames ( SwNodes rNds,
sal_uLong  nStt,
sal_uLong  nEnd 
)
void SwNode2LayImpl::SaveUpperFrames ( )
SwLayoutFrame * SwNode2LayImpl::UpperFrame ( SwFrame *&  rpFrame,
const SwNode rNode 
)

Member Data Documentation

bool SwNode2LayImpl::bInit
private

Definition at line 44 of file node2lay.cxx.

Referenced by NextFrame().

bool SwNode2LayImpl::bMaster
private

Definition at line 43 of file node2lay.cxx.

Referenced by NextFrame(), SwNode2LayImpl(), and UpperFrame().

std::vector<SwFrame*> SwNode2LayImpl::mvUpperFrames
private

Definition at line 41 of file node2lay.cxx.

Referenced by RestoreUpperFrames(), and SaveUpperFrames().

sal_uLong const SwNode2LayImpl::nIndex
private

Definition at line 42 of file node2lay.cxx.

Referenced by NextFrame(), and SwNode2LayImpl().

std::unique_ptr<SwIterator<SwFrame, SwModify, sw::IteratorMode::UnwrapMulti> > SwNode2LayImpl::pIter
private

Definition at line 39 of file node2lay.cxx.

Referenced by NextFrame(), SaveUpperFrames(), and SwNode2LayImpl().

SwModify* SwNode2LayImpl::pMod
private

Definition at line 40 of file node2lay.cxx.

Referenced by GetFrame(), SaveUpperFrames(), and SwNode2LayImpl().


The documentation for this class was generated from the following file: