','','',
@@ -1118,9 +1142,13 @@ abstract class Merge
switch($mimetype.$mso_application_progid)
{
case 'application/vnd.oasis.opendocument.text': // open office writer
+ case 'application/vnd.oasis.opendocument.text-template':
+ case 'application/vnd.oasis.opendocument.presentation':
+ case 'application/vnd.oasis.opendocument.presentation-template':
$break = '';
break;
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
+ case 'application/vnd.oasis.opendocument.spreadsheet-template':
$break = '';
break;
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': // ms word 2007
@@ -1193,10 +1221,14 @@ abstract class Merge
switch($mimetype)
{
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
+ case 'application/vnd.oasis.opendocument.spreadsheet-template':
$format = '/]+?)office:value-type="[^"]+"([^>]*?)(?:calcext:value-type="[^"]+")?>.?<([a-z].*?)[^>]*>('.implode('|',$names).')<\/\3>.?<\/table:table-cell>/s';
$replacement = '<$3>$4$3>';
break;
case 'application/vnd.oasis.opendocument.text': // tables in open office writer
+ case 'application/vnd.oasis.opendocument.presentation':
+ case 'application/vnd.oasis.opendocument.text-template':
+ case 'application/vnd.oasis.opendocument.presentation-template':
$format = '/]+?)office:value-type="[^"]+"([^>]*?)>.?<([a-z].*?)[^>]*>('.implode('|',$names).')<\/\3>.?<\/table:table-cell>/s';
$replacement = '$4';
break;
@@ -1505,6 +1537,10 @@ abstract class Merge
{
case 'application/vnd.oasis.opendocument.text': // open office
case 'application/vnd.oasis.opendocument.spreadsheet':
+ case 'application/vnd.oasis.opendocument.presentation':
+ case 'application/vnd.oasis.opendocument.text-template':
+ case 'application/vnd.oasis.opendocument.spreadsheet-template':
+ case 'application/vnd.oasis.opendocument.presentation-template':
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': // ms office 2007
case 'application/vnd.ms-word.document.macroenabled.12':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
@@ -1523,9 +1559,13 @@ abstract class Merge
$LF = '}\par \pard\plain{';
break;
case 'application/vnd.oasis.opendocument.text':
+ case 'application/vnd.oasis.opendocument.presentation':
+ case 'application/vnd.oasis.opendocument.text-template':
+ case 'application/vnd.oasis.opendocument.presentation-template':
$LF ='';
break;
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
+ case 'application/vnd.oasis.opendocument.spreadsheet-template':
$LF = '';
break;
case 'application/xmlExcel.Sheet': // Excel 2003
@@ -1641,7 +1681,19 @@ abstract class Merge
return $retString;
case 'application/vnd.oasis.opendocument.text':
case 'application/vnd.oasis.opendocument.spreadsheet':
- $ext = $mimetype == 'application/vnd.oasis.opendocument.text' ? '.odt' : '.ods';
+ case 'application/vnd.oasis.opendocument.presentation':
+ case 'application/vnd.oasis.opendocument.text-template':
+ case 'application/vnd.oasis.opendocument.spreadsheet-template':
+ case 'application/vnd.oasis.opendocument.presentation-template':
+ switch($mimetype)
+ {
+ case 'application/vnd.oasis.opendocument.text': $ext = '.odt'; break;
+ case 'application/vnd.oasis.opendocument.spreadsheet': $ext = '.ods'; break;
+ case 'application/vnd.oasis.opendocument.presentation': $ext = '.odp'; break;
+ case 'application/vnd.oasis.opendocument.text-template': $ext = '.ott'; break;
+ case 'application/vnd.oasis.opendocument.spreadsheet-template': $ext = '.ots'; break;
+ case 'application/vnd.oasis.opendocument.presentation-template': $ext = '.otp'; break;
+ }
$archive = tempnam($GLOBALS['egw_info']['server']['temp_dir'], basename($document,$ext).'-').$ext;
copy($content_url,$archive);
$content_url = 'zip://'.$archive.'#'.($content_file = 'content.xml');
|