diff options
author | Pierre <prrvchr@gmail.com> | 2023-07-27 15:27:14 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2023-07-28 09:14:57 +0200 |
commit | 9c071c148afce0b95a16b36c27b709380d1130b5 (patch) | |
tree | 5c7d26ea2fa5d909d23254ea06fc581c06cbf4c7 /dbaccess | |
parent | f5dd4faef6c6ee23bb33a0662087e1892db78b3d (diff) |
tdf#156471: New database wizard - add generic support for embedded databases of unknown type
e.g. provided by extension or future code.
The core assumption is that an embedded database doesn't need a user-configured "connection URL"
configured so don't ask for one.
Change-Id: I7d11cc0b492782634dd49f74d9d709dca434e990
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154989
Reviewed-by: Lionel Mamane <lionel@mamane.lu>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/inc/dsntypes.hxx | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index cfeaad56a671..c67ac1646a75 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -324,6 +324,9 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(std::u16string_view _rDsn) con if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:firebird")) return DST_EMBEDDED_FIREBIRD; + if (sDsn.startsWithIgnoreAsciiCase("sdbc:embedded:")) + return DST_EMBEDDED_UNKNOWN; + // find second : nSeparator = sDsn.indexOf(u':', nSeparator + 1); if (-1 == nSeparator) @@ -467,6 +470,7 @@ void ODsnTypeCollection::fillPageIds(std::u16string_view _sURL,std::vector<sal_I case DST_MACAB: case DST_EMBEDDED_HSQLDB: case DST_EMBEDDED_FIREBIRD: + case DST_EMBEDDED_UNKNOWN: break; default: _rOutPathIds.push_back(PAGE_DBSETUPWIZARD_USERDEFINED); diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index d77a4020e53c..00ea9844e163 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -63,6 +63,8 @@ enum DATASOURCE_TYPE DST_EMBEDDED_FIREBIRD = 27, DST_POSTGRES = 28, DST_WRITER = 29, + DST_EMBEDDED_UNKNOWN = 30, /// for all embedded addons driver + DST_USERDEFINE1, /// first user defined driver DST_USERDEFINE2, |