Merge branch 'main' into fix-issue-1013-part2

This commit is contained in:
Abo 2024-09-13 12:53:12 +02:00 committed by GitHub
commit 18e9bf46d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3493,26 +3493,17 @@ CLASS zcl_excel_worksheet IMPLEMENTATION.
METHOD normalize_style_parameter. METHOD normalize_style_parameter.
DATA: lo_style_type TYPE REF TO cl_abap_typedescr. DATA lo_style_type TYPE REF TO cl_abap_typedescr.
FIELD-SYMBOLS: FIELD-SYMBOLS <style> TYPE REF TO zcl_excel_style.
<style> TYPE REF TO zcl_excel_style.
CHECK ip_style_or_guid IS NOT INITIAL. CHECK ip_style_or_guid IS NOT INITIAL.
lo_style_type = cl_abap_typedescr=>describe_by_data( ip_style_or_guid ). lo_style_type = cl_abap_typedescr=>describe_by_data( ip_style_or_guid ).
IF lo_style_type->type_kind = lo_style_type->typekind_oref. IF lo_style_type->type_kind = lo_style_type->typekind_oref.
lo_style_type = cl_abap_typedescr=>describe_by_object_ref( ip_style_or_guid ). ASSIGN ip_style_or_guid TO <style>.
IF lo_style_type->absolute_name = '\CLASS=ZCL_EXCEL_STYLE'. rv_guid = <style>->get_guid( ).
ASSIGN ip_style_or_guid TO <style>.
rv_guid = <style>->get_guid( ).
ENDIF.
ELSEIF lo_style_type->absolute_name = '\TYPE=ZEXCEL_CELL_STYLE'.
rv_guid = ip_style_or_guid.
ELSEIF lo_style_type->type_kind = lo_style_type->typekind_hex. ELSEIF lo_style_type->type_kind = lo_style_type->typekind_hex.
rv_guid = ip_style_or_guid. rv_guid = ip_style_or_guid.
ELSE. ELSE.
RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'IP_GUID type must be either REF TO zcl_excel_style or zexcel_cell_style'. RAISE EXCEPTION TYPE zcx_excel EXPORTING error = 'IP_GUID type must be either REF TO zcl_excel_style or zexcel_cell_style'.
ENDIF. ENDIF.