diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-29 14:59:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-03 10:00:00 +0200 |
commit | 0f627e06c93e85de02a69a225b66be430bcbea36 (patch) | |
tree | fb960a7b2378e07c96a286661bc958637142d9eb /svx | |
parent | 30dd9b2ff564e90a415603694b07b6c43491787c (diff) |
fdo#46808, Convert form::TabOrderDialog service to new style
The service already existed, it just needed an IDL file.
Change-Id: I10219da7292db5e746a89028ddc4fabb069ac388
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 1a38d5018beb..854d8f1d41a3 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -60,6 +60,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/form/ListSourceType.hpp> +#include <com/sun/star/form/TabOrderDialog.hpp> #include <com/sun/star/form/XBoundComponent.hpp> #include <com/sun/star/form/XBoundControl.hpp> #include <com/sun/star/form/XGrid.hpp> @@ -1472,35 +1473,16 @@ void FmXFormShell::ExecuteTabOrderDialog( const Reference< XTabControllerModel > try { - Sequence< Any > aDialogArgs( 3 ); - aDialogArgs[0] <<= NamedValue( - OUString( "TabbingModel" ), - makeAny( _rxForForm ) - ); - aDialogArgs[1] <<= NamedValue( - OUString( "ControlContext" ), - makeAny( getControlContainerForView() ) - ); - Reference< XWindow > xParentWindow; if ( m_pShell->GetViewShell() && m_pShell->GetViewShell()->GetViewFrame() ) xParentWindow = VCLUnoHelper::GetInterface ( &m_pShell->GetViewShell()->GetViewFrame()->GetWindow() ); - aDialogArgs[2] <<= NamedValue( - OUString( "ParentWindow" ), - makeAny( xParentWindow ) - ); - Reference< dialogs::XExecutableDialog > xDialog( - ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( - OUString( "com.sun.star.form.ui.TabOrderDialog" ), - aDialogArgs - ), - UNO_QUERY - ); - OSL_ENSURE( xDialog.is(), "FmXFormShell::ExecuteTabOrderDialog: could not create the dialog!" ); + Reference< dialogs::XExecutableDialog > xDialog = form::TabOrderDialog::createWithModel( + comphelper::getProcessComponentContext(), + _rxForForm, getControlContainerForView(), xParentWindow + ); - if ( xDialog.is() ) - xDialog->execute(); + xDialog->execute(); } catch( const Exception& ) { |