From 3a88b513fd90f4793b6de7a7412fa33369542f40 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 7 Apr 2022 10:46:26 +0200 Subject: loplugin:stringviewparam convert methods using trim for which we add a new o3tl::trim method Change-Id: I9d37b6264eea106aa2f3502bd24b8cccf7850938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132658 Tested-by: Jenkins Reviewed-by: Noel Grandin --- desktop/source/app/officeipcthread.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'desktop') diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index d748bef60c68..5937d1097cff 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include @@ -1236,7 +1237,7 @@ static void AddConversionsToDispatchList( const OUString& rPrinterName, const OUString& rFactory, const OUString& rParamOut, - const OUString& rImgOut, + std::u16string_view rImgOut, const bool isTextCat, const bool isScriptCat ) { @@ -1263,7 +1264,7 @@ static void AddConversionsToDispatchList( } OUString aOutDir( rParamOut.trim() ); - OUString aImgOut( rImgOut.trim() ); + std::u16string_view aImgOut = o3tl::trim(rImgOut); OUString aPWD; if (cwdUrl) { @@ -1287,8 +1288,8 @@ static void AddConversionsToDispatchList( aParam += ";" + aPWD; } - if( !rImgOut.trim().isEmpty() ) - aParam += "|" + aImgOut; + if( !rImgOut.empty() ) + aParam += OUString::Concat("|") + aImgOut; for (auto const& request : rRequestList) { -- cgit