summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <er@openoffice.org>2009-12-17 17:28:31 +0000
committerEike Rathke <er@openoffice.org>2009-12-17 17:28:31 +0000
commit8f575babf9a8e29305e158934261268dd80b351c (patch)
tree0ea3165f4800d4477aa272a93417aa859545cf86
parent560bd7c6144c1b17b25f313d6ea81bb86a66766d (diff)
#i107741# HasRefListExpressibleAsOneReference is supposed to detect one reference, really do so
-rw-r--r--sc/source/core/data/cell2.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index 14df8c236..af4a9297f 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(