1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 #ifndef CHART2_DATASOURCEDIALOG_HXX 28 #define CHART2_DATASOURCEDIALOG_HXX 29 30 // header for class TabDialog 31 #include <vcl/tabdlg.hxx> 32 // header for class TabControl 33 #include <vcl/tabctrl.hxx> 34 // header for class OKButton 35 #ifndef _SV_BUTTON_HXX 36 #include <vcl/button.hxx> 37 #endif 38 39 #include "TabPageNotifiable.hxx" 40 #include <com/sun/star/uno/XComponentContext.hpp> 41 #include <com/sun/star/chart2/XChartDocument.hpp> 42 43 // for auto_ptr 44 #include <memory> 45 46 namespace chart 47 { 48 49 class DataSourceTabControl; 50 class RangeChooserTabPage; 51 class DataSourceTabPage; 52 class ChartTypeTemplateProvider; 53 class DialogModel; 54 55 class DataSourceDialog : 56 public TabDialog, 57 public TabPageNotifiable 58 { 59 public: 60 explicit DataSourceDialog( 61 Window * pParent, 62 const ::com::sun::star::uno::Reference< 63 ::com::sun::star::chart2::XChartDocument > & xChartDocument, 64 const ::com::sun::star::uno::Reference< 65 ::com::sun::star::uno::XComponentContext > & xContext ); 66 virtual ~DataSourceDialog(); 67 68 // from Dialog (base of TabDialog) 69 virtual short Execute(); 70 71 // TabPageNotifiable 72 virtual void setInvalidPage( TabPage * pTabPage ); 73 virtual void setValidPage( TabPage * pTabPage ); 74 75 protected: 76 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > 77 m_xChartDocument; 78 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > 79 m_xContext; 80 ::std::auto_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider; 81 ::std::auto_ptr< DialogModel > m_apDialogModel; 82 83 private: 84 DataSourceTabControl* m_pTabControl; 85 OKButton m_aBtnOK; 86 CancelButton m_aBtnCancel; 87 HelpButton m_aBtnHelp; 88 89 RangeChooserTabPage * m_pRangeChooserTabePage; 90 DataSourceTabPage * m_pDataSourceTabPage; 91 bool m_bRangeChooserTabIsValid; 92 bool m_bDataSourceTabIsValid; 93 94 static sal_uInt16 m_nLastPageId; 95 }; 96 97 } // namespace chart 98 99 // CHART2_DATASOURCEDIALOG_HXX 100 #endif 101