diff options
author | Eike Rathke <erack@redhat.com> | 2021-03-25 12:04:22 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-03-25 16:31:29 +0100 |
commit | 042dbf83122b14fd1dd32705c8f8b7d65c22f21b (patch) | |
tree | aa3aa08a84ffee45a95293f2a9fa3a0a1c983c25 /svl | |
parent | c8c5a06eed6c22e40bda9787ace5467d551130b6 (diff) |
Resolves: tdf#141146 Fix LOOKUP in array with result scalar / single reference
The returns are identical to the cell range search.
Also, the single reference case is just a special case of range
reference and acts as row vector (as number of rows is not greater
than number of columns), equally extending the passed "range" if
found position is greater than 1.
Extending a result range such leads to the result cell not being
listened to and not acting on its changes, this was always the case for
results of an extended range, and Excel seems to have the same problem.
This is logical because the range cell is unknown in advance, and
certainly we don't want to make LOOKUP() a volatile function being
executed on each change everywhere.
Solutions to this could be:
- create a single cell broadcaster/listener on the fly while pushing the
out-of-band cell result
- this is nasty and modifying the model while interpreting is ugly and
error prone and it's unclear who should destroy such broadcaster if
the query or data range/array changed
- so this is a no-go
- create a range broadcaster/listener for the entire row right of the
cell
- would mean to inspect during listener setup to which parameter of
which OpCode a reference belongs
- really? ...no
- which also doesn't help if a given range is too short and is
extended
- would mean to always extend the listener either as row or column
* doubtable if it is really worth it for this one time off fouled up
Excel behaviour
* or should we rather return an error for out-of-band results?
- but then again for ranges it always worked this like
+ do not advertise, or strongly deprecate such use
+ a result range should have the same length as the search
range/array
Change-Id: Ie903f4491844306d3768ee40bd16786ebe648461
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113085
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'svl')
0 files changed, 0 insertions, 0 deletions