diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-09 09:55:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-10 12:59:38 +0200 |
commit | e4ff847fe0796420ba8023b70cad8589f5f19e9f (patch) | |
tree | 136786200de69f70dde4190c9725f35fe14b33e0 /avmedia/source | |
parent | 5a89496ffcfcd561b3e595e01f35e0302fa00841 (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 'avmedia/source')
-rw-r--r-- | avmedia/source/viewer/mediawindow.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 521e624db386..c4ad7f0bad35 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -40,6 +40,7 @@ #include <comphelper/propertysequence.hxx> #include <memory> #include <sal/log.hxx> +#include <o3tl/string_view.hxx> #define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 3.0 @@ -231,7 +232,7 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* pParent, OUString& rURL, b if( !aAllTypes.isEmpty() ) aAllTypes.append(aSeparator); - aAllTypes.append(aWildcard + filter.second.getToken( 0, ';', nIndex )); + aAllTypes.append(OUString::Concat(aWildcard) + o3tl::getToken(filter.second, 0, ';', nIndex )); } } @@ -247,7 +248,7 @@ bool MediaWindow::executeMediaURLDialog(weld::Window* pParent, OUString& rURL, b if( !aTypes.isEmpty() ) aTypes.append(aSeparator); - aTypes.append(aWildcard + filter.second.getToken( 0, ';', nIndex )); + aTypes.append(OUString::Concat(aWildcard) + o3tl::getToken(filter.second, 0, ';', nIndex )); } // add single filters @@ -348,7 +349,7 @@ bool MediaWindow::isMediaURL(const OUString& rURL, const OUString& rReferer, boo { for( sal_Int32 nIndex = 0; nIndex >= 0; ) { - if( aExt.equalsIgnoreAsciiCase( filter.second.getToken( 0, ';', nIndex ) ) ) + if( aExt.equalsIgnoreAsciiCase( o3tl::getToken(filter.second, 0, ';', nIndex ) ) ) return true; } } |