diff --git a/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk index 61c98f7..1d7d9bf 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk @@ -1265,6 +1265,7 @@ ENDMETHOD. lo_node_fill_child TYPE REF TO if_ixml_element, lo_node_bgcolor TYPE REF TO if_ixml_element, lo_node_fgcolor TYPE REF TO if_ixml_element, + lo_node_stop TYPE REF TO if_ixml_element, lo_fill TYPE REF TO zcl_excel_style_fill, ls_color TYPE t_color. @@ -1343,7 +1344,60 @@ ENDMETHOD. * gradientFill *--------------------------------------------------------------------* WHEN 'gradientFill'. - " 2do§1 Support gradientFill + lo_fill->gradtype-type = lo_node_fill_child->get_attribute( 'type' ). + lo_fill->gradtype-top = lo_node_fill_child->get_attribute( 'top' ). + lo_fill->gradtype-left = lo_node_fill_child->get_attribute( 'left' ). + lo_fill->gradtype-right = lo_node_fill_child->get_attribute( 'right' ). + lo_fill->gradtype-bottom = lo_node_fill_child->get_attribute( 'bottom' ). + lo_fill->gradtype-degree = lo_node_fill_child->get_attribute( 'degree' ). + free lo_node_stop. + lo_node_stop ?= lo_node_fill_child->find_from_name( 'stop' ). + while lo_node_stop is bound. + if lo_fill->gradtype-position1 is initial. + lo_fill->gradtype-position1 = lo_node_stop->get_attribute( 'position' ). + lo_node_bgcolor = lo_node_stop->find_from_name( 'color' ). + IF lo_node_bgcolor IS BOUND. + fill_struct_from_attributes( EXPORTING + ip_element = lo_node_bgcolor + CHANGING + cp_structure = ls_color ). + + lo_fill->bgcolor-rgb = ls_color-rgb. + IF ls_color-indexed IS NOT INITIAL. + lo_fill->bgcolor-indexed = ls_color-indexed. + ENDIF. + + IF ls_color-theme IS NOT INITIAL. + lo_fill->bgcolor-theme = ls_color-theme. + ENDIF. + lo_fill->bgcolor-tint = ls_color-tint. + ENDIF. + elseif lo_fill->gradtype-position2 is initial. + lo_fill->gradtype-position2 = lo_node_stop->get_attribute( 'position' ). + lo_node_fgcolor = lo_node_stop->find_from_name( 'color' ). + IF lo_node_fgcolor IS BOUND. + fill_struct_from_attributes( EXPORTING + ip_element = lo_node_fgcolor + CHANGING + cp_structure = ls_color ). + + lo_fill->fgcolor-rgb = ls_color-rgb. + IF ls_color-indexed IS NOT INITIAL. + lo_fill->fgcolor-indexed = ls_color-indexed. + ENDIF. + + IF ls_color-theme IS NOT INITIAL. + lo_fill->fgcolor-theme = ls_color-theme. + ENDIF. + lo_fill->fgcolor-tint = ls_color-tint. + ENDIF. + elseif lo_fill->gradtype-position3 is initial. + lo_fill->gradtype-position3 = lo_node_stop->get_attribute( 'position' ). + "BGColor is filled already with position 1 no need to check again + endif. + + lo_node_stop ?= lo_node_stop->get_next( ). + ENDWHILE. WHEN OTHERS. diff --git a/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk b/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk index e2d4061..10e1aae 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_STYLE_FILL.slnk @@ -50,6 +50,7 @@ method build_gradient. check check_filltype_is_gradient( ) eq abap_true. + clear gradtype. case filltype. when c_fill_gradient_horizontal90. gradtype-degree = '90'. diff --git a/ZA2X/TTYP/ZEXCEL_T_STYLE_FILL.slnk b/ZA2X/TTYP/ZEXCEL_T_STYLE_FILL.slnk index 6e6cfaf..186f35e 100644 --- a/ZA2X/TTYP/ZEXCEL_T_STYLE_FILL.slnk +++ b/ZA2X/TTYP/ZEXCEL_T_STYLE_FILL.slnk @@ -1,7 +1,8 @@ - + +