Skip to content

Commit e5e8be2

Browse files
gintsmuransPowerKiKi
authored andcommitted
Plain text and richtext mixed in same cell can be read
This was introduced in 0084776 Fixes #442 Closes #453
1 parent 5f03659 commit e5e8be2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
6060

6161
- Constant `TYPE_DOUGHTNUTCHART` is now `TYPE_DOUGHNUTCHART`.
6262

63+
## [Unreleased]
64+
65+
### Fixed
66+
67+
- Plain text and richtext mixed in same cell can be read - [#442](https://github.com/PHPOffice/PhpSpreadsheet/issues/442)
68+
6369
## [1.0.0-beta2] - 2017-11-26
6470

6571
### Added

src/PhpSpreadsheet/Reader/Xlsx.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -2068,7 +2068,9 @@ private function parseRichText($is)
20682068
} else {
20692069
if (is_object($is->r)) {
20702070
foreach ($is->r as $run) {
2071-
if (isset($run->rPr)) {
2071+
if (!isset($run->rPr)) {
2072+
$value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
2073+
} else {
20722074
$objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
20732075

20742076
if (isset($run->rPr->rFont['val'])) {

0 commit comments

Comments
 (0)