summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-27 14:05:45 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-27 14:38:18 -0500
commit56805bab63f30496c7f13a0e88c2b265044cad30 (patch)
tree317d24b37ba04597dad8e9eeae6dd69101117c89 /sc/source/core
parent85da677fa06c9b915bcc415b2e95d87a6cbeb750 (diff)
We shouldn't check isValid() here.
When the referenced range consists of entirely empty cells, we get an empty array, which is correct, but an empty array returns false when calling isValid(), which is not correct. After some thought, it's best not to check for isValid() here. Change-Id: I50dcea4f2b55d5f5c6f1226cca4106ddcad62145
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/grouptokenconverter.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index 55b27092789b..b295fee100de 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -116,9 +116,9 @@ bool ScGroupTokenConverter::convert(ScTokenArray& rCode)
// returned array equals or greater than the requested
// length.
- formula::VectorRefArray aArray = mrDoc.FetchVectorRefArray(aRefPos, nLen);
- if (!aArray.isValid())
- return false;
+ formula::VectorRefArray aArray;
+ if (nLen)
+ aArray = mrDoc.FetchVectorRefArray(aRefPos, nLen);
formula::SingleVectorRefToken aTok(aArray, nLen);
mrGroupTokens.AddToken(aTok);
@@ -184,9 +184,9 @@ bool ScGroupTokenConverter::convert(ScTokenArray& rCode)
for (SCCOL i = aAbs.aStart.Col(); i <= aAbs.aEnd.Col(); ++i)
{
aRefPos.SetCol(i);
- formula::VectorRefArray aArray = mrDoc.FetchVectorRefArray(aRefPos, nArrayLength);
- if (!aArray.isValid())
- return false;
+ formula::VectorRefArray aArray;
+ if (nArrayLength)
+ aArray = mrDoc.FetchVectorRefArray(aRefPos, nArrayLength);
aArrays.push_back(aArray);
}