diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2012-02-27 18:49:17 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2012-02-27 18:50:20 +0530 |
commit | 5d1acca5a9d40d6197e12fd959c3644bcc60f799 (patch) | |
tree | 62b86a10aff70412eddf058044993cbc9d908e36 /vcl/aqua | |
parent | fdd70e63eee34e762f5e4c2568affd35b6bc68af (diff) |
Replace getLength() with isEmpty() where appropriate
Diffstat (limited to 'vcl/aqua')
-rw-r--r-- | vcl/aqua/source/app/salinst.cxx | 6 | ||||
-rw-r--r-- | vcl/aqua/source/app/salsys.cxx | 4 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/HtmlFmtFlt.cxx | 4 | ||||
-rw-r--r-- | vcl/aqua/source/dtrans/PictToBmpFlt.cxx | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index 7a01b0b0c102..794dd840078f 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -997,7 +997,7 @@ rtl::OUString AquaSalInstance::GetDefaultPrinter() // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); - if( ! maDefaultPrinter.getLength() ) + if( maDefaultPrinter.isEmpty() ) { NSPrintInfo* pPI = [NSPrintInfo sharedPrintInfo]; DBG_ASSERT( pPI, "no print info" ); @@ -1138,10 +1138,10 @@ void AquaSalInstance::AddToRecentDocumentList(const rtl::OUString& rFileUrl, con { // Convert file URL for external use (see above) rtl::OUString externalUrl = translateToExternalUrl(rFileUrl); - if( 0 == externalUrl.getLength() ) + if( externalUrl.isEmpty() ) externalUrl = rFileUrl; - if( externalUrl.getLength() && !isDangerousUrl( externalUrl ) ) + if( !externalUrl.isEmpty() && !isDangerousUrl( externalUrl ) ) { NSString* pString = CreateNSString( externalUrl ); NSURL* pURL = [NSURL URLWithString: pString]; diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index 8a371d6bf1cd..7c6f683751c8 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -109,7 +109,7 @@ rtl::OUString AquaSalSystem::GetDisplayScreenName( unsigned int nScreen ) static NSString* getStandardString( int nButtonId ) { rtl::OUString aText( Button::GetStandardText( nButtonId ) ); - if( ! aText.getLength() ) // this is for bad cases, we might be missing the vcl resource + if( aText.isEmpty() ) // this is for bad cases, we might be missing the vcl resource { switch( nButtonId ) { @@ -121,7 +121,7 @@ static NSString* getStandardString( int nButtonId ) case BUTTON_NO : aText = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No" ) );break; } } - return aText.getLength() ? CreateNSString( aText) : nil; + return aText.isEmpty() ? nil : CreateNSString( aText); } int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx index 0bd461d81096..275f5a1cf2a5 100644 --- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx +++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx @@ -65,9 +65,9 @@ const std::string TAG_END_BODY = std::string("</BODY"); Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml) { - OSL_ASSERT(aTextHtml.getLength() > 0); + OSL_ASSERT(!aTextHtml.isEmpty()); - if (!(aTextHtml.getLength() > 0)) + if (aTextHtml.isEmpty()) return Sequence<sal_Int8>(); // fill the buffer with dummy values to calc the exact length diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx index 3eb4fb8d49fc..4b3d3712e36b 100644 --- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx +++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx @@ -161,7 +161,7 @@ bool ImageToBMP( com::sun::star::uno::Sequence<sal_Int8>& aPict, { aBmp.realloc( [pOut length] ); [pOut getBytes: aBmp.getArray() length: aBmp.getLength()]; - bResult = (aBmp.getLength() != 0); + bResult = (!aBmp.isEmpty()); } } } @@ -190,7 +190,7 @@ bool BMPToImage( com::sun::star::uno::Sequence<sal_Int8>& aBmp, { aPict.realloc( [pOut length] ); [pOut getBytes: aPict.getArray() length: aPict.getLength()]; - bResult = (aPict.getLength() != 0); + bResult = (!aPict.isEmpty()); } } } |