summaryrefslogtreecommitdiff
path: root/svl/inc
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-12 10:48:35 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-12 10:48:35 +0100
commitdf8c41cceeca27ae49e9fa6b5cd64c65c8feb218 (patch)
tree46bdd1d38afcde9a698a6051cca4ac4d411ab5fc /svl/inc
parent99c3b3b47c29ced848ecec034784bda3962cdc0b (diff)
Revert "reduce some uglyness"
MSVC doesn't like this. This reverts commit 84dc8e5b5504e5f54fba695d4338d022681d85cf.
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/rngitem.hxx50
1 files changed, 32 insertions, 18 deletions
diff --git a/svl/inc/svl/rngitem.hxx b/svl/inc/svl/rngitem.hxx
index cf23e9c394bf..698641d51fb1 100644
--- a/svl/inc/svl/rngitem.hxx
+++ b/svl/inc/svl/rngitem.hxx
@@ -19,6 +19,19 @@
#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>
@@ -26,16 +39,16 @@ class SvStream;
// -----------------------------------------------------------------------
-class SVL_DLLPUBLIC SfxRangeItem : public SfxPoolItem
+class SVL_DLLPUBLIC SfxXRangeItem : public SfxPoolItem
{
private:
- sal_uInt16 nFrom;
- sal_uInt16 nTo;
+ NUMTYPE nFrom;
+ NUMTYPE nTo;
public:
TYPEINFO();
- SfxRangeItem();
- SfxRangeItem( sal_uInt16 nWID, sal_uInt16 nFrom, sal_uInt16 nTo );
- SfxRangeItem( const SfxRangeItem& rItem );
+ SfxXRangeItem();
+ SfxXRangeItem( sal_uInt16 nWID, NUMTYPE nFrom, NUMTYPE nTo );
+ SfxXRangeItem( const SfxXRangeItem& rItem );
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -43,28 +56,28 @@ public:
OUString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- 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; }
+ 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; }
virtual SfxPoolItem* Create( SvStream &, sal_uInt16 nVersion ) const;
virtual SvStream& Store( SvStream &, sal_uInt16 nItemVersion ) const;
};
// -----------------------------------------------------------------------
-class SVL_DLLPUBLIC SfxUShortRangesItem : public SfxPoolItem
+class SVL_DLLPUBLIC SfxXRangesItem : public SfxPoolItem
{
private:
- sal_uInt16* _pRanges;
+ NUMTYPE* _pRanges;
public:
TYPEINFO();
- SfxUShortRangesItem();
- SfxUShortRangesItem( sal_uInt16 nWID, SvStream &rStream );
- SfxUShortRangesItem( const SfxUShortRangesItem& rItem );
- virtual ~SfxUShortRangesItem();
+ SfxXRangesItem();
+ SfxXRangesItem( sal_uInt16 nWID, SvStream &rStream );
+ SfxXRangesItem( const SfxXRangesItem& rItem );
+ virtual ~SfxXRangesItem();
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
SfxMapUnit eCoreMetric,
@@ -72,11 +85,12 @@ public:
OUString &rText,
const IntlWrapper * = 0 ) const;
virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
- inline const sal_uInt16* GetRanges() const { return _pRanges; }
+ inline const NUMTYPE* 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: */