From e4ff847fe0796420ba8023b70cad8589f5f19e9f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 9 Apr 2022 09:55:12 +0200 Subject: 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 --- canvas/source/factory/cf_service.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'canvas') diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index 3323b8675a15..a56551832801 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -372,7 +373,7 @@ Reference CanvasFactory::lookupAndUse( const bool bIsAcceleratedImpl( std::any_of(aAccelImpls.begin(), aAccelImpls.end(), [&aCurrName](OUString const& src) - { return aCurrName == src.trim(); } + { return aCurrName == o3tl::trim(src); } )); // check whether given canvas service is listed in the @@ -380,7 +381,7 @@ Reference CanvasFactory::lookupAndUse( const bool bIsAAImpl( std::any_of(aAAImpls.begin(), aAAImpls.end(), [&aCurrName](OUString const& src) - { return aCurrName == src.trim(); } + { return aCurrName == o3tl::trim(src); } )); // try to instantiate canvas *only* if either accel and AA -- cgit