1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: roadmapskeleton.cxx,v $
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 ************************************************************************/
31 #include "udlg_module.hxx"
32 #include "udlg_global.hrc"
33 #include "roadmapskeleton.hrc"
34 #include "roadmapskeleton.hxx"
35 #include "roadmapskeletonpages.hxx"
37 //........................................................................
40 //........................................................................
42 #define STATE_WELCOME 0
43 #define STATE_PREPARE 1
45 #define STATE_FINISH 3
47 #define PATH_DEFAULT 1
49 //====================================================================
50 //= RoadmapSkeletonDialog
51 //====================================================================
52 //--------------------------------------------------------------------
53 RoadmapSkeletonDialog::RoadmapSkeletonDialog( const ::comphelper::ComponentContext
& _rContext
, Window
* _pParent
)
54 :RoadmapSkeletonDialog_Base( _pParent
, UdlgResId( DLG_ROADMAP_SKELETON
) )
55 ,m_aContext( _rContext
)
57 String
sTitlePrepare( UdlgResId( STR_STATE_WELCOME
) );
58 String
sTitleStoreAs( UdlgResId( STR_STATE_PREPARE
) );
59 String
sTitleMigrate( UdlgResId( STR_STATE_SETUP
) );
60 String
sTitleSummary( UdlgResId( STR_STATE_FINISH
) );
63 describeState( STATE_WELCOME
, sTitlePrepare
, &WelcomePage::Create
);
64 describeState( STATE_PREPARE
, sTitleStoreAs
, &PreparationPage::Create
);
65 describeState( STATE_SETUP
, sTitleMigrate
, &SetupPage::Create
);
66 describeState( STATE_FINISH
, sTitleSummary
, &FinishPage::Create
);
68 declarePath( PATH_DEFAULT
, STATE_WELCOME
, STATE_PREPARE
, STATE_SETUP
, STATE_FINISH
, WZS_INVALID_STATE
);
70 SetPageSizePixel( LogicToPixel( ::Size( TAB_PAGE_WIDTH
, TAB_PAGE_HEIGHT
), MAP_APPFONT
) );
71 ShowButtonFixedLine( true );
72 SetRoadmapInteractive( true );
73 enableAutomaticNextButtonState();
74 defaultButton( WZB_NEXT
);
75 enableButtons( WZB_FINISH
, true );
79 //--------------------------------------------------------------------
80 RoadmapSkeletonDialog::~RoadmapSkeletonDialog()
84 //--------------------------------------------------------------------
85 void RoadmapSkeletonDialog::enterState( WizardState _nState
)
87 RoadmapSkeletonDialog_Base::enterState( _nState
);
90 //--------------------------------------------------------------------
91 sal_Bool
RoadmapSkeletonDialog::prepareLeaveCurrentState( CommitPageReason _eReason
)
93 return RoadmapSkeletonDialog_Base::prepareLeaveCurrentState( _eReason
);
96 //--------------------------------------------------------------------
97 sal_Bool
RoadmapSkeletonDialog::leaveState( WizardState _nState
)
99 return RoadmapSkeletonDialog_Base::leaveState( _nState
);
102 //--------------------------------------------------------------------
103 RoadmapSkeletonDialog::WizardState
RoadmapSkeletonDialog::determineNextState( WizardState _nCurrentState
) const
105 return RoadmapSkeletonDialog_Base::determineNextState( _nCurrentState
);
108 //--------------------------------------------------------------------
109 sal_Bool
RoadmapSkeletonDialog::onFinish( sal_Int32 _nResult
)
111 return RoadmapSkeletonDialog_Base::onFinish( _nResult
);
114 //........................................................................
116 //........................................................................