summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-12-06 14:15:55 +0200
committerNoel Grandin <noel@peralex.com>2012-12-06 14:16:44 +0200
commit19854e653be1dc01f5b655fca851a6e3a651a940 (patch)
treef19e921125d72db2c132742d3d0a2ea0c66cff79 /forms
parent8909b2c384154baa2174aa53b433b12b02871e75 (diff)
fdo#46808, Adapt sdb::ErrorMessageDialog UNO service to new style
Change-Id: Iaf12324e6aa64b268555b0f4c82f04f4c0f6f123
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Filter.cxx17
1 files changed, 3 insertions, 14 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 6d92e77df421..b8a1d1f14f9e 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/sdb/BooleanComparisonMode.hpp>
+#include <com/sun/star/sdb/ErrorMessageDialog.hpp>
#include <com/sun/star/sdb/XColumn.hpp>
#include <com/sun/star/sdb/XSQLQueryComposerFactory.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -742,20 +743,8 @@ namespace frm
{
try
{
- Sequence< Any > aArgs(2);
- aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SQLException") ), 0, makeAny( _rExcept ), PropertyState_DIRECT_VALUE);
- aArgs[1] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow") ), 0, makeAny( m_xMessageParent ), PropertyState_DIRECT_VALUE);
-
- static ::rtl::OUString s_sDialogServiceName (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ErrorMessageDialog") );
-
- Reference< XExecutableDialog > xErrorDialog( maContext.createComponentWithArguments( s_sDialogServiceName, aArgs ), UNO_QUERY );
- if ( xErrorDialog.is() )
- xErrorDialog->execute();
- else
- {
- Window* pMessageParent = VCLUnoHelper::GetWindow( m_xMessageParent );
- ShowServiceNotAvailableError( pMessageParent, s_sDialogServiceName, sal_True );
- }
+ Reference< XExecutableDialog > xErrorDialog = ErrorMessageDialog::create( maContext.getUNOContext(), "", m_xMessageParent, makeAny(_rExcept));
+ xErrorDialog->execute();
}
catch( const Exception& )
{