diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /svtools/source/svhtml | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools/source/svhtml')
-rw-r--r-- | svtools/source/svhtml/HtmlWriter.cxx | 6 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx index ce398757b0d2..dd2f40c6d16f 100644 --- a/svtools/source/svhtml/HtmlWriter.cxx +++ b/svtools/source/svhtml/HtmlWriter.cxx @@ -11,16 +11,16 @@ #include <svtools/HtmlWriter.hxx> #include <tools/stream.hxx> -HtmlWriter::HtmlWriter(SvStream& rStream, const OString& rNamespace) : +HtmlWriter::HtmlWriter(SvStream& rStream, std::string_view rNamespace) : mrStream(rStream), mbElementOpen(false), mbCharactersWritten(false), mbPrettyPrint(true) { - if (!rNamespace.isEmpty()) + if (!rNamespace.empty()) { // Convert namespace alias to a prefix. - maNamespace = rNamespace + ":"; + maNamespace = OString::Concat(rNamespace) + ":"; } } diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 76791dc5abcd..be66cc8b6ac8 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -238,10 +238,10 @@ HTMLParser::~HTMLParser() { } -void HTMLParser::SetNamespace(const OUString& rNamespace) +void HTMLParser::SetNamespace(std::u16string_view rNamespace) { // Convert namespace alias to a prefix. - maNamespace = rNamespace + ":"; + maNamespace = OUString::Concat(rNamespace) + ":"; } namespace |