summaryrefslogtreecommitdiff
path: root/sw/source/filter/basflt
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-12 12:43:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-13 08:38:53 +0200
commitfdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch)
treee3bff14e5531affcd908415b4e85d7ceac4aa1fd /sw/source/filter/basflt
parente568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (diff)
loplugin:stringviewparam whitelist some more functions
for which we have o3tl:: equivalents Change-Id: I4670fd8b703ac47214be213f41e88d1c6ede7032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132913 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/basflt')
-rw-r--r--sw/source/filter/basflt/fltini.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index f42ee3d5761f..acf72c41cda2 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -544,30 +544,30 @@ OUString NameFromCharSet(rtl_TextEncoding nChrSet)
// 6. Whether to include hidden paragraphs and text - as true/false
// the delimiter character is ","
-void SwAsciiOptions::ReadUserData( const OUString& rStr )
+void SwAsciiOptions::ReadUserData( std::u16string_view rStr )
{
sal_Int32 nToken = 0;
- OUString sToken = rStr.getToken(0, ',', nToken); // 1. Charset name
- if (!sToken.isEmpty())
- m_eCharSet = CharSetFromName(sToken);
- if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 2. Line ending type
+ std::u16string_view sToken = o3tl::getToken(rStr, 0, ',', nToken); // 1. Charset name
+ if (!sToken.empty())
+ m_eCharSet = CharSetFromName(OUString(sToken));
+ if (nToken >= 0 && !(sToken = o3tl::getToken(rStr, 0, ',', nToken)).empty()) // 2. Line ending type
{
- if (sToken.equalsIgnoreAsciiCase("CRLF"))
+ if (o3tl::equalsIgnoreAsciiCase(sToken, u"CRLF"))
m_eCRLF_Flag = LINEEND_CRLF;
- else if (sToken.equalsIgnoreAsciiCase("LF"))
+ else if (o3tl::equalsIgnoreAsciiCase(sToken, u"LF"))
m_eCRLF_Flag = LINEEND_LF;
else
m_eCRLF_Flag = LINEEND_CR;
}
- if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 3. Font name
+ if (nToken >= 0 && !(sToken = o3tl::getToken(rStr, 0, ',', nToken)).empty()) // 3. Font name
m_sFont = sToken;
- if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 4. Language tag
- m_nLanguage = LanguageTag::convertToLanguageTypeWithFallback(sToken);
- if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty()) // 5. Include BOM?
- m_bIncludeBOM = !(sToken.equalsIgnoreAsciiCase("FALSE"));
+ if (nToken >= 0 && !(sToken = o3tl::getToken(rStr, 0, ',', nToken)).empty()) // 4. Language tag
+ m_nLanguage = LanguageTag::convertToLanguageTypeWithFallback(OUString(sToken));
+ if (nToken >= 0 && !(sToken = o3tl::getToken(rStr, 0, ',', nToken)).empty()) // 5. Include BOM?
+ m_bIncludeBOM = !(o3tl::equalsIgnoreAsciiCase(sToken, u"FALSE"));
// 6. Include hidden text
- if (nToken >= 0 && !(sToken = rStr.getToken(0, ',', nToken)).isEmpty())
- m_bIncludeHidden = !(sToken.equalsIgnoreAsciiCase("FALSE"));
+ if (nToken >= 0 && !(sToken = o3tl::getToken(rStr, 0, ',', nToken)).empty())
+ m_bIncludeHidden = !(o3tl::equalsIgnoreAsciiCase(sToken, u"FALSE"));
}
void SwAsciiOptions::WriteUserData(OUString& rStr) const