diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-08 09:39:55 +0100 |
---|---|---|
committer | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2013-07-16 16:40:10 +0200 |
commit | 99dfc2632754330f49f3fd2bb9eefbb9c6f10ad7 (patch) | |
tree | 40f82fa038fea989d77d2c218ed8326f59998b8e /dbaccess | |
parent | 002e9c5a830de0ddc4b3127e6485af263a52fa24 (diff) |
Add embedded firebird loading code, set as default db.
Change-Id: I993d7d7bacec710bb57d9e8f91d3cd01b0fbf616
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/inc/dsntypes.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 0c02d64d6949..806e117bbd84 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 eec1af661c00..e7c42af97fcb 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 daad4541f57b..4dc5f94e9c8e 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; |