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 .
19 #ifndef CHART2_ERRORBAR_HXX
20 #define CHART2_ERRORBAR_HXX
22 #include "MutexContainer.hxx"
23 #include "ServiceMacros.hxx"
24 #include "ModifyListenerHelper.hxx"
25 #include "charttoolsdllapi.hxx"
26 #include "LineProperties.hxx"
28 #include <cppuhelper/implbase8.hxx>
29 #include <comphelper/uno3.hxx>
31 #include <com/sun/star/uno/XComponentContext.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/lang/XServiceName.hpp>
34 #include <com/sun/star/util/XCloneable.hpp>
35 #include <com/sun/star/container/XChild.hpp>
36 #include <com/sun/star/chart2/data/XDataSink.hpp>
37 #include <com/sun/star/chart2/data/XDataSource.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/beans/XPropertyState.hpp>
40 #include <com/sun/star/chart/ErrorBarStyle.hpp>
45 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> createErrorBar(
46 const ::com::sun::star::uno::Reference
<
47 ::com::sun::star::uno::XComponentContext
> & xContext
);
51 typedef ::cppu::WeakImplHelper8
<
52 ::com::sun::star::lang::XServiceInfo
,
53 ::com::sun::star::util::XCloneable
,
54 ::com::sun::star::util::XModifyBroadcaster
,
55 ::com::sun::star::util::XModifyListener
,
56 ::com::sun::star::chart2::data::XDataSource
,
57 ::com::sun::star::chart2::data::XDataSink
,
58 ::com::sun::star::beans::XPropertySet
,
59 ::com::sun::star::beans::XPropertyState
>
64 public MutexContainer
,
65 public impl::ErrorBar_Base
,
69 bool mbShowPositiveError
;
70 bool mbShowNegativeError
;
71 double mfPositiveError
;
72 double mfNegativeError
;
78 const ::com::sun::star::uno::Reference
<
79 ::com::sun::star::uno::XComponentContext
> & xContext
);
82 /// XServiceInfo declarations
83 APPHELPER_XSERVICEINFO_DECL()
84 /// establish methods for factory instatiation
85 APPHELPER_SERVICE_FACTORY_HELPER( ErrorBar
)
89 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
90 getPropertySetInfo() throw (::com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
)
92 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
);
93 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
)
94 throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
95 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
96 throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
97 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
98 throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
99 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
100 throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
102 throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
105 virtual com::sun::star::beans::PropertyState SAL_CALL
getPropertyState( const OUString
& rPropName
)
106 throw (com::sun::star::beans::UnknownPropertyException
);
107 virtual com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyState
> SAL_CALL
getPropertyStates(
108 const com::sun::star::uno::Sequence
< OUString
>& rPropNames
)
109 throw (com::sun::star::beans::UnknownPropertyException
);
110 virtual void SAL_CALL
setPropertyToDefault( const OUString
& rPropName
)
111 throw (com::sun::star::beans::UnknownPropertyException
);
112 virtual com::sun::star::uno::Any SAL_CALL
getPropertyDefault( const OUString
& rPropName
)
113 throw (com::sun::star::beans::UnknownPropertyException
, com::sun::star::lang::WrappedTargetException
);
116 ErrorBar( const ErrorBar
& rOther
);
118 // ____ XCloneable ____
119 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
120 throw (::com::sun::star::uno::RuntimeException
);
122 // ____ XModifyBroadcaster ____
123 virtual void SAL_CALL
addModifyListener(
124 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
125 throw (::com::sun::star::uno::RuntimeException
);
126 virtual void SAL_CALL
removeModifyListener(
127 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
128 throw (::com::sun::star::uno::RuntimeException
);
130 // ____ XModifyListener ____
131 virtual void SAL_CALL
modified(
132 const ::com::sun::star::lang::EventObject
& aEvent
)
133 throw (::com::sun::star::uno::RuntimeException
);
135 // ____ XEventListener (base of XModifyListener) ____
136 virtual void SAL_CALL
disposing(
137 const ::com::sun::star::lang::EventObject
& Source
)
138 throw (::com::sun::star::uno::RuntimeException
);
140 // ____ XDataSink ____
141 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> >& aData
)
142 throw (::com::sun::star::uno::RuntimeException
);
144 // ____ XDataSource ____
145 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> > SAL_CALL
getDataSequences()
146 throw (::com::sun::star::uno::RuntimeException
);
149 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getParent()
150 throw (::com::sun::star::uno::RuntimeException
);
151 virtual void SAL_CALL
setParent(
152 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& Parent
)
153 throw (::com::sun::star::lang::NoSupportException
,
154 ::com::sun::star::uno::RuntimeException
);
157 ::com::sun::star::uno::Reference
<
158 ::com::sun::star::uno::XComponentContext
>
161 typedef ::std::vector
< ::com::sun::star::uno::Reference
<
162 ::com::sun::star::chart2::data::XLabeledDataSequence
> > tDataSequenceContainer
;
163 tDataSequenceContainer m_aDataSequences
;
165 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
166 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> m_xParent
;
171 // CHART2_ERRORBAR_HXX
174 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */