1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef CHART2_MODIFYLISTENERCALLBACK_HXX
25 #define CHART2_MODIFYLISTENERCALLBACK_HXX
26 
27 // header for class Link
28 #include <tools/link.hxx>
29 #include <com/sun/star/util/XModifyBroadcaster.hpp>
30 #include <com/sun/star/util/XModifyListener.hpp>
31 #include "charttoolsdllapi.hxx"
32 
33 namespace chart {
34 
35 /** Use this class as a member if you want to listen on a XModifyBroadcaster
36 without becoming a XModifyListener yourself
37  */
38 
39 class ModifyListenerCallBack_impl;
40 
41 class OOO_DLLPUBLIC_CHARTTOOLS ModifyListenerCallBack
42 {
43 public:
44     explicit ModifyListenerCallBack( const Link& rCallBack );
45 
46     virtual ~ModifyListenerCallBack();
47 
48     void startListening( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyBroadcaster >& xBroadcaster );
49     SAL_DLLPRIVATE void stopListening();
50 
51 private: //methods
52     SAL_DLLPRIVATE ModifyListenerCallBack();
53     SAL_DLLPRIVATE ModifyListenerCallBack( const ModifyListenerCallBack& );
54 
55 private: //member
56     ModifyListenerCallBack_impl* pModifyListener_impl;
57     ::com::sun::star::uno::Reference<
58         ::com::sun::star::util::XModifyListener >   m_xModifyListener;
59 };
60 
61 } // namespace chart
62 
63 #endif
64 
65