update emoji autocorrect entries from po-files
[LibreOffice.git] / include / svl / cintitem.hxx
blob710e5e43e897e0a628d5e5da72081a0209886fba
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVL_CINTITEM_HXX
21 #define INCLUDED_SVL_CINTITEM_HXX
23 #include <svl/svldllapi.h>
24 #include <tools/debug.hxx>
25 #include <svl/poolitem.hxx>
27 class SVL_DLLPUBLIC CntByteItem: public SfxPoolItem
29 sal_uInt8 m_nValue;
31 public:
32 TYPEINFO_OVERRIDE();
34 CntByteItem(sal_uInt16 which = 0, sal_uInt8 nTheValue = 0):
35 SfxPoolItem(which), m_nValue(nTheValue) {}
37 CntByteItem(const CntByteItem & rItem):
38 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
41 virtual ~CntByteItem() {}
43 virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
45 using SfxPoolItem::Compare;
46 virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
48 virtual bool GetPresentation(SfxItemPresentation,
49 SfxMapUnit, SfxMapUnit,
50 OUString & rText,
51 const IntlWrapper * = 0)
52 const SAL_OVERRIDE;
54 virtual bool QueryValue(com::sun::star::uno::Any& rVal,
55 sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
57 virtual bool PutValue(const com::sun::star::uno::Any& rVal,
58 sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
60 virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
62 virtual SvStream & Store(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
64 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const SAL_OVERRIDE;
66 sal_uInt8 GetValue() const { return m_nValue; }
68 inline void SetValue(sal_uInt8 nTheValue);
71 inline void CntByteItem::SetValue(sal_uInt8 nTheValue)
73 DBG_ASSERT(GetRefCount() == 0, "CntByteItem::SetValue(): Pooled item");
74 m_nValue = nTheValue;
77 class SVL_DLLPUBLIC CntUInt16Item: public SfxPoolItem
79 sal_uInt16 m_nValue;
81 public:
82 TYPEINFO_OVERRIDE();
84 CntUInt16Item(sal_uInt16 which = 0, sal_uInt16 nTheValue = 0):
85 SfxPoolItem(which), m_nValue(nTheValue)
88 CntUInt16Item(sal_uInt16 which, SvStream & rStream);
90 CntUInt16Item(const CntUInt16Item & rItem):
91 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
94 virtual ~CntUInt16Item() {}
96 virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
98 using SfxPoolItem::Compare;
99 virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
101 virtual bool GetPresentation(SfxItemPresentation,
102 SfxMapUnit, SfxMapUnit,
103 OUString & rText,
104 const IntlWrapper * = 0)
105 const SAL_OVERRIDE;
107 virtual bool QueryValue(com::sun::star::uno::Any& rVal,
108 sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
110 virtual bool PutValue(const com::sun::star::uno::Any& rVal,
111 sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
113 virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
115 virtual SvStream & Store(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
117 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const SAL_OVERRIDE;
119 sal_uInt16 GetValue() const { return m_nValue; }
121 inline void SetValue(sal_uInt16 nTheValue);
124 inline void CntUInt16Item::SetValue(sal_uInt16 nTheValue)
126 DBG_ASSERT(GetRefCount() == 0, "CntUInt16Item::SetValue(): Pooled item");
127 m_nValue = nTheValue;
130 class SVL_DLLPUBLIC CntInt32Item: public SfxPoolItem
132 sal_Int32 m_nValue;
134 public:
135 TYPEINFO_OVERRIDE();
137 CntInt32Item(sal_uInt16 which = 0, sal_Int32 nTheValue = 0):
138 SfxPoolItem(which), m_nValue(nTheValue)
141 CntInt32Item(sal_uInt16 which, SvStream & rStream);
143 CntInt32Item(const CntInt32Item & rItem):
144 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
147 virtual ~CntInt32Item() {}
149 virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
151 using SfxPoolItem::Compare;
152 virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
154 virtual bool GetPresentation(SfxItemPresentation,
155 SfxMapUnit, SfxMapUnit,
156 OUString & rText,
157 const IntlWrapper * = 0)
158 const SAL_OVERRIDE;
160 virtual bool QueryValue(com::sun::star::uno::Any& rVal,
161 sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
163 virtual bool PutValue(const com::sun::star::uno::Any& rVal,
164 sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
166 virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
168 virtual SvStream & Store(SvStream &, sal_uInt16) const SAL_OVERRIDE;
170 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const SAL_OVERRIDE;
172 sal_Int32 GetValue() const { return m_nValue; }
174 inline void SetValue(sal_Int32 nTheValue);
177 inline void CntInt32Item::SetValue(sal_Int32 nTheValue)
179 DBG_ASSERT(GetRefCount() == 0, "CntInt32Item::SetValue(): Pooled item");
180 m_nValue = nTheValue;
183 class SVL_DLLPUBLIC CntUInt32Item: public SfxPoolItem
185 sal_uInt32 m_nValue;
187 public:
188 TYPEINFO_OVERRIDE();
190 CntUInt32Item(sal_uInt16 which = 0, sal_uInt32 nTheValue = 0):
191 SfxPoolItem(which), m_nValue(nTheValue)
194 CntUInt32Item(sal_uInt16 nWhich, SvStream & rStream);
196 CntUInt32Item(const CntUInt32Item & rItem):
197 SfxPoolItem(rItem), m_nValue(rItem.m_nValue)
200 virtual ~CntUInt32Item() {}
202 virtual bool operator ==(const SfxPoolItem & rItem) const SAL_OVERRIDE;
204 using SfxPoolItem::Compare;
205 virtual int Compare(const SfxPoolItem & rWith) const SAL_OVERRIDE;
207 virtual bool GetPresentation(SfxItemPresentation,
208 SfxMapUnit, SfxMapUnit,
209 OUString & rText,
210 const IntlWrapper * = 0)
211 const SAL_OVERRIDE;
213 virtual bool QueryValue(com::sun::star::uno::Any& rVal,
214 sal_uInt8 nMemberId = 0) const SAL_OVERRIDE;
216 virtual bool PutValue(const com::sun::star::uno::Any& rVal,
217 sal_uInt8 nMemberId = 0) SAL_OVERRIDE;
219 virtual SfxPoolItem * Create(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
221 virtual SvStream & Store(SvStream & rStream, sal_uInt16) const SAL_OVERRIDE;
223 virtual SfxPoolItem * Clone(SfxItemPool * = 0) const SAL_OVERRIDE;
225 sal_uInt32 GetValue() const { return m_nValue; }
227 inline void SetValue(sal_uInt32 nTheValue);
230 inline void CntUInt32Item::SetValue(sal_uInt32 nTheValue)
232 DBG_ASSERT(GetRefCount() == 0, "CntUInt32Item::SetValue(): Pooled item");
233 m_nValue = nTheValue;
236 #endif // INCLUDED_SVL_CINTITEM_HXX
238 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */