[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source
Eike Rathke
erack at redhat.com
Thu Feb 9 17:55:32 UTC 2017
sc/qa/unit/ucalc_formula.cxx | 3 ++-
sc/source/core/tool/token.cxx | 7 ++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 1e02bf3ceb747c8491b6489bef56dd4a896269b1
Author: Eike Rathke <erack at redhat.com>
Date: Thu Feb 9 18:54:50 2017 +0100
and more unit tests for tdf#103890
Change-Id: I342b11cb1442ff5ad4a51d8b8f2f7ed9f081bcaa
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index ceba828..cec64f1 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3349,7 +3349,8 @@ void Test::testTokenArrayRefUpdateMove()
std::vector<OUString> aTests = {
"B1*C1",
"SUM(B1:C1)",
- "$Sheet1.B1"
+ "$Sheet1.B1",
+ "SUM(Sheet1.B1:Sheet2.B1)"
};
// Since C3 is not referenced in any of the above formulas, moving C3 from
commit aeb465a458fc7ba02e3b1ca6b4193488defef511
Author: Eike Rathke <erack at redhat.com>
Date: Thu Feb 9 18:54:15 2017 +0100
yet more 3D flag to preserve cases, tdf#103890 follow-up
Change-Id: I8b8cdb01325d0cd54e436c1043c243eedfddbfb0
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 02f8a04..dcbde70 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3167,7 +3167,12 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
}
rRef.SetRange(aAbs, rNewPos);
- rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() || !rRef.Ref1.IsTabRel());
+ // Absolute sheet reference => set 3D flag.
+ // More than one sheet referenced => has to have both 3D flags.
+ // If end part has 3D flag => start part must have it too.
+ rRef.Ref2.SetFlag3D(aAbs.aStart.Tab() != aAbs.aEnd.Tab() || !rRef.Ref2.IsTabRel());
+ rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() || !rRef.Ref1.IsTabRel() ||
+ rRef.Ref2.IsFlag3D());
}
break;
case svExternalSingleRef:
More information about the Libreoffice-commits
mailing list