merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ext / macromigration / macromigrationdialog.hxx
blobe3f3d100dfd79a804aaff829a78ad065cce84ed5
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: macromigrationdialog.hxx,v $
10 * $Revision: 1.3.2.1 $
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_MACROMIGRATIONDIALOG_HXX
32 #define DBACCESS_MACROMIGRATIONDIALOG_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
36 /** === end UNO includes === **/
38 #include <comphelper/componentcontext.hxx>
39 #include <svtools/roadmapwizard.hxx>
41 #include <memory>
43 //........................................................................
44 namespace dbmm
46 //........................................................................
48 //====================================================================
49 //= MacroMigrationDialog
50 //====================================================================
51 struct MacroMigrationDialog_Data;
52 typedef ::svt::RoadmapWizard MacroMigrationDialog_Base;
53 class MacroMigrationDialog : public MacroMigrationDialog_Base
55 public:
56 MacroMigrationDialog(
57 Window* _pParent,
58 const ::comphelper::ComponentContext& _rContext,
59 const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >& _rxDocument
61 virtual ~MacroMigrationDialog();
63 const ::comphelper::ComponentContext&
64 getComponentContext() const;
65 const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XOfficeDatabaseDocument >&
66 getDocument() const;
68 protected:
69 // OWizardMachine overridables
70 virtual void enterState( WizardState _nState );
71 virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
72 virtual sal_Bool leaveState( WizardState _nState );
73 virtual WizardState determineNextState( WizardState _nCurrentState ) const;
74 virtual sal_Bool onFinish( sal_Int32 _nResult );
76 // Dialog overridables
77 virtual BOOL Close();
78 virtual short Execute();
80 private:
81 void impl_showCloseDocsError( bool _bShow );
82 bool impl_closeSubDocs_nothrow();
83 bool impl_backupDocument_nothrow() const;
84 void impl_reloadDocument_nothrow( bool _bMigrationSuccess );
86 private:
87 DECL_LINK( OnStartMigration, void* );
89 private:
90 ::std::auto_ptr< MacroMigrationDialog_Data > m_pData;
93 //........................................................................
94 } // namespace dbmm
95 //........................................................................
97 #endif // DBACCESS_MACROMIGRATIONDIALOG_HXX