Skip to content

Fixed issue #267: PHP warnings about margins in helper.php. #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ function renderODTOpenParagraph ($renderer, $class, $style, $dir, $language, $is
if ( $is_indent === true ) {
// FIXME: Has to be adjusted if test direction will be supported.
// See all.css
$properties ['margin-left'] = $properties ['padding-left'];
$properties ['margin-left'] = $properties ['padding-left'] ?? null;
$properties ['padding-left'] = 0;
$name .= 'Indent';
}
Expand Down Expand Up @@ -463,10 +463,10 @@ function renderODTOpenColumn ($renderer, $class, $style, $attr) {
// Frames/Textboxes still have some issues with formatting (at least in LibreOffice)
// So as a workaround we implement columns as a table.
// This is why we now use the margin of the div as the padding for the ODT table.
$properties ['padding-left'] = $properties ['margin-left'];
$properties ['padding-right'] = $properties ['margin-right'];
$properties ['padding-top'] = $properties ['margin-top'];
$properties ['padding-bottom'] = $properties ['margin-bottom'];
$properties ['padding-left'] = $properties ['margin-left'] ?? null;
$properties ['padding-right'] = $properties ['margin-right'] ?? null;
$properties ['padding-top'] = $properties ['margin-top'] ?? null;
$properties ['padding-bottom'] = $properties ['margin-bottom'] ?? null;
$properties ['margin-left'] = null;
$properties ['margin-right'] = null;
$properties ['margin-top'] = null;
Expand Down