diff options
author | Eike Rathke <erack@redhat.com> | 2022-05-13 01:30:20 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-05-16 10:30:23 +0200 |
commit | 9501315fc7baa9b7b32834252375afc39379305b (patch) | |
tree | 3e3bf3f2261ab9f2ceee0b974280aecff41ece0c /sc | |
parent | c6cdfd364963ada3fc12aa35ecc8c641eff0276c (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
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134277
Diffstat (limited to 'sc')
-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 87bc8e5fe8d6..42d6dde67df2 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -1744,10 +1744,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)); } |