https://bugs.documentfoundation.org/show_bug.cgi?id=174400

            Bug ID: 174400
           Summary: Calc: Image rotation is lost when exporting a
                    spreadsheet to HTML
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
When a spreadsheet containing a rotated image is exported from LibreOffice Calc
to HTML, the image rotation is not preserved.

The image is displayed with the correct rotation angle inside Calc. However,
after using File > Save As and selecting an HTML format, the exported HTML page
displays the image in its original, unrotated orientation.

It appears that the Calc HTML export filter exports the original image but does
not apply the image object's rotation or generate an equivalent CSS transform:
rotate(...) property.

Steps to Reproduce:
Open LibreOffice Calc.
Create a new spreadsheet.
Insert an image using Insert > Image.
Select the image and rotate it to a visible angle, for example 30 or 90
degrees.
Confirm that the rotated image is displayed correctly in Calc.
Select File > Save As.
Choose HTML Document (Calc) (.html) as the file type and save the document.
Open the exported HTML file in a web browser.

Actual Results:
The image is displayed in its original orientation. The rotation applied in
Calc is lost.

Expected Results:
The exported HTML should preserve the appearance of the spreadsheet. The image
should be displayed using the same rotation angle as in Calc.

This could be implemented by either:

Rasterizing the rotated image during HTML export, or
Exporting the rotation as CSS, for example:

transform: rotate(30deg);

The exported layout should also account for the rotated image's bounding box to
avoid clipping or overlapping adjacent content.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
This issue concerns rotation applied to the image object inside Calc, not only
EXIF orientation stored in the original image file.

The image remains correctly rotated after saving and reopening the spreadsheet
in its native format. The rotation is lost specifically during HTML export.

The issue can be reproduced with PNG and JPEG images.

LibreOffice version: [insert version from Help > About LibreOffice]
 Operating system: [insert operating system and version]
 Browser used to check the HTML: [insert browser and version]

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to