Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef CHART2_LABELEDDATASEQUENCE_HXX
20 : #define CHART2_LABELEDDATASEQUENCE_HXX
21 : #include "ServiceMacros.hxx"
22 : #include "MutexContainer.hxx"
23 : #include <comphelper/uno3.hxx>
24 : #include <cppuhelper/implbase4.hxx>
25 :
26 : #include <com/sun/star/chart2/data/XLabeledDataSequence.hpp>
27 : #include <com/sun/star/lang/XServiceInfo.hpp>
28 : #include <com/sun/star/util/XCloneable.hpp>
29 : #include <com/sun/star/uno/XComponentContext.hpp>
30 : #include <com/sun/star/util/XModifyBroadcaster.hpp>
31 :
32 : namespace chart
33 : {
34 :
35 : namespace impl
36 : {
37 : typedef cppu::WeakImplHelper4<
38 : ::com::sun::star::chart2::data::XLabeledDataSequence,
39 : ::com::sun::star::util::XCloneable,
40 : ::com::sun::star::util::XModifyBroadcaster,
41 : ::com::sun::star::lang::XServiceInfo >
42 : LabeledDataSequence_Base;
43 : }
44 :
45 : class LabeledDataSequence :
46 : public MutexContainer,
47 : public impl::LabeledDataSequence_Base
48 : {
49 : public:
50 : explicit LabeledDataSequence(
51 : const ::com::sun::star::uno::Reference<
52 : ::com::sun::star::uno::XComponentContext > & xContext );
53 : explicit LabeledDataSequence(
54 : const ::com::sun::star::uno::Reference<
55 : ::com::sun::star::chart2::data::XDataSequence > & rValues );
56 : explicit LabeledDataSequence(
57 : const ::com::sun::star::uno::Reference<
58 : ::com::sun::star::chart2::data::XDataSequence > & rValues,
59 : const ::com::sun::star::uno::Reference<
60 : ::com::sun::star::chart2::data::XDataSequence > & rLabels );
61 :
62 : virtual ~LabeledDataSequence();
63 :
64 : /// establish methods for factory instatiation
65 61 : APPHELPER_SERVICE_FACTORY_HELPER( LabeledDataSequence )
66 : /// declare XServiceInfo methods
67 : APPHELPER_XSERVICEINFO_DECL()
68 :
69 : protected:
70 : // ____ XLabeledDataSequence ____
71 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues()
72 : throw (::com::sun::star::uno::RuntimeException);
73 : virtual void SAL_CALL setValues(
74 : const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
75 : throw (::com::sun::star::uno::RuntimeException);
76 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel()
77 : throw (::com::sun::star::uno::RuntimeException);
78 : virtual void SAL_CALL setLabel(
79 : const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence )
80 : throw (::com::sun::star::uno::RuntimeException);
81 :
82 : // ____ XCloneable ____
83 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
84 : throw (::com::sun::star::uno::RuntimeException);
85 :
86 : // ____ XModifyBroadcaster ____
87 : virtual void SAL_CALL addModifyListener(
88 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
89 : throw (::com::sun::star::uno::RuntimeException);
90 : virtual void SAL_CALL removeModifyListener(
91 : const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
92 : throw (::com::sun::star::uno::RuntimeException);
93 :
94 : private:
95 : ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xData;
96 : ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > m_xLabel;
97 :
98 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
99 : ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
100 : };
101 :
102 : } // namespace chart
103 :
104 : // CHART2_LABELEDDATASEQUENCE_HXX
105 : #endif
106 :
107 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|