Kaydet (Commit) e2462a38 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: I2520ff8ca5f9c0dd68cc4c5cdc377d455c87898d
üst a52ad6b1
......@@ -306,7 +306,7 @@ void SAL_CALL OConnection::setAutoCommit(sal_Bool autoCommit)
MutexGuard aGuard(m_aMutex);
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
try {
m_settings.cppConnection->setAutoCommit(autoCommit == sal_True);
m_settings.cppConnection->setAutoCommit(autoCommit);
} catch (const sql::SQLException & e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, getConnectionEncoding());
}
......
......@@ -620,7 +620,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert(sal_Int32 /* fromType */, s
OSL_TRACE("ODatabaseMetaData::supportsConvert");
try {
/* ToDo -> use supportsConvert( fromType, toType) */
return meta->supportsConvert()? sal_True:sal_False;
return meta->supportsConvert();
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsConvert", *this);
} catch (const sql::InvalidArgumentException &) {
......@@ -979,7 +979,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency(sal_Int32 setT
return meta->supportsResultSetConcurrency(setType, concurrency==com::sun::star::sdbc::TransactionIsolation::READ_COMMITTED?
sql::TRANSACTION_READ_COMMITTED:
(concurrency == com::sun::star::sdbc::TransactionIsolation::SERIALIZABLE?
sql::TRANSACTION_SERIALIZABLE:sql::TRANSACTION_SERIALIZABLE))? sal_True:sal_False;
sql::TRANSACTION_SERIALIZABLE:sql::TRANSACTION_SERIALIZABLE));
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("ODatabaseMetaData::supportsResultSetConcurrency", *this);
} catch (const sql::InvalidArgumentException &) {
......
......@@ -189,7 +189,7 @@ sal_Bool SAL_CALL OResultSet::getBoolean(sal_Int32 column)
checkColumnIndex(column);
try {
return m_result->getBoolean(column)? sal_True:sal_False;
return m_result->getBoolean(column);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -523,7 +523,7 @@ sal_Bool SAL_CALL OResultSet::isBeforeFirst()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->isBeforeFirst()? sal_True:sal_False;
return m_result->isBeforeFirst();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -538,7 +538,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->isAfterLast()? sal_True:sal_False;
return m_result->isAfterLast();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -568,7 +568,7 @@ sal_Bool SAL_CALL OResultSet::isLast()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->isLast()? sal_True:sal_False;
return m_result->isLast();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -625,7 +625,7 @@ sal_Bool SAL_CALL OResultSet::first() throw(SQLException, RuntimeException, std:
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->first()? sal_True:sal_False;
return m_result->first();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -640,7 +640,7 @@ sal_Bool SAL_CALL OResultSet::last()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->last()? sal_True:sal_False;
return m_result->last();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -655,7 +655,7 @@ sal_Bool SAL_CALL OResultSet::absolute(sal_Int32 row)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->absolute(row)? sal_True:sal_False;
return m_result->absolute(row);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -670,7 +670,7 @@ sal_Bool SAL_CALL OResultSet::relative(sal_Int32 row)
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->relative(row)? sal_True:sal_False;
return m_result->relative(row);
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -685,7 +685,7 @@ sal_Bool SAL_CALL OResultSet::previous()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->previous()? sal_True:sal_False;
return m_result->previous();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -740,7 +740,7 @@ sal_Bool SAL_CALL OResultSet::next()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->next()? sal_True:sal_False;
return m_result->next();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......@@ -755,7 +755,7 @@ sal_Bool SAL_CALL OResultSet::wasNull()
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
try {
return m_result->wasNull()? sal_True:sal_False;
return m_result->wasNull();
} catch (const sql::SQLException &e) {
mysqlc_sdbc_driver::translateAndThrow(e, *this, m_encoding);
}
......
......@@ -212,7 +212,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCurrency(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isCurrency(column)? sal_True:sal_False;
return meta->isCurrency(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -228,7 +228,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isAutoIncrement(column)? sal_True:sal_False;
return meta->isAutoIncrement(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -244,7 +244,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isSigned(column)? sal_True:sal_False;
return meta->isSigned(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -307,7 +307,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isSearchable(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isSearchable(column)? sal_True:sal_False;
return meta->isSearchable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -323,7 +323,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isReadOnly(column)? sal_True:sal_False;
return meta->isReadOnly(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -339,7 +339,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isDefinitelyWritable(column)? sal_True:sal_False;
return meta->isDefinitelyWritable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......@@ -355,7 +355,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isWritable(sal_Int32 column)
checkColumnIndex(column);
try {
return meta->isWritable(column)? sal_True:sal_False;
return meta->isWritable(column);
} catch (const sql::MethodNotImplementedException &) {
mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSetMetaData::getMetaData", *this);
} catch (const sql::SQLException &e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment