Tag: cws_dev300_dba31c User: fs Date: 2008-09-12 18:58:47+0000 Modified: dba/dbaccess/source/ui/browser/genericcontroller.cxx
Log: needed for test cases for #i93737#: allow the various 'connect' methods to propagate the potential error to the caller, instead of immediately displaying it to the user File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: genericcontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.94.38.2&r2=1.94.38.3 Delta lines: +11 -20 --------------------- --- genericcontroller.cxx 2008-09-06 20:34:08+0000 1.94.38.2 +++ genericcontroller.cxx 2008-09-12 18:58:45+0000 1.94.38.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: genericcontroller.cxx,v $ - * $Revision: 1.94.38.2 $ + * $Revision: 1.94.38.3 $ * * This file is part of OpenOffice.org. * @@ -1098,35 +1098,26 @@ xComponent->removeEventListener(static_cast<XFrameActionListener*>(this)); } // ----------------------------------------------------------------------------- -Reference< XConnection > OGenericUnoController::connect( - const Reference< XDataSource>& _xDataSource - ,sal_Bool _bStartListening - ) +Reference< XConnection > OGenericUnoController::connect( const Reference< XDataSource>& _xDataSource, + ::dbtools::SQLExceptionInfo* _pErrorInfo ) { - WaitObject aWaitCursor(getView()); + WaitObject aWaitCursor( getView() ); ODatasourceConnector aConnector( getORB(), getView(), ::rtl::OUString() ); - Reference<XConnection> xConnection = aConnector.connect(_xDataSource); - - // be notified when connection is in disposing - if (_bStartListening) - startConnectionListening(xConnection); + Reference< XConnection > xConnection = aConnector.connect( _xDataSource, _pErrorInfo ); + startConnectionListening( xConnection ); return xConnection; } // ----------------------------------------------------------------------------- -Reference< XConnection > OGenericUnoController::connect( - const ::rtl::OUString& _rDataSourceName, const ::rtl::OUString& _rContextInformation, - sal_Bool _bStartListening ) +Reference< XConnection > OGenericUnoController::connect( const ::rtl::OUString& _rDataSourceName, + const ::rtl::OUString& _rContextInformation, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { - WaitObject aWaitCursor(getView()); + WaitObject aWaitCursor( getView() ); ODatasourceConnector aConnector( getORB(), getView(), _rContextInformation ); - Reference<XConnection> xConnection = aConnector.connect(_rDataSourceName); - - // be notified when connection is in disposing - if (_bStartListening) - startConnectionListening(xConnection); + Reference<XConnection> xConnection = aConnector.connect( _rDataSourceName, _pErrorInfo ); + startConnectionListening( xConnection ); return xConnection; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]