Bug 49076 - EDITING: OS Clipboard content includes list counter after selecting part of a numbered list item (word in text line)
Summary: EDITING: OS Clipboard content includes list counter after selecting part of a...
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All other
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.1.0
Keywords:
: 56794 56926 63901 (view as bug list)
Depends on:
Blocks: Clipboard
  Show dependency treegraph
 
Reported: 2012-04-23 04:42 UTC by qqqqqqqqq9
Modified: 2023-10-01 13:26 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Sample (8.76 KB, application/vnd.oasis.opendocument.text)
2013-04-15 06:54 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description qqqqqqqqq9 2012-04-23 04:42:33 UTC
Problem description: 
Wenn selecting text in a list, the leading number is added faultily

Steps to reproduce:
1. obtain a list e.g. 1. bla bla blub bla
2. select some text e.g. 1. bla <bla blub bla>
3. Paste somewhere with mouse button 2

Current behavior:

1. bla blub bla 
is pasted (including the number)
Expected behavior:
bla blub bla
should be pasted.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.2 Safari/534.34
Comment 1 Jaime Navarro 2012-04-24 01:37:43 UTC
[Not Reproduced] with "LibreOffice 3.5.2 - Debian 6.0.4 i386 English UI"

Only appear the number when you copy the whole sentence:
e.g: 1.< aaa bbb ccc >

The number does not appear to copy in all other cases.
e.g: 1. aaa <bbb ccc >
e.g: 1.<aaa bbb> ccc
Comment 2 qqqqqqqqq9 2012-04-24 01:56:04 UTC
Hi,

No, the number is always included, regardless whether i copy the whole line or part of it.
However i consider it wrong to include the number in either case because it's part of the formatting and not the content.
Comment 3 qqqqqqqqq9 2012-04-24 02:00:08 UTC
Perhaps i did not state clearly, the i format the text as list. 
   1. fgrecztr
   2. trcztrdtz
   3. trcertz
Comment 4 Nino 2012-04-25 08:54:06 UTC
[Reproduced] Seems like clipoard content includes the list number.

Steps: 
1) Create numbered list in a text document
2) Select part of the sentence or even part of a word 
3) Paste it by Middle Click into an *editor* window (but not back into a writer document as here the effect does not show - but see below) OR
4) Paste Special as Unformatted Text into an empty paragraph in Writer OR
5) simply look at the clipboard content (e.g. by pressing the clipboard viewer icon in the sys tray or how it's called in Linux)

BTW, the same happens if using Ctrl+C, Ctrl+V.

Intended behavior or bug?
Comment 5 Nino 2012-04-25 08:58:35 UTC
adjusted Summary
Comment 6 Nino 2012-04-25 09:00:53 UTC
Mouse not needed: the effect is also present if the selection is made with cursor (or shift-cursor) only.
Comment 7 Nino 2012-04-25 09:02:02 UTC
adding Rainer to cc as I can not estimate importance/severity
Comment 8 Harald Koester 2012-08-01 14:25:57 UTC
(In reply to comment #4)
> [Reproduced] Seems like clipboard content includes the list number.
I agree.

> 1) Create numbered list in a text document
Instead you can also use a numbered heading. The behaviour is equal. If you copy a part of a heading to an editing area of another application, the heading number is also inserted.

> 4) Paste Special as Unformatted Text into an empty paragraph in Writer OR
This should be a duplicate of bug 36322.

> Intended behavior or bug?
My Opinion: Bug!
Comment 9 manj_k 2013-02-12 14:03:00 UTC
*** Bug 56926 has been marked as a duplicate of this bug. ***
Comment 10 Marco Menardi 2013-03-19 16:40:44 UTC
Still present in 4.0.0.3, really annoying and looks old and trivial to fix.
Comment 11 Owen Genat (retired) 2013-04-14 08:31:14 UTC
*** Bug 56794 has been marked as a duplicate of this bug. ***
Comment 12 grofaty 2013-04-15 05:24:26 UTC
I have been pointed here from Bug 56794 as of being duplicate. Retested on current bug report in Comment_4 and I can confirm this is the same bug. Because "my" bug was reported as x86(IA32) and this one is X86-64(AMD64), I am marking current bug as Platform=All.
Comment 13 grofaty 2013-04-15 05:25:39 UTC
... test done on  LibreOffice v4.0.2.2 on Windows XP sp3.
Comment 14 Rainer Bielefeld Retired 2013-04-15 06:54:47 UTC
Created attachment 77976 [details]
Simple Sample

Nino's observation already [Reproducible] with attached Simple Sample and Server Installation of "LibreOffice 3.3.3  English UI/ German Locale [OOO330m19 (Build:301) tag libreoffice-3.3.3.1] on German WIN7 Home Premium (64bit) :

1. Open document from File Dialog in LibO Start Center
2. in First line select "aaa" by double click
3. <control+c> for 'Copy'
4. Open EditPad Lite or simlar plain text editor
5. <control+v> for 'Paste'
   Expected: "aaa" pasted
   Actual: "1. aaa" pasted, what ignores leading "aa", but adds list number

It might be correct that the list number is in the LibO clipboard, might be useful somewhere in LibO (and I currently do not see problems). But I doubt that the observed behavior can be useful for partial sentence copy/paste to other applications.

I see expected behavior in OOo until OOo 3.1.1, but unexpected one already with OOo 3.4.0.. So this problem is inherited from OOo

(In reply to comment #12)
Thank you for additional research. But platform hardware setting will be ignored here, because 99,99% of bugs here are platform hardware independent (64bit processor has nothing to do with 64bit OS)

@all
Please attach a sample document instead of the complicated descriptions
Comment 15 Rainer Bielefeld Retired 2013-04-15 07:36:39 UTC
Modified Version due to results.
OS = All due to results, also in Bug 56794

@All:
If you see some misbehavior for copy/paste within LibO please submit a separate Bug, may be with a link to this one.

@Michael:
Please change  Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug or forward the Bug if it's not your turf
Comment 16 Michael Stahl (allotropia) 2013-04-23 13:57:28 UTC
copying the list or outline number in plain text to the clipboard
is a feature, not a bug... see OOo issue 111677 (which incidentally
was my personal most annoying bug in OOo 3.2... having to insert
numbering like "19.753.1" manually before every heading copied
to the mail client is quite annoying).

but in the case where the start of the paragraph is not selected,
i agree that the number should not be copied.
this should be fixed on master now.

ideally Writer would allow to select the numbering with the cursor
so the user can decide if the numbering should be copied,
but that is not possible without very significant changes.
Comment 17 Commit Notification 2013-04-23 14:00:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#49076: copy numbering to clipboard only if start of para selected



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.
Comment 18 Brenda Granados 2013-04-27 12:10:02 UTC
*** Bug 63901 has been marked as a duplicate of this bug. ***
Comment 19 walttheboss 2016-02-08 05:45:49 UTC
This is marked as resolved.  However it still occurs and I have no workaround. 

Kubuntu 14.04.3 and LibreOffice Writer Version: 5.0.4.2

If I paste from a list it comes in with the number/bullet.
Comment 20 Shantanu 2021-05-31 14:16:57 UTC
If I select a single line, then it works as expected. But when I select more than one line and copy text, it comes in with numbers even while pasting using "Paste special" - "unformatted text".