fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / inc / ErrorBar.hxx
blob6d81e4b0ed63974ba688fcb3135592230974c35b
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 "ModifyListenerHelper.hxx"
24 #include "charttoolsdllapi.hxx"
25 #include "LineProperties.hxx"
27 #include <cppuhelper/implbase8.hxx>
28 #include <comphelper/uno3.hxx>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/lang/XServiceName.hpp>
33 #include <com/sun/star/util/XCloneable.hpp>
34 #include <com/sun/star/container/XChild.hpp>
35 #include <com/sun/star/chart2/data/XDataSink.hpp>
36 #include <com/sun/star/chart2/data/XDataSource.hpp>
37 #include <com/sun/star/beans/XPropertySet.hpp>
38 #include <com/sun/star/beans/XPropertyState.hpp>
39 #include <com/sun/star/chart/ErrorBarStyle.hpp>
41 namespace chart
44 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createErrorBar(
45 const ::com::sun::star::uno::Reference<
46 ::com::sun::star::uno::XComponentContext > & xContext );
48 namespace impl
50 typedef ::cppu::WeakImplHelper8<
51 ::com::sun::star::lang::XServiceInfo,
52 ::com::sun::star::util::XCloneable,
53 ::com::sun::star::util::XModifyBroadcaster,
54 ::com::sun::star::util::XModifyListener,
55 ::com::sun::star::chart2::data::XDataSource,
56 ::com::sun::star::chart2::data::XDataSink,
57 ::com::sun::star::beans::XPropertySet,
58 ::com::sun::star::beans::XPropertyState >
59 ErrorBar_Base;
62 class ErrorBar :
63 public MutexContainer,
64 public impl::ErrorBar_Base,
65 public LineProperties
67 private:
68 bool mbShowPositiveError;
69 bool mbShowNegativeError;
70 double mfPositiveError;
71 double mfNegativeError;
72 double mfWeight;
73 sal_Int32 meStyle;
75 public:
76 explicit ErrorBar(
77 const ::com::sun::star::uno::Reference<
78 ::com::sun::star::uno::XComponentContext > & xContext );
79 virtual ~ErrorBar();
81 /// XServiceInfo declarations
82 virtual OUString SAL_CALL getImplementationName()
83 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
84 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
85 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
86 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
87 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
89 static OUString getImplementationName_Static();
90 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
92 /// establish methods for factory instatiation
93 static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext)
94 throw(css::uno::Exception)
96 return (::cppu::OWeakObject *)new ErrorBar( xContext );
99 // XPropertySet
101 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
102 getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
103 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
104 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
105 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName )
106 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
107 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
108 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
110 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
111 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
112 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
113 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
114 throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
116 // XPropertyState
117 virtual com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& rPropName )
118 throw (com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
119 virtual com::sun::star::uno::Sequence< com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates(
120 const com::sun::star::uno::Sequence< OUString >& rPropNames )
121 throw (com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
122 virtual void SAL_CALL setPropertyToDefault( const OUString& rPropName )
123 throw (com::sun::star::beans::UnknownPropertyException, std::exception) SAL_OVERRIDE;
124 virtual com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& rPropName )
125 throw (com::sun::star::beans::UnknownPropertyException, com::sun::star::lang::WrappedTargetException, std::exception) SAL_OVERRIDE;
127 protected:
128 ErrorBar( const ErrorBar & rOther );
130 // ____ XCloneable ____
131 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
132 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
134 // ____ XModifyBroadcaster ____
135 virtual void SAL_CALL addModifyListener(
136 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
137 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
138 virtual void SAL_CALL removeModifyListener(
139 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
140 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
142 // ____ XModifyListener ____
143 virtual void SAL_CALL modified(
144 const ::com::sun::star::lang::EventObject& aEvent )
145 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
147 // ____ XEventListener (base of XModifyListener) ____
148 virtual void SAL_CALL disposing(
149 const ::com::sun::star::lang::EventObject& Source )
150 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
152 // ____ XDataSink ____
153 virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >& aData )
154 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
156 // ____ XDataSource ____
157 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences()
158 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
160 // ____ XChild ____
161 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent()
162 throw (::com::sun::star::uno::RuntimeException);
163 void SAL_CALL setParent(
164 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
165 throw (::com::sun::star::lang::NoSupportException,
166 ::com::sun::star::uno::RuntimeException);
168 private:
169 ::com::sun::star::uno::Reference<
170 ::com::sun::star::uno::XComponentContext >
171 m_xContext;
173 typedef ::std::vector< ::com::sun::star::uno::Reference<
174 ::com::sun::star::chart2::data::XLabeledDataSequence > > tDataSequenceContainer;
175 tDataSequenceContainer m_aDataSequences;
177 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
178 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
181 } // namespace chart
183 // INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX
184 #endif
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */