summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-10-26 14:43:14 -0700
committerAndras Timar <andras.timar@collabora.com>2014-11-23 14:30:31 +0100
commit0809a80287ad8bed7c48c40ae5a03b64b8bfc1c7 (patch)
treed3fc64b2a1df9d7ee16758f28ce60b61df941ef1 /sc/source/core
parent3cb4a29f12bc02118a7950de419ffcf45fa72c1f (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>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/table3.cxx7
1 files changed, 5 insertions, 2 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);
}