Final try to resolve Travis build errors
This commit is contained in:
parent
0103787873
commit
748e16473d
|
|
@ -41,14 +41,14 @@ class Line extends AbstractElement
|
|||
$style = $element->getStyle();
|
||||
$styleWriter = new LineStyleWriter($xmlWriter, $style);
|
||||
|
||||
$id=$element->getElementIndex();
|
||||
$elementId=$element->getElementIndex();
|
||||
if (!$this->withoutP) {
|
||||
$xmlWriter->startElement('w:p');
|
||||
$styleWriter->writeAlignment();
|
||||
}
|
||||
$xmlWriter->startElement('w:r');
|
||||
$xmlWriter->startElement('w:pict');
|
||||
if ($id==1) { //shapetype could be defined for each line separately, but then a unique id would be necessary
|
||||
if ($elementId==1) { //shapetype could be defined for each line separately, but then a unique id would be necessary
|
||||
$xmlWriter->startElement('v:shapetype');
|
||||
$xmlWriter->writeAttribute('id', '_x0000_t32');
|
||||
$xmlWriter->writeAttribute('coordsize', '21600,21600');
|
||||
|
|
@ -68,7 +68,7 @@ class Line extends AbstractElement
|
|||
$xmlWriter->endElement(); // v:shapetype
|
||||
}
|
||||
$xmlWriter->startElement('v:shape');
|
||||
$xmlWriter->writeAttribute('id', sprintf('_x0000_s1%1$03d', $id));
|
||||
$xmlWriter->writeAttribute('id', sprintf('_x0000_s1%1$03d', $elementId));
|
||||
$xmlWriter->writeAttribute('type', '#_x0000_t32'); //type should correspond to shapetype id
|
||||
$styleWriter->write();
|
||||
$styleWriter->writeStroke();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class LineTest extends \PHPUnit_Framework_TestCase
|
|||
$object = new Line();
|
||||
|
||||
$properties = array(
|
||||
'flip' => true,
|
||||
'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT,
|
||||
'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK,
|
||||
'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL,
|
||||
|
|
@ -59,7 +58,6 @@ class LineTest extends \PHPUnit_Framework_TestCase
|
|||
$object = new Line();
|
||||
|
||||
$properties = array(
|
||||
'flip' => true,
|
||||
'connectorType' => \PhpOffice\PhpWord\Style\Line::CONNECTOR_TYPE_STRAIGHT,
|
||||
'beginArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_BLOCK,
|
||||
'endArrow' => \PhpOffice\PhpWord\Style\Line::ARROW_STYLE_OVAL,
|
||||
|
|
@ -82,7 +80,7 @@ class LineTest extends \PHPUnit_Framework_TestCase
|
|||
$expected=true;
|
||||
$object = new Line();
|
||||
$object->setFlip($expected);
|
||||
$this->assertEquals($expected, $object->getFlip());
|
||||
$this->assertEquals($expected, $object->isFlip());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue