Bug 136891 - sm nodes (holding roots, brackets) not scaling correctly in OLE on sd or sc canvas, but correct with sw; regression at LO 7.0.2 back ported into 6.4.7.1 (comment 16)
Summary: sm nodes (holding roots, brackets) not scaling correctly in OLE on sd or sc ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: bibisected, bisected, regression
: 137431 137766 137889 138287 138332 138660 (view as bug list)
Depends on:
Blocks: Formula-Object
  Show dependency treegraph
 
Reported: 2020-09-19 13:28 UTC by Pierre C
Modified: 2020-12-04 21:39 UTC (History)
18 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (204.67 KB, application/vnd.oasis.opendocument.presentation)
2020-09-19 13:28 UTC, Pierre C
Details
root node missized for OLE in Impress,Draw and Calc--correct in Writer and the Math formula editor (103.60 KB, image/jpeg)
2020-09-19 15:43 UTC, V Stuart Foote
Details
2nd test file (60.23 KB, application/vnd.oasis.opendocument.presentation)
2020-10-31 07:57 UTC, Pierre C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre C 2020-09-19 13:28:43 UTC
Created attachment 165681 [details]
Test file

Open attached file. 

Open Slide 1
Double-clic on second equation and then escape

Upper line of the square root is misplaced

Second slide is a screen copy of the problem in my computer

Bug is seen on twoo of my computers and has been confirmed on French QA list

OS W10 ; LO 7.0.2.1 and LO 7.1 dev ; Skia enabled

Works fine with LO 7.0.1.2
Comment 1 V Stuart Foote 2020-09-19 15:43:50 UTC
Created attachment 165685 [details]
root node missized for OLE in Impress,Draw and Calc--correct in Writer and the Math formula editor

The sm formula used is: 

size 38  color black {Soit : I = sqrt{ 1 over T int from t_0 to {t_0 + T} i^2(t) cdot dt }}

As with OP with
Version: 7.0.1.2 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

No issue.

But with recent master
Version: 7.1.0.0.alpha0+ (x64)
Build ID: a3b4831208da615789bd1e2d5660dd130807f504
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

The sm syntax MathML appears correct in Formula editor, and when OLE to a Writer canvas.  

But, inserting the OLE formula object to Draw, Impress, or a Calc sheet shows the misplaced/missized root node.
Comment 2 V Stuart Foote 2020-09-19 15:53:31 UTC
Weird that the OLE inserting to Writer canvas is fine, as is the Math formula editor--while the root node on the sd canvas for Draw/Impress and for the Calc cells are affected by the mishandled root node.

@Dante, similar results? Any ideas...
Comment 3 Aron Budea 2020-09-20 00:16:50 UTC
I noticed on Linux this only occurs with Skia. Using the "official" method to enable Skia on Linux (SAL_USE_VCLPLUGIN=gen SAL_ENABLESKIA=1 ./soffice), using repo bibisect-linux-64-7.0 I bibisected the change to the following commit, which confirms this is a bug introduced with Skia rendering. Adding CC: to Luboš Luňák.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=076926cef97c685b3d9221510e7560c034ebd2ed
author		Luboš Luňák <l.lunak@collabora.com>	2020-03-10 12:43:45 +0100
committer	Luboš Luňák <l.lunak@collabora.com>	2020-03-18 10:47:49 +0100

implement text rendering using directly Skia (X11)
Comment 4 Aron Budea 2020-09-20 00:20:39 UTC
For the record, I have no idea why it only started between 7.0.1 and 7.0.2 in Windows, perhaps that could be bibisected independently if there's interest.
Comment 5 Luboš Luňák 2020-09-21 11:28:00 UTC
The X11 and Windows problems are independent. And I can reproduce this on Windows even with Skia disabled.

What happens for you if you disable Skia?
Comment 6 V Stuart Foote 2020-09-21 13:18:32 UTC
(In reply to Luboš Luňák from comment #5)
> The X11 and Windows problems are independent. And I can reproduce this on
> Windows even with Skia disabled.
> 
> What happens for you if you disable Skia?

Not Skia specific, happens with or without Skia (Vulkan or raster only) for current Windows builds of master.
Comment 7 Commit Notification 2020-09-21 13:35:44 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94129b3ed8c158bf61fa0e17ee12a21fb9bf07e6

set properly font X-scale for Skia+X11 (tdf#136891)

It will be available in 7.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 8 Luboš Luňák 2020-09-21 15:01:38 UTC
I've fixed the Linux+Skia problem, the rest is not Skia-specific.
Comment 9 Aron Budea 2020-09-21 15:34:26 UTC
Thanks, Luboš! Let's readd bibisectRequest, and I'm assuming the remaining bug is Windows-only.
Comment 10 Pierre C 2020-09-21 21:18:56 UTC
Yes, the problem is still present under W10
Comment 11 V Stuart Foote 2020-09-21 23:43:03 UTC
(In reply to Pierre C from comment #10)
> Yes, the problem is still present under W10

nor is it correct in the Daily build of master that actually contains the X11 patch ;-)

https://gerrit.libreoffice.org/c/core/+/103097

Version: 7.1.0.0.alpha0+ (x64)
Build ID: f08ddf3d3df0ef12fef36e96ffe6f5b9a7fda9e3
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL
Comment 12 Pierre C 2020-09-22 08:44:36 UTC
(In reply to V Stuart Foote from comment #11)
> (In reply to Pierre C from comment #10)
> > Yes, the problem is still present under W10
> 
> nor is it correct in the Daily build of master that actually contains the
> X11 patch ;-)
> 
Yes, I tested with the latest 7.1 dev integrating the patch
Comment 13 Roman Kuznetsov 2020-09-23 20:16:57 UTC
I bisected it and got a SHA-hash
 8891a2fc2a4bf86add68691b7ac167a07a8add84

https://gerrit.libreoffice.org/c/core/+/100970

CC: to Samuel Mehrbrodt
Comment 14 Pierre C 2020-09-26 06:12:01 UTC
This bug is now reproduced with LO 6.4.7.1
Version : 6.4.7.1 (x64)
Build ID : 32fe9ceb49bbaa24397ab3ebad5eb8f5287d8086
Threads CPU : 8; OS : Windows 10.0 Build 19041; UI Render : GL; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded
Comment 15 Ming Hua 2020-10-16 07:44:57 UTC
*** Bug 137431 has been marked as a duplicate of this bug. ***
Comment 16 V Stuart Foote 2020-10-16 13:32:58 UTC
Regards the bisected commit comment 13 done for bug 127471, removing font width scalling for Windows builds.

Looking at commenting in textlayoutdevice.cxx [1] seems like portion of the _WIN32 vcl font handling is still active but now breaks when scaled as with these sm nodes.  

Luboš adjusted for Skia-X11 on master already. Something else is needed for Windows (that gets carried into Skia). Or just revert Ilhan's patch--now present in master, 7.0.2 and 6.4.7?

=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/drawinglayer/source/primitive2d/textlayoutdevice.cxx?r=752dd8f5#386
Comment 17 Andy 2020-10-23 07:26:53 UTC
Any news on this thorny issue? While I am now back to 6.4.6, I am hoping to be able to use 7.0.3....
Comment 18 Andy 2020-10-26 08:45:27 UTC
Hello, I have now tried 7.0.3.1
Unfortunately, bad rendering of math is  still there in impress files. This is still unusable for lectures or presentations containing formula objects with scalable parenthesis, or square root symbols etc.
Comment 19 Ming Hua 2020-10-26 12:44:43 UTC
*** Bug 137766 has been marked as a duplicate of this bug. ***
Comment 20 V Stuart Foote 2020-10-26 14:16:57 UTC
Sorry to poke, but...  

@Samuel, Tomaž?

@Armin, could you spare a few cycles to look at the breakage done by commit [1] for sm objects rendered as OLE to sd & sc module, and why sw is not affected?

=-ref-=
[1] https://gerrit.libreoffice.org/c/core/+/100970
Comment 21 V Stuart Foote 2020-10-29 13:35:51 UTC
Samuel has a patch up to revert 
https://gerrit.libreoffice.org/c/core/+/104847
Comment 22 Andy 2020-10-29 18:21:41 UTC
Hi, maybe you know if the prob should be addressed in the 7.1 alpha out today? Thanks
Comment 23 V Stuart Foote 2020-10-29 18:44:00 UTC
(In reply to Andy from comment #22)
> Hi, maybe you know if the prob should be addressed in the 7.1 alpha out
> today? Thanks

No, they had an issue with the revert (bug 127471) and had to back it out. Still broken here, but your next opportunity to test would really be with the nightly masters [1]. Just install them in parralel [2] and reset the program/bootstrap.ini stanza to point to ORIGIN.

UserInstallation=$ORIGIN/../Data/settings

=-ref-=

[1] https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/

[2] https://wiki.documentfoundation.org/Installing_in_parallel/Windows
Comment 24 V Stuart Foote 2020-10-30 22:47:29 UTC
*** Bug 137889 has been marked as a duplicate of this bug. ***
Comment 25 Pierre C 2020-10-31 07:57:41 UTC
Created attachment 166887 [details]
2nd test file

Not resolved with latest LO 7.1 dev on October the 31th

Adding a second test file. Problem with scaled arrows (widevec)
Comment 26 Aron Budea 2020-11-12 20:53:32 UTC
Bug 127471's fix is now reverted in master as well, and can be tested in tomorrow's daily build.
https://git.libreoffice.org/core/commit/5db34391ebf7a51d26196f3fe28f3d9327ea2eb6
Comment 27 Pierre C 2020-11-17 10:44:01 UTC
Tested and OK with LO
Version: 7.1.0.0.alpha1+ (x64)
Build ID: 312a33b7636334f6ce3b6d1702bc5d3e45215601
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded
Comment 28 Pierre C 2020-11-17 10:45:57 UTC
Will it be back-ported to upcoming LO 7.0.4 ?
Comment 29 Ming Hua 2020-11-18 11:14:04 UTC
*** Bug 138287 has been marked as a duplicate of this bug. ***
Comment 30 Aron Budea 2020-11-18 15:15:08 UTC
(In reply to Pierre C from comment #28)
> Will it be back-ported to upcoming LO 7.0.4 ?
It was already reverted in the 7.0 branch, see bug 127471 comment 17.
Only the revert in 7.1 caused the build to fail, and had to be (re-)reverted and redone.
Comment 31 Ming Hua 2020-11-18 15:58:24 UTC
(In reply to Aron Budea from comment #30)
> (In reply to Pierre C from comment #28)
> > Will it be back-ported to upcoming LO 7.0.4 ?
> It was already reverted in the 7.0 branch, see bug 127471 comment 17.
> Only the revert in 7.1 caused the build to fail, and had to be (re-)reverted
> and redone.
Thanks for the explanation.  I've updated the Whiteboard field to reflect this.
Comment 32 Ming Hua 2020-11-19 13:19:06 UTC
*** Bug 138332 has been marked as a duplicate of this bug. ***
Comment 33 Ming Hua 2020-11-22 22:11:58 UTC
*** Bug 138415 has been marked as a duplicate of this bug. ***
Comment 34 Andy 2020-12-03 18:11:36 UTC
Whew... I'm happy to confirm that just released 7.0.4 version does NOT have the bug anymore.... I have already re-upgraded from 6.4.6 to the latter
Comment 35 V Stuart Foote 2020-12-04 21:39:37 UTC
*** Bug 138660 has been marked as a duplicate of this bug. ***