Bug 118666 - Headings are indented when pasting as unformatted text
Summary: Headings are indented when pasting as unformatted text
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: low minor
Assignee: Matt K
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack
Depends on:
Blocks: Paste-Special-Unformatted
  Show dependency treegraph
 
Reported: 2018-07-10 14:22 UTC by Telesto
Modified: 2023-07-14 00:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.58 KB, application/vnd.oasis.opendocument.text)
2018-07-10 14:24 UTC, Telesto
Details
Bibisect log (2.92 KB, text/plain)
2018-07-10 15:04 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-07-10 14:22:28 UTC
Description:
Headings are indented when pasting as unformatted text 

Steps to Reproduce:
1. Open the attached file
2. Select all
3. Open a New Writer Document
4. CTRL+SHIFT+V -> Paste as Unformatted text

Actual Results:
Indented at every heading

Expected Results:
Plain text (with the same look as source)


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 6.2.0.0.alpha0+
Build ID: bb1d5780226bb1b9156580972eea9aa849178742
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-07-03_05:56:48
Locale: nl-NL (nl_NL); Calc: CL

but not in
Version: 5.3.1.0.0+
Build ID: aa09fd58bd499a2a2c3a32c5f613892bad54076c
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; Layout Engine: new; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Telesto 2018-07-10 14:24:18 UTC
Created attachment 143425 [details]
Example file
Comment 2 Telesto 2018-07-10 15:04:16 UTC
Created attachment 143428 [details]
Bibisect log

Bisected to
author	Jan Holesovsky <kendy@collabora.com>	2017-05-05 15:02:20 +0200
committer	Jan Holesovsky <kendy@collabora.com>	2017-05-10 17:19:32 +0200
commit 0425ccba5b2f8819d6fade05d96a72d64db1ce0c (patch)
tree 913c002c45518c4a5c248293a00d1a46f002f5bf
parent 58891d589bd8da700f135b098dd50833277c65dc (diff)
sw txt export: Greatly improve the export of bullets & numbering.
Includes unit testing infrastructure for .txt export too + the actual unit
test.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0425ccba5b2f8819d6fade05d96a72d64db1ce0c
Comment 3 Dieter 2018-07-10 16:21:47 UTC
I confirm it with

Version: 6.0.5.2 (x64)
Build-ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 4 Telesto 2018-07-10 16:36:01 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-07-11 02:54:20 UTC Comment hidden (obsolete)
Comment 6 Timur 2019-09-06 12:38:19 UTC Comment hidden (obsolete)
Comment 7 Timur 2020-03-11 13:57:41 UTC
Repro 7.0+. Jan, please take a look at this regression.
Comment 8 Jan Holesovsky 2020-03-11 15:59:55 UTC
Technically it's not a regression, but a not implemented feature :-)

The headings in the example doc are actually numberings at the 4th level, with indentation 0cm; the new bullet list text exporter does not honor this.

This could be an easy hack for somebody; see

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0425ccba5b2f8819d6fade05d96a72d64db1ce0c

and check how the code below "indent each numbering level by 4 spaces" comment.

This could be amended to use something appropriate based on the indentation, probably rNd.GetLeftMarginWithNum()...
Comment 9 Dieter 2022-03-17 10:10:31 UTC
Still present in

Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 10 Matt K 2023-07-14 00:30:25 UTC
Fix tracked in https://gerrit.libreoffice.org/c/core/+/154406.  Added Jan to review.