summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWol <anthony@youngman.org.uk>2011-01-26 17:20:00 +0000
committerWol <anthony@youngman.org.uk>2011-01-26 17:20:00 +0000
commita5eab6789d1449cbcfd2158d23c43a2618d89b19 (patch)
treee89aa25cd3d97641157c70aa81b60be82266398b
parentc7e246089c69d6f08def791279656bc759003230 (diff)
DataAccess.xcu, sqlite_connection.cxx
Add DataAccess needed to compile, changes to sqlite_connection to attempt to compile
-rw-r--r--connectivity/source/drivers/sqlite3/DataAccess.xcu19
-rw-r--r--connectivity/source/drivers/sqlite3/sqlite_connection.cxx16
2 files changed, 27 insertions, 8 deletions
diff --git a/connectivity/source/drivers/sqlite3/DataAccess.xcu b/connectivity/source/drivers/sqlite3/DataAccess.xcu
new file mode 100644
index 0000000000..45d25867d9
--- /dev/null
+++ b/connectivity/source/drivers/sqlite3/DataAccess.xcu
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<oor:node xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="DataAccess" oor:package="org.openoffice.Office">
+ <node oor:name="UserDefinedDriverSettings">
+ <node oor:name="org.openoffice.comp.connectivity.sqlite.Driver" oor:op="replace">
+ <prop oor:name="DriverName">
+ <value>org.openoffice.comp.connectivity.sqlite.Driver</value>
+ </prop>
+ <prop oor:name="DriverPageDisplayName">
+ <value>SQLite</value>
+ </prop>
+ <prop oor:name="DriverTypeDisplayName">
+ <value>sqlite</value>
+ </prop>
+ <prop oor:name="DriverDsnPrefix">
+ <value>sdbc:sqlite:</value>
+ </prop>
+ </node>
+ </node>
+</oor:node>
diff --git a/connectivity/source/drivers/sqlite3/sqlite_connection.cxx b/connectivity/source/drivers/sqlite3/sqlite_connection.cxx
index 0f07424b07..0894bf0a5a 100644
--- a/connectivity/source/drivers/sqlite3/sqlite_connection.cxx
+++ b/connectivity/source/drivers/sqlite3/sqlite_connection.cxx
@@ -125,13 +125,13 @@ public:
{
that->acquire();
}
-
+
virtual ~ClosableReference()
{
if (m_conn)
m_conn->release();
}
-
+
virtual void SAL_CALL dispose() throw ()
{
if (m_conn)
@@ -184,11 +184,11 @@ void Connection::close()
ii != m_myStatements.end();
++ii) {
Reference< XCloseable > r = ii->second;
- if (r.is())
+/* if (r.is()) // awy 2011-01-26 won't compile, Needs to be fixed?
lst.push_back(r);
- }
+*/ }
}
- // close all created statements
+ // close all created statements
for (CloseableList::iterator ii = lst.begin(); ii != lst.end(); ++ii) {
ii->get()->close();
}
@@ -212,7 +212,7 @@ Reference< XStatement > Connection::createStatement() throw (SQLException, Runti
Reference< XStatement > ret(stmt);
::rtl::ByteSequence id(16);
rtl_createUuid((sal_uInt8*) id.getConstArray(), 0, sal_False);
- m_myStatements[id] = Reference< XCloseable > (stmt);
+// m_myStatements[id] = Reference< XCloseable > (stmt); // awy 2011-01-26 won't compile - needs to be fixed?
stmt->queryAdapter()->addReference(new ClosableReference(id, this));
return ret;
}
@@ -226,10 +226,10 @@ Reference< XPreparedStatement > Connection::prepareStatement(const ::rtl::OUStri
rtl::OString byteSql = OUStringToOString(sql, m_settings.encoding);
PreparedStatement *stmt = new PreparedStatement(m_refMutex, this, &m_settings, byteSql);
Reference< XPreparedStatement > ret = stmt;
-
+
::rtl::ByteSequence id(16);
rtl_createUuid((sal_uInt8*) id.getConstArray(), 0, sal_False);
- m_myStatements[id] = Reference< XCloseable > (stmt);
+// m_myStatements[id] = Reference< XCloseable > (stmt); // awy 2011-01-26 won't compile - needs to be fixed?
stmt->queryAdapter()->addReference(new ClosableReference(id, this));
return ret;
}