Merge remote-tracking branch 'refs/remotes/ivanfemia/master'

# Conflicts:
#	ZA2X/CLAS/ZCL_EXCEL_TABLE.slnk
This commit is contained in:
Łukasz Pęgiel 2016-03-31 20:21:03 +02:00
commit c5b5084cfa
6 changed files with 39 additions and 35 deletions

View File

@ -120,7 +120,7 @@ ENDCLASS. &quot;zcl_Tc_Excel</localTestClasses>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="AUTOFILTERS" VERSION="1" LANGU="E" DESCRIPT="Autofilters collection" EXPOSURE="0" STATE="1" EDITORDER="2 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_AUTOFILTERS" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="CHARTS" VERSION="1" LANGU="E" DESCRIPT="Charts collection" EXPOSURE="0" STATE="1" EDITORDER="3 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_DRAWINGS" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="DEFAULT_STYLE" VERSION="1" LANGU="E" DESCRIPT="Style identifier" EXPOSURE="0" STATE="1" EDITORDER="4 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="1" TYPE="ZEXCEL_CELL_STYLE" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="DRAWINGS" VERSION="1" LANGU="E" DESCRIPT="Worksheets collection" EXPOSURE="0" STATE="1" EDITORDER="5 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_DRAWINGS" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="DRAWINGS" VERSION="1" LANGU="E" DESCRIPT="Drawings collection" EXPOSURE="0" STATE="1" EDITORDER="5 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_DRAWINGS" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="LEGACY_PALETTE" VERSION="1" LANGU="E" EXPOSURE="2" STATE="1" EDITORDER="1 " ATTDECLTYP="0" ATTRDONLY="X" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_LEGACY_PALETTE" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="RANGES" VERSION="1" LANGU="E" DESCRIPT="Ranges collection" EXPOSURE="0" STATE="1" EDITORDER="6 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_RANGES" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>
<attribute CLSNAME="ZCL_EXCEL" CMPNAME="SECURITY" VERSION="1" LANGU="E" DESCRIPT="Security" EXPOSURE="2" STATE="1" EDITORDER="2 " ATTDECLTYP="0" ATTEXPVIRT="0" TYPTYPE="3" TYPE="ZCL_EXCEL_SECURITY" SRCROW1="0 " SRCCOLUMN1="0 " SRCROW2="0 " SRCCOLUMN2="0 " TYPESRC_LENG="0 "/>

View File

@ -1400,7 +1400,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-12-29
* - Stefan Schmoecker, (done) 2012-12-29
* - ...
* changes: renaming variables to naming conventions
* removing unused variables
@ -1409,7 +1409,7 @@ ENDMETHOD.</source>
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#246 - error converting lower case column names
* - Stefan Schmöcker, 2012-12-29
* - Stefan Schmoecker, 2012-12-29
* changes: translating the correct variable to upper dase
* adding missing exception if input is a number
* that is out of bounds
@ -1559,7 +1559,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
&quot;issue #256 - replacing char processing with regex
*--------------------------------------------------------------------*
* Stefan Schmöcker, 2013-08-11
* Stefan Schmoecker, 2013-08-11
* Allow input to be CLIKE instead of STRING
*--------------------------------------------------------------------*
@ -1585,7 +1585,7 @@ endmethod.</source>
<source>method CONVERT_RANGE2COLUMN_A_ROW.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-12-07
* - Stefan Schmoecker, (done) 2012-12-07
* - ...
* changes: renaming variables to naming conventions
* aligning code
@ -1595,12 +1595,12 @@ endmethod.</source>
*--------------------------------------------------------------------*
* issue#241 - error when sheetname contains &quot;!&quot;
* - sheetname should be returned unescaped
* - Stefan Schmöcker, 2012-12-07
* - Stefan Schmoecker, 2012-12-07
* changes: changed coding to support sheetnames with &quot;!&quot;
* unescaping sheetname
*--------------------------------------------------------------------*
* issue#155 - lessening restrictions of input parameters
* - Stefan Schmöcker, 2012-12-07
* - Stefan Schmoecker, 2012-12-07
* changes: i_range changed to clike
* e_sheet changed to clike
*--------------------------------------------------------------------*
@ -1814,19 +1814,19 @@ endmethod.</source>
<source>method ESCAPE_STRING.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-12-08
* - Stefan Schmoecker, (done) 2012-12-08
* - ...
* changes: aligning code
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#242 - Support escaping for white-spaces
* - Escaping also necessary when &apos; encountered in input
* - Stefan Schmöcker, 2012-12-08
* - Stefan Schmoecker, 2012-12-08
* changes: switched check if escaping is necessary to regular expression
* and moved the &quot;REPLACE&quot;
*--------------------------------------------------------------------*
* issue#155 - lessening restrictions of input parameters
* - Stefan Schmöcker, 2012-12-08
* - Stefan Schmoecker, 2012-12-08
* changes: ip_value changed to clike
*--------------------------------------------------------------------*
DATA: lv_value TYPE string.

View File

@ -498,7 +498,7 @@ ENDMETHOD.</source>
<source>method fill_struct_from_attributes.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-07
* - Stefan Schmoecker, (done) 2012-11-07
* - ...
* changes: renaming variables to naming conventions
* aligning code
@ -933,7 +933,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-11
* - Stefan Schmoecker, (done) 2012-11-11
* - ...
* changes: renaming variables to naming conventions
* renaming variables to indicate what they are used for
@ -1049,7 +1049,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (wip ) 2012-11-25
* - Stefan Schmoecker, (wip ) 2012-11-25
* - ...
* changes: renaming variables and types to naming conventions
* aligning code
@ -1287,7 +1287,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-25
* - Stefan Schmoecker, (done) 2012-11-25
* - ...
* changes: renaming variables and types to naming conventions
* aligning code
@ -1421,7 +1421,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-25
* - Stefan Schmoecker, (done) 2012-11-25
* - ...
* changes: renaming variables and types to naming conventions
* aligning code
@ -1589,7 +1589,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-25
* - Stefan Schmoecker, (done) 2012-11-25
* - ...
* changes: renaming variables and types to naming conventions
* aligning code
@ -1721,7 +1721,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-25
* - Stefan Schmoecker, (done) 2012-11-25
* - ...
* changes: renaming variables and types to naming conventions
* adding comments to explain what we are trying to achieve
@ -1793,7 +1793,7 @@ endmethod.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-10
* - Stefan Schmoecker, (done) 2012-11-10
* - ...
* changes: renaming variables to naming conventions
* aligning code
@ -1805,15 +1805,15 @@ endmethod.</source>
* ip_excel renamed while being at it --&gt; rename to io_excel
*--------------------------------------------------------------------*
* issue #232 - Read worksheetstate hidden/veryHidden
* - Stefan Schmöcker, 2012-11-11
* - Stefan Schmoecker, 2012-11-11
*--------------------------------------------------------------------*
* issue#235 - repeat rows/columns
* - Stefan Schmöcker, 2012-12-02
* - Stefan Schmoecker, 2012-12-02
* changes: correction in named ranges to correctly attach
* sheetlocal names/ranges to the correct sheet
*--------------------------------------------------------------------*
* issue#284 - Copied formulae ignored when reading excelfile
* - Stefan Schmöcker, 2013-08-02
* - Stefan Schmoecker, 2013-08-02
* changes: initialize area to hold referenced formulaedata
* after all worksheets have been read resolve formuae
*--------------------------------------------------------------------*
@ -2122,7 +2122,8 @@ endmethod.</source>
zcl_excel_common=&gt;convert_range2column_a_row( EXPORTING i_range = lv_range_value
IMPORTING e_column_start = lv_col_start_alpha
e_column_end = lv_col_end_alpha
e_row_start = ls_area-row_start ).
e_row_start = ls_area-row_start
e_row_end = ls_area-row_end ).
ls_area-col_start = zcl_excel_common=&gt;convert_column2int( lv_col_start_alpha ).
ls_area-col_end = zcl_excel_common=&gt;convert_column2int( lv_col_end_alpha ).
lo_autofilter-&gt;set_filter_area( is_area = ls_area ).
@ -2223,7 +2224,7 @@ endmethod.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker,
* - Stefan Schmoecker,
* - ...
* changes: renaming variables to naming conventions
* aligning code (started)
@ -3860,7 +3861,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-11
* - Stefan Schmoecker, (done) 2012-11-11
* - ...
* changes: replaced previous coding by regular expression
* adding comments to explain what we are trying to achieve

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<CLAS CLSNAME="ZCL_EXCEL_STYLE_FONT" VERSION="1" LANGU="E" DESCRIPT="Font Style" CATEGORY="00" EXPOSURE="2" STATE="1" RELEASE="0" CLSFINAL="X" CLSCCINCL="X" FIXPT="X" UNICODE="X" CLSBCCAT="00" DURATION_TYPE="0 " RISK_LEVEL="0 ">
<CLAS CLSNAME="ZCL_EXCEL_STYLE_FONT" VERSION="1" LANGU="E" DESCRIPT="Font Style" CATEGORY="00" EXPOSURE="2" STATE="1" RELEASE="0" CLSFINAL="X" CLSCCINCL="X" FIXPT="X" UNICODE="X" CLSBCCAT="00" DURATION_TYPE="0 " RISK_LEVEL="0 " ZSAPLINK_PLUGIN_MAJOR_VERSION="0 " ZSAPLINK_PLUGIN_MINOR_VERSION="1 " ZSAPLINK_PLUGIN_BUILD_VERSION="0 " ZSAPLINK_PLUGIN_INFO1="ZSAPLINK_CLASS is part of the main ZSAPLINK project --&gt; This plugin found there instead of ZSAPLINK_PLUGINS projects" ZSAPLINK_PLUGIN_INFO2="SAPLINK homepage: https://www.assembla.com/spaces/saplink/wiki" ZSAPLINK_PLUGIN_INFO3="Download from https://www.assembla.com/code/saplink/subversion/nodes" ZSAPLINK_PLUGIN_INFO4="and navigate to: trunk -&gt; core -&gt; ZSAPLINK -&gt; CLAS -&gt; ZSAPLINK_CLASS.slnk">
<localImplementation>*&quot;* local class implementation for public class
*&quot;* use this source file for the implementation part of
*&quot;* local helper classes</localImplementation>
@ -42,7 +42,7 @@
<parameter CLSNAME="ZCL_EXCEL_STYLE_FONT" CMPNAME="CALCULATE_TEXT_WIDTH" SCONAME="I_TEXT" VERSION="1" LANGU="E" DESCRIPT="Cell Value" CMPTYPE="1" MTDTYPE="0" EDITORDER="1 " DISPID="0 " PARDECLTYP="0" PARPASSTYP="1" TYPTYPE="1" TYPE="ZEXCEL_CELL_VALUE"/>
<parameter CLSNAME="ZCL_EXCEL_STYLE_FONT" CMPNAME="CALCULATE_TEXT_WIDTH" SCONAME="R_WIDTH" VERSION="1" LANGU="E" DESCRIPT="Field of type FLTP" CMPTYPE="1" MTDTYPE="0" EDITORDER="2 " DISPID="0 " PARDECLTYP="3" PARPASSTYP="0" TYPTYPE="1" TYPE="I"/>
<source>method CALCULATE_TEXT_WIDTH.
&quot; Addition to solve issue #120, contribution by Stefan Schmöcker
&quot; Addition to solve issue #120, contribution by Stefan Schmoecker
r_width = strlen( i_text ).
&quot; use scale factor based on default 11
&quot; ( don&apos;t know where defaultsetting is stored currently )

View File

@ -3124,7 +3124,8 @@ METHOD calculate_cell_width.
FROM tfo01
INTO TABLE lt_font_families
UP TO 1 ROWS
WHERE tdtext = ld_font_name.
WHERE tdtext = ld_font_name
ORDER BY PRIMARY KEY.
&quot; Check if a matching font family was found
&quot; Fonts can be uploaded from TTF files using transaction SE73
@ -3905,6 +3906,7 @@ ENDMETHOD.</source>
<parameter CLSNAME="ZCL_EXCEL_WORKSHEET" CMPNAME="GET_CELL" SCONAME="EP_RC" VERSION="1" LANGU="E" DESCRIPT="Return Value of ABAP Statements" CMPTYPE="1" MTDTYPE="0" EDITORDER="4 " DISPID="0 " PARDECLTYP="1" PARPASSTYP="1" TYPTYPE="1" TYPE="SYSUBRC"/>
<parameter CLSNAME="ZCL_EXCEL_WORKSHEET" CMPNAME="GET_CELL" SCONAME="EP_STYLE" VERSION="1" LANGU="E" DESCRIPT="Style" CMPTYPE="1" MTDTYPE="0" EDITORDER="5 " DISPID="0 " PARDECLTYP="1" PARPASSTYP="1" TYPTYPE="3" TYPE="ZCL_EXCEL_STYLE"/>
<parameter CLSNAME="ZCL_EXCEL_WORKSHEET" CMPNAME="GET_CELL" SCONAME="EP_GUID" VERSION="1" LANGU="E" DESCRIPT="Style identifier" CMPTYPE="1" MTDTYPE="0" EDITORDER="6 " DISPID="0 " PARDECLTYP="1" PARPASSTYP="1" TYPTYPE="1" TYPE="ZEXCEL_CELL_STYLE"/>
<parameter CLSNAME="ZCL_EXCEL_WORKSHEET" CMPNAME="GET_CELL" SCONAME="EP_FORMULA" VERSION="1" LANGU="E" DESCRIPT="Cell Formula" CMPTYPE="1" MTDTYPE="0" EDITORDER="7 " DISPID="0 " PARDECLTYP="1" PARPASSTYP="1" TYPTYPE="1" TYPE="ZEXCEL_CELL_FORMULA"/>
<exception CLSNAME="ZCL_EXCEL_WORKSHEET" CMPNAME="GET_CELL" SCONAME="ZCX_EXCEL" VERSION="1" LANGU="E" DESCRIPT="Exceptions for ABAP2XLSX" MTDTYPE="0" EDITORDER="1 "/>
<source>method GET_CELL.
@ -3919,10 +3921,11 @@ ENDMETHOD.</source>
cell_column = lv_column.
ep_rc = sy-subrc.
ep_value = ls_sheet_content-cell_value.
ep_guid = ls_sheet_content-cell_style. &quot; issue 139 - added this to be used for columnwidth calculation
ep_value = ls_sheet_content-cell_value.
ep_guid = ls_sheet_content-cell_style. &quot; issue 139 - added this to be used for columnwidth calculation
ep_formula = ls_sheet_content-cell_formula.
&quot; Addition to solve issue #120, contribution by Stefan Schm#ƒÂ#cker
&quot; Addition to solve issue #120, contribution by Stefan Schmöcker
DATA: style_iterator TYPE REF TO cl_object_collection_iterator,
style TYPE REF TO zcl_excel_style.
IF ep_style IS REQUESTED.

View File

@ -2813,7 +2813,7 @@ ENDMETHOD.</source>
*--------------------------------------------------------------------*
* issue #237 - Error writing column-style
* - Stefan Schmöcker, 2012-11-01
* - Stefan Schmoecker, 2012-11-01
*--------------------------------------------------------------------*
TYPES: BEGIN OF cfvo,
@ -3536,8 +3536,8 @@ ENDMETHOD.</source>
* col_count = io_worksheet-&gt;get_highest_column( ).
* &quot; Get autofilter
** lv_guid = io_worksheet-&gt;get_guid( ) .
* lo_autofilters = excel-&gt;get_autofilters_reference( ).
* lo_autofilter = lo_autofilters-&gt;get( io_worksheet = io_worksheet ) .
lo_autofilters = excel-&gt;get_autofilters_reference( ).
lo_autofilter = lo_autofilters-&gt;get( io_worksheet = io_worksheet ) .
* IF lo_autofilter IS BOUND.
* lt_values = lo_autofilter-&gt;get_values( ) .
* ls_area = lo_autofilter-&gt;get_filter_area( ) .
@ -6646,13 +6646,13 @@ endmethod.</source>
<source>METHOD create_xl_workbook.
*--------------------------------------------------------------------*
* issue #230 - Pimp my Code
* - Stefan Schmöcker, (done) 2012-11-07
* - Stefan Schmoecker, (done) 2012-11-07
* - ...
* changes: aligning code
* adding comments to explain what we are trying to achieve
*--------------------------------------------------------------------*
* issue#235 - repeat rows/columns
* - Stefan Schmöcker, 2012-12-01
* - Stefan Schmoecker, 2012-12-01
* changes: correction of pointer to localSheetId
*--------------------------------------------------------------------*