Apache OpenOffice (AOO) Bugzilla – Issue 128379
SearchSimilarity does'nt work with a sentence containing spaces
Last modified: 2020-05-31 10:23:37 UTC
In Writer module a macro using Findfirst with .SearchSimilarity = trus does'nt work if the search string is a sentence containing spaces. Example : .SearchString = "Lorem ipsum" not fount. oSearch = oDoc.createSearchDescriptor() with oSearch .SearchString = "Lorem ipsum" .SearchRegularExpression =false .SearchCaseSensitive = false .SearchSimilarity = true .SearchWords = false .SearchSimilarityAdd = 2 .SearchSimilarityRemove =2 end withoSearch = oDoc.createSearchDescriptor() Return Not Found
Save our time, please provide a sample document including this macro.
Created attachment 86950 [details] File contain texte and macro The macro don't work if SearchSimilarity is true. Work if false. Work on words, but not on sentence.
For me, not a bug. Did you read this page: https://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Editing_Text_Documents Sample for similarity search shows that this works for one word and finding its plural and declinations.
It also doesn't work in the interface.
Real bug. Same described here : https://bz.apache.org/ooo/show_bug.cgi?id=59734
Quote: When it was designed, the main purpose for similarity search was to find variants of lengish words, and not parts of sentences (several words). Note a bug. You use the funtionality out of scope. However, we could think on extending the functionality. Which is an enhancement. I close this bug, as Duplicate and we can continue on the old one. *** This issue has been marked as a duplicate of issue 59734 ***
thx for your effort in the research, Jean-Michel COSTE. I hope we do not sound unfriendly. We appreciate dedication.