Fix typo in code
[LibreOffice.git] / include / svx / chrtitem.hxx
blobeb6d42fde640aa349b6a0d28cb3bd3ee92d72857
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 <config_options.h>
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;
32 enum class SvxChartTextOrder
34 SideBySide,
35 UpDown,
36 DownUp,
37 Auto
40 #define CHTXTORDER_COUNT (sal_uInt16(SvxChartTextOrder::Auto) + 1)
42 enum class SvxChartKindError
44 NONE,
45 Variant,
46 Sigma,
47 Percent,
48 BigError,
49 Const,
50 StdError,
51 Range
54 #define CHERROR_COUNT (sal_uInt16(SvxChartKindError::Range) + 1)
56 enum class SvxChartIndicate
58 NONE,
59 Both,
60 Up,
61 Down
64 #define CHINDICATE_COUNT (sal_uInt16(SvxChartIndicate::Down) + 1)
66 enum class SvxChartRegress
68 NONE,
69 Linear,
70 Log,
71 Exp,
72 Power,
73 Polynomial,
74 MovingAverage,
75 MeanValue,
76 Unknown
79 #define CHREGRESS_COUNT (sal_uInt16(SvxChartRegress::Unknown) + 1)
81 class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxChartRegressItem final : public SfxEnumItem<SvxChartRegress>
83 public:
84 SvxChartRegressItem(SvxChartRegress eRegress /*= SvxChartRegress::Linear*/,
85 TypedWhichId<SvxChartRegressItem> nId );
87 virtual SvxChartRegressItem* Clone(SfxItemPool* pPool = nullptr) const override;
89 sal_uInt16 GetValueCount() const override { return CHREGRESS_COUNT; }
92 class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxChartTextOrderItem final : public SfxEnumItem<SvxChartTextOrder>
94 public:
95 SvxChartTextOrderItem(SvxChartTextOrder eOrder /*= SvxChartTextOrder::SideBySide*/,
96 TypedWhichId<SvxChartTextOrderItem> nId );
98 virtual SvxChartTextOrderItem* Clone(SfxItemPool* pPool = nullptr) const override;
100 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
101 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
103 sal_uInt16 GetValueCount() const override { return CHTXTORDER_COUNT; }
106 class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxChartKindErrorItem final : public SfxEnumItem<SvxChartKindError>
108 public:
109 SvxChartKindErrorItem(SvxChartKindError /*eOrient = SvxChartKindError::NONE*/,
110 TypedWhichId<SvxChartKindErrorItem> nId );
112 virtual SvxChartKindErrorItem* Clone(SfxItemPool* pPool = nullptr) const override;
114 sal_uInt16 GetValueCount() const override { return CHERROR_COUNT; }
117 class SAL_WARN_UNUSED UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC) SvxChartIndicateItem final : public SfxEnumItem<SvxChartIndicate>
119 public:
120 SvxChartIndicateItem(SvxChartIndicate eOrient /*= SvxChartIndicate::NONE*/,
121 TypedWhichId<SvxChartIndicateItem> nId );
123 virtual SvxChartIndicateItem* Clone(SfxItemPool* pPool = nullptr) const override;
125 sal_uInt16 GetValueCount() const override { return CHINDICATE_COUNT; }
128 class SAL_WARN_UNUSED SVXCORE_DLLPUBLIC SvxDoubleItem final : public SfxPoolItem
130 double fVal;
132 public:
133 static SfxPoolItem* CreateDefault();
134 SvxDoubleItem(double fValue /*= 0.0*/, TypedWhichId<SvxDoubleItem> nId );
135 SvxDoubleItem(const SvxDoubleItem& rItem);
137 virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
138 virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
140 virtual bool GetPresentation(SfxItemPresentation ePres,
141 MapUnit eCoreMetric,
142 MapUnit ePresMetric,
143 OUString &rText, const IntlWrapper&) const override;
145 virtual bool operator == (const SfxPoolItem&) const override;
146 virtual SvxDoubleItem* Clone(SfxItemPool *pPool = nullptr) const override;
148 double GetValue() const { return fVal; }
151 #endif // INCLUDED_SVX_CHRTITEM_HXX
153 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */