diff --git a/helper.php b/helper.php index 6fc2cc5..211c6a1 100644 --- a/helper.php +++ b/helper.php @@ -646,7 +646,7 @@ function renderODTOpenTable ($renderer, $attr, $style, $attr_string) { if ( empty($css_properties ['float']) === true ) { // If the float property is not set, set it to 'left' becuase the ODT plugin - // would default to 'center' which is diffeent to the XHTML behaviour. + // would default to 'center' which is different to the XHTML behaviour. //$css_properties ['float'] = 'left'; if (strpos ($class, 'wrap_left') !== false ) { $css_properties ['float'] = 'left'; @@ -668,10 +668,10 @@ function renderODTOpenTable ($renderer, $attr, $style, $attr_string) { $background_color = $css_properties ['background-color']; $image = $css_properties ['background-image'] ?? null; - $margin_top = $css_properties ['margin-top']; - $margin_right = $css_properties ['margin-right']; - $margin_bottom = $css_properties ['margin-bottom']; - $margin_left = $css_properties ['margin-left']; + $margin_top = $css_properties ['margin-top'] ?? '0cm'; + $margin_right = $css_properties ['margin-right'] ?? '0cm'; + $margin_bottom = $css_properties ['margin-bottom'] ?? '0cm'; + $margin_left = $css_properties ['margin-left'] ?? '0cm'; $width = $attr ['width']; // Open 2x1 table if image is present @@ -692,7 +692,7 @@ function renderODTOpenTable ($renderer, $attr, $style, $attr_string) { } $frame_props ['min-height'] = '1cm'; $frame_props ['width'] = $attr ['width']; - $frame_props ['float'] = $css_properties ['float']; + $frame_props ['float'] = $css_properties ['float'] ?? null; if ( self::$table_entr > 1 ) { $frame_props ['anchor-type'] = 'as-char'; } else {