Apache OpenOffice (AOO) Bugzilla – Issue 49897
Spelling Replace All also replaces punctuation dot
Last modified: 2013-08-07 14:44:35 UTC
Writer 1.9.104 on Windows XP sp2. When replacing a faulty spelled word at the end of the sentence, the punctuation is highlighted along and removed when replacing with a suggestion. To reproduce the error: Open a blank document with language setting to English (USA) (other languages have similar issues). Enter following lines of text Look I am hewe. Look I am hewe again. Look am hewe. Look l am hewe... Look Hewe l am. Hewe I am, Look. Run spell check using F7. hewe is highlighted (along with the dot!). Click "here" under suggestions, then "change all". The dot is gone on the first line. On the fourth line, one of the the dots has disappeared. The exclamation on line 3 stays inact. Strangly, the capitalised instances of Hewe are not recognized as a spelling mistake. This is a severe issue as it corrupts the user data and introduces new errors that can't be corrected but by detailled proofreading again after the spell check. There remain several issues with the current spellchecking. Considering "one problem, one issue" I will post these in different "issues.
Reassigned to SBA.
confirmed on the OOo1.9.106 build (works fine with Staroffice Src680_m106). assigned to os.
confirmed in src680_m119 reassigned to khendricks
Daniel: can you please test this? Moving target to OOoLater. Please change the target accordingly.
I can confirm with m150, but I don't have time and knowledge to debug this, sorry. Trying it in hunspell (command line) only the word is highlighted, not the dot.
For the problem with "Look l am hewe..." being displayed messed up in the dialog I have submitted issue 60810. Hewe being accepted in "Look Hewe l am." is because in OOo spellchecking is still word based. There is no way to know that here Hewe was inside of a sentence and thus should have written in lowercase. In general: if a word is wrong only because it is written in uppercase (i.e. the spellchecker returns the specific type SpellFailure::CAPTION_ERROR and the and the start with a uppercase letter) we allow for it because it just might be that this is a word at the start of a sentence. Handling it this way seemed much better than having almost every word at the beginning of a sentence marked as wrong. The other issue related to the described problem is that because of abbreviations like "e.g." that should be recognized by the spellchecker as being correct the "." character does not function as a word brekak in general (in the end this is language dependend and depends on the respective implementation of the breakiterator). Because of this at the end of a sentence the following "." character is included as part as word that is being passed on to the spellchecker. Since usually the dictionary entries have not that additional character the process to check words should include the following as part of the process: - check if the word is correct as it was written (thus having "e.g." being accepted for example). - if the word is not accepted but it ends with "." strip all (possibly multiple) "." characters from the word before checking it again. But remember what you exactly have cut off at the end. If the word is accepted now we consider everything being Ok. If not we now need to retrieve the suggestions for the misspelled word and append the previously stripped "." characters at the end. I'm not to sure if the appending at the end is really necessary since I think in the code for the UI there was some part that tried to deal with this problem (at least if it is only one ".") But even if there is such code it should be alright with the spellchecker adding the previously cut off "." characters. If not I would consider it being a bug in that part of the code and you should just drop me a note and I will see how it should/can be fixed.
Another side note: I think there also was an issue that the replacement/suggestion for a word should keep the capitalization of the original word. But I don't remember if it was for the thesaurus or the spellchecker.
*** Issue 64147 has been marked as a duplicate of this issue. ***
This, along with issue 49895, are quite visible and significant issues on spellchecking. Spellchecking that introduces other unexpected errors (punctuation disappearing, case changing) is simply unreliable. Such issues should not persist after being reported for more than seven years.
.
This issue still occurs in current builds. Use the mentioned sample text in the first comment. There you will see, that "Change all" in the spelling dialog will remove the periods following "herw".