kit/ChildSession.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit d29c986e6ad8f30abc1975c945bad62bc75d89f7 Author: mert <mert.tu...@collabora.com> AuthorDate: Thu Jun 18 20:30:56 2020 +0300 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Thu Jun 18 21:16:57 2020 +0200 Fix insert local image for online Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f Signed-off-by: mert <mert.tu...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp index 7e2a84e0d..4b27da4c8 100644 --- a/kit/ChildSession.cpp +++ b/kit/ChildSession.cpp @@ -1194,7 +1194,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const Stri #if !MOBILEAPP if (type == "graphic" || type == "selectbackground") - url = "file://" + std::string(JAILED_DOCUMENT_ROOT) + "insertfile/" + name; + { + std::string jailDoc = JAILED_DOCUMENT_ROOT; + if (NoCapsForKit) + { + jailDoc = Poco::URI(getJailedFilePath()).getPath(); + jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT; + } + url = "file://" + jailDoc + "insertfile/" + name; + } else if (type == "graphicurl") URI::decode(name, url); #else _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits