summaryrefslogtreecommitdiff
path: root/sd
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 /sd
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 'sd')
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx3
-rw-r--r--sd/source/filter/ppt/pptin.cxx3
-rw-r--r--sd/source/ui/dlg/tpaction.cxx3
3 files changed, 6 insertions, 3 deletions
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index e6b9fff68807..d7c19401dc81 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -36,6 +36,7 @@
#include <unotools/syslocaleoptions.hxx>
#include <tools/stream.hxx>
#include <tools/diagnose_ex.h>
+#include <o3tl/string_view.hxx>
#include <vcl/svapp.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -192,7 +193,7 @@ bool CustomAnimationPreset::hasProperty( std::u16string_view rProperty )const
sal_Int32 nPos = 0;
do
{
- if (maProperty.getToken(0, ';', nPos) == rProperty)
+ if (o3tl::getToken(maProperty, 0, ';', nPos) == rProperty)
return true;
}
while (nPos >= 0);
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 3d9ed7dfc14a..1e7abd43bdfd 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -40,6 +40,7 @@
#include <svx/xlineit0.hxx>
#include <sfx2/docinf.hxx>
+#include <o3tl/string_view.hxx>
#include <strings.hrc>
#include <strings.hxx>
@@ -425,7 +426,7 @@ bool ImplSdPPTImport::Import()
do
{
aStringAry[nTokenCount] =
- OUStringToOString(aString.getToken( 0, ',', nPos ), RTL_TEXTENCODING_UTF8);
+ OUStringToOString(o3tl::getToken(aString, 0, ',', nPos ), RTL_TEXTENCODING_UTF8);
}
while ( ++nTokenCount < SAL_N_ELEMENTS(aStringAry) && nPos >= 0 );
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 03f3080ba22e..c5ccd758a321 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -44,6 +44,7 @@
#include <sfx2/filedlghelper.hxx>
#include <svx/drawitem.hxx>
#include <osl/diagnose.h>
+#include <o3tl/string_view.hxx>
#include <View.hxx>
#include <sdresid.hxx>
#include <tpaction.hxx>
@@ -314,7 +315,7 @@ void SdTPAction::Reset( const SfxItemSet* rAttrs )
case presentation::ClickAction_DOCUMENT:
{
if( comphelper::string::getTokenCount(aFileName, DOCUMENT_TOKEN) == 2 )
- m_xLbTreeDocument->SelectEntry( aFileName.getToken( 1, DOCUMENT_TOKEN ) );
+ m_xLbTreeDocument->SelectEntry( o3tl::getToken(aFileName, 1, DOCUMENT_TOKEN ) );
}
break;