Created attachment 56202 [details] remove appending of the hard-coded font sizes (made against git checkout) This is about formulas in writer file which is being exported (saved as) microsoft word .doc file. The current conversion routines in starmath/ subdir append hard-coded font sizes ("size 12" to normal content, "size 8" to super- and subscripts etc.), regardless of what is set in LibreOffice formula editor's settings. That is, of course, completely wrong approach. This way formulas are, in fact, corrupted. There are many tickets for this issue filed in OOO bugzilla, by the way. One way of correcting this is proposed in a patch attached, pending the implementation of "completely correct" way of exporting font sizes in formulas to .doc (in ole streams attributes). This patch just removes the code which adds "size %d {" and corresponding "}". "Works for me", as now I'm able to export many-formulas document to word's .doc and not have to *edit* each and every of those, if something other than "size 12" is required (I still have to double-click each and every of those to correct the previews, but that's another problem, albeit related).
@ Michael Please, take look at this bug. Appears that it contains ready patch for fixing this bug.
@ Ivan Please, take look at this bug. Appears that it contains ready patch for fixing this bug.
sounds plausible, but i know ~nothing about WW8; Caolan, Cedric, Lubos: please take a look at the patch here
seeing as this is a patch to the import, I guess the problem is a round trip from .doc back to .doc again ? Can you attach a demo document which shows the problem that this fixes. Its been a very long time since I played with the MathType format.
Heh, since I am in the CC list... :) The patch looks a bit weird to me: it removes the support of the SIZE record of the MTEF. However, MTEF is the format I am not familiar with, I have just downloaded the specification and looking into it right now. :)
I'll attach a prepared and re-tested example tomorrow. And, like I said before, this patch is not a real solution, but a kludge, really. As I don't understand the starmath module too well myself, I've just removed ("hacked off") a provision for inserting the "size" tag, which is abused by export to Word Eq. editor AND import from Word Eq. editor routines. Personally, I can live without "size" tag (I'd rather have a global font size(s) changing control/dialog), but the effective corruption of formulas by insertion of "size 12", "size 8" is quite a PITA.
Created attachment 57967 [details] 10pt equivalent of ooo's "{a123} wideslash {b456}" made in word
Created attachment 57968 [details] 14pt equivalent of "{a123} wideslash {b456}" made in word
Created attachment 57969 [details] 10pt imported with 3.5.1rc1
Created attachment 57970 [details] 14pt imported with 3.5.1rc1
Created attachment 57971 [details] 10pt imported with patched 3.5.0
Created attachment 57972 [details] 14pt imported with patched 3.5.0
Okay, here come the examples. Two files contain an equivalent of "{a123} wideslash {b456}" prepared in Word 2003 eqaution editor. One was composed with font size set to 10pt, another — to 14 pt. Please note that the overall formula's font size in examples isn't actually included into mathtype equation elements, but is put into a position preceding the equation proper. This is deduced from the binary comparison results. Now, the import screens show where things go wrong in the mainstream LibO/OOO: 1) The formula's font size (10pt or 14pt in this case) is lost. The actual formula font size setting is in all cases 11pt (as set as default in local installation; dialog not shown), and so differs with what was actually set in Word file. This is, however, bearable. 2) What's worse, formulas get sprayed with «size 12» and «size 8» (these are arbitrary sizes taken from the array in the starmath/source/mathtype.cxx, in function MathType::Init()), which is completely unacceptable. Just imagine clearing those out in 100 formulas or so. P.S. As a side question, I notice that, e.g., CmathOOO extension is capable of composing the formula «on the run» and inserting it with font size and face taken from paragraph style. How difficult would it be to implement: 1) *optional* setting of font size and face in imported formulas to whatever was set in imported file (say, Times New Roman and 10pt); 2) batch changing of the font faces and sizes of all formulas in LibO/OOO document; optionally, do it like it's done in KDE fonts dialog (adjust face only, or size only, etc.)?
Restricted my LibreOffice hacking area
Summing up, this issue is caused by the DOC to ODT importing routines doing two things wrong: 1bad) Formulas' font sizes' settings in DOC are ignored and substituted by hard-coded sizes coming, I believe, from the array MathType::aSizeTable[7] (starmath/source/mathtype.hxx). This produces the (unasked for) 'size 12' and 'size 8' on bodytext and indexes formulas' elements. ** I'm attaching the patch for LOdev 4.3.7.1 which blocks (hacks off, really) that (spurious) size setting on import. Ugly, but "worksforme", saves my time. 2bad) Formulas' rendered images' frames are put too high w/r to the baseline of the paragraph formula is in. This necessitates re-rendering (double-clicking+closing) all formulas in the ODT (grand PITA!!) Not *immediately* relevant to this issue is there are errors in the importing code, which converts the syntax of the MathType included in MS Word to the syntax of eqn included in LO.
Created attachment 114955 [details] LOdev 4.3.7.1 patch blocking those 'size 12' and 'size 8' elements
Hi Yury, so if I understand correctly this isn't a final solution but a temporary workaround? Is there a possibility to resolve this issue, or is it too difficult to find an answer?
(In reply to Roeland from comment #17) > Hi Yury, so if I understand correctly this isn't a final solution but a > temporary workaround? Is there a possibility to resolve this issue, or is it > too difficult to find an answer? This solution is just a workaround, which I use in my local build, deployed on my machines. Frankly, this is quite a fair solution, see also https://bugs.documentfoundation.org/show_bug.cgi?id=90406, but it doesn't seem it can make it into the mainstream.
Yury: is this the same as bug 40187 ?
(In reply to Buovjaga from comment #19) > Yury: is this the same as bug 40187 ? Yes, the very same. The source of .DOC, be it Word or LO, affects nothing.
*** Bug 40187 has been marked as a duplicate of this bug. ***
** 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.7 or 5.3.3 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-20170522
Yury, are you still woking on this? Is there no way to push the workaround as a temporary solution? or is this not possible?
To be precise, I'm still _using_ this, locally building from source with that patch.
Dear Yury, 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://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
Dear Yury, 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
I looked at the results of export to DOCX, and it does not include any sizes.