Merge pull request #109 from bskrtich/textrunbreak

Add Text Break to Text Run
This commit is contained in:
Progi1984 2014-03-12 08:47:37 +01:00
commit 7044ebc8da
2 changed files with 14 additions and 1 deletions

View File

@ -130,6 +130,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
*

View File

@ -108,8 +108,10 @@ class PHPWord_Writer_Word2007_Base extends PHPWord_Writer_Word2007_WriterPart
$this->_writeLink($objWriter, $element, true);
} elseif ($element instanceof PHPWord_Section_Image) {
$this->_writeImage($objWriter, $element, true);
} elseif($element instanceof PHPWord_Section_Footnote) {
} elseif ($element instanceof PHPWord_Section_Footnote) {
$this->_writeFootnoteReference($objWriter, $element, true);
} elseif ($element instanceof PHPWord_Section_TextBreak) {
$objWriter->writeElement('w:br');
}
}
}