Kaydet (Commit) 3e2ffb05 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#72470: Correctly calculate the first edit cell row position.

Else it could go into an infinite loop.

Change-Id: I269cd118dcb3ab83ea8a2243576a360d3d4bc142
üst 99a262dc
......@@ -618,7 +618,7 @@ FindElement2(
break;
default:
{
ElseRetType aRet = rFuncElse(it->type, nTopRow, nDataSize);
ElseRetType aRet = rFuncElse(*it, nOffset);
if (aRet.second)
return PositionType(it, aRet.first);
}
......
......@@ -2956,16 +2956,16 @@ public:
return const_cast<ScFormulaCell*>(p)->IsMultilineResult();
}
std::pair<size_t,bool> operator() (mdds::mtv::element_t type, size_t nTopRow, size_t nDataSize)
std::pair<size_t,bool> operator() (const sc::CellStoreType::value_type& node, size_t nOffset)
{
typedef std::pair<size_t,bool> RetType;
if (type == sc::element_type_empty)
if (node.type == sc::element_type_empty)
return RetType(0, false);
for (size_t i = 0; i < nDataSize; ++i)
for (size_t i = nOffset; i < node.size; ++i)
{
SCROW nRow = nTopRow + i;
SCROW nRow = node.position + i;
sal_uInt8 nScriptType = mrColumn.GetRangeScriptType(miAttrPos, nRow, nRow, miCellPos);
if (IsAmbiguousScriptNonZero(nScriptType))
// Return the offset from the first row.
......
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