office-gobmx/wizards/source
Jean-Pierre Ledure ec4415d2a7 ScriptForge - Methods about data arrays
A data array is a 1D array of 1D subarrays.
All arrays are presumed zero-based.
Usages:
- the content of a range of Calc cells returned
  by the UNO XCellRange.getDataArray() or
  XCellRange.getFormulaArray() methods
- the output of SF_Session.ExecuteCalcFunction()
- a tuple of (sub)tuples returned by a Python script

3 methods are added to the Array service:

1) ConvertFromDataArray(DataArray, [IsRange], [FillValue])
  Convert a data array to a scalar, a vector or a 2D array.
  On request, the individual items are reduced
  to strings or doubles only.

2) ConvertToDataArray(Data, [IsRange], [Rows], [Columns)
  Create a data array from a scalar, a 1D array or a 2D array.
  The returned data array is zero-based and compatible
  with the XCellRange.DataArray property when IsRange = True.

3) ConvertToRange(Data, [Direction])
  Create a valid cells range content from a scalar,
  a 1D array, a 2D array or a data array.
  The individual items are always reduced to strings
  or doubles. Including booleans or dates.
  The returned scalar or array is a valid argument
  of the SF_Session.ExecuteCalcFunction() method.

They replace the internal _ConvertFromDataArray()
and _ConvertToDataArray() that were present in
the Calc service, called by SetValue(),
SetFormula() etc. methods.

This change is Basic only and has no effect in Python.

The documentation about the Array service
should be completed with these new 3 methods.

Change-Id: Idc5b6417648e4574b0f9c7c6e2438ff7dfce1829
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177620
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
2024-12-02 10:25:44 +01:00
..
access2base
config
configshare
depot
euro
formwizard
gimmicks
imagelists
importwizard
resources
scriptforge
sfdatabases
sfdialogs
sfdocuments
sfunittests
sfwidgets
standard
template
tools
tutorials