From 4f6514eb0904f79b7c2db0958dc580bcf716911c Mon Sep 17 00:00:00 2001 From: Mathias Hasselmann Date: Wed, 20 Mar 2013 00:33:03 +0100 Subject: Don't complain about missing colon in empty DSN Empty datasource names occur with the datasource wizard's first page when no datasource type has been selected yet. Change-Id: I9bcd025aab046e6cb79db47564f55ae3f0faed55 Reviewed-on: https://gerrit.libreoffice.org/2885 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba --- dbaccess/source/core/misc/dsntypes.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 77814e5e1f19..0c02d64d6949 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -342,8 +342,12 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const sal_Int32 nSeparator = sDsn.indexOf(static_cast(':')); if (-1 == nSeparator) { - // there should be at least one such separator - OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !"); + if (!sDsn.isEmpty()) + { + // there should be at least one such separator + OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !"); + } + return DST_UNKNOWN; } -- cgit