diff --git a/classes/converter.php b/classes/converter.php index 5ce9a09..07f262e 100644 --- a/classes/converter.php +++ b/classes/converter.php @@ -42,18 +42,26 @@ class converter implements \core_files\converter_interface { /** @var array $imports List of supported import file formats */ private static $imports = [ 'doc' => 'application/msword', + 'docm' => 'application/vnd.ms-word.document.macroEnabled.12', 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'rtf' => 'application/rtf', 'xls' => 'application/vnd.ms-excel', + 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12', 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12', + 'pot' => 'application/vnd.ms-powerpoint', 'ppt' => 'application/vnd.ms-powerpoint', + 'pptm' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'pptx' => 'application/vnd.ms-powerpoint', 'html' => 'text/html', 'odt' => 'application/vnd.oasis.opendocument.text', 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', 'png' => 'image/png', + 'jpeg' => 'image/jpeg', 'jpg' => 'image/jpeg', 'txt' => 'text/plain', + 'csv' => 'text/csv', 'gif' => 'image/gif', ]; diff --git a/tests/converter_test.php b/tests/converter_test.php index cfc14a6..8be7f5b 100644 --- a/tests/converter_test.php +++ b/tests/converter_test.php @@ -549,25 +549,31 @@ public function test_conversion_record_deduplication() { /** * Data provider for test_supports - * Supported formats: 'doc', 'docx', 'rtf', 'xls', 'xlsx', 'ppt', 'pptx', 'html', 'odt', - * 'ods', 'txt', 'png', 'jpg', 'gif', 'pdf' * * @return array */ public function supports_provider() { return [ ['doc', true], ['DOC', true], + ['docm', true], ['DOCM', true], ['docx', true], ['DOCX', true], + ['dotx', true], ['DOTX', true], ['rtf', true], ['RTF', true], ['xls', true], ['XLS', true], + ['xlsm', true], ['XLSM', true], ['xlsx', true], ['XLSX', true], + ['xltm', true], ['XLTM', true], + ['pot', true], ['POT', true], ['ppt', true], ['PPT', true], + ['pptm', true], ['PPTM', true], ['pptx', true], ['PPTX', true], ['html', true], ['HTML', true], ['odt', true], ['ODT', true], ['ods', true], ['ODS', true], ['txt', true], ['TXT', true], + ['csv', true], ['CSV', true], ['png', true], ['PNG', true], + ['jpeg', true], ['JPEG', true], ['jpg', true], ['JPG', true], ['gif', true], ['GIF', true], ['pdf', false], ['PDF', false],