summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-03 22:32:07 +0200
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-09-03 23:00:37 +0200
commit31abf4ce4e18cf2e94c6e598f255ae7cd8f675fa (patch)
treeb46a1558bc1f47192df20d27a9323e22b5a83ffd
parent5b7920eec325620cf0b511980874551449e00ad9 (diff)
fdo#83217: Set 3D flags correctly when moving block of cells.
Change-Id: Ibca5ff36f50f2b6fe182b008ead3efcb1c5a0be6
-rw-r--r--sc/source/core/tool/token.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 7e04064f0f99..396ffcb585f8 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -2812,7 +2812,7 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
ScRange aOldRange = rCxt.maRange;
aOldRange.Move(-rCxt.mnColDelta, -rCxt.mnRowDelta, -rCxt.mnTabDelta);
- bool b3DFlag = rOldPos.Tab() != rNewPos.Tab();
+ bool b3DFlag = rOldPos.Tab() != rNewPos.Tab() || rCxt.mnTabDelta;
FormulaToken** p = pCode;
FormulaToken** pEnd = p + static_cast<size_t>(nLen);
@@ -2888,6 +2888,8 @@ sc::RefUpdateResult ScTokenArray::MoveReference( const ScAddress& rPos, const sc
{
aAbs.Move(rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
rRef.SetAddress(aAbs, rPos);
+ if (rCxt.mnTabDelta)
+ rRef.SetFlag3D(aAbs.Tab()!=rPos.Tab());
}
}
break;
@@ -2900,6 +2902,8 @@ sc::RefUpdateResult ScTokenArray::MoveReference( const ScAddress& rPos, const sc
{
aAbs.Move(rCxt.mnColDelta, rCxt.mnRowDelta, rCxt.mnTabDelta);
rRef.SetRange(aAbs, rPos);
+ if (rCxt.mnTabDelta)
+ rRef.Ref1.SetFlag3D(aAbs.aStart.Tab()!=rPos.Tab());
}
}
break;