From 28e93b789555400257157baafcc23de6998f91f6 Mon Sep 17 00:00:00 2001 From: StefanSchmoecker Date: Sat, 28 Feb 2015 15:48:16 +0100 Subject: [PATCH] fixed issue #362 - Error when reading templates with certain fonts --- ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk | 54 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk b/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk index 1d7d9bf..9932b3f 100644 --- a/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk +++ b/ZA2X/CLAS/ZCL_EXCEL_READER_2007.slnk @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -1416,7 +1416,7 @@ ENDMETHOD. - method LOAD_STYLE_FONTS. + METHOD load_style_fonts. *--------------------------------------------------------------------* * issue #230 - Pimp my Code @@ -1427,10 +1427,10 @@ ENDMETHOD. * removing unused variables * adding comments to explain what we are trying to achieve *--------------------------------------------------------------------* - DATA: lo_node_font TYPE REF TO if_ixml_element, - lo_node2 TYPE REF TO if_ixml_element, - lo_font TYPE REF TO zcl_excel_style_font, - ls_color TYPE t_color. + DATA: lo_node_font TYPE REF TO if_ixml_element, + lo_node2 TYPE REF TO if_ixml_element, + lo_font TYPE REF TO zcl_excel_style_font, + ls_color TYPE t_color. *--------------------------------------------------------------------* * We need a table of used fonts to build up our styles @@ -1508,6 +1508,8 @@ ENDMETHOD. lo_node2 = lo_node_font->find_from_name( 'scheme' ). IF lo_node2 IS BOUND. lo_font->scheme = lo_node2->get_attribute( 'val' ). + ELSE. + CLEAR lo_font->scheme. ENDIF. *--------------------------------------------------------------------* @@ -1537,7 +1539,7 @@ ENDMETHOD. ENDWHILE. - endmethod. +ENDMETHOD.