nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / model / inc / DataSeries.hxx
blob35e7725aa06ba155e28945358ce04b7739d0e119
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 #pragma once
21 // UNO types
22 #include <com/sun/star/chart2/XDataSeries.hpp>
23 #include <com/sun/star/chart2/data/XDataSink.hpp>
24 #include <com/sun/star/chart2/data/XDataSource.hpp>
25 #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
26 #include <com/sun/star/util/XCloneable.hpp>
27 #include <com/sun/star/util/XModifyBroadcaster.hpp>
28 #include <com/sun/star/util/XModifyListener.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
31 // helper classes
32 #include <cppuhelper/implbase.hxx>
33 #include <comphelper/uno3.hxx>
35 // STL
36 #include <vector>
37 #include <map>
39 #include <MutexContainer.hxx>
40 #include <OPropertySet.hxx>
42 namespace com::sun::star::beans { class XPropertySet; }
44 namespace chart
47 namespace impl
49 typedef ::cppu::WeakImplHelper<
50 css::chart2::XDataSeries,
51 css::chart2::data::XDataSink,
52 css::chart2::data::XDataSource,
53 css::lang::XServiceInfo,
54 css::chart2::XRegressionCurveContainer,
55 css::util::XCloneable,
56 css::util::XModifyBroadcaster,
57 css::util::XModifyListener >
58 DataSeries_Base;
61 class DataSeries final :
62 public MutexContainer,
63 public impl::DataSeries_Base,
64 public ::property::OPropertySet
66 public:
67 explicit DataSeries();
68 virtual ~DataSeries() override;
70 /// XServiceInfo declarations
71 virtual OUString SAL_CALL getImplementationName() override;
72 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
73 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
75 /// merge XInterface implementations
76 DECLARE_XINTERFACE()
77 /// merge XTypeProvider implementations
78 DECLARE_XTYPEPROVIDER()
80 private:
81 explicit DataSeries( const DataSeries & rOther );
83 // late initialization to call after copy-constructing
84 void Init( const DataSeries & rOther );
86 // ____ XDataSeries ____
87 /// @see css::chart2::XDataSeries
88 virtual css::uno::Reference< css::beans::XPropertySet >
89 SAL_CALL getDataPointByIndex( sal_Int32 nIndex ) override;
90 virtual void SAL_CALL resetDataPoint( sal_Int32 nIndex ) override;
91 virtual void SAL_CALL resetAllDataPoints() override;
93 // ____ XDataSink ____
94 /// @see css::chart2::data::XDataSink
95 virtual void SAL_CALL setData( const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > >& aData ) override;
97 // ____ XDataSource ____
98 /// @see css::chart2::data::XDataSource
99 virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override;
101 // ____ OPropertySet ____
102 virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
103 virtual void SAL_CALL getFastPropertyValue( css::uno::Any& rValue, sal_Int32 nHandle ) const override;
104 virtual void SAL_CALL setFastPropertyValue_NoBroadcast
105 ( sal_Int32 nHandle,
106 const css::uno::Any& rValue ) override;
108 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
110 // ____ XPropertySet ____
111 /// @see css::beans::XPropertySet
112 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
113 getPropertySetInfo() override;
115 /// make original interface function visible again
116 using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
118 // ____ XRegressionCurveContainer ____
119 /// @see css::chart2::XRegressionCurveContainer
120 virtual void SAL_CALL addRegressionCurve(
121 const css::uno::Reference< css::chart2::XRegressionCurve >& aRegressionCurve ) override;
122 virtual void SAL_CALL removeRegressionCurve(
123 const css::uno::Reference< css::chart2::XRegressionCurve >& aRegressionCurve ) override;
124 virtual css::uno::Sequence< css::uno::Reference< css::chart2::XRegressionCurve > > SAL_CALL getRegressionCurves() override;
125 virtual void SAL_CALL setRegressionCurves(
126 const css::uno::Sequence< css::uno::Reference< css::chart2::XRegressionCurve > >& aRegressionCurves ) override;
128 // ____ XCloneable ____
129 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
131 // ____ XModifyBroadcaster ____
132 virtual void SAL_CALL addModifyListener(
133 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
134 virtual void SAL_CALL removeModifyListener(
135 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
137 // ____ XModifyListener ____
138 virtual void SAL_CALL modified(
139 const css::lang::EventObject& aEvent ) override;
141 // ____ XEventListener (base of XModifyListener) ____
142 virtual void SAL_CALL disposing(
143 const css::lang::EventObject& Source ) override;
145 // ____ OPropertySet ____
146 virtual void firePropertyChangeEvent() override;
147 using OPropertySet::disposing;
149 void fireModifyEvent();
151 typedef std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
152 tDataSequenceContainer m_aDataSequences;
154 typedef std::map< sal_Int32,
155 css::uno::Reference< css::beans::XPropertySet > > tDataPointAttributeContainer;
156 tDataPointAttributeContainer m_aAttributedDataPoints;
158 typedef
159 std::vector< css::uno::Reference< css::chart2::XRegressionCurve > >
160 tRegressionCurveContainerType;
161 tRegressionCurveContainerType m_aRegressionCurves;
163 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
166 } // namespace chart
168 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */