Bug 152872 - Layout: Hidden paragraph end separates paragraphs in print mode
Summary: Layout: Hidden paragraph end separates paragraphs in print mode
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.6.0 target:7.5.1
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-04 09:51 UTC by Gabor Kelemen (allotropia)
Modified: 2024-04-29 20:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example document from Word 2016 (11.38 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-04 09:51 UTC, Gabor Kelemen (allotropia)
Details
The example document with formatting marks visible in Word and Writer (149.40 KB, image/png)
2023-01-04 09:52 UTC, Gabor Kelemen (allotropia)
Details
The example document with formatting marks hidden in Word and Writer (143.89 KB, image/png)
2023-01-04 09:53 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-01-04 09:51:08 UTC
Created attachment 184478 [details]
Example document from Word 2016

Attached example document in Word has some paragraphs where the paragraph end sign has the hidden character attribute enabled.
In Word in print mode / hidden formatting marks ("PI off") mode this causes the visible letters of the paragraphs to be visible in the same line. In Writer they are in separate lines.

1. Open attached document in Writer
2. In Options - Writer - Formatting aids make sure to have the Hidden characters enabled
3. Press the PI icon on the Standard toolbar

The letters C D E appear in 3 different lines, unlike in Word where they are shown in the same line.

This is not an interop issue, as the hidden attributes are imported correctly from docx, but a difference in behavior.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 44355a90b3450111ad87ad4b6607a564e41d7b54
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (allotropia) 2023-01-04 09:52:56 UTC
Created attachment 184479 [details]
The example document with formatting marks visible in Word and Writer
Comment 2 Gabor Kelemen (allotropia) 2023-01-04 09:53:19 UTC
Created attachment 184480 [details]
The example document with formatting marks hidden in Word and Writer
Comment 3 Commit Notification 2023-01-10 15:45:05 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2bcfb7231b5ca74f02274cfb74ca8463f78905d6

tdf#152872 sw: conditionally hide paragraph breaks

It will be available in 7.6.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.
Comment 4 Michael Stahl (allotropia) 2023-01-10 16:03:07 UTC
this should work now for paragraph breaks.

some observations on Word 2013 behavior for hidden break characters:

    * list, etc set on paragraph props, paragraph break -> merge
    * "page break before" set in paragraph props, paragraph break -> no merge, page break
    * continuous section break -> merge
    * section break next page -> merge, is effectively continuous section break now
    * page break in text -> merge, no page break (sw can't do break in text anyway)
    * cell break hidden for entire row + row break hidden -> row is hidden!
        * all rows of table hidden -> para before does *not* merge with para below
Comment 5 Michael Stahl (allotropia) 2023-01-10 16:07:25 UTC
forgot:
       * column break -> merge, no column break

also: there's an existing code to hide a paragraph completely if all its chars are hidden that's described in:
 http://www.openoffice.org/specs/writer/hidden_text/hidden_text.sxw

but this is not exactly what Word does, Word uses only the paragraph marker formatting to determine if a paragraph is hidden completely.
Comment 6 BogdanB 2023-01-11 14:58:43 UTC
Not ok in
Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded

Ok in
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c68d06dfa1498f862923eaddf3e5d247650a53d5
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 7 Gabor Kelemen (allotropia) 2023-01-12 21:06:38 UTC
Bug 131386 is the same for RTF (converting that bugs example RTF to DOCX makes it work after this fix), which does not work yet.
Comment 8 Commit Notification 2023-01-17 10:12:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ee73d14e06180d8a60fc4fc34ab71f23095e7621

tdf#152872 sw: fix crash on ooo27109-1.sxw

It will be available in 7.6.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.
Comment 9 Commit Notification 2023-01-19 12:43:45 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/42e261fe7ce2ba598941febffea51914dd1fe681

tdf#152872 sw: conditionally hide paragraph breaks

It will be available in 7.5.1.

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.
Comment 10 Mike Kaganski 2024-04-29 19:54:44 UTC
This made attachment 144783 [details] to export the frames twice, creating four frames out of two.