Update ooo320-m1
[ooovba.git] / chart2 / source / controller / inc / RangeSelectionListener.hxx
blob020cbb1f8aebd3b676cbc4e4d9f0ab79851ac030
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: RangeSelectionListener.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef CHART2_RANGESELECTIONLISTENER_HXX
31 #define CHART2_RANGESELECTIONLISTENER_HXX
33 #include "ControllerLockGuard.hxx"
34 #include <cppuhelper/implbase1.hxx>
35 #include <com/sun/star/frame/XModel.hpp>
36 #include <com/sun/star/sheet/XRangeSelectionListener.hpp>
38 namespace chart
41 class RangeSelectionListenerParent
43 public:
44 virtual void listeningFinished( const ::rtl::OUString & rNewRange ) = 0;
45 virtual void disposingRangeSelection() = 0;
48 // ----------------------------------------
50 class RangeSelectionListener : public
51 ::cppu::WeakImplHelper1<
52 ::com::sun::star::sheet::XRangeSelectionListener >
54 public:
55 explicit RangeSelectionListener(
56 RangeSelectionListenerParent & rParent,
57 const ::rtl::OUString & rInitialRange,
58 const ::com::sun::star::uno::Reference<
59 ::com::sun::star::frame::XModel >& xModelToLockController );
60 virtual ~RangeSelectionListener();
62 protected:
63 // ____ XRangeSelectionListener ____
64 virtual void SAL_CALL done( const ::com::sun::star::sheet::RangeSelectionEvent& aEvent )
65 throw (::com::sun::star::uno::RuntimeException);
66 virtual void SAL_CALL aborted( const ::com::sun::star::sheet::RangeSelectionEvent& aEvent )
67 throw (::com::sun::star::uno::RuntimeException);
69 // ____ XEventListener ____
70 virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
71 throw (::com::sun::star::uno::RuntimeException);
73 private:
74 RangeSelectionListenerParent & m_rParent;
75 ::rtl::OUString m_aRange;
76 ControllerLockGuard m_aControllerLockGuard;
79 } // namespace chart
81 // CHART2_RANGESELECTIONLISTENER_HXX
82 #endif