sc/source/core/tool/interpr1.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d9635e9bb42cf2b744b8d2f74633e2a209a8e3fd
Author:     Balazs Varga <balazs.varga.ext...@allotropia.de>
AuthorDate: Thu Feb 22 12:01:48 2024 +0100
Commit:     Balazs Varga <balazs.varga.ext...@allotropia.de>
CommitDate: Thu Feb 22 21:58:39 2024 +0100

    Related: tdf#127293 Fix typo for function XLOOKUP
    
    Wrong isStringSearch value for VectorSearchArguments
    at svExternalSingleRef argument.
    Also more clean-up.
    
    Change-Id: Idc5a953638b90704586754d07f5096d7b5615e17
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163736
    Tested-by: Jenkins
    Reviewed-by: Sahil Gautam <me.sahilgau...@gmail.com>
    Reviewed-by: Balazs Varga <balazs.varga.ext...@allotropia.de>

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index c33e74ba9c3e..5b04dca96b4e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8011,7 +8011,7 @@ void ScInterpreter::ScXLookup()
                 }
                 else
                 {
-                    vsa.isStringSearch = false;
+                    vsa.isStringSearch = true;
                     vsa.sSearchStr = pToken->GetString();
                 }
             }
@@ -10894,10 +10894,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
     rParam.nTab  = vsa.nTab1;
 
     ScQueryEntry& rEntry = rParam.GetEntry(0);
-    rEntry = rParam.GetEntry(0);
     rEntry.nField = vsa.eSearchMode != searchrev ? vsa.nCol1 : vsa.nCol2;
     rEntry.bDoQuery = true;
-    ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
     switch ( vsa.eMatchMode )
     {
         case exactorNA :
@@ -10943,6 +10941,8 @@ bool ScInterpreter::SearchVectorForValue( 
VectorSearchArguments& vsa )
             PushIllegalParameter();
             return false;
     }
+
+    ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
     if ( vsa.isStringSearch )
     {
         rItem.meType   = ScQueryEntry::ByString;

Reply via email to