Bug 104945 - Problems copying two different list styles - both added to same existing list on paste (comment 9)
Summary: Problems copying two different list styles - both added to same existing list...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 64828 (view as bug list)
Depends on:
Blocks: Bullet-Number-Outline-Lists
  Show dependency treegraph
 
Reported: 2016-12-27 18:06 UTC by Ganton
Modified: 2023-06-22 18:21 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
The forementioned sample document (the examination template) (46.00 KB, application/msword)
2016-12-27 18:08 UTC, Ganton
Details
The expected result (12.40 KB, image/png)
2016-12-27 19:21 UTC, Ganton
Details
The obtained result (11.06 KB, image/png)
2016-12-27 19:21 UTC, Ganton
Details
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question) (10.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-05-03 16:00 UTC, Ganton
Details
In the second case: the expected result (16.87 KB, image/png)
2017-05-03 16:01 UTC, Ganton
Details
In the second case: the obtained result (20.83 KB, image/png)
2017-05-03 16:02 UTC, Ganton
Details
The forementioned sample document (the examination template) - ODT version (15.75 KB, application/vnd.oasis.opendocument.text)
2021-05-07 18:27 UTC, Ganton
Details
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question) - ODT version (18.92 KB, application/vnd.oasis.opendocument.text)
2021-05-07 18:28 UTC, Ganton
Details
The forementioned sample document (the examination template) - similar ODT though built from zero (10.80 KB, application/vnd.oasis.opendocument.text)
2021-05-07 19:58 UTC, Ganton
Details
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question) - similar ODT though built from zero (11.82 KB, application/vnd.oasis.opendocument.text)
2021-05-07 19:59 UTC, Ganton
Details
104945_testScenarios.odt: the document I was testing my patch on. (14.56 KB, application/vnd.oasis.opendocument.text)
2021-05-08 15:33 UTC, Justin L
Details
104945_patch.diff: the patch which I don't dare to submit (3.23 KB, patch)
2021-06-21 09:14 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ganton 2016-12-27 18:06:13 UTC
Description:
Hi!

A sample of a document (for an examination) is attached, that document already has two questions. If you use Word you can "copy" the first question and insert it between the first and the second ones. 

However, if you try to do the same using Libreoffice Writer: the result is unexpected and you have to make too many changes to the "pasted" question; you can't even "clone formatting" to try to solve the problem intuitively.

I'm sure that this problem will happen in other cases.

Thanks for Writer!

Steps to Reproduce:
1. Open the attached document.
2. The attached document already has two questions. You can try "copying" the first question and insert it between the first and the second ones. 


Actual Results:  
The pasted question (and its possible answers) have a wrong format.

Expected Results:
The pasted question (and its possible answers) should have the same format as it had.


Reproducible: Always

User Profile Reset: Yes

Additional Info:


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 Ganton 2016-12-27 18:08:02 UTC
Created attachment 129967 [details]
The forementioned sample document (the examination template)
Comment 2 Ganton 2016-12-27 18:09:34 UTC
About the actual results:  
    The pasted question (and its possible answers) have a wrong format.
and also
    Users can't even "clone formatting" to try to solve the problem intuitively.
Comment 3 Ganton 2016-12-27 19:21:14 UTC
Created attachment 129969 [details]
The expected result
Comment 4 Ganton 2016-12-27 19:21:58 UTC
Created attachment 129970 [details]
The obtained result

Also, users can't even "clone formatting" to try to solve the problem intuitively.
Comment 5 Julien Nabet 2016-12-27 20:35:23 UTC
On pc Debian x86-64 with LO Debian package 5.2.4, I don't reproduce this if I select from "1. Which" line to the line after g) included, copy it and paste it in this same line.
Comment 6 Regina Henschel 2016-12-27 21:49:11 UTC
It depends on which part is marked for copying. From end of line before "1. Which [...]" to end of line "g) [...]" works. From immediately before "Which" to line after ""g) [...]" works too. But from immediately before "Which" to end of line "g) [...]" does not work.

BTW, is it intended, that 1. 2. …  is a different list than a) b) c) …?
Comment 7 Ganton 2016-12-28 10:15:09 UTC
 > BTW, is it intended, that 1. 2. …  is a different list than a) b) c) …?
            
Let's say that in an examination you can have 10 questions [1. 2. 3. 4. …  ] and question 1 can have several options [ a) b) c) ], question 2 can have its options [ a) b) c) ] [not d) e) f) ], question 3 has its options [ a) b) c) ], etc.
Comment 8 Ganton 2016-12-28 10:18:51 UTC
Thanks, Julien and Regina.

So one key is the "to the line after g) included" specification that Julien wrote, if we do exactly that... then the problem doesn't appear :-)

The problem appears e.g. if (before copying) the user selects until the end of the line that starts with the g), but not selecting until the next line (the one that is empty); later, after pasting: "clone formatting" doesn't solve the problem, etc. Somehow Word works correctly doing that, but not Writer (our preferred :-)). 

Anyway, something like workarounds were written by Julien and Regina! Even when this problem is not still solved, and users see it, at least people can work meanwhile :-)
Comment 9 Ganton 2017-05-03 16:00:57 UTC
Created attachment 133039 [details]
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question)

There's a related case, I attach an example. When using a document for creating examinations... there are important problems when inserting questions (for example copying a question to the place between the second and the third question). None of the workarounds described previously seems to work. I'll attach some screenshots.

However, Word is able to do that as it was expected (although it's not free/libre software :-) so it's not really comparable ).
    
Thanks!
Comment 10 Ganton 2017-05-03 16:01:55 UTC
Created attachment 133040 [details]
In the second case: the expected result
Comment 11 Ganton 2017-05-03 16:02:29 UTC
Created attachment 133041 [details]
In the second case: the obtained result
Comment 12 Buovjaga 2017-08-15 09:48:59 UTC
(In reply to Ganton from comment #8)
> Thanks, Julien and Regina.
> 
> So one key is the "to the line after g) included" specification that Julien
> wrote, if we do exactly that... then the problem doesn't appear :-)

The problem that the selectables in the new second question start with h) is something that I cannot work around no matter how I copy&paste.

Yet, this can be fixed by right-click the list and selecting Restart numbering. Then they start with a).

Regarding the second case in comment 9, I think it would be good ask in https://ask.libreoffice.org/en/questions/
I'm not a guru with lists, so I don't have an insight of a best practice.

Win 7 Pro 64-bit Version: 6.0.0.0.alpha0+ (x64)
Build ID: bec5a2ac82b5178f6e765494c2003febe8ab51da
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-08-12_23:35:00
Locale: fi-FI (fi_FI); Calc: CL
Comment 13 Jonathan Fisher 2018-05-13 19:05:01 UTC
Thank you for reporting the bug. I can confirm that the bug is present in:

Version: 6.0.4.2 (x64)
Build ID: 9b0d9b32d5dcda91d2f1a96dc04c645c450872bf
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: en-US (en_US); Calc: CL
Comment 14 Xisco Faulí 2018-05-30 14:40:14 UTC
(In reply to Buovjaga from comment #12)
> (In reply to Ganton from comment #8)
> > Thanks, Julien and Regina.
> > 
> > So one key is the "to the line after g) included" specification that Julien
> > wrote, if we do exactly that... then the problem doesn't appear :-)
> 
> The problem that the selectables in the new second question start with h) is
> something that I cannot work around no matter how I copy&paste.
> 
> Yet, this can be fixed by right-click the list and selecting Restart
> numbering. Then they start with a).

I'm wondering, is it the expected behaviour? MSO 2010 seems to behave the same way...
Comment 15 Ganton 2018-05-30 17:06:03 UTC
Hello, I've tried it again, using MS Office 2016 and the document of the attachment 133039 [details], and there the fundamental problem wasn't seen (the result was more like the attachment 133040 [details] than like the attachment 133041 [details]).
Comment 16 QA Administrators 2019-05-31 02:50:29 UTC Comment hidden (obsolete)
Comment 17 Ganton 2019-05-31 18:30:02 UTC
The bug is still present in Libreoffice 6.2.3.2.
Comment 18 Timur 2021-04-26 11:44:14 UTC
Attachment 129967 [details] was explained in comment 6, I don't see it as a bug. 
Remaining is (Lo created Docx) attachment 133039 [details]. Lo 7.2+.
Comment 19 Justin L 2021-05-06 12:53:13 UTC
Oh my - these are in DOC/DOCX format - which just complicates matters even more.
Comment 20 Ganton 2021-05-07 18:24:43 UTC
> Attachment 129967 [details] was explained in comment 6, I don't see it as a bug. 

If the problem of the second file is solved... it would be good that the problem of the first file would be solved, too, since we can not expect users to follow a particular method to select lines (any method works using for example MS Office 2016).
Comment 21 Ganton 2021-05-07 18:27:45 UTC
Created attachment 171765 [details]
The forementioned sample document (the examination template) - ODT version
Comment 22 Ganton 2021-05-07 18:28:44 UTC
Created attachment 171766 [details]
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question) - ODT version
Comment 23 Ganton 2021-05-07 18:29:23 UTC
> Oh my - these are in DOC/DOCX format - which just complicates matters even more.

After saving the files as .odt: problems are seen when reproducing the tests.

No problems are seen when using MS Office with the odt files.
Comment 24 Justin L 2021-05-07 18:35:51 UTC
(In reply to Ganton from comment #23)
> After saving the files as .odt:
A DOC* file then saved as ODT is still basically a DOC file since all the compatibility settings still exist.

A true ODT file is one that has only ever been ODT.
Comment 25 Ganton 2021-05-07 19:58:35 UTC
Created attachment 171769 [details]
The forementioned sample document (the examination template) - similar ODT though built from zero
Comment 26 Ganton 2021-05-07 19:59:30 UTC
Created attachment 171770 [details]
A second case -- similar problems when inserting questions (for example copying a question to the place between the second and the third question) - similar ODT though built from zero
Comment 27 Justin L 2021-05-08 15:33:01 UTC
Created attachment 171789 [details]
104945_testScenarios.odt: the document I was testing my patch on.

I tried to make a patch, but what I have will cause regressions. As a code-pointer, it can be found at https://gerrit.libreoffice.org/c/core/+/115261.
Comment 28 Justin L 2021-05-20 12:28:44 UTC
*** Bug 64828 has been marked as a duplicate of this bug. ***
Comment 29 Ganton 2021-05-23 08:33:45 UTC
Thanks for caring, Justin. 

I've removed the "docx" from the title of the bug since it also happens to odt files. Feel free to change that. Greetings.
Comment 30 Justin L 2021-06-21 09:14:43 UTC
Created attachment 173051 [details]
104945_patch.diff: the patch which I don't dare to submit
Comment 31 QA Administrators 2023-06-22 03:14:37 UTC Comment hidden (obsolete)
Comment 32 Ganton 2023-06-22 18:21:30 UTC
The bug still exists using Libreoffice 7.5.4.2