Download it now!
Bug 55693 - Auto correct: Two capitalized letters are not corrected if dash or slash are directly before the two letters
Summary: Auto correct: Two capitalized letters are not corrected if dash or slash are ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium trivial
Assignee: Christopher Copits
URL:
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-06 13:25 UTC by Philip Gillißen
Modified: 2013-03-01 12:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Gillißen 2012-10-06 13:25:18 UTC
LibreOffice 3.5.6.2 
Build-ID: 350m1(Build:2)
Fedora 17 (x64)

Steps to reproduce:

1. Activate Auto Correct for two capitalized letters under Extras->Settings
2. Type a word with a dash or a slash in the middle, then begin the next word with two capitalized letters, e.g. Test-TEst, Test/TEst
3. Hit space or enter

Expected Result:
"TEst" is replaced by "Test"

Current Result:
Word will not be corrected

I think it is helpful, if the word is corrected in these situations, too, as it not to assume that the word is a neologism and must be capitalized this way.
Comment 1 Michael Meeks 2012-10-19 09:37:21 UTC
Reproduced in 3.6.1.2
Comment 2 Christopher Copits 2013-01-07 23:08:09 UTC
I will look into fixing this.
Comment 3 Christopher Copits 2013-01-25 23:45:57 UTC
Still working on this.
Comment 4 Christopher Copits 2013-02-15 23:27:07 UTC
I think I have a fix ready, but I'm going to test it a bit more before I submit it.
Comment 5 Christopher Copits 2013-02-23 19:04:28 UTC
Patch submitted for review.

To reproduce the problem:
-------------------------
1. Start a new text document in Writer.
2. Verify that AutoCorrect is enabled in Tools > AutoCorrect Options > Options.
   (Under "Correct TWo INitial CApitals", ensure "T" is selected).
3. Type a compound word separated by an AutoCorrect character (like the hyphen). For example, FAce-FAce will be AutoCorrected as Face-FAce (only the first word in the compound word will be corrected).

What changes I made:
--------------------

1. In svxacorr.cxx SvxAutoCorrect::IsAutoCorrectChar, I added '-' as a character.
2. In svxacorr.cxx SvxAutoCorrect::FnCptlSttWrd, I added code to iterate through each AutoCorrectChar in a compound word to determine if capitalization needs fixing.

To test:
--------

1. Start a new text document in Writer.
2. Verify that AutoCorrect is enabled in Tools > AutoCorrect Options > Options.
   (Under "Correct TWo INitial CApitals", ensure "T" is selected).
2. Ensure that non-compound words (example: FAce) are autocorrected.

   Note: Pressing Enter or Space should perform the AutoCorrect.

3. Ensure that compound words (FAce-FAce-FAce) are autocorrcted.
   Also try compound words with different AutoCorrect characters (example: FAce-FAce/Face).

   Note: As soon as you type an AutoCorrect character (a hyphen, for example), the word will be corrected.
4. Ensure that single letters, two letters, and three capital letters are not AutoCorrected when an AutoCorrect character is entered.
Comment 6 Not Assigned 2013-02-28 23:12:19 UTC
Christopher Copits committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea7d6d070247f6b676054a8256679ac2d2ae577c

fdo#55693 Two initial capitalized letters corrected in compound words



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Not Assigned 2013-03-01 12:25:10 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a526370737099b57b399f2ca8de43e74e24ab794

Related: fdo#55693 add regression tests for autocorrection



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.