From b669bdf89358cd42e3229dbcf2f614be7ab8e1f6 Mon Sep 17 00:00:00 2001 From: pksingh78 <102946017+pksingh78@users.noreply.github.com> Date: Thu, 19 May 2022 15:17:35 +0530 Subject: [PATCH 1/4] Replace Pass by value with reference (#1027) #1012 --- src/zcl_excel_reader_2007.clas.abap | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/zcl_excel_reader_2007.clas.abap b/src/zcl_excel_reader_2007.clas.abap index df7f72b..5c55965 100644 --- a/src/zcl_excel_reader_2007.clas.abap +++ b/src/zcl_excel_reader_2007.clas.abap @@ -282,32 +282,32 @@ CLASS zcl_excel_reader_2007 DEFINITION VALUE(rv_style_guid) TYPE zexcel_cell_style . METHODS load_theme IMPORTING - VALUE(iv_path) TYPE string - !ip_excel TYPE REF TO zcl_excel + iv_path TYPE string + !ip_excel TYPE REF TO zcl_excel RAISING zcx_excel . CONSTANTS: BEGIN OF namespace, - x14ac TYPE string VALUE 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac', - vba_project TYPE string VALUE 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', "#EC NEEDED for future incorporation of XLSM-reader - c TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/chart', - a TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/main', - xdr TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing', - mc TYPE string VALUE 'http://schemas.openxmlformats.org/markup-compatibility/2006', - r TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', - chart TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', - drawing TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', - hyperlink TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', - image TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', - office_document TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', - printer_settings TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings', - shared_strings TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', - styles TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', - theme TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', - worksheet TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', - relationships TYPE string VALUE 'http://schemas.openxmlformats.org/package/2006/relationships', - core_properties TYPE string VALUE 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', - main TYPE string VALUE 'http://schemas.openxmlformats.org/spreadsheetml/2006/main', + x14ac TYPE string VALUE 'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac', + vba_project TYPE string VALUE 'http://schemas.microsoft.com/office/2006/relationships/vbaProject', "#EC NEEDED for future incorporation of XLSM-reader + c TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/chart', + a TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/main', + xdr TYPE string VALUE 'http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing', + mc TYPE string VALUE 'http://schemas.openxmlformats.org/markup-compatibility/2006', + r TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships', + chart TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart', + drawing TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing', + hyperlink TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink', + image TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image', + office_document TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument', + printer_settings TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings', + shared_strings TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings', + styles TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles', + theme TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme', + worksheet TYPE string VALUE 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet', + relationships TYPE string VALUE 'http://schemas.openxmlformats.org/package/2006/relationships', + core_properties TYPE string VALUE 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties', + main TYPE string VALUE 'http://schemas.openxmlformats.org/spreadsheetml/2006/main', END OF namespace. PRIVATE SECTION. @@ -4165,7 +4165,7 @@ CLASS zcl_excel_reader_2007 IMPLEMENTATION. *--------------------------------------------------------------------* * §3 Cycle through the Relationship Tags and use the ones we need *--------------------------------------------------------------------* - lo_node ?= lo_rels->find_from_name_ns( name = 'Relationship' uri = namespace-relationships ). "#EC NOTEXT + lo_node ?= lo_rels->find_from_name_ns( name = 'Relationship' uri = namespace-relationships ). "#EC NOTEXT WHILE lo_node IS BOUND. fill_struct_from_attributes( EXPORTING From ffbc9153bb10eb98e6d9187ed8351b83be0d6f89 Mon Sep 17 00:00:00 2001 From: pksingh78 <102946017+pksingh78@users.noreply.github.com> Date: Thu, 19 May 2022 16:55:48 +0530 Subject: [PATCH 2/4] ReplacePass by value with reference-1 (#1028) #1012-1 --- src/zcl_excel_theme.clas.abap | 8 ++++---- src/zcl_excel_theme_color_scheme.clas.abap | 8 ++++---- src/zcl_excel_theme_font_scheme.clas.abap | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/zcl_excel_theme.clas.abap b/src/zcl_excel_theme.clas.abap index 278fa03..75c3323 100644 --- a/src/zcl_excel_theme.clas.abap +++ b/src/zcl_excel_theme.clas.abap @@ -30,12 +30,12 @@ CLASS zcl_excel_theme DEFINITION VALUE(iv_syscolorlast) TYPE zcl_excel_theme_color_scheme=>t_srgb OPTIONAL . METHODS set_color_scheme_name IMPORTING - VALUE(iv_name) TYPE string . + iv_name TYPE string . METHODS set_font IMPORTING - VALUE(iv_type) TYPE string - VALUE(iv_script) TYPE string - VALUE(iv_typeface) TYPE string . + iv_type TYPE string + iv_script TYPE string + iv_typeface TYPE string . METHODS set_latin_font IMPORTING VALUE(iv_type) TYPE string diff --git a/src/zcl_excel_theme_color_scheme.clas.abap b/src/zcl_excel_theme_color_scheme.clas.abap index ade6ee9..c5b2222 100644 --- a/src/zcl_excel_theme_color_scheme.clas.abap +++ b/src/zcl_excel_theme_color_scheme.clas.abap @@ -44,10 +44,10 @@ CLASS zcl_excel_theme_color_scheme DEFINITION !io_color_scheme TYPE REF TO if_ixml_element . METHODS set_color IMPORTING - VALUE(iv_type) TYPE string - VALUE(iv_srgb) TYPE t_srgb OPTIONAL - VALUE(iv_syscolorname) TYPE string OPTIONAL - VALUE(iv_syscolorlast) TYPE t_srgb . + iv_type TYPE string + iv_srgb TYPE t_srgb OPTIONAL + iv_syscolorname TYPE string OPTIONAL + iv_syscolorlast TYPE t_srgb . METHODS build_xml IMPORTING !io_document TYPE REF TO if_ixml_document . diff --git a/src/zcl_excel_theme_font_scheme.clas.abap b/src/zcl_excel_theme_font_scheme.clas.abap index 4b939d3..15313d8 100644 --- a/src/zcl_excel_theme_font_scheme.clas.abap +++ b/src/zcl_excel_theme_font_scheme.clas.abap @@ -52,7 +52,7 @@ CLASS zcl_excel_theme_font_scheme DEFINITION !io_font_scheme TYPE REF TO if_ixml_element . METHODS set_name IMPORTING - VALUE(iv_name) TYPE string . + iv_name TYPE string . METHODS build_xml IMPORTING !io_document TYPE REF TO if_ixml_document . From e4141e977baa1a6b2c0f0e18e09c1f8b5b1c7913 Mon Sep 17 00:00:00 2001 From: sandraros <34005250+sandraros@users.noreply.github.com> Date: Sat, 21 May 2022 12:37:50 +0200 Subject: [PATCH 3/4] Create publishing-a-new-release.md (#966) * Create publishing-a-new-release.md Co-authored-by: Abo --- docs/contributing/publishing-a-new-release.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/contributing/publishing-a-new-release.md diff --git a/docs/contributing/publishing-a-new-release.md b/docs/contributing/publishing-a-new-release.md new file mode 100644 index 0000000..0d08ae3 --- /dev/null +++ b/docs/contributing/publishing-a-new-release.md @@ -0,0 +1,37 @@ +# Publishing a new release + +Let's create a release from time to time, every 1 or 2 months for instance, to contain enough changes, but not too much. + +Below are the notes taken while publishing the release `7.15.0`. + +Version numbering is based on [Semantic Versioning 2.0.0](https://semver.org/): +- `7`: a major release. NB: it will probably not change as we don't want to "make incompatible API changes". +- `15`: a minor release +- `0`: patch level (bug fixes) + +Create a branch for this new release and change these files: +- `changelog.txt` + - Type from scratch the list of commits since the last version, and add as prefix for each commit: + - `+`: new feature + - `*`: bug fix + - `!`: feature modification + - `-`: feature removed +- `zcl_excel_version` + - Indicate the new version number (NB: the abap2xlsx APACK class uses this version number) +- Restart abapGit to consider the latest version of the changed APACK class, to make the file `.apack-manifest.xml` contain this latest version + - Push the changes to the repository + +With GitHub Desktop (or any Git console or Git user interface), [add the tag](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/managing-tags) `7.15.0` to this branch. + +Do a pull request. + +Wait for approval/commit(s) merged into the master branch. + +Now [create the release in GitHub](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release): +- Click "Releases" +- Click "Draft a new release" +- Click "Choose a tag" +- Type the title, click "Auto-generate release notes" and click "Prview" to verify +- Click "Publish release" +- It's done, zip and tar.gz files are automatically assigned to the release +- The new release appears in the Code home page From 781edaf1d6965fcb5aba0ac4ffdc485f498a4804 Mon Sep 17 00:00:00 2001 From: Abo Date: Sat, 28 May 2022 12:41:58 +0200 Subject: [PATCH 4/4] Remove apack (#1029) * remove ZCL_EXCEL_APACK * remove changelog.txt * remove .apack-manifest.xml * Update publishing-a-new-release.md --- .apack-manifest.xml | 12 -- changelog.txt | 165 ------------------ docs/contributing/publishing-a-new-release.md | 22 +-- src/zcl_excel_apack.clas.abap | 32 ---- src/zcl_excel_apack.clas.xml | 16 -- 5 files changed, 8 insertions(+), 239 deletions(-) delete mode 100644 .apack-manifest.xml delete mode 100644 changelog.txt delete mode 100644 src/zcl_excel_apack.clas.abap delete mode 100644 src/zcl_excel_apack.clas.xml diff --git a/.apack-manifest.xml b/.apack-manifest.xml deleted file mode 100644 index 440fe83..0000000 --- a/.apack-manifest.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - github.com/abap2xlsx/abap2xlsx - abap2xlsx - 7.15.0 - abapGit - https://github.com/abap2xlsx/abap2xlsx.git - - - diff --git a/changelog.txt b/changelog.txt deleted file mode 100644 index da181f6..0000000 --- a/changelog.txt +++ /dev/null @@ -1,165 +0,0 @@ -abapGit changelog -================= - -Legend ------- -* : fixed -! : changed -+ : added -- : removed - -2022-01-08 v7.15.0 ------------------- -! Refactor ABAP Cloud: change REFRESH to CLEAR -* Prevent row height zero -+ New parameter ip_columnrow in SET_CELL and other methods -! Refactor ABAP Cloud: remove use of DTEL SYLANGU and DTEL GUID_16 -! Refactor ABAP Cloud: remove use of cl_abap_conv_out_ce=>uccpi -! Refactor ABAP Cloud: move converter classes to not_cloud package -+ Check demo regressions -! Refactor ABAP Cloud: change FLOAT to F -! Refactor ABAP Cloud: remove TYPE-POOLS statements -! Refactor ABAP Cloud: change SYTABIX to I -! Lint rule to reject commented code / commented code removed -+ Add column for photographer in zdemo_calendar -! Lint rule to reject code not in keyword_case upper -! Refactor ABAP Cloud: use new collection classes -+ Allow more than 255 sheets per workbook -! Refactor ABAP Cloud: Domain for ZEXCEL_SHEET_TITLE -* Demo WebDynpro: ICF, button text, MIME type -! Refactor ABAP Cloud: ddic, fix UUID and GUID_16 -* Typo in code: hasehd -> hashed -! Refactor ABAP Cloud: MOVE statements -! Refactor ABAP Cloud: remove DTEL INTTYPE -* After BIND_TABLE no columns in object -+ Change_area_style (same as change_cell_style, but for area) -+ Customizable demo 25 + backend in demo 37 -* Reflect new abap2xlsx project URL -* Fix enhancement categories of several structures -* Fix links after org. move -! Refactor method change_cell_style in zcl_excel_worksheet -* Correcting broken links after moving of repo -* Reader fails for workbook with chart -+ Worksheet columns right-to-left -* README.md, update urls -* Huge writer error height/hight and fit to page -! Refactor ABAP Cloud: remove use of DOMA INT2 -! Refactor ABAP Cloud: remove use of DTEL DSTRING -* Huge reader reading cells multiple styles -! Pretty print -* Add exception handling -! Split convert_column2alpha -+ SET_AREA/SET_AREA_FORMULA: set value or formula for whole area instea… … - -2021-11-11 v7.14.0 ------------------- -+ changelog -! Refactor ABAP Cloud: column width based on SAP font -! Refactor ABAP Cloud: DDIC references changed -! Refactor ABAP Cloud: collection classes -! Refactor: split unit tests into one method per case -! pretty print zcl_excel_worksheet -* SET_CELL_FORMULA: set formula even if cell was uninitialized -! Refactor: replace all macros with methods -+ Add ability to generate report from template -* Read range of print titles -+ Multiple Styles in One Cell ("rich text format") -+ Bind ALV with non-displayed SALV data -+ new feature "Ignored Errors" -* Ignore invalid Excel Table names -+ new feature "Calculated Columns" -* better error message for ZDEMO_EXCEL25 - -2021-10-11 v7.13.0 ------------------- -! zcl_excel_common: refactor unit tests -! Refactor: replace zcl_excel_aunit with cl_abap_unit_assert -! Refactor ABAP Cloud: DDIC references changed -* clear Style exporting parameter in GET_CELL -+ Conditional Formatting for Cells that "Begin With" and more -- Delete unused customui objects -* ZDEMO_EXCEL37 incorrect screen field labels -* SHIFT_FORMULA -! Refactor: replace macro with method in zcl_excel_style_number_format -* autofilter messed up if several sheets -* autofilter + filtering value, then read it, the filtering value is lost -* autofilter on row 2 is incorrectly set on row 1 -! Refactor: change EXIT to RETURN, where applicable -! Refactor: zcl_excel_common: refactor STATICS to CLASS-DATA -* Writer: trailing spaces of cell values lost -! Refactor: move zexcel_s_org_rel to demos -! update to latest abapGit format -! abaplint to not change sy fields anymore -! Refactor: Do not change sy fields anymore -! abapGit diff says zdemo_calendar_classes has changed -! update abaplint configuration to latest -! Refactor: Move non-Cloud code to separate package (#795) … -* Reader: empty Excel date -> ABAP 00000000 - -2021-09-11 v7.12.0 ------------------- -! First draft of the contributing guidelines -! Refactor: remove usage of CHAR07 domain - -2021-08-11 v7.11.0 ------------------- -! Pretty print on all source code -! Create coding-guidelines.md -! remove usage of CHAR08 DTEL -! remove usage of CHAR10 domain -! remove usage of OS_BOOLEAN - -2021-07-11 v7.10.0 ------------------- -! remove unused DOMA -! Reader: wrong worksheet dimension -* GET_TABLE: support fields of type date -* Vietnamese, Emoji and other characters not rendered in old SAP versions -* SET_TABLE: support table headers with newline -* SET_CELL: support values with wildcard format like `_x0041_` - -2021-06-11 v7.9.0 ------------------- -! update linter config to latest -+ Remove 15 chars. limit at encrypt password -+ Reader to read range of hyperlinks and new method SET_AREA_HYPERLINK -* Vietnamese, Emoji and other characters not rendered -* Update of ZDEMO_EXCEL31 to use CALCULATE_COLUMN_WIDTHS -! remove CHAR01 - -2021-05-11 v7.8.0 ------------------- -! remove "BOOLEAN" domain -! replace messages with ones from ZABAP2XLSX message class - -2021-04-11 v7.7.0 ------------------- -! remove CHAR_02 domain -! abapGit format update - -2021-03-11 v7.6.0 ------------------- -! AUnit warning zcl excel reader huge file "# au > "#au -! Remove doma ZEXCEL_BOOLE01 - -2021-02-11 v7.5.0 ------------------- -+ Possibility to get the fieldcatalog with mandt -! cleanup types in zif_excel_book_protection - -2021-01-11 v7.4.0 ------------------- -! warning about SAPLink in documentation, and replace obsolete links in zangry_birds and zdemo_excel1 -! remove XFELD usage -! Dynamic prefill of date in zdemo_calendar - -2020-12-11 v7.3.0 ------------------- -* Fix in ZDEMO_EXCEL11: Field-symbol usage -! Update abapGit-installation.md - -2020-11-11 v7.2.0 ------------------- -! Improve Documentaiton -! Fix package errors -+ Feature: Enable custom converters diff --git a/docs/contributing/publishing-a-new-release.md b/docs/contributing/publishing-a-new-release.md index 0d08ae3..269d952 100644 --- a/docs/contributing/publishing-a-new-release.md +++ b/docs/contributing/publishing-a-new-release.md @@ -9,17 +9,7 @@ Version numbering is based on [Semantic Versioning 2.0.0](https://semver.org/): - `15`: a minor release - `0`: patch level (bug fixes) -Create a branch for this new release and change these files: -- `changelog.txt` - - Type from scratch the list of commits since the last version, and add as prefix for each commit: - - `+`: new feature - - `*`: bug fix - - `!`: feature modification - - `-`: feature removed -- `zcl_excel_version` - - Indicate the new version number (NB: the abap2xlsx APACK class uses this version number) -- Restart abapGit to consider the latest version of the changed APACK class, to make the file `.apack-manifest.xml` contain this latest version - - Push the changes to the repository +Create a branch for this new release, change `zcl_excel_version` to indicate the new version number and push the changes to the repository With GitHub Desktop (or any Git console or Git user interface), [add the tag](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/managing-tags) `7.15.0` to this branch. @@ -31,7 +21,11 @@ Now [create the release in GitHub](https://docs.github.com/en/repositories/relea - Click "Releases" - Click "Draft a new release" - Click "Choose a tag" -- Type the title, click "Auto-generate release notes" and click "Prview" to verify -- Click "Publish release" +- Type the title, click "Auto-generate release notes" and click "Preview" to verify; you should have a list with the following items, edit as required: + - `+`: new feature + - `*`: bug fix + - `!`: feature modification + - `-`: feature removed +- Click "Publish release" - It's done, zip and tar.gz files are automatically assigned to the release -- The new release appears in the Code home page +- The new release appears in the Code home page, with the changelog in the release page itself. diff --git a/src/zcl_excel_apack.clas.abap b/src/zcl_excel_apack.clas.abap deleted file mode 100644 index aa47c14..0000000 --- a/src/zcl_excel_apack.clas.abap +++ /dev/null @@ -1,32 +0,0 @@ -CLASS zcl_excel_apack DEFINITION - PUBLIC - FINAL - CREATE PUBLIC . - - PUBLIC SECTION. - - INTERFACES if_apack_manifest. - - METHODS: constructor. - - ALIASES descriptor FOR if_apack_manifest~descriptor. - - PROTECTED SECTION. - PRIVATE SECTION. -ENDCLASS. - - - -CLASS zcl_excel_apack IMPLEMENTATION. - - METHOD constructor. - - descriptor-group_id = 'github.com/abap2xlsx/abap2xlsx'. - descriptor-artifact_id = 'abap2xlsx'. - descriptor-version = zcl_excel=>version. - descriptor-repository_type = 'abapGit'. - descriptor-git_url = 'https://github.com/abap2xlsx/abap2xlsx.git'. - - ENDMETHOD. - -ENDCLASS. diff --git a/src/zcl_excel_apack.clas.xml b/src/zcl_excel_apack.clas.xml deleted file mode 100644 index f48bc93..0000000 --- a/src/zcl_excel_apack.clas.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - ZCL_EXCEL_APACK - E - abap2xlsx version and dependencies - 1 - X - X - X - - - -