diff --git a/Classes/PHPWord/Section/TextRun.php b/Classes/PHPWord/Section/TextRun.php index cb23f9ce..d6ec7321 100755 --- a/Classes/PHPWord/Section/TextRun.php +++ b/Classes/PHPWord/Section/TextRun.php @@ -131,6 +131,17 @@ class PHPWord_Section_TextRun } } + /** + * Add a Text Break + * + * @param int $count + */ + public function addTextBreak($count = 1) { + for ($i=1; $i<=$count; $i++) { + $this->_elementCollection[] = new PHPWord_Section_TextBreak(); + } + } + /** * Create a new Footnote Element * diff --git a/Classes/PHPWord/Writer/Word2007/Base.php b/Classes/PHPWord/Writer/Word2007/Base.php index 4d1c2a34..4e18fdd8 100755 --- a/Classes/PHPWord/Writer/Word2007/Base.php +++ b/Classes/PHPWord/Writer/Word2007/Base.php @@ -110,6 +110,8 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart $this->_writeImage($objWriter, $element, true); } elseif ($element instanceof PHPWord_Section_Footnote) { $this->_writeFootnoteReference($objWriter, $element, true); + } elseif ($element instanceof PHPWord_Section_TextBreak) { + $objWriter->writeElement('w:br'); } } }