summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-02-19 00:31:21 +0100
committerEike Rathke <erack@redhat.com>2022-02-19 02:14:56 +0100
commit11a0e582ce4f4065c35fe0a12bc13bf53aaa1dd0 (patch)
tree20b4b6573800dc68ad540748ec25dc8e50e0c793
parent0038a2df911d807a47f7891ab47d19af0a9ed544 (diff)
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 <erack@redhat.com> Tested-by: Jenkins
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx10
1 files changed, 8 insertions, 2 deletions
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; }