fdo#43460: use isEmpty()
Change-Id: Ia768e684d3cf255239c04d024b35488830cc9fe6
This commit is contained in:
@@ -107,7 +107,7 @@ void MediaWindowBaseImpl::setURL( const OUString& rURL,
|
||||
mxPlayer.clear();
|
||||
mTempFileURL = OUString();
|
||||
|
||||
if (rTempURL.getLength())
|
||||
if (!rTempURL.isEmpty())
|
||||
{
|
||||
maFileURL = rURL;
|
||||
mTempFileURL = rTempURL;
|
||||
@@ -123,7 +123,7 @@ void MediaWindowBaseImpl::setURL( const OUString& rURL,
|
||||
}
|
||||
|
||||
mxPlayer = createPlayer(
|
||||
(mTempFileURL.getLength()) ? mTempFileURL : maFileURL );
|
||||
(!mTempFileURL.isEmpty()) ? mTempFileURL : maFileURL );
|
||||
onURLChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace basegfx
|
||||
}
|
||||
}
|
||||
|
||||
if(sNumberString.getLength())
|
||||
if(!sNumberString.isEmpty())
|
||||
{
|
||||
rtl_math_ConversionStatus eStatus;
|
||||
o_fRetval = ::rtl::math::stringToDouble( sNumberString.makeStringAndClear(),
|
||||
|
||||
@@ -299,7 +299,7 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& rName )
|
||||
// in the RunInit yet
|
||||
|
||||
SbxVariable* pElem = NULL;
|
||||
if( !pMod || !rName.getLength() )
|
||||
if( !pMod || rName.isEmpty() )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -406,7 +406,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
|
||||
{
|
||||
SbxVariable* pVar = refArgv->Get( i );
|
||||
const OUString& rName = refArgv->GetAlias( i );
|
||||
if( rName.getLength() )
|
||||
if( !rName.isEmpty() )
|
||||
{
|
||||
pNames[i] = rName;
|
||||
}
|
||||
@@ -463,7 +463,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 )
|
||||
{
|
||||
SbxVariable* pVar = refArgv->Get( i );
|
||||
const OUString& rName = refArgv->GetAlias( i );
|
||||
if( rName.getLength() )
|
||||
if( !rName.isEmpty() )
|
||||
{
|
||||
// nCurPar is set to the found parameter
|
||||
sal_uInt16 j = 1;
|
||||
|
||||
@@ -1469,7 +1469,7 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
|
||||
{
|
||||
OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r,
|
||||
RTL_TEXTENCODING_ASCII_US);
|
||||
if( aVal.getLength() )
|
||||
if( !aVal.isEmpty() )
|
||||
aData.pOUString = new OUString( aVal );
|
||||
else
|
||||
aData.pOUString = NULL; // JSM 1995-09-22
|
||||
|
||||
@@ -68,7 +68,7 @@ static OString toUNOname( const OString & rRTTIname )
|
||||
{
|
||||
if( *pRTTI == ':' || ! *pRTTI )
|
||||
{
|
||||
if( aRet.getLength() )
|
||||
if( !aRet.isEmpty() )
|
||||
aRet += ".";
|
||||
aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
|
||||
while( *pRTTI == ':' )
|
||||
@@ -102,7 +102,7 @@ static OString toRTTIname( const OString & rUNOname )
|
||||
|
||||
static OString toRTTImangledname( const OString & rRTTIname )
|
||||
{
|
||||
if( ! rRTTIname.getLength() )
|
||||
if( rRTTIname.isEmpty() )
|
||||
return OString();
|
||||
|
||||
OStringBuffer aRet( rRTTIname.getLength()*2 );
|
||||
|
||||
@@ -70,7 +70,7 @@ static OString toUNOname( const OString & rRTTIname )
|
||||
{
|
||||
if( *pRTTI == ':' || ! *pRTTI )
|
||||
{
|
||||
if( aRet.getLength() )
|
||||
if( !aRet.isEmpty() )
|
||||
aRet += ".";
|
||||
aRet += rRTTIname.copy( pLast - pOrg, pRTTI - pLast );
|
||||
while( *pRTTI == ':' )
|
||||
@@ -104,7 +104,7 @@ static OString toRTTIname( const OString & rUNOname )
|
||||
|
||||
static OString toRTTImangledname( const OString & rRTTIname )
|
||||
{
|
||||
if( ! rRTTIname.getLength() )
|
||||
if( rRTTIname.isEmpty() )
|
||||
return OString();
|
||||
|
||||
OStringBuffer aRet( rRTTIname.getLength()*2 );
|
||||
|
||||
@@ -82,14 +82,14 @@ OUString lcl_createClassificationStringForType( ObjectType eObjectType
|
||||
}
|
||||
if( !rDragMethodServiceName.isEmpty() )
|
||||
{
|
||||
if( aRet.getLength() )
|
||||
if( !aRet.isEmpty() )
|
||||
aRet.appendAscii(":");
|
||||
aRet.append( m_aDragMethodEquals );
|
||||
aRet.append( rDragMethodServiceName );
|
||||
|
||||
if( !rDragParameterString.isEmpty() )
|
||||
{
|
||||
if( aRet.getLength() )
|
||||
if( !aRet.isEmpty() )
|
||||
aRet.appendAscii(":");
|
||||
aRet.append( m_aDragParameterEquals );
|
||||
aRet.append( rDragParameterString );
|
||||
|
||||
@@ -515,7 +515,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
|
||||
, nPointIndex, fValue, false /*bAsPercentage*/ ) );
|
||||
if( !aNumber.isEmpty() )
|
||||
{
|
||||
if(aText.getLength())
|
||||
if(!aText.isEmpty())
|
||||
aText.append(aSeparator);
|
||||
aText.append(aNumber);
|
||||
++nLineCountForSymbolsize;
|
||||
@@ -534,7 +534,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
|
||||
, nPointIndex, fValue, true /*bAsPercentage*/ ) );
|
||||
if( !aPercentage.isEmpty() )
|
||||
{
|
||||
if(aText.getLength())
|
||||
if(!aText.isEmpty())
|
||||
aText.append(aSeparator);
|
||||
aText.append(aPercentage);
|
||||
++nLineCountForSymbolsize;
|
||||
@@ -1144,7 +1144,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
|
||||
else
|
||||
aScreenPosition2D = aDefaultPos;
|
||||
|
||||
if( aFormula.getLength())
|
||||
if( !aFormula.isEmpty())
|
||||
{
|
||||
// set fill and line properties on creation
|
||||
tNameSequence aNames;
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
if ( aSql.getLength() )
|
||||
if ( !aSql.isEmpty() )
|
||||
{
|
||||
if ( aSql[aSql.getLength() - 1] == ',' )
|
||||
aSql[aSql.getLength() - 1] = ')';
|
||||
|
||||
@@ -388,7 +388,7 @@ namespace dbtools
|
||||
++aComponent
|
||||
)
|
||||
{
|
||||
if ( sAdditionalFilter.getLength() )
|
||||
if ( !sAdditionalFilter.isEmpty() )
|
||||
sAdditionalFilter.append(s_sAnd);
|
||||
|
||||
sAdditionalFilter.appendAscii("( ",((sal_Int32)(sizeof("( ")-1)));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 " );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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] )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ SAL_IMPLEMENT_MAIN()
|
||||
OUString arg;
|
||||
|
||||
rtl_getAppCommandArg(i, &arg.pData);
|
||||
if (arg.getLength())
|
||||
if (!arg.isEmpty())
|
||||
{
|
||||
Reference<XInterface> xInterface = smgr->createInstance(arg);
|
||||
OString tmp = OUStringToOString(arg, RTL_TEXTENCODING_ASCII_US);
|
||||
|
||||
@@ -162,7 +162,7 @@ static BOOL GetCrashDataPath( LPTSTR szBuffer )
|
||||
::rtl::OUString ustrValue(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/bootstrap.ini:UserInstallation}"));
|
||||
::rtl::Bootstrap::expandMacros( ustrValue );
|
||||
|
||||
if ( ustrValue.getLength() )
|
||||
if ( !ustrValue.isEmpty() )
|
||||
{
|
||||
ustrValue += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/crashdata"));
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
|
||||
::std::list< sal_Int32> aOrgValues;
|
||||
fillParameters(_rInsertRow,_xTable,aCondition,aSql,aOrgValues);
|
||||
aSql[aSql.getLength() - 1] = ' ';
|
||||
if ( aCondition.getLength() )
|
||||
if ( !aCondition.isEmpty() )
|
||||
{
|
||||
aCondition.setLength(aCondition.getLength()-5);
|
||||
|
||||
|
||||
@@ -634,18 +634,18 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
|
||||
else
|
||||
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
|
||||
|
||||
if(sKeyCondition.getLength() || sIndexCondition.getLength())
|
||||
if(!sKeyCondition.isEmpty() || !sIndexCondition.isEmpty())
|
||||
{
|
||||
aSql.append(" WHERE ");
|
||||
if(sKeyCondition.getLength() && sIndexCondition.getLength())
|
||||
if(!sKeyCondition.isEmpty() && !sIndexCondition.isEmpty())
|
||||
{
|
||||
aSql.append(sKeyCondition.makeStringAndClear() + sIndexCondition.makeStringAndClear());
|
||||
}
|
||||
else if(sKeyCondition.getLength())
|
||||
else if(!sKeyCondition.isEmpty())
|
||||
{
|
||||
aSql.append(sKeyCondition.makeStringAndClear());
|
||||
}
|
||||
else if(sIndexCondition.getLength())
|
||||
else if(!sIndexCondition.isEmpty())
|
||||
{
|
||||
aSql.append(sIndexCondition.makeStringAndClear());
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace
|
||||
void lcl_fillKeyCondition(const ::rtl::OUString& i_sTableName,const ::rtl::OUString& i_sQuotedColumnName,const ORowSetValue& i_aValue,TSQLStatements& io_aKeyConditions)
|
||||
{
|
||||
::rtl::OUStringBuffer& rKeyCondition = io_aKeyConditions[i_sTableName];
|
||||
if ( rKeyCondition.getLength() )
|
||||
if ( !rKeyCondition.isEmpty() )
|
||||
rKeyCondition.append(" AND ");
|
||||
rKeyCondition.append(i_sQuotedColumnName);
|
||||
if ( i_aValue.isNull() )
|
||||
@@ -216,7 +216,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
|
||||
(_rInsertRow->get())[aJoinIter->second] = (_rInsertRow->get())[aIter->second.nPosition];
|
||||
}
|
||||
::rtl::OUStringBuffer& rPart = aSql[aIter->second.sTableName];
|
||||
if ( rPart.getLength() )
|
||||
if ( !rPart.isEmpty() )
|
||||
rPart.append(", ");
|
||||
rPart.append(sQuotedColumnName + s_sPara);
|
||||
}
|
||||
@@ -245,7 +245,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
|
||||
::rtl::OUStringBuffer sSql(s_sUPDATE + ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable ) +
|
||||
s_sSET + aSqlIter->second.toString());
|
||||
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
|
||||
if ( rCondition.getLength() )
|
||||
if ( !rCondition.isEmpty() )
|
||||
sSql.append(" WHERE " + rCondition.toString() );
|
||||
|
||||
executeUpdate(_rInsertRow ,_rOrginalRow,sSql.makeStringAndClear(),aSqlIter->first);
|
||||
@@ -284,11 +284,11 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
|
||||
(_rInsertRow->get())[aJoinIter->second] = (_rInsertRow->get())[aIter->second.nPosition];
|
||||
}
|
||||
::rtl::OUStringBuffer& rPart = aSql[aIter->second.sTableName];
|
||||
if ( rPart.getLength() )
|
||||
if ( !rPart.isEmpty() )
|
||||
rPart.append(", ");
|
||||
rPart.append(sQuotedColumnName);
|
||||
::rtl::OUStringBuffer& rParam = aParameter[aIter->second.sTableName];
|
||||
if ( rParam.getLength() )
|
||||
if ( !rParam.isEmpty() )
|
||||
rParam.append(", ");
|
||||
rParam.append("?");
|
||||
}
|
||||
@@ -313,7 +313,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
|
||||
s_sVALUES + aParameter[aSqlIter->first].toString() + " )");
|
||||
|
||||
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
|
||||
if ( rCondition.getLength() )
|
||||
if ( !rCondition.isEmpty() )
|
||||
{
|
||||
::rtl::OUString sQuery("SELECT " + aSqlIter->second.toString() + " FROM " + sComposedTableName +
|
||||
" WHERE " + rCondition.toString());
|
||||
@@ -376,7 +376,7 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne
|
||||
for(;aSqlIter != aSqlEnd ; ++aSqlIter)
|
||||
{
|
||||
::rtl::OUStringBuffer& rCondition = aSqlIter->second;
|
||||
if ( rCondition.getLength() )
|
||||
if ( !rCondition.isEmpty() )
|
||||
{
|
||||
::rtl::OUString sCatalog,sSchema,sTable;
|
||||
::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
|
||||
@@ -621,7 +621,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
|
||||
lcl_fillKeyCondition(aColIter->second.sTableName,sQuotedColumnName,io_aRow[aColIter->second.nPosition],aKeyConditions);
|
||||
}
|
||||
::rtl::OUStringBuffer& rPart = aSql[aColIter->second.sTableName];
|
||||
if ( rPart.getLength() )
|
||||
if ( !rPart.isEmpty() )
|
||||
rPart.append(", ");
|
||||
rPart.append(sQuotedColumnName);
|
||||
}
|
||||
@@ -633,7 +633,7 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
|
||||
if ( aSqlIter->second.getLength() )
|
||||
{
|
||||
::rtl::OUStringBuffer& rCondition = aKeyConditions[aSqlIter->first];
|
||||
if ( rCondition.getLength() )
|
||||
if ( !rCondition.isEmpty() )
|
||||
{
|
||||
::rtl::OUString sCatalog,sSchema,sTable;
|
||||
::dbtools::qualifiedNameComponents(xMetaData,aSqlIter->first,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
|
||||
|
||||
@@ -669,7 +669,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
|
||||
|
||||
Sequence< PropertyValue > aUserPwd(nAdditionalArgs);
|
||||
sal_Int32 nArgPos = 0;
|
||||
if (sUser.getLength())
|
||||
if (!sUser.isEmpty())
|
||||
{
|
||||
aUserPwd[ nArgPos ].Name = "user";
|
||||
aUserPwd[ nArgPos ].Value <<= sUser;
|
||||
|
||||
@@ -924,12 +924,12 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
|
||||
|
||||
m_aTypeCollection.extractHostNamePort( sURL, sDatabaseName, sHostName, nPortNumber );
|
||||
|
||||
if ( !sDatabaseName.getLength() )
|
||||
if ( sDatabaseName.isEmpty() )
|
||||
sDatabaseName = m_aTypeCollection.cutPrefix( sURL );
|
||||
if ( m_aTypeCollection.isFileSystemBased(sURL) )
|
||||
{
|
||||
sDatabaseName = SvtPathOptions().SubstituteVariable( sDatabaseName );
|
||||
if ( sDatabaseName.getLength() )
|
||||
if ( !sDatabaseName.isEmpty() )
|
||||
{
|
||||
::svt::OFileNotation aFileNotation(sDatabaseName);
|
||||
// set this decoded URL as text
|
||||
@@ -937,7 +937,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
|
||||
}
|
||||
}
|
||||
|
||||
if ( sDatabaseName.getLength() == 0 )
|
||||
if ( sDatabaseName.isEmpty() )
|
||||
sDatabaseName = m_aTypeCollection.getTypeDisplayName( sURL );
|
||||
|
||||
aReturn.sTitle = sDatabaseName;
|
||||
@@ -1729,7 +1729,7 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType)
|
||||
|
||||
xLayoutManager->lock();
|
||||
xLayoutManager->destroyElement( sDestroyToolbar );
|
||||
if ( sToolbar.getLength() )
|
||||
if ( !sToolbar.isEmpty() )
|
||||
{
|
||||
xLayoutManager->createElement( sToolbar );
|
||||
xLayoutManager->requestElement( sToolbar );
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace dbaui
|
||||
if ( !pJdbcDrvItem->GetValue().getLength() )
|
||||
{
|
||||
OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
|
||||
if ( sDefaultJdbcDriverName.getLength() )
|
||||
if ( !sDefaultJdbcDriverName.isEmpty() )
|
||||
{
|
||||
m_aJavaDriver.SetText(sDefaultJdbcDriverName);
|
||||
m_aJavaDriver.SetModifyFlag();
|
||||
|
||||
@@ -638,7 +638,7 @@ DBG_NAME(OMySQLIntroPageSetup)
|
||||
if ( !pDrvItem->GetValue().getLength() )
|
||||
{
|
||||
OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
|
||||
if ( sDefaultJdbcDriverName.getLength() )
|
||||
if ( !sDefaultJdbcDriverName.isEmpty() )
|
||||
{
|
||||
m_aETDriverClass.SetText(sDefaultJdbcDriverName);
|
||||
m_aETDriverClass.SetModifyFlag();
|
||||
|
||||
@@ -258,7 +258,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
|
||||
OUString sLoginRequest(ModuleRes(STR_ENTER_CONNECTION_PASSWORD));
|
||||
OUString sTemp = sName;
|
||||
sName = ::dbaui::getStrippedDatabaseName(NULL,sTemp);
|
||||
if ( sName.getLength() )
|
||||
if ( !sName.isEmpty() )
|
||||
sLoginRequest = sLoginRequest.replaceAll("$name$", sName);
|
||||
else
|
||||
{
|
||||
@@ -313,7 +313,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert
|
||||
m_pItemSetHelper->getWriteOutputSet()->Put(SfxStringItem(DSID_PASSWORD, sPassword));
|
||||
}
|
||||
|
||||
if (sPassword.getLength())
|
||||
if (!sPassword.isEmpty())
|
||||
aReturn.push_back(
|
||||
PropertyValue( OUString("password"), 0,
|
||||
makeAny(OUString(sPassword)), PropertyState_DIRECT_VALUE));
|
||||
@@ -514,7 +514,7 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
|
||||
// Huh? Anybody there?
|
||||
// OJ: It is needed when the connection properties are changed. There the URL is used for every type.
|
||||
|
||||
if ( sDatabaseName.getLength() )
|
||||
if ( !sDatabaseName.isEmpty() )
|
||||
{
|
||||
sNewUrl += OUString::createFromAscii("/") + sDatabaseName;
|
||||
}
|
||||
@@ -529,9 +529,9 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const
|
||||
{
|
||||
sNewUrl = "@" + lcl_createHostWithPort(pHostName,pPortNumber);
|
||||
OUString sDatabaseName = pDatabaseName ? pDatabaseName->GetValue() : OUString();
|
||||
if ( !sDatabaseName.getLength() && pUrlItem )
|
||||
if ( sDatabaseName.isEmpty() && pUrlItem )
|
||||
sDatabaseName = pCollection->cutPrefix( pUrlItem->GetValue() );
|
||||
if ( sDatabaseName.getLength() )
|
||||
if ( !sDatabaseName.isEmpty() )
|
||||
{
|
||||
sNewUrl += OUString::createFromAscii(":") + sDatabaseName;
|
||||
}
|
||||
@@ -1080,7 +1080,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
|
||||
break;
|
||||
}
|
||||
|
||||
if ( sUrlPart.getLength() )
|
||||
if ( !sUrlPart.isEmpty() )
|
||||
{
|
||||
if ( eTy == ::dbaccess::DST_MYSQL_NATIVE )
|
||||
{
|
||||
@@ -1094,7 +1094,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
|
||||
}
|
||||
}
|
||||
|
||||
if ( sNewHostName.getLength() )
|
||||
if ( !sNewHostName.isEmpty() )
|
||||
_rDest.Put(SfxStringItem(DSID_CONN_HOSTNAME, sNewHostName));
|
||||
|
||||
if ( nPortNumber != -1 && nPortNumberId != 0 )
|
||||
|
||||
@@ -51,7 +51,7 @@ BSTR PromptNew(long hWnd);
|
||||
::rtl::OUString getAdoDatalink(long hWnd,::rtl::OUString& oldLink)
|
||||
{
|
||||
::rtl::OUString dataLink;
|
||||
if (oldLink.getLength())
|
||||
if (!oldLink.isEmpty())
|
||||
{
|
||||
dataLink=reinterpret_cast<sal_Unicode *>(PromptEdit(hWnd,(BSTR)oldLink.getStr()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user