tdf#124953: Use rangelist's combined range top-left address...
[LibreOffice.git] / include / svx / chrtitem.hxx
blob344508e37581c9c6b5423bcfadbc755e560c814b
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 <rtl/ustring.hxx>
23 #include <sal/types.h>
24 #include <svl/eitem.hxx>
25 #include <svl/poolitem.hxx>
26 #include <svx/svxdllapi.h>
28 class IntlWrapper;
29 class SfxItemPool;
31 enum class SvxChartTextOrder
33 SideBySide,
34 UpDown,
35 DownUp,
36 Auto
39 #define CHTXTORDER_COUNT (sal_uInt16(SvxChartTextOrder::Auto) + 1)
41 enum class SvxChartKindError
43 NONE,
44 Variant,
45 Sigma,
46 Percent,
47 BigError,
48 Const,
49 StdError,
50 Range
53 #define CHERROR_COUNT (sal_uInt16(SvxChartKindError::Range) + 1)
55 enum class SvxChartIndicate
57 NONE,
58 Both,
59 Up,
60 Down
63 #define CHINDICATE_COUNT (sal_uInt16(SvxChartIndicate::Down) + 1)
65 enum class SvxChartRegress
67 NONE,
68 Linear,
69 Log,
70 Exp,
71 Power,
72 Polynomial,
73 MovingAverage,
74 MeanValue,
75 Unknown
78 #define CHREGRESS_COUNT (sal_uInt16(SvxChartRegress::Unknown) + 1)
80 class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxChartRegressItem : public SfxEnumItem<SvxChartRegress>
82 public:
83 SvxChartRegressItem(SvxChartRegress eRegress /*= SvxChartRegress::Linear*/,
84 sal_uInt16 nId );
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 : public SfxEnumItem<SvxChartTextOrder>
93 public:
94 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= SvxChartTextOrder::SideBySide*/,
95 sal_uInt16 nId );
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 : public SfxEnumItem<SvxChartKindError>
107 public:
108 SvxChartKindErrorItem(SvxChartKindError /*eOrient = SvxChartKindError::NONE*/,
109 sal_uInt16 nId );
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 : public SfxEnumItem<SvxChartIndicate>
118 public:
119 SvxChartIndicateItem(SvxChartIndicate eOrient /*= SvxChartIndicate::NONE*/,
120 sal_uInt16 nId );
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 : public SfxPoolItem
129 double fVal;
131 public:
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,
140 MapUnit eCoreMetric,
141 MapUnit ePresMetric,
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: */