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 .
21 #include "charttoolsdllapi.hxx"
23 #include <cppuhelper/implbase.hxx>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/beans/XPropertyState.hpp>
27 #include <com/sun/star/chart2/data/XDataSink.hpp>
28 #include <com/sun/star/chart2/data/XDataSource.hpp>
29 #include <com/sun/star/drawing/LineStyle.hpp>
30 #include <com/sun/star/drawing/LineJoint.hpp>
31 #include <com/sun/star/drawing/LineDash.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/uno/Any.h>
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include <com/sun/star/util/Color.hpp>
36 #include <com/sun/star/util/XModifyListener.hpp>
37 #include "ModifyListenerHelper.hxx"
47 typedef ::cppu::WeakImplHelper
<
48 css::lang::XServiceInfo
,
49 css::util::XCloneable
,
50 css::util::XModifyBroadcaster
,
51 css::util::XModifyListener
,
52 css::chart2::data::XDataSource
,
53 css::chart2::data::XDataSink
,
54 css::beans::XPropertySet
,
55 css::beans::XPropertyState
>
59 class ErrorBar final
: public impl::ErrorBar_Base
63 css::drawing::LineDash maLineDash
;
64 sal_Int32 mnLineWidth
;
65 css::drawing::LineStyle meLineStyle
;
66 css::util::Color maLineColor
;
67 sal_Int16 mnLineTransparence
;
68 css::drawing::LineJoint meLineJoint
;
69 bool mbShowPositiveError
;
70 bool mbShowNegativeError
;
71 double mfPositiveError
;
72 double mfNegativeError
;
77 OOO_DLLPUBLIC_CHARTTOOLS
explicit ErrorBar();
78 virtual ~ErrorBar() override
;
80 /// XServiceInfo declarations
81 virtual OUString SAL_CALL
getImplementationName() override
;
82 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
83 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
86 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
87 getPropertySetInfo() override
;
88 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
;
89 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
;
90 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
91 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
92 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
93 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
96 virtual css::beans::PropertyState SAL_CALL
getPropertyState( const OUString
& rPropName
) override
;
97 virtual css::uno::Sequence
< css::beans::PropertyState
> SAL_CALL
getPropertyStates(
98 const css::uno::Sequence
< OUString
>& rPropNames
) override
;
99 virtual void SAL_CALL
setPropertyToDefault( const OUString
& rPropName
) override
;
100 virtual css::uno::Any SAL_CALL
getPropertyDefault( const OUString
& rPropName
) override
;
103 ErrorBar( const ErrorBar
& rOther
);
105 // ____ XCloneable ____
106 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone() override
;
108 // ____ XModifyBroadcaster ____
109 virtual void SAL_CALL
addModifyListener(
110 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
111 virtual void SAL_CALL
removeModifyListener(
112 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
114 // ____ XModifyListener ____
115 virtual void SAL_CALL
modified(
116 const css::lang::EventObject
& aEvent
) override
;
118 // ____ XEventListener (base of XModifyListener) ____
119 virtual void SAL_CALL
disposing(
120 const css::lang::EventObject
& Source
) override
;
122 // ____ XDataSink ____
123 virtual void SAL_CALL
setData( const css::uno::Sequence
< css::uno::Reference
< css::chart2::data::XLabeledDataSequence
> >& aData
) override
;
125 // ____ XDataSource ____
126 virtual css::uno::Sequence
< css::uno::Reference
< css::chart2::data::XLabeledDataSequence
> > SAL_CALL
getDataSequences() override
;
128 typedef std::vector
< css::uno::Reference
<
129 css::chart2::data::XLabeledDataSequence
> > tDataSequenceContainer
;
130 tDataSequenceContainer m_aDataSequences
;
132 rtl::Reference
<ModifyEventForwarder
> m_xModifyEventForwarder
;
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */