Kaydet (Commit) caab53cf authored tarafından Jelle van der Waa's avatar Jelle van der Waa Kaydeden (comit) Noel Power

fdo#43460 connectivity,extensions,filter,idl,idlc: use isEmpty()

Change-Id: I78ba286be5aa4d731f734e5eb16adb77c686aad9
Reviewed-on: https://gerrit.libreoffice.org/4325Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst 5883e192
...@@ -109,7 +109,7 @@ namespace dbtools ...@@ -109,7 +109,7 @@ namespace dbtools
//-------------------------------------------------------------------- //--------------------------------------------------------------------
void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component ) const void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component ) const
{ {
if ( io_appendTo.getLength() > 0 ) if ( !io_appendTo.isEmpty() )
{ {
io_appendTo.insert( 0, sal_Unicode( '(' ) ); io_appendTo.insert( 0, sal_Unicode( '(' ) );
io_appendTo.insert( 1, sal_Unicode( ' ' ) ); io_appendTo.insert( 1, sal_Unicode( ' ' ) );
......
...@@ -767,7 +767,7 @@ com::sun::star::uno::Sequence< Any > parseArray( const OUString & str ) throw( S ...@@ -767,7 +767,7 @@ com::sun::star::uno::Sequence< Any > parseArray( const OUString & str ) throw( S
} }
if( brackets == 0 ) if( brackets == 0 )
{ {
if( current.getLength() > 0 || doubleQuotedValue ) if( !current.isEmpty() || doubleQuotedValue )
elements.push_back( makeAny( current.makeStringAndClear() ) ); elements.push_back( makeAny( current.makeStringAndClear() ) );
} }
else else
......
...@@ -116,7 +116,7 @@ static bool CheckPlugin( const OString& rPath, list< PluginDescription* >& rDesc ...@@ -116,7 +116,7 @@ static bool CheckPlugin( const OString& rPath, list< PluginDescription* >& rDesc
} }
pclose( pResult ); pclose( pResult );
if( aMIME.getLength() > 0 ) if( !aMIME.isEmpty() )
{ {
OString aLine = aMIME.makeStringAndClear(); OString aLine = aMIME.makeStringAndClear();
......
...@@ -68,7 +68,7 @@ OString DXFReadLine(SvStream& rIStm) ...@@ -68,7 +68,7 @@ OString DXFReadLine(SvStream& rIStm)
} }
} }
if( !bEnd && !rIStm.GetError() && aBuf.getLength() ) if( !bEnd && !rIStm.GetError() && !aBuf.isEmpty() )
bEnd = sal_True; bEnd = sal_True;
nOldFilePos += aBuf.getLength(); nOldFilePos += aBuf.getLength();
......
...@@ -505,7 +505,7 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>& ...@@ -505,7 +505,7 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
SvClassElement * pEle = aClassList[n]; SvClassElement * pEle = aClassList[n];
SvMetaClass * pCl = pEle->GetClass(); SvMetaClass * pCl = pEle->GetClass();
OStringBuffer rPre(rPrefix); OStringBuffer rPre(rPrefix);
if( rPre.getLength() && pEle->GetPrefix().getLength() ) if( !rPre.isEmpty() && !pEle->GetPrefix().isEmpty() )
rPre.append('.'); rPre.append('.');
rPre.append(pEle->GetPrefix()); rPre.append(pEle->GetPrefix());
......
...@@ -790,7 +790,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase, ...@@ -790,7 +790,7 @@ void SvMetaSlot::WriteAttributesSvIdl( SvIdlDataBase & rBase,
aDel = ", "; aDel = ", ";
} }
if( aOut.getLength() ) if( !aOut.isEmpty() )
{ {
WriteTab( rOutStm, nTab ); WriteTab( rOutStm, nTab );
rOutStm << aOut.getStr() << endl; rOutStm << aOut.getStr() << endl;
......
...@@ -67,7 +67,7 @@ static sal_Bool checkOutputPath(const OString& completeName) ...@@ -67,7 +67,7 @@ static sal_Bool checkOutputPath(const OString& completeName)
{ {
buffer.append(sysPathName.getToken(0, SEPARATOR, nIndex)); buffer.append(sysPathName.getToken(0, SEPARATOR, nIndex));
if ( buffer.getLength() > 0 && nIndex != -1 ) if ( !buffer.isEmpty() && nIndex != -1 )
{ {
#if defined(SAL_UNX) #if defined(SAL_UNX)
if (mkdir((char*)buffer.getStr(), 0777) == -1) if (mkdir((char*)buffer.getStr(), 0777) == -1)
......
...@@ -222,7 +222,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgum ...@@ -222,7 +222,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) throw(IllegalArgum
sal_Int32 k = 0; sal_Int32 k = 0;
do do
{ {
if (buffer.getLength() > 0) if (!buffer.isEmpty())
buffer.append(' '); buffer.append(' ');
// buffer.append("-I\""); // buffer.append("-I\"");
buffer.append(param.getToken(0, ';', k)); buffer.append(param.getToken(0, ';', k));
......
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