Fixed broken paragraph alignment for OpenXml.
This commit is contained in:
parent
fbdd5f15bb
commit
e0dea8e95c
@ -67,7 +67,6 @@ class ParagraphTest extends \PHPUnit_Framework_TestCase
|
|||||||
$object = new Paragraph();
|
$object = new Paragraph();
|
||||||
|
|
||||||
$attributes = array(
|
$attributes = array(
|
||||||
// 'align' => 'justify',
|
|
||||||
'spaceAfter' => 240,
|
'spaceAfter' => 240,
|
||||||
'spaceBefore' => 240,
|
'spaceBefore' => 240,
|
||||||
'indent' => 1,
|
'indent' => 1,
|
||||||
@ -85,11 +84,7 @@ class ParagraphTest extends \PHPUnit_Framework_TestCase
|
|||||||
foreach ($attributes as $key => $value) {
|
foreach ($attributes as $key => $value) {
|
||||||
$get = "get{$key}";
|
$get = "get{$key}";
|
||||||
$object->setStyleValue("$key", $value);
|
$object->setStyleValue("$key", $value);
|
||||||
/*if ('align' == $key) {
|
if ('indent' == $key || 'hanging' == $key) {
|
||||||
if ('justify' == $value) {
|
|
||||||
$value = 'both';
|
|
||||||
}
|
|
||||||
} else*/if ('indent' == $key || 'hanging' == $key) {
|
|
||||||
$value = $value * 720;
|
$value = $value * 720;
|
||||||
} elseif ('spacing' == $key) {
|
} elseif ('spacing' == $key) {
|
||||||
$value += 240;
|
$value += 240;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user