--- shared-mime-info-0.16/freedesktop.org.xml.in.old 2005-04-27 19:18:16.000000000 +0200 +++ shared-mime-info-0.16/freedesktop.org.xml.in 2005-04-27 19:19:00.000000000 +0200 @@ -262,9 +262,12 @@ <glob pattern="*.vor"/> <glob pattern="*.sgl"/> </mime-type> - <mime-type type="application/vnd.sun.xml.calc"> + <mime-type type="application/vnd.sun.xml.calc"><!-- Not officially registered with IANA --> <_comment>OpenOffice.org Calc spreadsheet</_comment> <glob pattern="*.sxc"/> + <magic priority="50"> + <match type="string" value="\x50\x4B\x03\x04\x14\x00" offset="0"/> + </magic> </mime-type> <mime-type type="application/vnd.sun.xml.calc.template"> <_comment>OpenOffice.org Calc spreadsheet template</_comment>
Th above patch is far too general. It will match any zip files (all OOo files are zipped). Below is a far more specific bit of magic that will only match OOo calc files diff -ru shared-mime-info-0.16.old/freedesktop.org.xml.in shared-mime-info-0.16/freedesktop.org.xml.in --- shared-mime-info-0.16.old/freedesktop.org.xml.in 2005-04-30 15:55:07.000000000 +0200 +++ shared-mime-info-0.16/freedesktop.org.xml.in 2005-04-30 15:55:08.000000000 +0200 @@ -285,9 +285,13 @@ <glob pattern="*.vor"/> <glob pattern="*.sgl"/> </mime-type> - <mime-type type="application/vnd.sun.xml.calc"> + <mime-type type="application/vnd.sun.xml.calc"><!-- Not officially registered with IANA --> + <sub-class-of type="application/zip"/> <_comment>OpenOffice.org Calc spreadsheet</_comment> <glob pattern="*.sxc"/> + <magic priority="50"> + <match value="mimetypeapplication/vnd.sun.xml.calc" type="string" offset="30"/> + </magic> </mime-type> <mime-type type="application/vnd.sun.xml.calc.template"> <_comment>OpenOffice.org Calc spreadsheet template</_comment>
Bug 2926 has the same information but for more OO.o filetypes. *** This bug has been marked as a duplicate of bug 2926 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.