1*2e2212a7SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2e2212a7SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2e2212a7SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2e2212a7SAndrew Rist * distributed with this work for additional information 6*2e2212a7SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2e2212a7SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2e2212a7SAndrew Rist * "License"); you may not use this file except in compliance 9*2e2212a7SAndrew Rist * with the License. You may obtain a copy of the License at 10*2e2212a7SAndrew Rist * 11*2e2212a7SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*2e2212a7SAndrew Rist * 13*2e2212a7SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2e2212a7SAndrew Rist * software distributed under the License is distributed on an 15*2e2212a7SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2e2212a7SAndrew Rist * KIND, either express or implied. See the License for the 17*2e2212a7SAndrew Rist * specific language governing permissions and limitations 18*2e2212a7SAndrew Rist * under the License. 19*2e2212a7SAndrew Rist * 20*2e2212a7SAndrew Rist *************************************************************/ 21*2e2212a7SAndrew Rist 22*2e2212a7SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef DBACCESS_MACROMIGRATIONPAGES_HXX 25cdf0e10cSrcweir #define DBACCESS_MACROMIGRATIONPAGES_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "migrationprogress.hxx" 28cdf0e10cSrcweir #include "rangeprogressbar.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir #include <svtools/svmedit.hxx> 31cdf0e10cSrcweir #include <svtools/urlcontrol.hxx> 32cdf0e10cSrcweir #include <svtools/wizardmachine.hxx> 33cdf0e10cSrcweir #include <svx/databaselocationinput.hxx> 34cdf0e10cSrcweir #include <vcl/fixed.hxx> 35cdf0e10cSrcweir #include <vcl/edit.hxx> 36cdf0e10cSrcweir 37cdf0e10cSrcweir namespace svt 38cdf0e10cSrcweir { 39cdf0e10cSrcweir class RoadmapWizard; 40cdf0e10cSrcweir } 41cdf0e10cSrcweir 42cdf0e10cSrcweir //........................................................................ 43cdf0e10cSrcweir namespace dbmm 44cdf0e10cSrcweir { 45cdf0e10cSrcweir //........................................................................ 46cdf0e10cSrcweir 47cdf0e10cSrcweir class MacroMigrationDialog; 48cdf0e10cSrcweir 49cdf0e10cSrcweir //==================================================================== 50cdf0e10cSrcweir //= MacroMigrationPage 51cdf0e10cSrcweir //==================================================================== 52cdf0e10cSrcweir typedef ::svt::OWizardPage MacroMigrationPage_Base; 53cdf0e10cSrcweir class MacroMigrationPage : public MacroMigrationPage_Base 54cdf0e10cSrcweir { 55cdf0e10cSrcweir public: 56cdf0e10cSrcweir MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes ); 57cdf0e10cSrcweir ~MacroMigrationPage(); 58cdf0e10cSrcweir 59cdf0e10cSrcweir protected: 60cdf0e10cSrcweir const MacroMigrationDialog& getDialog() const; 61cdf0e10cSrcweir MacroMigrationDialog& getDialog() ; 62cdf0e10cSrcweir 63cdf0e10cSrcweir protected: 64cdf0e10cSrcweir FixedText m_aHeader; 65cdf0e10cSrcweir }; 66cdf0e10cSrcweir 67cdf0e10cSrcweir //==================================================================== 68cdf0e10cSrcweir //= PreparationPage 69cdf0e10cSrcweir //==================================================================== 70cdf0e10cSrcweir class PreparationPage : public MacroMigrationPage 71cdf0e10cSrcweir { 72cdf0e10cSrcweir public: 73cdf0e10cSrcweir PreparationPage( MacroMigrationDialog& _rParentDialog ); 74cdf0e10cSrcweir 75cdf0e10cSrcweir static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog ); 76cdf0e10cSrcweir 77cdf0e10cSrcweir public: 78cdf0e10cSrcweir void showCloseDocsError( bool _bShow ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir protected: 81cdf0e10cSrcweir FixedText m_aIntroduction; 82cdf0e10cSrcweir FixedText m_aCloseDocError; 83cdf0e10cSrcweir }; 84cdf0e10cSrcweir 85cdf0e10cSrcweir //==================================================================== 86cdf0e10cSrcweir //= SaveDBDocPage 87cdf0e10cSrcweir //==================================================================== 88cdf0e10cSrcweir class SaveDBDocPage : public MacroMigrationPage 89cdf0e10cSrcweir { 90cdf0e10cSrcweir public: 91cdf0e10cSrcweir SaveDBDocPage( MacroMigrationDialog& _rParentDialog ); 92cdf0e10cSrcweir static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog ); 93cdf0e10cSrcweir 94cdf0e10cSrcweir public: getBackupLocation() const95cdf0e10cSrcweir ::rtl::OUString getBackupLocation() const { return m_aLocationController.getURL(); } grabLocationFocus()96cdf0e10cSrcweir void grabLocationFocus() { m_aSaveAsLocation.GrabFocus(); } 97cdf0e10cSrcweir 98cdf0e10cSrcweir protected: 99cdf0e10cSrcweir FixedText m_aExplanation; 100cdf0e10cSrcweir FixedText m_aSaveAsLabel; 101cdf0e10cSrcweir ::svt::OFileURLControl m_aSaveAsLocation; 102cdf0e10cSrcweir PushButton m_aBrowseSaveAsLocation; 103cdf0e10cSrcweir FixedText m_aStartMigration; 104cdf0e10cSrcweir ::svx::DatabaseLocationInputController 105cdf0e10cSrcweir m_aLocationController; 106cdf0e10cSrcweir 107cdf0e10cSrcweir protected: 108cdf0e10cSrcweir // IWizardPageController overridables 109cdf0e10cSrcweir virtual void initializePage(); 110cdf0e10cSrcweir virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); 111cdf0e10cSrcweir virtual bool canAdvance() const; 112cdf0e10cSrcweir 113cdf0e10cSrcweir private: 114cdf0e10cSrcweir DECL_LINK( OnLocationModified, Edit* ); 115cdf0e10cSrcweir void impl_updateLocationDependentItems(); 116cdf0e10cSrcweir }; 117cdf0e10cSrcweir 118cdf0e10cSrcweir //==================================================================== 119cdf0e10cSrcweir //= ProgressPage 120cdf0e10cSrcweir //==================================================================== 121cdf0e10cSrcweir class ProgressPage : public MacroMigrationPage, public IMigrationProgress 122cdf0e10cSrcweir { 123cdf0e10cSrcweir public: 124cdf0e10cSrcweir ProgressPage( MacroMigrationDialog& _rParentDialog ); 125cdf0e10cSrcweir 126cdf0e10cSrcweir static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog ); 127cdf0e10cSrcweir 128cdf0e10cSrcweir void setDocumentCounts( const sal_Int32 _nForms, const sal_Int32 _nReports ); 129cdf0e10cSrcweir void onFinishedSuccessfully(); 130cdf0e10cSrcweir 131cdf0e10cSrcweir protected: 132cdf0e10cSrcweir // IMigrationProgress 133cdf0e10cSrcweir virtual void startObject( const ::rtl::OUString& _rObjectName, const ::rtl::OUString& _rCurrentAction, const sal_uInt32 _bRange ); 134cdf0e10cSrcweir virtual void setObjectProgressText( const ::rtl::OUString& _rText ); 135cdf0e10cSrcweir virtual void setObjectProgressValue( const sal_uInt32 _nValue ); 136cdf0e10cSrcweir virtual void endObject(); 137cdf0e10cSrcweir virtual void start( const sal_uInt32 _nOverallRange ); 138cdf0e10cSrcweir virtual void setOverallProgressText( const ::rtl::OUString& _rText ); 139cdf0e10cSrcweir virtual void setOverallProgressValue( const sal_uInt32 _nValue ); 140cdf0e10cSrcweir 141cdf0e10cSrcweir private: 142cdf0e10cSrcweir FixedText m_aObjectCount; 143cdf0e10cSrcweir FixedText m_aCurrentObjectLabel; 144cdf0e10cSrcweir FixedText m_aCurrentObject; 145cdf0e10cSrcweir FixedText m_aCurrentActionLabel; 146cdf0e10cSrcweir FixedText m_aCurrentAction; 147cdf0e10cSrcweir RangeProgressBar m_aCurrentProgress; 148cdf0e10cSrcweir FixedText m_aAllProgressLabel; 149cdf0e10cSrcweir FixedText m_aAllProgressText; 150cdf0e10cSrcweir RangeProgressBar m_aAllProgress; 151cdf0e10cSrcweir FixedText m_aMigrationDone; 152cdf0e10cSrcweir }; 153cdf0e10cSrcweir 154cdf0e10cSrcweir //==================================================================== 155cdf0e10cSrcweir //= ResultPage 156cdf0e10cSrcweir //==================================================================== 157cdf0e10cSrcweir class ResultPage : public MacroMigrationPage 158cdf0e10cSrcweir { 159cdf0e10cSrcweir public: 160cdf0e10cSrcweir ResultPage( MacroMigrationDialog& _rParentDialog ); 161cdf0e10cSrcweir 162cdf0e10cSrcweir static TabPage* Create( ::svt::RoadmapWizard& _rParentDialog ); 163cdf0e10cSrcweir 164cdf0e10cSrcweir void displayMigrationLog( const bool _bSuccessful, const String& _rLog ); 165cdf0e10cSrcweir 166cdf0e10cSrcweir private: 167cdf0e10cSrcweir FixedText m_aChangesLabel; 168cdf0e10cSrcweir MultiLineEdit m_aChanges; 169cdf0e10cSrcweir String m_aSuccessful; 170cdf0e10cSrcweir String m_aUnsuccessful; 171cdf0e10cSrcweir }; 172cdf0e10cSrcweir 173cdf0e10cSrcweir //........................................................................ 174cdf0e10cSrcweir } // namespace dbmm 175cdf0e10cSrcweir //........................................................................ 176cdf0e10cSrcweir 177cdf0e10cSrcweir #endif // DBACCESS_MACROMIGRATIONPAGES_HXX 178