Bug 68373 - Handle starting and terminating wildcard character sequence .* in Autocorrection list
Summary: Handle starting and terminating wildcard character sequence .* in Autocorrect...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:4.2.0
Keywords:
: 55293 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-21 10:57 UTC by László Németh
Modified: 2014-06-04 08:03 UTC (History)
5 users (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 László Németh 2013-08-21 10:57:52 UTC
Agglutinative languages, like Hungarian use thousands of different suffixes for nouns. Personal abbreviations would be more usable, automatic corrections of serious misspellings could cover all occurances with a simple pattern matching allowing the wildcard character '*' at the end of the replaced word in the Replace page of Autocorrection Window. For example, "word*" matches all text starting with "word", and replaced with the "With" replacement string + the remaining matched text segment.

Test example:

1. Add 

i18n*

in the Replace field of the Tools->Autocorrect Options...->Replace page, and
add

internationalization

to the field "With", and press OK.

With the suggested enhancement (and patch), Writer will replace the following texts (pressing Enter space, or other word boundary characters at the end):

i18n -> internationalization
i18ns -> internationalizations
i18nxxxx -> internationalizationxxxx

Note: check also the language pop-up menu of the Autocorrect page, replacements will work only in documents with the same language.
Comment 1 Commit Notification 2013-08-21 11:26:59 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68373 pattern matching in autocorrection for suffix rich lang.



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 2 Commit Notification 2013-08-21 11:36:52 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68373 fix comments



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 3 Commit Notification 2013-08-21 12:40:20 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=cd0890b680192ab2a5812453d811857fedbb28aa

fdo#68373 update Autocorrection help



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 4 Commit Notification 2013-08-21 16:11:36 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68373 wildcard char. matches only real suffix in autocorr.



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 5 Commit Notification 2013-08-23 09:55:25 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68373 allow "*word" pattern matching



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 6 Commit Notification 2013-08-23 11:04:54 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/help/commit/?id=52d5cf30c7838e320c39a0f65d4633797846fe4c

fdo#68373 update Autocorrection help



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 Olivier R. 2013-08-23 11:12:16 UTC
László, it’s a good idea!
Comment 8 László Németh 2013-08-23 11:32:48 UTC
Olivier, thanks. I will write some other useful examples on planet.libreoffice.org, eg. to handle the following replacements:

word... -> word… (the result looks uglier with this monospaced font, but it works well with normal fonts)
10%o -> 10‰
etc.
Comment 9 Commit Notification 2013-08-24 11:45:54 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

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

fdo#68373 fix three dot -> horizontal ellipsis 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.
Comment 10 tommy27 2014-04-17 21:24:09 UTC
*** Bug 55293 has been marked as a duplicate of this bug. ***
Comment 11 Patrick Gillespie 2014-04-17 21:55:14 UTC
Still a bug, though *much* improved (!) :)

If I set auto-correct to correct This--- to This― ,I get This-– instead, a dash followed by a *dash and an en-dash* rather than an em-dash. Seems to be the last remnant of a bug that seems to have been solved in the two other configurations: em-dash alone or *before* a word.
Comment 12 Patrick Gillespie 2014-04-19 19:08:30 UTC
Now it's getting buggier:

If I set auto-correct to change three dashes to an em-dash, I get this:

–!!br0ken!!-

If I type in two dashes (for an en-dash), I get this:

–!!br0ken!!

In other words, this feature appears to be completely br0ken. 


Libre still doesn't seem able to consistently differentiate between an en-dash and an em-dash.
Comment 13 tommy27 2014-04-22 16:29:14 UTC
@Patrick

this is to alert you that wildcard autocorrection has been changed in the 4.2.x branch. see Bug 77603 - new wildcard in autocorrection: .* instead of *

so my suggestion is to try one of 4.2.4.x or 4.3.0.x dayly builds and see if your issue is still reproducible there.

moreover I will also consider to create a clean new bug report about the "tree dashes to an em-dash" issue and close this:care you indeed sure that your issue it's about the wildcard key?
Comment 14 Patrick Gillespie 2014-06-04 02:10:37 UTC
Good news. Since upgrading to the latest version, the wildcard and autocorrection features seem  to be functioning correctly. 

Wow. I've been looking forward to this feature ever since switching to Libre. The next huge step would be to get vertically centered text compatibility with doc files -- if not the same functionality in Libre.
Comment 15 László Németh 2014-06-04 08:03:25 UTC
(In reply to comment #14)
Patrick: Thanks for your feedback! You are right, vertical alignment would be a nice improvement, not only for the improved compatibility.