merged tag ooo/OOO330_m14
[LibreOffice.git] / chart2 / source / inc / LabeledDataSequence.hxx
bloba5ec1d99307d25f3de7856c9bedbb62fb3198e35
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_LABELEDDATASEQUENCE_HXX
28 #define CHART2_LABELEDDATASEQUENCE_HXX
29 #include "ServiceMacros.hxx"
30 #include "MutexContainer.hxx"
31 #include <comphelper/uno3.hxx>
32 #include <cppuhelper/implbase4.hxx>
34 #ifndef _COM_SUN_STAR_CHART2_XLABELEDDATASEQUENCE_HPP_
35 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
36 #endif
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/util/XCloneable.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <com/sun/star/util/XModifyBroadcaster.hpp>
42 namespace chart
45 namespace impl
47 typedef cppu::WeakImplHelper4<
48 ::com::sun::star::chart2::data::XLabeledDataSequence,
49 ::com::sun::star::util::XCloneable,
50 ::com::sun::star::util::XModifyBroadcaster,
51 ::com::sun::star::lang::XServiceInfo >
52 LabeledDataSequence_Base;
55 class LabeledDataSequence :
56 public MutexContainer,
57 public impl::LabeledDataSequence_Base
59 public:
60 explicit LabeledDataSequence(
61 const ::com::sun::star::uno::Reference<
62 ::com::sun::star::uno::XComponentContext > & xContext );
63 explicit LabeledDataSequence(
64 const ::com::sun::star::uno::Reference<
65 ::com::sun::star::chart2::data::XDataSequence > & rValues );
66 explicit LabeledDataSequence(
67 const ::com::sun::star::uno::Reference<
68 ::com::sun::star::chart2::data::XDataSequence > & rValues,
69 const ::com::sun::star::uno::Reference<
70 ::com::sun::star::chart2::data::XDataSequence > & rLabels );
72 virtual ~LabeledDataSequence();
74 /// establish methods for factory instatiation
75 APPHELPER_SERVICE_FACTORY_HELPER( LabeledDataSequence )
76 /// declare XServiceInfo methods
77 APPHELPER_XSERVICEINFO_DECL()
79 protected:
80 // ____ XLabeledDataSequence ____
81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues()
82 throw (::com::sun::star::uno::RuntimeException);
83 virtual void SAL_CALL setValues(
84 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
85 throw (::com::sun::star::uno::RuntimeException);
86 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel()
87 throw (::com::sun::star::uno::RuntimeException);
88 virtual void SAL_CALL setLabel(
89 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
90 throw (::com::sun::star::uno::RuntimeException);
92 // ____ XCloneable ____
93 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
94 throw (::com::sun::star::uno::RuntimeException);
96 // ____ XModifyBroadcaster ____
97 virtual void SAL_CALL addModifyListener(
98 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
99 throw (::com::sun::star::uno::RuntimeException);
100 virtual void SAL_CALL removeModifyListener(
101 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
102 throw (::com::sun::star::uno::RuntimeException);
104 private:
105 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xData;
106 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xLabel;
108 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
109 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
112 } // namespace chart
114 // CHART2_LABELEDDATASEQUENCE_HXX
115 #endif