sc/source/core/data/table6.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8fc316fb65e0d4b78ec881aa79f4184602b96f54
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Mon Apr 3 12:58:27 2023 +0200
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Mon Apr 3 14:36:15 2023 +0200

    tdf#89920 - Handle embedded newline in Calc's search cell
    
    Update short-circuited boolean expression so the least expensive 
subexpressions will be executed first
    
    Change-Id: I8c924e00e8de809f3e6df2828f8537185e71c18c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149891
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 1ea4a5ace99d..a6b03f6b3d8d 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -257,7 +257,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, sc::Colum
         pFCell->SetMatColsRows( nMatCols, nMatRows );
         aCol[nCol].SetFormulaCell(nRow, pFCell);
     }
-    else if (aString.indexOf('\n') != -1 && eCellType != CELLTYPE_FORMULA)
+    else if (eCellType != CELLTYPE_FORMULA && aString.indexOf('\n') != -1)
     {
         ScFieldEditEngine& rEngine = rDocument.GetEditEngine();
         rEngine.SetTextCurrentDefaults(aString);

Reply via email to