mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-05 16:36:12 +08:00
re #30 <drawing> should go before <tableParts> in the sheet.xml
git-svn-id: https://subversion.assembla.com/svn/abap2xlsx/trunk@98 b7d68dce-7c3c-4a99-8ce0-9ea847f5d049
This commit is contained in:
parent
d9e11df690
commit
4a358d2405
|
@ -2606,6 +2606,23 @@ endmethod.</source>
|
||||||
|
|
||||||
lo_element_root->append_child( new_child = lo_element ). " pageSetup node
|
lo_element_root->append_child( new_child = lo_element ). " pageSetup node
|
||||||
|
|
||||||
|
* drawing
|
||||||
|
DATA: lo_drawings TYPE REF TO zcl_excel_drawings.
|
||||||
|
|
||||||
|
lo_drawings = io_worksheet->get_drawings( ).
|
||||||
|
IF lo_drawings->is_empty( ) = abap_false.
|
||||||
|
lo_element = lo_document->create_simple_element( name = lc_xml_node_drawing
|
||||||
|
parent = lo_document ).
|
||||||
|
ADD 1 TO lv_relation_id.
|
||||||
|
|
||||||
|
lv_value = lv_relation_id.
|
||||||
|
CONDENSE lv_value.
|
||||||
|
CONCATENATE 'rId' lv_value INTO lv_value.
|
||||||
|
lo_element->set_attribute( name = 'r:id'
|
||||||
|
value = lv_value ).
|
||||||
|
lo_element_root->append_child( new_child = lo_element ).
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
* tables
|
* tables
|
||||||
DATA lv_table_count TYPE i.
|
DATA lv_table_count TYPE i.
|
||||||
|
|
||||||
|
@ -2638,22 +2655,7 @@ endmethod.</source>
|
||||||
|
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
* drawing
|
|
||||||
DATA: lo_drawings TYPE REF TO zcl_excel_drawings.
|
|
||||||
|
|
||||||
lo_drawings = io_worksheet->get_drawings( ).
|
|
||||||
IF lo_drawings->is_empty( ) = abap_false.
|
|
||||||
lo_element = lo_document->create_simple_element( name = lc_xml_node_drawing
|
|
||||||
parent = lo_document ).
|
|
||||||
ADD 1 TO lv_relation_id.
|
|
||||||
|
|
||||||
lv_value = lv_relation_id.
|
|
||||||
CONDENSE lv_value.
|
|
||||||
CONCATENATE 'rId' lv_value INTO lv_value.
|
|
||||||
lo_element->set_attribute( name = 'r:id'
|
|
||||||
value = lv_value ).
|
|
||||||
lo_element_root->append_child( new_child = lo_element ).
|
|
||||||
ENDIF.
|
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* STEP 5: Create xstring stream
|
* STEP 5: Create xstring stream
|
||||||
|
@ -2750,29 +2752,6 @@ ENDMETHOD.</source>
|
||||||
lo_element_root->append_child( new_child = lo_element ).
|
lo_element_root->append_child( new_child = lo_element ).
|
||||||
ENDWHILE.
|
ENDWHILE.
|
||||||
|
|
||||||
lo_iterator = io_worksheet->get_tables_iterator( ).
|
|
||||||
WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true.
|
|
||||||
lo_table ?= lo_iterator->if_object_collection_iterator~get_next( ).
|
|
||||||
ADD 1 TO lv_relation_id.
|
|
||||||
|
|
||||||
lv_value = lv_relation_id.
|
|
||||||
CONDENSE lv_value.
|
|
||||||
CONCATENATE 'rId' lv_value INTO lv_value.
|
|
||||||
|
|
||||||
lo_element = lo_document->create_simple_element( name = lc_xml_node_relationship
|
|
||||||
parent = lo_document ).
|
|
||||||
lo_element->set_attribute_ns( name = lc_xml_attr_id
|
|
||||||
value = lv_value ).
|
|
||||||
lo_element->set_attribute_ns( name = lc_xml_attr_type
|
|
||||||
value = lc_xml_node_rid_table_tp ).
|
|
||||||
|
|
||||||
lv_value = lo_table->get_name( ).
|
|
||||||
CONCATENATE '../tables/' lv_value '.xml' INTO lv_value.
|
|
||||||
lo_element->set_attribute_ns( name = lc_xml_attr_target
|
|
||||||
value = lv_value ).
|
|
||||||
lo_element_root->append_child( new_child = lo_element ).
|
|
||||||
ENDWHILE.
|
|
||||||
|
|
||||||
* drawing
|
* drawing
|
||||||
DATA: lo_drawings TYPE REF TO zcl_excel_drawings.
|
DATA: lo_drawings TYPE REF TO zcl_excel_drawings.
|
||||||
|
|
||||||
|
@ -2800,6 +2779,29 @@ ENDMETHOD.</source>
|
||||||
lo_element_root->append_child( new_child = lo_element ).
|
lo_element_root->append_child( new_child = lo_element ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
|
lo_iterator = io_worksheet->get_tables_iterator( ).
|
||||||
|
WHILE lo_iterator->if_object_collection_iterator~has_next( ) EQ abap_true.
|
||||||
|
lo_table ?= lo_iterator->if_object_collection_iterator~get_next( ).
|
||||||
|
ADD 1 TO lv_relation_id.
|
||||||
|
|
||||||
|
lv_value = lv_relation_id.
|
||||||
|
CONDENSE lv_value.
|
||||||
|
CONCATENATE 'rId' lv_value INTO lv_value.
|
||||||
|
|
||||||
|
lo_element = lo_document->create_simple_element( name = lc_xml_node_relationship
|
||||||
|
parent = lo_document ).
|
||||||
|
lo_element->set_attribute_ns( name = lc_xml_attr_id
|
||||||
|
value = lv_value ).
|
||||||
|
lo_element->set_attribute_ns( name = lc_xml_attr_type
|
||||||
|
value = lc_xml_node_rid_table_tp ).
|
||||||
|
|
||||||
|
lv_value = lo_table->get_name( ).
|
||||||
|
CONCATENATE '../tables/' lv_value '.xml' INTO lv_value.
|
||||||
|
lo_element->set_attribute_ns( name = lc_xml_attr_target
|
||||||
|
value = lv_value ).
|
||||||
|
lo_element_root->append_child( new_child = lo_element ).
|
||||||
|
ENDWHILE.
|
||||||
|
|
||||||
**********************************************************************
|
**********************************************************************
|
||||||
* STEP 5: Create xstring stream
|
* STEP 5: Create xstring stream
|
||||||
lo_streamfactory = lo_ixml->create_stream_factory( ).
|
lo_streamfactory = lo_ixml->create_stream_factory( ).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user