Bug 160327 - PPTX: vertical flipped image with applied 3D properties are wrong after round-trip
Summary: PPTX: vertical flipped image with applied 3D properties are wrong after round...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:pptx
Depends on:
Blocks: PPTX-3D
  Show dependency treegraph
 
Reported: 2024-03-23 18:13 UTC by Regina Henschel
Modified: 2024-07-18 14:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
File with 3D image (53.03 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-03-23 18:13 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2024-03-23 18:13:32 UTC
Created attachment 193260 [details]
File with 3D image

Open attached document. It has an image on the left, which is extruded to a 3D-object. The image has got a vertical flip and the 3D-object has got rotation 25° on y-axis, 40° on x-axis and 17° on z-axis. On the right side of the slide is a screenshot how it looks in PowerPoint.

The image on the left is not extruded in LibreOffice (missing feature). That is not the problem for this bug report. Save the file with new name to pptx. Open the re-saved document in PowerPoint. Comparing image and screenshot shows the error.

For images that are extruded to 3D-objects the original camera geometry is recreated on re-saving by using the InteropGrabBag. That works fine in most cases. The problem is here, that the image has vertical flip. That is handled in LO as horizontal flip plus 180° rotation. For a 2D-image that is indeed the same as a vertical flip. But in this case it produces a horizontal flip of the image itself and then an additional 180° rotation of the 3D-object. And that is different from a vertical flip of the image and no additional 3D-object rotation.

A relevant place is https://opengrok.libreoffice.org/xref/core/oox/source/export/shapes.cxx?r=ff23937c#1466 and the following lines. In contrast to custom shapes, an image does not track whether it has been a vertical or horizontal flip. So the solution is not straight forward. It might be solvable by adding additional information to the InteropGrabBag. A possible solution should be considered from the point of view that in the medium term our internal representation and the ODF file format will be extended so that an SdrGrafObj can have an extrusion, see thread https://lists.freedesktop.org/archives/libreoffice/2024-March/091730.html
Comment 1 Buovjaga 2024-07-18 12:22:49 UTC
Repro and confirmed in office.com.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3dcc288468eb2a71ba1381412dd7e25b9fb329d9
CPU threads: 8; OS: Linux 6.9; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 18 July 2024