summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/table3.cxx7
-rw-r--r--sc/source/ui/undo/undosort.cxx3
2 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c36b4cdc1b6b..d6466784f7ac 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -864,8 +864,11 @@ void ScTable::SortReorderByRow(
ScAddress aOldPos = rCell.maCell.mpFormula->aPos;
ScFormulaCell* pNew = rCell.maCell.mpFormula->Clone( aCellPos, SC_CLONECELL_DEFAULT);
- pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
- pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+ if (pArray->IsUpdateRefs())
+ {
+ pNew->CopyAllBroadcasters(*rCell.maCell.mpFormula);
+ pNew->GetCode()->AdjustReferenceOnMovedOrigin(aOldPos, aCellPos);
+ }
sc::CellStoreType::iterator itBlk = rCellStore.push_back(pNew);
}
diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx
index 36156fe4c97d..4a0070787189 100644
--- a/sc/source/ui/undo/undosort.cxx
+++ b/sc/source/ui/undo/undosort.cxx
@@ -46,8 +46,7 @@ void UndoSort::Execute( bool bUndo )
ScUndoUtil::MarkSimpleBlock(pDocShell, maParam.maSortRange);
- pDocShell->PostPaint(maParam.maSortRange, PAINT_GRID);
- pDocShell->PostDataChanged();
+ rDoc.SetDirty(maParam.maSortRange);
if (!aParam.mbUpdateRefs)
rDoc.BroadcastCells(aParam.maSortRange, SC_HINT_DATACHANGED);
}