[Libreoffice-commits] core.git: 2 commits - connectivity/registry connectivity/source
Andrzej J.R. Hunt
andrzej at ahunt.org
Fri Sep 20 07:03:05 PDT 2013
connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu | 21 ++++------
connectivity/source/drivers/firebird/Connection.cxx | 8 ++-
connectivity/source/drivers/firebird/Connection.hxx | 3 +
3 files changed, 18 insertions(+), 14 deletions(-)
New commits:
commit 38dd74047968fd734b598d3ee7293cd5263c1012
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Fri Sep 20 14:36:45 2013 +0100
Update Firebird-File driver config to allow creating new dbs.
Change-Id: I34abaf80e82cb1d3cd51c9418b15351e9fdfc2fe
diff --git a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
index e7aa436..e5ff61f 100644
--- a/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
+++ b/connectivity/registry/firebird/org/openoffice/Office/DataAccess/Drivers.xcu
@@ -33,6 +33,7 @@
************************************************************************ -->
<oor:component-data oor:name="Drivers" oor:package="org.openoffice.Office.DataAccess" xmlns:install="http://openoffice.org/2004/installation" xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<node oor:name="Installed" install:module="firebird">
+ <!-- Firebird EMBEDDED Driver -->
<node oor:name="sdbc:embedded:firebird" oor:op="replace">
<prop oor:name="Driver">
<value>com.sun.star.comp.sdbc.firebird.Driver</value>
@@ -66,12 +67,13 @@
<node oor:name="MetaData">
</node>
</node>
+ <!-- Firebird FILE Driver -->
<node oor:name="sdbc:firebird:*" oor:op="replace">
<prop oor:name="Driver">
<value>com.sun.star.comp.sdbc.firebird.Driver</value>
</prop>
<prop oor:name="DriverTypeDisplayName" oor:type="xs:string">
- <value xml:lang="en-US">Firebird</value>
+ <value xml:lang="en-US">Firebird File</value>
</prop>
<node oor:name="Properties">
<!-- Don't use ODBC syntax for date&time literals and (full) outer joins,
@@ -95,21 +97,16 @@
</node>
</node>
<node oor:name="Features">
- <node oor:name="UseCatalogInSelect" oor:op="replace">
+ </node>
+ <node oor:name="MetaData">
+ <node oor:name="SupportsBrowsing" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
- <value>false</value>
+ <value>true</value>
</prop>
</node>
- <node oor:name="UseSchemaInSelect" oor:op="replace">
+ <node oor:name="SupportsDBCreation" oor:op="replace">
<prop oor:name="Value" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
- </node>
- <node oor:name="MetaData">
- <node oor:name="Authentication" oor:op="replace">
- <prop oor:name="Value" oor:type="xs:string">
- <value>UserPassword</value>
+ <value>true</value>
</prop>
</node>
</node>
commit 27c11f1f08716e54f83571a84698c62692260b30
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Fri Sep 20 15:00:48 2013 +0100
Implement creation/loading of external firebird .fdbs.
Change-Id: I61186189d791e54fb096505abd2fa7ac248035e8
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index c00d621..67e7a9d 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -81,6 +81,7 @@ Connection::Connection(FirebirdDriver* _pDriver)
, m_sFirebirdURL()
, m_bIsEmbedded(sal_False)
, m_xEmbeddedStorage(0)
+ , m_bIsFile(sal_False)
, m_sUser()
, m_bIsAutoCommit(sal_False)
, m_bIsReadOnly(sal_False)
@@ -184,13 +185,16 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
else if (url.startsWith("sdbc:firebird:"))
{
m_sFirebirdURL = url.copy(OUString("sdbc:firebird:").getLength());
- if (m_sFirebirdURL.startsWith("file://")) // TODO: are file urls really like this?
+ if (m_sFirebirdURL.startsWith("file://"))
{
+ m_bIsFile = true;
uno::Reference< ucb::XSimpleFileAccess > xFileAccess(
ucb::SimpleFileAccess::create(comphelper::getProcessComponentContext()),
uno::UNO_QUERY);
if (!xFileAccess->exists(m_sFirebirdURL))
bIsNewDatabase = true;
+
+ m_sFirebirdURL = m_sFirebirdURL.copy(OUString("file://").getLength());
}
}
@@ -209,7 +213,7 @@ void Connection::construct(const ::rtl::OUString& url, const Sequence< PropertyV
*dpb++ = FIREBIRD_SQL_DIALECT;
// Do any more dpbBuffer additions here
- if (m_bIsEmbedded) // TODO: || m_bIsLocalFile
+ if (m_bIsEmbedded || m_bIsFile)
{
*dpb++ = isc_dpb_trusted_auth;
*dpb++ = 1; // Length of data
diff --git a/connectivity/source/drivers/firebird/Connection.hxx b/connectivity/source/drivers/firebird/Connection.hxx
index c20e6f6..a2f7dfe 100644
--- a/connectivity/source/drivers/firebird/Connection.hxx
+++ b/connectivity/source/drivers/firebird/Connection.hxx
@@ -109,6 +109,9 @@ namespace connectivity
::boost::scoped_ptr< ::utl::TempFile > m_pExtractedFDBFile;
+ /** We are using an external (local) file */
+ bool m_bIsFile;
+
/* REMOTE CONNECTION DATA */
::rtl::OUString m_sUser;
More information about the Libreoffice-commits
mailing list