Issue 116929 - wrong auto-corrected formula (with mismatched delimiters): ends with odd ')'
Summary: wrong auto-corrected formula (with mismatched delimiters): ends with odd ')'
Status: CONFIRMED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOO330m20
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-11 19:09 UTC by jsteidel
Modified: 2013-07-21 10:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jsteidel 2011-02-11 19:09:34 UTC
(I upgraded from OOO320m18 (I think) to the current OOO330m20 (Build: 9567) to 
check if the issue was gone--it is in the current version too.)

I wanted to compare lists (modules in two httpd.conf files) using spreadsheet
text functions to find differences in the lists. 

Entering this compound boolean function trying to find and match strings, but 
having mismatched string delimiters, results in OO Calc auto-correcting it with 
an unmatched parenthesis at the end.  

I typed/copied into a cell (e.g. F75, but it works on row 3 too.):  

=IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";'keep"  )

...Delimiters for 'keep" are mismatched


Calc immediately adjusts this--without indicating an error--to:

=IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";'keep"  ))
....1...2..3....4.......4..3...3.......32...............1X

Delete the extra right parenthesis, hit enter, and it is still there.

Saving the file (.xls format), closing OO, and reopening the spreadsheet shows
the formula further corrected (properly, I presume) to

=IF(AND(IF(FIND("#";A75)=1;TRUE());IF(D75=B75;TRUE()));"add";"keep")
...1...2..3....4.......4.......443...3............4432.............1


The data in the cells A75:E75 are
A75: #LoadModule userdir_module modules/mod_userdir.so
B75: =MID(A75;FIND(" ";A75;1);10)
C75: LoadModule userdir_module modules/mod_userdir.so
D75: =MID(C75;FIND(" ";C75;1);10)
E75: =IF(D75=B75;".";"x")
F75:  the bug-evoking formula above
Comment 1 Edwin Sharp 2013-07-21 10:13:20 UTC
'keep" is wrong and caused this unpredicted behavior.
"keep" leaves the formula unchanged.

Rev. 1503704 Win 7
Comment 2 Edwin Sharp 2013-07-21 10:29:05 UTC
The unnecessarily lengthy description distracted me, sorry.
Comment 3 Edwin Sharp 2013-07-21 10:32:54 UTC
IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";'keep"  )
corrects to
IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";'keep"  ))
instead to
IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";"keep"  )

however
IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";"keep"  ))
corrects to
IF (AND(IF(FIND("#";A75)=1);IF(D75=B75));"add";"keep"  )

Rev. 1503704 Win 7
Comment 4 Edwin Sharp 2013-07-21 10:33:45 UTC
bug is confirmed.