User: obo Date: 2006/07/10 07:23:26 Modified: dba/connectivity/source/drivers/ado/AGroups.cxx
Log: INTEGRATION: CWS qiq (1.8.104); FILE MERGED 2006/06/27 14:08:44 fs 1.8.104.2: RESYNC: (1.8-1.9); FILE MERGED 2006/06/16 11:32:31 fs 1.8.104.1: 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) File Changes: Directory: /dba/connectivity/source/drivers/ado/ ================================================ File [changed]: AGroups.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/AGroups.cxx?r1=1.9&r2=1.10 Delta lines: +13 -4 -------------------- --- AGroups.cxx 20 Jun 2006 01:13:45 -0000 1.9 +++ AGroups.cxx 10 Jul 2006 14:23:24 -0000 1.10 @@ -57,6 +57,9 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _DBHELPER_DBEXCEPTION_HXX_ +#include <connectivity/dbexception.hxx> +#endif using namespace comphelper; using namespace connectivity; @@ -79,17 +82,23 @@ m_aCollection.Refresh(); } // ------------------------------------------------------------------------- -Reference< XPropertySet > OGroups::createEmptyObject() +Reference< XPropertySet > OGroups::createDescriptor() { return new OAdoGroup(m_pCatalog,isCaseSensitive()); } // ------------------------------------------------------------------------- // XAppend -void OGroups::appendObject( const Reference< XPropertySet >& descriptor ) +sdbcx::ObjectType OGroups::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor ) { OAdoGroup* pGroup = NULL; - if(getImplementation(pGroup,descriptor) && pGroup != NULL) - m_aCollection.Append(pGroup->getImpl()); + if ( !getImplementation(pGroup,descriptor) || pGroup == NULL ) + ::dbtools::throwGenericSQLException( + ::rtl::OUString::createFromAscii( "Could not create group: invalid object descriptor." ), + static_cast<XTypeProvider*>(this) + ); + + m_aCollection.Append( pGroup->getImpl() ); + return createObject( _rForName ); } // ------------------------------------------------------------------------- // XDrop --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
