Bug 156559 - HTML Writer/FILESAVE - Alignment of saved html is different from original rtf content
Summary: HTML Writer/FILESAVE - Alignment of saved html is different from original rtf...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2023-08-01 01:59 UTC by Afj
Modified: 2025-08-04 03:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
a test rtf file which includes alignments, table, list, unicode characters. (102.88 KB, text/rtf)
2023-08-01 01:59 UTC, Afj
Details
XHTML file exported (44.62 KB, application/xhtml+xml)
2023-08-02 00:22 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Afj 2023-08-01 01:59:29 UTC
Created attachment 188686 [details]
a test rtf file which includes alignments, table, list, unicode characters.

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 8; OS: Mac OS X 13.5; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


Open attached rtf file, then Save as HTML Document (Writer) (.html). Open saved html file in browser, you would see the most of content are aligned to the right. However the original rtf content are aligned to the left.
Comment 1 m_a_riosv 2023-08-02 00:22:54 UTC
Created attachment 188710 [details]
XHTML file exported

Looks fine for me with 7.4 and 7.5
Comment 2 Afj 2023-08-04 00:09:29 UTC
if you export to XHTML, the alignment looks ok. But if you do File -> Save As ... -> File type/HTML Document (Writer) (.html). You would see the alignment issue in newly generated Html file.
Comment 3 m_a_riosv 2023-08-04 16:44:48 UTC
Reproducible using saving as html
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 34387332173782498acd4998c7c665d04ebc3c7d
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 4 Afj 2023-08-04 21:45:20 UTC
looks like to me the alignment setting of first paragraph style in generated html is used for all paragraphs by default, which causes the issue. Replacing the first p {... style with p.default {... or p.first { would help. Not 100% sure.
Comment 5 QA Administrators 2025-08-04 03:10:13 UTC
Dear Afj,

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 https://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://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug