diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-19 11:32:06 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-19 11:32:20 +0100 |
commit | 4c0c23af21db0b72541674c2352df04f48774e81 (patch) | |
tree | fe5697fbc7f793de73531e50711c5b39d9825923 /svl | |
parent | 8f2cf65ec9a450441b92ed1f638eda26231a9be7 (diff) |
Simplify equalsIgnoreAsciiCaseAscii[L] calls
Change-Id: If5201bd772aed245e8f7f8b900d76ffe4ca57b49
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/fsstor/fsfactory.cxx | 4 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 9acc68745ddc..dc762a73ace0 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -132,8 +132,8 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA // allow to use other ucp's // if ( !isLocalNotFile_Impl( aURL ) ) - if ( aURL.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.pkg")) - || aURL.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip")) + if ( aURL.equalsIgnoreAsciiCase("vnd.sun.star.pkg") + || aURL.equalsIgnoreAsciiCase("vnd.sun.star.zip") || ::utl::UCBContentHelper::IsDocument( aURL ) ) { throw lang::IllegalArgumentException( diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index d5f01f601143..becc31548872 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -703,7 +703,7 @@ INetContentType INetContentTypes::GetContentType(OUString const & rTypeName) return pEntry ? pEntry->m_eTypeID : Registration::GetContentType(aType); } else - return rTypeName.equalsIgnoreAsciiCaseAscii(CONTENT_TYPE_STR_X_STARMAIL) ? + return rTypeName.equalsIgnoreAsciiCase(CONTENT_TYPE_STR_X_STARMAIL) ? CONTENT_TYPE_X_STARMAIL : CONTENT_TYPE_UNKNOWN; // the content type "x-starmail" has no sub type } @@ -774,7 +774,7 @@ INetContentType INetContentTypes::GetContentTypeFromURL(OUString const & rURL) OUString aToken = rURL.getToken(0, ':'); if (!aToken.isEmpty()) { - if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_FILE)) + if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_FILE)) if (rURL[ rURL.getLength() - 1 ] == (sal_Unicode)'/') // folder if (rURL.getLength() > RTL_CONSTASCII_LENGTH("file:///")) if (WildCard("*/{*}/").Matches(rURL)) // special folder @@ -796,10 +796,10 @@ INetContentType INetContentTypes::GetContentTypeFromURL(OUString const & rURL) { //@@@ } - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_HTTP) - || aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_HTTPS)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_HTTP) + || aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_HTTPS)) eTypeID = CONTENT_TYPE_TEXT_HTML; - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_PRIVATE)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_PRIVATE)) { OUString aSecondPart = rURL.getToken(1, ':'); aToken = aSecondPart.getToken(0, '/'); @@ -833,7 +833,7 @@ INetContentType INetContentTypes::GetContentTypeFromURL(OUString const & rURL) else if (aToken.equalsAscii(INETTYPE_URL_SUB_HELPID)) eTypeID = CONTENT_TYPE_APP_STARHELP; } - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_COMPONENT)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_COMPONENT)) { aToken = rURL.getToken(1, ':'); // aToken now equals ss / * aToken = aToken.getToken(0, '/'); @@ -856,11 +856,11 @@ INetContentType INetContentTypes::GetContentTypeFromURL(OUString const & rURL) } } } - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_MAILTO)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_MAILTO)) eTypeID = CONTENT_TYPE_APP_VND_OUTTRAY; - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_MACRO)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_MACRO)) eTypeID = CONTENT_TYPE_APP_MACRO; - else if (aToken.equalsIgnoreAsciiCaseAscii(INETTYPE_URL_PROT_DATA)) + else if (aToken.equalsIgnoreAsciiCase(INETTYPE_URL_PROT_DATA)) { OUString aSecondPart = rURL.getToken(1, ':'); aToken = aSecondPart.getToken(0, ','); |