User: obo Date: 2006/07/10 08:06:44 Modified: dba/dbaccess/source/core/api/querydescriptor.cxx
Log: INTEGRATION: CWS qiq (1.26.78); FILE MERGED 2006/07/03 19:48:47 fs 1.26.78.6: #i51143# warning when trying to obtain columns for a query whose statement does not produce a result set 2006/06/30 13:27:18 fs 1.26.78.5: #i51143# protect against recusive sub queries 2006/06/28 10:31:07 fs 1.26.78.4: #i10000# 2006/06/27 11:58:02 fs 1.26.78.3: RESYNC: (1.26-1.27); FILE MERGED 2006/06/16 11:47:37 fs 1.26.78.2: during #i51143#: refactored VCollection: - createEmptyObject now named createDescriptor - cloneObject removed - appendObject now returns the newly created object (previously done via a subsequent call to cloneObject) 2006/06/01 12:32:55 fs 1.26.78.1: #i51143# also try to retrieve columns if the EscapeProcessing is FALSE - may be we're lucky ... (needed when such a query is added to the query designer) File Changes: Directory: /dba/dbaccess/source/core/api/ ========================================= File [changed]: querydescriptor.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/querydescriptor.cxx?r1=1.27&r2=1.28 Delta lines: +25 -12 --------------------- --- querydescriptor.cxx 20 Jun 2006 02:40:08 -0000 1.27 +++ querydescriptor.cxx 10 Jul 2006 15:06:42 -0000 1.28 @@ -251,12 +251,25 @@ if ( isColumnsOutOfDate() ) { - // load the columns - if ( m_bEscapeProcessing ) - refreshColumns(); + // clear the current columns + clearColumns(); + // do this before rebuildColumns. This prevents recursion, e.g. in the case where we + // have queries with cyclic references: + // foo := SELECT * FROM bar + // bar := SELECT * FROM foo setColumnsOutOfDate( sal_False ); - m_pColumns->setInitialized(); + + // rebuild them + try + { + rebuildColumns(); + } + catch(...) + { + setColumnsOutOfDate( sal_True ); + throw; + } } return m_pColumns; @@ -289,20 +302,22 @@ } // ----------------------------------------------------------------------------- -Reference< XPropertySet > OQueryDescriptor_Base::createEmptyObject() +void OQueryDescriptor_Base::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ ) { - DBG_ERROR( "OQueryDescriptor_Base::createEmptyObject: never to be called!" ); - return NULL; + // not interested in } // ----------------------------------------------------------------------------- void OQueryDescriptor_Base::columnDropped(const ::rtl::OUString& /*_sName*/) { + // not interested in } // ----------------------------------------------------------------------------- -void OQueryDescriptor_Base::columnCloned(const Reference< XPropertySet >& /*_xClone*/) +Reference< XPropertySet > OQueryDescriptor_Base::createColumnDescriptor() { + OSL_ENSURE( false, "OQueryDescriptor_Base::createColumnDescriptor: called why?" ); + return NULL; } // ----------------------------------------------------------------------------- @@ -311,14 +326,12 @@ } // ----------------------------------------------------------------------------- +// IRefreshableColumns void OQueryDescriptor_Base::refreshColumns() { - MutexGuard aGuard(m_rMutex); + MutexGuard aGuard( m_rMutex ); - // clear the current columns clearColumns(); - - // do the real rebuild rebuildColumns(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
