desktop/source/app/officeipcthread.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
New commits: commit 321a1b5034e36e156755bbd5794c33c73608e5a5 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Tue Sep 20 11:19:16 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Tue Sep 20 13:59:14 2022 +0200 Only try to convert outdir to system path when it's not empty Avoids a warning on startup of a debug build: > instdir/program/soffice warn:legacy.osl:1528:2140:sal/osl/w32/file_url.cxx:849: osl_getAbsoluteFileURL called with empty base URL and/or invalid relative URL Change-Id: Ic456f08011d099a95894259f31800f12318af223 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140230 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index ea330ea3d415..45b8906c3b42 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -1249,7 +1249,6 @@ static void AddConversionsToDispatchList( nType = DispatchWatcher::REQUEST_CAT; else nType = DispatchWatcher::REQUEST_CONVERSION; - aParam = rParam; } else { @@ -1262,8 +1261,6 @@ static void AddConversionsToDispatchList( } } - OUString aOutDir( rParamOut.trim() ); - std::u16string_view aImgOut = o3tl::trim(rImgOut); OUString aPWD; if (cwdUrl) { @@ -1274,11 +1271,10 @@ static void AddConversionsToDispatchList( utl::Bootstrap::getProcessWorkingDir( aPWD ); } - if( !::osl::FileBase::getAbsoluteFileURL( aPWD, rParamOut, aOutDir ) ) - ::osl::FileBase::getSystemPathFromFileURL( aOutDir, aOutDir ); - - if( !rParamOut.trim().isEmpty() ) + if (OUString aOutDir(rParamOut.trim()); !aOutDir.isEmpty()) { + if (osl::FileBase::getAbsoluteFileURL(aPWD, rParamOut, aOutDir) == osl::FileBase::E_None) + osl::FileBase::getSystemPathFromFileURL(aOutDir, aOutDir); aParam += ";" + aOutDir; } else @@ -1288,7 +1284,7 @@ static void AddConversionsToDispatchList( } if( !rImgOut.empty() ) - aParam += OUString::Concat("|") + aImgOut; + aParam += OUString::Concat("|") + o3tl::trim(rImgOut); for (auto const& request : rRequestList) {