summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-07 23:21:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-08 09:09:32 +0100
commitb01e0483ee14826057c42dfa58c3d6200a474791 (patch)
treedf3602677ecf67edb532216fd767e63a347d6ac0 /writerfilter/source/rtftok
parentb314b5a0612c9dc7279039dae44a250d4d3ec6b1 (diff)
Extend loplugin:stringview to O[U]StringBuffer::toString
Change-Id: I7ad212dfff8b34d05e3b45107a1ef033a4efc454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129651 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'writerfilter/source/rtftok')
-rw-r--r--writerfilter/source/rtftok/rtfdispatchdestination.cxx5
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
2 files changed, 3 insertions, 4 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index 11db48a0ec6d..a113f59a5a97 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -87,7 +87,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
bFoundCode = true;
}
- if (aBuf.toString() == "INCLUDEPICTURE")
+ if (std::string_view(aBuf) == "INCLUDEPICTURE")
{
// Extract the field argument of INCLUDEPICTURE: we handle that
// at a tokenizer level, as DOCX has no such field.
@@ -99,8 +99,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
break;
aBuf.append(ch);
}
- OUString aFieldCommand
- = OStringToOUString(aBuf.toString(), RTL_TEXTENCODING_UTF8);
+ OUString aFieldCommand = OStringToOUString(aBuf, RTL_TEXTENCODING_UTF8);
std::tuple<OUString, std::vector<OUString>, std::vector<OUString>> aResult
= writerfilter::dmapper::splitFieldCommand(aFieldCommand);
m_aPicturePath
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index fb331f4b265a..f0847e945ebe 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3640,7 +3640,7 @@ void RTFDocumentImpl::checkUnicode(bool bUnicode, bool bHex)
if (m_aStates.top().getDestination() == Destination::FONTENTRY
&& m_aStates.top().getCurrentEncoding() == RTL_TEXTENCODING_SYMBOL)
nEncoding = RTL_TEXTENCODING_MS_1252;
- OUString aString = OStringToOUString(m_aHexBuffer.toString(), nEncoding);
+ OUString aString = OStringToOUString(m_aHexBuffer, nEncoding);
m_aHexBuffer.setLength(0);
aString = FilterControlChars(m_aStates.top().getDestination(), aString);
text(aString);