[Libreoffice-commits] core.git: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 18 09:12:32 UTC 2018
sc/source/core/tool/interpr4.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 6db5e1bdd67531fab14b375d6c624237d38de297
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Tue Jul 17 16:49:39 2018 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Jul 18 11:12:09 2018 +0200
Related: tdf#117016 DoubleRefToVars: always put in order
... as all callers expect, whatever dynamic range creating process
may have created it.
Change-Id: I47b2e174d5bf4d5c23f10685526b48eee07dd6a4
Reviewed-on: https://gerrit.libreoffice.org/57567
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 138ee8c14f1b..4d836828eeba 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -949,6 +949,12 @@ void ScInterpreter::DoubleRefToVars( const formula::FormulaToken* p,
const ScComplexRefData& rCRef = *p->GetDoubleRef();
SingleRefToVars( rCRef.Ref1, rCol1, rRow1, rTab1);
SingleRefToVars( rCRef.Ref2, rCol2, rRow2, rTab2);
+ if (rCol2 < rCol1)
+ std::swap( rCol2, rCol1);
+ if (rRow2 < rRow1)
+ std::swap( rRow2, rRow1);
+ if (rTab2 < rTab1)
+ std::swap( rTab2, rTab1);
if (!pDok->m_TableOpList.empty())
{
ScRange aRange( rCol1, rRow1, rTab1, rCol2, rRow2, rTab2 );
More information about the Libreoffice-commits
mailing list