Update zcl_excel_writer_2007.clas.abap

This commit is contained in:
Bernd 2024-02-15 11:18:58 +01:00 committed by GitHub
parent 8d793f3f57
commit 50f7fcb907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1213,6 +1213,11 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION.
lo_element_fill TYPE REF TO if_ixml_element. lo_element_fill TYPE REF TO if_ixml_element.
CHECK iv_cell_style IS NOT INITIAL. CHECK iv_cell_style IS NOT INITIAL.
"Don't insert guid twice or even more
READ TABLE me->styles_cond_mapping TRANSPORTING NO FIELDS WITH KEY guid = iv_cell_style.
CHECK sy-subrc NE 0.
READ TABLE me->styles_mapping INTO ls_styles_mapping WITH KEY guid = iv_cell_style. READ TABLE me->styles_mapping INTO ls_styles_mapping WITH KEY guid = iv_cell_style.
READ TABLE me->styles_cond_mapping INTO ls_style_cond_mapping WITH KEY style = ls_styles_mapping-style. READ TABLE me->styles_cond_mapping INTO ls_style_cond_mapping WITH KEY style = ls_styles_mapping-style.
@ -1234,9 +1239,9 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION.
READ TABLE it_cellxfs INTO ls_cellxfs INDEX lv_index. READ TABLE it_cellxfs INTO ls_cellxfs INDEX lv_index.
"Conditional formatting font style correction by Alessandro Iannacci START "Conditional formatting font style correction by Alessandro Iannacci START
IF ls_cellxfs-applyfont = 1.
lv_index = ls_cellxfs-fontid + 1. " the numbering starts from 0 lv_index = ls_cellxfs-fontid + 1. " the numbering starts from 0
READ TABLE it_fonts INTO ls_font INDEX lv_index. READ TABLE it_fonts INTO ls_font INDEX lv_index.
IF ls_font IS NOT INITIAL.
lo_element_font = io_ixml_document->create_simple_element( name = lc_xml_node_font lo_element_font = io_ixml_document->create_simple_element( name = lc_xml_node_font
parent = io_ixml_document ). parent = io_ixml_document ).
IF ls_font-bold EQ abap_true. IF ls_font-bold EQ abap_true.
@ -1272,9 +1277,9 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION.
"---Conditional formatting font style correction by Alessandro Iannacci END "---Conditional formatting font style correction by Alessandro Iannacci END
IF ls_cellxfs-applyfill = 1.
lv_index = ls_cellxfs-fillid + 1. " the numbering starts from 0 lv_index = ls_cellxfs-fillid + 1. " the numbering starts from 0
READ TABLE it_fills INTO ls_fill INDEX lv_index. READ TABLE it_fills INTO ls_fill INDEX lv_index.
IF ls_fill IS NOT INITIAL.
" fill properties " fill properties
lo_element_fill = io_ixml_document->create_simple_element( name = lc_xml_node_fill lo_element_fill = io_ixml_document->create_simple_element( name = lc_xml_node_fill
parent = io_ixml_document ). parent = io_ixml_document ).