Hello everybody, If I type space+--+space I get space+en dash+space thanks to the replacement table of Autocorrect, but this is typographically inappropriate, I should rather get unbreakable space+en dash+unbreakable space. That is, spaces too should be replaced. Unfortunately there's no way for me to get the replacement table to do this. I believe the insertion of unbreakable spaces should be turned on by default or, at least, users should be able enable this substitution manually.
Actually, I'm wondering whether the "Replaces dashes" entry in the Options tab should take care of it. That means that, for instance, 12--13 should give unbreakable space+en dash+unbreakable space. At the moment, it gives just an em dash which is completely inappropriate, at least in French.
I changed the title because I think this issue is specific to French, in English normal spaces with en-dash should be OK.
hi, is it still an issue with 4.1.2.3?
Created attachment 91338 [details] character replacement in Writer
LibreOffice Versie: 4.2.0.1 Build ID: 7bf567613a536ded11709b952950c9e8f7181a4a The AutoCorrect table has "insert unbreakable space in French text" switched on by Default ( see attachment "character replacement in Writer". I am unsure if behaviour is wrong or good. Alessandro can you help?
(In reply to comment #3) > hi, is it still an issue with 4.1.2.3? Hello tommy27! Yes, with 4.1.3.2 it still is.
(In reply to comment #5) > LibreOffice > Versie: 4.2.0.1 > Build ID: 7bf567613a536ded11709b952950c9e8f7181a4a > > The AutoCorrect table has "insert unbreakable space in French text" > switched on by Default ( see attachment "character replacement in Writer". > > I am unsure if behaviour is wrong or good. Alessandro can you help? Hello Luc! Yes, this function ought to be enabled, but unfortunately it doesn't apply to dashes, it works with colons, semicolons, exclamation marks, question marks and quotation marks, but not with dashes. Too bad.
On pc Debian x86-64 with master sources updated today, I can reproduce this. Eike: any idea/codepointer?
I found in editeng/source/misc/svxacorr.cxx this: 613 bool SvxAutoCorrect::FnAddNonBrkSpace( 614 SvxAutoCorrDoc& rDoc, const OUString& rTxt, 615 sal_Int32, sal_Int32 nEndPos, 616 LanguageType eLang ) 617 { 618 bool bRet = false; 619 620 CharClass& rCC = GetCharClass( eLang ); 621 622 if ( rCC.getLanguageTag().getLanguage() == "fr" ) 623 { 624 bool bFrCA = (rCC.getLanguageTag().getCountry() == "CA"); 625 OUString allChars = ":;?!%"; I tried to insert a dash in allChars but make debugrun indicated this: warn:rtl.string:16396:1:sal/rtl/strtmpl.cxx:1269: rtl_uString_newFromLiteral - Found char > 127 So I tried this: bool bIsSpecial = (allChars.indexOf( cChar ) != -1) || (cChar == '–'); but had: /home/julien/compile-libreoffice/libreoffice/editeng/source/misc/svxacorr.cxx:632:74: error: multi-character character constant [-Werror=multichar] bool bIsSpecial = (allChars.indexOf( cChar ) != -1) || (cChar == '–');
I succeeded in building this part by using OUString but it still fails. Quite stuck now:-(
(In reply to comment #9) OUString aNbsp("\xc2\xa0", 2, RTL_TEXTENCODING_UTF8);
Thank you Andras for the tip. I used it, then I noticed too SvxAutoCorrect::NeedsHardspaceAutocorr and added this test: cChar == ((sal_Unicode) 0x2013) But even with this, we don't enter in FnAddNonBrkSpace. I'm not sure but perhaps it's because en-dash is already the result of an autocorrection.
I'm stuck here, even when typing unicode with Ctrl+Shift+U then 2013, I don't succeed in replacing the space by unbreaking space before en-dash.
As long as the unbreakable space is a fixed width space, it has to be optional to keep the justification, see bug 41652.
please grab an august 4.4.x daily build and test new wildcard autocorrect patterns as described in https://bugs.freedesktop.org/show_bug.cgi?id=55292#c19 we need to know if the new feature may have side effects with french punctuation and unbreakable spaces.
please French users give an update of this bug current status and tell if things changed using wildcard patterns (see https://goo.gl/8uDZOX ) or the new emoji feature (available just in 5.0.0 see: https://goo.gl/LA5XzK )
On pc Debian x86-64 with master sources updated today, I could still reproduce this.
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.2.5 or 5.3.0 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170306
This request should be dropped and closed. In some cases only, there is a need for unbreakable spaces before and after the en-dash. But in many cases, it’s required to add an unbreakable space after the en-dash and a normal space before (opening dash), and an unbreakable before the en-dash and a normal space after (closing dash). Example: Ils ont – quoi qu’il arrive à présent – perdu la partie. In the “Lexique des règles typographiques de l’Imprimerie nationale”, no unbreakable spaces are required before and after. As it’s not possible to guess what the user want to do, we should do nothing.
good explanation. I set status to WONTFIX