mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-04 20:28:22 +08:00
parent
d5051cfb96
commit
c90c6d7e98
|
@ -1265,7 +1265,6 @@ ENDMETHOD.</source>
|
|||
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.
|
||||
|
||||
|
@ -1344,60 +1343,7 @@ ENDMETHOD.</source>
|
|||
* gradientFill
|
||||
*--------------------------------------------------------------------*
|
||||
WHEN '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.
|
||||
" 2do§1 Support gradientFill
|
||||
|
||||
WHEN OTHERS.
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
<method CLSNAME="ZCL_EXCEL_STYLE_FILL" CMPNAME="BUILD_GRADIENT" VERSION="1" LANGU="E" EXPOSURE="0" STATE="1" EDITORDER="1 " DISPID="0 " MTDTYPE="0" MTDDECLTYP="0" BCMTDCAT="00" BCMTDSYN="0">
|
||||
<source>method build_gradient.
|
||||
check check_filltype_is_gradient( ) eq abap_true.
|
||||
clear gradtype.
|
||||
case filltype.
|
||||
when c_fill_gradient_horizontal90.
|
||||
gradtype-degree = '90'.
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TTYP TYPENAME="ZEXCEL_T_STYLE_FILL" DDLANGUAGE="E" ROWTYPE="ZEXCEL_S_STYLE_FILL" ROWKIND="S" DATATYPE="STRU" LENG="000000" DECIMALS="000000" ACCESSMODE="T" KEYDEF="K" KEYKIND="N" KEYFDCOUNT="0005" DDTEXT="Cell Fills" TYPELEN="000200" CTLENG="000000" CTDECIMALS="000000" OCCURS="00000">
|
||||
<TTYP TYPENAME="ZEXCEL_T_STYLE_FILL" DDLANGUAGE="E" ROWTYPE="ZEXCEL_S_STYLE_FILL" ROWKIND="S" DATATYPE="STRU" LENG="000000" DECIMALS="000000" ACCESSMODE="T" KEYDEF="K" KEYKIND="N" KEYFDCOUNT="0004" DDTEXT="Cell Fills" TYPELEN="000200" CTLENG="000000" CTDECIMALS="000000" OCCURS="00000">
|
||||
<dd42v TYPENAME="ZEXCEL_T_STYLE_FILL" KEYFDPOS="0001" ROWTYPEPOS="0001" KEYFIELD="FILLTYPE"/>
|
||||
<dd42v TYPENAME="ZEXCEL_T_STYLE_FILL" KEYFDPOS="0002" ROWTYPEPOS="0002" KEYFIELD="ROTATION"/>
|
||||
<dd42v TYPENAME="ZEXCEL_T_STYLE_FILL" KEYFDPOS="0003" ROWTYPEPOS="0003" KEYFIELD="FGCOLOR"/>
|
||||
<dd42v TYPENAME="ZEXCEL_T_STYLE_FILL" KEYFDPOS="0004" ROWTYPEPOS="0008" KEYFIELD="BGCOLOR"/>
|
||||
<dd42v TYPENAME="ZEXCEL_T_STYLE_FILL" KEYFDPOS="0005" ROWTYPEPOS="0013" KEYFIELD="GRADTYPE"/>
|
||||
</TTYP>
|
||||
|
|
Loading…
Reference in New Issue
Block a user