From 05c9b6fad89df2e120d19b095cc2bfd63bdab58d Mon Sep 17 00:00:00 2001 From: Stephen Pike Date: Fri, 16 May 2014 15:44:39 -0400 Subject: [PATCH] Add magic file detection for open office xml file types .docx, .pptx, and .xlsx files are currently detected as application/zip. This adds magic logic to detect them based on what's done in the `file` command (http://www.darwinsys.com/file/). I updated the 3 test lines to expect passing rather than failure, and all tests pass when I run `make`. --- freedesktop.org.xml.in | 9 +++++++++ tests/list | 12 ++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in index 20df752..bfd929e 100644 --- a/freedesktop.org.xml.in +++ b/freedesktop.org.xml.in @@ -6001,6 +6001,9 @@ command to generate the output files. + + + <_comment>Word 2007 document template @@ -6013,6 +6016,9 @@ command to generate the output files. + + + <_comment>PowerPoint 2007 slide @@ -6037,6 +6043,9 @@ command to generate the output files. + + + <_comment>Excel 2007 spreadsheet template diff --git a/tests/list b/tests/list index 2ceacbd..0423253 100644 --- a/tests/list +++ b/tests/list @@ -9,8 +9,8 @@ # Images -test.bmp image/bmp -test.cel image/x-cel xxx +test.bmp image/bmp +test.cel image/x-cel xxx test.dcm application/dicom test.eps image/x-eps # https://bugs.freedesktop.org/show_bug.cgi?id=55264 @@ -102,7 +102,7 @@ ooo-test.odg application/vnd.oasis.opendocument.graphics ooo-test.odp application/vnd.oasis.opendocument.presentation ooo-test.ods application/vnd.oasis.opendocument.spreadsheet ooo-test.odt application/vnd.oasis.opendocument.text -# OpenDocument/OpenOffice.org flat XML +# OpenDocument/OpenOffice.org flat XML ooo-test.fodg application/vnd.oasis.opendocument.graphics-flat-xml ox ooo-test.fodp application/vnd.oasis.opendocument.presentation-flat-xml ox ooo-test.fods application/vnd.oasis.opendocument.spreadsheet-flat-xml ox @@ -119,9 +119,9 @@ test.wps application/vnd.ms-works ox # Copied from https://bugs.freedesktop.org/show_bug.cgi?id=45922 test.xlr application/vnd.ms-works ox # Copied from http://openxmldeveloper.org/articles/OpenXMLsamples.aspx -sample.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document oxo -sample.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet oxo -sample.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation oxo +sample.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document ooo +sample.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ooo +sample.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation ooo # Copied and renamed sample.pptx sample.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow oxo # Copied from http://bugs.freedesktop.org/show_bug.cgi?id=20185 -- 1.8.3.1