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:

Public Member Functions

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

Private Member Functions

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

Private Attributes

std::unique_ptr< SwIterator< SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti > > mpIter
std::vector< SwFrame * > mvUpperFrames
SwNodeOffset mnIndex
bool mbMaster: 1
bool mbInit: 1

Detailed Description

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

Definition at line 38 of file node2lay.cxx.

Constructor & Destructor Documentation

SwNode2LayImpl::SwNode2LayImpl ( const SwNode2LayImpl )
SwNode2LayImpl::SwNode2LayImpl ( const SwNode rNode,
SwNodeOffset  nIdx,
bool  bSearch 

The main purpose of this ctor is to find the right sw::BroadcastingModify to iterate over.

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 186 of file node2lay.cxx.

References SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), false, SwNode::GetContentNode(), SwTable::GetFrameFormat(), SwNode::GetIndex(), SwNode::GetNodes(), SwTableNode::GetTable(), SwNode::GetTableNode(), GoNextWithFrame(), GoPreviousWithFrame(), SwNode::IsContentNode(), SwNode::IsSectionNode(), SwNode::IsTableNode(), mbMaster, mnIndex, mnIndex, mpIter, and mpMod.

Member Function Documentation

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

Definition at line 465 of file node2lay.cxx.

References FRM_ALL, GetFrameOfModify(), and mpMod.

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 248 of file node2lay.cxx.

References SwFlowFrame::CastFlowFrame(), SwFrame::FindSctFrame(), SwFlowFrame::GetFollow(), SwSection::GetFormat(), SwFlowFrame::GetFrame(), SwSectionFrame::GetSection(), SwSectionFormat::GetSectionNode(), SwFlowFrame::HasFollow(), SwFlowFrame::IsFollow(), SwFrame::IsInFootnote(), SwFrame::IsInSct(), mbInit, mbMaster, mnIndex, and mpIter.

Referenced by SaveUpperFrames(), and UpperFrame().

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

Member Data Documentation

bool SwNode2LayImpl::mbInit

Definition at line 45 of file node2lay.cxx.

Referenced by NextFrame().

bool SwNode2LayImpl::mbMaster

Definition at line 44 of file node2lay.cxx.

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

SwNodeOffset SwNode2LayImpl::mnIndex

Definition at line 43 of file node2lay.cxx.

Referenced by NextFrame(), and SwNode2LayImpl().

std::unique_ptr<SwIterator<SwFrame, sw::BroadcastingModify, sw::IteratorMode::UnwrapMulti> > SwNode2LayImpl::mpIter

Definition at line 40 of file node2lay.cxx.

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

sw::BroadcastingModify* SwNode2LayImpl::mpMod

Definition at line 41 of file node2lay.cxx.

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

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

Definition at line 42 of file node2lay.cxx.

Referenced by RestoreUpperFrames(), and SaveUpperFrames().

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