xref: /trunk/main/desktop/source/migration/wizard.hxx (revision 281431db)
10a1e2f0eSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
30a1e2f0eSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
40a1e2f0eSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
50a1e2f0eSAndrew Rist  * distributed with this work for additional information
60a1e2f0eSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
70a1e2f0eSAndrew Rist  * to you under the Apache License, Version 2.0 (the
80a1e2f0eSAndrew Rist  * "License"); you may not use this file except in compliance
90a1e2f0eSAndrew Rist  * with the License.  You may obtain a copy of the License at
100a1e2f0eSAndrew Rist  *
110a1e2f0eSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
120a1e2f0eSAndrew Rist  *
130a1e2f0eSAndrew Rist  * Unless required by applicable law or agreed to in writing,
140a1e2f0eSAndrew Rist  * software distributed under the License is distributed on an
150a1e2f0eSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
160a1e2f0eSAndrew Rist  * KIND, either express or implied.  See the License for the
170a1e2f0eSAndrew Rist  * specific language governing permissions and limitations
180a1e2f0eSAndrew Rist  * under the License.
190a1e2f0eSAndrew Rist  *
200a1e2f0eSAndrew Rist  *************************************************************/
210a1e2f0eSAndrew Rist 
220a1e2f0eSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _WIZARD_HXX_
25cdf0e10cSrcweir #define _WIZARD_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <rtl/ustring.hxx>
28cdf0e10cSrcweir #include <svtools/roadmapwizard.hxx>
29cdf0e10cSrcweir #include <vcl/throbber.hxx>
30cdf0e10cSrcweir #include <tools/resid.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace desktop
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 
35cdf0e10cSrcweir class WizardResId : public ResId
36cdf0e10cSrcweir {
37cdf0e10cSrcweir public:
38cdf0e10cSrcweir     WizardResId( sal_uInt16 nId );
39cdf0e10cSrcweir };
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class FirstStartWizard : public svt::RoadmapWizard
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 
44cdf0e10cSrcweir public:
45cdf0e10cSrcweir     static const WizardState STATE_WELCOME;
46cdf0e10cSrcweir     static const WizardState STATE_LICENSE;
47cdf0e10cSrcweir     static const WizardState STATE_MIGRATION;
48cdf0e10cSrcweir 	static const WizardState STATE_USER;
49cdf0e10cSrcweir 	static const WizardState STATE_UPDATE_CHECK;
50cdf0e10cSrcweir     static const WizardState STATE_REGISTRATION;
51cdf0e10cSrcweir 
52cdf0e10cSrcweir     static ResMgr* pResMgr;
53cdf0e10cSrcweir     static ResMgr* GetResManager();
54cdf0e10cSrcweir 
55cdf0e10cSrcweir     FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAcceptance, const rtl::OUString &rLicensePath );
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     virtual short Execute();
58cdf0e10cSrcweir     virtual long PreNotify( NotifyEvent& rNEvt );
59cdf0e10cSrcweir 
60cdf0e10cSrcweir     void DisableButtonsWhileMigration();
61cdf0e10cSrcweir 
62cdf0e10cSrcweir private:
63cdf0e10cSrcweir     sal_Bool m_bOverride;
64cdf0e10cSrcweir     WizardState _currentState;
65*281431dbSOliver-Rainer Wittmann     WizardState m_lastState;
66cdf0e10cSrcweir 	::svt::RoadmapWizardTypes::PathId m_aDefaultPath;
67cdf0e10cSrcweir 	::svt::RoadmapWizardTypes::PathId m_aMigrationPath;
68cdf0e10cSrcweir     String m_sNext;
69cdf0e10cSrcweir     String m_sCancel;
70cdf0e10cSrcweir     sal_Bool m_bDone;
71cdf0e10cSrcweir     sal_Bool m_bLicenseNeedsAcceptance;
72cdf0e10cSrcweir     sal_Bool m_bLicenseWasAccepted;
73cdf0e10cSrcweir     sal_Bool m_bAutomaticUpdChk;
74cdf0e10cSrcweir     Link m_lnkCancel;
75cdf0e10cSrcweir     Throbber  m_aThrobber;
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     rtl::OUString m_aLicensePath;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     void storeAcceptDate();
80cdf0e10cSrcweir     void setPatchLevel();
81cdf0e10cSrcweir 
82cdf0e10cSrcweir     DECL_LINK(DeclineHdl, PushButton*);
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	void cleanOldOfficeRegKeys();
85cdf0e10cSrcweir     sal_Bool showOnlineUpdatePage();
86cdf0e10cSrcweir     ::svt::RoadmapWizardTypes::PathId defineWizardPagesDependingFromContext();
87cdf0e10cSrcweir 
88cdf0e10cSrcweir protected:
89cdf0e10cSrcweir     // from svt::WizardMachine
90cdf0e10cSrcweir     virtual TabPage* createPage(WizardState _nState);
91cdf0e10cSrcweir     virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
92cdf0e10cSrcweir     virtual	sal_Bool leaveState(WizardState _nState );
93cdf0e10cSrcweir 	virtual sal_Bool onFinish();
94cdf0e10cSrcweir     virtual void     enterState(WizardState _nState);
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     // from svt::RoadmapWizard
97cdf0e10cSrcweir     virtual String       getStateDisplayName( WizardState _nState ) const;
98cdf0e10cSrcweir };
99cdf0e10cSrcweir }
100cdf0e10cSrcweir #endif
101