summaryrefslogtreecommitdiff
path: root/sc/source/core/data/conditio.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-13 12:35:24 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-13 12:37:14 -0400
commita93bb27aa46c84410c8848a6118d5d63d47be92c (patch)
treef73842e0d78806d9b62980358485b363eb5a3a10 /sc/source/core/data/conditio.cxx
parent49bf3a1f5f38cdf259101b15a19d546b32151463 (diff)
fdo#78402: Adjust references of validity entries as appropriate.
Change-Id: I7fd62153c7267a3d606b86d74bebecf6b8d75250
Diffstat (limited to 'sc/source/core/data/conditio.cxx')
-rw-r--r--sc/source/core/data/conditio.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 43dc94eddb54..49f2fead4788 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -513,13 +513,38 @@ void ScConditionEntry::UpdateReference( sc::RefUpdateContext& rCxt )
if (pFormula1)
{
- sc::RefUpdateResult aRes = pFormula1->AdjustReferenceInName(rCxt, aOldSrcPos);
+ sc::RefUpdateResult aRes;
+ switch (rCxt.meMode)
+ {
+ case URM_INSDEL:
+ aRes = pFormula1->AdjustReferenceOnShift(rCxt, aOldSrcPos);
+ break;
+ case URM_MOVE:
+ aRes = pFormula1->AdjustReferenceOnMove(rCxt, aOldSrcPos, aSrcPos);
+ break;
+ default:
+ ;
+ }
+
if (aRes.mbReferenceModified || bChangedPos)
DELETEZ(pFCell1); // is created again in IsValid
}
+
if (pFormula2)
{
- sc::RefUpdateResult aRes = pFormula2->AdjustReferenceInName(rCxt, aOldSrcPos);
+ sc::RefUpdateResult aRes;
+ switch (rCxt.meMode)
+ {
+ case URM_INSDEL:
+ aRes = pFormula2->AdjustReferenceOnShift(rCxt, aOldSrcPos);
+ break;
+ case URM_MOVE:
+ aRes = pFormula2->AdjustReferenceOnMove(rCxt, aOldSrcPos, aSrcPos);
+ break;
+ default:
+ ;
+ }
+
if (aRes.mbReferenceModified || bChangedPos)
DELETEZ(pFCell2); // is created again in IsValid
}