A1# is the postfix counterpart of the @ prefix. When A1 is the origin of a dynamic-array formula spilled into A1:A4, A1# refers to the whole spill range, so SUM(A1#) totals the four values and ROWS(A1#) returns 4. The new opcode ocSpill sits in the unary-operator range. The tokenizer produces it from a bare # after a reference or value. Otherwise # stays the start of a #REF! or #NAME! token. The compiler routes it through PostOpLine so it follows its operand in the RPN. ScSpilledRange pushes the spill range as an ScMatrixRangeToken so aggregating functions see the whole range, and ISREF reports it as a reference. A master yields its matrix. A plain number, string, or non-master matrix slot yields the the cell value. A freshly typed =A1# counts as an array result, so it promotes to a dynamic-array master and spills again. A cell that does not promote collapses the range by implicit intersection to the row-aligned value, or #VALUE! outside the range, keeping that cell's number format. Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> Change-Id: Idf2752af3f7575f6bc95b940344aa365415e4a2f Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5785 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com> (cherry picked from commit 9b97b0fc91bce4b8726ea210347e8ea84270e148) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207904 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
15 lines
543 B
Makefile
15 lines
543 B
Makefile
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
#*************************************************************************
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
#*************************************************************************
|
|
|
|
$(eval $(call sc_ucalc_test,_spilled_range))
|
|
|
|
# vim: set noet sw=4 ts=4:
|