From 2ef61371f47f5f1b0f786f74e42a3cf70ebd6518 Mon Sep 17 00:00:00 2001 From: Ludovic Dubost Date: Sun, 29 Dec 2019 15:24:12 +0100 Subject: [PATCH] Added support for ods --- www/common/onlyoffice/inner.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index db69e7282..60bc2c79e 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -805,12 +805,11 @@ define([ var x2tConvertData = function (x2t, data, filename, extension) { var convertedContent; if (filename.endsWith(".ods")) { - convertedContent = x2tConvertDataInternal(x2t, new Uint8Array(data), "test.ods", "xlsx"); - convertedContent = x2tConvertDataInternal(x2t, convertedContent, "test.xlsx", extension); + convertedContent = x2tConvertDataInternal(x2t, new Uint8Array(data), filename, "xlsx"); + return x2tConvertDataInternal(x2t, convertedContent, filename + ".xlsx", extension); } else { - convertedContent = x2tConvertDataInternal(x2t, new Uint8Array(data), filename, extension); + return x2tConvertDataInternal(x2t, new Uint8Array(data), filename, extension); } - return convertedContent; } var importXLSXFile = function(content, filename) {