summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorBenjamin Ni <benjaminniri@hotmail.com>2015-09-25 11:41:53 +0100
committerMichael Stahl <mstahl@redhat.com>2015-11-02 23:40:57 +0100
commitbe729e772196f33543e21cb9bac21add87726b20 (patch)
treef2150f458e2b07f8924b4702d37c09c8dd52215a /connectivity
parent6ccf68622e51c1b727dd042c1c1a71b5d1fd6a12 (diff)
tdf#94269: Replace "n" prefix for bool variables with "b"
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbmetadata.cxx14
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx6
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx6
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx3
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx6
6 files changed, 21 insertions, 24 deletions
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index f5a987b51b07..48f1bcba26df 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -221,11 +221,11 @@ namespace dbtools
{
lcl_checkConnected( *m_pImpl );
- bool supportsSubQueries = false;
+ bool bSupportsSubQueries = false;
try
{
sal_Int32 maxTablesInselect = m_pImpl->xConnectionMetaData->getMaxTablesInSelect();
- supportsSubQueries = ( maxTablesInselect > 1 ) || ( maxTablesInselect == 0 );
+ bSupportsSubQueries = ( maxTablesInselect > 1 ) || ( maxTablesInselect == 0 );
// TODO: is there a better way to determine this? The above is not really true. More precise,
// it's a *very* generous heuristics ...
}
@@ -233,7 +233,7 @@ namespace dbtools
{
DBG_UNHANDLED_EXCEPTION();
}
- return supportsSubQueries;
+ return bSupportsSubQueries;
}
@@ -241,21 +241,21 @@ namespace dbtools
{
lcl_checkConnected( *m_pImpl );
- bool doesSupportPrimaryKeys = false;
+ bool bDoesSupportPrimaryKeys = false;
try
{
Any setting;
if ( !( lcl_getConnectionSetting( "PrimaryKeySupport", *m_pImpl, setting ) )
- || !( setting >>= doesSupportPrimaryKeys )
+ || !( setting >>= bDoesSupportPrimaryKeys )
)
- doesSupportPrimaryKeys = m_pImpl->xConnectionMetaData->supportsCoreSQLGrammar()
+ bDoesSupportPrimaryKeys = m_pImpl->xConnectionMetaData->supportsCoreSQLGrammar()
|| m_pImpl->xConnectionMetaData->supportsANSI92EntryLevelSQL();
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
}
- return doesSupportPrimaryKeys;
+ return bDoesSupportPrimaryKeys;
}
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index b4394c7fbbf4..94da5b8df579 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -286,13 +286,13 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
// Set the 'name' property of the boolString.
OString attrName = _aQuery->getColumnAlias().getProgrammaticNameOrFallbackToUTF8Alias( evStr->getName() );
SAL_INFO("connectivity.mork", "Name = " << attrName.getStr());
- bool requiresValue = true;
+ bool bRequiresValue = true;
OUString currentValue = entry->getValue(attrName);
if (evStr->getCond() == MQueryOp::Exists || evStr->getCond() == MQueryOp::DoesNotExist)
{
- requiresValue = false;
+ bRequiresValue = false;
}
- if (requiresValue)
+ if (bRequiresValue)
{
SAL_INFO("connectivity.mork", "Value = " << evStr->getValue() );
OUString searchedValue = evStr->getValue();
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index bcdda99e104e..d976a8d5b15f 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -670,11 +670,11 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
std::cout << "\t\t\t\t Cells:\r\n";
#endif
// Get cells
- bool listFound = false;
+ bool isListFound = false;
for ( MorkCells::iterator cellsIter = RowIter->second.begin();
cellsIter != RowIter->second.end(); ++cellsIter )
{
- if (listFound)
+ if (isListFound)
{
if (cellsIter->first >= 0xC7)
{
@@ -686,7 +686,7 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
else if ((cellsIter->first == 0xC1) &&
listName == getValue( cellsIter->second ))
{
- listFound = true;
+ isListFound = true;
}
}
diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
index 8505d48cb8cf..f5b3c185888f 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx
@@ -60,9 +60,6 @@ MozillaBootstrap::~MozillaBootstrap()
void MozillaBootstrap::Init()
{
- bool aProfileExists=false;
-
- (void)aProfileExists; /* avoid warning about unused parameter */
m_ProfileAccess = new ProfileAccess();
bootupProfile(::com::sun::star::mozilla::MozillaProductType_Mozilla,OUString());
}
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 1935da6460a3..7a0a3ed5deb5 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -59,7 +59,7 @@ namespace
// for now, never use wchar,
// but most of code is prepared to handle it
// in case we make this configurable
- const bool useWChar = false;
+ const bool bUseWChar = false;
}
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString& sql)
@@ -312,7 +312,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
sal_Int32 nCharLen;
sal_Int32 nByteLen;
void *pData;
- if (useWChar)
+ if (bUseWChar)
{
/*
* On Windows, wchar is 16 bits (UTF-16 encoding), the ODBC "W" variants functions take UTF-16 encoded strings
@@ -384,7 +384,7 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_
void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_Int32 _nType, const SQLULEN _nColumnSize, const sal_Int32 _nScale, const void* const _pData, const SQLULEN _nDataLen, const SQLLEN _nDataAllocLen)
{
SQLSMALLINT fCType, fSqlType;
- OTools::getBindTypes(useWChar, m_pConnection->useOldDateFormat(), OTools::jdbcTypeToOdbc(_nType), fCType, fSqlType);
+ OTools::getBindTypes(bUseWChar, m_pConnection->useOldDateFormat(), OTools::jdbcTypeToOdbc(_nType), fCType, fSqlType);
SQLLEN& rDataLen = boundParams[parameterIndex-1].getBindLengthBuffer();
rDataLen = _nDataLen;
@@ -525,7 +525,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, const sal_I
SQLSMALLINT fCType;
SQLSMALLINT fSqlType;
- OTools::getBindTypes( useWChar,
+ OTools::getBindTypes( bUseWChar,
m_pConnection->useOldDateFormat(),
OTools::jdbcTypeToOdbc(_nType),
fCType,
@@ -853,7 +853,7 @@ void OPreparedStatement::setStream(
*lenBuf = SQL_LEN_DATA_AT_EXEC (length);
SQLSMALLINT fCType, fSqlType;
- OTools::getBindTypes(useWChar, m_pConnection->useOldDateFormat(), OTools::jdbcTypeToOdbc(_nType), fCType, fSqlType);
+ OTools::getBindTypes(bUseWChar, m_pConnection->useOldDateFormat(), OTools::jdbcTypeToOdbc(_nType), fCType, fSqlType);
OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!");
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 03c1c31d5576..1347e2a3761b 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -757,7 +757,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
buf.append( "SELECT * FROM " );
bufferQuoteQualifiedIdentifier(buf, schemaName, tableName, pConnectionSettings );
buf.append( " WHERE " );
- bool additionalCondition = false;
+ bool bAdditionalCondition = false;
String2StringMap autoValues;
for( int i = 0 ; i < keyColumnNames.getLength() ; i ++ )
{
@@ -813,12 +813,12 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
}
}
- if( additionalCondition )
+ if( bAdditionalCondition )
buf.append( " AND " );
bufferQuoteIdentifier( buf, keyColumnNames[i], pConnectionSettings );
buf.append( " = " );
buf.append( value );
- additionalCondition = true;
+ bAdditionalCondition = true;
}
query = buf.makeStringAndClear();
}