Kaydet (Commit) 10fc1383 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#85215: Don't adjust references wrt cell position when disabled.

Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788
üst 8c6d3cd4
...@@ -854,8 +854,11 @@ void ScTable::SortReorderByRow( ...@@ -854,8 +854,11 @@ void ScTable::SortReorderByRow(
ScAddress aOldPos = rCell.maCell.mpFormula->aPos; ScAddress aOldPos = rCell.maCell.mpFormula->aPos;
ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT); ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT);
pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula); if (pArray->IsUpdateRefs())
pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos); {
pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
}
rCellStore.push_back(pNew); rCellStore.push_back(pNew);
} }
......
...@@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo ) ...@@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo )
ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange); ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange);
pDocShell->PostPaint(maParam.maSortRange, PAINT_GRID); rDoc.SetDirty(maParam.maSortRange);
pDocShell->PostDataChanged();
if (!aParam.mbUpdateRefs) if (!aParam.mbUpdateRefs)
rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED); rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
} }
......
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