User: obo     
Date: 2006/07/10 07:24:30

Modified:
   dba/connectivity/source/drivers/ado/AUsers.cxx

Log:
 INTEGRATION: CWS qiq (1.8.104); FILE MERGED
 2006/06/27 14:10:55 fs 1.8.104.2: RESYNC: (1.8-1.9); FILE MERGED
 2006/06/16 11:32:32 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]: AUsers.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/ado/AUsers.cxx?r1=1.9&r2=1.10
Delta lines:  +15 -8
--------------------
--- AUsers.cxx  20 Jun 2006 01:15:59 -0000      1.9
+++ AUsers.cxx  10 Jul 2006 14:24:28 -0000      1.10
@@ -54,7 +54,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;
@@ -77,20 +79,25 @@
        m_aCollection.Refresh();
 }
 // -------------------------------------------------------------------------
-Reference< XPropertySet > OUsers::createEmptyObject()
+Reference< XPropertySet > OUsers::createDescriptor()
 {
        return new OUserExtend(m_pCatalog,isCaseSensitive());
 }
 // -------------------------------------------------------------------------
 // XAppend
-void OUsers::appendObject( const Reference< XPropertySet >& descriptor )
+sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, 
const Reference< XPropertySet >& descriptor )
 {
        OUserExtend* pUser = NULL;
-       if(getImplementation(pUser,descriptor) && pUser != NULL)
-       {
+       if ( !getImplementation( pUser, descriptor ) || pUser == NULL )
+        ::dbtools::throwGenericSQLException(
+            ::rtl::OUString::createFromAscii( "Could not create user: invalid 
object descriptor." ),
+            static_cast<XTypeProvider*>(this)
+        );
+
                ADOUsers* pUsers = (ADOUsers*)m_aCollection;
                
pUsers->Append(OLEVariant(pUser->getImpl()),OLEString(pUser->getPassword()));
-       }
+
+    return createObject( _rForName );
 }
 // -------------------------------------------------------------------------
 // XDrop




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to