summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 11:06:18 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:12 +0200
commit0a9ef5a18e148c7a5c9a088e153a7873d1564841 (patch)
tree3c3bc21e7ee4f836a1d056695175e0b1a91eda26 /shell
parent7944301424aac0943e4ecc0410f495b210ad3b79 (diff)
convert OUString 0==compareToAscii to equalsAscii
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
Diffstat (limited to 'shell')
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index fa080d92f9a6..b5cfbf0d75d9 100644
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -132,25 +132,25 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "body" ) && !m_aBody.isEmpty() )
+ if( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() )
return makeAny( m_aBody );
- if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
+ if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() )
return makeAny( m_aOriginator );
- else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
+ else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() )
return makeAny( m_aRecipient );
- else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
+ else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() )
return makeAny( m_CcRecipients );
- else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
+ else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() )
return makeAny( m_BccRecipients );
- else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
+ else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() )
return makeAny( m_aSubject );
- else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
+ else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() )
return makeAny( m_Attachments );
throw NoSuchElementException("key not found: " + aName,
@@ -195,25 +195,25 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "body" ) && !m_aBody.isEmpty() )
+ if( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() )
return sal_True;
- if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
+ if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
+ else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
+ else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() )
return sal_True;
- else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
+ else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() )
return sal_True;
- else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
+ else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
+ else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() )
return sal_True;
return sal_False;