Description: The RTF specification says that language 1024 (0x400) denotes text without a language set. LibreOffice Writer treats \lang1024 in RTF as "Switch to system-default language" (English here) and does not switch off language proofing. Then, if one creates some text in Writer, sets its language to None and saves as RTF, Writer emits \lang255 for this text. \lang255 is not a valid (per RTF Specification) value. However, when an RTF text with \lang255 is open in Writer, it is treated as \lang1024 should be - that is, it sets text language to None. Steps to Reproduce: 1. Open the attached RTF document (generated from MS Word). Actual Results: The word "proofeng" is visually marked as misspelled and when you put the caret on it is shows English (USA) as its language Expected Results: The word "proofeng" should not be marked as misspelled and its Language should be set to None Reproducible: Always User Profile Reset: No Additional Info: Version: 6.0.4.2 Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf CPU threads: 4; OS: Mac OS X 10.9.5; UI render: default; Locale: en-US (en.UTF-8); Calc: group A recent master build is still there: Version: 6.2.0.0.alpha0+ Build ID: b292a27698e85fd9d60c03613c3b0c67835c4dc1 CPU threads: 4; OS: Mac OS X 10.9.5; UI render: default; TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-06-06_23:25:55 Locale: en-US (en.UTF-8); Calc: group threaded
The bug is also seen when opening DOC and DOCX document. I am not sure if I should file another bug for the RTF export issue (and probably DOC/DOCX as well). I hope there is a single place where both import and export can be fixed.
Created attachment 142829 [details] An RTF document to reproduce the bug
Confirmed. Arch Linux 64-bit Version: 6.2.0.0.alpha0+ Build ID: 5b42a17dc99fba2ccf8dd8d0a8e0e4e836e30120 CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: kde4; Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded Built on June 22nd 2018 Arch Linux 64-bit LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
Dear Phil Krylov, 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 with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. 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) from 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: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Using Word 2016, loading a document with \lang1024, the language is English(UK), and spell-checking-on-the-fly is checking for British spelling. So LO is acting in the same manner as Word in this case. [The problem is that LO doesn't handle \noproof.] From include/i18nlangtag/lang.h /*! use only for import/export of MS documents, number formatter maps it to *! LANGUAGE_SYSTEM and then to effective system language */ #define LANGUAGE_PROCESS_OR_USER_DEFAULT LanguageType(0x0400) //aka 1024 And of course as Phil indicated, this is what is returned by Language None: #define LANGUAGE_NONE LanguageType(0x00FF) //aka 255 DOCX: LO exports "[None]" to DOCX uses w:lang w:val="zxx" Microsoft doesn't really allow you to select either system default, or None as a language. It does have a flag to disable spell checking on a character run (w:noProof). However, LO does not import that. case NS_ooxml::LN_EG_RPrBase_noProof: // no grammar and spell checking, unsupported Since MS doesn't seem to have a direct corollary to LO's Language:None, it makes sense to "invent" a language (zxx) or a number (255) so that LO can round-trip its own settings.
Proposed import fix at https://gerrit.libreoffice.org/c/core/+/113614
Exporting noProof will be challenging. -how can we know if it should be set? If all three CharLanguages are set to NONE that would be safe. (Although that won't be apparent to a user.) -a GrabBag could help round-trip a noProof. But how can the grabbag be cleared?
(In reply to Justin L from comment #6) > Proposed import fix at https://gerrit.libreoffice.org/c/core/+/113614 Word supports the following scenario: 1) you set the language to German 2) you disable spellcheck for a piece of text 3) later you enable it again 4) Word knows it should do German spellcheck. We loose data with this change and just change one problem for an other problem. What could be done instead is to add a new text portion property of type bool and then map Word's noproof to that one and the opposite on export. (And of course implement that bool into SW to disable spell checking of that work, with all the UI visibility that goes along with that.)