Bug 39894 - MathType OLE formulas show (and print) very incorrect
Summary: MathType OLE formulas show (and print) very incorrect
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2011-08-07 01:10 UTC by Alexander
Modified: 2017-02-04 11:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file with problem (819.50 KB, application/msword)
2011-08-07 01:10 UTC, Alexander
Details
screen (192.08 KB, image/png)
2011-08-07 01:14 UTC, Alexander
Details
spring of three cyrillic symbols (198.13 KB, image/png)
2011-12-23 13:24 UTC, Alexander
Details
for compare (221.65 KB, application/pdf)
2012-02-19 05:07 UTC, Alexander
Details
new screen (116.65 KB, image/png)
2014-10-24 05:21 UTC, Alexander
Details
Word on WINE screen (173.73 KB, image/png)
2014-10-24 06:45 UTC, Alexander
Details
.odt file with simple Mathtype equation (11.41 KB, application/vnd.oasis.opendocument.text)
2015-08-13 01:42 UTC, Massimo
Details
Mathtype equation rendering with L5 (corrupted) (112.57 KB, image/jpeg)
2015-08-13 01:43 UTC, Massimo
Details
Mathtype rendering with LO4 (correct) (112.68 KB, image/jpeg)
2015-08-13 01:43 UTC, Massimo
Details
Screenshot with formula correct. (98.35 KB, image/png)
2015-08-18 20:30 UTC, m_a_riosv
Details
Screenshot with LibreOffice in Japanese (130.91 KB, image/png)
2015-08-18 22:57 UTC, m_a_riosv
Details
In LO 5.0.3.1 (266.03 KB, image/png)
2016-01-15 10:52 UTC, Alexander
Details
WMF for Object77 extracted from original DOC (1.49 KB, image/x-wmf)
2016-08-23 01:57 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2011-08-07 01:10:16 UTC
Created attachment 50004 [details]
file with problem

Some formulas have bad scale factor. In formula what contain non-latin symbols its moved to left of formula (on top of exists symbols) from right, See attach.
Comment 1 Alexander 2011-08-07 01:14:05 UTC
Created attachment 50005 [details]
screen
Comment 2 Björn Michaelsen 2011-12-23 12:26:12 UTC Comment hidden (obsolete)
Comment 3 Alexander 2011-12-23 13:24:14 UTC
Created attachment 54757 [details]
spring of three cyrillic symbols

Hi,

More-more troubles is leave. But one problem in this view area with spring of three cyrillic symbols is stay (see attach).

And showing debug info before formulas (EMBED Equation.DSMT4) ?
Comment 4 v_2e 2012-01-20 21:40:29 UTC
  Hello!
  I just wanted to report that the words "EMBED Equation" still appear before the equations in .doc files for LibreOffice 3.5.0 RC1.

   Regards,
    Vladimir
Comment 5 Alexander 2012-02-19 05:07:58 UTC
Created attachment 57279 [details]
for compare

"Printed" .pdf from M$O for compare.
Comment 6 QA Administrators 2014-10-24 03:18:18 UTC Comment hidden (obsolete)
Comment 7 Alexander 2014-10-24 05:21:51 UTC
Created attachment 108333 [details]
new screen
Comment 8 Alexander 2014-10-24 05:23:14 UTC
Error still up. Three symbols shift to left as point red arrow. See new attach with LibreOffice 4.3.3.1.
Comment 9 Alexander 2014-10-24 06:02:52 UTC
My OS is currently updated GNU/Linux Debian Sid.
Comment 10 Alexander 2014-10-24 06:45:36 UTC
Created attachment 108335 [details]
Word on WINE screen

For show good (needed) position of symbols, I attach screen from Winword running on WINE. Symbols marked red underline.
Comment 11 Massimo 2015-08-13 01:42:29 UTC Comment hidden (no-value)
Comment 12 Massimo 2015-08-13 01:43:02 UTC Comment hidden (no-value)
Comment 13 Massimo 2015-08-13 01:43:27 UTC Comment hidden (no-value)
Comment 14 m_a_riosv 2015-08-18 20:30:06 UTC Comment hidden (no-value)
Comment 15 Massimo 2015-08-18 22:18:15 UTC Comment hidden (no-value)
Comment 16 m_a_riosv 2015-08-18 22:57:59 UTC Comment hidden (no-value)
Comment 17 Massimo 2015-08-18 23:06:02 UTC Comment hidden (no-value)
Comment 18 m_a_riosv 2015-08-18 23:30:54 UTC Comment hidden (no-value)
Comment 19 Massimo 2015-08-19 00:02:40 UTC Comment hidden (no-value)
Comment 20 Massimo 2015-08-28 01:42:01 UTC Comment hidden (no-value)
Comment 21 Massimo 2015-09-12 10:34:33 UTC Comment hidden (no-value)
Comment 22 Massimo 2015-09-17 06:56:12 UTC Comment hidden (no-value)
Comment 23 m_a_riosv 2015-09-17 21:00:38 UTC Comment hidden (no-value)
Comment 24 Massimo 2015-10-03 13:33:56 UTC Comment hidden (no-value)
Comment 25 Massimo 2015-10-31 16:56:06 UTC Comment hidden (no-value)
Comment 26 Massimo 2015-11-13 09:58:05 UTC Comment hidden (no-value)
Comment 27 Jean-Baptiste Faure 2016-01-09 22:15:56 UTC
Please do not change version number, it is intended to show the oldest version in which the bug has been seen.

Massimo your bug is different from the one from original bug report. Indeed in your description:
- works in LO 4 when Alexander reported his bug for LO 3.4.2
- Alexander reported for a MSWord doc in Russian, you for an .odt in Japanese.
- you have filed bug 95902 for your case.

Version number set back to 3.4.2
Status set back to unconfirmed, because its history shows that this old bug has never been confirmed independently.

Best regards. JBF
Comment 28 Jean-Baptiste Faure 2016-01-13 05:39:17 UTC
Reproducible for me with LibreOffice 5.0.5.0.0+, at least the first glitch in your first screencopy (attachment 50005 [details]). I see some other problem (big ( and ) not reproduced) but they are probably caused by a missing font on my computer.
What is the required font to see these characters?

Setting status to NEW.

Best regards. JBF
Comment 29 Massimo 2016-01-13 08:37:23 UTC Comment hidden (no-value)
Comment 30 Alexander 2016-01-15 10:52:05 UTC Comment hidden (no-value)
Comment 31 Alexander 2016-01-15 10:57:06 UTC Comment hidden (no-value)
Comment 32 Mike Kaganski 2016-08-23 01:55:59 UTC
To sort things out:

1. The issue was filed about a number of issues in LO's rendering of WMFs embedded into a .DOC, namely: shifted "ИПЦ" in Object77, small size of Object78 and especially Object82 and Object83 - they became invisible. With time, some of the issues (Object78, Object82 and Object83) were fixed somewhere. So, this issue was initially about several unrelated problems. The last problem left is shifted "ИПЦ" in Object77, so this is the problem that this specific issue should cover from now on. This particular problem is reproducible already with OOo 3.3.0 -> setting the version accordingly.

2. As this problem is about import of WMFs, and is also reproducible with extracted WMF opened with Draw, I set the Component to Filters.

3. As noted in comment 28, the issue is reproducible with recent LO versions.

4. All notes from Massimo here, as well as second part of comment 28 (regarding parentheses), comment 30 and comment 31 are irrelevant to this issue. They are related to bug 99402, that is being worked on (because it has been successfully triaged using bibisect - a side note for Massimo).
Comment 33 Mike Kaganski 2016-08-23 01:57:16 UTC
Created attachment 126980 [details]
WMF for Object77 extracted from original DOC
Comment 34 Mike Kaganski 2016-12-26 19:10:24 UTC
Commit is submitted for review: https://gerrit.libreoffice.org/32436
Comment 35 Commit Notification 2016-12-27 00:22:55 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3fe6703ac30177a939839a70e650eb344c8a9abc

tdf#39894: Metafile: use distance from last char cell to next

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Massimo 2017-01-01 22:28:57 UTC
(In reply to Commit Notification from comment #35)

I would love to test the fix, but the last update for Windows builds after this announcement was done on Dec. 31st, directory named Win-x86@62-merge-TDF/, which is however empty. Am I looking in the wrong place? I never tried a daily build before, apologies if the question sounds silly.
Comment 37 Mike Kaganski 2017-01-02 07:30:39 UTC
Seems that http://dev-builds.libreoffice.org/daily/master/Win-x86@42/ has now builds from 2017-01-01.
Comment 38 Massimo 2017-01-02 08:16:10 UTC
(In reply to Mike Kaganski from comment #37)
> Seems that http://dev-builds.libreoffice.org/daily/master/Win-x86@42/ has
> now builds from 2017-01-01.

Found, downloaded and installed. I happily confirm that the fix works. At least, the attachment I have posted in this thread now looks perfectly fine in 5.4.0 alpha.
Comment 39 Mike Kaganski 2017-01-02 08:45:03 UTC
(In reply to Massimo from comment #38)
> I happily confirm that the fix works. At
> least, the attachment I have posted in this thread now looks perfectly fine
> in 5.4.0 alpha.

Great! Let's wait when OP confirms, and close this.
Comment 40 Massimo 2017-02-02 20:04:58 UTC
Fixed in 5.3.0!
Comment 41 Jean-Baptiste Faure 2017-02-03 05:52:19 UTC
(In reply to Massimo from comment #40)
> Fixed in 5.3.0!

Did you test with the first attachment ?

Best regards. JBF
Comment 42 Massimo 2017-02-03 08:27:23 UTC
(In reply to Jean-Baptiste Faure from comment #41)
> (In reply to Massimo from comment #40)
> > Fixed in 5.3.0!
> 
> Did you test with the first attachment ?
> 
> Best regards. JBF

Yes, right now, because you asked. I checked my own files, those which looked corrupted until 5.2, and they work just fine. Now I have checked the attachment in Russian, and it seems fine - although I cannot read Russian, unfortunately.
Comment 43 Jean-Baptiste Faure 2017-02-03 08:59:12 UTC
(In reply to Massimo from comment #42)
> (In reply to Jean-Baptiste Faure from comment #41)
> > (In reply to Massimo from comment #40)
> > > Fixed in 5.3.0!
> > 
> > Did you test with the first attachment ?
> > 
> > Best regards. JBF
> 
> Yes, right now, because you asked. I checked my own files, those which
> looked corrupted until 5.2, and they work just fine. Now I have checked the
> attachment in Russian, and it seems fine - although I cannot read Russian,
> unfortunately.

You only have to compare with the screen copy in the second attachment. This is a screen copy of the page 7 of the document as you can see in the status bar in the screen copy.

Best regards. JBF
Comment 44 Massimo 2017-02-03 10:56:41 UTC
(In reply to Jean-Baptiste Faure from comment #43)
> (In reply to Massimo from comment #42)
> > (In reply to Jean-Baptiste Faure from comment #41)
> > > (In reply to Massimo from comment #40)
> > > > Fixed in 5.3.0!
> > > 
> > > Did you test with the first attachment ?
> > > 
> > > Best regards. JBF
> > 
> > Yes, right now, because you asked. I checked my own files, those which
> > looked corrupted until 5.2, and they work just fine. Now I have checked the
> > attachment in Russian, and it seems fine - although I cannot read Russian,
> > unfortunately.
> 
> You only have to compare with the screen copy in the second attachment. This
> is a screen copy of the page 7 of the document as you can see in the status
> bar in the screen copy.
> 
> Best regards. JBF

I see! No, that problem is not fixed. I get the same result as in the screenshot.
Comment 45 Jean-Baptiste Faure 2017-02-04 09:13:41 UTC
(In reply to Massimo from comment #44)
> [...]
> I see! No, that problem is not fixed. I get the same result as in the
> screenshot.

Ok, same thing for me. So restoring NEW status of this bug.

Best regards. JBF
Comment 46 Mike Kaganski 2017-02-04 09:59:38 UTC
(In reply to Jean-Baptiste Faure from comment #45)
> (In reply to Massimo from comment #44)
> > [...]
> > I see! No, that problem is not fixed. I get the same result as in the
> > screenshot.
> 
> Ok, same thing for me. So restoring NEW status of this bug.
> 
> Best regards. JBF

???
Jean, I can't believe you didn't notice the target notice in whiteboard and in commit notification.
Comment 47 Jean-Baptiste Faure 2017-02-04 11:20:33 UTC
(In reply to Mike Kaganski from comment #46)
[...]
> Jean, I can't believe you didn't notice the target notice in whiteboard and
> in commit notification.

OOps, sorry, I was sure I tested it with the master. I just did and verified that the bug as described in its description is indeed fixed.

Version: 5.4.0.0.alpha0+
Build ID: 092adc4991eb143bc279a4bb61da27f70c73413e
Threads CPU : 4; Version de l'OS :Linux 4.4; UI Render : par défaut; VCL : gtk3; 
Ubuntu_16.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Calc: group

Thank you very much, and sorry for the inconvenience.

Best regards. JBF