diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-19 20:42:14 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-24 23:22:06 +0100 |
commit | 4c2393eae69902107febc62161fd842fdea953c4 (patch) | |
tree | 67a03c77bc867978f19b4fe6e37352930c2234a2 /sw/inc | |
parent | 61df9ee7b13660a21d513f70410e6716c2409e20 (diff) |
sal_uInt16 to size_t and optimizations
Removed unneeded casts, adapted cycles, reduced scope...
Change-Id: I1781a9d4c42bd6b85f16e9573d0bc2b201084646
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/fesh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/tabcol.hxx | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 65cf7c514e25..94a9f208fb34 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -701,8 +701,8 @@ public: sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = 0 ) const; //0 == not in any column. sal_uInt16 GetCurMouseColNum( const Point &rPt, SwGetCurColNumPara* pPara = 0 ) const; - sal_uInt16 GetCurTabColNum() const; //0 == not in any table. - sal_uInt16 GetCurMouseTabColNum( const Point &rPt ) const; + size_t GetCurTabColNum() const; //0 == not in any table. + size_t GetCurMouseTabColNum( const Point &rPt ) const; sal_uInt16 GetCurOutColNum( SwGetCurColNumPara* pPara = 0 ) const; ///< Current outer column. sal_Bool IsTableRightToLeft() const; diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 270a834d6673..b124658a68d8 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -60,19 +60,19 @@ public: SwTabCols( const SwTabCols& ); SwTabCols &operator=( const SwTabCols& ); bool operator==( const SwTabCols& rCmp ) const; - long& operator[]( sal_uInt16 nPos ) { return aData[nPos].nPos; } - long operator[]( sal_uInt16 nPos ) const { return aData[nPos].nPos; } - sal_uInt16 Count() const { return sal::static_int_cast< sal_uInt16 >(aData.size()); } + long& operator[]( size_t nPos ) { return aData[nPos].nPos; } + long operator[]( size_t nPos ) const { return aData[nPos].nPos; } + size_t Count() const { return aData.size(); } - sal_Bool IsHidden( sal_uInt16 nPos ) const { return aData[nPos].bHidden; } - void SetHidden( sal_uInt16 nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; } + sal_Bool IsHidden( size_t nPos ) const { return aData[nPos].bHidden; } + void SetHidden( size_t nPos, sal_Bool bValue ) { aData[nPos].bHidden = bValue; } - void Insert( long nValue, sal_Bool bValue, sal_uInt16 nPos ); - void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, sal_uInt16 nPos ); - void Remove( sal_uInt16 nPos, sal_uInt16 nAnz = 1 ); + void Insert( long nValue, sal_Bool bValue, size_t nPos ); + void Insert( long nValue, long nMin, long nMax, sal_Bool bValue, size_t nPos ); + void Remove( size_t nPos, size_t nAnz = 1 ); - const SwTabColsEntry& GetEntry( sal_uInt16 nPos ) const { return aData[nPos]; } - SwTabColsEntry& GetEntry( sal_uInt16 nPos ) { return aData[nPos]; } + const SwTabColsEntry& GetEntry( size_t nPos ) const { return aData[nPos]; } + SwTabColsEntry& GetEntry( size_t nPos ) { return aData[nPos]; } long GetLeftMin() const { return nLeftMin; } long GetLeft() const { return nLeft; } |