update dev300-m58
[ooovba.git] / chart2 / source / controller / dialogs / tp_RangeChooser.hxx
blob4ede2c67d24d445ddbb3bfa9a8e6e9ef9f751c3b
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: tp_RangeChooser.hxx,v $
10 * $Revision: 1.5.44.2 $
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 ************************************************************************/
31 #ifndef _CHART2_TP_RANGECHOOSER_HXX
32 #define _CHART2_TP_RANGECHOOSER_HXX
34 #include "RangeSelectionListener.hxx"
35 #include "RangeSelectionButton.hxx"
36 #include "TabPageNotifiable.hxx"
37 #include "RangeEdit.hxx"
39 #include <com/sun/star/chart2/XChartDocument.hpp>
40 #include <com/sun/star/chart2/data/XDataProvider.hpp>
41 #include <com/sun/star/chart2/XChartTypeTemplate.hpp>
42 #include <svtools/wizardmachine.hxx>
43 #include <vcl/edit.hxx>
44 #include <vcl/fixed.hxx>
45 #include <com/sun/star/sheet/XRangeSelection.hpp>
47 //.............................................................................
48 namespace chart
50 //.............................................................................
52 //-----------------------------------------------------------------------------
53 /**
55 class ChartTypeTemplateProvider;
56 class DialogModel;
58 class RangeChooserTabPage : public svt::OWizardPage, public RangeSelectionListenerParent
60 public:
62 RangeChooserTabPage( Window* pParent
63 , DialogModel & rDialogModel
64 , ChartTypeTemplateProvider* pTemplateProvider
65 , Dialog * pParentDialog
66 , bool bHideDescription = false );
67 virtual ~RangeChooserTabPage();
69 //RangeSelectionListenerParent
70 virtual void listeningFinished( const ::rtl::OUString & rNewRange );
71 virtual void disposingRangeSelection();
73 void commitPage();
75 protected: //methods
77 //OWizardPage
78 virtual void ActivatePage();
79 virtual sal_Bool commitPage( CommitPageReason eReason );
81 //TabPage
82 virtual void DeactivatePage();
84 void initControlsFromModel();
85 void changeDialogModelAccordingToControls();
86 bool isValid();
87 void setDirty();
89 DECL_LINK( ChooseRangeHdl, void* );
90 DECL_LINK( ControlChangedHdl, void* );
91 DECL_LINK( ControlEditedHdl, void* );
93 protected: //member
95 FixedText m_aFT_Caption;
96 FixedText m_aFT_Range;
97 RangeEdit m_aED_Range;
98 RangeSelectionButton m_aIB_Range;
100 RadioButton m_aRB_Rows;
101 RadioButton m_aRB_Columns;
103 CheckBox m_aCB_FirstRowAsLabel;
104 CheckBox m_aCB_FirstColumnAsLabel;
106 sal_Int32 m_nChangingControlCalls;
107 bool m_bIsDirty;
109 ::com::sun::star::uno::Reference<
110 ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
111 ::com::sun::star::uno::Reference<
112 ::com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
114 rtl::OUString m_aLastValidRangeString;
115 ::com::sun::star::uno::Reference<
116 ::com::sun::star::chart2::XChartTypeTemplate > m_xCurrentChartTypeTemplate;
117 ChartTypeTemplateProvider* m_pTemplateProvider;
119 DialogModel & m_rDialogModel;
120 Dialog * m_pParentDialog;
121 TabPageNotifiable * m_pTabPageNotifiable;
124 //.............................................................................
125 } //namespace chart
126 //.............................................................................
127 #endif