1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef DBACCESS_MACROMIGRATIONPAGES_HXX
21 #define DBACCESS_MACROMIGRATIONPAGES_HXX
23 #include "migrationprogress.hxx"
24 #include "rangeprogressbar.hxx"
26 #include <svtools/svmedit.hxx>
27 #include <svtools/urlcontrol.hxx>
28 #include <svtools/wizardmachine.hxx>
29 #include <svx/databaselocationinput.hxx>
30 #include <vcl/fixed.hxx>
31 #include <vcl/edit.hxx>
38 //........................................................................
41 //........................................................................
43 class MacroMigrationDialog
;
45 //====================================================================
46 //= MacroMigrationPage
47 //====================================================================
48 typedef ::svt::OWizardPage MacroMigrationPage_Base
;
49 class MacroMigrationPage
: public MacroMigrationPage_Base
52 MacroMigrationPage( MacroMigrationDialog
& _rParentDialog
, const ResId
& _rRes
);
53 ~MacroMigrationPage();
56 const MacroMigrationDialog
& getDialog() const;
57 MacroMigrationDialog
& getDialog() ;
63 //====================================================================
65 //====================================================================
66 class PreparationPage
: public MacroMigrationPage
69 PreparationPage( MacroMigrationDialog
& _rParentDialog
);
71 static TabPage
* Create( ::svt::RoadmapWizard
& _rParentDialog
);
74 void showCloseDocsError( bool _bShow
);
77 FixedText m_aIntroduction
;
78 FixedText m_aCloseDocError
;
81 //====================================================================
83 //====================================================================
84 class SaveDBDocPage
: public MacroMigrationPage
87 SaveDBDocPage( MacroMigrationDialog
& _rParentDialog
);
88 static TabPage
* Create( ::svt::RoadmapWizard
& _rParentDialog
);
91 OUString
getBackupLocation() const { return m_aLocationController
.getURL(); }
92 void grabLocationFocus() { m_aSaveAsLocation
.GrabFocus(); }
95 FixedText m_aExplanation
;
96 FixedText m_aSaveAsLabel
;
97 ::svt::OFileURLControl m_aSaveAsLocation
;
98 PushButton m_aBrowseSaveAsLocation
;
99 FixedText m_aStartMigration
;
100 ::svx::DatabaseLocationInputController
101 m_aLocationController
;
104 // IWizardPageController overridables
105 virtual void initializePage();
106 virtual sal_Bool
commitPage( ::svt::WizardTypes::CommitPageReason _eReason
);
107 virtual bool canAdvance() const;
110 DECL_LINK( OnLocationModified
, Edit
* );
111 void impl_updateLocationDependentItems();
114 //====================================================================
116 //====================================================================
117 class ProgressPage
: public MacroMigrationPage
, public IMigrationProgress
120 ProgressPage( MacroMigrationDialog
& _rParentDialog
);
122 static TabPage
* Create( ::svt::RoadmapWizard
& _rParentDialog
);
124 void setDocumentCounts( const sal_Int32 _nForms
, const sal_Int32 _nReports
);
125 void onFinishedSuccessfully();
128 // IMigrationProgress
129 virtual void startObject( const OUString
& _rObjectName
, const OUString
& _rCurrentAction
, const sal_uInt32 _bRange
);
130 virtual void setObjectProgressText( const OUString
& _rText
);
131 virtual void setObjectProgressValue( const sal_uInt32 _nValue
);
132 virtual void endObject();
133 virtual void start( const sal_uInt32 _nOverallRange
);
134 virtual void setOverallProgressText( const OUString
& _rText
);
135 virtual void setOverallProgressValue( const sal_uInt32 _nValue
);
138 FixedText m_aObjectCount
;
139 FixedText m_aCurrentObjectLabel
;
140 FixedText m_aCurrentObject
;
141 FixedText m_aCurrentActionLabel
;
142 FixedText m_aCurrentAction
;
143 RangeProgressBar m_aCurrentProgress
;
144 FixedText m_aAllProgressLabel
;
145 FixedText m_aAllProgressText
;
146 RangeProgressBar m_aAllProgress
;
147 FixedText m_aMigrationDone
;
150 //====================================================================
152 //====================================================================
153 class ResultPage
: public MacroMigrationPage
156 ResultPage( MacroMigrationDialog
& _rParentDialog
);
158 static TabPage
* Create( ::svt::RoadmapWizard
& _rParentDialog
);
160 void displayMigrationLog( const bool _bSuccessful
, const OUString
& _rLog
);
163 FixedText m_aChangesLabel
;
164 MultiLineEdit m_aChanges
;
165 OUString m_aSuccessful
;
166 OUString m_aUnsuccessful
;
169 //........................................................................
171 //........................................................................
173 #endif // DBACCESS_MACROMIGRATIONPAGES_HXX
175 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */