You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#2493. There is much that the ODT Reader ignores. This change adds support for the `text:section`, `text:span`, `text:s`, and `text:tab` tags, thereby handling multiple sections, text runs, tab characters, and multiple spaces. There will still be many omissions (e.g. styles and tables), but you will now often be able to access the text content of valid ODT documents. The issue suggests variations in a simple file created on its own by LibreOffice, and a similar file created by PhpWord. Both are unit-tested.
A `getText` method is added to TextRun to facilitate testing (and can be useful on its own). It will return the concatenated texts of all elements of the text run.
Copy file name to clipboardExpand all lines: docs/changes/1.x/1.2.0.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@
31
31
- Added Support for Language, both for document overall and individual text elements
32
32
- Template : Set a checkbox by [@nxtpge](https://github.com/nxtpge) in [#2509](https://github.com/PHPOffice/PHPWord/pull/2509)
33
33
- ODText / RTF / Word2007 Writer : Add field FILENAME by [@milkyway-git](https://github.com/milkyway-git) in [#2510](https://github.com/PHPOffice/PHPWord/pull/2510)
34
+
- ODText Reader : Improve Section Reader by [@oleibman](https://github.com/oleibman) in [#2507](https://github.com/PHPOffice/PHPWord/pull/2507)
Copy file name to clipboardExpand all lines: phpstan-baseline.neon
-5Lines changed: 0 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -165,11 +165,6 @@ parameters:
165
165
count:1
166
166
path:src/PhpWord/Reader/HTML.php
167
167
168
-
-
169
-
message:"#^Call to an undefined method DOMNode\\:\\:getAttribute\\(\\)\\.$#"
170
-
count:2
171
-
path:src/PhpWord/Reader/ODText/Content.php
172
-
173
168
-
174
169
message:"#^Offset 'textNodes' on array\\{changed\\: PhpOffice\\\\PhpWord\\\\Element\\\\TrackChange, textNodes\\: DOMNodeList\\<DOMElement\\>\\} in isset\\(\\) always exists and is not nullable\\.$#"
0 commit comments