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, 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
 
sw::BroadcastingModify * mpMod
 
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() [1/2]

SwNode2LayImpl::SwNode2LayImpl ( const SwNode2LayImpl )
privatedelete

◆ SwNode2LayImpl() [2/2]

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.

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

References SwNode::EndOfSectionIndex(), SwNode::EndOfSectionNode(), 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

◆ GetFrame()

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

Definition at line 466 of file node2lay.cxx.

References FRM_ALL, GetFrameOfModify(), and mpMod.

Referenced by SAL_LOPLUGIN_ANNOTATE().

◆ NextFrame()

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 SwNode::EndOfSectionIndex(), SwFrame::FindSctFrame(), SwSection::GetFormat(), SwNode::GetIndex(), SwSectionFrame::GetSection(), SwSectionFormat::GetSectionNode(), SwFrame::IsInFootnote(), SwFrame::IsInSct(), mbInit, mbMaster, mnIndex, and mpIter.

Referenced by SaveUpperFrames(), and UpperFrame().

◆ operator=()

SwNode2LayImpl & SwNode2LayImpl::operator= ( const SwNode2LayImpl )
privatedelete

◆ RestoreUpperFrames()

void SwNode2LayImpl::RestoreUpperFrames ( SwNodes rNds,
SwNodeOffset  nStt,
SwNodeOffset  nEnd 
)

◆ SaveUpperFrames()

void SwNode2LayImpl::SaveUpperFrames ( )

◆ UpperFrame()

SwLayoutFrame * SwNode2LayImpl::UpperFrame ( SwFrame *&  rpFrame,
const SwNode rNode 
)

Member Data Documentation

◆ mbInit

bool SwNode2LayImpl::mbInit
private

Definition at line 45 of file node2lay.cxx.

Referenced by NextFrame().

◆ mbMaster

bool SwNode2LayImpl::mbMaster
private

Definition at line 44 of file node2lay.cxx.

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

◆ mnIndex

SwNodeOffset SwNode2LayImpl::mnIndex
private

Definition at line 43 of file node2lay.cxx.

Referenced by NextFrame(), and SwNode2LayImpl().

◆ mpIter

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

Definition at line 40 of file node2lay.cxx.

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

◆ mpMod

sw::BroadcastingModify* SwNode2LayImpl::mpMod
private

Definition at line 41 of file node2lay.cxx.

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

◆ mvUpperFrames

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

Definition at line 42 of file node2lay.cxx.

Referenced by RestoreUpperFrames(), and SaveUpperFrames().


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