summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-02-18 23:18:57 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-02-18 23:19:41 +0900
commit03591233c18c90158b3567f24fa332cd7c52a7ee (patch)
treea0e6193798c903b7752ba572c750cf3577875e4d /forms
parent77946f3b9d03e814f7ada8af7f633c649975659e (diff)
Prefer equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("..."))
to equalsIgnoreAsciiCaseAscii("...")
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/Filter.cxx6
-rw-r--r--forms/source/xforms/submission.cxx8
-rw-r--r--forms/source/xforms/submission/replace.cxx7
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx10
4 files changed, 17 insertions, 14 deletions
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 900e5c87fedb..4890df71b125 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -589,14 +589,14 @@ namespace frm
{
Any aValue;
if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) )
- || aText.equalsIgnoreAsciiCaseAscii( "TRUE" )
- || aText.equalsIgnoreAsciiCaseAscii( "IS TRUE" )
+ || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("TRUE"))
+ || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("IS TRUE"))
)
{
aValue <<= (sal_Int32)STATE_CHECK;
}
else if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "0" ) )
- || aText.equalsIgnoreAsciiCaseAscii( "FALSE" )
+ || aText.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("FALSE"))
)
{
aValue <<= (sal_Int32)STATE_NOCHECK;
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 8c58b85e4513..f834171c8b8f 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -319,17 +319,17 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
// strip whitespace-only text node for get submission
Reference< XDocumentFragment > aFragment = createSubmissionDocument(
- xResult, aMethod.equalsIgnoreAsciiCaseAscii("get"));
+ xResult, aMethod.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("get")));
// submit result; set encoding, etc.
auto_ptr<CSubmission> xSubmission;
- if (aMethod.equalsIgnoreAsciiCaseAscii("PUT"))
+ if (aMethod.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("PUT")))
xSubmission = auto_ptr<CSubmission>(
new CSubmissionPut( getAction(), aFragment));
- else if (aMethod.equalsIgnoreAsciiCaseAscii("post"))
+ else if (aMethod.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("post")))
xSubmission = auto_ptr<CSubmission>(
new CSubmissionPost( getAction(), aFragment));
- else if (aMethod.equalsIgnoreAsciiCaseAscii("get"))
+ else if (aMethod.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("get")))
xSubmission = auto_ptr<CSubmission>(
new CSubmissionGet( getAction(), aFragment));
else
diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx
index 015a5ead9247..456bce53a939 100644
--- a/forms/source/xforms/submission/replace.cxx
+++ b/forms/source/xforms/submission/replace.cxx
@@ -58,7 +58,8 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
try {
Reference< XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory();
- if (aReplace.equalsIgnoreAsciiCaseAscii("all") || aReplace.equalsIgnoreAsciiCaseAscii("document")) {
+ if (aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("all"))
+ || aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("document"))) {
Reference< XComponentLoader > xLoader;
if (aFrame.is())
xLoader = Reference< XComponentLoader >(aFrame, UNO_QUERY);
@@ -81,7 +82,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
return CSubmission::SUCCESS;
- } else if (aReplace.equalsIgnoreAsciiCaseAscii("instance")) {
+ } else if (aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("instance"))) {
if (aDocument.is()) {
// parse the result stream into a new document
Reference< XDocumentBuilder > xBuilder(xFactory->createInstance(
@@ -103,7 +104,7 @@ CSubmission::SubmissionResult CSubmission::replace(const ::rtl::OUString& aRepla
// nothing to replace
return CSubmission::UNKNOWN_ERROR;
}
- } else if (aReplace.equalsIgnoreAsciiCaseAscii("none")) {
+ } else if (aReplace.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("none"))) {
// do nothing \o/
return CSubmission::SUCCESS;
}
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 71759dfa3d89..8fb3fedcfba0 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -102,9 +102,11 @@ void xforms_booleanFromStringFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlChar *pString = xmlXPathPopString(ctxt);
if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
::rtl::OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8);
- if (aString.equalsIgnoreAsciiCaseAscii("true") || aString.equalsIgnoreAsciiCaseAscii("1"))
+ if (aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ||
+ aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("1")))
xmlXPathReturnTrue(ctxt);
- else if (aString.equalsIgnoreAsciiCaseAscii("false") || aString.equalsIgnoreAsciiCaseAscii("0"))
+ else if (aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) ||
+ aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("0")))
xmlXPathReturnFalse(ctxt);
else
XP_ERROR(XPATH_NUMBER_ERROR);
@@ -232,9 +234,9 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs)
xmlChar* pString = xmlXPathPopString(ctxt);
if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
::rtl::OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8);
- if (aString.equalsIgnoreAsciiCaseAscii("version"))
+ if (aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("version")))
xmlXPathReturnString(ctxt, (xmlChar*)_version);
- else if (aString.equalsIgnoreAsciiCaseAscii("conformance-level"))
+ else if (aString.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("conformance-level")))
xmlXPathReturnString(ctxt, (xmlChar*)_conformance);
else
xmlXPathReturnEmptyString(ctxt);