summaryrefslogtreecommitdiff
path: root/svl/inc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-04-02 14:21:42 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-04-02 15:32:20 +0000
commit1416669670de6f93b40d8a2f8f001e92ec0bf101 (patch)
tree16da4cdc3242efc3c189660d7118663e3e9874e4 /svl/inc
parent07f98c44311464fd7e5f94f569f847e43a0be4a2 (diff)
Revert "Revert "reduce some uglyness""
The header guard seems to solve the problem. This reverts commit df8c41cceeca27ae49e9fa6b5cd64c65c8feb218. Change-Id: I27869be9c70e79a366a547ce061e71a3743f87da Reviewed-on: https://gerrit.libreoffice.org/3171 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/rngitem.hxx49
1 files changed, 18 insertions, 31 deletions
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index 698641d51fb1..450e958ec179 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -18,20 +18,8 @@
*/
#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 +27,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 +44,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 +73,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: */