Bug 109285 - Converting tabbed text to bullets adds extra tabs
Summary: Converting tabbed text to bullets adds extra tabs
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Justin L
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: Bullet-Number-Outline-Lists Writer-Tables-Select
  Show dependency treegraph
 
Reported: 2017-07-23 13:07 UTC by internationils
Modified: 2022-08-25 19:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (9.01 KB, image/png)
2017-08-14 19:01 UTC, Buovjaga
Details
Example file to play with (8.20 KB, application/vnd.oasis.opendocument.text)
2017-08-14 19:01 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description internationils 2017-07-23 13:07:05 UTC
Description:
Converting tabbed text to bullets loses the tab in the last line

Steps to Reproduce:
1. create 3 lines of "<tab>hello"
2. highlight the three lines (excluding the EOL of the third line)
3. click on the bullet button

Actual Results:  
Last bulleted line loses the preceding tab

Expected Results:
Last line should preserve the preceding tab


Reproducible: Always

User Profile Reset: No

Additional Info:
Selecting the EOL in the last line (or ctrl-a) and then bulleting preserves the tab.

Seen in:
Version: 5.2.7.2
Build ID: 1:5.2.7-1
CPU Threads: 2; OS Version: Linux 4.9;

Version: 5.4.0.2 (x64)
Build-ID: 2b906d450a44f2bbe506dcd22c51b3fa11dc65fd
CPU-Threads: 4; Betriebssystem:Windows 6.1


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 internationils 2017-07-25 06:42:47 UTC
Also (not sure if this is part of the same bug, or a separate one):
- create a line with <tab><tab>hello
- bullet it (tab gets eaten)
- unbullet it (text is left-margin aligned)
- re-bullet it (bullet is in a different position, close to the left margin)

Doing the same thing with only one leading tab also shows the alignment difference (but not the tab being eaten)
Comment 2 Buovjaga 2017-08-14 19:01:24 UTC
Created attachment 135550 [details]
Screenshot

It does not lose the tab, but creates extra tabs for bullets depending on the direction of the selection.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: a7ed6a9731f0101fe1454638135bb30f5dcb4f88
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 14th 2017
Comment 3 Buovjaga 2017-08-14 19:01:50 UTC
Created attachment 135551 [details]
Example file to play with
Comment 4 Buovjaga 2017-08-14 19:02:44 UTC
Already in 3.3

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 5 QA Administrators 2018-08-15 02:33:15 UTC Comment hidden (obsolete)
Comment 6 internationils 2018-08-31 06:35:30 UTC
Confirmed still present in 
Version: 6.0.3.2
Build ID: 1:6.0.3-0ubuntu1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 7 QA Administrators 2019-09-02 09:26:22 UTC Comment hidden (obsolete)
Comment 8 internationils 2019-10-01 12:40:39 UTC
Still present

Version: 6.2.7.1
Build ID: 1:6.2.7-0ubuntu0.19.04.1
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 9 internationils 2020-06-16 08:32:00 UTC
Still present in
Version: 6.4.3.2
Build ID: 1:6.4.3-0ubuntu0.20.04.1
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: kf5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 10 Justin L 2021-05-06 09:00:47 UTC
repro 7.2+
Comment 11 Justin L 2022-08-25 00:08:05 UTC
This is from sw/source/uibase/wrtsh/wrtsh1.cxx's SwWrtShell::NumOrBulletOn calling RemoveLeadingWhiteSpace().

author	Kurt Zenkeron 2005-01-21 09:44:26 +0000 with
commit c84f75834b94a98380494fc0855cd8cc0df235a1
changed RemoveLeadingChars to RemoveLeadingWhiteSpace.

This was a slight change to author Rüdiger Timm on 2004-10-22 07:15:19 +0000
commit 651e60f73a677844de3f87055c07093a1d59ea5a
#i30314# convert tabs to numindent


So the OOo bug deliberately removed all leading whitespace, and this bug report seems to expect the same thing (wondering why tabs were "added"). So the most reasonable fix seems to be that each paragraph in the selection should RemoveLeadingWhiteSpace.
Comment 12 Commit Notification 2022-08-25 19:05:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3e3328987b69a2a549d24c79ee71b353b9a3e288

tdf#109285 sw numbering: RemoveLeadingWhiteSpace from all paras

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