loplugin:stringconstant: OUStringBuffer: appendAscii -> append

Change-Id: Id852428e7b7cde6eec6eeb9a2a9004d1f2e789b6
This commit is contained in:
Stephan Bergmann
2015-08-31 08:04:20 +02:00
parent 7bff36d45d
commit 5f5ccfc0a6
2 changed files with 6 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ namespace {
void appendMessage( void appendMessage(
OUStringBuffer & buffer, css::uno::Exception const & exception) OUStringBuffer & buffer, css::uno::Exception const & exception)
{ {
buffer.appendAscii("; "); buffer.append("; ");
buffer.append(exception.Message); buffer.append(exception.Message);
} }

View File

@@ -87,25 +87,25 @@ OUString Data::createSegment(
} }
OUStringBuffer buf(templateName); OUStringBuffer buf(templateName);
//TODO: verify template name contains no bad chars? //TODO: verify template name contains no bad chars?
buf.appendAscii("['"); buf.append("['");
for (sal_Int32 i = 0; i < name.getLength(); ++i) { for (sal_Int32 i = 0; i < name.getLength(); ++i) {
sal_Unicode c = name[i]; sal_Unicode c = name[i];
switch (c) { switch (c) {
case '&': case '&':
buf.appendAscii("&amp;"); buf.append("&amp;");
break; break;
case '"': case '"':
buf.appendAscii("&quot;"); buf.append("&quot;");
break; break;
case '\'': case '\'':
buf.appendAscii("&apos;"); buf.append("&apos;");
break; break;
default: default:
buf.append(c); buf.append(c);
break; break;
} }
} }
buf.appendAscii("']"); buf.append("']");
return buf.makeStringAndClear(); return buf.makeStringAndClear();
} }