From e72e4ea6a9fa6aa9c17162b9e88db65d3902af90 Mon Sep 17 00:00:00 2001 From: sandraros <34005250+sandraros@users.noreply.github.com> Date: Thu, 23 Sep 2021 07:19:02 +0200 Subject: [PATCH] Fix issue 704 lint sy fields modified (#802) * Do not change sy fields anymore (abaplint) Fix #704 * forgotten case in zcl_excel_writer_2007 #704 Co-authored-by: sandra Co-authored-by: Lars Hvam --- src/zcl_excel_writer_2007.clas.abap | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/zcl_excel_writer_2007.clas.abap b/src/zcl_excel_writer_2007.clas.abap index e959668..a3067d8 100644 --- a/src/zcl_excel_writer_2007.clas.abap +++ b/src/zcl_excel_writer_2007.clas.abap @@ -7146,19 +7146,9 @@ CLASS zcl_excel_writer_2007 IMPLEMENTATION. " XML chapter 2.2: Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] " NB: although Excel supports _x0009_, it's not rendered except if you edit the text. " Excel considers _x000d_ as being an error (_x000a_ is sufficient and rendered). - sy-fdpos = 0. - WHILE sy-fdpos < strlen( lv_value ). - IF lv_value CA |\r\n\t|. "table_special_characters. - CASE lv_value+sy-fdpos(1). - WHEN cl_abap_char_utilities=>newline. - REPLACE SECTION OFFSET sy-fdpos LENGTH 1 OF lv_value WITH '_x000a_'. - WHEN cl_abap_char_utilities=>cr_lf(1). - REPLACE SECTION OFFSET sy-fdpos LENGTH 1 OF lv_value WITH ``. - WHEN cl_abap_char_utilities=>horizontal_tab. - REPLACE SECTION OFFSET sy-fdpos LENGTH 1 OF lv_value WITH '_x0009_'. - ENDCASE. - ENDIF. - ENDWHILE. + REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>newline IN lv_value WITH '_x000a_'. + REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf(1) IN lv_value WITH ``. + REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN lv_value WITH '_x0009_'. lo_element2->set_attribute_ns( name = 'name' value = lv_value ).