mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
bugfix/import: doc import bugfix (#4235)
This commit is contained in:
parent
4db484e34e
commit
12c05c20b2
2 changed files with 4 additions and 2 deletions
|
@ -43,7 +43,9 @@ exports.convertFile = function(srcFile, destFile, type, callback) {
|
||||||
|
|
||||||
if (type === "html") {
|
if (type === "html") {
|
||||||
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
|
// "html:XHTML Writer File:UTF8" does a better job than normal html exports
|
||||||
type = "html:XHTML Writer File:UTF8";
|
if (path.extname(srcFile).toLowerCase() === ".doc") {
|
||||||
|
type = "html";
|
||||||
|
}
|
||||||
// PDF files need to be converted with LO Draw ref https://github.com/ether/etherpad-lite/issues/4151
|
// PDF files need to be converted with LO Draw ref https://github.com/ether/etherpad-lite/issues/4151
|
||||||
if (path.extname(srcFile).toLowerCase() === ".pdf") {
|
if (path.extname(srcFile).toLowerCase() === ".pdf") {
|
||||||
type = "html:XHTML Draw File"
|
type = "html:XHTML Draw File"
|
||||||
|
|
|
@ -110,7 +110,7 @@ describe('Imports and Exports', function(){
|
||||||
|
|
||||||
// For some reason word import does not work in testing..
|
// For some reason word import does not work in testing..
|
||||||
// TODO: fix support for .doc files..
|
// TODO: fix support for .doc files..
|
||||||
xit('Tries to import .doc that uses soffice or abiword', function(done) {
|
it('Tries to import .doc that uses soffice or abiword', function(done) {
|
||||||
if(!settings.allowAnyoneToImport) return done();
|
if(!settings.allowAnyoneToImport) return done();
|
||||||
if((settings.abiword && settings.abiword.indexOf("/" === -1)) && (settings.office && settings.soffice.indexOf("/" === -1))) return done();
|
if((settings.abiword && settings.abiword.indexOf("/" === -1)) && (settings.office && settings.soffice.indexOf("/" === -1))) return done();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue