Bug 102505 - Pasted text incorrectly not retaining original copied formatting
Summary: Pasted text incorrectly not retaining original copied formatting
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: Paste
  Show dependency treegraph
 
Reported: 2016-09-25 03:37 UTC by Joel Madero
Modified: 2019-12-03 13:53 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
style Demonstration (10.57 KB, application/vnd.oasis.opendocument.text)
2016-09-25 03:37 UTC, Joel Madero
Details
result of pasting 1-3 below Test 3 and clearing formatting etc. (51.16 KB, image/png)
2016-09-25 21:55 UTC, Cor Nouws
Details
result from test in daily 20160924 (12.58 KB, application/vnd.oasis.opendocument.text)
2016-09-25 21:57 UTC, Cor Nouws
Details
screencast (4.11 MB, video/webm)
2016-09-26 22:19 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Madero 2016-09-25 03:37:44 UTC
Created attachment 127615 [details]
style Demonstration

Bodhi Linux
LibreOffice 5.2.0.4

Steps:
1. Open attachment;
2. Copy the first set of numbered items from 1 - 3
3. Paste below Test3

Observed: you get a numbered list from 4 - 6, 4 & 5 have one style, 6 gets part of a different style. 4 & 5 are "text body" entirely, 6 is "default style" which is the same as Test3 but font size is not the same.

Expected: Everything is just like the original copy
Comment 1 m.a.riosv 2016-09-25 12:10:17 UTC
Hi @Joel, there is an option to 'Restart at this paragraph' that it's no enable on the paragraph below "Test1", but it's enable on the paragraph below "Test2".
That option is also available on the context menu.

Copying from the first group of numbered paragraphs happens what you comment but not copying from the second group under 'Test2'

Resolved as not a bug, please if you are not agree reopen it.
Comment 2 Joel Madero 2016-09-25 14:56:23 UTC
I'm not sure how that explains the inconsistent behavior where two lines show up as one style and the third line shows up as a different style. I'm going to test MSO to see what behavior it has
Comment 3 Joel Madero 2016-09-25 15:01:20 UTC
Microsoft Office pastes as expected. The numbers are 4-6 on the paste and all are identical style to the previous styles for the numbered lists (i.e., matches the copy entirely)
Comment 4 m.a.riosv 2016-09-25 16:10:22 UTC
Sorry @Joel my mistake reading you comment.

I think the issue is that' needed to copy the end of paragraph to avoid that the last paragraph mix with the paragraph where it's pasted.

Copying with the end of paragraph included works as expected.
Comment 5 Yousuf Philips (jay) (retired) 2016-09-25 20:19:27 UTC
So there are two issues i see here

1. should pasting number lists reset the number back to one. This is a UX decision to make and i would be for resetting it to one.

2. direct formatting applied to the paragraph that is being pasted to is being applied to the last entry of the list. This is a bug to me and appears if you dont copy the crlf (aka \r\n) at the end of the numbered item 3.
Comment 6 m.a.riosv 2016-09-25 21:17:56 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> So there are two issues i see here
> 
> 1. should pasting number lists reset the number back to one. This is a UX
> decision to make and i would be for resetting it to one.

I can't see change a paragraph format without ask the user, introducing a direct format.
And I'm not sure this specific case is the usual, maybe more usual paste to have new paragraphs included in a list.

> 
> 2. direct formatting applied to the paragraph that is being pasted to is
> being applied to the last entry of the list. This is a bug to me and appears
> if you dont copy the crlf (aka \r\n) at the end of the numbered item 3.

What paragraph style must be when pasting part of a paragraph in another?, I think only direct format is carried with the pasted text and for the pasted text.

Perhaps the issue is more about select easily with the crlf included to copy. Now you need to go with mouse to the beginning of the next line.
Comment 7 Cor Nouws 2016-09-25 21:53:40 UTC
this is not a ' style' test, but a direct formatting test ;)

I copied 1-3 and pasted below test3 .. formatting remains the same. Will attach screen print.
I selected Test1-Test2  and hit Ctrl+M  and see the real styles.
Comment 8 Cor Nouws 2016-09-25 21:55:01 UTC
Created attachment 127632 [details]
result of pasting 1-3 below Test 3 and clearing formatting etc.
Comment 9 Cor Nouws 2016-09-25 21:57:03 UTC
Created attachment 127633 [details]
result from test in daily 20160924
Comment 10 Yousuf Philips (jay) (retired) 2016-09-26 22:11:48 UTC
(In reply to m.a.riosv from comment #6)
> I can't see change a paragraph format without ask the user, introducing a
> direct format.
> And I'm not sure this specific case is the usual, maybe more usual paste to
> have new paragraphs included in a list.

If a user copied list entries 1, 2 and 3, it wouldnt make sense that it pasted 4, 5, and 6 unless it was being pasted below entry 3. Also when it pastes 4, 5, and 6, it isnt even linked to the entries that are copied, so that if you added a 4th entry under Test1, it would increment the pasted ones. You can see that pasting as unformatted text does it the right way.

> What paragraph style must be when pasting part of a paragraph in another?, I
> think only direct format is carried with the pasted text and for the pasted
> text.

If i paste unformatted text, it should use the style already set at the pasted position, but when i paste with formatting, html format or rtf, it should be exactly like what i've copied.

> Perhaps the issue is more about select easily with the crlf included to
> copy. Now you need to go with mouse to the beginning of the next line.

You can see if i paste with html format and havent copied the crlf, the 3rd entry is fine, but it messes up the first entry, so not copying the crlf isnt the issue. If i paste with rtf and havent copied the crlf, it messes up the first and third entries.
Comment 11 Yousuf Philips (jay) (retired) 2016-09-26 22:19:02 UTC
Created attachment 127651 [details]
screencast

Shows the behaviour of pasting formatted text, html, and rtf with and without the crlf.
Comment 12 Xisco Faulí 2017-09-29 08:53:14 UTC Comment hidden (obsolete)
Comment 13 QA Administrators 2019-12-03 13:53:01 UTC
Dear Joel Madero,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug