* please use standard license headers, and add yourself as contributor - DataAccess.xcu should not be necessary - we're certainly going to replace the existing driver, instead of adding a second one? - evoab.xml/author not really correct * NServices.cxx: "catch(...)" does not work reliable on all platforms, please catch the "least" exception which can be thrown * OEvoabDriver::disposing: please try/catch around xComp->dispose - NDriver.cxx:239: |equalsAscii| - OEvoabDriver::acceptsURL_Stat does accept pure "sdbc:address:" - why? - what is getSDBC_SCHEME_LDAP/getSDBC_SCHEME_GWISE good for? preparations for upcoming implementations? - please remove obsolete code from NConnection: m_bFixedLength/isFixedLength, m_bHeaderLine/isHeaderLine, etc m_nMaxResultRecords - NConnection.cxx:140: omit one of the "::rtl::OUString"s - NConnection.cxx:142: replace ::rtl::OUString aTypeLine( ::rtl::OUString::createFromAscii("\nType: " ) ); with ::rtl::OUString aTypeLine( RTL_CONSTASCII_USTRINGPARAM which is cheaper - NConnection.cxx:146: omit superfluous ::rtl::OUString ctor * OEvoabConnection::~OEvoabConnection: do the "g_object_unref(m_pBook)" upon disposal, not upon destruction. By definition, disposal means release of all associated resources, while destruction merely is the dying of the C++ instance. * OEvoabConnection::~OEvoabConnection: call |acquire| before |close|, to prevent problems with temporary resources created/released during |close|. Usual pattern is if ( !isClosed() ) // s/Closed/Disposed/ { acuire(); close(); // s/close/dispose/ } - OEvoabConnection: |acquire| / |release| on m_pDriver is not necessary - this is exactly what OSubComponent (the base class) is for - OEvoabConnection::nativeSQL: not necessary to guard this - OEvoabConnection::prepareCall: please use throwFunctionNotSupportedException instead of ignoring it. Same for setAutoCommit/setCatalog/setTransactionIsolation /setTypeMap * OEvoabConnection::disposing: please try/catch disposals of single statements - OEvoabConnection::setReadOnly: Please use throwFunctionNotSupportedException * OEvoabConnection::construct: please try to connect to the Evolution AB server here. By default, a connection should connect to the backend upon construction (this is what "connection" means :) - OEvoabTables::OEvoabTables: please make the _rParent parameter an OEvoabCatalog, because it's later on (in impl_refresh) cast to this type. This way, the compiler can detect misuses. * OEvoabResultSetMetaData: please hold alive the parent connection |m_pConnection|, e.g. by deriving from OSubComponent. Alternatively, hold the connection as WeakReference. At the moment, the code has the potential to crash when accessing a dangling pointer, if the connection is destroyed before the meta data instance. - OEvoabResultSetMetaData::getTableName/getCatalogName looks wrong. See http://api.openoffice.org/docs/common/ref/com/sun/star/sdbc/XResultSetMetaData.html - NStatement/NPreparedStatement: given SQL is currently completely ignored. In particular, every SELECT statement always returns the complete table. - NStatement.*: m_aLastWarning is dead, please remove - OStatement_Base: the properties implementation is somewhat ... sparse * OEvoabPreparedStatement: member m_pConnection is already held in base class - please remove - shouldn't OEvoabResultSet::construct throw an exception instead of ignoring unconditional non-local queries? Optionally, would it be possible to limit the results to the value of the MaxRows property? Finally, this is what this prop is good for ... - it seems that OEvoabResultSet::m_pConnection is used in |construct| only - please make it a parameter of this method * NResultSet.cxx: userAuthenticate: no way! Please examine the info sequence passed to XDriver::connect for a user/password, but *never ever* directly open a dialog from within that code level. For example, SDBC drivers must be able to run in a scripting context, and there a dialog can be deadly. Normally, higher levels (com.sun.star.sdb) which know more about the operation's context will ask the user for authentication, and pass down this. At most, provide an XCompletedConnection at your driver, and use the XInteractionHandler provided in its connectWithCompletion call. - OEvoabResultSet::m_nTextEncoding is dead, please remove * OEvoabResultSet::OEvoabResultSet: In OOo 1.x, a result set lived only as long as its statement (the one which created it) did. This cause a lot of trouble with the object's life times, since result sets became unusable where clients didn't expect it. Thus, nowadays, it's desired that result sets keep the statement which created them alive, by simply holding a reference. Please add this in NResultSet.* This has the additional advantage that m_pStatement is not potentially dangling, anymore - OEvoabResultSet::getFoo: Speaking strictly, all those "return 0" are not correct. If possible, values need to be converted. * OEvoabResultSet: positioning methods (absolute, relative, previous, next) need to validate the given index/offset * OEvoabResultSet::previous does not return anything (which strange compiler did let *this* pass?) - OEvoabResultSet::close: why is the "dispose" call commented out? Normally, close should dispose the instance. - OEvoabResultSet: XCancellable is implemented empty, and declared an optional interface of the ResultSet service. Please remove the empty implementation.