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 28 #ifndef _CHART2_CREATION_WIZARD_HXX 29 #define _CHART2_CREATION_WIZARD_HXX 30 31 #include "ServiceMacros.hxx" 32 #include "TimerTriggeredControllerLock.hxx" 33 #include "TabPageNotifiable.hxx" 34 35 #include <com/sun/star/chart2/XChartDocument.hpp> 36 #include <svtools/roadmapwizard.hxx> 37 #include <com/sun/star/uno/XComponentContext.hpp> 38 39 // for auto_ptr 40 #include <memory> 41 42 //............................................................................. 43 namespace chart 44 { 45 //............................................................................. 46 47 class RangeChooserTabPage; 48 class DataSourceTabPage; 49 class ChartTypeTemplateProvider; 50 class DialogModel; 51 52 class CreationWizard : public 53 svt::RoadmapWizard 54 , public TabPageNotifiable 55 { 56 public: 57 CreationWizard( Window* pParent, 58 const ::com::sun::star::uno::Reference< 59 ::com::sun::star::frame::XModel >& xChartModel 60 , const ::com::sun::star::uno::Reference< 61 ::com::sun::star::uno::XComponentContext >& xContext 62 , sal_Int32 nOnePageOnlyIndex=-1 );//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap 63 virtual ~CreationWizard(); 64 65 bool isClosable(); 66 67 // TabPageNotifiable 68 virtual void setInvalidPage( TabPage * pTabPage ); 69 virtual void setValidPage( TabPage * pTabPage ); 70 71 protected: 72 virtual sal_Bool leaveState( WizardState _nState ); 73 virtual WizardState determineNextState(WizardState nCurrentState) const; 74 virtual void enterState(WizardState nState); 75 76 virtual String getStateDisplayName( WizardState nState ) const; 77 78 private: 79 //no default constructor 80 CreationWizard(); 81 82 virtual svt::OWizardPage* createPage(WizardState nState); 83 84 ::com::sun::star::uno::Reference< 85 ::com::sun::star::chart2::XChartDocument > m_xChartModel; 86 ::com::sun::star::uno::Reference< 87 ::com::sun::star::uno::XComponentContext> m_xCC; 88 bool m_bIsClosable; 89 sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap 90 ChartTypeTemplateProvider* m_pTemplateProvider; 91 ::std::auto_ptr< DialogModel > m_apDialogModel; 92 93 WizardState m_nFirstState; 94 WizardState m_nLastState; 95 96 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; 97 98 // RangeChooserTabPage * m_pRangeChooserTabePage; 99 // DataSourceTabPage * m_pDataSourceTabPage; 100 bool m_bCanTravel; 101 }; 102 //............................................................................. 103 } //namespace chart 104 //............................................................................. 105 #endif 106