diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 14:39:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:13 +0200 |
commit | fcd1637d5101b9142e6808edfb77b01122857901 (patch) | |
tree | 5fd09f97de80cf2a9481bd55a798015db35f1d0c /ucb/source/ucp/ftp/ftpresultsetI.cxx | |
parent | ef90021abe3735fba57145598fd7c3d359d2718e (diff) |
convert OUString compareToAscii == 0 to equalsAscii
Convert code like
aStr.compareToAscii("XXX") == 0
to
aStr.equalsAscii("XXX")
which is both easier to read and faster.
Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
Diffstat (limited to 'ucb/source/ucp/ftp/ftpresultsetI.cxx')
-rw-r--r-- | ucb/source/ucp/ftp/ftpresultsetI.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx index 3bac7bb066e4..3412eb0a3f44 100644 --- a/ucb/source/ucp/ftp/ftpresultsetI.cxx +++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx @@ -60,30 +60,30 @@ ResultSetI::ResultSetI(const Reference<XComponentContext>& rxContext, for( int i = 0; i < seqProp.getLength(); ++i) { const OUString& Name = seqProp[i].Name; - if(Name.compareToAscii("ContentType") == 0 ) + if(Name.equalsAscii("ContentType") ) xRow->appendString(seqProp[i], OUString( "application/ftp" )); - else if(Name.compareToAscii("Title") == 0) + else if(Name.equalsAscii("Title")) xRow->appendString(seqProp[i],dirvec[n].m_aName); - else if(Name.compareToAscii("IsReadOnly") == 0) + else if(Name.equalsAscii("IsReadOnly")) xRow->appendBoolean(seqProp[i], sal_Bool(dirvec[n].m_nMode & INETCOREFTP_FILEMODE_WRITE)); - else if(Name.compareToAscii("IsDocument") == 0) + else if(Name.equalsAscii("IsDocument")) xRow->appendBoolean(seqProp[i], ! sal_Bool(dirvec[n].m_nMode & INETCOREFTP_FILEMODE_ISDIR)); - else if(Name.compareToAscii("IsFolder") == 0) + else if(Name.equalsAscii("IsFolder")) xRow->appendBoolean(seqProp[i], sal_Bool(dirvec[n].m_nMode & INETCOREFTP_FILEMODE_ISDIR)); - else if(Name.compareToAscii("Size") == 0) + else if(Name.equalsAscii("Size")) xRow->appendLong(seqProp[i], dirvec[n].m_nSize); - else if(Name.compareToAscii("DateCreated") == 0) + else if(Name.equalsAscii("DateCreated")) xRow->appendTimestamp(seqProp[i], dirvec[n].m_aDate); - else if(Name.compareToAscii("CreatableContentsInfo") == 0) + else if(Name.equalsAscii("CreatableContentsInfo")) xRow->appendObject( seqProp[i], makeAny(FTPContent::queryCreatableContentsInfo_Static())); |