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 <sandra.rossi@gmail.com>
Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
sandraros 2021-09-23 07:19:02 +02:00 committed by GitHub
parent ae76133265
commit e72e4ea6a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ).