Bug Hunting Session
Bug 85855 - Copying of Numbered Paragraphs and Headers Should be Possible with and without Numbers
Summary: Copying of Numbered Paragraphs and Headers Should be Possible with and withou...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cut-Copy
  Show dependency treegraph
 
Reported: 2014-11-04 12:02 UTC by Harald Koester
Modified: 2018-01-26 18:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2014-11-04 12:02:46 UTC
Problem description: 

If you like to copy a numbered heading or a numbered paragraph to another application, e. g. into the subject field of your mail program, the number will also be copied. You have to delete it manually there!!! On the other hand there may be use cases, where it is useful to insert a heading or a paragraph together with the leading number.


Expected behavior:

In order to improve this situation it should be possible to copy a heading/paragraph with or without the leading number. This is currently not possible because you can't select a heading/paragraph without the number and then copy it to the clipboard. This selection is also irritating because the 'selected' number is not highlighted. Hence the solution for this problem is the possibility to select a numbered paragraph/heading with or without the number.

See also bug 49076 and bug 36322.
Comment 1 Robinson Tryon (qubit) 2014-12-22 03:40:36 UTC
UX: Give us your sage advice here ;-)
Comment 2 Robinson Tryon (qubit) 2016-08-25 05:49:19 UTC Comment hidden (obsolete)
Comment 3 Heiko Tietze 2017-03-07 15:03:47 UTC
I wouldn't recommend to have two variants of the copy function, rather we decide on paste whether the number is taken or not depending on with formatting or insert as plain text. 

But taking bug 36322 comment 6 as blueprint: the number is intentionally copied, so it's NAB. As you said there are use cases where the number is of interest, for instance when you copy a headline within the same document.
Comment 4 Harald Koester 2018-01-09 20:48:01 UTC
(In reply to Heiko Tietze from comment #3)
> I wouldn't recommend to have two variants of the copy function, rather we
> decide on paste whether the number is taken or not depending on with
> formatting or insert as plain text. 

I did not expect two copy variants. What I proposed is the possibility to select a numbered heading/paragraph with and without the number. Then as a consequence it would be possible to copy the heading also without the number. Currently I always have to delete the number in the destination app.
Comment 5 Heiko Tietze 2018-01-10 10:35:19 UTC
(In reply to Harald Koester from comment #4)
> I did not expect two copy variants. What I proposed is the possibility to
> select a numbered heading/paragraph with and without the number.

The number of a heading is a property of the style and thereby not selectable. You also cannot copy a bold text without its font weight.
Comment 6 Buovjaga 2018-01-14 14:39:05 UTC
Funny: when I copy a numbered paragraph and paste it to a plain-text editor, I don't get the number.

Steps are just
1. Type some gibberish
2. Turn on numbered list (F12)
3. Copy the whole paragraph
4. Paste to a plain-text editor

Harald: do you get the number with these same steps?

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: ef22c4a0a99be5d2903fb9e9d09fc852cd791173
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on January 12th 2018
Comment 7 Harald Koester 2018-01-25 15:40:18 UTC
(In reply to Buovjaga from comment #6)
> Funny: when I copy a numbered paragraph and paste it to a plain-text editor,
> I don't get the number.
> 
> Steps are just
> 1. Type some gibberish
> 2. Turn on numbered list (F12)
> 3. Copy the whole paragraph
> 4. Paste to a plain-text editor
> 
> Harald: do you get the number with these same steps?

I checked this again with versions 5.4.4 and 6.0.0.2 (64 bit, Win10). The behaviour is different. With version 5.4.4 the leading number is copied, with version 6.0.0.2 the number is not copied. To my opinion the solution of version 6.0.0.2 is better because only what is marked is also copied. 

Version 6.0.0.2: If you like to copy a string with the leading number you have to select also the paragraph end character of the former paragraph. In this case the selected text together with the end character is copied. A copy with the leading number and without the end character is not possible.
Comment 8 Buovjaga 2018-01-25 16:04:40 UTC
Ok, good to hear that you are happy. Let's close as WFM, then.
Comment 9 Harald Koester 2018-01-26 18:23:46 UTC
(In reply to Buovjaga from comment #8)
> Ok, good to hear that you are happy. Let's close as WFM, then.

Only 80 % happy, because selecting with numbers and without paragraph end character of previous paragraph is not possible. I think let's wait, if there are complaints respective this function with version 6.x.x.