19#ifndef INCLUDED_TOOLS_MULTISEL_HXX
20#define INCLUDED_TOOLS_MULTISEL_HXX
24#include <rtl/ustring.hxx>
30#define SFX_ENDOFSELECTION (-1)
45 TOOLS_DLLPRIVATE void ImplMergeSubSelections( sal_Int32 nPos1, std::size_t nPos2 );
55 void SelectAll(
bool bSelect =
true );
56 bool Select( sal_Int32 nIndex,
bool bSelect =
true );
57 void Select(
const Range& rIndexRange,
bool bSelect =
true );
58 bool IsSelected( sal_Int32 nIndex )
const;
60 {
return nSelCount == aTotRange.
Len(); }
63 void SetTotalRange(
const Range& rTotRange );
64 void Insert( sal_Int32 nIndex, sal_Int32 nCount = 1 );
65 void Remove( sal_Int32 nIndex );
69 sal_Int32 FirstSelected();
70 sal_Int32 LastSelected();
71 sal_Int32 NextSelected();
74 const Range&
GetRange( sal_Int32 nRange )
const {
return aSels[nRange]; }
84 Range( sal_Int32 i_nFirst, sal_Int32 i_nLast ) : nFirst( i_nFirst ), nLast( i_nLast ) {}
93 bool setRange( std::u16string_view i_rNewRange );
94 bool insertRange( sal_Int32 nFirst, sal_Int32 nLast,
bool bSequence );
95 void insertJoinedRanges(
const std::vector< sal_Int32 >& rNumbers );
109 sal_Int32 i_nCurrent )
110 : pEnumerator( i_pEnum ), pPossibleValues( i_pPossibleValues )
111 , nRangeIndex( i_nRange ), nCurrent( i_nCurrent ) {}
118 {
return ! (*
this == i_rComp); }
124 sal_Int32 i_nMinNumber,
125 sal_Int32 i_nMaxNumber,
126 sal_Int32 i_nLogicalOffset = -1
160 std::vector< sal_Int32 >& o_rPageVector,
161 sal_Int32 i_nMinNumber,
162 sal_Int32 i_nMaxNumber,
163 sal_Int32 i_nLogicalOffset = -1,
bool operator==(const BigInt &rVal1, const BigInt &rVal2)
const Range & GetTotalRange() const
sal_Int32 GetSelectCount() const
const Range & GetRange(sal_Int32 nRange) const
sal_Int32 GetRangeCount() const
bool IsAllSelected() const
std::vector< Range > aSels
const o3tl::sorted_vector< sal_Int32 > * pPossibleValues
Iterator(const StringRangeEnumerator *i_pEnum, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues, sal_Int32 i_nRange, sal_Int32 i_nCurrent)
friend class StringRangeEnumerator
const StringRangeEnumerator * pEnumerator
sal_Int32 operator*() const
bool operator!=(const Iterator &i_rComp) const
bool hasValue(sal_Int32 nValue, const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
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,...
std::vector< StringRangeEnumerator::Range > maSequence
Iterator end(const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
Iterator begin(const o3tl::sorted_vector< sal_Int32 > *i_pPossibleValues=nullptr) const
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
Range(sal_Int32 i_nFirst, sal_Int32 i_nLast)