Bug 141784 - Writer documents with Formulas getting flagged as grammar/spelling error
Summary: Writer documents with Formulas getting flagged as grammar/spelling error
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: OLE-Objects
  Show dependency treegraph
 
Reported: 2021-04-20 18:30 UTC by Rafael Lima
Modified: 2023-09-06 14:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Image showing the problem (151.09 KB, application/vnd.oasis.opendocument.graphics)
2021-04-20 18:30 UTC, Rafael Lima
Details
Example using pt-BR locale (10.74 KB, application/vnd.oasis.opendocument.text)
2021-05-07 18:10 UTC, Rafael Lima
Details
Example using en-US locale (10.84 KB, application/vnd.oasis.opendocument.text)
2021-05-07 18:11 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Lima 2021-04-20 18:30:43 UTC
Created attachment 171320 [details]
Image showing the problem

In Writer documents with text and formulas (Math objects) in the same paragraph I'm getting grammar errors (as shown in the attached image).

So every time I add some text, a blank space, a Math object, another blank space and then some more text, I get the blue wavy underline indicating a grammar/spelling mistake. I think LO identifies this as two sequential blank spaces, so it flags it as an error.

To disable this behavior, I have to disable the option "Checking spelling as you type". Disabling grammar checking does not have an effect here.

The problem here seems to be that the Math object is not being considered as part of the text and the spell checker can't see it, thus marking it as a "two blank spaces" error.
Comment 1 Dieter 2021-05-05 08:08:16 UTC
Rafael, thank you for reporting the bug. Could you please attach the writer document itself, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it)
Comment 2 Rafael Lima 2021-05-07 18:10:58 UTC
Created attachment 171757 [details]
Example using pt-BR locale
Comment 3 Rafael Lima 2021-05-07 18:11:24 UTC
Created attachment 171758 [details]
Example using en-US locale
Comment 4 Rafael Lima 2021-05-07 18:21:36 UTC
The screenshot I initially uploaded was taken on a document written in Brazilian Portuguese (pt-BR). After a deeper analysis, I noticed I only have this problem in documents written in pt-BR. For documents written in en-US I do not get this problem. See the two new attachments:
-  Example using pt-BR locale
-  Example using en-US locale

For documents in pt-BR I use LO alongside Vero (https://pt-br.libreoffice.org/projetos/vero/), which is the extension that provides spelling and grammar checking for pt-BR.

So maybe the Vero extension is at fault here.
Comment 5 Buovjaga 2022-04-19 06:23:06 UTC
I installed Vero 3.2.15 and I confirm the issue with the example pt-BR file.
Rafael: will you discuss this with Vero developers?

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 216493f32236f0086f4c5b527deb18b020b0ed1c
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 19 April 2022
Comment 6 Rafael Lima 2022-05-26 00:13:32 UTC
(In reply to Buovjaga from comment #5)
> I installed Vero 3.2.15 and I confirm the issue with the example pt-BR file.
> Rafael: will you discuss this with Vero developers?

I'm guessing this is caused by Bug 65323, since Equation objects are not being treated as characters even though they're anchored as characters.

Hence, when we add an equation in a paragraph, a grammar error is triggered because the grammar checker thinks there are two consecutive blank spaces.

A fix for bug 65323 will also fix this bug. At least partially, because other grammar errors could be triggered depending on which character the equation ends up being represented by.
Comment 7 Dieter 2023-09-03 19:23:15 UTC
(In reply to Buovjaga from comment #5)
> I installed Vero 3.2.15 and I confirm the issue with the example pt-BR file.
=> taking into account comment 6, let's Chance Status to NEW