Bug 95846 - UI: Ruler does not honor TabsRelativeToIndent document setting
Summary: UI: Ruler does not honor TabsRelativeToIndent document setting
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:5.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-16 09:34 UTC by Mike Kaganski
Modified: 2018-10-14 18:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT with a table with TabsRelativeToIndent set to false (8.96 KB, application/vnd.oasis.opendocument.text)
2015-11-16 09:34 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2015-11-16 09:34:04 UTC
Created attachment 120568 [details]
ODT with a table with TabsRelativeToIndent set to false

If a document has TabsRelativeToIndent set to false, horizontal ruler shows tab positions incorrectly. One cannot set tabs with mouse, because the tab position on page is shifted by current indent.

To reproduce, open the attached file (that is simply new Writer document with one two-cell table, and its settings.xml modified to change TabsRelativeToIndent to false), put cursor to cell B1, and see that the tab on the ruler there is shifted. Try to put new tab stops using ruler and use "ctrl+tab" to insert tabs to see their actual placement.

This is actual problem, because DOCX importer sets TabsRelativeToIndent to false (see writerfilter/source/dmapper/DomainMapper.cxx, DomainMapper::DomainMapper()). It is so since https://bz.apache.org/ooo/show_bug.cgi?id=24363. So, any use of DOCX for document exchange results in such problem:

1. Create an empty Writer document
2. Add a table
3. Put caret in second column
4. Set a tab stop using ruler, insert tab (see that everything is OK)
5. Save as DOCX and reopen.

This will make the described behaviour.

Inherited from OOo, tested with OOo 3.3.0, AOO 4.1.2, LO 5.0.3.2 x64.
Comment 1 Buovjaga 2015-11-16 17:45:21 UTC
Repro with attachment.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: b216cc1b8096eb60c27f67e8c27b7cd756c75e38
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-11-12_00:06:20
Locale: fi-FI (fi_FI)
Comment 2 Mike Kaganski 2015-12-17 11:49:41 UTC
Proposed a patch to gerrit:
https://gerrit.libreoffice.org/20762
Comment 3 Commit Notification 2015-12-21 07:31:12 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#95846: fix not-relative-to-indent tab stop positions

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