[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Mon Mar 21 17:53:34 UTC 2016
sc/source/core/tool/rangenam.cxx | 4 ++++
sc/source/core/tool/token.cxx | 4 ++++
2 files changed, 8 insertions(+)
New commits:
commit 7d267d3b168ba3b13763733e8c319a79d990773a
Author: Eike Rathke <erack at redhat.com>
Date: Mon Mar 21 18:50:00 2016 +0100
Resolves: tdf#93127 copying cells does not modify named expressions
Change-Id: Ic3d0b0a709ecfeade4b3a9c4be9e0c9cfd766103
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 15b7f6b..35e4f5c 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 7a47d69..d3d571e 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)
{
More information about the Libreoffice-commits
mailing list