diff options
author | Eike Rathke <erack@redhat.com> | 2016-03-21 18:50:00 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-22 00:19:09 +0000 |
commit | 5e655ecfe007238080941077c6dc6187005e91fa (patch) | |
tree | 8d9f117514158247536de23bc1b3cdbf21d326be | |
parent | d0cfcb6f1afe4022b322988627d8dccc9e05acc3 (diff) |
Resolves: tdf#93127 copying cells does not modify named expressions
Change-Id: Ic3d0b0a709ecfeade4b3a9c4be9e0c9cfd766103
(cherry picked from commit 7d267d3b168ba3b13763733e8c319a79d990773a)
Reviewed-on: https://gerrit.libreoffice.org/23409
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/core/tool/rangenam.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index a1e25ee115a8..dd2db2bd818d 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -729,6 +729,10 @@ ScRangeData* ScRangeName::findByIndex(sal_uInt16 i) const void ScRangeName::UpdateReference(sc::RefUpdateContext& rCxt, SCTAB nLocalTab ) { + if (rCxt.meMode == URM_COPY) + // Copying cells does not modify named expressions. + return; + for (auto const& itr : m_Data) { itr.second->UpdateReference(rCxt, nLocalTab); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 5c71a56f8e87..29e629bf2744 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -3474,6 +3474,10 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName( sc::RefUpdateResult aRes; + if (rCxt.meMode == URM_COPY) + // Copying cells does not modify named expressions. + return aRes; + TokenPointers aPtrs( pCode, nLen, pRPN, nRPN); for (size_t j=0; j<2; ++j) { |