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

Lessening the restrictions on various parameters #153

Closed
ivanfemia opened this issue Dec 27, 2013 · 4 comments
Closed

Lessening the restrictions on various parameters #153

ivanfemia opened this issue Dec 27, 2013 · 4 comments
Milestone

Comments

@ivanfemia
Copy link
Collaborator

A lot of methos have parameters that are typed very specifically. On various occasions this struck me as overly difficult to use.
Example ( See demoreport 1 )

The following code does work

  column_dimension->set_width( ip_width = 11 ).

This won't, bécaule ip_width is typed as "Float"

  DATA: width TYPE i VALUE 11.
  column_dimension->set_width( ip_width = width ).

Solution: Change the typing of parameters to more general generic types to allow for easier use and convert to preferred type on entry of the method.

Examples which come to my mind.
column_dimension->set_width: ip_width : set to TYPE ANY ( to support NUMC-fields as well ) - raise exception if something really unsuitable gets passed
row_dimension->set_row_height: ip_height : set to TYPE ANY ( to support NUMC-fields as well ) - raise exception if something really unsuitable gets passed

various_methods: ip_column ( usually typed to ZEXCEL_CELL_COLUMN_ALPHA ). Set to TYPE ANY ( to support numerical access to a column as well ) raise exception if something really unsuitable gets passed

@ivanfemia
Copy link
Collaborator Author

Starting this issue ( using less strict typing and adding exceptions if something really strange gets passed ):
ZCL_EXCEL_COMMON->CONVERT_COLUMN2INT
ZCL_EXCEL_WORKSHEET_COLUMNDIME->SET_WIDTH
ZCL_EXCEL_WORKSHEET_ROWDIMENSI->SET_ROW_HEIGHT

@ivanfemia
Copy link
Collaborator Author

Switched parameter ip_column in the following methods from ZEXCEL_CELL_COLUMN_ALPHA to SIMPLE and added exceptionclass ZCX_EXCEL where this wasn't present at the time being. Mainly this was done to allow using numeric access to columns. Probably I'll change the latest demoprogram ( static styles - Chess ) because there it will ease up code.

ZCL_EXCEL_COMMON->CONVERT_COLUMN2ALPHA
ZCL_EXCEL_COMMON->CONVERT_COLUMN2INT
ZCL_EXCEL_HYPERLINK->SET_CELL_REFERENCE
ZCL_EXCEL_WORKSHEET->CALCULATE_CELL_WIDTH
ZCL_EXCEL_WORKSHEET->CHANGE_CELL_STYLE
ZCL_EXCEL_WORKSHEET->GET_CELL
ZCL_EXCEL_WORKSHEET->GET_COLUMN_DIMENSION
ZCL_EXCEL_WORKSHEET->SET_CELL
ZCL_EXCEL_WORKSHEET->SET_CELL_STYLE

@ivanfemia
Copy link
Collaborator Author

Updating issues (#174, #31, #71, #134, #137, #141, #155, #156, #170, #176, #179, #180, #182)

@ivanfemia
Copy link
Collaborator Author

Might as well set this to "test".
If anyone comes up with a method that needs lesser restrictions feel free to reopen this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant