Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / svx / chrtitem.hxx
blob9e29747f06c6abe2b4e7b25fb53bf973a5f4ef64
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 .
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>
29 class IntlWrapper;
30 class SfxItemPool;
31 class SvStream;
33 enum class SvxChartTextOrder
35 SideBySide,
36 UpDown,
37 DownUp,
38 Auto
41 #define CHTXTORDER_COUNT ((sal_uInt16)SvxChartTextOrder::Auto + 1)
43 enum class SvxChartKindError
45 NONE,
46 Variant,
47 Sigma,
48 Percent,
49 BigError,
50 Const,
51 StdError,
52 Range
55 #define CHERROR_COUNT ((sal_uInt16)SvxChartKindError::Range + 1)
57 enum class SvxChartIndicate
59 NONE,
60 Both,
61 Up,
62 Down
65 #define CHINDICATE_COUNT ((sal_uInt16)SvxChartIndicate::Down + 1)
67 enum class SvxChartRegress
69 NONE,
70 Linear,
71 Log,
72 Exp,
73 Power,
74 Polynomial,
75 MovingAverage,
76 MeanValue,
77 Unknown
80 #define CHREGRESS_COUNT ((sal_uInt16)SvxChartRegress::Unknown + 1)
82 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem<SvxChartRegress>
84 public:
85 SvxChartRegressItem(SvxChartRegress eRegress /*= SvxChartRegress::Linear*/,
86 sal_uInt16 nId );
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>
98 public:
99 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= SvxChartTextOrder::SideBySide*/,
100 sal_uInt16 nId );
101 SvxChartTextOrderItem(SvStream& rIn,
102 sal_uInt16 nId );
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>
115 public:
116 SvxChartKindErrorItem(SvxChartKindError /*eOrient = SvxChartKindError::NONE*/,
117 sal_uInt16 nId );
118 SvxChartKindErrorItem(SvStream& rIn,
119 sal_uInt16 nId );
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>
131 public:
132 SvxChartIndicateItem(SvxChartIndicate eOrient /*= SvxChartIndicate::NONE*/,
133 sal_uInt16 nId );
134 SvxChartIndicateItem(SvStream& rIn,
135 sal_uInt16 nId );
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
147 double fVal;
149 public:
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,
158 MapUnit eCoreMetric,
159 MapUnit ePresMetric,
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: */