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: 2023-08-04 21:45 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.