sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / intitem.hxx
blobb1bb20c73983516af932920d646f06a0f129c143
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: intitem.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SFXINTITEM_HXX
32 #define _SFXINTITEM_HXX
34 #ifndef INCLUDED_SVTDLLAPI_H
35 #include "bf_svtools/svtdllapi.h"
36 #endif
38 #ifndef _SVTOOLS_CINTITEM_HXX
39 #include <bf_svtools/cintitem.hxx>
40 #endif
42 namespace binfilter
45 //============================================================================
46 class SfxByteItem: public CntByteItem
48 public:
49 TYPEINFO();
51 SfxByteItem(USHORT which = 0, BYTE nValue = 0):
52 CntByteItem(which, nValue) {}
54 virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
56 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
59 //============================================================================
60 DBG_NAMEEX_VISIBILITY(SfxInt16Item, )
62 class SfxInt16Item: public SfxPoolItem
64 INT16 m_nValue;
66 public:
67 TYPEINFO();
69 SfxInt16Item(USHORT which = 0, INT16 nTheValue = 0):
70 SfxPoolItem(which), m_nValue(nTheValue)
71 { DBG_CTOR(SfxInt16Item, 0); }
73 SfxInt16Item(USHORT nWhich, SvStream & rStream);
75 SfxInt16Item(const SfxInt16Item & rItem):
76 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
77 { DBG_CTOR(SfxInt16Item, 0); }
79 virtual ~SfxInt16Item();
81 virtual int operator ==(const SfxPoolItem & rItem) const;
83 using SfxPoolItem::Compare;
84 virtual int Compare(const SfxPoolItem & rWith) const;
86 virtual SfxItemPresentation GetPresentation(SfxItemPresentation,
87 SfxMapUnit, SfxMapUnit,
88 XubString & rText,
89 const ::IntlWrapper * = 0)
90 const;
92 virtual BOOL QueryValue( ::com::sun::star::uno::Any& rVal,
93 BYTE nMemberId = 0 ) const;
95 virtual BOOL PutValue( const ::com::sun::star::uno::Any& rVal,
96 BYTE nMemberId = 0 );
98 virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
100 virtual SvStream & Store(SvStream & rStream, USHORT) const;
102 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
104 virtual INT16 GetMin() const;
106 virtual INT16 GetMax() const;
108 virtual SfxFieldUnit GetUnit() const;
110 INT16 GetValue() const { return m_nValue; }
112 inline void SetValue(INT16 nTheValue);
115 inline void SfxInt16Item::SetValue(INT16 nTheValue)
117 DBG_ASSERT(GetRefCount() == 0, "SfxInt16Item::SetValue(); Pooled item");
118 m_nValue = nTheValue;
121 //============================================================================
122 class SfxUInt16Item: public CntUInt16Item
124 public:
125 TYPEINFO();
127 SfxUInt16Item(USHORT which = 0, UINT16 nValue = 0):
128 CntUInt16Item(which, nValue) {}
130 SfxUInt16Item(USHORT which, SvStream & rStream):
131 CntUInt16Item(which, rStream) {}
133 virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
135 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
138 //============================================================================
139 class SfxInt32Item: public CntInt32Item
141 public:
142 TYPEINFO();
144 SfxInt32Item(USHORT which = 0, INT32 nValue = 0):
145 CntInt32Item(which, nValue) {}
147 SfxInt32Item(USHORT which, SvStream & rStream):
148 CntInt32Item(which, rStream) {}
150 virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
152 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
156 //============================================================================
157 class SfxUInt32Item: public CntUInt32Item
159 public:
160 TYPEINFO();
162 SfxUInt32Item(USHORT which = 0, UINT32 nValue = 0):
163 CntUInt32Item(which, nValue) {}
165 SfxUInt32Item(USHORT which, SvStream & rStream):
166 CntUInt32Item(which, rStream) {}
168 virtual SfxPoolItem * Create(SvStream & rStream, USHORT) const;
170 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const;
175 #endif // _SFXINTITEM_HXX