From 4888f82557f8aec29b1f7fa729888d1c71aef596 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 15 Dec 2014 10:17:33 +0100 Subject: shell: Use appropriate OUString functions on string constants Change-Id: I2647295383085abf8f217693531ef82632eb4c52 --- shell/source/cmdmail/cmdmailmsg.cxx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'shell/source/cmdmail/cmdmailmsg.cxx') diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx index 34adde9a5e1d..287a73513450 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( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() ) + if( aName == "body" && !m_aBody.isEmpty() ) return makeAny( m_aBody ); - if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() ) + if( aName == "from" && !m_aOriginator.isEmpty() ) return makeAny( m_aOriginator ); - else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() ) + else if( aName == "to" && !m_aRecipient.isEmpty() ) return makeAny( m_aRecipient ); - else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() ) + else if( aName == "cc" && m_CcRecipients.getLength() ) return makeAny( m_CcRecipients ); - else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() ) + else if( aName == "bcc" && m_BccRecipients.getLength() ) return makeAny( m_BccRecipients ); - else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() ) + else if( aName == "subject" && !m_aSubject.isEmpty() ) return makeAny( m_aSubject ); - else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() ) + else if( aName == "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( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() ) + if( aName == "body" && !m_aBody.isEmpty() ) return sal_True; - if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() ) + if( aName == "from" && !m_aOriginator.isEmpty() ) return sal_True; - else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() ) + else if( aName == "to" && !m_aRecipient.isEmpty() ) return sal_True; - else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() ) + else if( aName == "cc" && m_CcRecipients.getLength() ) return sal_True; - else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() ) + else if( aName == "bcc" && m_BccRecipients.getLength() ) return sal_True; - else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() ) + else if( aName == "subject" && !m_aSubject.isEmpty() ) return sal_True; - else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() ) + else if( aName == "attachment" && m_Attachments.getLength() ) return sal_True; return sal_False; -- cgit