merged tag ooo/OOO330_m14
[LibreOffice.git] / chart2 / source / controller / inc / RangeSelectionHelper.hxx
blobcb9e067bd8e2fd4d410a65d675bfec721d9007d5
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_RANGESELECTIONHELPER_HXX
28 #define CHART2_RANGESELECTIONHELPER_HXX
30 #include <com/sun/star/chart2/XChartDocument.hpp>
31 #include <com/sun/star/beans/PropertyValue.hpp>
33 namespace com { namespace sun { namespace star {
34 namespace sheet{
35 class XRangeSelection;
36 class XRangeSelectionListener;
37 class XCellRangesAccess;
39 }}}
41 namespace chart
44 class RangeSelectionListenerParent;
46 class RangeSelectionHelper
48 public:
49 explicit RangeSelectionHelper(
50 const ::com::sun::star::uno::Reference<
51 ::com::sun::star::chart2::XChartDocument > & xChartDocument );
52 ~RangeSelectionHelper();
54 bool hasRangeSelection();
55 ::com::sun::star::uno::Reference<
56 ::com::sun::star::sheet::XRangeSelection > getRangeSelection();
57 void raiseRangeSelectionDocument();
58 bool chooseRange(
59 const ::rtl::OUString & aCurrentRange,
60 const ::rtl::OUString & aUIString,
61 RangeSelectionListenerParent & rListenerParent );
62 void stopRangeListening( bool bRemoveListener = true );
63 bool verifyCellRange( const ::rtl::OUString & rRangeStr );
64 bool verifyArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArguments );
66 private:
67 ::com::sun::star::uno::Reference<
68 ::com::sun::star::sheet::XRangeSelection >
69 m_xRangeSelection;
71 ::com::sun::star::uno::Reference<
72 ::com::sun::star::chart2::XChartDocument >
73 m_xChartDocument;
75 ::com::sun::star::uno::Reference<
76 ::com::sun::star::sheet::XCellRangesAccess >
77 m_xCellRangesAccess;
79 ::com::sun::star::uno::Reference<
80 ::com::sun::star::sheet::XRangeSelectionListener >
81 m_xRangeSelectionListener;
84 } // namespace chart
86 // CHART2_RANGESELECTIONHELPER_HXX
87 #endif