mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 11:06:15 +08:00
Fix #93 Read PROTECTION style
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@181 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
This commit is contained in:
parent
0d952ea2ef
commit
3481c02f35
|
@ -371,6 +371,12 @@ ENDMETHOD.</source>
|
|||
wraptext TYPE string,
|
||||
END OF t_alignment.
|
||||
|
||||
TYPES: BEGIN OF t_protection,
|
||||
hidden TYPE string,
|
||||
locked TYPE string,
|
||||
END OF t_protection.
|
||||
|
||||
|
||||
DATA: styles_xml TYPE REF TO if_ixml_document,
|
||||
iterator TYPE REF TO if_ixml_node_iterator,
|
||||
nodes TYPE REF TO if_ixml_node_collection,
|
||||
|
@ -387,6 +393,7 @@ ENDMETHOD.</source>
|
|||
style TYPE REF TO zcl_excel_style,
|
||||
xf TYPE t_xf,
|
||||
alignment TYPE t_alignment,
|
||||
protection TYPE t_protection,
|
||||
index TYPE i.
|
||||
|
||||
styles_xml = me->get_ixml_from_zip_archive( ip_path ).
|
||||
|
@ -472,6 +479,27 @@ ENDMETHOD.</source>
|
|||
IF alignment-indent IS NOT INITIAL.
|
||||
style->alignment->indent = alignment-indent.
|
||||
ENDIF.
|
||||
ENDIF.
|
||||
|
||||
node2 ?= node->find_from_name( 'protection' ).
|
||||
IF node2 IS BOUND.
|
||||
fill_struct_from_attributes(
|
||||
EXPORTING
|
||||
ip_element = node2
|
||||
CHANGING
|
||||
cp_structure = protection ).
|
||||
|
||||
IF protection-locked = '1' OR protection-locked = 'true'.
|
||||
style->protection->locked = zcl_excel_style_protection=>c_protection_locked.
|
||||
ELSE.
|
||||
style->protection->locked = zcl_excel_style_protection=>c_protection_unlocked.
|
||||
ENDIF.
|
||||
|
||||
IF protection-hidden = '1' OR protection-hidden = 'true'.
|
||||
style->protection->hidden = zcl_excel_style_protection=>c_protection_hidden.
|
||||
ELSE.
|
||||
style->protection->hidden = zcl_excel_style_protection=>c_protection_unhidden.
|
||||
ENDIF.
|
||||
|
||||
ENDIF.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user