parent
cc92c6648e
commit
86fa5424a6
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
|||
### Fixed
|
||||
|
||||
- FLOOR() function accept negative number and negative significance [#1245](https://github.com/PHPOffice/PhpSpreadsheet/pull/1245)
|
||||
- Correct column style even when using rowspan [#1249](https://github.com/PHPOffice/PhpSpreadsheet/pull/1249)
|
||||
|
||||
## [1.10.0] - 2019-11-18
|
||||
|
||||
|
|
|
@ -490,13 +490,13 @@ class Html extends BaseReader
|
|||
case 'td':
|
||||
$this->processDomElement($child, $sheet, $row, $column, $cellContent);
|
||||
|
||||
// apply inline style
|
||||
$this->applyInlineStyle($sheet, $row, $column, $attributeArray);
|
||||
|
||||
while (isset($this->rowspan[$column . $row])) {
|
||||
++$column;
|
||||
}
|
||||
|
||||
// apply inline style
|
||||
$this->applyInlineStyle($sheet, $row, $column, $attributeArray);
|
||||
|
||||
$this->flushCell($sheet, $column, $row, $cellContent);
|
||||
|
||||
if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) {
|
||||
|
|
|
@ -403,4 +403,25 @@ class HtmlTest extends TestCase
|
|||
$actual = $spreadsheet->getActiveSheet()->getMergeCells();
|
||||
self::assertSame(['A2:C2' => 'A2:C2'], $actual);
|
||||
}
|
||||
|
||||
public function testTextIndentUseRowspan()
|
||||
{
|
||||
$html = '<table>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td rowspan="2" style="vertical-align: center;">Center Align</td>
|
||||
<td>Row</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td style="text-indent:10px">Text Indent</td>
|
||||
</tr>
|
||||
</table>';
|
||||
$filename = $this->createHtml($html);
|
||||
$spreadsheet = $this->loadHtmlIntoSpreadsheet($filename);
|
||||
$firstSheet = $spreadsheet->getSheet(0);
|
||||
$style = $firstSheet->getCell('C2')->getStyle();
|
||||
self::assertEquals(10, $style->getAlignment()->getIndent());
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue