xref: /trunk/main/sc/source/ui/inc/ChartRangeSelectionListener.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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 
51     // ____ XEventListener (base of XSelectionChangeListener) ____
52     virtual void SAL_CALL disposing(
53         const ::com::sun::star::lang::EventObject& Source );
54 
55     // ____ WeakComponentImplHelperBase ____
56     // is called when dispose() is called at this component
57     virtual void SAL_CALL disposing();
58 
59     // ____ XServiceInfo ____
60     virtual ::rtl::OUString SAL_CALL getImplementationName();
61     virtual ::sal_Bool SAL_CALL supportsService(
62         const ::rtl::OUString& ServiceName );
63     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
64 
65 private:
66     ScTabViewShell * m_pViewShell;
67 };
68 
69 // SC_CHARTRANGESELECTIONLISTENER_HXX
70 #endif
71