connectivity/source/drivers/flat/EConnection.cxx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
New commits: commit d376c09f0100e6545b4804a6698bcc746ea9427c Author: Jens Carl <j.car...@gmx.de> AuthorDate: Tue May 28 17:36:48 2019 +0000 Commit: Stephan Bergmann <sberg...@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 <sberg...@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" ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits