User: obo     
Date: 2006/07/10 07:25:33

Modified:
   dba/connectivity/source/drivers/dbase/DIndexes.cxx

Log:
 INTEGRATION: CWS qiq (1.14.104); FILE MERGED
 2006/06/30 13:17:58 fs 1.14.104.3: during #i51143#: PROPERTY_ID_HY0000 
superseded by StandardSQLState.SQL_GENERAL_ERROR
 2006/06/27 14:15:36 fs 1.14.104.2: RESYNC: (1.14-1.15); FILE MERGED
 2006/06/16 11:32:33 fs 1.14.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/dbase/
==================================================

File [changed]: DIndexes.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/dbase/DIndexes.cxx?r1=1.15&r2=1.16
Delta lines:  +18 -6
--------------------
--- DIndexes.cxx        20 Jun 2006 01:20:35 -0000      1.15
+++ DIndexes.cxx        10 Jul 2006 14:25:31 -0000      1.16
@@ -38,6 +38,9 @@
 #ifndef _CONNECTIVITY_DBASE_INDEX_HXX_
 #include "dbase/DIndex.hxx"
 #endif
+#ifndef _DBHELPER_DBEXCEPTION_HXX_
+#include <connectivity/dbexception.hxx>
+#endif
 #ifndef _UNOTOOLS_UCBHELPER_HXX
 #include <unotools/ucbhelper.hxx>
 #endif
@@ -51,8 +54,9 @@
 using namespace ::comphelper;
 
 using namespace utl;
-using namespace connectivity;
-using namespace connectivity::dbase;
+using namespace ::connectivity;
+using namespace ::dbtools;
+using namespace ::connectivity::dbase;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::sdbcx;
@@ -72,7 +76,10 @@
        sFile += _rName;
        sFile += ::rtl::OUString::createFromAscii(".ndx");
        if(!UCBContentHelper::Exists(sFile))
-               throw SQLException(::rtl::OUString::createFromAscii("Index file 
doesn't 
exists!"),*m_pTable,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any());
+        ::dbtools::throwGenericSQLException(
+            ::rtl::OUString::createFromAscii( "Index file doesn't exists." ),
+            // TODO: resource
+            *m_pTable );
 
        sdbcx::ObjectType xRet;
        SvStream* pFileStream = 
::connectivity::file::OFileTable::createStream_simpleError(sFile,STREAM_READ | 
STREAM_NOCREATE| STREAM_SHARE_DENYWRITE);
@@ -91,7 +98,10 @@
                pIndex->openIndexFile();
        }
        else
-               throw SQLException(::rtl::OUString::createFromAscii("Could not 
open index 
file"),*m_pTable,OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_HY0000),1000,Any());
+        ::dbtools::throwGenericSQLException(
+            ::rtl::OUString::createFromAscii( "Could not open index file."),
+            // TODO: resource
+            *m_pTable );
        return xRet;
 }
 // -------------------------------------------------------------------------
@@ -101,14 +111,14 @@
                m_pTable->refreshIndexes();
 }
 // -------------------------------------------------------------------------
-Reference< XPropertySet > ODbaseIndexes::createEmptyObject()
+Reference< XPropertySet > ODbaseIndexes::createDescriptor()
 {
        return new ODbaseIndex(m_pTable);
 }
 typedef connectivity::sdbcx::OCollection ODbaseTables_BASE_BASE;
 // -------------------------------------------------------------------------
 // XAppend
-void ODbaseIndexes::appendObject( const Reference< XPropertySet >& descriptor )
+sdbcx::ObjectType ODbaseIndexes::appendObject( const ::rtl::OUString& 
_rForName, const Reference< XPropertySet >& descriptor )
 {
        Reference<XUnoTunnel> xTunnel(descriptor,UNO_QUERY);
        if(xTunnel.is())
@@ -117,6 +127,8 @@
                if(!pIndex || !pIndex->CreateImpl())
                        throw SQLException();
        }
+
+    return createObject( _rForName );
 }
 // -------------------------------------------------------------------------
 // XDrop




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

Reply via email to