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 .
19 #ifndef INCLUDED_SVX_CHRTITEM_HXX
20 #define INCLUDED_SVX_CHRTITEM_HXX
22 #include <com/sun/star/uno/Any.hxx>
23 #include <rtl/ustring.hxx>
24 #include <sal/types.h>
25 #include <svl/eitem.hxx>
26 #include <svl/poolitem.hxx>
27 #include <svx/svxdllapi.h>
33 enum class SvxChartTextOrder
41 #define CHTXTORDER_COUNT ((sal_uInt16)SvxChartTextOrder::Auto + 1)
43 enum class SvxChartKindError
55 #define CHERROR_COUNT ((sal_uInt16)SvxChartKindError::Range + 1)
57 enum class SvxChartIndicate
65 #define CHINDICATE_COUNT ((sal_uInt16)SvxChartIndicate::Down + 1)
67 enum class SvxChartRegress
80 #define CHREGRESS_COUNT ((sal_uInt16)SvxChartRegress::Unknown + 1)
82 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartRegressItem
: public SfxEnumItem
<SvxChartRegress
>
85 SvxChartRegressItem(SvxChartRegress eRegress
/*= SvxChartRegress::Linear*/,
87 SvxChartRegressItem(SvStream
& rIn
, sal_uInt16 nId
);
89 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
90 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const override
;
92 sal_uInt16
GetValueCount() const override
{ return CHREGRESS_COUNT
; }
93 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const override
;
96 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartTextOrderItem
: public SfxEnumItem
<SvxChartTextOrder
>
99 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= SvxChartTextOrder::SideBySide*/,
101 SvxChartTextOrderItem(SvStream
& rIn
,
104 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
105 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const override
;
107 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
108 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
110 sal_uInt16
GetValueCount() const override
{ return CHTXTORDER_COUNT
; }
113 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartKindErrorItem
: public SfxEnumItem
<SvxChartKindError
>
116 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = SvxChartKindError::NONE*/,
118 SvxChartKindErrorItem(SvStream
& rIn
,
121 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
122 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const override
;
124 sal_uInt16
GetValueCount() const override
{ return CHERROR_COUNT
; }
126 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const override
;
129 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartIndicateItem
: public SfxEnumItem
<SvxChartIndicate
>
132 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= SvxChartIndicate::NONE*/,
134 SvxChartIndicateItem(SvStream
& rIn
,
137 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
138 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVer
) const override
;
140 sal_uInt16
GetValueCount() const override
{ return CHINDICATE_COUNT
; }
142 sal_uInt16
GetVersion (sal_uInt16 nFileFormatVersion
) const override
;
145 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxDoubleItem
: public SfxPoolItem
150 static SfxPoolItem
* CreateDefault();
151 SvxDoubleItem(double fValue
/*= 0.0*/, sal_uInt16 nId
);
152 SvxDoubleItem(const SvxDoubleItem
& rItem
);
154 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
155 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
157 virtual bool GetPresentation(SfxItemPresentation ePres
,
160 OUString
&rText
, const IntlWrapper
* = nullptr) const override
;
162 virtual bool operator == (const SfxPoolItem
&) const override
;
163 virtual SfxPoolItem
* Clone(SfxItemPool
*pPool
= nullptr) const override
;
164 virtual SfxPoolItem
* Create(SvStream
& rIn
, sal_uInt16 nVersion
) const override
;
165 virtual SvStream
& Store(SvStream
& rOut
, sal_uInt16 nItemVersion
) const override
;
167 double GetValue() const { return fVal
; }
170 #endif // INCLUDED_SVX_CHRTITEM_HXX
172 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */