diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-10-26 14:43:14 -0700 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-10-27 12:41:35 +0000 |
commit | 81e4dbe1adf196ee20f1a4bfbc50b54abfc79f4b (patch) | |
tree | 1f3997d9d4e75b2824f487b31e0d8ea4230a1767 | |
parent | 07f36a421461217a78e61d97e86760738acabbe6 (diff) |
fdo#85215: Don't adjust references wrt cell position when disabled.
Change-Id: Ie1a12cc189bcb66fad59ea9901ac0dc95bb68788
(cherry picked from commit 10fc138307afb4b39baddb0d56eb8e986e5d29ea)
Reviewed-on: https://gerrit.libreoffice.org/12106
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/core/data/table3.cxx | 7 | ||||
-rw-r--r-- | sc/source/ui/undo/undosort.cxx | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index ce17bb9af964..05285d89957b 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -856,8 +856,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); } |