[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source
Eike Rathke
erack at redhat.com
Tue Mar 22 00:19:36 UTC 2016
sc/source/core/tool/rangenam.cxx | 4 ++++
sc/source/core/tool/token.cxx | 4 ++++
2 files changed, 8 insertions(+)
New commits:
commit 5e655ecfe007238080941077c6dc6187005e91fa
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
(cherry picked from commit 7d267d3b168ba3b13763733e8c319a79d990773a)
Reviewed-on: https://gerrit.libreoffice.org/23409
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index a1e25ee..dd2db2b 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 5c71a56..29e629b 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)
{
More information about the Libreoffice-commits
mailing list