Skip to content

Commit 042f7a0

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents e5bd649 + 7044ebc commit 042f7a0

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Classes/PHPWord/Section/TextRun.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,17 @@ public function addImage($imageSrc, $style = null)
131131
}
132132
}
133133

134+
/**
135+
* Add a Text Break
136+
*
137+
* @param int $count
138+
*/
139+
public function addTextBreak($count = 1) {
140+
for ($i=1; $i<=$count; $i++) {
141+
$this->_elementCollection[] = new PHPWord_Section_TextBreak();
142+
}
143+
}
144+
134145
/**
135146
* Create a new Footnote Element
136147
*

Classes/PHPWord/Writer/Word2007/Base.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ protected function _writeTextRun(PHPWord_Shared_XMLWriter $objWriter = null, PHP
110110
$this->_writeImage($objWriter, $element, true);
111111
} elseif ($element instanceof PHPWord_Section_Footnote) {
112112
$this->_writeFootnoteReference($objWriter, $element, true);
113+
} elseif ($element instanceof PHPWord_Section_TextBreak) {
114+
$objWriter->writeElement('w:br');
113115
}
114116
}
115117
}

0 commit comments

Comments
 (0)