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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_chart2.hxx"
26
27 #include "RangeSelectionListener.hxx"
28
29 using namespace ::com::sun::star;
30
31 using ::com::sun::star::uno::Reference;
32 using ::com::sun::star::uno::Sequence;
33 using ::rtl::OUString;
34
35 namespace chart
36 {
37
RangeSelectionListener(RangeSelectionListenerParent & rParent,const::rtl::OUString & rInitialRange,const Reference<frame::XModel> & xModelToLockController)38 RangeSelectionListener::RangeSelectionListener(
39 RangeSelectionListenerParent & rParent,
40 const ::rtl::OUString & rInitialRange,
41 const Reference< frame::XModel >& xModelToLockController ) :
42 m_rParent( rParent ),
43 m_aRange( rInitialRange ),
44 m_aControllerLockGuard( xModelToLockController )
45 {}
46
~RangeSelectionListener()47 RangeSelectionListener::~RangeSelectionListener()
48 {}
49
50 // ____ XRangeSelectionListener ____
done(const sheet::RangeSelectionEvent & aEvent)51 void SAL_CALL RangeSelectionListener::done( const sheet::RangeSelectionEvent& aEvent )
52 throw (uno::RuntimeException)
53 {
54 m_aRange = aEvent.RangeDescriptor;
55 m_rParent.listeningFinished( m_aRange );
56 }
57
aborted(const sheet::RangeSelectionEvent &)58 void SAL_CALL RangeSelectionListener::aborted( const sheet::RangeSelectionEvent& /*aEvent*/ )
59 throw (uno::RuntimeException)
60 {
61 m_rParent.listeningFinished( m_aRange );
62 }
63
64 // ____ XEventListener ____
disposing(const lang::EventObject &)65 void SAL_CALL RangeSelectionListener::disposing( const lang::EventObject& /*Source*/ )
66 throw (uno::RuntimeException)
67 {
68 m_rParent.disposingRangeSelection();
69 }
70
71 } // namespace chart
72