Bug 165984 - Add Paragraph/Column/Page and Spread end zone support
Summary: Add Paragraph/Column/Page and Spread end zone support
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: Not Assigned
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2025-03-31 10:14 UTC by László Németh
Modified: 2025-04-08 01:43 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf165984.fodt: test document with paragraph and page end zones (25.58 KB, application/vnd.oasis.opendocument.text-flat-xml)
2025-04-01 16:19 UTC, László Németh
Details
end_zones.png: screenshot with the new end zone spin boxes (typical values for 12 pt font size, not for the test document with its 49 pt text) (92.07 KB, image/png)
2025-04-01 16:26 UTC, László Németh
Details
end_zones.png: screenshot with the new end zone spin boxes (typical values for 12 pt font size, not for the test document with its 49 pt text) (91.08 KB, image/png)
2025-04-03 19:28 UTC, László Németh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2025-03-31 10:14:53 UTC
Description:
According to their typography, languages with long words need better adjustment of line break of the last full paragraph/column/page/spread lines, than simply disabling hyphenation by the recent ODF hyphenation-keep or its equivalent MS Word OOXML extension. DTP software use paragraph and column/page/spread end zones to adjust the hyphenation zones in the last lines.

Steps to Reproduce:
Enable hyphenation.

Actual Results:
It's not possible to set different hyphenation zone for the last lines, only disabling it completely.

Expected Results:
Hyphenation zones for the last full paragraph/column/page/spread lines.


Reproducible: Always


User Profile Reset: No

Additional Info:
From Affinity Publisher's help:

Paragraph end zone — defines the amount of space allowed at the end of a paragraph before hyphenation begins.

Column end zone — defines the amount of space allowed at the end of a column before hyphenation begins. 

Source: https://affinity.help/publisher2/en-US.lproj/index.html?page=pages/Text/hyphenation.html&title=Hyphenation
Comment 1 Commit Notification 2025-04-01 15:52:53 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7d384fb1c232f7aa720436bc68dc1de334bf7297

tdf#165984 sw cui xmloff: add Paragraph/Column/Page/Spread end zone

It will be available in 25.8.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 2 László Németh 2025-04-01 15:54:28 UTC
Commit description:

tdf#165984 sw cui xmloff: add Paragraph/Column/Page/Spread end zone

Add new hyphenation options to adjust hyphenation, like DTP software do
in accordance with typographic requirements:

– Paragraph/Column/Page/Spread end zone spin boxes to Hyphenate Across
  section of Text Flow pane of paragraph settings;

– loext:hyphenation-zone-always, loext:hyphenation-zone-column,
  loext:hyphenation-zone-page and loext:hyphenation-zone-spread
  ODF extensions;

– widorp.cxx, guess.cxx: handle Column/Page/Spread end zones;

– guess.cxx: handle Paragraph end zone (without portions, yet).

According to their typography, languages with long words need better
adjustment of line break of the last full paragraph/column/page/spread
lines, than simply disabling hyphenation by the recent ODF hyphenation-
keep or its equivalent MS Word OOXML extension. DTP software use
paragraph and column/page/spread end zones to adjust the hyphenation
zones in the last lines, for example, setting Column end zone to the
150% percent of the Hyphenation zone, resulting less hyphenation, also
less short words parts at the end of the columns, pages and spreads,
increasing readability.

Note: the default OOXML hyphenation zone 18 pt (or its MS Word variants,
for example 21.25 pt) disables single letter or narrow 2-letter (li-,
fi-, i.e. fi ligature) hyphenations at 12 pt font height. Setting 27 pt
for Column end zone, all 2-letter hyphenation is disabled in last lines
of columns and pages.

Note: textflow.ui needs multiple adjustment definitions for correct work
of the multiple spin boxes.
Comment 3 László Németh 2025-04-01 16:19:39 UTC
Created attachment 200125 [details]
tdf165984.fodt: test document with paragraph and page end zones
Comment 4 László Németh 2025-04-01 16:26:06 UTC
Created attachment 200126 [details]
end_zones.png: screenshot with the new end zone spin boxes (typical values for 12 pt font size, not for the test document with its 49 pt text)

Hyphenation zone: 18 pt (150% of the font height): disabling hyphenation after a single character, or after very narrow 2-character character sequences (e.g. the fi-ligature)

Column end zone: 27 pt (150% of the hyphenation zone): disabling 2-character hyphenations

Spread end zone: 48 pt (400% of the font height): disabling 3- and 4-character hyphenations
Comment 5 László Németh 2025-04-01 16:29:57 UTC
Note: zero end zone value means no-limit/auto value: inherited value from the previous end zone (inheritance: hyphenation zone->column->page->spread end zones).
Comment 6 BogdanB 2025-04-01 16:58:20 UTC
Laszlo, I see the new options, but I can not correctly evaluate them.

I just tested with 1 cm, similar to your image, and I get "except" splited through hyphenation on 2 pages.

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7d384fb1c232f7aa720436bc68dc1de334bf7297
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 László Németh 2025-04-01 20:26:07 UTC
(In reply to BogdanB from comment #6)
> Laszlo, I see the new options, but I can not correctly evaluate them.
> 
> I just tested with 1 cm, similar to your image, and I get "except" splited
> through hyphenation on 2 pages.

Bogdan: If you checked with the test file, that contains bigger end zone values for its bigger font size (49 pt). The screenshot is only an example of the typical usage with normal font size (12 pt). I am going to extend the description of the image. Thanks for your testing and feedback!
Comment 8 BogdanB 2025-04-02 05:00:36 UTC
Also, I noted that the tooltips, the extended tooltips, does not help in order to know what this new options are doing.
Comment 9 Commit Notification 2025-04-02 07:43:26 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4e509260aa892ae14b447d0f915f4875e9a1fc26

tdf#165984 xmloff: don't export default end zone value "no-limit"

It will be available in 25.8.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 10 Commit Notification 2025-04-02 07:45:29 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#165984 offapi: document inheritance of end zones

It will be available in 25.8.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 11 Commit Notification 2025-04-03 16:14:06 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5daab76058e38ae16180b1bea239161b7c8be274

tdf#165984 sw: don't apply hyphenation zone at disabled hyphenation

It will be available in 25.8.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 12 Commit Notification 2025-04-03 17:12:14 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/fcff6cf389b6bf14fae3c796578634b00fb22a0c

tdf#165984 sw: document Text Flow -> Paragraph/Column/Page/Spread end zones
Comment 13 László Németh 2025-04-03 19:28:42 UTC
Created attachment 200155 [details]
end_zones.png: screenshot with the new end zone spin boxes (typical values for 12 pt font size, not for the test document with its 49 pt text)