1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART2_ERRORBAR_HXX
28 #define CHART2_ERRORBAR_HXX
30 #include "MutexContainer.hxx"
31 #include "OPropertySet.hxx"
32 #include "ServiceMacros.hxx"
33 #include "ModifyListenerHelper.hxx"
34 #include "charttoolsdllapi.hxx"
36 #include <cppuhelper/implbase6.hxx>
37 #include <comphelper/uno3.hxx>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/lang/XServiceName.hpp>
42 #include <com/sun/star/util/XCloneable.hpp>
43 #include <com/sun/star/container/XChild.hpp>
44 #include <com/sun/star/chart2/data/XDataSink.hpp>
45 #include <com/sun/star/chart2/data/XDataSource.hpp>
50 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> createErrorBar(
51 const ::com::sun::star::uno::Reference
<
52 ::com::sun::star::uno::XComponentContext
> & xContext
);
56 typedef ::cppu::WeakImplHelper6
<
57 ::com::sun::star::lang::XServiceInfo
,
58 ::com::sun::star::util::XCloneable
,
59 ::com::sun::star::util::XModifyBroadcaster
,
60 ::com::sun::star::util::XModifyListener
,
61 ::com::sun::star::chart2::data::XDataSource
,
62 ::com::sun::star::chart2::data::XDataSink
>
67 public MutexContainer
,
68 public impl::ErrorBar_Base
,
69 public ::property::OPropertySet
73 const ::com::sun::star::uno::Reference
<
74 ::com::sun::star::uno::XComponentContext
> & xContext
);
77 /// XServiceInfo declarations
78 APPHELPER_XSERVICEINFO_DECL()
79 /// establish methods for factory instatiation
80 APPHELPER_SERVICE_FACTORY_HELPER( ErrorBar
)
82 /// merge XInterface implementations
84 /// merge XTypeProvider implementations
85 DECLARE_XTYPEPROVIDER()
88 ErrorBar( const ErrorBar
& rOther
);
90 // ____ OPropertySet ____
91 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
92 throw(::com::sun::star::beans::UnknownPropertyException
);
93 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
94 using OPropertySet::disposing
;
96 // ____ XPropertySet ____
97 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
99 throw (::com::sun::star::uno::RuntimeException
);
101 // ____ XCloneable ____
102 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
103 throw (::com::sun::star::uno::RuntimeException
);
105 // ____ XModifyBroadcaster ____
106 virtual void SAL_CALL
addModifyListener(
107 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
108 throw (::com::sun::star::uno::RuntimeException
);
109 virtual void SAL_CALL
removeModifyListener(
110 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
111 throw (::com::sun::star::uno::RuntimeException
);
113 // ____ XModifyListener ____
114 virtual void SAL_CALL
modified(
115 const ::com::sun::star::lang::EventObject
& aEvent
)
116 throw (::com::sun::star::uno::RuntimeException
);
118 // ____ XEventListener (base of XModifyListener) ____
119 virtual void SAL_CALL
disposing(
120 const ::com::sun::star::lang::EventObject
& Source
)
121 throw (::com::sun::star::uno::RuntimeException
);
123 // ____ XDataSink ____
124 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> >& aData
)
125 throw (::com::sun::star::uno::RuntimeException
);
127 // ____ XDataSource ____
128 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> > SAL_CALL
getDataSequences()
129 throw (::com::sun::star::uno::RuntimeException
);
132 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getParent()
133 throw (::com::sun::star::uno::RuntimeException
);
134 virtual void SAL_CALL
setParent(
135 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& Parent
)
136 throw (::com::sun::star::lang::NoSupportException
,
137 ::com::sun::star::uno::RuntimeException
);
139 // ____ OPropertySet ____
140 virtual void firePropertyChangeEvent();
142 void fireModifyEvent();
145 ::com::sun::star::uno::Reference
<
146 ::com::sun::star::uno::XComponentContext
>
149 typedef ::std::vector
< ::com::sun::star::uno::Reference
<
150 ::com::sun::star::chart2::data::XLabeledDataSequence
> > tDataSequenceContainer
;
151 tDataSequenceContainer m_aDataSequences
;
153 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
154 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> m_xParent
;
159 // CHART2_ERRORBAR_HXX