summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-09 09:55:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-10 12:59:38 +0200
commite4ff847fe0796420ba8023b70cad8589f5f19e9f (patch)
tree136786200de69f70dde4190c9725f35fe14b33e0 /test
parent5a89496ffcfcd561b3e595e01f35e0302fa00841 (diff)
loplugin:stringview check for getToken and trim
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test')
-rw-r--r--test/source/helper/transferable.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/source/helper/transferable.cxx b/test/source/helper/transferable.cxx
index e8990d925d18..201b3c50e442 100644
--- a/test/source/helper/transferable.cxx
+++ b/test/source/helper/transferable.cxx
@@ -9,6 +9,7 @@
#include <test/helper/transferable.hxx>
#include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
+#include <o3tl/string_view.hxx>
using namespace css;
@@ -23,9 +24,9 @@ OString OOO_DLLPUBLIC_TEST getTextSelection(
// Take care of UTF-8 text here.
bool bConvert = false;
sal_Int32 nIndex = 0;
- if (mimeType.getToken(0, ';', nIndex) == "text/plain")
+ if (o3tl::getToken(mimeType, 0, ';', nIndex) == "text/plain")
{
- if (mimeType.getToken(0, ';', nIndex) == "charset=utf-8")
+ if (o3tl::getToken(mimeType, 0, ';', nIndex) == "charset=utf-8")
{
mimeType = "text/plain;charset=utf-16";
bConvert = true;