diff options
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/parameters.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/ado/ADatabaseMetaData.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx | 8 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_preparedstatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xtables.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/parse/sqlbison.y | 10 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 18 |
9 files changed, 26 insertions, 26 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index f671e6b454c9..bcd6a8e55ab4 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -340,7 +340,7 @@ namespace } } - if ( aSql.getLength() ) + if ( !aSql.isEmpty() ) { if ( aSql[aSql.getLength() - 1] == ',' ) aSql[aSql.getLength() - 1] = ')'; diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index 3d6fa6c4523d..bd3c5f2c6c07 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -388,7 +388,7 @@ namespace dbtools ++aComponent ) { - if ( sAdditionalFilter.getLength() ) + if ( !sAdditionalFilter.isEmpty() ) sAdditionalFilter.append(s_sAnd); sAdditionalFilter.appendAscii("( ",((sal_Int32)(sizeof("( ")-1))); diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index cf8821f423f0..634660f40558 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx @@ -920,7 +920,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc aRecordset.MoveNext(); } aRecordset.Close(); - if ( aRet.getLength() ) + if ( !aRet.isEmpty() ) return aRet.copy(0,aRet.lastIndexOf(',')); } return ::rtl::OUString(); diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 0a07e1d1ecc8..3f2a96bfbd68 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -161,7 +161,7 @@ namespace connectivity ::rtl::OUString sPermittedMethod; OSL_VERIFY( aConfig.getNodeValue( *pNodeNames ) >>= sPermittedMethod ); - if ( aPermittedMethods.getLength() ) + if ( !aPermittedMethods.isEmpty() ) aPermittedMethods.append( (sal_Unicode)';' ); aPermittedMethods.append( sPermittedMethod ); } diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx index 45d891fa3a5b..9b88aea0df5d 100644 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx @@ -1333,7 +1333,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc aValue.appendAscii("UCASE,"); - if ( aValue.getLength() ) + if ( !aValue.isEmpty() ) aValue.setLength(aValue.getLength()-1); return aValue.makeStringAndClear(); @@ -1388,7 +1388,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc if(nValue & SQL_FN_TD_YEAR) aValue.appendAscii("YEAR,"); - if ( aValue.getLength() ) + if ( !aValue.isEmpty() ) aValue.setLength(aValue.getLength()-1); return aValue.makeStringAndClear(); @@ -1407,7 +1407,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc if(nValue & SQL_FN_SYS_USERNAME) aValue.appendAscii("USERNAME,"); - if ( aValue.getLength() ) + if ( !aValue.isEmpty() ) aValue.setLength(aValue.getLength()-1); return aValue.makeStringAndClear(); @@ -1468,7 +1468,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion( ) throw(RuntimeExc if(nValue & SQL_FN_NUM_TRUNCATE) aValue.appendAscii("TRUNCATE,"); - if ( aValue.getLength() ) + if ( !aValue.isEmpty() ) aValue.setLength(aValue.getLength()-1); return aValue.makeStringAndClear(); diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx index 3cc66654e686..b2aa68313743 100644 --- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx +++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx @@ -697,7 +697,7 @@ void PreparedStatement::setObjectWithInfo( { x >>= myString; } - if( myString.getLength() ) + if( !myString.isEmpty() ) { // printf( "setObjectWithInfo %s\n", OUStringToOString(myString,RTL_TEXTENCODING_ASCII_US).getStr()); setString( parameterIndex, myString ); diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx index 92c0f12f2dfe..844ae3a5dbb0 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx @@ -234,7 +234,7 @@ static void appendColumnList( { buf.append( type ); } - if( defaultValue.getLength() ) + if( !defaultValue.isEmpty() ) { bufferQuoteConstant( buf, defaultValue, settings ); } @@ -300,7 +300,7 @@ void Tables::appendByDescriptor( // description .... OUString description = extractStringProperty( descriptor, st.DESCRIPTION ); - if( description.getLength() ) + if( !description.isEmpty() ) { buf = OUStringBuffer( 128 ); buf.append( "COMMENT ON TABLE" ); @@ -322,7 +322,7 @@ void Tables::appendByDescriptor( { Reference< XPropertySet > column( xEnum->nextElement(), UNO_QUERY ); description = extractStringProperty( column,st.DESCRIPTION ); - if( description.getLength() ) + if( !description.isEmpty() ) { buf = OUStringBuffer( 128 ); buf.append( "COMMENT ON COLUMN " ); diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index 338d73853e65..0bb7c316e1a4 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4680,9 +4680,9 @@ OSQLParseNode* OSQLParser::parseTree(::rtl::OUString& rErrorMessage, if (SQLyyparse() != 0) { // only set the error message, if it's not already set - if (!m_sErrorMessage.getLength()) + if (m_sErrorMessage.isEmpty()) m_sErrorMessage = s_pScanner->getErrorMessage(); - if (!m_sErrorMessage.getLength()) + if (m_sErrorMessage.isEmpty()) m_sErrorMessage = m_pContext->getErrorMessage(IParseContext::ERROR_GENERAL); rErrorMessage = m_sErrorMessage; @@ -4736,7 +4736,7 @@ OSQLParseNode* OSQLParser::parseTree(::rtl::OUString& rErrorMessage, aStr = pContext->getIntlKeywordAscii(eKeyCode); } - if (!aStr.getLength()) + if (aStr.isEmpty()) { aStr = yytname[YYTRANSLATE(nTokenID)]; if(aStr.startsWith("SQL_TOKEN_")) @@ -4875,7 +4875,7 @@ void OSQLParser::reduceLiteral(OSQLParseNode*& pLiteral, sal_Bool bAppendBlank) // ------------------------------------------------------------------------- void OSQLParser::error(const sal_Char *fmt) { - if(!m_sErrorMessage.getLength()) + if(m_sErrorMessage.isEmpty()) { ::rtl::OUString sStr(fmt,strlen(fmt),RTL_TEXTENCODING_UTF8); ::rtl::OUString sSQL_TOKEN("SQL_TOKEN_"); @@ -4900,7 +4900,7 @@ void OSQLParser::error(const sal_Char *fmt) m_sErrorMessage = sStr; ::rtl::OUString aError = s_pScanner->getErrorMessage(); - if(aError.getLength()) + if(!aError.isEmpty()) { m_sErrorMessage += ::rtl::OUString(", "); m_sErrorMessage += aError; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 7acb62cf734c..779b638e6870 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -359,7 +359,7 @@ void OSQLParseNode::impl_parseNodeToString_throw(::rtl::OUStringBuffer& rString, // special handling for parameters case parameter: { - if(rString.getLength()) + if(!rString.isEmpty()) rString.appendAscii(" "); if (nCount == 1) // ? m_aChildren[0]->impl_parseNodeToString_throw( rString, rParam ); @@ -608,7 +608,7 @@ bool OSQLParseNode::impl_parseTableNameNodeToString_throw( ::rtl::OUStringBuffer // parse the sub-select to SDBC level, too ::rtl::OUStringBuffer sSubSelect; pSubQueryNode->impl_parseNodeToString_throw( sSubSelect, rParam ); - if ( sSubSelect.getLength() ) + if ( !sSubSelect.isEmpty() ) sCommand = sSubSelect.makeStringAndClear(); } } @@ -1709,7 +1709,7 @@ sal_Bool OSQLParseNode::addDateValue(::rtl::OUStringBuffer& rString, const SQLPa } } - if (rString.getLength()) + if (!rString.isEmpty()) rString.appendAscii(" "); rString.append(suQuote); const ::rtl::OUString sTokenValue = pODBCNode->m_aChildren[1]->getTokenValue(); @@ -2400,19 +2400,19 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode { case SQL_NODE_KEYWORD: { - if (rString.getLength()) + if (!rString.isEmpty()) rString.appendAscii(" "); const ::rtl::OString sT = OSQLParser::TokenIDToStr(m_nNodeID, rParam.bInternational ? &rParam.m_rContext : NULL); rString.append(::rtl::OStringToOUString(sT,RTL_TEXTENCODING_UTF8)); } break; case SQL_NODE_STRING: - if (rString.getLength()) + if (!rString.isEmpty()) rString.appendAscii(" "); rString.append(SetQuotation(m_aNodeValue,::rtl::OUString("\'"),::rtl::OUString("\'\'"))); break; case SQL_NODE_NAME: - if (rString.getLength() > 0) + if (!rString.isEmpty()) { switch(rString[rString.getLength()-1]) { @@ -2441,7 +2441,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode rString.append(m_aNodeValue); break; case SQL_NODE_ACCESS_DATE: - if (rString.getLength()) + if (!rString.isEmpty()) rString.appendAscii(" "); rString.appendAscii("#"); rString.append(m_aNodeValue); @@ -2455,7 +2455,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode if (rParam.bInternational && rParam.bPredicate && rParam.cDecSep != '.') aTmp = aTmp.replace('.', rParam.cDecSep); - if (rString.getLength()) + if (!rString.isEmpty()) rString.appendAscii(" "); rString.append(aTmp); @@ -2468,7 +2468,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode } // fall through default: - if (rString.getLength() > 0 && m_aNodeValue.toChar() != '.' && m_aNodeValue.toChar() != ':' ) + if (!rString.isEmpty() && m_aNodeValue.toChar() != '.' && m_aNodeValue.toChar() != ':' ) { switch( rString[rString.getLength() - 1] ) { |