Update ooo320-m1
[ooovba.git] / chart2 / source / controller / inc / dlg_DataSource.hxx
bloba0492f2c4573904a099e809630a4319573de6319
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: dlg_DataSource.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_DATASOURCEDIALOG_HXX
31 #define CHART2_DATASOURCEDIALOG_HXX
33 // header for class TabDialog
34 #include <vcl/tabdlg.hxx>
35 // header for class TabControl
36 #include <vcl/tabctrl.hxx>
37 // header for class OKButton
38 #ifndef _SV_BUTTON_HXX
39 #include <vcl/button.hxx>
40 #endif
42 #include "TabPageNotifiable.hxx"
43 #include <com/sun/star/uno/XComponentContext.hpp>
44 #include <com/sun/star/chart2/XChartDocument.hpp>
46 // for auto_ptr
47 #include <memory>
49 namespace chart
52 class DataSourceTabControl;
53 class RangeChooserTabPage;
54 class DataSourceTabPage;
55 class ChartTypeTemplateProvider;
56 class DialogModel;
58 class DataSourceDialog :
59 public TabDialog,
60 public TabPageNotifiable
62 public:
63 explicit DataSourceDialog(
64 Window * pParent,
65 const ::com::sun::star::uno::Reference<
66 ::com::sun::star::chart2::XChartDocument > & xChartDocument,
67 const ::com::sun::star::uno::Reference<
68 ::com::sun::star::uno::XComponentContext > & xContext );
69 virtual ~DataSourceDialog();
71 // from Dialog (base of TabDialog)
72 virtual short Execute();
74 // TabPageNotifiable
75 virtual void setInvalidPage( TabPage * pTabPage );
76 virtual void setValidPage( TabPage * pTabPage );
78 protected:
79 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
80 m_xChartDocument;
81 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
82 m_xContext;
83 ::std::auto_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
84 ::std::auto_ptr< DialogModel > m_apDialogModel;
86 private:
87 DataSourceTabControl* m_pTabControl;
88 OKButton m_aBtnOK;
89 CancelButton m_aBtnCancel;
90 HelpButton m_aBtnHelp;
92 RangeChooserTabPage * m_pRangeChooserTabePage;
93 DataSourceTabPage * m_pDataSourceTabPage;
94 bool m_bRangeChooserTabIsValid;
95 bool m_bDataSourceTabIsValid;
97 static USHORT m_nLastPageId;
100 } // namespace chart
102 // CHART2_DATASOURCEDIALOG_HXX
103 #endif