1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include "udlg_module.hxx"
25 #include "udlg_global.hrc"
26 #include "roadmapskeleton.hrc"
27 #include "roadmapskeleton.hxx"
28 #include "roadmapskeletonpages.hxx"
29 
30 //........................................................................
31 namespace udlg
32 {
33 //........................................................................
34 
35 #define STATE_WELCOME       0
36 #define STATE_PREPARE       1
37 #define STATE_SETUP         2
38 #define STATE_FINISH        3
39 
40 #define PATH_DEFAULT        1
41 
42 	//====================================================================
43 	//= RoadmapSkeletonDialog
44 	//====================================================================
45 	//--------------------------------------------------------------------
RoadmapSkeletonDialog(const::comphelper::ComponentContext & _rContext,Window * _pParent)46     RoadmapSkeletonDialog::RoadmapSkeletonDialog( const ::comphelper::ComponentContext& _rContext, Window* _pParent )
47         :RoadmapSkeletonDialog_Base( _pParent, UdlgResId( DLG_ROADMAP_SKELETON ) )
48         ,m_aContext( _rContext )
49     {
50         String sTitlePrepare( UdlgResId( STR_STATE_WELCOME ) );
51         String sTitleStoreAs( UdlgResId( STR_STATE_PREPARE ) );
52         String sTitleMigrate( UdlgResId( STR_STATE_SETUP ) );
53         String sTitleSummary( UdlgResId( STR_STATE_FINISH ) );
54         FreeResource();
55 
56         describeState( STATE_WELCOME,    sTitlePrepare, &WelcomePage::Create     );
57         describeState( STATE_PREPARE,    sTitleStoreAs, &PreparationPage::Create );
58         describeState( STATE_SETUP,      sTitleMigrate, &SetupPage::Create       );
59         describeState( STATE_FINISH,     sTitleSummary, &FinishPage::Create      );
60 
61         declarePath( PATH_DEFAULT, STATE_WELCOME, STATE_PREPARE, STATE_SETUP, STATE_FINISH, WZS_INVALID_STATE );
62 
63         SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH, TAB_PAGE_HEIGHT ), MAP_APPFONT ) );
64         ShowButtonFixedLine( true );
65         SetRoadmapInteractive( true );
66         enableAutomaticNextButtonState();
67         defaultButton( WZB_NEXT );
68         enableButtons( WZB_FINISH, true );
69         ActivatePage();
70     }
71 
72 	//--------------------------------------------------------------------
~RoadmapSkeletonDialog()73     RoadmapSkeletonDialog::~RoadmapSkeletonDialog()
74     {
75     }
76 
77 	//--------------------------------------------------------------------
enterState(WizardState _nState)78     void RoadmapSkeletonDialog::enterState( WizardState _nState )
79     {
80         RoadmapSkeletonDialog_Base::enterState( _nState );
81     }
82 
83 	//--------------------------------------------------------------------
prepareLeaveCurrentState(CommitPageReason _eReason)84     sal_Bool RoadmapSkeletonDialog::prepareLeaveCurrentState( CommitPageReason _eReason )
85     {
86         return RoadmapSkeletonDialog_Base::prepareLeaveCurrentState( _eReason );
87     }
88 
89 	//--------------------------------------------------------------------
leaveState(WizardState _nState)90     sal_Bool RoadmapSkeletonDialog::leaveState( WizardState _nState )
91     {
92         return RoadmapSkeletonDialog_Base::leaveState( _nState );
93     }
94 
95 	//--------------------------------------------------------------------
determineNextState(WizardState _nCurrentState) const96     RoadmapSkeletonDialog::WizardState RoadmapSkeletonDialog::determineNextState( WizardState _nCurrentState ) const
97     {
98         return RoadmapSkeletonDialog_Base::determineNextState( _nCurrentState );
99     }
100 
101 	//--------------------------------------------------------------------
onFinish()102     sal_Bool RoadmapSkeletonDialog::onFinish()
103     {
104         return RoadmapSkeletonDialog_Base::onFinish();
105     }
106 
107 //........................................................................
108 } // namespace udlg
109 //........................................................................
110