From 19854e653be1dc01f5b655fca851a6e3a651a940 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Dec 2012 14:15:55 +0200 Subject: fdo#46808, Adapt sdb::ErrorMessageDialog UNO service to new style Change-Id: Iaf12324e6aa64b268555b0f4c82f04f4c0f6f123 --- extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 2 +- extensions/source/propctrlr/formcomponenthandler.cxx | 4 ++-- extensions/source/propctrlr/formlinkdialog.cxx | 10 +++++----- extensions/source/propctrlr/formlinkdialog.hxx | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'extensions') diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx index a8ae66f4bfd1..a675117b6f5a 100644 --- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx +++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx @@ -105,7 +105,7 @@ namespace pcr //-------------------------------------------------------------------------- Dialog* MasterDetailLinkDialog::createDialog(Window* _pParent) { - return new FormLinkDialog(_pParent,m_xDetail,m_xMaster,m_aContext.getLegacyServiceFactory() + return new FormLinkDialog(_pParent,m_xDetail,m_xMaster,m_aContext.getUNOContext() ,m_sExplanation,m_sDetailLabel,m_sMasterLabel); } //--------------------------------------------------------------------- diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 350483c974b6..badf4077248b 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -2386,7 +2386,7 @@ namespace pcr //------------------------------------------------------------------------ void FormComponentPropertyHandler::impl_displaySQLError_nothrow( const ::dbtools::SQLExceptionInfo& _rErrorDescriptor ) const { - ::dbtools::showError( _rErrorDescriptor, VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ), m_aContext.getLegacyServiceFactory() ); + ::dbtools::showError( _rErrorDescriptor, VCLUnoHelper::GetInterface( impl_getDefaultDialogParent_nothrow() ), m_aContext.getUNOContext() ); } //------------------------------------------------------------------------ @@ -2682,7 +2682,7 @@ namespace pcr return false; - FormLinkDialog aDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_aContext.getLegacyServiceFactory() ); + FormLinkDialog aDialog( impl_getDefaultDialogParent_nothrow(), m_xComponent, xMasterProp, m_aContext.getUNOContext() ); _rClearBeforeDialog.clear(); return ( RET_OK == aDialog.Execute() ); } diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index fadcc0afd107..d38b2475e50f 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -148,7 +148,7 @@ namespace pcr //======================================================================== //------------------------------------------------------------------------ FormLinkDialog::FormLinkDialog( Window* _pParent, const Reference< XPropertySet >& _rxDetailForm, - const Reference< XPropertySet >& _rxMasterForm, const Reference< XMultiServiceFactory >& _rxORB, + const Reference< XPropertySet >& _rxMasterForm, const Reference< XComponentContext >& _rxContext, const ::rtl::OUString& _sExplanation, const ::rtl::OUString& _sDetailLabel, const ::rtl::OUString& _sMasterLabel) @@ -164,7 +164,7 @@ namespace pcr ,m_aCancel ( this, PcrRes( PB_CANCEL ) ) ,m_aHelp ( this, PcrRes( PB_HELP ) ) ,m_aSuggest ( this, PcrRes( PB_SUGGEST ) ) - ,m_xORB ( _rxORB ) + ,m_xContext ( _rxContext ) ,m_xDetailForm( _rxDetailForm ) ,m_xMasterForm( _rxMasterForm ) ,m_sDetailLabel(_sDetailLabel) @@ -436,7 +436,7 @@ namespace pcr SQLContext aContext; aContext.Message = sErrorMessage; aContext.NextException = aErrorInfo.get(); - ::dbtools::showError( aContext, VCLUnoHelper::GetInterface( const_cast< FormLinkDialog* >( this ) ), m_xORB ); + ::dbtools::showError( aContext, VCLUnoHelper::GetInterface( const_cast< FormLinkDialog* >( this ) ), m_xContext ); } } @@ -450,7 +450,7 @@ namespace pcr _rxConnection.set(_rxFormProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); if ( !_rxConnection.is() ) - _rxConnection = ::dbtools::connectRowset( Reference< XRowSet >( _rxFormProps, UNO_QUERY ), comphelper::getComponentContext(m_xORB), sal_True ); + _rxConnection = ::dbtools::connectRowset( Reference< XRowSet >( _rxFormProps, UNO_QUERY ), m_xContext, sal_True ); } //------------------------------------------------------------------------ @@ -472,7 +472,7 @@ namespace pcr Reference< XPropertySet > xTable; try { - Reference< XTablesSupplier > xTablesInForm( ::dbtools::getCurrentSettingsComposer( _rxFormProps, comphelper::getComponentContext(m_xORB) ), UNO_QUERY ); + Reference< XTablesSupplier > xTablesInForm( ::dbtools::getCurrentSettingsComposer( _rxFormProps, m_xContext ), UNO_QUERY ); Reference< XNameAccess > xTables; if ( xTablesInForm.is() ) xTables = xTablesInForm->getTables(); diff --git a/extensions/source/propctrlr/formlinkdialog.hxx b/extensions/source/propctrlr/formlinkdialog.hxx index 08093ad60a11..7c859fc01cdf 100644 --- a/extensions/source/propctrlr/formlinkdialog.hxx +++ b/extensions/source/propctrlr/formlinkdialog.hxx @@ -57,8 +57,8 @@ namespace pcr HelpButton m_aHelp; PushButton m_aSuggest; - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > - m_xORB; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xDetailForm; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > @@ -77,7 +77,7 @@ namespace pcr Window* _pParent, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDetailForm, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxMasterForm, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, const ::rtl::OUString& _sExplanation = ::rtl::OUString(), const ::rtl::OUString& _sDetailLabel = ::rtl::OUString(), const ::rtl::OUString& _sMasterLabel = ::rtl::OUString() -- cgit