User: vg Date: 05/02/16 07:59:03 Modified: /dba/dbaccess/source/core/dataaccess/ datasource.cxx
Log: INTEGRATION: CWS hsqldb2 (1.52.20); FILE MERGED 2005/01/28 12:19:39 oj 1.52.20.2: #i39922# fix for storeAsURL and merges from dba23 2005/01/19 07:06:48 oj 1.52.20.1: #i39922# merge from dba22 and fixes in datasource for embedded storage File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: datasource.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/datasource.cxx?r1=1.54&r2=1.55 Delta lines: +27 -19 --------------------- --- datasource.cxx 2 Feb 2005 13:59:34 -0000 1.54 +++ datasource.cxx 16 Feb 2005 15:59:00 -0000 1.55 @@ -685,19 +685,19 @@ if ( xCon == i->get() ) { *i = OWeakConnection(); - try - { - Reference<XTransactedObject> xTrans(xCon,UNO_QUERY); - if ( bStore = xTrans.is() ) - { - xTrans->commit(); - bStore = commitEmbeddedStorage(); - } - } - catch(Exception&) - { - OSL_ENSURE(0,"Exception Caught: Could not store embedded database!"); - } +// try +// { +// Reference<XTransactedObject> xTrans(xCon,UNO_QUERY); +// if ( bStore = xTrans.is() ) +// { +// xTrans->commit(); +// bStore = commitEmbeddedStorage(); +// } +// } +// catch(Exception&) +// { +// OSL_ENSURE(0,"Exception Caught: Could not store embedded database!"); +// } } } @@ -830,13 +830,21 @@ try { - TStorages::iterator aIter = m_aStorages.begin(); - TStorages::iterator aEnd = m_aStorages.end(); - for (; aIter != aEnd ; ++aIter) + sal_Bool bStore = commitEmbeddedStorage(); + disposeStorages(); + if ( bStore ) + { + try + { + Reference<XTransactedObject> xTransact(getStorage(),UNO_QUERY); + if ( xTransact.is() ) + xTransact->commit(); + } + catch(Exception) { - ::comphelper::disposeComponent(aIter->second); + OSL_ENSURE(0,"Exception Caught: Could not store embedded database!"); + } } - m_aStorages.clear(); ::comphelper::disposeComponent(m_xStorage); } catch(Exception&) @@ -1314,7 +1322,7 @@ { Reference< XComponent> xComp(xConn,UNO_QUERY); if ( xComp.is() ) - xComp->addEventListener(this); + xComp->addEventListener(static_cast<XContainerListener*>(this)); m_aConnections.push_back(OWeakConnection(xConn)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
