Skip to content

Commit 0bb8c6a

Browse files
gintsmuransFrederic Delaunay
authored andcommitted
Plain text and richtext mixed in same cell can be read
This was introduced in 0084776 Fixes PHPOffice#442 Closes PHPOffice#453
1 parent d39539a commit 0bb8c6a

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,9 @@ private function parseRichText($is)
20832083
} else {
20842084
if (is_object($is->r)) {
20852085
foreach ($is->r as $run) {
2086-
if (isset($run->rPr)) {
2086+
if (!isset($run->rPr)) {
2087+
$value->createText(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
2088+
} else {
20872089
$objText = $value->createTextRun(StringHelper::controlCharacterOOXML2PHP((string) $run->t));
20882090

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

0 commit comments

Comments
 (0)