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

This class is used as parameter for creation of a block cursor selection. More...

#include <swselectionlist.hxx>

Collaboration diagram for SwSelectionList:
[legend]

Public Member Functions

 SwSelectionList (const SwFrame *pInitCxt)
 Ctor to create an empty list for a given context. More...
 
std::list< SwPaM * >::iterator getStart ()
 Start of the container for the selected text portions. More...
 
std::list< SwPaM * >::iterator getEnd ()
 End of the container for the selected text portions. More...
 
void insertPaM (SwPaM *pPam)
 Adds a text portion to the selection list. More...
 
bool isEmpty () const
 Reports if the list does not contain any text portion. More...
 
bool checkContext (const SwFrame *pCheck)
 Checks if the context of the list is equal to the context of the frame. More...
 

Private Attributes

std::list< SwPaM * > m_aList
 
const SwFramem_pContext
 

Detailed Description

This class is used as parameter for creation of a block cursor selection.

This class will be created by a block cursor. Its responsibility is to collect a group of selected text portions which are part of a common context. Definition of context: A page header is a context. A page footer is a context. A footnote is a context. Every fly frame builds a context together with its linked colleagues. The content of the page bodies builds a context.

Definition at line 40 of file swselectionlist.hxx.

Constructor & Destructor Documentation

◆ SwSelectionList()

SwSelectionList::SwSelectionList ( const SwFrame pInitCxt)
explicit

Ctor to create an empty list for a given context.

Parameters
pInitCxtThe frame (normally a SwTextFrame) where the block cursor selection starts, it will be used to get the allowed context for the text selections.

Definition at line 70 of file swselectionlist.cxx.

Member Function Documentation

◆ checkContext()

bool SwSelectionList::checkContext ( const SwFrame pCheck)

Checks if the context of the list is equal to the context of the frame.

If the list does not have already a context, the context of the frame will define the list's context. If the list has already a context, it will be compared to the context of the given frame.

Parameters
pCheckThe frame to check
Returns
true, if the context of the frame is equal to the one of the list

Definition at line 75 of file swselectionlist.cxx.

References m_pContext.

Referenced by SwTextFrame::FillSelection().

◆ getEnd()

std::list< SwPaM * >::iterator SwSelectionList::getEnd ( )
inline

End of the container for the selected text portions.

Definition at line 59 of file swselectionlist.hxx.

References m_aList.

Referenced by SwCursorShell::RefreshBlockCursor().

◆ getStart()

std::list< SwPaM * >::iterator SwSelectionList::getStart ( )
inline

Start of the container for the selected text portions.

Definition at line 55 of file swselectionlist.hxx.

References m_aList.

Referenced by SwCursorShell::RefreshBlockCursor().

◆ insertPaM()

void SwSelectionList::insertPaM ( SwPaM pPam)
inline

Adds a text portion to the selection list.

Parameters
pPamrepresents a text portion to select

Definition at line 66 of file swselectionlist.hxx.

References m_aList.

Referenced by SwTextFrame::FillSelection().

◆ isEmpty()

bool SwSelectionList::isEmpty ( ) const
inline

Reports if the list does not contain any text portion.

Returns
true, if list is empty

Definition at line 72 of file swselectionlist.hxx.

References m_aList.

Referenced by SwRootFrame::FillSelection().

Member Data Documentation

◆ m_aList

std::list<SwPaM*> SwSelectionList::m_aList
private

Definition at line 42 of file swselectionlist.hxx.

Referenced by getEnd(), getStart(), insertPaM(), and isEmpty().

◆ m_pContext

const SwFrame* SwSelectionList::m_pContext
private

Definition at line 43 of file swselectionlist.hxx.

Referenced by checkContext().


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