[Libreoffice-commits] core.git: connectivity/source
Jens Carl (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 29 07:15:00 UTC 2019
connectivity/source/drivers/flat/EConnection.cxx | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
New commits:
commit d376c09f0100e6545b4804a6698bcc746ea9427c
Author: Jens Carl <j.carl43 at gmx.de>
AuthorDate: Tue May 28 17:36:48 2019 +0000
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed May 29 09:14:01 2019 +0200
tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)
Replace OSL_VERIFY with if-statement and SAL_WARN.
Change-Id: Ib5459a365231514efa0e8a33a880857378cd239e
Reviewed-on: https://gerrit.libreoffice.org/73121
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx
index ace657fd642d..8091c435ac4c 100644
--- a/connectivity/source/drivers/flat/EConnection.cxx
+++ b/connectivity/source/drivers/flat/EConnection.cxx
@@ -25,6 +25,7 @@
#include <flat/EPreparedStatement.hxx>
#include <flat/EStatement.hxx>
#include <connectivity/dbexception.hxx>
+#include <sal/log.hxx>
using namespace connectivity::flat;
using namespace connectivity::file;
@@ -67,29 +68,40 @@ void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValu
for(;pBegin != pEnd;++pBegin)
{
if(pBegin->Name == "HeaderLine")
- OSL_VERIFY( pBegin->Value >>= m_bHeaderLine );
+ {
+ if( ! (pBegin->Value >>= m_bHeaderLine) )
+ SAL_WARN("connectivity.flat", "construct: unable to get property HeaderLine");
+ }
else if(pBegin->Name == "FieldDelimiter")
{
OUString aVal;
- OSL_VERIFY( pBegin->Value >>= aVal );
+ if( ! (pBegin->Value >>= aVal) )
+ SAL_WARN("connectivity.flat", "construct: unable to get property FieldDelimiter");
+
m_cFieldDelimiter = aVal.toChar();
}
else if(pBegin->Name == "StringDelimiter")
{
OUString aVal;
- OSL_VERIFY( pBegin->Value >>= aVal );
+ if( ! (pBegin->Value >>= aVal) )
+ SAL_WARN("connectivity.flat", "construct: unable to get property StringDelimiter");
+
m_cStringDelimiter = aVal.toChar();
}
else if(pBegin->Name == "DecimalDelimiter")
{
OUString aVal;
- OSL_VERIFY( pBegin->Value >>= aVal );
+ if( ! (pBegin->Value >>= aVal) )
+ SAL_WARN("connectivity.flat", "construct: unable to get property DecimalDelimiter");
+
m_cDecimalDelimiter = aVal.toChar();
}
else if(pBegin->Name == "ThousandDelimiter")
{
OUString aVal;
- OSL_VERIFY( pBegin->Value >>= aVal );
+ if( ! (pBegin->Value >>= aVal) )
+ SAL_WARN("connectivity.flat", "construct: unable to get property ThousandDelimiter");
+
m_cThousandDelimiter = aVal.toChar();
}
else if ( pBegin->Name == "MaxRowScan" )
More information about the Libreoffice-commits
mailing list