update dev300-m58
[ooovba.git] / dbaccess / source / ext / macromigration / macromigrationpages.hxx
blob0a70637275b739b90112b582017e9d062f5263d4
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: macromigrationpages.hxx,v $
10 * $Revision: 1.3.2.3 $
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 DBACCESS_MACROMIGRATIONPAGES_HXX
32 #define DBACCESS_MACROMIGRATIONPAGES_HXX
34 #include "migrationprogress.hxx"
35 #include "rangeprogressbar.hxx"
37 #include <svtools/svmedit.hxx>
38 #include <svtools/urlcontrol.hxx>
39 #include <svtools/wizardmachine.hxx>
40 #include <svx/databaselocationinput.hxx>
41 #include <vcl/fixed.hxx>
42 #include <vcl/edit.hxx>
44 namespace svt
46 class RoadmapWizard;
49 //........................................................................
50 namespace dbmm
52 //........................................................................
54 class MacroMigrationDialog;
56 //====================================================================
57 //= MacroMigrationPage
58 //====================================================================
59 typedef ::svt::OWizardPage MacroMigrationPage_Base;
60 class MacroMigrationPage : public MacroMigrationPage_Base
62 public:
63 MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes );
64 ~MacroMigrationPage();
66 protected:
67 const MacroMigrationDialog& getDialog() const;
68 MacroMigrationDialog& getDialog() ;
70 protected:
71 FixedText m_aHeader;
74 //====================================================================
75 //= PreparationPage
76 //====================================================================
77 class PreparationPage : public MacroMigrationPage
79 public:
80 PreparationPage( MacroMigrationDialog& _rParentDialog );
82 static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
84 public:
85 void showCloseDocsError( bool _bShow );
87 protected:
88 FixedText m_aIntroduction;
89 FixedText m_aCloseDocError;
92 //====================================================================
93 //= SaveDBDocPage
94 //====================================================================
95 class SaveDBDocPage : public MacroMigrationPage
97 public:
98 SaveDBDocPage( MacroMigrationDialog& _rParentDialog );
99 static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
101 public:
102 ::rtl::OUString getBackupLocation() const { return m_aLocationController.getURL(); }
103 void grabLocationFocus() { m_aSaveAsLocation.GrabFocus(); }
105 protected:
106 FixedText m_aExplanation;
107 FixedText m_aSaveAsLabel;
108 ::svt::OFileURLControl m_aSaveAsLocation;
109 PushButton m_aBrowseSaveAsLocation;
110 FixedText m_aStartMigration;
111 ::svx::DatabaseLocationInputController
112 m_aLocationController;
114 protected:
115 // OWizardPage overridables
116 virtual void initializePage();
117 virtual bool canAdvance() const;
118 // IWizardPage overridables
119 virtual sal_Bool commitPage( CommitPageReason _eReason );
121 private:
122 DECL_LINK( OnLocationModified, Edit* );
123 void impl_updateLocationDependentItems();
126 //====================================================================
127 //= ProgressPage
128 //====================================================================
129 class ProgressPage : public MacroMigrationPage, public IMigrationProgress
131 public:
132 ProgressPage( MacroMigrationDialog& _rParentDialog );
134 static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
136 void setDocumentCounts( const sal_Int32 _nForms, const sal_Int32 _nReports );
137 void onFinishedSuccessfully();
139 protected:
140 // IMigrationProgress
141 virtual void startObject( const ::rtl::OUString& _rObjectName, const ::rtl::OUString& _rCurrentAction, const sal_uInt32 _bRange );
142 virtual void setObjectProgressText( const ::rtl::OUString& _rText );
143 virtual void setObjectProgressValue( const sal_uInt32 _nValue );
144 virtual void endObject();
145 virtual void start( const sal_uInt32 _nOverallRange );
146 virtual void setOverallProgressText( const ::rtl::OUString& _rText );
147 virtual void setOverallProgressValue( const sal_uInt32 _nValue );
149 private:
150 FixedText m_aObjectCount;
151 FixedText m_aCurrentObjectLabel;
152 FixedText m_aCurrentObject;
153 FixedText m_aCurrentActionLabel;
154 FixedText m_aCurrentAction;
155 RangeProgressBar m_aCurrentProgress;
156 FixedText m_aAllProgressLabel;
157 FixedText m_aAllProgressText;
158 RangeProgressBar m_aAllProgress;
159 FixedText m_aMigrationDone;
162 //====================================================================
163 //= ResultPage
164 //====================================================================
165 class ResultPage : public MacroMigrationPage
167 public:
168 ResultPage( MacroMigrationDialog& _rParentDialog );
170 static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
172 void displayMigrationLog( const bool _bSuccessful, const String& _rLog );
174 private:
175 FixedText m_aChangesLabel;
176 MultiLineEdit m_aChanges;
177 String m_aSuccessful;
178 String m_aUnsuccessful;
181 //........................................................................
182 } // namespace dbmm
183 //........................................................................
185 #endif // DBACCESS_MACROMIGRATIONPAGES_HXX