Bug 106432

Summary: CALC SEARCH function with brackets in the search text fails when the file is saved as an XLS file and reopened.
Product: LibreOffice Reporter: Jean-Paul <jnplg>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTABUG    
Severity: normal CC: miguelangelrv, xiscofauli
Priority: medium    
Version: 5.3.0.3 release   
Hardware: All   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: example of XLS file with the error

Description Jean-Paul 2017-03-08 10:03:57 UTC
Description:
The following CALC function gives a "VALUE ERROR" if the CALC file is saved as a XLS file, and then re-opened.

=SEARCH("aa[0-9]";A1&"aa0")

It works correctly if the file is saved as an XLSX or as an ODS file.

Steps to Reproduce:
1.create a new CALC
2.enter some value in cell A1
3.enter in cell B1 the following function : =SEARCH("aa[0-9]";A1&"aa0")
4.save the CALC as an XLS file
5.close the CALC and open de XLS file

Actual Results:  
Cell B1 shows #VALUE!

Expected Results:
Cell B1 shows the position of the first occurrence of the string "aax" where x is a digit 0 to 9.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Jean-Paul 2017-03-08 10:10:33 UTC
Created attachment 131748 [details]
example of XLS file with the error
Comment 2 Xisco FaulĂ­ 2017-03-08 10:18:06 UTC
Hello,
Even before saving I get #VALUE! in B1. Are you sure you're using the correct function? Could you please give more details?
Comment 3 Jean-Paul 2017-03-08 12:30:30 UTC
Hello Xisco, 

It is strange that you get the error immediately.
In my environment, the search function works correctly in a new calc sheet, and is still correct after reopening it from a saved ODS or as an XLSX file.
I only get the error message if I reopen the sheet from an xls file.
Comment 4 m_a_riosv 2017-03-08 22:19:51 UTC
I think the matter is simple, after the option of wildcards was added, at opening xls/xlsx files that option is enabled instead regex.

Menu/Tools/Options/LibreOffice Calc/Calculate