summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2012-01-11 11:37:33 -0200
committerOlivier Hallot <olivier.hallot@alta.org.br>2012-01-11 18:43:07 -0200
commit806dce17d6631738c7388d8d68d8b5ac2e4c11a8 (patch)
tree0759954593c2fa8a85b94e5d3a4b4f40e913f091 /shell
parente33702442a22a72f96a093fbfdf8bfac217f416f (diff)
Fix for fdo43460 Part XXXIV getLength() to isEmpty()
Part XXXIV Modules shell, slideshow, sot, starmath
Diffstat (limited to 'shell')
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx18
-rw-r--r--shell/source/cmdmail/cmdmailsuppl.cxx8
-rw-r--r--shell/source/unix/exec/shellexec.cxx4
-rw-r--r--shell/source/unix/sysshell/recently_used_file.cxx2
4 files changed, 16 insertions, 16 deletions
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index 1a33afd343af..2a2bb8a8bd6f 100644
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -167,10 +167,10 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "from" ) && m_aOriginator.getLength() )
+ if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
return makeAny( m_aOriginator );
- else if( 0 == aName.compareToAscii( "to" ) && m_aRecipient.getLength() )
+ else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
return makeAny( m_aRecipient );
else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
@@ -179,7 +179,7 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
return makeAny( m_BccRecipients );
- else if( 0 == aName.compareToAscii( "subject" ) && m_aSubject.getLength() )
+ else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
return makeAny( m_aSubject );
else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
@@ -199,10 +199,10 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
sal_Int32 nItems = 0;
Sequence< OUString > aRet( 6 );
- if( m_aOriginator.getLength() )
+ if( !m_aOriginator.isEmpty() )
aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("from"));
- if( m_aRecipient.getLength() )
+ if( !m_aRecipient.isEmpty() )
aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("to"));
if( m_CcRecipients.getLength() )
@@ -211,7 +211,7 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
if( m_BccRecipients.getLength() )
aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("bcc"));
- if( m_aSubject.getLength() )
+ if( !m_aSubject.isEmpty() )
aRet[nItems++] = OUString(RTL_CONSTASCII_USTRINGPARAM("subject"));
if( m_Attachments.getLength() )
@@ -228,10 +228,10 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "from" ) && m_aOriginator.getLength() )
+ if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "to" ) && m_aRecipient.getLength() )
+ else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
return sal_True;
else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
@@ -240,7 +240,7 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
return sal_True;
- else if( 0 == aName.compareToAscii( "subject" ) && m_aSubject.getLength() )
+ else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
return sal_True;
else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx
index 3af65c8bac35..c0531e3f887e 100644
--- a/shell/source/cmdmail/cmdmailsuppl.cxx
+++ b/shell/source/cmdmail/cmdmailsuppl.cxx
@@ -195,7 +195,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
// using the (undocumented) --mailclient switch
xNameAccess->getByName( OUString(RTL_CONSTASCII_USTRINGPARAM("Program")) ) >>= aMailer;
- if( aMailer.getLength() )
+ if( !aMailer.isEmpty() )
{
// make sure we have a system path
FileBase::getSystemPathFromFileURL( aMailer, aMailer );
@@ -221,7 +221,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
}
// Append originator if set in the message
- if ( xSimpleMailMessage->getOriginator().getLength() > 0 )
+ if ( !xSimpleMailMessage->getOriginator().isEmpty() )
{
aBuffer.append("--from \"");
aBuffer.append(OUStringToOString(xSimpleMailMessage->getOriginator(), osl_getThreadTextEncoding()));
@@ -229,7 +229,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
}
// Append receipient if set in the message
- if ( xSimpleMailMessage->getRecipient().getLength() > 0 )
+ if ( !xSimpleMailMessage->getRecipient().isEmpty() )
{
aBuffer.append("--to \"");
aBuffer.append(OUStringToOString(xSimpleMailMessage->getRecipient(), osl_getThreadTextEncoding()));
@@ -257,7 +257,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM
}
// Append subject if set in the message
- if ( xSimpleMailMessage->getSubject().getLength() > 0 )
+ if ( !xSimpleMailMessage->getSubject().isEmpty() )
{
aBuffer.append("--subject \"");
aBuffer.append(OUStringToOString(xSimpleMailMessage->getSubject(), osl_getThreadTextEncoding()));
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index 39eed5a33242..988eefdc22d5 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -144,7 +144,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
OUString aURL(
com::sun::star::uri::ExternalUriReferenceTranslator::create(
m_xContext)->translateToExternal(aCommand));
- if ( aURL.getLength() == 0 && aCommand.getLength() != 0 )
+ if ( aURL.isEmpty() && !aCommand.isEmpty() )
{
throw RuntimeException(
(OUString(
@@ -207,7 +207,7 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
// Respect the desktop environment - if there is an executable named
// <desktop-environement-is>-open-url, pass the url to this one instead
// of the default "open-url" script.
- if ( m_aDesktopEnvironment.getLength() > 0 )
+ if ( !m_aDesktopEnvironment.isEmpty() )
{
OString aDesktopEnvironment(m_aDesktopEnvironment.toAsciiLowerCase());
OStringBuffer aCopy(aTmp);
diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx
index 4b7bea0ede0b..0336a7f72d57 100644
--- a/shell/source/unix/sysshell/recently_used_file.cxx
+++ b/shell/source/unix/sysshell/recently_used_file.cxx
@@ -49,7 +49,7 @@ namespace /* private */ {
inline void ensure_final_slash(/*inout*/ rtl::OUString& path)
{
- if ((path.getLength() > 0) &&
+ if (!path.isEmpty() &&
(SLASH.pData->buffer[0] != path.pData->buffer[path.getLength() - 1]))
path += SLASH;
}