summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-03-21 18:50:00 +0100
committerEike Rathke <erack@redhat.com>2016-03-21 18:53:01 +0100
commit7d267d3b168ba3b13763733e8c319a79d990773a (patch)
tree1a66b72be0930c259d7838bd82e6bdf4ec32ab8d /sc/source/core
parent71c21660a79cffbb4415193f28f0f3de274bac11 (diff)
Resolves: tdf#93127 copying cells does not modify named expressions
Change-Id: Ic3d0b0a709ecfeade4b3a9c4be9e0c9cfd766103
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/tool/rangenam.cxx4
-rw-r--r--sc/source/core/tool/token.cxx4
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 15b7f6b17383..35e4f5ce5990 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -727,6 +727,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 7a47d69b1424..d3d571e94415 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3550,6 +3550,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)
{