20 #ifndef INCLUDED_SC_SOURCE_UI_INC_CSVSPLITS_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_CSVSPLITS_HXX
46 bool Insert( sal_Int32 nPos );
49 bool Remove( sal_Int32 nPos );
51 void RemoveRange( sal_Int32 nPosStart, sal_Int32 nPosEnd );
56 bool HasSplit( sal_Int32 nPos )
const;
62 sal_uInt32
GetIndex( sal_Int32 nPos )
const;
70 {
return static_cast<sal_uInt32
>(maVec.size()); }
72 sal_Int32
GetPos( sal_uInt32 nIndex )
const;
75 {
return GetPos( nIndex ); }
79 sal_uInt32
GetIterIndex( const_iterator
const & aIter )
const;
sal_uInt32 UpperBound(sal_Int32 nPos) const
Returns index of the last split less than or equal to nPos.
const sal_Int32 CSV_POS_INVALID
Constant for an invalid ruler position.
sal_Int32 GetPos(sal_uInt32 nIndex) const
Returns the position of the specified split.
::std::vector< sal_Int32 > ScSplitVector
sal_uInt32 LowerBound(sal_Int32 nPos) const
Returns index of the first split greater than or equal to nPos.
bool Remove(sal_Int32 nPos)
Removes a split by position.
const sal_uInt32 CSV_VEC_NOTFOUND
Constant for an invalid vector index.
ScSplitVector::const_iterator const_iterator
sal_uInt32 GetIndex(sal_Int32 nPos) const
Searches for a split at position nPos.
bool HasSplit(sal_Int32 nPos) const
Returns true if at position nPos is a split.
sal_uInt32 GetIterIndex(const_iterator const &aIter) const
Returns the vector index of an iterator.
void Clear()
Removes all elements from the vector.
A vector of column splits that supports inserting, removing and moving splits.
void RemoveRange(sal_Int32 nPosStart, sal_Int32 nPosEnd)
Removes a range of splits in the given position range.
sal_Int32 operator[](sal_uInt32 nIndex) const
Returns the position of the specified split.
bool Insert(sal_Int32 nPos)
The split container.
sal_uInt32 Count() const
Returns the number of splits.