Created attachment 125663 [details] Saving the presentation in pptx format shifts the text outside the shape When exporting the attached presentation to PPTX format and opening it with Powerpoint 2010, the text inside the puzzle shape is shifted outside the shape. When opening the pptx-file in LO, the faulty behaviour is the same. Exporting in ppt format works flawlessly.
Repro. Arch Linux 64-bit, KDE Plasma 5 Version: 5.3.0.0.alpha0+ Build ID: c13f60e7cd18df6b0ab70289f5b91ee01e4ae126 CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; Locale: fi-FI (fi_FI.UTF-8) Built on June 18th 2016
** 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.4.1 or 5.3.6 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-20170901
Bug is still present with same behaviour in LO 5.3.6 (only tested on Win 7 64bit).
** 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 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 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: 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
Still confirmed. In older versions (at least 3.3.0 - 4.4.7), the shape got turned into a rectangle and the text appeared in the upper left corner (as it does now as well). Version: 6.4.0.0.alpha0+ (x64) Build ID: e1b51d4588b4b39592bb94dd5bb90de5e04d061e CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-23_09:16:11 Locale: fi-FI (fi_FI); UI-Language: en-US Calc: threaded
OOo has no OOXML export filter, so not "Inherited From OOo". But I do not know the first version of LO, which has this export filter. Nevertheless, the needed feature has not been implemented. The document contains a shape "puzzle". This special shape has the problem, that it is not contained in MS binary preset shapes and not contained in OOXML preset shapes. So this shape has to be exported as 'custGeom'. But currently LibreOffice is not able to convert formulas from ODF syntax to OOXML syntax. Therefore it is only possible to write the path of the outline with numbers and does not write formulas at all. These written numbers are relative to a rectangle given by the 'viewBox' attribute. The 'viewBox' maps the internal coordinate system to the actual width and height of the shape, so that the internal values of the shape are independent from the actual width and height. The rectangular area, into which the text is written, is given in values, which are relative to the 'viewBox' too in ODF. But in OOXML the corresponding rectangle expects values in global units. Therefore formulas would be needed to get the global value depending on internal values, viewBox and actual width and height. Because LibreOffice does not write formulas at all in the OOXML export filter, this issue cannot be fixed now. The default area for text is the entire rectangle of the shape (the handles, which you see, when you click on the shape). And that is, what you see, where the text is placed.
Fair enough. LibO 3.3.0 merged Go-oo as well, which had OOXML export.
Created attachment 164958 [details] Example shape copied to odt The same happens in ODT format as well, so not PPTX specific.
The problem is likely in DrawingML::WritePolyPolygon() in line mpFS->singleElementNS(XML_a, XML_rect, XML_l, "0", XML_t, "0", XML_r, "r", XML_b, "b"); Idea for custom shapes: Get the SdrObject from XShape. Create EnhancedCustomShape2d for the SdrObject. Use method EnhancedCustomShape2d::GetTextRect(). I guess, that the rectangle has the same scale as the polypolygon. It might need the same shift. I see the same wrong position for texts in block arrows.
In the meantime the export is in DrawingML::WriteCustomGeometry(). But there the problem is the same. It uses mpFS->singleElementNS(XML_a, XML_rect, XML_l, "l", XML_t, "t", XML_r, "r", XML_b, "b"); That works for most shapes but not for "Puzzle", because the text area in shape "Puzzle" is smaller than the shape snap rectangle. There is a // ToDO: use draw:TextAreas for <a:rect> in the code.
I'm going to fix it.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1ad58c77352e418124387b804b18da2aeea22c8b tdf#100391 calculate true textarea rect for custGeom 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.