Created attachment 192800 [details] Comparsion LibreOffice 24.8 master vs MSO Steps to reproduce: 1. Open attachment 192798 [details] from bug 159911 -> The 3D has wrong rotation. if the image is black&white, that's been reported in bug 159911 Reproduced in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: aa49b95cd1bb2baa357c9aac7e5d046630ffac85 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded
Regression introduced by author Regina Henschel <rb.henschel@t-online.de> 2024-01-23 20:18:48 +0100 committer Miklos Vajna <vmiklos@collabora.com> 2024-02-19 13:57:14 +0100 commit 6e5529d7382558a38e547074e2f674e85e11e66e (patch) tree 045ebb12a3a438aebedafebb481df23ecca2d5a6 parent 81adba0eeed883b939477259ac53c04459d25a4c (diff) tdf#70039 convert 3D effects to extrusion Bisected with: bibisect-linux64-24.8
Before the patch the image was imported without the 3D-properties. So it is more an implementation error than a regression. I'm unsure how to fix it. I could fix the import for the 3D-properties, but than it renders transparency wrongly (bug 159515). Or I could exclude images from 3D. Suggestion?
I'll look at it.
The document shows two problems: (1) The workaround to rotate the fill image of the shape on import in case a cropped image is rotated is applied to the extruded shape as well. But an extruded shape does not need this workaround, because the extruded shape automatically rotates its fill together with the shape rotation. (2) An extruded shape is created although it is an image cropped to shape. Because of bug 159515 the shape should no be extruded. I do not find how to know whether the bitmap has transparency or not, or how to get the mime type of the bitmap. I do not see such information at the point in question in Shape::createAndInsert() method. Therefore the patch goes this way: It fixes part (1) and for part (2) cropped image and images with 3D effects are excluded from extrusion. I have tried to implement the exclusion so, that it can be easily removed when bug 159515 is fixed. For cropped images we have so nearly the same situation as before commit 6e5529d7382558a38e547074e2f674e85e11e66e . 'Nearly' because the following situation has changed: If an image cropped to shape in PowerPoint is rotated with the 'Rotation' property in the 'Size' tab in PowerPoint, then PowerPoint rotates the image together with the crop shape as default. We have 'Rotate together with shape' not implemented. The import rotates the image itself as workaround. This workaround is now also performed, when the image (respectively the crop shape) is rotated by the z-Rotation in the '3D-Rotation' part in the 'Effects' tab. When you want to test, whether the fix for (1) works, you need to change the code. Remove the parameter bBlockExtrusion in the call of setExtrusionProperties() in shape.cxx file and comment out the definition of the bBlockExtrusion variable there. We imperatively need the feature "Rotate fill together with shape", bug 34551 and bug 125897. The case when a shape has got a bitmap fill and is rotated is not solved by the patch. A part corresponding to the workaround in GraphicProperties::pushToPropMap() method is missing in FillProperties::pushToPropMap(). You can see what I plan to do in https://gerrit.libreoffice.org/c/core/+/164107.
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d8079e980e3e5947df9430089444a5f31e0c5de6 tdf#159912 extruded shapes already rotate background 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.
It should be OK on current master. Xisco, please try it out.