Add OpenDocument flat mimetypes and x-office/drawing alias

Signed-off-by: Julius Härtl <jus@bitgrid.net>
pull/29157/head
Julius Härtl 3 years ago
parent 62947867ce
commit 0d2e05a0b5
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF

@ -0,0 +1 @@
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg"><path d="M2.5 1c-.28 0-.5.22-.5.5v13c0 .28.22.5.5.5h11c.28 0 .5-.22.5-.5V4l-3-3H2.5zM4 6h2.8v1.2h2.4V6H12v3.2H9.2V8h-.8v3.2h.8V10H12v3.2H9.2V12H7.6V8h-.8v1.2H4V6z" style="fill:#ebc94a;fill-opacity:1"/></svg>

After

Width:  |  Height:  |  Size: 271 B

@ -55,7 +55,13 @@ OC.MimeTypeList={
"application/vnd.oasis.opendocument.text": "x-office/document",
"application/vnd.oasis.opendocument.text-master": "x-office/document",
"application/vnd.oasis.opendocument.text-template": "x-office/document",
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
"application/vnd.oasis.opendocument.text-web": "x-office/document",
"application/vnd.oasis.opendocument.text-flat-xml": "x-office/document",
"application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet",
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
"application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
@ -129,6 +135,7 @@ OC.MimeTypeList={
"text-vcard",
"video",
"x-office-document",
"x-office-drawing",
"x-office-presentation",
"x-office-spreadsheet"
],

@ -192,6 +192,17 @@ class RepairMimeTypes implements IRepairStep {
return $this->updateMimetypes($updatedMimetypes);
}
private function introduceFlatOpenDocumentType() {
$updatedMimetypes = [
"fodt" => "application/vnd.oasis.opendocument.text-flat-xml",
"fods" => "application/vnd.oasis.opendocument.spreadsheet-flat-xml",
"fodg" => "application/vnd.oasis.opendocument.graphics-flat-xml",
"fodp" => "application/vnd.oasis.opendocument.presentation-flat-xml",
];
return $this->updateMimetypes($updatedMimetypes);
}
private function introduceOrgModeType() {
$updatedMimetypes = [
'org' => 'text/org'
@ -245,5 +256,9 @@ class RepairMimeTypes implements IRepairStep {
if (version_compare($ocVersionFromBeforeUpdate, '21.0.0.7', '<') && $this->introduceOrgModeType()) {
$out->info('Fixed orgmode mime types');
}
if (version_compare($ocVersionFromBeforeUpdate, '23.0.0.2', '<') && $this->introduceFlatOpenDocumentType()) {
$out->info('Fixed Flat OpenDocument mime types');
}
}
}

@ -55,7 +55,13 @@
"application/vnd.oasis.opendocument.text": "x-office/document",
"application/vnd.oasis.opendocument.text-master": "x-office/document",
"application/vnd.oasis.opendocument.text-template": "x-office/document",
"application/vnd.oasis.opendocument.graphics": "x-office/drawing",
"application/vnd.oasis.opendocument.graphics-template": "x-office/drawing",
"application/vnd.oasis.opendocument.text-web": "x-office/document",
"application/vnd.oasis.opendocument.text-flat-xml": "x-office/document",
"application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet",
"application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing",
"application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",

@ -127,6 +127,10 @@
"ots": ["application/vnd.oasis.opendocument.spreadsheet-template"],
"otp": ["application/vnd.oasis.opendocument.presentation-template"],
"otg": ["application/vnd.oasis.opendocument.graphics-template"],
"fodt": ["application/vnd.oasis.opendocument.text-flat-xml"],
"fods": ["application/vnd.oasis.opendocument.spreadsheet-flat-xml"],
"fodg": ["application/vnd.oasis.opendocument.graphics-flat-xml"],
"fodp": ["application/vnd.oasis.opendocument.presentation-flat-xml"],
"oga": ["audio/ogg"],
"ogg": ["audio/ogg"],
"ogv": ["video/ogg"],

@ -30,7 +30,7 @@
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
// when updating major/minor version number.
$OC_Version = [23, 0, 0, 1];
$OC_Version = [23, 0, 0, 2];
// The human readable string
$OC_VersionString = '23.0.0 alpha';

Loading…
Cancel
Save