Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef DBACCESS_MACROMIGRATIONPAGES_HXX
21 : : #define DBACCESS_MACROMIGRATIONPAGES_HXX
22 : :
23 : : #include "migrationprogress.hxx"
24 : : #include "rangeprogressbar.hxx"
25 : :
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>
32 : :
33 : : namespace svt
34 : : {
35 : : class RoadmapWizard;
36 : : }
37 : :
38 : : //........................................................................
39 : : namespace dbmm
40 : : {
41 : : //........................................................................
42 : :
43 : : class MacroMigrationDialog;
44 : :
45 : : //====================================================================
46 : : //= MacroMigrationPage
47 : : //====================================================================
48 : : typedef ::svt::OWizardPage MacroMigrationPage_Base;
49 : : class MacroMigrationPage : public MacroMigrationPage_Base
50 : : {
51 : : public:
52 : : MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes );
53 : : ~MacroMigrationPage();
54 : :
55 : : protected:
56 : : const MacroMigrationDialog& getDialog() const;
57 : : MacroMigrationDialog& getDialog() ;
58 : :
59 : : protected:
60 : : FixedText m_aHeader;
61 : : };
62 : :
63 : : //====================================================================
64 : : //= PreparationPage
65 : : //====================================================================
66 : 0 : class PreparationPage : public MacroMigrationPage
67 : : {
68 : : public:
69 : : PreparationPage( MacroMigrationDialog& _rParentDialog );
70 : :
71 : : static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
72 : :
73 : : public:
74 : : void showCloseDocsError( bool _bShow );
75 : :
76 : : protected:
77 : : FixedText m_aIntroduction;
78 : : FixedText m_aCloseDocError;
79 : : };
80 : :
81 : : //====================================================================
82 : : //= SaveDBDocPage
83 : : //====================================================================
84 : 0 : class SaveDBDocPage : public MacroMigrationPage
85 : : {
86 : : public:
87 : : SaveDBDocPage( MacroMigrationDialog& _rParentDialog );
88 : : static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
89 : :
90 : : public:
91 : 0 : ::rtl::OUString getBackupLocation() const { return m_aLocationController.getURL(); }
92 : 0 : void grabLocationFocus() { m_aSaveAsLocation.GrabFocus(); }
93 : :
94 : : protected:
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;
102 : :
103 : : protected:
104 : : // IWizardPageController overridables
105 : : virtual void initializePage();
106 : : virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason );
107 : : virtual bool canAdvance() const;
108 : :
109 : : private:
110 : : DECL_LINK( OnLocationModified, Edit* );
111 : : void impl_updateLocationDependentItems();
112 : : };
113 : :
114 : : //====================================================================
115 : : //= ProgressPage
116 : : //====================================================================
117 : 0 : class ProgressPage : public MacroMigrationPage, public IMigrationProgress
118 : : {
119 : : public:
120 : : ProgressPage( MacroMigrationDialog& _rParentDialog );
121 : :
122 : : static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
123 : :
124 : : void setDocumentCounts( const sal_Int32 _nForms, const sal_Int32 _nReports );
125 : : void onFinishedSuccessfully();
126 : :
127 : : protected:
128 : : // IMigrationProgress
129 : : virtual void startObject( const ::rtl::OUString& _rObjectName, const ::rtl::OUString& _rCurrentAction, const sal_uInt32 _bRange );
130 : : virtual void setObjectProgressText( const ::rtl::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 ::rtl::OUString& _rText );
135 : : virtual void setOverallProgressValue( const sal_uInt32 _nValue );
136 : :
137 : : private:
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;
148 : : };
149 : :
150 : : //====================================================================
151 : : //= ResultPage
152 : : //====================================================================
153 : 0 : class ResultPage : public MacroMigrationPage
154 : : {
155 : : public:
156 : : ResultPage( MacroMigrationDialog& _rParentDialog );
157 : :
158 : : static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog );
159 : :
160 : : void displayMigrationLog( const bool _bSuccessful, const String& _rLog );
161 : :
162 : : private:
163 : : FixedText m_aChangesLabel;
164 : : MultiLineEdit m_aChanges;
165 : : String m_aSuccessful;
166 : : String m_aUnsuccessful;
167 : : };
168 : :
169 : : //........................................................................
170 : : } // namespace dbmm
171 : : //........................................................................
172 : :
173 : : #endif // DBACCESS_MACROMIGRATIONPAGES_HXX
174 : :
175 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|