Apache OpenOffice (AOO) Bugzilla – Issue 60307
Search for strings in date formats fails
Last modified: 2022-10-28 12:56: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.
*** Issue 60308 has been marked as a duplicate of this issue. ***
*** Issue 60309 has been marked as a duplicate of this issue. ***
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.
*** Issue 115854 has been marked as a duplicate of this issue. ***
*** Issue 66102 has been marked as a duplicate of this issue. ***
*** Issue 75097 has been marked as a duplicate of this issue. ***
Cherry-picked for AOO41X