[Libreoffice-commits] core.git: dbaccess/source
Mathias Hasselmann
mathias at openismus.com
Thu Mar 21 00:31:07 PDT 2013
dbaccess/source/core/misc/dsntypes.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 4f6514eb0904f79b7c2db0958dc580bcf716911c
Author: Mathias Hasselmann <mathias at openismus.com>
Date: Wed Mar 20 00:33:03 2013 +0100
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 <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 77814e5..0c02d64 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<sal_Unicode>(':'));
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;
}
More information about the Libreoffice-commits
mailing list