Bump for 3.6-28
[LibreOffice.git] / chart2 / source / inc / LabeledDataSequence.hxx
blob071144803c1218301e0967b646e15be0f363cf5b
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef CHART2_LABELEDDATASEQUENCE_HXX
29 #define CHART2_LABELEDDATASEQUENCE_HXX
30 #include "ServiceMacros.hxx"
31 #include "MutexContainer.hxx"
32 #include <comphelper/uno3.hxx>
33 #include <cppuhelper/implbase4.hxx>
35 #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <com/sun/star/util/XCloneable.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/util/XModifyBroadcaster.hpp>
41 namespace chart
44 namespace impl
46 typedef cppu::WeakImplHelper4<
47 ::com::sun::star::chart2::data::XLabeledDataSequence,
48 ::com::sun::star::util::XCloneable,
49 ::com::sun::star::util::XModifyBroadcaster,
50 ::com::sun::star::lang::XServiceInfo >
51 LabeledDataSequence_Base;
54 class LabeledDataSequence :
55 public MutexContainer,
56 public impl::LabeledDataSequence_Base
58 public:
59 explicit LabeledDataSequence(
60 const ::com::sun::star::uno::Reference<
61 ::com::sun::star::uno::XComponentContext > & xContext );
62 explicit LabeledDataSequence(
63 const ::com::sun::star::uno::Reference<
64 ::com::sun::star::chart2::data::XDataSequence > & rValues );
65 explicit LabeledDataSequence(
66 const ::com::sun::star::uno::Reference<
67 ::com::sun::star::chart2::data::XDataSequence > & rValues,
68 const ::com::sun::star::uno::Reference<
69 ::com::sun::star::chart2::data::XDataSequence > & rLabels );
71 virtual ~LabeledDataSequence();
73 /// establish methods for factory instatiation
74 APPHELPER_SERVICE_FACTORY_HELPER( LabeledDataSequence )
75 /// declare XServiceInfo methods
76 APPHELPER_XSERVICEINFO_DECL()
78 protected:
79 // ____ XLabeledDataSequence ____
80 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues()
81 throw (::com::sun::star::uno::RuntimeException);
82 virtual void SAL_CALL setValues(
83 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
84 throw (::com::sun::star::uno::RuntimeException);
85 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel()
86 throw (::com::sun::star::uno::RuntimeException);
87 virtual void SAL_CALL setLabel(
88 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
89 throw (::com::sun::star::uno::RuntimeException);
91 // ____ XCloneable ____
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
93 throw (::com::sun::star::uno::RuntimeException);
95 // ____ XModifyBroadcaster ____
96 virtual void SAL_CALL addModifyListener(
97 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
98 throw (::com::sun::star::uno::RuntimeException);
99 virtual void SAL_CALL removeModifyListener(
100 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
101 throw (::com::sun::star::uno::RuntimeException);
103 private:
104 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xData;
105 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xLabel;
107 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
108 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
111 } // namespace chart
113 // CHART2_LABELEDDATASEQUENCE_HXX
114 #endif
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */