Bug 94911 - Autocorrect: em dash doesn't form after closing parenthesis
Summary: Autocorrect: em dash doesn't form after closing parenthesis
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) rc
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: AutoCorrect-Complete
  Show dependency treegraph
Reported: 2015-10-09 14:02 UTC by Bruno Beltran
Modified: 2021-01-18 22:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Beltran 2015-10-09 14:02:33 UTC
Normally, the insertion of two regular dashes "--", (HTML --) when the previous character is part of a regular word will result in the two regular dashes automatically being converted to an "em" dash--the long dash used in English to set off long tangential components of the sentence, such as this one--after another word and a space is inserted. If, however, the previous character is a closing parenthesis, the em-dash is not formed. 

In other words, typing
will cause the two dashes to become an em dash, but typing
some stuff (I guess)--asdf<space>
will not trigger the conversion.

This is a bug and Microsoft Word has correctly converted the dash in the latter situation for some time now.

Thank you for your attention, please let me know if more detail is required.
Comment 1 Buovjaga 2015-10-09 16:30:13 UTC
Not reproduced. Linux-only, perhaps. Will have to test later.

Win 7 Pro 64-bit, Version: (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)
Comment 2 Bruno Beltran 2015-10-09 17:30:07 UTC
Just found an additional condition. There has to already be an em dash present in the document, or something along those lines. 

To reproduce, type:
asdf--as df)--asdf<space>

The first one should become an em dash but not the second.

Sorry for the misleading first report.
Comment 3 Buovjaga 2015-10-09 19:06:04 UTC
Thanks, could repro.

Win 7 Pro 64-bit, Version: (x64)
Build ID: 37b43f919e4de5eeaca9b9755ed688758a8251fe
Locale: fi-FI (fi_FI)
Comment 4 tommy27 2016-10-11 20:13:16 UTC
issue reproducible under Win8.1 x64 too, using LibO
Build ID: e2f6c7f0d0cc14f851d7028ff846c5dc658a81c6
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-10_23:08:02
Locale: it-IT (it_IT); Calc: group

you need to have "Autocorrect\Autocorrect Options...\Options\Replasce dashes" setting on to see the bug.

a workaround is to use wildcard autocorrection and set this entry:


em dash

that should overcome the issue with closing parenthesis.

another workaround is to disable "Replace dashes" at all and use an even simpler autocorrect rule such as:


em dash

some people however would prefer to use:
.*--.* for en dash
.*---.* for em dash
Comment 5 QA Administrators 2017-10-23 14:09:22 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-01-18 04:08:32 UTC Comment hidden (obsolete)
Comment 7 Bruno Beltran 2021-01-18 22:01:59 UTC
Just commenting in response to the auto-QA bot, this bug is still present in the latest libreoffice for arch

Build ID: 00(Build:2)
CPU threads: 16; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded