Update changelog and unit test for #264
This commit is contained in:
parent
00c6b76d68
commit
479713da55
|
|
@ -8,6 +8,7 @@ This is the changelog between releases of PHPWord. Releases are listed in revers
|
||||||
|
|
||||||
- Element: Ability to add drawing shapes (arc, curve, line, polyline, rect, oval) using new `Shape` element - @ivanlanin GH-123
|
- Element: Ability to add drawing shapes (arc, curve, line, polyline, rect, oval) using new `Shape` element - @ivanlanin GH-123
|
||||||
- Font: New `scale`, `spacing`, and `kerning` property of font style - @ivanlanin
|
- Font: New `scale`, `spacing`, and `kerning` property of font style - @ivanlanin
|
||||||
|
- Paragraph: Added shading to the paragraph style for full width shading - @lrobert GH-264
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,16 +95,10 @@ class Paragraph extends AbstractStyle
|
||||||
$xmlWriter->writeElementIf($styles['pagination']['keepLines'] === true, 'w:keepLines', 'w:val', '1');
|
$xmlWriter->writeElementIf($styles['pagination']['keepLines'] === true, 'w:keepLines', 'w:val', '1');
|
||||||
$xmlWriter->writeElementIf($styles['pagination']['pageBreak'] === true, 'w:pageBreakBefore', 'w:val', '1');
|
$xmlWriter->writeElementIf($styles['pagination']['pageBreak'] === true, 'w:pageBreakBefore', 'w:val', '1');
|
||||||
|
|
||||||
// Indentation & spacing
|
// Child style: indentation, spacing, and shading
|
||||||
$this->writeChildStyle($xmlWriter, 'Indentation', $styles['indentation']);
|
$this->writeChildStyle($xmlWriter, 'Indentation', $styles['indentation']);
|
||||||
$this->writeChildStyle($xmlWriter, 'Spacing', $styles['spacing']);
|
$this->writeChildStyle($xmlWriter, 'Spacing', $styles['spacing']);
|
||||||
|
$this->writeChildStyle($xmlWriter, 'Shading', $styles['shading']);
|
||||||
// Background-Color
|
|
||||||
$shading = $style->getShading();
|
|
||||||
if (!is_null($shading)) {
|
|
||||||
$styleWriter = new Shading($xmlWriter, $shading);
|
|
||||||
$styleWriter->write();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tabs
|
// Tabs
|
||||||
$this->writeTabs($xmlWriter, $styles['tabs']);
|
$this->writeTabs($xmlWriter, $styles['tabs']);
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,11 @@ class DocumentTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$tabs = array(new \PhpOffice\PhpWord\Style\Tab('right', 9090));
|
$tabs = array(new \PhpOffice\PhpWord\Style\Tab('right', 9090));
|
||||||
$phpWord = new PhpWord();
|
$phpWord = new PhpWord();
|
||||||
$phpWord->addParagraphStyle('pStyle', array('align' => 'center', 'tabs' => $tabs)); // Style #1
|
$phpWord->addParagraphStyle('pStyle', array(
|
||||||
|
'align' => 'center',
|
||||||
|
'tabs' => $tabs,
|
||||||
|
'shading' => array('fill' => 'FFFF99'),
|
||||||
|
)); // Style #1
|
||||||
$phpWord->addFontStyle('fStyle', array('size' => '20', 'bold' => true, 'allCaps' => true,
|
$phpWord->addFontStyle('fStyle', array('size' => '20', 'bold' => true, 'allCaps' => true,
|
||||||
'scale' => 200, 'spacing' => 240, 'kerning' => 10)); // Style #2
|
'scale' => 200, 'spacing' => 240, 'kerning' => 10)); // Style #2
|
||||||
$phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3
|
$phpWord->addTitleStyle(1, array('color' => '333333', 'doubleStrikethrough' => true)); // Style #3
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue