summaryrefslogtreecommitdiff
path: root/xmlreader
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-03-19 09:22:44 +0100
committerThomas Arnhold <thomas@arnhold.org>2013-03-19 09:00:26 +0000
commit8b27d78b4afaa9c47ca0fda144c8060f2f14046b (patch)
tree2dbddceebf0f96492adc5652697e8efce8a8ba06 /xmlreader
parentfe8eba5faa59ddf9ee82f3eb009daac72a0ec846 (diff)
automated removal of RTL_CONSTASCII_USTRINGPARAM for quoted OUStrings
Done with a perl regex: s/OUString\s*\(\s*RTL_CONSTASCII_USTRINGPARAM\s*\((\s*"[^")]*?"\s*)\)\s*\)/OUString\($1\)/gms Change-Id: Idf28320817cdcbea6d0f7ec06a9bf51bd2c3b3ec Reviewed-on: https://gerrit.libreoffice.org/2832 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'xmlreader')
-rw-r--r--xmlreader/source/span.cxx3
-rw-r--r--xmlreader/source/xmlreader.cxx55
2 files changed, 22 insertions, 36 deletions
diff --git a/xmlreader/source/span.cxx b/xmlreader/source/span.cxx
index 6155a094a010..70739e094697 100644
--- a/xmlreader/source/span.cxx
+++ b/xmlreader/source/span.cxx
@@ -42,8 +42,7 @@ rtl::OUString Span::convertFromUtf8() const {
RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("cannot convert from UTF-8")),
+ rtl::OUString("cannot convert from UTF-8"),
css::uno::Reference< css::uno::XInterface >());
}
return rtl::OUString(s, SAL_NO_ACQUIRE);
diff --git a/xmlreader/source/xmlreader.cxx b/xmlreader/source/xmlreader.cxx
index cfdad6f497f9..1da81d4a854c 100644
--- a/xmlreader/source/xmlreader.cxx
+++ b/xmlreader/source/xmlreader.cxx
@@ -71,8 +71,8 @@ XmlReader::XmlReader(rtl::OUString const & fileUrl)
fileUrl_, css::uno::Reference< css::uno::XInterface >());
default:
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("cannot open ")) +
- fileUrl_ + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) +
+ (rtl::OUString("cannot open ") +
+ fileUrl_ + rtl::OUString(": ") +
OUString::number(e)),
css::uno::Reference< css::uno::XInterface >());
}
@@ -273,7 +273,7 @@ void XmlReader::skipProcessingInstruction() {
pos_, end_ - pos_, RTL_CONSTASCII_STRINGPARAM("?>"));
if (i < 0) {
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bad '<?' in ")) +
+ (rtl::OUString("bad '<?' in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -460,8 +460,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
if (val > 0x10FFFF) { // avoid overflow
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "'&#x...' too large in ")) +
+ "'&#x...' too large in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -478,8 +477,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
if (val > 0x10FFFF) { // avoid overflow
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "'&#...' too large in ")) +
+ "'&#...' too large in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -487,8 +485,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
}
if (position == p || *position++ != ';') {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("'&#...' missing ';' in ")) +
+ (rtl::OUString("'&#...' missing ';' in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -498,8 +495,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
{
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "character reference denoting invalid character in ")) +
+ "character reference denoting invalid character in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -556,8 +552,7 @@ char const * XmlReader::handleReference(char const * position, char const * end)
}
}
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("unknown entity reference in ")) +
+ (rtl::OUString("unknown entity reference in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -668,7 +663,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
char const * nameColon = 0;
if (!scanName(&nameColon)) {
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bad tag name in ")) +
+ (rtl::OUString("bad tag name in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -686,8 +681,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
if (pos_ == p) {
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "missing whitespace before attribute in ")) +
+ "missing whitespace before attribute in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -695,8 +689,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
char const * attrNameColon = 0;
if (!scanName(&attrNameColon)) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("bad attribute name in ")) +
+ (rtl::OUString("bad attribute name in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -704,7 +697,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
skipSpace();
if (read() != '=') {
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("missing '=' in ")) +
+ (rtl::OUString("missing '=' in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -712,8 +705,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
char del = read();
if (del != '\'' && del != '"') {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("bad attribute value in ")) +
+ (rtl::OUString("bad attribute value in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -722,8 +714,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
if (i < 0) {
throw css::uno::RuntimeException(
(rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unterminated attribute value in ")) +
+ "unterminated attribute value in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -762,7 +753,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
}
if (peek() != '>') {
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("missing '>' in ")) +
+ (rtl::OUString("missing '>' in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -784,8 +775,7 @@ XmlReader::Result XmlReader::handleStartTag(int * nsId, Span * localName) {
XmlReader::Result XmlReader::handleEndTag() {
if (elements_.empty()) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("spurious end tag in ")) +
+ (rtl::OUString("spurious end tag in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -795,7 +785,7 @@ XmlReader::Result XmlReader::handleEndTag() {
!elements_.top().name.equals(nameBegin, pos_ - nameBegin))
{
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("tag mismatch in ")) +
+ (rtl::OUString("tag mismatch in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -803,7 +793,7 @@ XmlReader::Result XmlReader::handleEndTag() {
skipSpace();
if (peek() != '>') {
throw css::uno::RuntimeException(
- (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("missing '>' in ")) +
+ (rtl::OUString("missing '>' in ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -823,8 +813,7 @@ XmlReader::Result XmlReader::handleSkippedText(Span * data, int * nsId) {
sal_Int32 i = rtl_str_indexOfChar_WithLength(pos_, end_ - pos_, '<');
if (i < 0) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("premature end of ")) +
+ (rtl::OUString("premature end of ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
}
@@ -855,8 +844,7 @@ XmlReader::Result XmlReader::handleRawText(Span * text) {
switch (peek()) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("premature end of ")) +
+ (rtl::OUString("premature end of ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
case '\x0D':
@@ -923,8 +911,7 @@ XmlReader::Result XmlReader::handleNormalizedText(Span * text) {
switch (peek()) {
case '\0': // i.e., EOF
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("premature end of ")) +
+ (rtl::OUString("premature end of ") +
fileUrl_),
css::uno::Reference< css::uno::XInterface >());
case '\x09':