From bb00c4217d04100d4254e2e7d5881e4be1cbd453 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 24 Aug 2011 17:29:03 +0000 Subject: [PATCH] Don't fail if table has properties, support table borders in docx files --- etemplate/inc/class.bo_merge.inc.php | 4 ++-- etemplate/templates/default/msoffice.xslt | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.bo_merge.inc.php b/etemplate/inc/class.bo_merge.inc.php index 8f1037f700..f94cedd9b4 100644 --- a/etemplate/inc/class.bo_merge.inc.php +++ b/etemplate/inc/class.bo_merge.inc.php @@ -357,7 +357,7 @@ abstract class bo_merge case 'application/vnd.oasis.opendocument.spreadsheet': // It seems easier to split the parent tags here $replace_tags = array( - '/<(ol|ul|table)>/' => '<$1>', + '/<(ol|ul|table)( [^>]*)?>/' => '<$1$2>', '/<\/(ol|ul|table)>/' => '', //'/<(li)(.*?)>(.*?)<\/\1>/' => '<$1 $2>$3', ); @@ -378,7 +378,7 @@ abstract class bo_merge ); // It seems easier to split the parent tags here $replace_tags = array( - '/<(ol|ul|table)(.*?)>/' => '<$1$2>', + '/<(ol|ul|table)( [^>]*)?>/' => '<$1$2>', '/<\/(ol|ul|table)>/' => '', '/<(li)(.*?)>(.*?)<\/\1>/' => '<$1 $2>$3', /* diff --git a/etemplate/templates/default/msoffice.xslt b/etemplate/templates/default/msoffice.xslt index 2f41ff3d90..be4b1ee6f2 100644 --- a/etemplate/templates/default/msoffice.xslt +++ b/etemplate/templates/default/msoffice.xslt @@ -223,6 +223,15 @@ Breakers + + + + + + + + + @@ -232,7 +241,18 @@ Breakers - + + + + + + + + + + + +