diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-12 12:43:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-13 08:38:53 +0200 |
commit | fdfd517a6f75e394ddcb1e195decbfed33ba56b9 (patch) | |
tree | e3bff14e5531affcd908415b4e85d7ceac4aa1fd /package | |
parent | e568c9dca8b93b96a8a130a8fb6f1bba1a33d6ea (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 'package')
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 5 | ||||
-rw-r--r-- | package/source/xstor/ohierarchyholder.hxx | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index 55348f08547c..209136bcdf36 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <cppuhelper/exc_hlp.hxx> +#include <o3tl/string_view.hxx> #include "ohierarchyholder.hxx" @@ -58,13 +59,13 @@ void OHierarchyHolder_Impl::RemoveStreamHierarchically( std::vector<OUString>& a } // static -std::vector<OUString> OHierarchyHolder_Impl::GetListPathFromString( const OUString& aPath ) +std::vector<OUString> OHierarchyHolder_Impl::GetListPathFromString( std::u16string_view aPath ) { std::vector<OUString> aResult; sal_Int32 nIndex = 0; do { - OUString aName = aPath.getToken( 0, '/', nIndex ); + OUString aName( o3tl::getToken(aPath, 0, '/', nIndex ) ); if ( aName.isEmpty() ) throw lang::IllegalArgumentException(); diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx index e124d545d9a2..6f32b3f404f2 100644 --- a/package/source/xstor/ohierarchyholder.hxx +++ b/package/source/xstor/ohierarchyholder.hxx @@ -99,7 +99,7 @@ public: , m_xChild( new OHierarchyElement_Impl( css::uno::WeakReference< css::embed::XStorage >( xOwnStorage ) ) ) {} - static std::vector<OUString> GetListPathFromString( const OUString& aPath ); + static std::vector<OUString> GetListPathFromString( std::u16string_view aPath ); css::uno::Reference< css::embed::XExtendedStorageStream > GetStreamHierarchically( sal_Int32 nStorageMode, |