Kaydet (Commit) 88df79be authored tarafından Kohei Yoshida's avatar Kohei Yoshida

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
üst b294ca2c
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment