Bug 76322 - FORMATTING: Section in a header ignores manual column breaks
Summary: FORMATTING: Section in a header ignores manual column breaks
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Justin L
URL:
Whiteboard: BSA target:5.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-18 14:28 UTC by max+freedesktop
Modified: 2017-05-19 10:49 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Result of steps 1-5. (11.09 KB, application/vnd.oasis.opendocument.text)
2014-03-18 14:28 UTC, max+freedesktop
Details

Note You need to log in before you can comment on or make changes to this bug.
Description max+freedesktop 2014-03-18 14:28:56 UTC
Created attachment 96004 [details]
Result of steps 1-5.

Problem description:
A multi-column section inserted in the page header treats column breaks as regular paragraph breaks. Disabling "Evenly distribute contents to all columns" moves all contents to column 1.

Steps to reproduce:
1. Create a new Writer document
2. Insert -> Section... with 3 columns
3. Write "<CB>Test1<CB>Test2<B>Test3" in the section, where <CB> is a column break (Insert -> Manual Break... -> Column break) and <B> is a regular break. Column 1 should be empty, Column 2 should contain "Test1" and Column3 should contain "Test2<B>Test3".
4. Add a page header.
5. Repeat steps 2 & 3 with the section inserted in the header.
6. Now disable "Evenly distribute contents to all columns" for both sections. In the header, all text moves to column 1, while the body section is unaffected.

Current behavior:
After step 5, "Test1" jumps to the left column, "Test2<B>Test3" jumps to the middle column. After step 6, all header text jumps to the left column.

Expected behavior:
The header section should behave the same as the body section.
Operating System: All
Version: 4.2.1.1 release
Comment 1 Thomas van der Meulen [retired] 2014-03-21 13:11:22 UTC
Thank you for your bug report, I can reproduce this bug running 
Version: 4.2.3.1
Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
OS: Mac osx 10.9.2

I can reproduce step 1-5. but I couldn't find "Evenly distribute contents to all columns", could you explain how to use it.
Comment 2 max+freedesktop 2014-03-21 13:15:14 UTC
(In reply to comment #1)
> Thank you for your bug report, I can reproduce this bug running 
> Version: 4.2.3.1
> Build ID: 3d4fc3d9dbf8f4c0aeb61498a81f91c5b7922f13
> OS: Mac osx 10.9.2
> 
> I can reproduce step 1-5. but I couldn't find "Evenly distribute contents to
> all columns", could you explain how to use it.

After step 5:

Format -> Sections... -> Section 2 -> Options... -> Uncheck "Evenly distribute contents to all columns"
Comment 3 Thomas van der Meulen [retired] 2014-03-21 13:38:24 UTC
Thank you, I can also reproduce that Behavior
Comment 4 Joel Madero 2015-05-02 15:42:57 UTC Comment hidden (obsolete)
Comment 5 max+freedesktop 2015-05-11 13:55:27 UTC
The bug is still present in LibreOffice 4.4.3.2 on Windows 8.1. No change in behavior.
Comment 6 Justin L 2016-06-13 05:30:59 UTC
This bug is caused by sw/source/core/layout/flowfrm.cxx IsColBreak() due to this clause in a while loop:
(!pPrev->IsInDocBody() && !m_rThis.IsInFly())

This line has been in *OpenOffice* since the very beginning of flowframe.cxx, so it is difficult to understand why this clause exists.  Forcing it to be false (false && !prev->IsInDoc....) did not cause any unit test failures.
Comment 7 Commit Notification 2016-06-27 11:55:48 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=121109610f9af0b294cf042c6ae5abc6fcc4f326

tdf#76322 writer: allow column breaks in headers/footers

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.