Bug Hunting Session
Bug 56596 - FILESAVE: huge excesses of white space in xhtml export due to 'padding: 100%' in some CSS s...
Summary: FILESAVE: huge excesses of white space in xhtml export due to 'padding: 100%'...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://issues.apache.org/ooo/show_bu...
Whiteboard: target:4.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-31 01:33 UTC by callow.mark
Modified: 2012-11-26 11:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
2 page .odt whose export has the bad padding (25.18 KB, application/vnd.oasis.opendocument.text)
2012-11-01 06:02 UTC, callow.mark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description callow.mark 2012-10-31 01:33:36 UTC
Various parts of my exported HTML document have huge excesses of white space, for example before and after sections in the Code style there is half a screen of white-space. This is caused by "padding: 100%" in the associated CSS style. E.g.

.Code_borderStart { font-size:9pt; font-family:Courier New; writing-mode:page; margin-left:2.032cm; margin-right:0cm; margin-top:0cm; line-height:0.406cm; text-indent:0cm; background-color:transparent; padding:100%; padding-bottom:0cm;  border-bottom-style:none; }

There is similar padding in the .Code_borderEnd style and many other paragraph styles.

Manually changing to "padding: 0%;" basically fixes the problem although the spacing then is a little tight.

I cannot attach the source document here because this is a public list and I do not have permission. I'll be happy to send it to whoever works on the bug though.

This bug seems to have been inherited from OpenOffice.
Comment 1 callow.mark 2012-10-31 01:56:50 UTC
Change summary to match apparent convention.
Comment 2 Regina Henschel 2012-10-31 18:51:30 UTC
In the summary you write XHTML, in the text you write HTML. Which one is correct? Do you use File > Export or File > Save As ?

Please provide a small document, which shows the error.
Comment 3 callow.mark 2012-11-01 01:37:47 UTC
(In reply to comment #2)
> In the summary you write XHTML, in the text you write HTML. Which one is
> correct? Do you use File > Export or File > Save As ?
It is File > Export > XHTML.

Save As > HTML (Document Writer) produces output that does not look anything like the original .odt document so I gave up on that. For example section headers have no left margin and the text stretches the full width of my browser window. The output file does not contain the styles which are the subject of this bug. It also generates a bunch of .gif files for each of the equations in the document while Export uses data: URIs giving just a single output file which is vastly preferable.

> 
> Please provide a small document, which shows the error.
I'll see if I can produce one.
Comment 4 callow.mark 2012-11-01 06:02:10 UTC
Created attachment 69377 [details]
2 page .odt whose export has the bad padding

Here is a short document. When exported, the .html file shows the bug. Look at the Code_* styles, for example.
Comment 5 Regina Henschel 2012-11-01 12:47:01 UTC
Two errors here: wrong fo:margin=100% in the document source and padding=100% in the exported xhtml. See my comments in Apache bugzilla.
Comment 6 Peter Jentsch 2012-11-26 00:27:48 UTC
fixed on master.
Comment 7 Not Assigned 2012-11-26 00:34:11 UTC
Peter Jentsch committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6aabe09ac092c51d4b394bde9c7ea0055b952e33

fix fdo#56596 - FILESAVE: huge excesses of white space in xhtml...



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 callow.mark 2012-11-26 07:28:06 UTC
I confirm that with the patch in comment #7, the latest build successfully exports the document. Only two remaining defects, bugs 56598 and 57538, prevent near perfect export.
Comment 9 Roman Eisele 2012-11-26 11:24:10 UTC
(In reply to comment #8)
> I confirm that with the patch in comment #7, the latest build successfully
> exports the document.
Just a hint ;-): In this case, i.e. when you have successfully tested that a bugfix has *really* fixed the bug, you are invited to set the status of this bug report to VERIFIED / FIXED.