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 #include "udlg_module.hxx"
29 #include "udlg_global.hrc"
30 #include "roadmapskeleton.hrc"
31 #include "roadmapskeleton.hxx"
32 #include "roadmapskeletonpages.hxx"
33 
34 //........................................................................
35 namespace udlg
36 {
37 //........................................................................
38 
39 #define STATE_WELCOME       0
40 #define STATE_PREPARE       1
41 #define STATE_SETUP         2
42 #define STATE_FINISH        3
43 
44 #define PATH_DEFAULT        1
45 
46 	//====================================================================
47 	//= RoadmapSkeletonDialog
48 	//====================================================================
49 	//--------------------------------------------------------------------
50     RoadmapSkeletonDialog::RoadmapSkeletonDialog( const ::comphelper::ComponentContext& _rContext, Window* _pParent )
51         :RoadmapSkeletonDialog_Base( _pParent, UdlgResId( DLG_ROADMAP_SKELETON ) )
52         ,m_aContext( _rContext )
53     {
54         String sTitlePrepare( UdlgResId( STR_STATE_WELCOME ) );
55         String sTitleStoreAs( UdlgResId( STR_STATE_PREPARE ) );
56         String sTitleMigrate( UdlgResId( STR_STATE_SETUP ) );
57         String sTitleSummary( UdlgResId( STR_STATE_FINISH ) );
58         FreeResource();
59 
60         describeState( STATE_WELCOME,    sTitlePrepare, &WelcomePage::Create     );
61         describeState( STATE_PREPARE,    sTitleStoreAs, &PreparationPage::Create );
62         describeState( STATE_SETUP,      sTitleMigrate, &SetupPage::Create       );
63         describeState( STATE_FINISH,     sTitleSummary, &FinishPage::Create      );
64 
65         declarePath( PATH_DEFAULT, STATE_WELCOME, STATE_PREPARE, STATE_SETUP, STATE_FINISH, WZS_INVALID_STATE );
66 
67         SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
68         ShowButtonFixedLine( true );
69         SetRoadmapInteractive( true );
70         enableAutomaticNextButtonState();
71         defaultButton( WZB_NEXT );
72         enableButtons( WZB_FINISH, true );
73         ActivatePage();
74     }
75 
76 	//--------------------------------------------------------------------
77     RoadmapSkeletonDialog::~RoadmapSkeletonDialog()
78     {
79     }
80 
81 	//--------------------------------------------------------------------
82     void RoadmapSkeletonDialog::enterState( WizardState _nState )
83     {
84         RoadmapSkeletonDialog_Base::enterState( _nState );
85     }
86 
87 	//--------------------------------------------------------------------
88     sal_Bool RoadmapSkeletonDialog::prepareLeaveCurrentState( CommitPageReason _eReason )
89     {
90         return RoadmapSkeletonDialog_Base::prepareLeaveCurrentState( _eReason );
91     }
92 
93 	//--------------------------------------------------------------------
94     sal_Bool RoadmapSkeletonDialog::leaveState( WizardState _nState )
95     {
96         return RoadmapSkeletonDialog_Base::leaveState( _nState );
97     }
98 
99 	//--------------------------------------------------------------------
100     RoadmapSkeletonDialog::WizardState RoadmapSkeletonDialog::determineNextState( WizardState _nCurrentState ) const
101     {
102         return RoadmapSkeletonDialog_Base::determineNextState( _nCurrentState );
103     }
104 
105 	//--------------------------------------------------------------------
106     sal_Bool RoadmapSkeletonDialog::onFinish()
107     {
108         return RoadmapSkeletonDialog_Base::onFinish();
109     }
110 
111 //........................................................................
112 } // namespace udlg
113 //........................................................................
114