Skip to content

Commit

Permalink
Merge pull request #319 from eduardomozart/patch-5
Browse files Browse the repository at this point in the history
Fix exhibition of 0 values on cell table end
  • Loading branch information
Klap-in committed May 13, 2024
2 parents acd3dff + 2c4e046 commit 196a48f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ODT/ODTDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function addPlainText($text) {
// Check if there is some content in the text.
// Only insert bookmark/pagebreak/format change if text is not empty.
// Otherwise a empty paragraph/line would be created!
if ( !empty($text) && !ctype_space($text) ) {
if ( !@blank($text) ) {
// Insert page bookmark if requested and not done yet.
$this->insertPendingPageBookmark();

Expand Down
2 changes: 1 addition & 1 deletion ODT/ODTUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public static function deleteUselessElements(&$docContent, array $preventDeletet
$length = $end - $start_open + $length_close;
$content = substr ($docContent, $start_close + 1, $end - ($start_close + 1));

if ( empty($content) || ctype_space ($content) ) {
if ( @blank($content) ) {
// Paragraph is empty or consists of whitespace only. Check style name.
$style_start = strpos ($docContent, '"', $start_open);
if ( $style_start === false ) {
Expand Down

0 comments on commit 196a48f

Please sign in to comment.