summaryrefslogtreecommitdiff
path: root/sc/source
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
commit27f3b9b1fee739ae147ac1bd15a69d70bc529298 (patch)
tree6d58d35ff4a79e7f674e105531fa457481867a00 /sc/source
parent50e1b982ff532184892b63dd2634571b2ef6ce8e (diff)
#i107741# HasRefListExpressibleAsOneReference is supposed to detect one reference, really do so
Diffstat (limited to 'sc/source')
-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 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(