sc/source/core/tool/token.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
New commits: commit 211e4a9e03ef5f1c7c26617859435285d2699339 Author: Eike Rathke <er...@redhat.com> AuthorDate: Fri Aug 17 12:22:09 2018 +0200 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Aug 22 09:33:28 2018 +0200 Resolves: tdf#118983 do not expand range if sheet references not affected Change-Id: Ib207d3723ce1d370a953e652957aaed399affc9c Reviewed-on: https://gerrit.libreoffice.org/59255 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> (cherry picked from commit da0dc858fc05e7f1d6a60ca61f722044e688d4f8) Reviewed-on: https://gerrit.libreoffice.org/59272 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 089ed5b5f48d..56e21d19625e 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -3900,6 +3900,11 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName( { ScComplexRefData& rRef = *p->GetDoubleRef(); ScRange aAbs = rRef.toAbs(rPos); + + if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab()) + // Sheet references not affected. + break; + if (rCxt.maRange.In(aAbs)) { // This range is entirely within the shifted region. @@ -3922,10 +3927,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName( // column range of the reference is not entirely in the deleted column range. break; - if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab()) - // wrong tables - break; - ScRange aDeleted = rCxt.maRange; aDeleted.aStart.IncRow(rCxt.mnRowDelta); aDeleted.aEnd.SetRow(aDeleted.aStart.Row()-rCxt.mnRowDelta-1); @@ -3982,10 +3983,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName( // row range of the reference is not entirely in the deleted row range. break; - if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab()) - // wrong tables - break; - ScRange aDeleted = rCxt.maRange; aDeleted.aStart.IncCol(rCxt.mnColDelta); aDeleted.aEnd.SetCol(aDeleted.aStart.Col()-rCxt.mnColDelta-1); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits