diff options
author | Noel Grandin <noel@peralex.com> | 2012-12-12 17:18:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2012-12-21 09:12:09 +0200 |
commit | 6e5cb64670936ec86067c48b96e6b51715b6f18c (patch) | |
tree | ef7c622316248b87b8011c0867983c9a204ae956 /reportdesign | |
parent | Fix published/unpublished discrepancy in IDL (diff) | |
download | core-6e5cb64670936ec86067c48b96e6b51715b6f18c.tar.gz core-6e5cb64670936ec86067c48b96e6b51715b6f18c.zip |
fdo#46808, Adapt sdb::FilterDialog UNO service to new style
The service already existed, it just did not have an IDL file.
Change-Id: I2267bec182ad1cc8f6a37939861a7368a17fcef2
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index fa74b0922b0c..bd0bbca024e9 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -47,6 +47,7 @@ #include <com/sun/star/script/Converter.hpp> #include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp> #include <com/sun/star/sdb/CommandType.hpp> +#include <com/sun/star/sdb/FilterDialog.hpp> #include <com/sun/star/sdb/SQLContext.hpp> #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/util/SearchOptions.hpp> @@ -1594,22 +1595,12 @@ bool GeometryHandler::impl_dialogFilter_nothrow( ::rtl::OUString& _out_rSelected return false; // create the dialog - uno::Reference< ui::dialogs::XExecutableDialog > xDialog(xFactory->createInstanceWithContext(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.FilterDialog")),m_xContext),uno::UNO_QUERY); - if ( !xDialog.is() ) - { - Window* pInspectorWindow = VCLUnoHelper::GetWindow( xInspectorWindow ); - ShowServiceNotAvailableError( pInspectorWindow, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.FilterDialog")), sal_True ); - return false; - } + uno::Reference< ui::dialogs::XExecutableDialog > xDialog = sdb::FilterDialog::createWithQuery(m_xContext, xComposer, m_xRowSet, xInspectorWindow); const String aGcc3WorkaroundTemporary( ModuleRes(RID_STR_FILTER)); const ::rtl::OUString sPropertyUIName( aGcc3WorkaroundTemporary ); // initialize the dialog - uno::Reference< beans::XPropertySet > xDialogProps( xDialog, uno::UNO_QUERY_THROW ); - xDialogProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "QueryComposer" ) ), uno::makeAny( xComposer ) ); - xDialogProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RowSet" ) ), uno::makeAny( m_xRowSet ) ); - xDialogProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ParentWindow" ) ), uno::makeAny( xInspectorWindow ) ); - xDialogProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), uno::makeAny( sPropertyUIName ) ); + xDialog->setTitle( sPropertyUIName ); _rClearBeforeDialog.clear(); bSuccess = ( xDialog->execute() != 0 ); |