Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo: hasehd -> hashed #927

Merged
merged 4 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions src/zcl_excel_columns.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ CLASS zcl_excel_columns DEFINITION
*"* public components of class ZCL_EXCEL_COLUMNS
*"* do not include other source files here!!!
PUBLIC SECTION.
TYPES:
BEGIN OF mty_s_hashed_column,
column_index TYPE int4,
column TYPE REF TO zcl_excel_column,
END OF mty_s_hashed_column ,
mty_ts_hasehd_column TYPE HASHED TABLE OF mty_s_hashed_column WITH UNIQUE KEY column_index.

METHODS add
IMPORTING
!io_column TYPE REF TO zcl_excel_column .
Expand Down Expand Up @@ -41,9 +34,15 @@ CLASS zcl_excel_columns DEFINITION
*"* private components of class ZABAP_EXCEL_RANGES
*"* do not include other source files here!!!
PRIVATE SECTION.
TYPES:
BEGIN OF mty_s_hashed_column,
column_index TYPE int4,
column TYPE REF TO zcl_excel_column,
END OF mty_s_hashed_column ,
mty_ts_hashed_column TYPE HASHED TABLE OF mty_s_hashed_column WITH UNIQUE KEY column_index.

DATA columns TYPE REF TO cl_object_collection .
DATA columns_hasehd TYPE mty_ts_hasehd_column .
DATA columns_hashed TYPE mty_ts_hashed_column .
ENDCLASS.


Expand All @@ -57,14 +56,14 @@ CLASS zcl_excel_columns IMPLEMENTATION.
ls_hashed_column-column_index = io_column->get_column_index( ).
ls_hashed_column-column = io_column.

INSERT ls_hashed_column INTO TABLE columns_hasehd .
INSERT ls_hashed_column INTO TABLE columns_hashed .

columns->add( io_column ).
ENDMETHOD.


METHOD clear.
CLEAR columns_hasehd.
CLEAR columns_hashed.
columns->clear( ).
ENDMETHOD.

Expand All @@ -79,7 +78,7 @@ CLASS zcl_excel_columns IMPLEMENTATION.
METHOD get.
FIELD-SYMBOLS: <ls_hashed_column> TYPE mty_s_hashed_column.

READ TABLE columns_hasehd WITH KEY column_index = ip_index ASSIGNING <ls_hashed_column>.
READ TABLE columns_hashed WITH KEY column_index = ip_index ASSIGNING <ls_hashed_column>.
IF sy-subrc = 0.
eo_column = <ls_hashed_column>-column.
ENDIF.
Expand All @@ -97,7 +96,7 @@ CLASS zcl_excel_columns IMPLEMENTATION.


METHOD remove.
DELETE TABLE columns_hasehd WITH TABLE KEY column_index = io_column->get_column_index( ) .
DELETE TABLE columns_hashed WITH TABLE KEY column_index = io_column->get_column_index( ) .
columns->remove( io_column ).
ENDMETHOD.

Expand Down
27 changes: 13 additions & 14 deletions src/zcl_excel_rows.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ CLASS zcl_excel_rows DEFINITION
*"* protected components of class ZABAP_EXCEL_WORKSHEETS
*"* do not include other source files here!!!
PUBLIC SECTION.
TYPES:
BEGIN OF mty_s_hashed_row,
row_index TYPE int4,
row TYPE REF TO zcl_excel_row,
END OF mty_s_hashed_row ,
mty_ts_hasehd_row TYPE HASHED TABLE OF mty_s_hashed_row WITH UNIQUE KEY row_index.

METHODS add
IMPORTING
!io_row TYPE REF TO zcl_excel_row .
Expand Down Expand Up @@ -52,9 +45,15 @@ CLASS zcl_excel_rows DEFINITION
*"* private components of class ZABAP_EXCEL_RANGES
*"* do not include other source files here!!!
PRIVATE SECTION.
TYPES:
BEGIN OF mty_s_hashed_row,
row_index TYPE int4,
row TYPE REF TO zcl_excel_row,
END OF mty_s_hashed_row ,
mty_ts_hashed_row TYPE HASHED TABLE OF mty_s_hashed_row WITH UNIQUE KEY row_index.

DATA rows TYPE REF TO cl_object_collection .
DATA rows_hasehd TYPE mty_ts_hasehd_row .
DATA rows_hashed TYPE mty_ts_hashed_row .

ENDCLASS.

Expand All @@ -69,14 +68,14 @@ CLASS zcl_excel_rows IMPLEMENTATION.
ls_hashed_row-row_index = io_row->get_row_index( ).
ls_hashed_row-row = io_row.

INSERT ls_hashed_row INTO TABLE rows_hasehd.
INSERT ls_hashed_row INTO TABLE rows_hashed.

rows->add( io_row ).
ENDMETHOD. "ADD


METHOD clear.
CLEAR rows_hasehd.
CLEAR rows_hashed.
rows->clear( ).
ENDMETHOD. "CLEAR

Expand All @@ -91,7 +90,7 @@ CLASS zcl_excel_rows IMPLEMENTATION.
METHOD get.
FIELD-SYMBOLS: <ls_hashed_row> TYPE mty_s_hashed_row.

READ TABLE rows_hasehd WITH KEY row_index = ip_index ASSIGNING <ls_hashed_row>.
READ TABLE rows_hashed WITH KEY row_index = ip_index ASSIGNING <ls_hashed_row>.
IF sy-subrc = 0.
eo_row = <ls_hashed_row>-row.
ENDIF.
Expand All @@ -109,7 +108,7 @@ CLASS zcl_excel_rows IMPLEMENTATION.


METHOD remove.
DELETE TABLE rows_hasehd WITH TABLE KEY row_index = io_row->get_row_index( ) .
DELETE TABLE rows_hashed WITH TABLE KEY row_index = io_row->get_row_index( ) .
rows->remove( io_row ).
ENDMETHOD. "REMOVE

Expand All @@ -121,7 +120,7 @@ CLASS zcl_excel_rows IMPLEMENTATION.
METHOD get_min_index.
FIELD-SYMBOLS: <ls_hashed_row> TYPE mty_s_hashed_row.

LOOP AT rows_hasehd ASSIGNING <ls_hashed_row>.
LOOP AT rows_hashed ASSIGNING <ls_hashed_row>.
IF ep_index = 0 OR <ls_hashed_row>-row_index < ep_index.
ep_index = <ls_hashed_row>-row_index.
ENDIF.
Expand All @@ -131,7 +130,7 @@ CLASS zcl_excel_rows IMPLEMENTATION.
METHOD get_max_index.
FIELD-SYMBOLS: <ls_hashed_row> TYPE mty_s_hashed_row.

LOOP AT rows_hasehd ASSIGNING <ls_hashed_row>.
LOOP AT rows_hashed ASSIGNING <ls_hashed_row>.
IF <ls_hashed_row>-row_index > ep_index.
ep_index = <ls_hashed_row>-row_index.
ENDIF.
Expand Down