Description: When opening a .docx file which most probably has been created with MS Word and contains mathematical expressions with trailing equality signs, there is an inverted question mark after each such equality sign which isn't there when opening the same file with MS Word. Example: 2+3 = ___ Writer shows: 2+3 =¿ ___ I understand that this is supposed to highlight equations which are incomplete and miss the r.h.s. but in some contexts the missing part is intended. I already found the solution to write 2+3 =""___ which suppresses the question mark, but this way I always need to edit each expression in a .docx file I open which is quite cumbersome. It would be great if these question marks could be made optional. Steps to Reproduce: 1. Open a .docx document with formulas containing expressions with trailing equality signs or write such an expression, for example "2+3=" into the formula editor of an empty document. 2. Observe that there is an inverted question mark after each trailing equality sign. 3. Profit! Actual Results: An inverted question mark is shown after every trailing equality sign. Expected Results: The question mark shown after a trailing equality sign should be optional. Reproducible: Always User Profile Reset: Yes Additional Info: Version: 7.2.2.2 / LibreOffice Community Build ID: 20(Build:2) CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3 Locale: de-DE (de_DE.utf8); UI: de-DE 7.2.2-2 Calc: threaded
The "=" sign is a binary operator, meaning that it requires values in both sides. Instead of changing the behavior in Math, making the "=" unary, we could change the DOCX import so that when nothing is found after the equal sign, then {} is added after the equals sign. In your example, instead of using "" you could use {}.
I am setting this to NEW since this behavior is acceptable in MS Office and is imported as an error in LibreOffice.
This would solve it for me!
Dear Michael Kogan, 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 https://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://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
The bug is still present at least in 24.2.0, most probably in later versions as well.
Hi guys, did anyone have time to have a look into this already? I'm a math teacher and I am unable to edit material from my colleagues with LO Writer, because this would require removing the question marks from lots of formulas. This small issue really makes LO Writer unusable for me.. Thanks for having a look into it! P.S.: Maybe there is a possibility to add the {} to all mathematical expressions in a document in one go, somehow? Something like Search&Replace for math expressions?
I added the following Macro and ran it: _________________________________________ Sub Writer_Find_and_Replace_Formula( strFind As String, strReplace As String ) REM This finds all occurrences of <strFind> within all Formula objects embedded within the current Writer document, REM and replaces the found occurrences by <strReplace>. REM NB. This action can not be Undone via the menu "Edit : Undo". Dim oDoc As Object oDoc = ThisComponent Dim oEmbeddedObjects As Object, oObj As Object oEmbeddedObjects = oDoc.getEmbeddedObjects() Dim i As Integer For i = 0 To oEmbeddedObjects.getCount() - 1 oObj = oEmbeddedObjects.getByIndex( i ).getEmbeddedObject() If oObj.ImplementationName = "com.sun.star.comp.Math.FormulaDocument" Then REM Found a Formula. oObj.Formula = Join( Split( oObj.Formula, strFind ), strReplace ) REM Perform Find & Replace. End If Next i End Sub _______________________________________ Reference: https://ask.libreoffice.org/t/find-and-replace-for-formulas-in-libreoffice-writer/27113/5
Sorry, I pasted the wrong piece of code, here is the specific one for this case: _________________________________________ REM ***** BASIC ***** Sub Writer_Find_and_Replace_Formula() REM This finds all occurrences of "=" within all Formula objects embedded within the current Writer document, REM and adds curly braces "{}" to prevent the display of question marks. REM NB. This action can not be Undone via the menu "Edit : Undo". Dim oDoc As Object oDoc = ThisComponent Dim oEmbeddedObjects As Object, oObj As Object oEmbeddedObjects = oDoc.getEmbeddedObjects() Dim i As Integer For i = 0 To oEmbeddedObjects.getCount() - 1 oObj = oEmbeddedObjects.getByIndex( i ).getEmbeddedObject() If oObj.ImplementationName = "com.sun.star.comp.Math.FormulaDocument" Then REM Found a Formula. oObj.Formula = Join( Split( oObj.Formula, "=" ), "={}" ) REM Perform Find & Replace. End If Next i End Sub _________________________________________