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 <rtl/ustring.hxx>
23 #include <sal/types.h>
24 #include <svl/eitem.hxx>
25 #include <svl/poolitem.hxx>
26 #include <svx/svxdllapi.h>
31 enum class SvxChartTextOrder
39 #define CHTXTORDER_COUNT (sal_uInt16(SvxChartTextOrder::Auto) + 1)
41 enum class SvxChartKindError
53 #define CHERROR_COUNT (sal_uInt16(SvxChartKindError::Range) + 1)
55 enum class SvxChartIndicate
63 #define CHINDICATE_COUNT (sal_uInt16(SvxChartIndicate::Down) + 1)
65 enum class SvxChartRegress
78 #define CHREGRESS_COUNT (sal_uInt16(SvxChartRegress::Unknown) + 1)
80 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartRegressItem final
: public SfxEnumItem
<SvxChartRegress
>
83 SvxChartRegressItem(SvxChartRegress eRegress
/*= SvxChartRegress::Linear*/,
86 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
88 sal_uInt16
GetValueCount() const override
{ return CHREGRESS_COUNT
; }
91 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartTextOrderItem final
: public SfxEnumItem
<SvxChartTextOrder
>
94 SvxChartTextOrderItem(SvxChartTextOrder eOrder
/*= SvxChartTextOrder::SideBySide*/,
97 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
99 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
100 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
102 sal_uInt16
GetValueCount() const override
{ return CHTXTORDER_COUNT
; }
105 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartKindErrorItem final
: public SfxEnumItem
<SvxChartKindError
>
108 SvxChartKindErrorItem(SvxChartKindError
/*eOrient = SvxChartKindError::NONE*/,
111 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
113 sal_uInt16
GetValueCount() const override
{ return CHERROR_COUNT
; }
116 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartIndicateItem final
: public SfxEnumItem
<SvxChartIndicate
>
119 SvxChartIndicateItem(SvxChartIndicate eOrient
/*= SvxChartIndicate::NONE*/,
122 virtual SfxPoolItem
* Clone(SfxItemPool
* pPool
= nullptr) const override
;
124 sal_uInt16
GetValueCount() const override
{ return CHINDICATE_COUNT
; }
127 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxDoubleItem final
: public SfxPoolItem
132 static SfxPoolItem
* CreateDefault();
133 SvxDoubleItem(double fValue
/*= 0.0*/, sal_uInt16 nId
);
134 SvxDoubleItem(const SvxDoubleItem
& rItem
);
136 virtual bool QueryValue( css::uno::Any
& rVal
, sal_uInt8 nMemberId
= 0 ) const override
;
137 virtual bool PutValue( const css::uno::Any
& rVal
, sal_uInt8 nMemberId
) override
;
139 virtual bool GetPresentation(SfxItemPresentation ePres
,
142 OUString
&rText
, const IntlWrapper
&) const override
;
144 virtual bool operator == (const SfxPoolItem
&) const override
;
145 virtual SfxPoolItem
* Clone(SfxItemPool
*pPool
= nullptr) const override
;
147 double GetValue() const { return fVal
; }
150 #endif // INCLUDED_SVX_CHRTITEM_HXX
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */