Bug 89143 - FILESAVE: Save as HTML wraps lines unnecessarily
Summary: FILESAVE: Save as HTML wraps lines unnecessarily
Status: RESOLVED DUPLICATE of bug 56943
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-05 19:13 UTC by Rev. Bob
Modified: 2015-03-01 17:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rev. Bob 2015-02-05 19:13:38 UTC
(Split from bug 89069; description pasted from there and modified accordingly.)

I know this goes back to at least Writer 4.2.1.1, but I can't speak to earlier versions, although I suspect that, like bug 89069, it traces back to OOo. I use LibreOffice Writer to create/edit documents as ODT files, then "Save a Copy" with "HTML Document (Writer)" to export an HTML copy, which is intended for use in an XHTML environment. (The "Export as XHTML" code is far messier and harder to clean up, but I should note that it does NOT exhibit this behavior. Hence, it is most likely a save-as-HTML filter issue rather than a Writer bug.) Furthermore, if it matters, I am using smart quotes and UTF-8 encoding.

When using Save a Copy > HTML to create an HTML version of a Writer document, the saved HTML contains hard line breaks within block-level elements - that is, it manually wraps the output, rather than reserving line breaks for semantically and/or syntactically significant situations (i.e. between paragraphs, after META elements). An enhancement to the HTML save filter to allow user configuration of that behavior (no breaks, wrapped lines, smart breaks) would be rather helpful.

Note that "Save a Copy > HTML" breaks at every line, but "Export... > XHTML" has no breaks. I'm advocating an option in between, on the principle that it is easier for a user to insert every-line wrapping than to correctly remove it, but that breaks between paragraphs, headers, and other block-level elements are useful. Further, when the output code needs to be touched up, it is much easier to perform search/replace operations on unwrapped lines than wrapped ones, and also much safer when one knows that a search won't accidentally cross paragraph borders.
Comment 1 Buovjaga 2015-02-07 19:12:11 UTC
I am for this proposal.

Confirmed current behavior with:
Win 7 Pro 64-bit, LibO Version: 4.4.0.3
Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Locale: fi_FI
Comment 2 Urmas 2015-03-01 17:22:50 UTC

*** This bug has been marked as a duplicate of bug 56943 ***
Comment 3 Rev. Bob 2015-03-01 17:51:57 UTC
Bug 56943 is a complaint about the XHTML export filter and how its output is all on one line. This bug concerns the HTML export filter and how an opening quote character is not styled properly at the beginning of a paragraph. They are in no way the same issue.
Comment 4 Rev. Bob 2015-03-01 17:59:24 UTC
(Sorry for the double-post. No coffee yet; I was looking at the wrong bug.)

While this does concern the HTML filter instead of the XHTML filter, I can see how "if you don't like the way it wraps, tough" could be considered a response to both bug reports.

*** This bug has been marked as a duplicate of bug 56943 ***