Bug 106021 - FORMATTING: Writer does not accept CSS box model for paragraphs
Summary: FORMATTING: Writer does not accept CSS box model for paragraphs
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odf
: 37653 (view as bug list)
Depends on:
Blocks: ODF-import
  Show dependency treegraph
 
Reported: 2017-02-15 12:57 UTC by Thomas Lendo
Modified: 2023-12-12 03:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example with margins, borders and padding (21.98 KB, application/vnd.oasis.opendocument.text)
2017-02-15 13:01 UTC, Thomas Lendo
Details
Example with different and with same paragraph style (12.90 KB, application/vnd.oasis.opendocument.text)
2017-05-28 20:36 UTC, Regina Henschel
Details
screenshot ONLYOFFICE (72.04 KB, image/png)
2017-05-28 20:41 UTC, Regina Henschel
Details
Screenshot TextMaker (56.54 KB, image/png)
2017-05-28 20:42 UTC, Regina Henschel
Details
screenshot Webodf (53.50 KB, image/png)
2017-05-28 20:43 UTC, Regina Henschel
Details
Wrong handling of negative first line indent (64.01 KB, application/vnd.oasis.opendocument.text)
2017-06-29 19:30 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lendo 2017-02-15 12:57:55 UTC
In 2008 I entered a bug in OpenOffice.org: https://bz.apache.org/ooo/show_bug.cgi?id=97151 (Space between paragraphs filled with paragraph background color).

Regina Henschel consolidated that bug with some others to a new bug: https://bz.apache.org/ooo/show_bug.cgi?id=125316 (Writer does not accept CSS box model for paragraphs)

I will copy her bug issue text from AOO because it still exists in both programs AOO and LO (Regina, I hope you have no problem with that):

In ODF1.2 the spacing around paragraphs is done with the properties
fo:margin, fo:border and fo:padding. [chapter 20.198, 20.176, 20.210] They have no own definitions, but take the definitions from $7 in XSL http://www.w3.org/TR/2001/REC-xsl-20011015/. And XSL uses directly the definitions from CSS2. And there we find the "Box model" http://www.w3.org/TR/CSS2/box.html. So in turn AOO should render paragraphs as defined in this "Box model".

1.
The margin area is transparent. In chapter 8.2 in CSS2 "Margin backgrounds are always transparent."
Error: Writer extends the paragraph background into the top-margin, see first page of attached document.

2.
The properties margin, border and padding are independent usable.
Error: Writer removes padding, when no border exists, see second page of attached document. The last text there should have a padding.

I [Regina] have found several issues with descriptions from a user point of view. I [Regina] will set them as duplicate to this [AOO issue 125316]. But the problems described there should be considered when working on this issue.
Comment 1 Thomas Lendo 2017-02-15 13:01:47 UTC
Created attachment 131246 [details]
Example with margins, borders and padding

Attached a test file created with LO 5.3.0.3, based on Regina Henschel's example file for AOO.

This problem still occurs in LibreOffice Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; Calc: CL
Comment 2 Regina Henschel 2017-05-28 20:36:48 UTC
Created attachment 133674 [details]
Example with different and with same paragraph style

The problem is a rendering problem. LibreOffice and all older versions down to OpenOffice.org 1.1.5 render the background of the padding rectangle in to bottom margin, if the following paragraph has the same style.

Because the users, who have created documents with this versions and have used that feature would complain, if the rendering is now different, I think, that we need a different solution. Perhaps we can add an attribute in ODF 1.3, that allows to fill the area between the paragraph with the background of the padding rectangle. Values might be "equal" to cover LibreOffice way of handling it, and "always" to cover Microsoft way, and "CSS" to conform to CSS, which would result in always transparent margin.

I will attach some screenshots, how other applications render the attached file.
Comment 3 Regina Henschel 2017-05-28 20:41:10 UTC
Created attachment 133675 [details]
screenshot ONLYOFFICE

Word 2010 (after "repair" the document) and GoogleDocs show similar rendering (and some errors like missing borders). The background color of the padding area is extended to the next paragraph.
Comment 4 Regina Henschel 2017-05-28 20:42:06 UTC
Created attachment 133676 [details]
Screenshot TextMaker

TextMaker shows a rendering similar to LibreOffice.
Comment 5 Regina Henschel 2017-05-28 20:43:37 UTC
Created attachment 133677 [details]
screenshot Webodf

Webodf renders the file correctly with transparent margins.
Comment 6 Regina Henschel 2017-05-30 14:31:22 UTC
After asking on the dev mailing list, I get the response, that this LO can solve this by a compatibility flag and no changes in the ODF specification are needed. https://lists.freedesktop.org/archives/libreoffice/2017-May/077789.html
Comment 7 Regina Henschel 2017-06-29 19:30:01 UTC
Created attachment 134394 [details]
Wrong handling of negative first line indent

And here another problem of "does not accept CSS box model". The negative first-line indent extends the box, but it should float out of the box.
Comment 8 Thomas Lendo 2017-10-21 23:30:16 UTC
*** Bug 37653 has been marked as a duplicate of this bug. ***
Comment 9 QA Administrators 2018-10-22 02:50:11 UTC Comment hidden (obsolete)
Comment 10 Regina Henschel 2018-10-22 10:35:28 UTC
The padding color is still painted into the margin area, if two adjacent paragraphs have the same style. To be clear: The option "Merge with next paragraph" is disabled.

Error seen in Version: 6.2.0.0.alpha0+ (x64)
Build ID: 6baca63b44bf7f75a522b1adc4b4bbce502aec3b
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-20_01:35:41
Locale: de-DE (en_US); Calc: CL
Comment 11 Regina Henschel 2021-12-10 21:53:57 UTC
(In reply to Regina Henschel from comment #7)
> Created attachment 134394 [details]
> Wrong handling of negative first line indent
> 
> And here another problem of "does not accept CSS box model". The negative
> first-line indent extends the box, but it should float out of the box.

Negative indent is solved by ODF TC in https://issues.oasis-open.org/browse/OFFICE-4092.
Comment 12 QA Administrators 2023-12-12 03:13:46 UTC
Dear Thomas Lendo,

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