diff options
-rw-r--r-- | sc/qa/unit/data/functions/spreadsheet/fods/vlookup2.fods | 22 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 9 |
2 files changed, 11 insertions, 20 deletions
diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/vlookup2.fods b/sc/qa/unit/data/functions/spreadsheet/fods/vlookup2.fods index d47779d928a1..fd228881a7cb 100644 --- a/sc/qa/unit/data/functions/spreadsheet/fods/vlookup2.fods +++ b/sc/qa/unit/data/functions/spreadsheet/fods/vlookup2.fods @@ -1017,14 +1017,14 @@ <text:p>TRUE</text:p> </table:table-cell> <table:table-cell office:value-type="string" calcext:value-type="string"> - <text:p>VLOOKUP tests that ensure there is no partial matching of cell contents</text:p> + <text:p>VLOOKUP tests that ensure there is partial matching of cell contents</text:p> </table:table-cell> </table:table-row> <table:table-row table:style-name="ro2"> <table:table-cell/> <table:table-cell table:style-name="ce8"/> <table:table-cell office:value-type="string" calcext:value-type="string"> - <text:p>even though the document option of “search on whole cell” is turned off.</text:p> + <text:p>when the document option of “search on whole cell” is turned off.</text:p> </table:table-cell> </table:table-row> <table:table-row table:style-name="ro2" table:number-rows-repeated="29"> @@ -1095,10 +1095,10 @@ <table:table-cell table:style-name="ce22" table:formula="of:=VLOOKUP("ABC";[.$L$2:.$M$5];2;0)" office:value-type="string" office:string-value="" calcext:value-type="error"> <text:p>#N/A</text:p> </table:table-cell> - <table:table-cell table:formula="of:=#N/A" office:value-type="string" office:string-value="" calcext:value-type="error"> - <text:p>#N/A</text:p> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> </table:table-cell> - <table:table-cell table:style-name="ce25" table:formula="of:=ISERROR([.A2])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <table:table-cell table:style-name="ce25" table:formula="of:=[.A2]=[.B2]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> <text:p>TRUE</text:p> </table:table-cell> <table:table-cell table:style-name="ce13" table:formula="of:=FORMULA([.A2])" office:value-type="string" office:string-value="=VLOOKUP("ABC",$L$2:$M$5,2,0)" calcext:value-type="string"> @@ -1122,10 +1122,10 @@ <table:table-cell table:formula="of:=VLOOKUP("BCD";[.$L$2:.$M$5];2;0)" office:value-type="string" office:string-value="" calcext:value-type="error"> <text:p>#N/A</text:p> </table:table-cell> - <table:table-cell table:formula="of:=#N/A" office:value-type="string" office:string-value="" calcext:value-type="error"> - <text:p>#N/A</text:p> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> </table:table-cell> - <table:table-cell table:style-name="ce25" table:formula="of:=ISERROR([.A3])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <table:table-cell table:style-name="ce25" table:formula="of:=[.A3]=[.B3]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> <text:p>TRUE</text:p> </table:table-cell> <table:table-cell table:style-name="ce13" table:formula="of:=FORMULA([.A3])" office:value-type="string" office:string-value="=VLOOKUP("BCD",$L$2:$M$5,2,0)" calcext:value-type="string"> @@ -1149,10 +1149,10 @@ <table:table-cell table:formula="of:=VLOOKUP("BC";[.$L$2:.$M$5];2;0)" office:value-type="string" office:string-value="" calcext:value-type="error"> <text:p>#N/A</text:p> </table:table-cell> - <table:table-cell table:formula="of:=#N/A" office:value-type="string" office:string-value="" calcext:value-type="error"> - <text:p>#N/A</text:p> + <table:table-cell office:value-type="float" office:value="2" calcext:value-type="float"> + <text:p>2</text:p> </table:table-cell> - <table:table-cell table:style-name="ce25" table:formula="of:=ISERROR([.A4])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> + <table:table-cell table:style-name="ce25" table:formula="of:=[.A4]=[.B4]" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean"> <text:p>TRUE</text:p> </table:table-cell> <table:table-cell table:style-name="ce13" table:formula="of:=FORMULA([.A4])" office:value-type="string" office:string-value="=VLOOKUP("BC",$L$2:$M$5,2,0)" calcext:value-type="string"> diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 17d28013a680..8a92e17c3977 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2593,11 +2593,6 @@ public: if (nIndex < 0) nStrPos = -1; - else if (rEntry.eOp == SC_EQUAL || - rEntry.eOp == SC_NOT_EQUAL) - { - nStrPos = pCellStr == pQuer ? 0 : -1; - } else { // OUString::indexOf nStrPos = rtl_ustr_indexOfStr_WithLength( @@ -2629,14 +2624,10 @@ public: switch (rEntry.eOp) { case SC_EQUAL: - bOk = ( nStrPos == 0 ); - break; case SC_CONTAINS: bOk = ( nStrPos != -1 ); break; case SC_NOT_EQUAL: - bOk = ( nStrPos != 0 ); - break; case SC_DOES_NOT_CONTAIN: bOk = ( nStrPos == -1 ); break; |