mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 10:56:14 +08:00
prevent row height zero (#950)
Fix #944 Co-authored-by: sandraros <sandra.rossi@gmail.com> Co-authored-by: Abo <andrea@borgia.bo.it>
This commit is contained in:
parent
6fcbc5c8a8
commit
c5eb18acdc
|
@ -2471,7 +2471,7 @@ CLASS zcl_excel_reader_2007 IMPLEMENTATION.
|
|||
lo_row = io_worksheet->get_row( lv_cell_row ).
|
||||
IF ls_row-customheight = '1'.
|
||||
lo_row->set_row_height( ip_row_height = ls_row-ht ip_custom_height = abap_true ).
|
||||
ELSE.
|
||||
ELSEIF ls_row-ht > 0.
|
||||
lo_row->set_row_height( ip_row_height = ls_row-ht ip_custom_height = abap_false ).
|
||||
ENDIF.
|
||||
|
||||
|
|
|
@ -208,7 +208,12 @@ CLASS zcl_excel_row IMPLEMENTATION.
|
|||
|
||||
|
||||
METHOD set_row_height.
|
||||
DATA: height TYPE f.
|
||||
TRY.
|
||||
height = ip_row_height.
|
||||
IF height <= 0.
|
||||
zcx_excel=>raise_text( 'Please supply a positive number as row-height' ).
|
||||
ENDIF.
|
||||
me->row_height = ip_row_height.
|
||||
CATCH cx_sy_conversion_no_number.
|
||||
zcx_excel=>raise_text( 'Unable to interpret ip_row_height as number' ).
|
||||
|
|
|
@ -3774,9 +3774,6 @@ CLASS zcl_excel_worksheet IMPLEMENTATION.
|
|||
* if a fix size is supplied use this
|
||||
TRY.
|
||||
height = ip_height_fix.
|
||||
IF height <= 0.
|
||||
zcx_excel=>raise_text( 'Please supply a positive number as row-height' ).
|
||||
ENDIF.
|
||||
lo_row->set_row_height( height ).
|
||||
RETURN.
|
||||
CATCH cx_sy_conversion_no_number.
|
||||
|
|
|
@ -6107,7 +6107,7 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION.
|
|||
IF lo_row->get_custom_height( ) = abap_true.
|
||||
lo_element_2->set_attribute_ns( name = 'customHeight' value = '1' ).
|
||||
ENDIF.
|
||||
IF lo_row->get_row_height( ) >= 0.
|
||||
IF lo_row->get_row_height( ) > 0.
|
||||
lv_value = lo_row->get_row_height( ).
|
||||
lo_element_2->set_attribute_ns( name = 'ht' value = lv_value ).
|
||||
ENDIF.
|
||||
|
|
Loading…
Reference in New Issue
Block a user