summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-29 12:20:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-04 15:29:54 +0100
commitc34e8bd71384326184baac7dea31f7ddf9bae6bc (patch)
tree0914b24023030781b3a74a768be9df4d2873b4b9 /writerfilter/source/dmapper
parenta1cdde17aa27902ee162d5b40860f05c592c4de8 (diff)
loplugin:stringviewparam: operator +=
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx7
2 files changed, 6 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index dfd398cbda37..59f856801c05 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3999,7 +3999,7 @@ void FieldContext::SetTextField(uno::Reference<text::XTextField> const& xTextFie
m_xTextField = xTextField;
}
-void FieldContext::AppendCommand(const OUString& rPart)
+void FieldContext::AppendCommand(std::u16string_view rPart)
{
m_sCommand += rPart;
}
@@ -6067,7 +6067,7 @@ bool DomainMapper_Impl::IsFieldResultAsString()
return bRet;
}
-void DomainMapper_Impl::AppendFieldResult(OUString const& rString)
+void DomainMapper_Impl::AppendFieldResult(std::u16string_view rString)
{
assert(!m_aFieldStack.empty());
FieldContextPtr pContext = m_aFieldStack.back();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 0a2b5cbd5e85..b4b111e787ec 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/embed/XStorage.hpp>
#include <queue>
#include <stack>
+#include <string_view>
#include <o3tl/sorted_vector.hxx>
#include <unordered_map>
#include <vector>
@@ -182,13 +183,13 @@ public:
const css::uno::Reference<css::text::XTextRange>& GetStartRange() const { return m_xStartRange; }
- void AppendCommand(const OUString& rPart);
+ void AppendCommand(std::u16string_view rPart);
const OUString& GetCommand() const {return m_sCommand; }
void SetFieldId(FieldId eFieldId ) { m_eFieldId = eFieldId; }
std::optional<FieldId> const & GetFieldId() const { return m_eFieldId; }
- void AppendResult(OUString const& rResult) { m_sResult += rResult; }
+ void AppendResult(std::u16string_view rResult) { m_sResult += rResult; }
const OUString& GetResult() const { return m_sResult; }
void SetCommandCompleted() { m_bFieldCommandCompleted = true; }
@@ -854,7 +855,7 @@ public:
void CloseFieldCommand();
//the _current_ fields require a string type result while TOCs accept richt results
bool IsFieldResultAsString();
- void AppendFieldResult(OUString const& rResult);
+ void AppendFieldResult(std::u16string_view rResult);
//apply the result text to the related field
void SetFieldResult(OUString const& rResult);
// set FFData of top field context