Adding condition for document template saving using libreoffice

When  I save document template with libreoffice (in .docx format) the cloneRow with nested table doesn't work.
The problem is that the regular expression, that used for search if row is no longer part of the spanned row, was wrong: 
<w:vMerge w:val="continue" /> became <w:vMerge w:val="continue"/> without space at the closure tag.
Sorry for my English.
This commit is contained in:
Antonio Malatesta 2015-04-01 16:53:56 +02:00 committed by troosan
parent b2c627d57c
commit 7c8cfb7b8a
1 changed files with 2 additions and 1 deletions

View File

@ -612,7 +612,8 @@ class TemplateProcessor
// If tmpXmlRow doesn't contain continue, this row is no longer part of the spanned row.
$tmpXmlRow = $this->getSlice($extraRowStart, $extraRowEnd);
if (!preg_match('#<w:vMerge/>#', $tmpXmlRow) &&
!preg_match('#<w:vMerge w:val="continue" />#', $tmpXmlRow)) {
!preg_match('#<w:vMerge w:val="continue" />#', $tmpXmlRow) &&
!preg_match('#<w:vMerge w:val="continue"/>#', $tmpXmlRow)) {
break;
}
// This row was a spanned row, update $rowEnd and search for the next row.