User: kz Date: 2008-03-06 18:43:57+0000 Modified: dba/reportdesign/source/ui/report/ReportController.cxx
Log: INTEGRATION: CWS odbmacros2 (1.6.34); FILE MERGED 2008/03/04 12:01:31 fs 1.6.34.4: RESYNC: (1.8-1.10); FILE MERGED 2008/02/06 21:46:22 fs 1.6.34.3: #i49133# some initialization-related re-factoring 2008/02/04 13:09:53 fs 1.6.34.2: RESYNC: (1.6-1.8); FILE MERGED 2008/01/28 11:39:42 fs 1.6.34.1: new include necessary File Changes: Directory: /dba/reportdesign/source/ui/report/ ============================================== File [changed]: ReportController.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/ui/report/ReportController.cxx?r1=1.11&r2=1.12 Delta lines: +8 -36 -------------------- --- ReportController.cxx 2008-03-05 18:13:04+0000 1.11 +++ ReportController.cxx 2008-03-06 18:43:55+0000 1.12 @@ -253,6 +253,9 @@ #ifndef _SFXITEMSET_HXX //autogen wg. SfxItemSet #include <svtools/itemset.hxx> #endif +#ifndef _VOS_MUTEX_HXX_ +#include <vos/mutex.hxx> +#endif #ifndef RPTUI_PROPERTYSETFORWARD_HXX #include "PropertyForward.hxx" #endif @@ -1729,44 +1732,13 @@ // ----------------------------------------------------------------------------- void OReportController::impl_initialize( ) { - try - { - Reference< XConnection > xConn; - const ::comphelper::NamedValueCollection& rIni = getInitParams(); - if ( rIni.get_ensureType(static_cast< ::rtl::OUString>(PROPERTY_ACTIVECONNECTION),xConn) && xConn.is() ) - initializeConnection( xConn ); - - rIni.get_ensureType(static_cast< ::rtl::OUString>(PROPERTY_REPORTNAME),m_sName); - if ( !m_sName.getLength() ) - { - static const ::rtl::OUString s_sDocumentTitle(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle")); - rIni.get_ensureType(s_sDocumentTitle,m_sName); - } + OReportController_BASE::impl_initialize(); + const ::comphelper::NamedValueCollection& rArguments( getInitParams() ); - sal_Bool bFirstTry = sal_False; - if (!isConnected()) - { // whoever instantiated us did not give us a connection to share. Okay, create an own one - dbtools::isEmbeddedInDatabase(m_xReportDefinition,xConn); - if ( xConn.is() ) - initializeConnection( xConn ); - if (!isConnected()) - { - reconnect(sal_False); - bFirstTry = sal_True; - } - } - if (!isConnected()) // so what should otherwise - { - if ( !bFirstTry ) - connectionLostMessage(); - throw Exception(); - } - } - catch(const SQLException&) - { - OSL_ENSURE(sal_False, "OReportController::initialize: caught an exception!"); - } + rArguments.get_ensureType( (::rtl::OUString)PROPERTY_REPORTNAME, m_sName ); + if ( !m_sName.getLength() ) + rArguments.get_ensureType( "DocumentTitle", m_sName ); try { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
