Bug 137591 - Don't ignore outlinelevelN RTF attribute when pasting from clipboard
Summary: Don't ignore outlinelevelN RTF attribute when pasting from clipboard
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTF File-Send
  Show dependency treegraph
 
Reported: 2020-10-19 11:45 UTC by sdc.blanco
Modified: 2022-12-19 15:29 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Instructions and text document for demonstrating problem (18.14 KB, application/vnd.oasis.opendocument.text)
2020-10-19 11:45 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2020-10-19 11:45:55 UTC
Created attachment 166503 [details]
Instructions and text document for demonstrating problem

File > Send > Outline to Clipboard  and  Navigator - Headings - (context menu) - Send Outline to Clipboard 

Both use the same function, inherited from OOo
https://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/rtfexport.cxx?r=7c70a59c#1023

Attached document gives test document, with instructions.  Basically, the idea is to use that function to copy and paste an outline.  The test document and STR should help you to see that "Outline Level" information is lost when pasting to another document.

Given that there is no documentation on this point, then you can decide whether this is a bug or an enhancement.
Comment 1 Mike Kaganski 2020-10-19 12:29:16 UTC
In fact, clipboard RTF is all affected by that, not only when using Outline to Clipboard function.

Select All -> Ctrl+C -> in a new document, use Paste Special to choose RTF.

OTOH, saving the document as RTF and re-opening keeps the outline level -> there is a way to store necessary information in the RTF.
Comment 2 Mike Kaganski 2020-10-19 13:02:17 UTC
The data copied to clipboard has outlinelevelN attribute. It is ignored when pasting. The same happens if pasting RTF copied from, e.g., Word.
Comment 3 QA Administrators 2022-10-20 03:44:26 UTC Comment hidden (obsolete)
Comment 4 sdc.blanco 2022-12-19 15:12:10 UTC
worksforme with:

Version: 7.2.7.2 (x64) / LibreOffice Community
Build ID: 8d71d29d553c0f7dcbfa38fbfda25ee34cce99a2
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL

(that is:  pasted headings in a new document has same outline level plus an added list level)

but repro with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 98f0dd5e15733ac7f1d929d06ab230b5f04121d5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL threaded

(that is:  pasted headings in a new document have outline level: Text Body)
Comment 5 sdc.blanco 2022-12-19 15:29:27 UTC
Additional issue.

1.  Open Tools>Chapter Numbering
2.  Change Level 3 Paragraph Style to "Heading 1", Level 7 Paragraph Style to "Heading 3", and Level 1 Paragraph Style to "Heading 7"
3.  Make three lines with, respectively, Heading 1, Heading 2, Heading 3
3.  Export to Outline to Clipboard.
4.  Open new document and paste clipboard.


For 7.2.7.2

Outline levels for the headings pasted from clipboard are the same as the added list level.

For 7.6.0.0

The added list level corresponds to the outline levels entered in Tools>Chapter Numbering information is retained, but all outline levels are lost (i.e., text body)

Not sure what expected behavior should be, but the actual behavior for 7.2.7.2 and 7.6.0.0 does not seem right.