Created attachment 179269 [details] Sample slide (PPTX) How to reproduce: - Open the sample slide in both Office 365 and LibreOffice. - Observe how the text "AI" and "ML" is misplaced in the latter: above the upper border of the circles instead of below.
Created attachment 179270 [details] Visual comparison Office 365 (left) vs LibreOffice 7.4 (right) Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 678446780446ae568ee8b1b814158c54ea5e393f CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US as well as Version: 6.4.8.0.0+ Build ID: 99b065ec31d032fc08ab14f66430dac4fef904a5 CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: gtk3; TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:libreoffice-6-4, Time: 2020-10-08_08:57:08
PowerPoint switches the algorithm in case the sum of top and bottom margin is larger than the text area height. LO uses the same algorithm for all cases. So we need to adapt the values on import and export. I have made some experiments and have got these results for PowerPoint: If top margin + bottom margin < text area height then in case anchor is top, shift text block down by top margin anchor is bottom, shift text block up by bottom margin. In all other cases calculate V = (top margin - bottom margin)/2. Place the text so that In case anchor is top, middle of text area + V = top text block anchor is middle, middle of text area + V = middle of text block anchor is bottom, middle of text area + V = bottom of text block As usual, y-values increase downwards. (These are only first experiments and algorithm might be wrong, so verify before implementing.)
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e216988657e20a1e52986f742ab60464697bcb41 tdf148321: convert OOXML inset values to text distance values It will be available in 7.4.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 Commit Notification from comment #3) > Affected users are encouraged to test the fix and report feedback. I'm happy to report this fixes the sample in this report and also the original, larger instance I destilled it from. @Regina, what do you think (referring to your comment #2)?
The patch contains test documents with a very large amount of examples covering various combinations of top and bottom padding and multi-line text. @Tomaž: Thank you for these test files. For all of the shapes the round-trip PPTX->LO->PPTX works fine. I have tested it in addition with some rotated shapes and found no problems. So I think, the issue is resolved.
(In reply to Regina Henschel from comment #5) > @Tomaž: Thank you for these test files. +1 > For all of the shapes the round-trip PPTX->LO->PPTX works fine. I have > tested it in addition with some rotated shapes and found no problems. Great - thank you for that additional validation, Regina!
Tomaž Vajngerl committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/5319087ab75a01793462c8c41cebfa1996cc688a tdf148321: convert OOXML inset values to text distance values It will be available in 7.3.5. 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.
Verified by Regina and myself. Thank you!
Export to OOXML is wrong. I will not reopen this one, but bug 150966 tracks the export problems.