diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-13 13:07:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-14 10:05:50 +0100 |
commit | 433fc2214c980abd82fa6240f45e634a53a3c61c (patch) | |
tree | 85405a421b5d90daa37bf46ea0979b6ebea51419 /include/tools | |
parent | 76de866e162502518acbc0ab020c257b80946c2d (diff) |
sal_uIntPtr->sal_Int32 in MultiSelection
also replace the long/size_t with sal_Int32 so we have some consistency
Change-Id: I9d3099b881354af7b9f59d312e6b15b213d1e580
Reviewed-on: https://gerrit.libreoffice.org/46395
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/multisel.hxx | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/include/tools/multisel.hxx b/include/tools/multisel.hxx index 17c95a93421f..903423ae5d9c 100644 --- a/include/tools/multisel.hxx +++ b/include/tools/multisel.hxx @@ -28,23 +28,23 @@ typedef ::std::vector< Range* > ImpSelList; -#define SFX_ENDOFSELECTION ULONG_MAX +#define SFX_ENDOFSELECTION SAL_MAX_INT32 class SAL_WARN_UNUSED TOOLS_DLLPUBLIC MultiSelection { private: ImpSelList aSels; // array of SV-selections Range aTotRange; // total range of indexes - sal_uIntPtr nCurSubSel; // index in aSels of current selected index - long nCurIndex; // current selected entry - sal_uIntPtr nSelCount; // number of selected indexes + sal_Int32 nCurSubSel; // index in aSels of current selected index + sal_Int32 nCurIndex; // current selected entry + sal_Int32 nSelCount; // number of selected indexes bool bInverseCur;// inverse cursor bool bCurValid; // are nCurIndex and nCurSubSel valid TOOLS_DLLPRIVATE void ImplClear(); - TOOLS_DLLPRIVATE size_t ImplFindSubSelection( long nIndex ) const; - TOOLS_DLLPRIVATE void ImplMergeSubSelections( size_t nPos1, size_t nPos2 ); - TOOLS_DLLPRIVATE long ImplFwdUnselected(); + TOOLS_DLLPRIVATE sal_Int32 ImplFindSubSelection( sal_Int32 nIndex ) const; + TOOLS_DLLPRIVATE void ImplMergeSubSelections( sal_Int32 nPos1, sal_Int32 nPos2 ); + TOOLS_DLLPRIVATE sal_Int32 ImplFwdUnselected(); public: MultiSelection(); @@ -55,25 +55,25 @@ public: MultiSelection& operator= ( const MultiSelection& rOrig ); void SelectAll( bool bSelect = true ); - bool Select( long nIndex, bool bSelect = true ); + bool Select( sal_Int32 nIndex, bool bSelect = true ); void Select( const Range& rIndexRange, bool bSelect = true ); - bool IsSelected( long nIndex ) const; + bool IsSelected( sal_Int32 nIndex ) const; bool IsAllSelected() const - { return nSelCount == sal_uIntPtr(aTotRange.Len()); } - long GetSelectCount() const { return nSelCount; } + { return nSelCount == aTotRange.Len(); } + sal_Int32 GetSelectCount() const { return nSelCount; } void SetTotalRange( const Range& rTotRange ); - void Insert( long nIndex, long nCount = 1 ); - void Remove( long nIndex ); + void Insert( sal_Int32 nIndex, sal_Int32 nCount = 1 ); + void Remove( sal_Int32 nIndex ); void Reset(); const Range& GetTotalRange() const { return aTotRange; } - long FirstSelected(); - long LastSelected(); - long NextSelected(); + sal_Int32 FirstSelected(); + sal_Int32 LastSelected(); + sal_Int32 NextSelected(); - size_t GetRangeCount() const { return aSels.size(); } - const Range& GetRange( size_t nRange ) const { return *aSels[nRange]; } + sal_Int32 GetRangeCount() const { return aSels.size(); } + const Range& GetRange( sal_Int32 nRange ) const { return *aSels[nRange]; } }; class SAL_WARN_UNUSED TOOLS_DLLPUBLIC StringRangeEnumerator |