diff options
author | Alex Henrie <alexhenrie24@gmail.com> | 2024-04-17 23:08:47 -0600 |
---|---|---|
committer | Alex Henrie <alexhenrie24@gmail.com> | 2024-04-17 23:08:47 -0600 |
commit | 2c638f913a6ff559c2f610f10e92338cd0a11cd7 (patch) | |
tree | 580c0e84a549ea870e700f373f67c21440ccefa3 | |
parent | f9fdae7eef9b22b63c10290c9562d9c1f9627bc0 (diff) |
Separate StarOffice 3-4 types from StarOffice 5 types
Types that start with application/vnd.stardivision are for StarOffice 5
and types that start with application/x-star are for StarOffice 4. The
StarOffice 3 formats are similar to the StarOffice 4 formats and I have
not found any distinct MIME type for them. StarOffice 2 used the same
file extensions but entirely different file formats that are not based
on OLE Compound Storage.
Also separate StarWriter master documents from ordinary StarWriter
documents because the two have distinct file formats.
https://www.openoffice.org/framework/documentation/mimetypes/mimetypes.html
-rw-r--r-- | data/freedesktop.org.xml.in | 138 | ||||
-rw-r--r-- | tests/mime-detection/list | 24 | ||||
-rw-r--r-- | tests/mime-detection/so3.smf | bin | 0 -> 5632 bytes | |||
-rw-r--r-- | tests/mime-detection/so4.sgl | bin | 0 -> 7680 bytes | |||
-rw-r--r-- | tests/mime-detection/so4.smd | bin | 0 -> 302 bytes | |||
-rw-r--r-- | tests/mime-detection/so5.sdm | bin | 0 -> 5120 bytes | |||
-rw-r--r-- | tests/mime-detection/so5.sgl | bin | 0 -> 7168 bytes |
7 files changed, 132 insertions, 30 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in index dccaa21..cb8f402 100644 --- a/data/freedesktop.org.xml.in +++ b/data/freedesktop.org.xml.in @@ -951,92 +951,188 @@ command to generate the output files. <glob pattern="winmail.dat"/> <alias type="application/ms-tnef"/> </mime-type> - <mime-type type="application/vnd.stardivision.calc"> - <comment>StarCalc spreadsheet</comment> + <mime-type type="application/x-starcalc"> + <comment>StarCalc 3-4 spreadsheet</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="x-office-spreadsheet"/> <magic priority="60"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> <match type="string" value="\x41\xd4\x61\x63\x35\x42\xd0\x11\x89\xcb\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\x61\xb8\xa5\xc6\xd6\x85\xd1\x11\x89\xcb\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> <match type="string" value="\xa0\x3f\x54\x3f\xa6\xb6\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> </match> </magic> + <glob pattern="*.sdc" weight="40"/> + </mime-type> + <mime-type type="application/x-starchart"> + <comment>StarChart 3-4 chart</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-spreadsheet"/> + <magic priority="60"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\xe0\x99\x9c\xfb\x6d\x2c\x1c\x10\x8e\x2c\x00\x00\x1b\x4c\xc7\x11" offset="592:8192"/> + <match type="string" value="\xe0\xb7\xb3\x02\x25\x42\xd0\x11\x89\xca\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> + </match> + </magic> + <glob pattern="*.sds" weight="40"/> + </mime-type> + <mime-type type="application/x-stardraw"> + <comment>StarDraw 4 drawing</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="image-x-generic"/> + <magic priority="60"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\xe0\xaa\x10\xaf\x6d\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> + </match> + </magic> + <glob pattern="*.sda" weight="40"/> + </mime-type> + <mime-type type="application/x-starimpress"> + <comment>StarImpress 3-4 presentation</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-presentation"/> + <magic priority="70"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\xc0\x3c\x2d\x01\x16\x42\xd0\x11\x89\xcb\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> + <match type="string" value="\xe0\xaa\x10\xaf\x6d\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> + </match> + </magic> + <glob pattern="*.sdd" weight="40"/> + <glob pattern="*.sdp" weight="40"/> + </mime-type> + <mime-type type="application/x-starmail"> + <comment>StarMail 4 email</comment> + <generic-icon name="emblem-mail"/> + <magic> + <match type="string" value="ANCH" offset="0"/> + </magic> + <glob pattern="*.smd" weight="10"/> + </mime-type> + <mime-type type="application/x-starmath"> + <comment>StarMath 3-4 formula</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-document"/> + <magic priority="60"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\x60\x04\x59\xd4\xfd\x35\x1c\x10\xb1\x2a\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> + <match type="string" value="\xe1\xb7\xb3\x02\x25\x42\xd0\x11\x89\xca\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> + </match> + </magic> + <glob pattern="*.smf" weight="40"/> + </mime-type> + <mime-type type="application/x-starwriter"> + <comment>StarWriter 3-4 document</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-document"/> + <glob pattern="*.sdw" weight="40"/> + <glob pattern="*.vor" weight="40"/> + <magic priority="90"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\x40\x7e\x5c\xdc\x5c\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> + <match type="string" value="\xb0\xe9\x04\x8b\x0e\x42\xd0\x11\xa4\x5e\x00\xa0\x24\x9d\x57\xb1" offset="592:8192"/> + </match> + </magic> + </mime-type> + <mime-type type="application/x-starwriter-global"> + <comment>StarWriter 4 master document</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-document"/> + <glob pattern="*.sgl" weight="40"/> + <magic priority="90"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\x70\xc9\x0a\x34\x0d\xe3\xd0\x11\xa5\x3f\x00\xa0\x24\x9d\x57\xb1" offset="592:8192"/> + </match> + </magic> + </mime-type> + <mime-type type="application/vnd.stardivision.calc"> + <comment>StarCalc 5 spreadsheet</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-spreadsheet"/> + <magic priority="60"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\x61\xb8\xa5\xc6\xd6\x85\xd1\x11\x89\xcb\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> + </match> + </magic> <glob pattern="*.sdc"/> </mime-type> <mime-type type="application/vnd.stardivision.chart"> - <comment>StarChart chart</comment> + <comment>StarChart 5 chart</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="x-office-spreadsheet"/> <magic priority="60"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> <match type="string" value="\x21\x43\x88\xbf\xdd\x85\xd1\x11\x89\xd0\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\xe0\x99\x9c\xfb\x6d\x2c\x1c\x10\x8e\x2c\x00\x00\x1b\x4c\xc7\x11" offset="592:8192"/> - <match type="string" value="\xe0\xb7\xb3\x02\x25\x42\xd0\x11\x89\xca\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> </match> </magic> <glob pattern="*.sds"/> </mime-type> <mime-type type="application/vnd.stardivision.draw"> - <comment>StarDraw drawing</comment> + <comment>StarDraw 5 drawing</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="image-x-generic"/> <magic priority="60"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> <match type="string" value="\xa0\x05\x89\x2e\xbd\x85\xd1\x11\x89\xd0\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\xe0\xaa\x10\xaf\x6d\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> </match> </magic> <glob pattern="*.sda"/> </mime-type> <mime-type type="application/vnd.stardivision.impress"> - <comment>StarImpress presentation</comment> + <comment>StarImpress 5 presentation</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="x-office-presentation"/> <magic priority="70"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> <match type="string" value="\x21\x72\x5c\x56\xbc\x85\xd1\x11\x89\xd0\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\xc0\x3c\x2d\x01\x16\x42\xd0\x11\x89\xcb\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\xe0\xaa\x10\xaf\x6d\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> </match> </magic> <glob pattern="*.sdd"/> <glob pattern="*.sdp"/> </mime-type> <mime-type type="application/vnd.stardivision.mail"> - <comment>StarMail email</comment> + <comment>StarMail 5 email</comment> + <sub-class-of type="application/x-ole-storage"/> <generic-icon name="emblem-mail"/> - <glob pattern="*.smd" weight="10"/> + <magic priority="60"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\xe0\xc4\x4c\xc2\xdf\x73\x1b\x10\x80\x4c\xfd\xfd\xfd\xfd\xfd\xfd" offset="592:8192"/> + </match> + </magic> + <glob pattern="*.sdm"/> </mime-type> <mime-type type="application/vnd.stardivision.math"> - <comment>StarMath formula</comment> + <comment>StarMath 5 formula</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="x-office-document"/> <magic priority="60"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> <match type="string" value="\x40\xe6\xb5\xff\xde\x85\xd1\x11\x89\xd0\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> - <match type="string" value="\x60\x04\x59\xd4\xfd\x35\x1c\x10\xb1\x2a\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> - <match type="string" value="\xe1\xb7\xb3\x02\x25\x42\xd0\x11\x89\xca\x00\x80\x29\xe4\xb0\xb1" offset="592:8192"/> </match> </magic> <glob pattern="*.smf"/> </mime-type> <mime-type type="application/vnd.stardivision.writer"> - <comment>StarWriter document</comment> + <comment>StarWriter 5 document</comment> <sub-class-of type="application/x-ole-storage"/> <generic-icon name="x-office-document"/> <glob pattern="*.sdw"/> <glob pattern="*.vor"/> - <glob pattern="*.sgl"/> <magic priority="90"> <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> - <match type="string" value="\x40\x7e\x5c\xdc\x5c\xb3\x1b\x10\x99\x61\x04\x02\x1c\x00\x70\x02" offset="592:8192"/> - <match type="string" value="\xb0\xe9\x04\x8b\x0e\x42\xd0\x11\xa4\x5e\x00\xa0\x24\x9d\x57\xb1" offset="592:8192"/> <match type="string" value="\xd1\xf9\x0c\xc2\xae\x85\xd1\x11\xaa\xb4\x00\x06\x09\x7d\x56\x1a" offset="592:8192"/> </match> <match type="string" value="StarWriter" offset="2089" /> </magic> - <alias type="application/vnd.stardivision.writer-global"/> + </mime-type> + <mime-type type="application/vnd.stardivision.writer-global"> + <comment>StarWriter 5 master document</comment> + <sub-class-of type="application/x-ole-storage"/> + <generic-icon name="x-office-document"/> + <glob pattern="*.sgl"/> + <magic priority="90"> + <match type="string" value="\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1" offset="0"> + <match type="string" value="\xd3\xf9\x0c\xc2\xae\x85\xd1\x11\xaa\xb4\x00\x60\x97\xda\x56\x1a" offset="592:8192"/> + </match> + </magic> </mime-type> <mime-type type="application/vnd.sun.xml.calc"> <comment>LibreOffice Calc spreadsheet</comment> diff --git a/tests/mime-detection/list b/tests/mime-detection/list index 5002b11..a3eae64 100644 --- a/tests/mime-detection/list +++ b/tests/mime-detection/list @@ -162,24 +162,30 @@ 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 ooo-test.fodt application/vnd.oasis.opendocument.text-flat-xml ox +# Created with StarOffice 3.0 +so3.smf application/x-starmath x # Created with StarOffice 3.1 -so3.sdw application/vnd.stardivision.writer -so3.sdc application/vnd.stardivision.calc -so3.sdd application/vnd.stardivision.impress -so3.sds application/vnd.stardivision.chart +so3.sdw application/x-starwriter x +so3.sdc application/x-starcalc x +so3.sdd application/x-starimpress x +so3.sds application/x-starchart x # Created with StarOffice 4.0 -so4.sdw application/vnd.stardivision.writer -so4.sdc application/vnd.stardivision.calc -so4.sdd application/vnd.stardivision.impress -so4.sds application/vnd.stardivision.chart -so4.smf application/vnd.stardivision.math +so4.sdw application/x-starwriter x +so4.sgl application/x-starwriter-global x +so4.sdc application/x-starcalc x +so4.sdd application/x-starimpress x +so4.sds application/x-starchart x +so4.smf application/x-starmath x +so4.smd application/x-starmail x # Created with StarOffice 5.2 so5.sdw application/vnd.stardivision.writer +so5.sgl application/vnd.stardivision.writer-global so5.sdc application/vnd.stardivision.calc so5.sdd application/vnd.stardivision.impress so5.sda application/vnd.stardivision.draw so5.sds application/vnd.stardivision.chart so5.smf application/vnd.stardivision.math +so5.sdm application/vnd.stardivision.mail # Created with LibreOffice 7.6 lo7.doc application/msword lo7.xls application/vnd.ms-excel diff --git a/tests/mime-detection/so3.smf b/tests/mime-detection/so3.smf Binary files differnew file mode 100644 index 0000000..6983bd8 --- /dev/null +++ b/tests/mime-detection/so3.smf diff --git a/tests/mime-detection/so4.sgl b/tests/mime-detection/so4.sgl Binary files differnew file mode 100644 index 0000000..16f47a6 --- /dev/null +++ b/tests/mime-detection/so4.sgl diff --git a/tests/mime-detection/so4.smd b/tests/mime-detection/so4.smd Binary files differnew file mode 100644 index 0000000..a978a13 --- /dev/null +++ b/tests/mime-detection/so4.smd diff --git a/tests/mime-detection/so5.sdm b/tests/mime-detection/so5.sdm Binary files differnew file mode 100644 index 0000000..939422a --- /dev/null +++ b/tests/mime-detection/so5.sdm diff --git a/tests/mime-detection/so5.sgl b/tests/mime-detection/so5.sgl Binary files differnew file mode 100644 index 0000000..5a5bcb7 --- /dev/null +++ b/tests/mime-detection/so5.sgl |