summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-15 20:24:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-16 07:57:45 +0200
commit3ee177a14d8b816ef5b62500aeb54524c289e045 (patch)
tree982b524a298c2b2f959f5c858c81be9b3420566a /unoxml
parent820f340f285932bbb8d6739177e9bb81c23c1a5d (diff)
loplugin:stringadd look through a couple more known-good methods
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/characterdata.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx
index 2afc767995e3..f9fa0cce650f 100644
--- a/unoxml/source/dom/characterdata.cxx
+++ b/unoxml/source/dom/characterdata.cxx
@@ -98,8 +98,7 @@ namespace DOM
if ((offset+count) > tmp.getLength())
count = tmp.getLength() - offset;
- OUString tmp2 = tmp.copy(0, offset);
- tmp2 += tmp.copy(offset+count);
+ OUString tmp2 = tmp.copy(0, offset) + tmp.copy(offset+count);
OUString oldValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);
xmlNodeSetContent(m_aNodePtr, reinterpret_cast<const xmlChar*>(OUStringToOString(tmp2, RTL_TEXTENCODING_UTF8).getStr()));
OUString newValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);
@@ -167,9 +166,9 @@ namespace DOM
throw e;
}
- OUString tmp2 = tmp.copy(0, offset);
- tmp2 += arg;
- tmp2 += tmp.copy(offset);
+ OUString tmp2 = tmp.copy(0, offset) +
+ arg +
+ tmp.copy(offset);
OUString oldValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);
xmlNodeSetContent(m_aNodePtr, reinterpret_cast<const xmlChar*>(OUStringToOString(tmp2, RTL_TEXTENCODING_UTF8).getStr()));
OUString newValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);
@@ -204,9 +203,9 @@ namespace DOM
if ((offset+count) > tmp.getLength())
count = tmp.getLength() - offset;
- OUString tmp2 = tmp.copy(0, offset);
- tmp2 += arg;
- tmp2 += tmp.copy(offset+count);
+ OUString tmp2 = tmp.copy(0, offset) +
+ arg +
+ tmp.copy(offset+count);
OUString oldValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);
xmlNodeSetContent(m_aNodePtr, reinterpret_cast<const xmlChar*>(OUStringToOString(tmp2, RTL_TEXTENCODING_UTF8).getStr()));
OUString newValue(reinterpret_cast<char*>(m_aNodePtr->content), strlen(reinterpret_cast<char*>(m_aNodePtr->content)), RTL_TEXTENCODING_UTF8);