summaryrefslogtreecommitdiff
path: root/svl/inc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-11 13:07:34 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-11 17:10:07 +0100
commit84dc8e5b5504e5f54fba695d4338d022681d85cf (patch)
treee0603957d60b22e512bdcf13c933ff783a6dbaa1 /svl/inc
parent7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 (diff)
reduce some uglyness
As there are no other users of this files, those macros can be expanded: NUMTYPE -> sal_uInt16 SfxXRangeItem -> SfxRangeItem SfxXRangesItem -> SfxUShortRangesItem Change-Id: I35361e0622a8787d938fc6c6745c4169ad6d909f
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/rngitem.hxx50
1 files changed, 18 insertions, 32 deletions
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 698641d51fb1..cf23e9c394bf 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -19,19 +19,6 @@
#ifndef _SFXRNGITEM_HXX
-#ifndef NUMTYPE
-
-#define NUMTYPE sal_uInt16
-#define SfxXRangeItem SfxRangeItem
-#define SfxXRangesItem SfxUShortRangesItem
-#include <svl/rngitem.hxx>
-#undef NUMTYPE
-#undef SfxXRangeItem
-#undef SfxXRangesItem
-
-#define _SFXRNGITEM_HXX
-
-#else
#include "svl/svldllapi.h"
#include <svl/poolitem.hxx>
@@ -39,16 +26,16 @@ class SvStream;
// -----------------------------------------------------------------------
-class SVL_DLLPUBLIC SfxXRangeItem : public SfxPoolItem
+class SVL_DLLPUBLIC SfxRangeItem : public SfxPoolItem
{
private:
- NUMTYPE nFrom;
- NUMTYPE nTo;
+ sal_uInt16 nFrom;
+ sal_uInt16 nTo;
public:
TYPEINFO();
- SfxXRangeItem();
- SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
- SfxXRangeItem( const SfxXRangeItem& rItem );
+ SfxRangeItem();
+ SfxRangeItem( sal_uInt16 nWID, sal_uInt16 nFrom, sal_uInt16 nTo );
+ SfxRangeItem( const SfxRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -56,28 +43,28 @@ public:
OUString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- inline NUMTYPE& From() { return nFrom; }
- inline NUMTYPE From() const { return nFrom; }
- inline NUMTYPE& To() { return nTo; }
- inline NUMTYPE To() const { return nTo; }
- inline sal_Bool HasRange() const { return nTo>nFrom; }
+ inline sal_uInt16& From() { return nFrom; }
+ inline sal_uInt16 From() const { return nFrom; }
+ inline sal_uInt16& To() { return nTo; }
+ inline sal_uInt16 To() const { return nTo; }
+ inline sal_Bool HasRange() const { return nTo>nFrom; }
virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
// -----------------------------------------------------------------------
-class SVL_DLLPUBLIC SfxXRangesItem : public SfxPoolItem
+class SVL_DLLPUBLIC SfxUShortRangesItem : public SfxPoolItem
{
private:
- NUMTYPE* _pRanges;
+ sal_uInt16* _pRanges;
public:
TYPEINFO();
- SfxXRangesItem();
- SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream );
- SfxXRangesItem( const SfxXRangesItem& rItem );
- virtual ~SfxXRangesItem();
+ SfxUShortRangesItem();
+ SfxUShortRangesItem( sal_uInt16 nWID, SvStream &rStream );
+ SfxUShortRangesItem( const SfxUShortRangesItem& rItem );
+ virtual ~SfxUShortRangesItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -85,12 +72,11 @@ public:
OUString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- inline const NUMTYPE* GetRanges() const { return _pRanges; }
+ inline const sal_uInt16* GetRanges() const { return _pRanges; }
virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
#endif
-#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */