Bug 167542 - Reset Move Line setting of Paragraph TextFlow works not properly
Summary: Reset Move Line setting of Paragraph TextFlow works not properly
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paragraph Hyphenation
  Show dependency treegraph
 
Reported: 2025-07-17 11:11 UTC by Stefan_Lange_KA@T-Online.de
Modified: 2025-12-06 03:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document to reproduce the behavior (3.70 MB, application/vnd.oasis.opendocument.text)
2025-07-17 11:11 UTC, Stefan_Lange_KA@T-Online.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan_Lange_KA@T-Online.de 2025-07-17 11:11:14 UTC
Created attachment 201836 [details]
Test document to reproduce the behavior

When in Settings for Paragraph - Text Flow at "Hyphenation across" "Spread" is not set and instead "Move Line" is set, it looks good first, means the line with hyphenated word ist moved to the next page. 
But when after this "Move Line" is reset (manually or by Undo) this line returns to the origin page but the last word not hyphenated before is hyphenated now as if "Spread" is set.

Reproduce the behavior:
- open the attached test document "Problem_hyphenate_undo_V2.odt"
- click into the paragraph starting on the end of page 3 and continued on page 4 (or select this text)
- the first word on page 4 ("unterschiedliche") could be hyphenated but isn't because of the settings
- Check settings: right click -> Paragraph -> Paragraph -> Tab "Text Flow": "Spread" is not set and also not "Move Line"
- Change setting "Move Line" (set it "on") and close the dialog
- Result: "unterschiedliche" is hyphenated now and the line is moved to page 4 (behavior as it was until LO until 25.2) -> OK
- open Paragraph settings dialog and change setting "Move Line" (reset it to "off") and close the dialog
- Result: the line is moved back to page 3 (OK) but "unterschiedliche" is still hyphenated although the setting "Spread" (off) requires not to hyphenate (wrong!)
- Check settings: "Spread" is not set and also not "Move Line"

I have bisected the behavior, result: 614315146df270d01a3a406ba857b966adc69b6e is the first bad commit
commit 614315146df270d01a3a406ba857b966adc69b6e
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sat Mar 22 11:18:53 2025 -0700

    source c0a8ba8066c95b2bf80fe4b74288dfd3f6931808

    source c0a8ba8066c95b2bf80fe4b74288dfd3f6931808

 instdir/program/setup.ini        |   2 +-
 instdir/program/version.ini      |   2 +-
 instdir/share/gallery/sounds.sdg | Bin 18043 -> 18043 bytes
 instdir/share/gallery/sounds.thm | Bin 1457 -> 1457 bytes
 4 files changed, 2 insertions(+), 2 deletions(-)

Maybe the behavior is caused by the following change (introduces Move Line option, when I'm not wrong):
e499c8d tdf#165354 sw HyphenationKeepLine: apply it on the sidebar by László Németh
Comment 1 Dieter 2025-12-05 20:02:48 UTC
I confirm the current behaviour, but can't assess, if it is a bug or not. Even after reading help, I'm not sure how it should work
Comment 2 Stefan_Lange_KA@T-Online.de 2025-12-05 21:06:08 UTC
(In reply to Dieter from comment #1)
> I confirm the current behaviour, but can't assess, if it is a bug or not.
> Even after reading help, I'm not sure how it should work

I am sure it is a bug:

In Help I find for Text Flow Settings:

Spread
Deselect this check box to prevent words from being hyphenated across a spread. (A spread is a set of two pages that are visible to the reader at the same time.) The hyphenated word is moved to the next spread.

Move Line
Select this check box to move the entire hyphenated line to the next column, page or spread, instead of moving only its last hyphenated word. Only the last line is moved when there are consecutive hyphenated lines, i.e. this setting does not guarantee that hyphenation will be disabled at the end of columns or pages.

In the state the document is opened both checkboxes are disabled (deselected). The word ("unterschiedliche") is not hyphenated but moved to the next page (4). /When "Spread" is selected this word starts on page 3, it is hyphenated and continued on page 4./

--> looks good and according the description in Help

The state resp. the behavior after selecting "Move Line" (--> whole last line is moved to page 4, OK!) followed by Undo resp. deselecting "Move Line" contradicts the Help description: 
- Spread is deselected (and also Move Line) but the word "unterschiedliche" on the spread end is hyphenated.
- When one selects now Spread (means hyphenation on spread end is allowed) the word "unterschiedliche" is no longer hyphenated but moved to page 4.