summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-26 10:46:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-01-27 08:49:37 +0000
commit502b26b8f9a3d6e1252ff142fd00a3096ce95962 (patch)
treecee49f5361be2d5ea741207787023a6330deaf09 /sc/source
parent2f7dee3a2dd6c8696fc2929275fb6ab05b44a30d (diff)
crashtesting: assert seen in forum-mso-en4-192558.xlsx
assert is assert(rRange.aStart.Tab() == rRange.aEnd.Tab()); sheel 1 cell E6 contains =IFERROR(VLOOKUP(D6,a6:'sheet1'!b495,3,FALSE()),"") note: sheel 1 E7 is =IFERROR(VLOOKUP(D7,$Sheet1.A7:Search.B499,3,FALSE()),"") aRef.Ref1.Tab() and aRef.Ref2.Tab() are the same, but IsTabRel differs, so the input address with a tab 1 results in an output range with start and end of different tabs. do the comparison with the result range, by analogy do the same adjustment in ScGroupTokenConverter where the comparison was introduced for commit ca1f051972946b24cb6658143fb0d0ac3587a988 Date: Fri Mar 10 18:32:27 2017 +0100 Resolves: tdf#106459 3D reference can't be handled as vector reference and basically copied and pasted here. FWIW in forum-mso-en4-192558.xlsx the original formulas in xlsx are: IFERROR(VLOOKUP(D6,A6:'Sheet1'!B495,3,FALSE),"") IFERROR(VLOOKUP(D7,A7:B499:'Sheet1'!B496,3,FALSE),"") Change-Id: I69e3ca2f89008b81500789b1bca39b35685de8d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146166 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/core/data/grouptokenconverter.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 023a4214bd93..143b27579a83 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -4508,7 +4508,7 @@ struct ScDependantsCalculator
ScRange aAbs = aRef.toAbs(mrDoc, mrPos);
// Multiple sheet
- if (aRef.Ref1.Tab() != aRef.Ref2.Tab())
+ if (aAbs.aStart.Tab() != aAbs.aEnd.Tab())
return false;
bool bIsRef1RowRel = aRef.Ref1.IsRowRel();
diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index 07fefbccbb55..4d427fc32bab 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -195,7 +195,7 @@ bool ScGroupTokenConverter::convert( const ScTokenArray& rCode, sc::FormulaLogge
ScRange aAbs = aRef.toAbs(mrDoc, mrPos);
// Multiple sheets not handled by vector/matrix.
- if (aRef.Ref1.Tab() != aRef.Ref2.Tab())
+ if (aAbs.aStart.Tab() != aAbs.aEnd.Tab())
return false;
// Check for self reference.