summaryrefslogtreecommitdiff
path: root/dbaccess/source/core
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2019-05-14 20:37:47 -0700
committerStephan Bergmann <sbergman@redhat.com>2019-05-16 08:30:11 +0200
commit48ee3cce67d028d6e6e97405f6add22a80a3fc98 (patch)
treebe66398ec5cdbdfc6843496053a829dbafc7ece8 /dbaccess/source/core
parent42b012e4dcb3ccb7e0aeb82515734499dc4ce2ed (diff)
tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)
Replace OSL_VERIFY with if-statement and SAL_WARN. Change-Id: Ib286a2151fe19a91b4e9db8db9f92ac0d5264d36 Reviewed-on: https://gerrit.libreoffice.org/72330 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess/source/core')
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx47
1 files changed, 34 insertions, 13 deletions
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index af31bcfde41b..520d8ca50958 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -31,6 +31,7 @@
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
@@ -172,20 +173,36 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
registerProperty( PROPERTY_LABEL, PROPERTY_ID_LABEL, nPropAttr, &m_sLabel, cppu::UnoType<decltype(m_sLabel)>::get() );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPENAME ) >>= m_aTypeName );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= m_nIsNullable );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_PRECISION ) >>= m_nPrecision );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_SCALE ) >>= m_nScale );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPE ) >>= m_nType );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_TYPENAME ) >>= m_aTypeName) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_TYPENAME);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= m_nIsNullable) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_ISNULLABLE);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_PRECISION ) >>= m_nPrecision) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_PRECISION);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_SCALE ) >>= m_nScale) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_SCALE);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_TYPE ) >>= m_nType) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_TYPE);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_ISAUTOINCREMENT);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_ISCURRENCY);
+
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_NAME);
m_bRowVersion = false;
Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );
if ( xPSI->hasPropertyByName( PROPERTY_DEFAULTVALUE ) )
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_DEFAULTVALUE ) >>= m_aDefaultValue );
+ if( ! (_rxParserColumn->getPropertyValue( PROPERTY_DEFAULTVALUE ) >>= m_aDefaultValue) )
+ SAL_WARN("dbaccess.core", "OQueryColumn: unable to get property " PROPERTY_DEFAULTVALUE);
// copy some optional properties from the parser column
struct PropertyDescriptor
@@ -230,9 +247,12 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const
// determine the composed table name, plus the column name, as indicated by the
// respective properties
OUString sCatalog, sSchema, sTable;
- OSL_VERIFY( getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog );
- OSL_VERIFY( getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema );
- OSL_VERIFY( getPropertyValue( PROPERTY_TABLENAME ) >>= sTable );
+ if( ! (getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog) )
+ SAL_WARN("dbaccess.core", "impl_determineOriginalTableColumn: unable to get property " PROPERTY_CATALOGNAME);
+ if( ! (getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema) )
+ SAL_WARN("dbaccess.core", "impl_determineOriginalTableColumn: unable to get property " PROPERTY_SCHEMANAME);
+ if( ! (getPropertyValue( PROPERTY_TABLENAME ) >>= sTable) )
+ SAL_WARN("dbaccess.core", "impl_determineOriginalTableColumn: unable to get property " PROPERTY_TABLENAME);
if ( sCatalog.isEmpty() && sSchema.isEmpty() && sTable.isEmpty() )
return nullptr;
@@ -249,7 +269,8 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const
Reference< XNameAccess > xColumns( xSuppCols->getColumns(), UNO_SET_THROW );
OUString sColumn;
- OSL_VERIFY( getPropertyValue( PROPERTY_REALNAME ) >>= sColumn );
+ if( ! (getPropertyValue( PROPERTY_REALNAME ) >>= sColumn) )
+ SAL_WARN("dbaccess.core", "impl_determineOriginalTableColumn: unable to get property " PROPERTY_REALNAME);
if ( !xColumns->hasByName( sColumn ) )
return nullptr;