From 27f3b9b1fee739ae147ac1bd15a69d70bc529298 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 17 Dec 2009 17:28:31 +0000 Subject: #i107741# HasRefListExpressibleAsOneReference is supposed to detect one reference, really do so --- sc/source/core/data/cell2.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sc/source') diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index d7d3708c3295..4caaa1cb3267 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -679,6 +679,14 @@ ScFormulaCell::HasRefListExpressibleAsOneReference(ScRange& rRange) const Union of these references must form one range and their intersection must be empty set. */ + + // Detect the simple case of exactly one reference in advance without all + // overhead. + // #i107741# Doing so actually makes outlines using SUBTOTAL(x;reference) + // work again, where the function does not have only references. + if (HasOneReference( rRange)) + return true; + pCode->Reset(); // Get first reference, if any ScToken* const pFirstReference( -- cgit