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 #ifndef SC_CHARTRANGESELECTIONLISTENER_HXX
24 #define SC_CHARTRANGESELECTIONLISTENER_HXX
25 
26 #include <cppuhelper/compbase2.hxx>
27 #include <comphelper/broadcasthelper.hxx>
28 #include <com/sun/star/view/XSelectionChangeListener.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 
31 class ScTabViewShell;
32 
33 typedef ::cppu::WeakComponentImplHelper2<
34         ::com::sun::star::view::XSelectionChangeListener,
35         ::com::sun::star::lang::XServiceInfo >
36     ScChartRangeSelectionListener_Base;
37 
38 class ScChartRangeSelectionListener :
39     public comphelper::OBaseMutex,
40     public ScChartRangeSelectionListener_Base
41 {
42 public:
43 	explicit ScChartRangeSelectionListener( ScTabViewShell * pViewShell );
44 	virtual ~ScChartRangeSelectionListener();
45 
46 protected:
47     // ____ XSelectionChangeListener ____
48     virtual void SAL_CALL selectionChanged(
49         const ::com::sun::star::lang::EventObject& aEvent )
50         throw (::com::sun::star::uno::RuntimeException);
51 
52     // ____ XEventListener (base of XSelectionChangeListener) ____
53     virtual void SAL_CALL disposing(
54         const ::com::sun::star::lang::EventObject& Source )
55         throw (::com::sun::star::uno::RuntimeException);
56 
57     // ____ WeakComponentImplHelperBase ____
58     // is called when dispose() is called at this component
59     virtual void SAL_CALL disposing();
60 
61     // ____ XServiceInfo ____
62     virtual ::rtl::OUString SAL_CALL getImplementationName()
63         throw (::com::sun::star::uno::RuntimeException);
64     virtual ::sal_Bool SAL_CALL supportsService(
65         const ::rtl::OUString& ServiceName )
66         throw (::com::sun::star::uno::RuntimeException);
67     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
68         throw (::com::sun::star::uno::RuntimeException);
69 
70 private:
71     ScTabViewShell * m_pViewShell;
72 };
73 
74 // SC_CHARTRANGESELECTIONLISTENER_HXX
75 #endif
76