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: LabeledDataSequence.hxx,v $
10 * $Revision: 1.3.44.1 $
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_LABELEDDATASEQUENCE_HXX
31 #define CHART2_LABELEDDATASEQUENCE_HXX
32 #include "ServiceMacros.hxx"
33 #include "MutexContainer.hxx"
34 #include <comphelper/uno3.hxx>
35 #include <cppuhelper/implbase4.hxx>
37 #ifndef _COM_SUN_STAR_CHART2_XLABELEDDATASEQUENCE_HPP_
38 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
40 #include <com/sun/star/lang/XServiceInfo.hpp>
41 #include <com/sun/star/util/XCloneable.hpp>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <com/sun/star/util/XModifyBroadcaster.hpp>
50 typedef cppu::WeakImplHelper4
<
51 ::com::sun::star::chart2::data::XLabeledDataSequence
,
52 ::com::sun::star::util::XCloneable
,
53 ::com::sun::star::util::XModifyBroadcaster
,
54 ::com::sun::star::lang::XServiceInfo
>
55 LabeledDataSequence_Base
;
58 class LabeledDataSequence
:
59 public MutexContainer
,
60 public impl::LabeledDataSequence_Base
63 explicit LabeledDataSequence(
64 const ::com::sun::star::uno::Reference
<
65 ::com::sun::star::uno::XComponentContext
> & xContext
);
66 explicit LabeledDataSequence(
67 const ::com::sun::star::uno::Reference
<
68 ::com::sun::star::chart2::data::XDataSequence
> & rValues
);
69 explicit LabeledDataSequence(
70 const ::com::sun::star::uno::Reference
<
71 ::com::sun::star::chart2::data::XDataSequence
> & rValues
,
72 const ::com::sun::star::uno::Reference
<
73 ::com::sun::star::chart2::data::XDataSequence
> & rLabels
);
75 virtual ~LabeledDataSequence();
77 /// establish methods for factory instatiation
78 APPHELPER_SERVICE_FACTORY_HELPER( LabeledDataSequence
)
79 /// declare XServiceInfo methods
80 APPHELPER_XSERVICEINFO_DECL()
83 // ____ XLabeledDataSequence ____
84 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> SAL_CALL
getValues()
85 throw (::com::sun::star::uno::RuntimeException
);
86 virtual void SAL_CALL
setValues(
87 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
>& xSequence
)
88 throw (::com::sun::star::uno::RuntimeException
);
89 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> SAL_CALL
getLabel()
90 throw (::com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
setLabel(
92 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
>& xSequence
)
93 throw (::com::sun::star::uno::RuntimeException
);
95 // ____ XCloneable ____
96 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
97 throw (::com::sun::star::uno::RuntimeException
);
99 // ____ XModifyBroadcaster ____
100 virtual void SAL_CALL
addModifyListener(
101 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
102 throw (::com::sun::star::uno::RuntimeException
);
103 virtual void SAL_CALL
removeModifyListener(
104 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
105 throw (::com::sun::star::uno::RuntimeException
);
108 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> m_xData
;
109 ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::data::XDataSequence
> m_xLabel
;
111 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
112 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
117 // CHART2_LABELEDDATASEQUENCE_HXX