summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-07 10:46:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-04-08 10:26:10 +0200
commit3a88b513fd90f4793b6de7a7412fa33369542f40 (patch)
tree293467f4143a28a2a19f037f3215f4391794c854 /desktop
parent388b4fc1085074da759903a9b1768bded43dd0d3 (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/officeipcthread.cxx9
1 files changed, 5 insertions, 4 deletions
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 <cppuhelper/supportsservice.hxx>
#include <osl/file.hxx>
#include <rtl/process.h>
+#include <o3tl/string_view.hxx>
#include <cassert>
#include <cstdlib>
@@ -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)
{