Avoid value not being properly parsed in calc

This commit is contained in:
Nathan Gray 2016-02-16 23:58:37 +00:00
parent 8c7945d41c
commit 6ccc3e5713

View File

@ -1280,6 +1280,9 @@ abstract class bo_merge
switch($mimetype)
{
case 'application/vnd.oasis.opendocument.spreadsheet': // open office calc
// Removing these forces calc to respect our set value-type
$content = str_ireplace('calcext:value-type="string"','',$content);
$format = '/<table:table-cell([^>]+?)office:value-type="[^"]+"([^>]*?)>.?<([a-z].*?)[^>]*>\$\$('.implode('|',$names).')\$\$<\/\3>.?<\/table:table-cell>/s';
$replacement = '<table:table-cell$1office:value-type="date" office:date-value="\$\$$4\$\$"$2><$3>\$\$$4\$\$</$3></table:table-cell>';
break;