summaryrefslogtreecommitdiff
path: root/svl/inc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-11 16:56:46 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-11 17:10:07 +0100
commit7050fc44a7a02efdec005337ee9d286d27964e47 (patch)
tree1b76bb64f14e29799719eb557e1eaf88347a78b0 /svl/inc
parent84dc8e5b5504e5f54fba695d4338d022681d85cf (diff)
reduce some uglyness II
NUMTYPE is never defined outside this header. So this complexity can go. There is no need to deliver nranges.hxx as there is only itemset.cxx using it. NUMTYPE -> sal_uInt16 NUMTYPE_ARG -> int SfxNumRanges -> SfxUShortRanges Change-Id: I27027f9ec83ebf456bb545763954884d5de227b3
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/nranges.hxx50
1 files changed, 16 insertions, 34 deletions
diff --git a/svl/inc/svl/nranges.hxx b/svl/inc/svl/nranges.hxx
index eabe9d24d5a7..3e923310d541 100644
--- a/svl/inc/svl/nranges.hxx
+++ b/svl/inc/svl/nranges.hxx
@@ -25,58 +25,40 @@
#ifndef _SFXNRANGES_HXX
-#ifndef NUMTYPE
-
-#define NUMTYPE sal_uInt16
-#define SfxNumRanges SfxUShortRanges
-#include <svl/nranges.hxx>
-
-#undef NUMTYPE
-
-#define _SFXNRANGES_HXX
-
-#else
#include <tools/solar.h>
//========================================================================
-#define NUMTYPE_ARG int
-
-class SfxNumRanges
+class SfxUShortRanges
{
- NUMTYPE* _pRanges; // 0-terminated array of NUMTYPE-pairs
+ sal_uInt16* _pRanges; // 0-terminated array of sal_uInt16-pairs
public:
- SfxNumRanges() : _pRanges( 0 ) {}
- SfxNumRanges( const SfxNumRanges &rOrig );
- SfxNumRanges( NUMTYPE nWhich1, NUMTYPE nWhich2 );
- SfxNumRanges( const NUMTYPE* nNumTable );
- ~SfxNumRanges()
+ SfxUShortRanges() : _pRanges( 0 ) {}
+ SfxUShortRanges( const SfxUShortRanges &rOrig );
+ SfxUShortRanges( sal_uInt16 nWhich1, sal_uInt16 nWhich2 );
+ SfxUShortRanges( const sal_uInt16* nNumTable );
+ ~SfxUShortRanges()
{ delete [] _pRanges; }
- sal_Bool operator == ( const SfxNumRanges & ) const;
- sal_Bool operator != ( const SfxNumRanges & rRanges ) const
+ sal_Bool operator == ( const SfxUShortRanges & ) const;
+ sal_Bool operator != ( const SfxUShortRanges & rRanges ) const
{ return !( *this == rRanges ); }
- SfxNumRanges& operator = ( const SfxNumRanges & );
+ SfxUShortRanges& operator = ( const SfxUShortRanges & );
- SfxNumRanges& operator += ( const SfxNumRanges & );
- SfxNumRanges& operator -= ( const SfxNumRanges & );
- SfxNumRanges& operator /= ( const SfxNumRanges & );
+ SfxUShortRanges& operator += ( const SfxUShortRanges & );
+ SfxUShortRanges& operator -= ( const SfxUShortRanges & );
+ SfxUShortRanges& operator /= ( const SfxUShortRanges & );
- NUMTYPE Count() const;
- sal_Bool IsEmpty() const
+ sal_uInt16 Count() const;
+ sal_Bool IsEmpty() const
{ return !_pRanges || 0 == *_pRanges; }
- operator const NUMTYPE* () const
+ operator const sal_uInt16* () const
{ return _pRanges; }
};
-#undef NUMTYPE
-#undef SfxNumRanges
-
-#endif
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */