abap2xlsx/src/zcl_excel_drawings.clas.abap
Mike Pokraka 2710dd9717
Pretty print (#781)
Co-authored-by: Lars Hvam <larshp@hotmail.com>
2021-07-28 00:33:22 +02:00

124 lines
2.4 KiB
ABAP

CLASS zcl_excel_drawings DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
*"* public components of class ZCL_EXCEL_DRAWINGS
*"* do not include other source files here!!!
DATA type TYPE zexcel_drawing_type READ-ONLY VALUE 'IMAGE'. "#EC NOTEXT . . . . . . . . . . " .
METHODS add
IMPORTING
!ip_drawing TYPE REF TO zcl_excel_drawing .
METHODS include
IMPORTING
!ip_drawing TYPE REF TO zcl_excel_drawing .
METHODS clear .
METHODS constructor
IMPORTING
!ip_type TYPE zexcel_drawing_type .
METHODS get
IMPORTING
!ip_index TYPE zexcel_active_worksheet
RETURNING
VALUE(eo_drawing) TYPE REF TO zcl_excel_drawing .
METHODS get_iterator
RETURNING
VALUE(eo_iterator) TYPE REF TO cl_object_collection_iterator .
METHODS is_empty
RETURNING
VALUE(is_empty) TYPE flag .
METHODS remove
IMPORTING
!ip_drawing TYPE REF TO zcl_excel_drawing .
METHODS size
RETURNING
VALUE(ep_size) TYPE i .
METHODS get_type
RETURNING
VALUE(rp_type) TYPE zexcel_drawing_type .
*"* protected components of class ZCL_EXCEL_DRAWINGS
*"* do not include other source files here!!!
*"* protected components of class ZCL_EXCEL_DRAWINGS
*"* do not include other source files here!!!
PROTECTED SECTION.
PRIVATE SECTION.
*"* private components of class ZCL_EXCEL_DRAWINGS
*"* do not include other source files here!!!
DATA drawings TYPE REF TO cl_object_collection .
ENDCLASS.
CLASS zcl_excel_drawings IMPLEMENTATION.
METHOD add.
DATA: lv_index TYPE i.
drawings->add( ip_drawing ).
lv_index = drawings->size( ).
ip_drawing->create_media_name(
ip_index = lv_index ).
ENDMETHOD.
METHOD clear.
drawings->clear( ).
ENDMETHOD.
METHOD constructor.
CREATE OBJECT drawings.
type = ip_type.
ENDMETHOD.
METHOD get.
DATA lv_index TYPE i.
lv_index = ip_index.
eo_drawing ?= drawings->get( lv_index ).
ENDMETHOD.
METHOD get_iterator.
eo_iterator ?= drawings->get_iterator( ).
ENDMETHOD.
METHOD get_type.
rp_type = me->type.
ENDMETHOD.
METHOD include.
drawings->add( ip_drawing ).
ENDMETHOD.
METHOD is_empty.
is_empty = drawings->is_empty( ).
ENDMETHOD.
METHOD remove.
drawings->remove( ip_drawing ).
ENDMETHOD.
METHOD size.
ep_size = drawings->size( ).
ENDMETHOD.
ENDCLASS.