diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2019-06-22 12:48:49 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2019-08-02 11:41:47 -0400 |
commit | dc4e514f17d1923c19d2b61f733b196e5acf7dec (patch) | |
tree | 572a49299154bac0d99758a248fa2e9c542d8a63 | |
parent | 3dbf6e43ebd6a52b665fab906711f173f0e5ba82 (diff) |
lok: use utf-8 for text/plain always.
Change-Id: Ie91f89b3dc6ba3eddcf8383948dddc7878eae4d8
-rw-r--r-- | desktop/source/lib/init.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index bb50736df0fe..3b835c0d66b8 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3557,10 +3557,13 @@ static int doc_getSelection(LibreOfficeKitDocument* pThis, *pOutStreams = static_cast<char **>(malloc(*pOutCount * sizeof(char *))); for (size_t i = 0; i < aMimeTypes.size(); ++i) { - (*pOutMimeTypes)[i] = strdup(aMimeTypes[i].getStr()); + if (aMimeTypes[i] == "text/plain;charset=utf-16") + (*pOutMimeTypes)[i] = strdup("text/plain;charset=utf-8"); + else + (*pOutMimeTypes)[i] = strdup(aMimeTypes[i].getStr()); OString aRet; - bool bSuccess = getFromTransferrable(xTransferable, aMimeTypes[i], aRet); + bool bSuccess = getFromTransferrable(xTransferable, (*pOutMimeTypes)[i], aRet); if (!bSuccess || aRet.getLength() < 1) { (*pOutSizes)[i] = 0; |