diff options
author | Eike Rathke <erack@redhat.com> | 2022-05-13 01:30:20 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-05-13 02:18:58 +0200 |
commit | 4bd8eb13e1e2693961fdb9c19c403fde9d163de1 (patch) | |
tree | 310036d04ac0ed80b665e2a3f1a29ac6a06e5ca3 | |
parent | fb8eb0ad9c3a5957a6e131490a7a8c97e5353ba2 (diff) |
Use interpreter stack to determine JumpMatrix context, tdf#148863 follow-up
pJumpMatrix may or may not be set; actually may need some rework,
but get this straight here.
Change-Id: I0948e6aeb6637e7a5009a17f63f01d0733c0205c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134252
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 5b8e326a3c19..c6bcb29b28bb 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1746,10 +1746,10 @@ void ScInterpreter::ScRandomImpl( const std::function<double( double fFirst, dou // In JumpMatrix context use its dimensions for the return matrix; the // formula cell range selected may differ, for example if the result is // to be transposed. - if (pJumpMatrix) + if (GetStackType(1) == svJumpMatrix) { SCSIZE nC, nR; - pJumpMatrix->GetDimensions( nC, nR); + pStack[sp-1]->GetJumpMatrix()->GetDimensions( nC, nR); nCols = std::max<SCCOL>(0, static_cast<SCCOL>(nC)); nRows = std::max<SCROW>(0, static_cast<SCROW>(nR)); } |