|
LibreOffice Module tools (master) 1
|
#include <multisel.hxx>
Classes | |
| class | Iterator |
| struct | Range |
Public Member Functions | |
| StringRangeEnumerator (std::u16string_view i_rInput, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset=-1) | |
| sal_Int32 | size () const |
| Iterator | begin (const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const |
| Iterator | end (const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const |
| bool | hasValue (sal_Int32 nValue, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const |
Static Public Member Functions | |
| static bool | getRangesFromString (std::u16string_view i_rPageRange, std::vector< sal_Int32 > &o_rPageVector, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset=-1, o3tl::sorted_vector< sal_Int32 > const *i_pPossibleValues=nullptr) |
| i_rPageRange: the string to be changed into a sequence of numbers valid format example "5-3,9,9,7-8" ; instead of ',' ';' or ' ' are allowed as well o_rPageVector: the output sequence of numbers i_nLogicalOffset: an offset to be applied to each number in the string before inserting it in the resulting sequence example: a user enters page numbers from 1 to n (since that is logical) of course usable page numbers in code would start from 0 and end at n-1 so the logical offset would be -1 i_nMinNumber: the minimum allowed number i_nMaxNumber: the maximum allowed number More... | |
Private Member Functions | |
| bool | setRange (std::u16string_view i_rNewRange) |
| bool | insertRange (sal_Int32 nFirst, sal_Int32 nLast, bool bSequence) |
| void | insertJoinedRanges (const std::vector< sal_Int32 > &rNumbers) |
| bool | checkValue (sal_Int32, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const |
Private Attributes | |
| std::vector< StringRangeEnumerator::Range > | maSequence |
| sal_Int32 | mnCount |
| sal_Int32 | mnMin |
| sal_Int32 | mnMax |
| sal_Int32 | mnOffset |
| bool | mbValidInput |
Friends | |
| class | StringRangeEnumerator::Iterator |
Definition at line 77 of file multisel.hxx.
| StringRangeEnumerator::StringRangeEnumerator | ( | std::u16string_view | i_rInput, |
| sal_Int32 | i_nMinNumber, | ||
| sal_Int32 | i_nMaxNumber, | ||
| sal_Int32 | i_nLogicalOffset = -1 |
||
| ) |
Definition at line 476 of file multisel.cxx.
References mbValidInput, mnCount, mnMax, mnMin, and setRange().
| StringRangeEnumerator::Iterator StringRangeEnumerator::begin | ( | const o3tl::sorted_vector< sal_Int32 > * | i_pPossibleValues = nullptr | ) | const |
Definition at line 704 of file multisel.cxx.
References checkValue(), and maSequence.
Referenced by getRangesFromString().
|
private |
Definition at line 492 of file multisel.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), and mnMax.
Referenced by begin(), insertRange(), and StringRangeEnumerator::Iterator::operator++().
| StringRangeEnumerator::Iterator StringRangeEnumerator::end | ( | const o3tl::sorted_vector< sal_Int32 > * | i_pPossibleValues = nullptr | ) | const |
Definition at line 715 of file multisel.cxx.
Referenced by getRangesFromString().
|
static |
i_rPageRange: the string to be changed into a sequence of numbers valid format example "5-3,9,9,7-8" ; instead of ',' ';' or ' ' are allowed as well o_rPageVector: the output sequence of numbers i_nLogicalOffset: an offset to be applied to each number in the string before inserting it in the resulting sequence example: a user enters page numbers from 1 to n (since that is logical) of course usable page numbers in code would start from 0 and end at n-1 so the logical offset would be -1 i_nMinNumber: the minimum allowed number i_nMaxNumber: the maximum allowed number
behavior:
Definition at line 720 of file multisel.cxx.
References begin(), end(), mbValidInput, and size().
| bool StringRangeEnumerator::hasValue | ( | sal_Int32 | nValue, |
| const o3tl::sorted_vector< sal_Int32 > * | i_pPossibleValues = nullptr |
||
| ) | const |
Definition at line 634 of file multisel.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), i, maSequence, n, StringRangeEnumerator::Range::nFirst, and StringRangeEnumerator::Range::nLast.
|
private |
Definition at line 547 of file multisel.cxx.
References i, insertRange(), and nCount.
Referenced by setRange().
|
private |
Definition at line 501 of file multisel.cxx.
References checkValue(), maSequence, mnCount, mnMax, and mnMin.
Referenced by insertJoinedRanges().
|
private |
Definition at line 574 of file multisel.cxx.
References insertJoinedRanges(), maSequence, mnCount, mnMax, mnMin, mnOffset, and o3tl::toInt32().
Referenced by StringRangeEnumerator().
|
inline |
Definition at line 129 of file multisel.hxx.
References mnCount.
Referenced by getRangesFromString().
|
friend |
Definition at line 121 of file multisel.hxx.
|
private |
Definition at line 86 of file multisel.hxx.
Referenced by begin(), hasValue(), insertRange(), StringRangeEnumerator::Iterator::operator++(), and setRange().
|
private |
Definition at line 91 of file multisel.hxx.
Referenced by getRangesFromString(), and StringRangeEnumerator().
|
private |
Definition at line 87 of file multisel.hxx.
Referenced by insertRange(), setRange(), and size().
|
private |
Definition at line 89 of file multisel.hxx.
Referenced by checkValue(), insertRange(), setRange(), and StringRangeEnumerator().
|
private |
Definition at line 88 of file multisel.hxx.
Referenced by insertRange(), setRange(), and StringRangeEnumerator().
|
private |
Definition at line 90 of file multisel.hxx.
Referenced by setRange().