diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-11 17:51:56 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-03-25 10:35:04 +0200 |
commit | 5b982b69363f0f067fe4a0f679528ce1c5a2eafc (patch) | |
tree | fc78841c1af6907daca72973d780a55e3f215934 /dbaccess | |
parent | d08f360e6debc38868e84030a8ec3ed401803754 (diff) |
fdo#46808, Convert sdb::application::MacroMigrationWizard to new style
The service already existed, it just needed an IDL file
Change-Id: I8299b12ba8f5f0c00b0ff44dab641a6f19826b01
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 16 |
1 files changed, 2 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& ) |