Update ooo320-m1
[ooovba.git] / desktop / source / migration / wizard.hxx
blob99f3a38f3f52e0d0048e40d5aed5bdaabb554552
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: wizard.hxx,v $
10 * $Revision: 1.12 $
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 #ifndef _WIZARD_HXX_
32 #define _WIZARD_HXX_
34 #include <rtl/ustring.hxx>
35 #include <svtools/roadmapwizard.hxx>
36 #include <vcl/window.hxx>
37 #include <tools/resid.hxx>
39 namespace desktop
42 class WizardResId : public ResId
44 public:
45 WizardResId( USHORT nId );
48 class FirstStartWizard : public svt::RoadmapWizard
51 public:
52 static const WizardState STATE_WELCOME;
53 static const WizardState STATE_LICENSE;
54 static const WizardState STATE_MIGRATION;
55 static const WizardState STATE_USER;
56 static const WizardState STATE_UPDATE_CHECK;
57 static const WizardState STATE_REGISTRATION;
59 static ResMgr* pResMgr;
60 static ResMgr* GetResManager();
62 FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAcceptance, const rtl::OUString &rLicensePath );
64 virtual short Execute();
65 virtual long PreNotify( NotifyEvent& rNEvt );
67 private:
68 sal_Bool m_bOverride;
69 WizardState _currentState;
70 ::svt::RoadmapWizardTypes::PathId m_aDefaultPath;
71 ::svt::RoadmapWizardTypes::PathId m_aMigrationPath;
72 String m_sNext;
73 String m_sCancel;
74 sal_Bool m_bDone;
75 sal_Bool m_bLicenseNeedsAcceptance;
76 sal_Bool m_bLicenseWasAccepted;
77 sal_Bool m_bAutomaticUpdChk;
78 Link m_lnkCancel;
80 rtl::OUString m_aLicensePath;
82 void storeAcceptDate();
83 void disableWizard();
84 void enableQuickstart();
86 DECL_LINK(DeclineHdl, PushButton*);
88 void cleanOldOfficeRegKeys();
89 sal_Bool showOnlineUpdatePage();
90 ::svt::RoadmapWizardTypes::PathId defineWizardPagesDependingFromContext();
92 protected:
93 // from svt::WizardMachine
94 virtual TabPage* createPage(WizardState _nState);
95 virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
96 virtual sal_Bool leaveState(WizardState _nState );
97 virtual sal_Bool onFinish(sal_Int32 _nResult);
98 virtual void enterState(WizardState _nState);
100 // from svt::RoadmapWizard
101 virtual String getStateDisplayName( WizardState _nState ) const;
104 #endif