Plain text and richtext mixed in same cell can be read

This was introduced in 0084776160

Fixes #442
Closes #453
This commit is contained in:
Gints Murāns 2018-04-06 10:04:41 +03:00 committed by Adrien Crivelli
parent 5f036591cd
commit e5e8be26d5
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
2 changed files with 9 additions and 1 deletions

View File

@ -60,6 +60,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART`. - Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART`.
## [Unreleased]
### Fixed
- Plain text and richtext mixed in same cell can be read - [#442](https://github.com/PHPOffice/PhpSpreadsheet/issues/442)
## [1.0.0-beta2] - 2017-11-26 ## [1.0.0-beta2] - 2017-11-26
### Added ### Added

View File

@ -2068,7 +2068,9 @@ class Xlsx extends BaseReader
} else { } else {
if (is_object($is->r)) { if (is_object($is->r)) {
foreach ($is->r as $run) { foreach ($is->r as $run) {
if (isset($run->rPr)) { if (!isset($run->rPr)) {
$value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
} else {
$objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t)); $objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
if (isset($run->rPr->rFont['val'])) { if (isset($run->rPr->rFont['val'])) {