Created attachment 161412 [details] Example with contextual spacing Open attached document. It has a paragraph style "contextualspacing" with Spacing Above paragraph =1cm, Spacing Below paragraph =1cm, and option "Don't add space between paragraphs of the same style. All paragraph have got this style applied. The third the forth paragraphs are inside a section. The spec has: "The space between the paragraphs is zero, if all of the following conditions hold: ... The paragraphs belong to the same content area. ... " So I expect, that there is a 1cm spacing between the forth and fifth paragraph, because the forth paragraph is inside the section and the fifth paragraph is outside the section and thus they do not have the "same content area". I see the problem already in versions before LO 7, where this feature is written as loext:contextual-spacing. Therefore I guess it is an implementation error. But for LibreOffice 7.0 where it is the 'official' attribute style:contextual-spacing in ODF 1.3, it should be implemented correctly. Tested with Version: 7.0.0.0.alpha1+ (x64) Build ID: 0a7341c26741f16835c9062c309e7d3a7fca8209 CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win Locale: de-DE (en_US); UI: en-US Calc: CL and Version: 6.4.5.0.0+ (x64) Build ID: 70a2071ce91b71326659e645dd97996262ea309a CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; Locale: de-DE (en_US); UI-Language: en-US Calc: CL
I confirm it with Version: 7.0.0.0.beta1 (x64) Build ID: 94f789cbb33335b4a511c319542c7bdc31ff3b3c CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL
Dear Regina Henschel, 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
The error still exists in Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 172e208e6b0674f42c301c5ee5e280e9138ba1b4 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL
Created attachment 187888 [details] section 13extended DOCX_mso2010.pdf MSO is also somewhat wishy-washy when it comes to "end of the content area". For headers and footers, the spacing is added, but not for start/end of document. For Table cells, the spacing is not added. In this particular case, the DOCX version looks like what Regina is expecting.
contextual spacing was added to LO in LO 3.6. (3.5.7 showed a 1cm gap in between all of these paragraphs.) (In reply to Regina Henschel from comment #0) > So I expect, that there is a 1cm spacing between the forth and fifth > paragraph, because the forth paragraph is inside the section and the fifth > paragraph is outside the section Yes, I would have expected spacing there also. As seen in the example, it DOES work between "real" sections, but not when transitioning for an explicit section to the main text body. Unfortunately, for DOCX, MSO 2010 actually applies both the bottom AND top spacing (so 2cm) instead of just a combined 1cm. (Also, in DOCX, everything is a "real" section, except perhaps for the first section).
A simple patch to correct the problem is at https://gerrit.libreoffice.org/c/core/+/153033. The question is whether to just fix the implementation problem, or to create a compat flag to handle any possible documents created since 3.6. The full spec is: 20.255 style:contextual-spacing The fo:margin-bottom attribute of a paragraph and the fo:margin-top attribute of the next paragraph are ignored, so that the space between the paragraphs is zero, if all of the following conditions hold: • The style:contextual-spacing attribute of both paragraphs has the value true. • The paragraphs belong to the same content area. • The text:style-name attribute of the paragraphs refer to the same common paragraph style. In case a text:style-name attribute refers to an automatic style, the value of the style:parent-style-name attribute of the automatic style is taken for the style comparison. If a paragraph has a conditional style, the value of its text:cond-style-name attribute is taken for the style comparison. Our code really does nothing intentional about attempting to define "different content areas". It looks like it is simply based on one TEXTFRAME following another. (see bug 75221, which also references the 3.6 commits) Based on an MSO example, it suggests that they also don't have extremely intentional areas where it does or does not apply either. - at the beginning of the document, the upper spacing is applied (LO OK) - however the lower spacing is not applied at document end (LO OK). - the upper spacing is not applied after a table (LO applies it), - but lower spacing is applied before a table (LO OK). - upper spacing is applied at the beginning of a table cell (LO OK) - but lower spacing is not applied at the end of a table cell. (bug 155813) - at section breaks, both upper and lower apply (LO merges like everywhere else) - upper spacing is applied to header top (LO OK), - and lower spacing is applied to header bottom. (bug 128195)
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/12f256cd1ae3e625c7b7f48987b7e843046924fa tdf#133507 sw: hunt for documents with ULSpacing at section end It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/22c4df0282dce9d56207a440c523c2f3a16bc9f2 tdf#133507 sw layout: fix missing contextual spacing at section end It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Created attachment 188047 [details] Lync-Demo-Guide_publish-june-2012-_ENB.docx: triggered my hunt assert Some kind of layout back and forth must also be triggering this layout condition. Deleting pretty much any paragraph in this document will cause it not to trigger any more. That is a bit scary.
(In reply to Justin L from comment #6) > - the upper spacing is not applied from the paragraph after a table Not true. Only not applied for the "Normal" paragraph style. > - but lower spacing is applied before a table True - unless the table starts with the same paragraph style! > - upper spacing is applied at the beginning of a table cell True for the first cell only if the paragraph before the table is different. True for the first column only if it is not the "Normal" para style. True only if the previous column has a different paragraph style. In other words, being in a table really has no impact - always compare to the previous paragraph/column. In MSO at the end of a row, you can see some kind of control. That control always has the default paragraph style, so in your mind consider that to be a paragraph to compare against. > - but lower spacing is not applied at the end of a table cell. (bug 155813) Very conditional as already described. See examples in that bug report. It is applied if the next column has a different paragraph style. It is applied on the last column if it is not the "Normal" para style.