Bug 117245 - FILEOPEN ODT Idents with tabs not working as intended during line breaks
Summary: FILEOPEN ODT Idents with tabs not working as intended during line breaks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: Paragraph-Indent
  Show dependency treegraph
 
Reported: 2018-04-26 09:09 UTC by sh
Modified: 2018-07-09 08:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file with 3 cases (9.97 KB, application/vnd.oasis.opendocument.text)
2018-04-26 09:17 UTC, sh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sh 2018-04-26 09:09:27 UTC
Description:
When working with a writer document with TabOverMargin set to true the text written after a tab beyond the right margin breaks line to soon (meaning the text before the tab does not reach the right margin yet).

Steps to Reproduce:
1.Open a new writer document and make sure the setting TabOverMargin is set to true (for instance save it as fodt change the setting)
2.Set for instance the following indents:
Before text: 1.00"
After text: 1.69" (in the case that the default documents right margin is 6.69", otherwise choose a value such that on the ruler we get the indent exactly at position 5.00")
First line: -1.00"
3.Create a right tab at position 6.00” (so 1.00" after the indent after the text)
4.Write some text: ’1)’  + TAB KEY + ‘Lorem ipsum dolor sit amet’ + TAB KEY + ’consectetur’ (works as intended, everything is on one line) 
5. Extend the text ‘Lorem ipsum dolor sit amet’ to something longer until the line breaks (does not work as intended, the text ‘consectetur’ is on the second line)


Actual Results:  
The line breaks before the indent after the text was surpassed. This happens approximately X inches to early, where X is the length of the text written after the final TAB KEY press (in case of the example from "Steps to Reproduce")

Expected Results:
As long as the right margin specified by the indent after text is not reached the line should not break. 


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Comment 1 sh 2018-04-26 09:17:07 UTC
Created attachment 141644 [details]
Example file with 3 cases

Attached you can find a sample file which shows the behaviour in 3 different cases. 
The case 1) is on one line as intended. The cases 2) + 3) are on two lines which should not happen as the right margin at 5.00" was not reached.
Comment 2 Miklos Vajna 2018-04-26 10:14:05 UTC
Confirmed. The TabOverMargin sw layout compat flag is meant to let Writer handle tabs over margins the same way as Word, so in that mode it's valid to expect that we also have a layout for 3 lines only.
Comment 3 Miklos Vajna 2018-04-27 10:35:17 UTC
I plan to take a look at this.
Comment 4 Commit Notification 2018-05-04 17:07:42 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#117245 editeng: cover tab stop items for sw doc model xml ...

It will be available in 6.1.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.
Comment 5 Commit Notification 2018-05-11 07:04:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7758d6609da2c1df978818823f6f9856b99dcefc

tdf#117245 sw layout: extend TabOverMargin compat mode

It will be available in 6.1.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.