1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ErrorBar.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART2_ERRORBAR_HXX
31 #define CHART2_ERRORBAR_HXX
33 #include "MutexContainer.hxx"
34 #include "OPropertySet.hxx"
35 #include "ServiceMacros.hxx"
36 #include "ModifyListenerHelper.hxx"
37 #include "charttoolsdllapi.hxx"
39 #include <cppuhelper/implbase6.hxx>
40 #include <comphelper/uno3.hxx>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <com/sun/star/lang/XServiceInfo.hpp>
44 #include <com/sun/star/lang/XServiceName.hpp>
45 #include <com/sun/star/util/XCloneable.hpp>
46 #include <com/sun/star/container/XChild.hpp>
47 #include <com/sun/star/chart2/data/XDataSink.hpp>
48 #include <com/sun/star/chart2/data/XDataSource.hpp>
53 OOO_DLLPUBLIC_CHARTTOOLS ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> createErrorBar(
54 const ::com::sun::star::uno::Reference
<
55 ::com::sun::star::uno::XComponentContext
> & xContext
);
59 typedef ::cppu::WeakImplHelper6
<
60 ::com::sun::star::lang::XServiceInfo
,
61 ::com::sun::star::util::XCloneable
,
62 ::com::sun::star::util::XModifyBroadcaster
,
63 ::com::sun::star::util::XModifyListener
,
64 ::com::sun::star::chart2::data::XDataSource
,
65 ::com::sun::star::chart2::data::XDataSink
>
70 public MutexContainer
,
71 public impl::ErrorBar_Base
,
72 public ::property::OPropertySet
76 const ::com::sun::star::uno::Reference
<
77 ::com::sun::star::uno::XComponentContext
> & xContext
);
80 /// XServiceInfo declarations
81 APPHELPER_XSERVICEINFO_DECL()
82 /// establish methods for factory instatiation
83 APPHELPER_SERVICE_FACTORY_HELPER( ErrorBar
)
85 /// merge XInterface implementations
87 /// merge XTypeProvider implementations
88 DECLARE_XTYPEPROVIDER()
91 ErrorBar( const ErrorBar
& rOther
);
93 // ____ OPropertySet ____
94 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
95 throw(::com::sun::star::beans::UnknownPropertyException
);
96 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
97 using OPropertySet::disposing
;
99 // ____ XPropertySet ____
100 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
102 throw (::com::sun::star::uno::RuntimeException
);
104 // ____ XCloneable ____
105 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
106 throw (::com::sun::star::uno::RuntimeException
);
108 // ____ XModifyBroadcaster ____
109 virtual void SAL_CALL
addModifyListener(
110 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
111 throw (::com::sun::star::uno::RuntimeException
);
112 virtual void SAL_CALL
removeModifyListener(
113 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
114 throw (::com::sun::star::uno::RuntimeException
);
116 // ____ XModifyListener ____
117 virtual void SAL_CALL
modified(
118 const ::com::sun::star::lang::EventObject
& aEvent
)
119 throw (::com::sun::star::uno::RuntimeException
);
121 // ____ XEventListener (base of XModifyListener) ____
122 virtual void SAL_CALL
disposing(
123 const ::com::sun::star::lang::EventObject
& Source
)
124 throw (::com::sun::star::uno::RuntimeException
);
126 // ____ XDataSink ____
127 virtual void SAL_CALL
setData( const ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> >& aData
)
128 throw (::com::sun::star::uno::RuntimeException
);
130 // ____ XDataSource ____
131 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XLabeledDataSequence
> > SAL_CALL
getDataSequences()
132 throw (::com::sun::star::uno::RuntimeException
);
135 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getParent()
136 throw (::com::sun::star::uno::RuntimeException
);
137 virtual void SAL_CALL
setParent(
138 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& Parent
)
139 throw (::com::sun::star::lang::NoSupportException
,
140 ::com::sun::star::uno::RuntimeException
);
142 // ____ OPropertySet ____
143 virtual void firePropertyChangeEvent();
145 void fireModifyEvent();
148 ::com::sun::star::uno::Reference
<
149 ::com::sun::star::uno::XComponentContext
>
152 typedef ::std::vector
< ::com::sun::star::uno::Reference
<
153 ::com::sun::star::chart2::data::XLabeledDataSequence
> > tDataSequenceContainer
;
154 tDataSequenceContainer m_aDataSequences
;
156 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
157 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> m_xParent
;
162 // CHART2_ERRORBAR_HXX