Issue 60307

Summary: Search for strings in date formats fails
Product: Calc Reporter: peter.junge
Component: codeAssignee: AOO issues mailing list <issues>
Status: CLOSED FIXED QA Contact:
Severity: Trivial    
Priority: P3 CC: damjan, gustaaf.cuyvers, issues, mh.hh, mseidel, p9w.vu.31122010
Version: OOo 2.0   
Target Milestone: 4.1.12   
Hardware: All   
OS: All   
Issue Type: FEATURE Latest Confirmation in: 4.2.0-dev
Developer Difficulty: ---

Description peter.junge 2006-01-10 11:14:59 UTC
Replacement for StarOffice internal issue #112709# because FT left OOo.

(reported by KR)
new calc
type a date e.g. 10/17/2003
format the cell to e.g. 'Friday, October 17, 2003'
open Find & Replace dialog
search for Friday or October
-> no success whatever options you choose
expand more...
-> still no success whatever options you choose
Excel would find the string if 'Search in (x)Values' is checked

ATTENTION:
Possible traps for implementatation. In comparison to excel we do not
distinguish between a SEARCH and a REPLACE dialog. With our dialog a user could
search for OCTOBER and replace it with FOOTEMBER. What should happen then?
Should the date value be converted to a string (Friday, Footember 17, 2003)?
Should an error message appear? Or do we offer a smart listbox that offers
possible replacements?
This has to be specified.
Comment 1 Joost Andrae 2006-01-11 09:58:48 UTC
*** Issue 60308 has been marked as a duplicate of this issue. ***
Comment 2 Joost Andrae 2006-01-11 09:59:06 UTC
*** Issue 60309 has been marked as a duplicate of this issue. ***
Comment 3 damjan 2015-11-03 18:47:11 UTC
I committed a patch for this in revision 1712367:

#i60307# search for strings in date formats fails.
When "Search in" is set to "Values", search the formatted values
instead of just the raw input. This fixes a 9 year old
bug that's been duplicated at least 6 times, and matches what Excel
does. Tests show even "Replace" works, and works well: if
"October" is replaced by "November", it converts the original
month from 10 to 11; it only converts the cell type to text if the
resulting text is no longer a valid date. Also added BVT tests
for the expected behaviour.

Resolving fixed.
Comment 4 damjan 2015-11-03 18:49:47 UTC
*** Issue 115854 has been marked as a duplicate of this issue. ***
Comment 5 damjan 2015-11-03 18:50:59 UTC
*** Issue 66102 has been marked as a duplicate of this issue. ***
Comment 6 damjan 2015-11-03 18:53:10 UTC
*** Issue 75097 has been marked as a duplicate of this issue. ***
Comment 7 Matthias Seidel 2022-02-18 22:58:29 UTC
Cherry-picked for AOO41X