summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-01-20 11:23:45 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-01-20 11:23:45 +0100
commit88fa511a7748ff920546bd28ac9e15f5e0ba2fb0 (patch)
tree4555e53c8209dbeb038221ab142cbb9c445b1330 /ucb
parentd1041919f51c597b5c098ca716f141e494c22c49 (diff)
Replace suitable equalsAscii calls with equalsAsciiL.
Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpurl.cxx26
-rw-r--r--ucb/source/ucp/ftp/test_ftpurl.cxx8
3 files changed, 18 insertions, 18 deletions
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 0cd65184721d..4c4400d86aa1 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -895,7 +895,7 @@ Sequence<Any> FTPContent::setPropertyValues(
osl::MutexGuard aGuard(m_aMutex);
for(sal_Int32 i = 0; i < ret.getLength(); ++i) {
- if(seqPropVal[i].Name.equalsAscii("Title")) {
+ if(seqPropVal[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title"))) {
rtl::OUString Title;
if(!(seqPropVal[i].Value >>= Title)) {
ret[i] <<= IllegalTypeException();
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index b26e380aa037..7ef4db27dca5 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -220,7 +220,7 @@ void FTPURL::parse(const rtl::OUString& url)
if(buffer[0]) {
if(strcmp(buffer,"..") == 0 &&
m_aPathSegmentVec.size() &&
- ! m_aPathSegmentVec.back().equalsAscii(".."))
+ ! m_aPathSegmentVec.back().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
m_aPathSegmentVec.pop_back();
else if(strcmp(buffer,".") == 0)
; // Ignore
@@ -260,7 +260,7 @@ rtl::OUString FTPURL::ident(bool withslash,bool internal) const
rtl::OUStringBuffer bff;
bff.appendAscii("ftp://");
- if(!m_aUsername.equalsAscii("anonymous")) {
+ if(!m_aUsername.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("anonymous"))) {
bff.append(m_aUsername);
rtl::OUString aPassword,aAccount;
@@ -279,7 +279,7 @@ rtl::OUString FTPURL::ident(bool withslash,bool internal) const
}
bff.append(m_aHost);
- if(!m_aPort.equalsAscii("21"))
+ if(!m_aPort.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("21")))
bff.append(sal_Unicode(':'))
.append(m_aPort)
.append(sal_Unicode('/'));
@@ -306,7 +306,7 @@ rtl::OUString FTPURL::parent(bool internal) const
bff.appendAscii("ftp://");
- if(!m_aUsername.equalsAscii("anonymous")) {
+ if(!m_aUsername.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("anonymous"))) {
bff.append(m_aUsername);
rtl::OUString aPassword,aAccount;
@@ -325,7 +325,7 @@ rtl::OUString FTPURL::parent(bool internal) const
bff.append(m_aHost);
- if(!m_aPort.equalsAscii("21"))
+ if(!m_aPort.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("21")))
bff.append(sal_Unicode(':'))
.append(m_aPort)
.append(sal_Unicode('/'));
@@ -344,7 +344,7 @@ rtl::OUString FTPURL::parent(bool internal) const
if(!last.getLength())
bff.appendAscii("..");
- else if(last.equalsAscii(".."))
+ else if(last.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
bff.append(last).appendAscii("/..");
bff.append(m_aType);
@@ -508,8 +508,8 @@ std::vector<FTPDirentry> FTPURL::list(
}
aDirEntry.m_aName = aDirEntry.m_aName.trim();
if(osKind != int(FTP_UNKNOWN) &&
- !aDirEntry.m_aName.equalsAscii("..") &&
- !aDirEntry.m_aName.equalsAscii(".")) {
+ !aDirEntry.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")) &&
+ !aDirEntry.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("."))) {
aDirEntry.m_aURL = viewurl + encodePathSegment(aDirEntry.m_aName);
sal_Bool isDir =
@@ -578,7 +578,7 @@ rtl::OUString FTPURL::net_title() const
index1 = 1+aNetTitle.indexOf(sal_Unicode('"'),index1);
sal_Int32 index2 = aNetTitle.indexOf(sal_Unicode('"'),index1);
aNetTitle = aNetTitle.copy(index1,index2-index1);
- if(!aNetTitle.equalsAscii("/")) {
+ if(!aNetTitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) {
index1 = aNetTitle.lastIndexOf(sal_Unicode('/'));
aNetTitle = aNetTitle.copy(1+index1);
}
@@ -624,15 +624,15 @@ FTPDirentry FTPURL::direntry() const
FTPDirentry aDirentry;
aDirentry.m_aName = nettitle; // init aDirentry
- if(nettitle.equalsAscii("/") ||
- nettitle.equalsAscii(".."))
+ if(nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/")) ||
+ nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
aDirentry.m_nMode = INETCOREFTP_FILEMODE_ISDIR;
else
aDirentry.m_nMode = INETCOREFTP_FILEMODE_UNKNOWN;
aDirentry.m_nSize = 0;
- if(!nettitle.equalsAscii("/")) {
+ if(!nettitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("/"))) {
// try to open the parent directory
FTPURL aURL(parent(),m_pFCP);
@@ -785,7 +785,7 @@ rtl::OUString FTPURL::ren(const rtl::OUString& NewTitle)
if(err != CURLE_OK)
throw curl_exception(err);
else if(m_aPathSegmentVec.size() &&
- !m_aPathSegmentVec.back().equalsAscii(".."))
+ !m_aPathSegmentVec.back().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("..")))
m_aPathSegmentVec.back() = encodePathSegment(NewTitle);
return OldTitle;
}
diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx
index 851f5c3baf4b..2eefb2b62dc8 100644
--- a/ucb/source/ucp/ftp/test_ftpurl.cxx
+++ b/ucb/source/ucp/ftp/test_ftpurl.cxx
@@ -174,9 +174,9 @@ int test_ftplist(void) {
if(vec.size() != 3)
++number_of_errors;
- if(!(vec[0].m_aName.equalsAscii("dir1") &&
- vec[1].m_aName.equalsAscii("dir2") &&
- vec[2].m_aName.equalsAscii("file1")))
+ if(!(vec[0].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dir1")) &&
+ vec[1].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dir2")) &&
+ vec[2].m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file1"))))
++number_of_errors;
TESTEVAL;
@@ -236,7 +236,7 @@ int test_ftpproperties(void) {
ftp::FTPDirentry ade(url.direntry());
- if(!(ade.m_aName.equalsAscii("file") &&
+ if(!(ade.m_aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file")) &&
ade.isFile()))
++number_of_errors;