diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-01 17:42:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-02 13:31:19 +0200 |
commit | 1927b51993fb68907a75765676179b08ab195196 (patch) | |
tree | 1b7d09c1b5e7ea945fb6ea618a4c100e8630ebb4 /oox | |
parent | 0dfa444f393a5766d36fe7d2480d0c8ec832e329 (diff) |
loplugin:stringviewparam convert methods using indexOf
.. and lastIndexOf, which convert to find and rfind
Change-Id: I6c4156cf904774c0d867f85a4c2785dba7593f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132445
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 1638d51a6964..d68b382e38e4 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -71,10 +71,10 @@ OUString InputOutputHelper::convertFileNameToUrl( const OUString& rFileName ) return OUString(); } -sal_Int32 InputOutputHelper::getFileNamePos( const OUString& rFileUrl ) +sal_Int32 InputOutputHelper::getFileNamePos( std::u16string_view rFileUrl ) { - sal_Int32 nSepPos = rFileUrl.lastIndexOf( '/' ); - return (nSepPos < 0) ? 0 : (nSepPos + 1); + size_t nSepPos = rFileUrl.find( '/' ); + return (nSepPos == std::u16string_view::npos) ? 0 : (nSepPos + 1); } OUString InputOutputHelper::getFileNameExtension( const OUString& rFileUrl ) |