sc/source/ui/unoobj/funcuno.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 11a0e582ce4f4065c35fe0a12bc13bf53aaa1dd0 Author: Eike Rathke <er...@redhat.com> AuthorDate: Sat Feb 19 00:31:21 2022 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sat Feb 19 02:14:56 2022 +0100 XFunctionAccess::callFunction() accept empty Sequence<Sequence<Any>> ... as omitted argument with ocMissing token. Change-Id: If6467c624223171904b4fa642b04581350c17973 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130179 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 18cfd2eef580..d3fe7c342c50 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -423,8 +423,14 @@ public: mrDocRow++; } mbArgError = aVisitor.hasArgError(); - if ( nRowCount && nMaxColCount && !mbOverflow ) - lcl_AddRef( mrTokenArr, nStartRow, nMaxColCount, nRowCount ); + if (!mbOverflow) + { + if (nRowCount && nMaxColCount) + lcl_AddRef( mrTokenArr, nStartRow, nMaxColCount, nRowCount ); + else if (nRowCount == 1 && !nMaxColCount) + // Empty Sequence<Sequence<Any>> is omitted argument. + mrTokenArr.AddOpCode( ocMissing); + } } bool getOverflow() const { return mbOverflow; } bool getArgError() const { return mbArgError; }