summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-09-20 11:19:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-09-20 13:59:14 +0200
commit321a1b5034e36e156755bbd5794c33c73608e5a5 (patch)
tree33f629c9c3ddaa6c4a7decf775b83059eaf7a767 /desktop
parent8c285077e963eaa34d94ecd35c3241040c06e293 (diff)
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.kaganski@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/officeipcthread.cxx12
1 files changed, 4 insertions, 8 deletions
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)
{