Kaydet (Commit) 34f50399 authored tarafından Jelle van der Waa's avatar Jelle van der Waa Kaydeden (comit) Thomas Arnhold

fdo#43460 shell,vcl,xmlreader: use isEmpty()

Change-Id: Ie3d16da6c246b79c4c304b21476f84b2788f0d6e
Reviewed-on: https://gerrit.libreoffice.org/4444Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarThomas Arnhold <thomas@arnhold.org>
Tested-by: 's avatarThomas Arnhold <thomas@arnhold.org>
üst 64245c10
...@@ -236,7 +236,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar ...@@ -236,7 +236,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
} }
// Prefer DESKTOP_LAUNCH when available // Prefer DESKTOP_LAUNCH when available
if ( aLaunchBuffer.getLength() > 0 ) if ( !aLaunchBuffer.isEmpty() )
{ {
FILE *pLaunch = popen( aLaunchBuffer.makeStringAndClear().getStr(), "w" ); FILE *pLaunch = popen( aLaunchBuffer.makeStringAndClear().getStr(), "w" );
if ( pLaunch != NULL ) if ( pLaunch != NULL )
......
...@@ -115,7 +115,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub ...@@ -115,7 +115,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
// append net path // append net path
aPathBuffer.append( getOfficePath( psp::InstallationRootPath ) ); aPathBuffer.append( getOfficePath( psp::InstallationRootPath ) );
if( aPathBuffer.getLength() ) if( !aPathBuffer.isEmpty() )
{ {
aPathBuffer.appendAscii( "/share/psprint" ); aPathBuffer.appendAscii( "/share/psprint" );
if( pSubDir ) if( pSubDir )
...@@ -127,7 +127,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub ...@@ -127,7 +127,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
} }
// append user path // append user path
aPathBuffer.append( getOfficePath( psp::UserPath ) ); aPathBuffer.append( getOfficePath( psp::UserPath ) );
if( aPathBuffer.getLength() ) if( !aPathBuffer.isEmpty() )
{ {
aPathBuffer.appendAscii( "/user/psprint" ); aPathBuffer.appendAscii( "/user/psprint" );
if( pSubDir ) if( pSubDir )
......
...@@ -32,7 +32,7 @@ void Pad::add(char const * begin, sal_Int32 length) { ...@@ -32,7 +32,7 @@ void Pad::add(char const * begin, sal_Int32 length) {
begin != 0 && length >= 0 && !(span_.is() && buffer_.getLength() != 0)); begin != 0 && length >= 0 && !(span_.is() && buffer_.getLength() != 0));
if (length != 0) { if (length != 0) {
flushSpan(); flushSpan();
if (buffer_.getLength() == 0) { if (buffer_.isEmpty()) {
span_ = Span(begin, length); span_ = Span(begin, length);
} else { } else {
buffer_.append(begin, length); buffer_.append(begin, length);
...@@ -59,7 +59,7 @@ Span Pad::get() const { ...@@ -59,7 +59,7 @@ Span Pad::get() const {
assert(!(span_.is() && buffer_.getLength() != 0)); assert(!(span_.is() && buffer_.getLength() != 0));
if (span_.is()) { if (span_.is()) {
return span_; return span_;
} else if (buffer_.getLength() == 0) { } else if (buffer_.isEmpty()) {
return Span(""); return Span("");
} else { } else {
return Span(buffer_.getStr(), buffer_.getLength()); return Span(buffer_.getStr(), buffer_.getLength());
......
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