summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-07 10:46:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-08 10:26:10 +0200
commit3a88b513fd90f4793b6de7a7412fa33369542f40 (patch)
tree293467f4143a28a2a19f037f3215f4391794c854 /sw
parent388b4fc1085074da759903a9b1768bded43dd0d3 (diff)
loplugin:stringviewparam convert methods using trim
for which we add a new o3tl::trim method Change-Id: I9d37b6264eea106aa2f3502bd24b8cccf7850938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132658 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx8
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index efb786086f76..f42af8e003df 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2472,12 +2472,12 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
}
}
-void DocxAttributeOutput::DoWriteCmd( const OUString& rCmd )
+void DocxAttributeOutput::DoWriteCmd( std::u16string_view rCmd )
{
- OUString sCmd = rCmd.trim();
- if (sCmd.startsWith("SEQ"))
+ std::u16string_view sCmd = o3tl::trim(rCmd);
+ if (o3tl::starts_with(sCmd, u"SEQ"))
{
- OUString sSeqName = msfilter::util::findQuotedText(sCmd, "SEQ ", '\\').trim();
+ OUString sSeqName = msfilter::util::findQuotedText(OUString(sCmd), "SEQ ", '\\').trim();
m_aSeqBookmarksNames[sSeqName].push_back(m_sLastOpenedBookmark);
}
// Write the Field command
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index cef2f871f1ae..843fc0450bfb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -768,7 +768,7 @@ private:
void WriteSdtEnd();
void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
- void DoWriteCmd( const OUString& rCmd );
+ void DoWriteCmd( std::u16string_view rCmd );
void CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun );
void CmdEndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteRun );
void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );