1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: migrationengine.hxx,v $
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_MIGRATIONENGINE_HXX
32 #define DBACCESS_MIGRATIONENGINE_HXX
34 /** === begin UNO includes === **/
35 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
36 /** === end UNO includes === **/
38 #include <comphelper/componentcontext.hxx>
42 namespace comphelper
{
43 class ComponentContext
;
46 //........................................................................
49 //........................................................................
51 class IMigrationProgress
;
54 //====================================================================
56 //====================================================================
57 class MigrationEngine_Impl
;
61 /** creates the migration engine
63 the document whose macros/scripts should be migrated
65 a callback for notifying progress. Beware of lifetimes here: The progress callback,
66 passed herein as reference, must live as long as the engine instance lives.
69 const ::comphelper::ComponentContext
& _rContext
,
70 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::XOfficeDatabaseDocument
>& _rxDocument
,
71 IMigrationProgress
& _rProgress
,
72 MigrationLog
& _rLogger
77 sal_Int32
getFormCount() const;
78 sal_Int32
getReportCount() const;
80 /** starts migrating the scripts and macros in the forms/reports to the database
83 This process cannot be cancelled, as it would leave the document in an inconsistent
86 When the function returns, then the migration is finished.
89 whether or not the migration was successful. If it wasn't, then an error has been reported
90 to the user, using the document's interaction handler. If no such interaction handler
91 was present, then the error has been silenced.
96 ::std::auto_ptr
< MigrationEngine_Impl
> m_pImpl
;
99 //........................................................................
101 //........................................................................
103 #endif // DBACCESS_MIGRATIONENGINE_HXX