Bug 102505 - Pasted text incorrectly not retaining original copied formatting
Summary: Pasted text incorrectly not retaining original copied formatting
Status: RESOLVED DUPLICATE of bug 105352
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: 2020-03-11 14:27 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 Comment hidden (obsolete)
Comment 14 Timur 2020-03-11 14:27:59 UTC
(In reply to Joel Madero from comment #0)
> Created attachment 127615 [details]
> 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.
Test 7.0+. 4-6 are all Text Body. 
 
> Expected: Everything is just like the original copy
Green because bug 105352

*** This bug has been marked as a duplicate of bug 105352 ***