1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART2_RANGESELECTIONLISTENER_HXX
28 #define CHART2_RANGESELECTIONLISTENER_HXX
30 #include "ControllerLockGuard.hxx"
31 #include <cppuhelper/implbase1.hxx>
32 #include <com/sun/star/frame/XModel.hpp>
33 #include <com/sun/star/sheet/XRangeSelectionListener.hpp>
38 class RangeSelectionListenerParent
41 virtual void listeningFinished( const ::rtl::OUString
& rNewRange
) = 0;
42 virtual void disposingRangeSelection() = 0;
45 // ----------------------------------------
47 class RangeSelectionListener
: public
48 ::cppu::WeakImplHelper1
<
49 ::com::sun::star::sheet::XRangeSelectionListener
>
52 explicit RangeSelectionListener(
53 RangeSelectionListenerParent
& rParent
,
54 const ::rtl::OUString
& rInitialRange
,
55 const ::com::sun::star::uno::Reference
<
56 ::com::sun::star::frame::XModel
>& xModelToLockController
);
57 virtual ~RangeSelectionListener();
60 // ____ XRangeSelectionListener ____
61 virtual void SAL_CALL
done( const ::com::sun::star::sheet::RangeSelectionEvent
& aEvent
)
62 throw (::com::sun::star::uno::RuntimeException
);
63 virtual void SAL_CALL
aborted( const ::com::sun::star::sheet::RangeSelectionEvent
& aEvent
)
64 throw (::com::sun::star::uno::RuntimeException
);
66 // ____ XEventListener ____
67 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
)
68 throw (::com::sun::star::uno::RuntimeException
);
71 RangeSelectionListenerParent
& m_rParent
;
72 ::rtl::OUString m_aRange
;
73 ControllerLockGuard m_aControllerLockGuard
;
78 // CHART2_RANGESELECTIONLISTENER_HXX