[Libreoffice-commits] online.git: kit/ChildSession.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 29 13:08:23 UTC 2018
kit/ChildSession.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ef18d2f4934a2879fec6ef14d1774736a8620375
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Nov 29 15:07:42 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Nov 29 15:07:50 2018 +0200
Fix ofstream API used to write an inserted image in the mobile app case
Change-Id: I67f8a74376a46f0cfd01ee4236960b29d4bc6372
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 056779a32..2af6b76c2 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -822,7 +822,7 @@ bool ChildSession::insertFile(const char* /*buffer*/, int /*length*/, const std:
std::string tempFile = Util::createRandomTmpDir() + "/" + name;
std::ofstream fileStream;
fileStream.open(tempFile);
- fileStream << binaryData.data();
+ fileStream.write(reinterpret_cast<char*>(binaryData.data()), binaryData.size());
fileStream.close();
url = "file://" + tempFile;
#endif
More information about the Libreoffice-commits
mailing list