1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_EITEM_HXX
21 #define INCLUDED_SVL_EITEM_HXX
23 #include <svl/svldllapi.h>
24 #include <svl/cenumitm.hxx>
28 class SVL_DLLPUBLIC SfxEnumItem
29 : public SfxEnumItemInterface
34 explicit SfxEnumItem(sal_uInt16
const nWhich
=0, sal_uInt16
const nValue
=0)
35 : SfxEnumItemInterface(nWhich
)
39 SfxEnumItem(const SfxEnumItem
& rItem
)
40 : SfxEnumItemInterface(rItem
)
41 , m_nValue(rItem
.m_nValue
)
44 SfxEnumItem(sal_uInt16
const nWhich
, SvStream
& rStream
);
49 sal_uInt16
GetValue() const { return m_nValue
; }
51 void SetValue(sal_uInt16 nTheValue
);
54 virtual SvStream
& Store(SvStream
& rStream
, sal_uInt16
) const SAL_OVERRIDE
;
56 virtual sal_uInt16
GetEnumValue() const SAL_OVERRIDE
;
58 virtual void SetEnumValue(sal_uInt16 nTheValue
) SAL_OVERRIDE
;
64 class SVL_DLLPUBLIC SfxBoolItem
72 explicit SfxBoolItem(sal_uInt16
const nWhich
= 0, bool const bValue
= false)
77 SfxBoolItem(SfxBoolItem
const& rItem
)
79 , m_bValue(rItem
.m_bValue
)
82 SfxBoolItem(sal_uInt16 nWhich
, SvStream
& rStream
);
84 bool GetValue() const { return m_bValue
; }
86 void SetValue(bool const bTheValue
) { m_bValue
= bTheValue
; }
89 virtual bool operator ==(const SfxPoolItem
& rItem
) const SAL_OVERRIDE
;
91 using SfxPoolItem::Compare
;
92 virtual int Compare(const SfxPoolItem
& rWith
) const SAL_OVERRIDE
;
94 virtual bool GetPresentation(SfxItemPresentation
,
95 SfxMapUnit
, SfxMapUnit
,
97 const IntlWrapper
* = 0)
100 virtual bool QueryValue(com::sun::star::uno::Any
& rVal
, sal_uInt8
= 0)
103 virtual bool PutValue(const com::sun::star::uno::Any
& rVal
, sal_uInt8
= 0)
107 virtual SfxPoolItem
* Create(SvStream
& rStream
, sal_uInt16
) const
110 virtual SvStream
& Store(SvStream
& rStream
, sal_uInt16
) const SAL_OVERRIDE
;
112 virtual SfxPoolItem
* Clone(SfxItemPool
* = 0) const SAL_OVERRIDE
;
114 virtual OUString
GetValueTextByVal(bool bTheValue
) const;
117 #endif // INCLUDED_SVL_EITEM_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */