diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-18 10:06:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-11 08:02:12 +0200 |
commit | b5cd8f9186c023124b25706f65e7608b68c426bd (patch) | |
tree | 16ea52a226311052fc76ad97a4b3163bf8569e08 /svx | |
parent | bed621572c397c7a2c6dac934801c947e45c83da (diff) |
fdo#46808, Adapt form::control::FilterControl UNO service to new style
The service already existed, it just did not have an IDL file
Change-Id: I1ca7ab09491057c1e9c91b5bb6763b84be10b47b
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/formcontroller.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 2e2aa6f0950e..8de569787d1b 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/form/XGridControl.hpp> #include <com/sun/star/form/XLoadable.hpp> #include <com/sun/star/form/XReset.hpp> +#include <com/sun/star/form/control/FilterControl.hpp> #include <com/sun/star/frame/XController.hpp> #include <com/sun/star/sdb/ParametersRequest.hpp> #include <com/sun/star/sdb/RowChangeAction.hpp> @@ -3377,15 +3378,11 @@ void FormController::startFiltering() ) { // create a filter control - Sequence< Any > aCreationArgs( 3 ); - aCreationArgs[ 0 ] <<= NamedValue( ::rtl::OUString("MessageParent"), makeAny( VCLUnoHelper::GetInterface( getDialogParentWindow() ) ) ); - aCreationArgs[ 1 ] <<= NamedValue( ::rtl::OUString("NumberFormatter"), makeAny( xFormatter ) ); - aCreationArgs[ 2 ] <<= NamedValue( ::rtl::OUString("ControlModel"), makeAny( xModel ) ); - Reference< XControl > xFilterControl( - m_aContext.createComponentWithArguments( "com.sun.star.form.control.FilterControl", aCreationArgs ), - UNO_QUERY - ); - DBG_ASSERT( xFilterControl.is(), "FormController::startFiltering: could not create a filter control!" ); + Reference< XControl > xFilterControl = form::control::FilterControl::createWithFormat( + m_aContext.getUNOContext(), + VCLUnoHelper::GetInterface( getDialogParentWindow() ), + xFormatter, + xModel); if ( replaceControl( xControl, xFilterControl ) ) { |