mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 05:16:16 +08:00
Fix issue #222 - Reader was disfunctional if path .\xl\worksheets\_rels\ isn't existing.
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@347 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
This commit is contained in:
parent
6a92c01fa7
commit
70e0a556db
|
@ -1313,7 +1313,7 @@ endmethod.</source>
|
|||
differentoddeven TYPE string,
|
||||
END OF t_headerfooter.
|
||||
|
||||
types: BEGIN OF lty_tabcolor,
|
||||
TYPES: BEGIN OF lty_tabcolor,
|
||||
rgb TYPE string,
|
||||
theme TYPE string,
|
||||
END OF lty_tabcolor.
|
||||
|
@ -1384,8 +1384,8 @@ endmethod.</source>
|
|||
outline_level TYPE int4,
|
||||
|
||||
lr_tabcolor TYPE REF TO if_ixml_element,
|
||||
ls_tabcolor type lty_tabcolor,
|
||||
ls_excel_s_tabcolor type zexcel_s_tabcolor,
|
||||
ls_tabcolor TYPE lty_tabcolor,
|
||||
ls_excel_s_tabcolor TYPE zexcel_s_tabcolor,
|
||||
|
||||
rows TYPE REF TO if_ixml_node_collection,
|
||||
row TYPE t_row,
|
||||
|
@ -1412,8 +1412,12 @@ endmethod.</source>
|
|||
file_path = dirname.
|
||||
CONCATENATE dirname '_rels/' stripped_name '.rels'
|
||||
INTO rels_worksheet_path.
|
||||
rels_worksheet = me->get_ixml_from_zip_archive( rels_worksheet_path ).
|
||||
node ?= rels_worksheet->find_from_name( 'Relationship' ).
|
||||
TRY. " +#222 _rels/xxx.rels might not be present. If not found there can be no drawings --> just ignore this section
|
||||
rels_worksheet = me->get_ixml_from_zip_archive( rels_worksheet_path ).
|
||||
node ?= rels_worksheet->find_from_name( 'Relationship' ).
|
||||
CATCH zcx_excel. " +#222
|
||||
" +#222 No errorhandling necessary - node will be unbound if error occurs
|
||||
ENDTRY. " +#222
|
||||
WHILE node IS BOUND.
|
||||
fill_struct_from_attributes( EXPORTING ip_element = node CHANGING cp_structure = relationship ).
|
||||
CONCATENATE dirname relationship-target INTO path.
|
||||
|
@ -1444,10 +1448,10 @@ endmethod.</source>
|
|||
IF lr_tabcolor IS BOUND.
|
||||
fill_struct_from_attributes( EXPORTING ip_element = lr_tabcolor CHANGING cp_structure = ls_tabcolor ).
|
||||
* Theme not supported yet
|
||||
if ls_tabcolor-rgb is not INITIAL.
|
||||
IF ls_tabcolor-rgb IS NOT INITIAL.
|
||||
ls_excel_s_tabcolor-rgb = ls_tabcolor-rgb.
|
||||
io_worksheet->set_tabcolor( ls_excel_s_tabcolor ).
|
||||
endif.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
|
||||
rows = worksheet->get_elements_by_tag_name( name = 'row' ).
|
||||
|
|
Loading…
Reference in New Issue
Block a user