[Libreoffice-commits] core.git: Branch 'feature/firebird-sdbc' - 2 commits - connectivity/source dbaccess/source firebird/ExternalProject_firebird.mk
Andrzej J.R. Hunt
andrzej at ahunt.org
Wed Jul 10 04:35:25 PDT 2013
connectivity/source/drivers/firebird/FDriver.cxx | 5 ++++-
dbaccess/source/core/misc/dsntypes.cxx | 9 +++++++++
dbaccess/source/inc/dsntypes.hxx | 1 +
dbaccess/source/ui/dlg/generalpage.cxx | 3 ++-
firebird/ExternalProject_firebird.mk | 1 +
5 files changed, 17 insertions(+), 2 deletions(-)
New commits:
commit 8265f4523395ec84dfb018ab1ce7929636f95e1d
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Wed Jul 10 12:30:45 2013 +0100
Modify DYLD_LIBRARY_PATH for firebrid to build on Mac OS.
Change-Id: I88cf37f4bb1d953180171e76b6f742cf0f672f89
diff --git a/firebird/ExternalProject_firebird.mk b/firebird/ExternalProject_firebird.mk
index 8853eca..a1567ae 100644
--- a/firebird/ExternalProject_firebird.mk
+++ b/firebird/ExternalProject_firebird.mk
@@ -43,6 +43,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
-L$(OUTDIR)/lib \
-L$(call gb_UnpackedTarball_get_dir,boost)/source/lib" \
&& export LD_LIBRARY_PATH="$(OUTDIR)/lib:$(call gb_UnpackedTarball_get_dir,boost)/source/lib" \
+ && export DYLD_LIBRARY_PATH="$(OUTDIR)/lib:$(call gb_UnpackedTarball_get_dir,boost)/source/lib" \
&& export PATH="$(PATH):$(shell cygpath $(OUTDIR)/lib):$(shell cygpath $(call gb_UnpackedTarball_get_dir,icu)/source/lib)" \
&& ./configure \
--without-editline \
commit 2c3eeb2f63a9e7898da4b145c51d451fcb039961
Author: Andrzej J.R. Hunt <andrzej at ahunt.org>
Date: Mon Jul 8 09:39:55 2013 +0100
Add embedded firebird loading code, set as default db.
Change-Id: I993d7d7bacec710bb57d9e8f91d3cd01b0fbf616
diff --git a/connectivity/source/drivers/firebird/FDriver.cxx b/connectivity/source/drivers/firebird/FDriver.cxx
index e55a1bc..7f7b44a 100644
--- a/connectivity/source/drivers/firebird/FDriver.cxx
+++ b/connectivity/source/drivers/firebird/FDriver.cxx
@@ -147,7 +147,10 @@ sal_Bool SAL_CALL FirebirdDriver::acceptsURL( const ::rtl::OUString& url )
{
// here we have to look if we support this url format
// change the URL format to your needs, but please aware that the first on who accepts the URl wins.
- return url.startsWith("sdbc:firebird:");
+ // This could be extended to allow for external dbs using e.g. sdbc:firebird:url
+ // in addition to embedded dbs.
+// return url.startsWith("sdbc:firebird:");
+ return url.equals("sdbc:embedded:firebird");
}
// --------------------------------------------------------------------------------
Sequence< DriverPropertyInfo > SAL_CALL FirebirdDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 0c02d64..806e117 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -206,6 +206,7 @@ OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _s
bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const
{
return !( _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")-1)
+ || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:firebird",sizeof("sdbc:embedded:firebird")-1)
|| _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlook",sizeof("sdbc:address:outlook")-1)
|| _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlookexp",sizeof("sdbc:address:outlookexp")-1)
|| _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:mozilla:",sizeof("sdbc:address:mozilla:")-1)
@@ -321,7 +322,11 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const
}
}
if ( sEmbeddedDatabaseURL.isEmpty() )
+#ifdef ENABLE_FIREBIRD_SDBC
+ sEmbeddedDatabaseURL = "sdbc:embedded:firebird";
+#else
sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb";
+#endif
return sEmbeddedDatabaseURL;
}
//-------------------------------------------------------------------------
@@ -361,6 +366,9 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const
if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:hsqldb"))
return DST_EMBEDDED_HSQLDB;
+ if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:firebird"))
+ return DST_EMBEDDED_FIREBIRD;
+
// find second :
nSeparator = sDsn.indexOf(static_cast<sal_Unicode>(':'), nSeparator + 1);
if (-1 == nSeparator)
@@ -489,6 +497,7 @@ void ODsnTypeCollection::fillPageIds(const OUString& _sURL,::std::vector<sal_Int
case DST_KAB:
case DST_MACAB:
case DST_EMBEDDED_HSQLDB:
+ case DST_EMBEDDED_FIREBIRD:
break;
default:
_rOutPathIds.push_back(PAGE_DBSETUPWIZARD_USERDEFINED);
diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx
index eec1af6..e7c42af 100644
--- a/dbaccess/source/inc/dsntypes.hxx
+++ b/dbaccess/source/inc/dsntypes.hxx
@@ -61,6 +61,7 @@ enum DATASOURCE_TYPE
DST_EMBEDDED_HSQLDB = 23,
DST_MYSQL_NATIVE = 24,
DST_MYSQL_NATIVE_DIRECT = 25,
+ DST_EMBEDDED_FIREBIRD = 26,
DST_USERDEFINE1, /// first user defined driver
DST_USERDEFINE2,
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 3eea60a..836a6e0 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -276,7 +276,8 @@ namespace dbaui
_inout_rDisplayName = String();
}
- if ( eType == ::dbaccess::DST_EMBEDDED_HSQLDB )
+ if ( eType == ::dbaccess::DST_EMBEDDED_HSQLDB
+ || eType == ::dbaccess::DST_EMBEDDED_FIREBIRD )
_inout_rDisplayName = String();
return _inout_rDisplayName.getLength() > 0;
More information about the Libreoffice-commits
mailing list