summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2019-05-27 12:07:00 -0400
committerAndras Timar <andras.timar@collabora.com>2020-01-20 18:24:25 +0100
commit3de6e2b2ee363da30484e2aabc0a6ddef26aa5a3 (patch)
tree265713ac243750e061b07df1d4e3b6bf777bfe3a
parentbcb6cf82edcee8072bffa4045c5abfc82f41c579 (diff)
kit: take ownership when saving a document template
Otherwise, it causes error log: ERR Cannot save docKey [/filename], the .uno:Save has failed in LOK. Change-Id: Ic99807848def72f76471c4f999ebeed9a7c0a2c8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87085 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--kit/ChildSession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index ea7d26cd2..23224c3f8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -582,7 +582,7 @@ bool ChildSession::loadDocument(const char * /*buffer*/, int /*length*/, const s
if (!doctemplate.empty())
{
std::string url = getJailedFilePath();
- bool success = getLOKitDocument()->saveAs(url.c_str(), nullptr, nullptr);
+ bool success = getLOKitDocument()->saveAs(url.c_str(), nullptr, "TakeOwnership");
if (!success)
{
LOG_ERR("Failed to save template [" << getJailedFilePath() << "].");