Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / inc / ErrorBar.hxx
blob6cd513ebc94002c0ec9cb00b7abef3128d90b563
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_CHART2_SOURCE_INC_ERRORBAR_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX
22 #include "MutexContainer.hxx"
23 #include "charttoolsdllapi.hxx"
25 #include <cppuhelper/implbase.hxx>
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/beans/XPropertyState.hpp>
29 #include <com/sun/star/chart2/data/XDataSink.hpp>
30 #include <com/sun/star/chart2/data/XDataSource.hpp>
31 #include <com/sun/star/drawing/LineStyle.hpp>
32 #include <com/sun/star/drawing/LineJoint.hpp>
33 #include <com/sun/star/drawing/LineDash.hpp>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/uno/Any.h>
36 #include <com/sun/star/util/XCloneable.hpp>
37 #include <com/sun/star/util/Color.hpp>
38 #include <com/sun/star/util/XModifyListener.hpp>
39 #include <com/sun/star/util/XModifyBroadcaster.hpp>
42 #include <vector>
44 namespace chart
47 namespace impl
49 typedef ::cppu::WeakImplHelper<
50 css::lang::XServiceInfo,
51 css::util::XCloneable,
52 css::util::XModifyBroadcaster,
53 css::util::XModifyListener,
54 css::chart2::data::XDataSource,
55 css::chart2::data::XDataSink,
56 css::beans::XPropertySet,
57 css::beans::XPropertyState >
58 ErrorBar_Base;
61 class ErrorBar final :
62 public MutexContainer,
63 public impl::ErrorBar_Base
65 private:
66 OUString maDashName;
67 css::drawing::LineDash maLineDash;
68 sal_Int32 mnLineWidth;
69 css::drawing::LineStyle meLineStyle;
70 css::util::Color maLineColor;
71 sal_Int16 mnLineTransparence;
72 css::drawing::LineJoint meLineJoint;
73 bool mbShowPositiveError;
74 bool mbShowNegativeError;
75 double mfPositiveError;
76 double mfNegativeError;
77 double mfWeight;
78 sal_Int32 meStyle;
80 public:
81 OOO_DLLPUBLIC_CHARTTOOLS explicit ErrorBar();
82 virtual ~ErrorBar() override;
84 /// XServiceInfo declarations
85 virtual OUString SAL_CALL getImplementationName() override;
86 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
87 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
89 // XPropertySet
90 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
91 getPropertySetInfo() override;
92 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
93 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
94 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
95 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
96 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
97 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
99 // XPropertyState
100 virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& rPropName ) override;
101 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(
102 const css::uno::Sequence< OUString >& rPropNames ) override;
103 virtual void SAL_CALL setPropertyToDefault( const OUString& rPropName ) override;
104 virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& rPropName ) override;
106 private:
107 ErrorBar( const ErrorBar & rOther );
109 // ____ XCloneable ____
110 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
112 // ____ XModifyBroadcaster ____
113 virtual void SAL_CALL addModifyListener(
114 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
115 virtual void SAL_CALL removeModifyListener(
116 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
118 // ____ XModifyListener ____
119 virtual void SAL_CALL modified(
120 const css::lang::EventObject& aEvent ) override;
122 // ____ XEventListener (base of XModifyListener) ____
123 virtual void SAL_CALL disposing(
124 const css::lang::EventObject& Source ) override;
126 // ____ XDataSink ____
127 virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >& aData ) override;
129 // ____ XDataSource ____
130 virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override;
132 typedef std::vector< css::uno::Reference<
133 css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
134 tDataSequenceContainer m_aDataSequences;
136 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
139 } // namespace chart
141 // INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX
142 #endif
144 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */