summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/app/AppController.cxx16
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/sdb/application/MacroMigrationWizard.idl43
3 files changed, 46 insertions, 14 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 2a41aa082998..0c9ca0e5ec24 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -44,6 +44,7 @@
#include <com/sun/star/sdbcx/XRename.hpp>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
+#include <com/sun/star/sdb/application/MacroMigrationWizard.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/util/XFlushable.hpp>
@@ -3008,20 +3009,7 @@ void OApplicationController::impl_migrateScripts_nothrow()
{
try
{
- OUString sDialogService("com.sun.star.sdb.application.MacroMigrationWizard");
- Reference<XComponentContext> aContext( getORB() );
- Sequence< Any > aDialogArgs(1);
- aDialogArgs[0] <<= Reference< XOfficeDatabaseDocument >( m_xModel, UNO_QUERY_THROW );
- Reference< XExecutableDialog > xDialog(
- aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sDialogService, aDialogArgs, aContext),
- UNO_QUERY );
-
- if ( !xDialog.is() )
- {
- ShowServiceNotAvailableError( getView(), sDialogService, true );
- return;
- }
-
+ Reference< XExecutableDialog > xDialog = css::sdb::application::MacroMigrationWizard::createWithDocument( getORB(), Reference< XOfficeDatabaseDocument >( m_xModel, UNO_QUERY_THROW ) );
xDialog->execute();
}
catch( const Exception& )
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 45e2766dd321..a6f899757e33 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -297,6 +297,7 @@ $(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb,\
))
$(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdb/application,\
CopyTableWizard \
+ MacroMigrationWizard \
))
$(eval $(call gb_ZipUnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sdbc,\
ConnectionPool \
diff --git a/offapi/com/sun/star/sdb/application/MacroMigrationWizard.idl b/offapi/com/sun/star/sdb/application/MacroMigrationWizard.idl
new file mode 100644
index 000000000000..015afe4867e2
--- /dev/null
+++ b/offapi/com/sun/star/sdb/application/MacroMigrationWizard.idl
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_sdb_application_MacroMigrationWizard_idl__
+#define __com_sun_star_sdb_application_MacroMigrationWizard_idl__
+
+#include <com/sun/star/ui/dialogs/XExecutableDialog.idl>
+#include <com/sun/star/sdb/XOfficeDatabaseDocument.idl>
+
+module com { module sun { module star { module sdb { module application {
+
+
+/**
+ @since LibreOffice 4.1
+ */
+service MacroMigrationWizard : com::sun::star::ui::dialogs::XExecutableDialog
+{
+ createWithDocument([in] com::sun::star::sdb::XOfficeDatabaseDocument Document);
+};
+
+
+}; }; }; }; };
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */