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 INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_MIGRATIONENGINE_HXX
21 #define INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_MIGRATIONENGINE_HXX
23 #include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
30 class IMigrationProgress
;
34 class MigrationEngine_Impl
;
38 /** creates the migration engine
40 the document whose macros/scripts should be migrated
42 a callback for notifying progress. Beware of lifetimes here: The progress callback,
43 passed herein as reference, must live as long as the engine instance lives.
46 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rContext
,
47 const ::com::sun::star::uno::Reference
< ::com::sun::star::sdb::XOfficeDatabaseDocument
>& _rxDocument
,
48 IMigrationProgress
& _rProgress
,
49 MigrationLog
& _rLogger
54 sal_Int32
getFormCount() const;
55 sal_Int32
getReportCount() const;
57 /** starts migrating the scripts and macros in the forms/reports to the database
60 This process cannot be cancelled, as it would leave the document in an inconsistent
63 When the function returns, then the migration is finished.
66 whether or not the migration was successful. If it wasn't, then an error has been reported
67 to the user, using the document's interaction handler. If no such interaction handler
68 was present, then the error has been silenced.
73 ::std::unique_ptr
< MigrationEngine_Impl
> m_pImpl
;
78 #endif // INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_MIGRATIONENGINE_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */