diff options
-rw-r--r-- | sw/inc/index.hxx | 16 | ||||
-rw-r--r-- | sw/source/core/bastyp/index.cxx | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx index 2d1394ef8ce2..568da1ae56ab 100644 --- a/sw/inc/index.hxx +++ b/sw/inc/index.hxx @@ -19,14 +19,10 @@ #ifndef INCLUDED_SW_INC_INDEX_HXX #define INCLUDED_SW_INC_INDEX_HXX -#include <limits.h> - -#include "rtl/instance.hxx" -#include <tools/solar.h> +#include <sal/types.h> #include <tools/rtti.hxx> #include <swdllapi.h> -class SwIndex; class SwIndexReg; struct SwPosition; @@ -139,16 +135,19 @@ inline sal_Int32 SwIndex::operator++() { return ChgValue( *this, m_nIndex+1 ).m_nIndex; } + inline sal_Int32 SwIndex::operator--() { return ChgValue( *this, m_nIndex-1 ).m_nIndex; } + inline sal_Int32 SwIndex::operator++(int) { sal_Int32 const nOldIndex = m_nIndex; ChgValue( *this, m_nIndex+1 ); return nOldIndex; } + inline sal_Int32 SwIndex::operator--(int) { sal_Int32 const nOldIndex = m_nIndex; @@ -160,14 +159,17 @@ inline sal_Int32 SwIndex::operator+=( sal_Int32 const nVal ) { return ChgValue( *this, m_nIndex + nVal ).m_nIndex; } + inline sal_Int32 SwIndex::operator-=( sal_Int32 const nVal ) { return ChgValue( *this, m_nIndex - nVal ).m_nIndex; } + inline sal_Int32 SwIndex::operator+=( const SwIndex& rIndex ) { return ChgValue( *this, m_nIndex + rIndex.m_nIndex ).m_nIndex; } + inline sal_Int32 SwIndex::operator-=( const SwIndex& rIndex ) { return ChgValue( *this, m_nIndex - rIndex.m_nIndex ).m_nIndex; @@ -177,18 +179,22 @@ inline bool SwIndex::operator< ( const SwIndex& rIndex ) const { return m_nIndex < rIndex.m_nIndex; } + inline bool SwIndex::operator<=( const SwIndex& rIndex ) const { return m_nIndex <= rIndex.m_nIndex; } + inline bool SwIndex::operator> ( const SwIndex& rIndex ) const { return m_nIndex > rIndex.m_nIndex; } + inline bool SwIndex::operator>=( const SwIndex& rIndex ) const { return m_nIndex >= rIndex.m_nIndex; } + inline SwIndex& SwIndex::operator= ( sal_Int32 const nVal ) { if (m_nIndex != nVal) diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx index 3fe567e334b7..81da0bb7d013 100644 --- a/sw/source/core/bastyp/index.cxx +++ b/sw/source/core/bastyp/index.cxx @@ -20,9 +20,6 @@ #include "index.hxx" #include <assert.h> -#include <stdlib.h> -#include <rtl/ustring.hxx> -#include <tools/solar.h> #include <sal/log.hxx> TYPEINIT0(SwIndexReg); |