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

#include <multisel.hxx>

Collaboration diagram for MultiSelection:
[legend]

Public Member Functions

 MultiSelection ()
 
 MultiSelection (const MultiSelection &rOrig)
 
 MultiSelection (const Range &rRange)
 
 ~MultiSelection ()
 
MultiSelectionoperator= (const MultiSelection &rOrig)
 
void SelectAll (bool bSelect=true)
 
bool Select (sal_Int32 nIndex, bool bSelect=true)
 
void Select (const Range &rIndexRange, bool bSelect=true)
 
bool IsSelected (sal_Int32 nIndex) const
 
bool IsAllSelected () const
 
sal_Int32 GetSelectCount () const
 
void SetTotalRange (const Range &rTotRange)
 
void Insert (sal_Int32 nIndex, sal_Int32 nCount=1)
 
void Remove (sal_Int32 nIndex)
 
void Reset ()
 
const RangeGetTotalRange () const
 
sal_Int32 FirstSelected ()
 
sal_Int32 LastSelected ()
 
sal_Int32 NextSelected ()
 
sal_Int32 GetRangeCount () const
 
const RangeGetRange (sal_Int32 nRange) const
 

Private Member Functions

TOOLS_DLLPRIVATE void ImplClear ()
 
TOOLS_DLLPRIVATE std::size_t ImplFindSubSelection (sal_Int32 nIndex) const
 
TOOLS_DLLPRIVATE void ImplMergeSubSelections (sal_Int32 nPos1, std::size_t nPos2)
 

Private Attributes

std::vector< RangeaSels
 
Range aTotRange
 
std::size_t nCurSubSel
 
sal_Int32 nCurIndex
 
sal_Int32 nSelCount
 
bool bCurValid
 

Detailed Description

Definition at line 32 of file multisel.hxx.

Constructor & Destructor Documentation

◆ MultiSelection() [1/3]

MultiSelection::MultiSelection ( )

Definition at line 62 of file multisel.cxx.

◆ MultiSelection() [2/3]

MultiSelection::MultiSelection ( const MultiSelection rOrig)

Definition at line 79 of file multisel.cxx.

References aSels, bCurValid, nCurIndex, and nCurSubSel.

◆ MultiSelection() [3/3]

MultiSelection::MultiSelection ( const Range rRange)

Definition at line 99 of file multisel.cxx.

◆ ~MultiSelection()

MultiSelection::~MultiSelection ( )

Definition at line 108 of file multisel.cxx.

Member Function Documentation

◆ FirstSelected()

sal_Int32 MultiSelection::FirstSelected ( )

Definition at line 380 of file multisel.cxx.

References aSels, bCurValid, nCurIndex, nCurSubSel, and SFX_ENDOFSELECTION.

Referenced by Select().

◆ GetRange()

const Range & MultiSelection::GetRange ( sal_Int32  nRange) const
inline

Definition at line 74 of file multisel.hxx.

◆ GetRangeCount()

sal_Int32 MultiSelection::GetRangeCount ( ) const
inline

Definition at line 73 of file multisel.hxx.

◆ GetSelectCount()

sal_Int32 MultiSelection::GetSelectCount ( ) const
inline

Definition at line 61 of file multisel.hxx.

◆ GetTotalRange()

const Range & MultiSelection::GetTotalRange ( ) const
inline

Definition at line 68 of file multisel.hxx.

◆ ImplClear()

void MultiSelection::ImplClear ( )
private

Definition at line 30 of file multisel.cxx.

References aSels, and nSelCount.

Referenced by operator=(), Reset(), Select(), and SelectAll().

◆ ImplFindSubSelection()

std::size_t MultiSelection::ImplFindSubSelection ( sal_Int32  nIndex) const
private

Definition at line 37 of file multisel.cxx.

References aSels, Max, n, and nIndex.

Referenced by Insert(), IsSelected(), Remove(), and Select().

◆ ImplMergeSubSelections()

void MultiSelection::ImplMergeSubSelections ( sal_Int32  nPos1,
std::size_t  nPos2 
)
private

Definition at line 47 of file multisel.cxx.

References aSels, Max, and Min.

Referenced by Select().

◆ Insert()

void MultiSelection::Insert ( sal_Int32  nIndex,
sal_Int32  nCount = 1 
)

Definition at line 315 of file multisel.cxx.

References aSels, aTotRange, bCurValid, ImplFindSubSelection(), Range::Max(), Min, nCount, nIndex, and nPos.

◆ IsAllSelected()

bool MultiSelection::IsAllSelected ( ) const
inline

Definition at line 59 of file multisel.hxx.

References Range::Len().

◆ IsSelected()

bool MultiSelection::IsSelected ( sal_Int32  nIndex) const

Definition at line 307 of file multisel.cxx.

References aSels, ImplFindSubSelection(), and nIndex.

◆ LastSelected()

sal_Int32 MultiSelection::LastSelected ( )

Definition at line 392 of file multisel.cxx.

References aSels, bCurValid, nCurIndex, nCurSubSel, and SFX_ENDOFSELECTION.

Referenced by Select().

◆ NextSelected()

sal_Int32 MultiSelection::NextSelected ( )

Definition at line 404 of file multisel.cxx.

References aSels, bCurValid, Max, nCurIndex, nCurSubSel, and SFX_ENDOFSELECTION.

◆ operator=()

MultiSelection & MultiSelection::operator= ( const MultiSelection rOrig)

Definition at line 112 of file multisel.cxx.

References aSels, aTotRange, bCurValid, ImplClear(), nCurIndex, nCurSubSel, and nSelCount.

◆ Remove()

void MultiSelection::Remove ( sal_Int32  nIndex)

Definition at line 347 of file multisel.cxx.

References aSels, aTotRange, bCurValid, ImplFindSubSelection(), Range::Max(), nIndex, nPos, and nSelCount.

◆ Reset()

void MultiSelection::Reset ( void  )

Definition at line 71 of file multisel.cxx.

References aTotRange, bCurValid, and ImplClear().

◆ Select() [1/2]

void MultiSelection::Select ( const Range rIndexRange,
bool  bSelect = true 
)

◆ Select() [2/2]

bool MultiSelection::Select ( sal_Int32  nIndex,
bool  bSelect = true 
)

◆ SelectAll()

void MultiSelection::SelectAll ( bool  bSelect = true)

Definition at line 130 of file multisel.cxx.

References aSels, aTotRange, ImplClear(), Range::Len(), and nSelCount.

◆ SetTotalRange()

void MultiSelection::SetTotalRange ( const Range rTotRange)

Definition at line 422 of file multisel.cxx.

References aSels, aTotRange, bCurValid, Range::Max(), Range::Min(), nCount, nCurIndex, and nSelCount.

Member Data Documentation

◆ aSels

std::vector< Range > MultiSelection::aSels
private

◆ aTotRange

Range MultiSelection::aTotRange
private

Definition at line 37 of file multisel.hxx.

Referenced by Insert(), operator=(), Remove(), Reset(), Select(), SelectAll(), and SetTotalRange().

◆ bCurValid

bool MultiSelection::bCurValid
private

◆ nCurIndex

sal_Int32 MultiSelection::nCurIndex
private

◆ nCurSubSel

std::size_t MultiSelection::nCurSubSel
private

◆ nSelCount

sal_Int32 MultiSelection::nSelCount
private

Definition at line 40 of file multisel.hxx.

Referenced by ImplClear(), operator=(), Remove(), Select(), SelectAll(), and SetTotalRange().


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