Created attachment 189971 [details] Comparsion MSO vs LibreOffice 24.2 master Steps to reproduce: 1. Open attachment 41418 [details] from bug 32636 -> formulas are barely visible. See comparison Reproduced in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 0c4913e03e8427a576138601958f2dbf13b8c37b CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded [Bug found by office-interoperability-tools]
Regression introduced by: author Khaled Hosny <khaled@libreoffice.org> 2023-08-31 14:54:52 +0300 committer خالد حسني <khaled@libreoffice.org> 2023-08-31 20:41:00 +0200 commit 626d17a8ec270937575e9684a325eb0669327a25 (patch) tree 1a0a440d5bbe3a170bb8186bbbe8be98e010f467 parent 5b205d2b3946acd79dcb8f5abed88a0bd8afaef4 (diff) tdf#143213: Fix reading math font settings from file Bisected with: bibisect-linux64-24.2 Adding Cc: to Khaled Hosny
attachment 71096 [details] from bug 57886 is also affected by this issue
I see many files affected by this issue. Increasing importance
I’m unlikely to be able to work on this for a while, so feel free to revert the problematic change if no one else is working on it.
(In reply to خالد حسني from comment #4) > I’m unlikely to be able to work on this for a while, so feel free to revert > the problematic change if no one else is working on it. I just realized this is already fixed by author Khaled Hosny <khaled@libreoffice.org> 2023-09-20 09:26:33 +0300 committer خالد حسني <khaled@libreoffice.org> 2023-09-20 10:12:00 +0200 commit 8bf38cc394f96a1f1592a7bbd62e1f7db03f3db6 (patch) tree a0cf2de1884445a61bdf3933144070dbe46dbea4 parent b20ca8d951e8205c8b963c6b7407f984053b4094 (diff) starmath: Don’t set empty font name when reading font format from file Closing as RESOLVED FIXED I'll submit a unittest for this
Actually it's not completely fixed. After the commit mentioned in comment 5 the formulas are visible but if you double click on them, they increase in size, so the original size is still not correct
At least it doesn't look as bad as before. Decreasing importance
Created attachment 190040 [details] LibreOffice 7.6 vs LibreOffice 24.2 master
if 626d17a8ec270937575e9684a325eb0669327a25 and 8bf38cc394f96a1f1592a7bbd62e1f7db03f3db6 are reverted, the issue is not fixed so another commit in between is also affecting this issue
(In reply to Xisco Faulí from comment #9) > if 626d17a8ec270937575e9684a325eb0669327a25 and > 8bf38cc394f96a1f1592a7bbd62e1f7db03f3db6 are reverted, the issue is not > fixed so another commit in between is also affecting this issue In master, the problem is fixed if the following patch is reverted: author Khaled Hosny <khaled@libreoffice.org> 2023-09-19 10:56:35 +0300 committer خالد حسني <khaled@libreoffice.org> 2023-09-19 14:22:32 +0200 commit 9e92a17cb6e03beedeeca40bfc8524c2623d31eb (patch) tree 0fce9772670f1699d511d9690b976b95578fcaaa parent 37f91706e6efd36074187234530f8c8ee8a3edd8 (diff) starmath: Improve glyph positioning
If https://opengrok.libreoffice.org/xref/core/starmath/source/cfgitem.cxx?r=c37022ff#1003 is changed like - pFormat->SetBaseSize(Size(0, o3tl::convert(nTmp16, o3tl::Length::pt, SmO3tlLengthUnit()))); + pFormat->SetBaseSize(Size(0, o3tl::convert(nTmp16, o3tl::Length::pt, o3tl::Length::mm100))); then the original size is correct
Hi Mike, Since you fixed bug 157965 I thought you might be interested in this one which is caused by the same commit. My knowledge it quite limited in this area
https://gerrit.libreoffice.org/c/core/+/160827
Xisco: could you please provide a unit test? Unfortunately I don't have cycles. It is enough to have *any* DOCX with an equation; it would import with incorrect size prior to the fix. The test would need to check the size of the formula; but the check is not straightforward (or else I'd do it myself) - because the size would depend on the font used on import. Or it could be a UITest, to compare sized before and after entering edit mode...
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/80b67e776ae26d60e0935fcc57a8ff6c983bdd15 tdf#157569: FormulaImExportBase::getFormulaSize should return mm/100 It will be available in 24.8.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.
(In reply to Mike Kaganski from comment #14) > Xisco: could you please provide a unit test? Hi Mike, Sure, I'll do it next week. Thanks for the quick fix. Much appreciated.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/3d0a2278aca97370cb22d0d91f746116be2231b1 tdf#157569: FormulaImExportBase::getFormulaSize should return mm/100 It will be available in 24.2.0.0.beta2. 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.
My attempt for the unittest is in https://gerrit.libreoffice.org/c/core/+/160917, unfortunately I couldn't find a way to leave the edit mode so the test fails with - Expression: false - Unexpected dialog: Error activating object Error: General OLE error.
(In reply to Xisco Faulí from comment #18) > My attempt for the unittest is in > https://gerrit.libreoffice.org/c/core/+/160917, unfortunately I couldn't > find a way to leave the edit mode so the test fails with > > - Expression: false > - Unexpected dialog: Error activating object Error: General OLE error. I added a UItest in https://cgit.freedesktop.org/libreoffice/core/commit/?id=582dbb28efb39d93b6f9197590a5c64b69dec393
Sorry about this and other math bugs, I apparently screwed things up with too confident changes (I naïvely assumed that something that presumably works for online would work for desktop version too)
(In reply to خالد حسني from comment #20) No problem at all - just needs follow-us, which I feel easy enough to do myself. Thank you for the improvements!