LibreOffice Module chart2 (master) 1
ErrorBar.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include "charttoolsdllapi.hxx"
22
24
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>
38
39
40#include <vector>
41
42namespace chart
43{
44
45namespace impl
46{
47typedef ::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 >
57}
58
59class ErrorBar final : public impl::ErrorBar_Base
60{
61private:
62 OUString maDashName;
63 css::drawing::LineDash maLineDash;
64 sal_Int32 mnLineWidth;
65 css::drawing::LineStyle meLineStyle;
66 css::util::Color maLineColor;
68 css::drawing::LineJoint meLineJoint;
73 double mfWeight;
74 sal_Int32 meStyle;
75
76public:
78 virtual ~ErrorBar() override;
79
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;
84
85 // XPropertySet
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;
94
95 // XPropertyState
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;
101
102private:
103 ErrorBar( const ErrorBar & rOther );
104
105 // ____ XCloneable ____
106 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
107
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;
113
114 // ____ XModifyListener ____
115 virtual void SAL_CALL modified(
116 const css::lang::EventObject& aEvent ) override;
117
118 // ____ XEventListener (base of XModifyListener) ____
119 virtual void SAL_CALL disposing(
120 const css::lang::EventObject& Source ) override;
121
122 // ____ XDataSink ____
123 virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >& aData ) override;
124
125 // ____ XDataSource ____
126 virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override;
127
128 typedef std::vector< css::uno::Reference<
129 css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
131
133};
134
135} // namespace chart
136
137/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
tDataSequenceContainer m_aDataSequences
Definition: ErrorBar.hxx:130
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: ErrorBar.cxx:396
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
Definition: ErrorBar.cxx:127
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: ErrorBar.cxx:384
sal_Int16 mnLineTransparence
Definition: ErrorBar.hxx:67
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
Definition: ErrorBar.cxx:439
css::util::Color maLineColor
Definition: ErrorBar.hxx:66
double mfWeight
Definition: ErrorBar.hxx:73
bool mbShowPositiveError
Definition: ErrorBar.hxx:69
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: ErrorBar.cxx:449
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: ErrorBar.cxx:140
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override
Definition: ErrorBar.cxx:434
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &rPropName) override
Definition: ErrorBar.cxx:378
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
Definition: ErrorBar.cxx:418
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: ErrorBar.cxx:392
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: ErrorBar.cxx:228
virtual void SAL_CALL setData(const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &aData) override
Definition: ErrorBar.cxx:424
double mfPositiveError
Definition: ErrorBar.hxx:71
double mfNegativeError
Definition: ErrorBar.hxx:72
virtual void SAL_CALL setPropertyToDefault(const OUString &rPropName) override
Definition: ErrorBar.cxx:373
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: ErrorBar.cxx:406
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: ErrorBar.cxx:401
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: ErrorBar.cxx:133
virtual ~ErrorBar() override
Definition: ErrorBar.cxx:124
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
Definition: ErrorBar.cxx:412
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: ErrorBar.cxx:388
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &rPropName) override
Definition: ErrorBar.cxx:292
sal_Int32 meStyle
Definition: ErrorBar.hxx:74
css::drawing::LineDash maLineDash
Definition: ErrorBar.hxx:63
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &rPropNames) override
Definition: ErrorBar.cxx:362
css::drawing::LineJoint meLineJoint
Definition: ErrorBar.hxx:68
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
Definition: ErrorBar.hxx:132
std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer
Definition: ErrorBar.hxx:129
OOO_DLLPUBLIC_CHARTTOOLS ErrorBar()
Definition: ErrorBar.cxx:81
css::drawing::LineStyle meLineStyle
Definition: ErrorBar.hxx:65
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: ErrorBar.cxx:444
sal_Int32 mnLineWidth
Definition: ErrorBar.hxx:64
bool mbShowNegativeError
Definition: ErrorBar.hxx:70
OUString maDashName
Definition: ErrorBar.hxx:62
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener, css::chart2::data::XDataSource, css::chart2::data::XDataSink, css::beans::XPropertySet, css::beans::XPropertyState > ErrorBar_Base
Definition: ErrorBar.hxx:56
unsigned char sal_Bool