LibreOffice Module sw (master) 1
|
The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface. More...
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... | |
SwFrame * | NextFrame () |
Returns the next "useful" Frame. More... | |
SwLayoutFrame * | UpperFrame (SwFrame *&rpFrame, const SwNode &rNode) |
void | SaveUpperFrames () |
void | RestoreUpperFrames (SwNodes &rNds, SwNodeOffset nStt, SwNodeOffset nEnd) |
SwFrame * | GetFrame (const Point *pDocPos) const |
Private Member Functions | |
SwNode2LayImpl (const SwNode2LayImpl &)=delete | |
SwNode2LayImpl & | operator= (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 |
The SwNode2LayImpl class does the actual work, the SwNode2Layout class is just the public interface.
Definition at line 38 of file node2lay.cxx.
|
privatedelete |
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.
bSearch | true: 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.
Definition at line 466 of file node2lay.cxx.
References FRM_ALL, GetFrameOfModify(), and mpMod.
Referenced by SAL_LOPLUGIN_ANNOTATE().
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().
|
privatedelete |
void SwNode2LayImpl::RestoreUpperFrames | ( | SwNodes & | rNds, |
SwNodeOffset | nStt, | ||
SwNodeOffset | nEnd | ||
) |
Definition at line 390 of file node2lay.cxx.
References SwSectionFrame::ColUnlock(), SwNode::EndOfSectionIndex(), SwFrame::FindSctFrame(), SwNodes::GetDoc(), SwNode::GetIndex(), SwLayoutFrame::GetLastLower(), SwFrame::GetNext(), SwFrame::GetUpper(), InsertCnt_(), SwFrame::InvalidateSize_(), SwFrame::IsFlyFrame(), SwFrame::IsFootnoteFrame(), SwFrame::IsInSct(), SwFrame::IsSctFrame(), SwNode::IsSectionNode(), SwFrame::IsTabFrame(), SwNode::IsTableNode(), SwLayoutFrame::Lower(), mvUpperFrames, n, SwFrame::Paste(), RegistFlys(), and x.
void SwNode2LayImpl::SaveUpperFrames | ( | ) |
Definition at line 307 of file node2lay.cxx.
References SwSectionFrame::ColLock(), SwFrame::FindSctFrame(), SwFrame::GetPrev(), SwFrame::GetUpper(), SwFrame::IsFootnoteFrame(), SwFrame::IsInSct(), SwFrame::IsSctFrame(), mpIter, mpMod, mvUpperFrames, and NextFrame().
SwLayoutFrame * SwNode2LayImpl::UpperFrame | ( | SwFrame *& | rpFrame, |
const SwNode & | rNode | ||
) |
Definition at line 330 of file node2lay.cxx.
References SwFrame::FindNext(), SwFrame::FindPrev(), SwFrame::GetNext(), SwFrame::GetUpper(), Init(), SwFrame::IsFlowFrame(), SwFrame::IsLayoutFrame(), SwFrame::IsSctFrame(), SwNode::IsSectionNode(), Lower, SwLayoutFrame::Lower(), mbMaster, NextFrame(), SwLayoutFrame::Paste(), and SwNode::StartOfSectionNode().
|
private |
Definition at line 45 of file node2lay.cxx.
Referenced by NextFrame().
|
private |
Definition at line 44 of file node2lay.cxx.
Referenced by NextFrame(), SwNode2LayImpl(), and UpperFrame().
|
private |
Definition at line 43 of file node2lay.cxx.
Referenced by NextFrame(), and SwNode2LayImpl().
|
private |
Definition at line 40 of file node2lay.cxx.
Referenced by NextFrame(), SaveUpperFrames(), and SwNode2LayImpl().
|
private |
Definition at line 41 of file node2lay.cxx.
Referenced by GetFrame(), SaveUpperFrames(), and SwNode2LayImpl().
|
private |
Definition at line 42 of file node2lay.cxx.
Referenced by RestoreUpperFrames(), and SaveUpperFrames().