diff options
author | Eike Rathke <erack@redhat.com> | 2022-06-01 20:52:32 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-06-02 00:33:15 +0200 |
commit | dad1d7182eda5f0e155964d32ac03e5cd854eb96 (patch) | |
tree | cf2967f4e58e07f4d0a47aa510f00e977f07faca /formula | |
parent | b760b2f743ff5a451ddf2be6fd69fe94423ae8dc (diff) |
Resolves: tdf#149378 Force array input if outer function returns array/matrix
So the result will actually display as full matrix, or in the cell
range marked prior to input, instead of just the top left element
in one cell, without having to close the input with
Shift+Ctrl+Enter to force array mode. The previous behaviour can
be forced by pre-selecting/marking one cell, which also worked
previously when closing as array input.
Change-Id: I81c079ce02e0c8d0536617ca6882fb470a352441
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135278
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/core/api/token.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index abda98f2f86d..87b0fb67ca98 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -512,6 +512,13 @@ FormulaToken* FormulaTokenArray::FirstRPNToken() const return pRPN[0]; } +FormulaToken* FormulaTokenArray::LastRPNToken() const +{ + if (!pRPN || nRPN == 0) + return nullptr; + return pRPN[nRPN - 1]; +} + bool FormulaTokenArray::HasReferences() const { for (auto i: Tokens()) |