Bug 112697 - Master slide incorrectly applied to pasted slide from a different presentation if the master slides have the same names (sometimes, not consistent)
Summary: Master slide incorrectly applied to pasted slide from a different presentatio...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.6.7.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 79928 117543 123308 (view as bug list)
Depends on:
Blocks: Master-Slide
  Show dependency treegraph
 
Reported: 2017-09-27 18:07 UTC by Aron Budea
Modified: 2019-04-17 09:38 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Source (149.69 KB, application/vnd.oasis.opendocument.presentation)
2017-09-27 18:07 UTC, Aron Budea
Details
Target (16.17 KB, application/vnd.oasis.opendocument.presentation)
2017-09-27 18:08 UTC, Aron Budea
Details
Screenshot (193.06 KB, image/jpeg)
2017-09-29 08:43 UTC, Mohamed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-09-27 18:07:47 UTC
Created attachment 136568 [details]
Source

Attaching two prepared presentations based on templates Alizarin and DNA, with a master slide renamed to "Default" in both.
Copy the slide from source.odp and paste it into target.odp.

=> The slide picks up the style from the target presentation, based on same "Default" name.
It does not happen if the master slides just share the same name in both documents, it has to be "Default" (eg. there's no issue if both are named "Alizarin").

Observed using LO 6.0 daily build (2017-09-27_01:54:52, 892c719fffa06de4c7aeab497326cad7bae9e5c6) & 4.0.0.3 / Windows 7.
Comment 1 Aron Budea 2017-09-27 18:08:19 UTC
Created attachment 136569 [details]
Target
Comment 2 Mohamed 2017-09-29 08:41:46 UTC
As I understood you want to have two slides with different Master pages theme. 
If you want to do that:
	1- copy the slide from the source to the target, 
	2- select it on the target file, 
	3- click on the Master pages icon in the sidebar at the right, 
	4- then choose the theme you want to use. 
Please check the attached screenshot.

I used this version to reproduce the issue:
  Version: 5.4.1.2 (x64)
  Build ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
  CPU threads: 4; OS: Windows 6.29; UI render: default; 
  Locale: en-US (en_US); Calc: group

If it is not the case please mention the steps to reproduce it.
Comment 3 Mohamed 2017-09-29 08:43:24 UTC
Created attachment 136608 [details]
Screenshot
Comment 4 Aron Budea 2017-09-29 13:00:04 UTC
Mohamed, thanks for your suggestion, note that it's just a sample, it could be a file with formatting not based on any specific master page.
Comment 5 Aron Budea 2017-10-02 00:12:50 UTC
This doesn't only concern master slides named "Default", but the behavior is not consistent.
Let's see the examples with three presentations based on templates Alizarin, DNA and Bright Blue.

1. Copying DNA (master slide renamed to Alizarin) into Alizarin.

- Alizarin has two master slides, named Alizarin and Alizarin0.
- Rename DNA's master slide to Alizarin.
- Copy the (normal) slide from DNA into Alizarin.

=> DNA's master slide is copied as Alizarin_, and kept.

2. Copying Bright Blue (master slide renamed to DNA) into DNA.

- Rename Bright Blue's master slide to DNA.
- Copy the (normal) slide from Bright Blue into DNA (make sure it's not the one renamed to Alizarin previously).

=> Bright Blue's master slide is discarded, the slide is copied based on the original DNA master slide.
Comment 6 Buovjaga 2017-11-02 17:43:05 UTC
(In reply to Aron Budea from comment #0)
> Attaching two prepared presentations based on templates Alizarin and DNA,
> with a master slide renamed to "Default" in both.
> Copy the slide from source.odp and paste it into target.odp.
> 
> => The slide picks up the style from the target presentation, based on same
> "Default" name.

Repro.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: fff7097f1ed8493de099d79aa0613ea6b309100a
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 2nd 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 7 Mike Kaganski 2018-03-23 01:33:53 UTC
https://gerrit.libreoffice.org/51752
Comment 8 Buovjaga 2018-03-23 11:01:37 UTC
(In reply to Mike Kaganski from comment #7)
> https://gerrit.libreoffice.org/51752

I tried the patch and the build is failing for me in the same way as Jenkins https://ci.libreoffice.org/job/gerrit_linux_gcc_release/1695/console
Comment 9 Buovjaga 2018-06-21 14:52:40 UTC
*** Bug 117543 has been marked as a duplicate of this bug. ***
Comment 10 Buovjaga 2018-06-21 14:53:54 UTC
Talked briefly with Mike and he agreed that we should bring in UX.

Quoting Regina from the dupe:

(In reply to Regina Henschel)
> I think, it is the same, at least it should be handled together.
> 
> A decision about the desired behavior in case of identical names is needed,
> e.g. (a) silent rename of source master page and add it as new master page
> (b) dialog about name conflict (c) silent apply of standard page object from
> source to target master page. The desired behavior is likely different for
> copy&paste inside a document compared to copy&paste between documents.
> Pasting pages to and from Draw has the additional aspect, that source and
> target document might have different layer-sets.
> 
> I think, copy&paste of pages/slides between documents need some UX-advice.
Comment 11 Heiko Tietze 2018-06-22 08:29:28 UTC
> (In reply to Regina Henschel)
> ...
> (a) silent rename of source master page and add it as new master page
> (b) dialog about name conflict 
> (c) silent apply of standard page object from source to target master page.

Option b) is evil as users have no idea what's going on behind the scenes. 

The question is if users expect the source object to be pasted without modification, which is a) (adding another master), or to paste with the target style meaning d) paste raw objects except direct formatting, but likely not to modify the target master as in c). In case both/all options are relevant we have to add an option.
Comment 12 Regina Henschel 2018-07-01 18:42:43 UTC
There had been some work on the problem in AOO, but the problem was not solved completely.
See e.g. https://bz.apache.org/ooo/show_bug.cgi?id=116668#c13
and https://bz.apache.org/ooo/show_bug.cgi?id=121863, #11, #14, #15, #20.
Comment 13 Cor Nouws 2018-07-04 16:52:27 UTC
(In reply to Heiko Tietze from comment #11)
> > (In reply to Regina Henschel)
> > ...
> > (a) silent rename of source master page and add it as new master page
> > (b) dialog about name conflict 
> > (c) silent apply of standard page object from source to target master page.
> 
> Option b) is evil as users have no idea what's going on behind the scenes. 
> 
> The question is if users expect the source object to be pasted without
> modification, which is a) (adding another master), or to paste with the
> target style meaning d) paste raw objects except direct formatting, but
> likely not to modify the target master as in c). In case both/all options
> are relevant we have to add an option.

a) looks most logic to me.
 leaves slide as is; 
 if needed, user knows how to apply master page to change.
Comment 14 Heiko Tietze 2018-09-04 10:14:42 UTC
As the ticket is in Assigned state we can remove the needsUX flag. Feel free to ask anyway, Mike.
Comment 15 Heiko Tietze 2018-10-28 12:21:41 UTC
*** Bug 79928 has been marked as a duplicate of this bug. ***
Comment 16 Heiko Tietze 2018-10-28 12:26:13 UTC
How is the progress, Mike. This issue bothers me for a while and we still have the topic on our backlog even when the UX flag is not set anymore.

The last state from the design team is 

 * Preserve style when pasting "alien" slides
   + https://bugs.documentfoundation.org/show_bug.cgi?id=112697 
   + > (a) silent rename of source master page and add it as new master page
   + > (b) dialog about name conflict 
   + > (c) silent apply of standard page object from source to target master page.
   + d) apply target styles for objects that haven't been modified
   + we should find a general guideline that also applies to Calc (Tomaz)
   + mostly you dont want a different style, meaning the source gets the target style on paste
   => more input needed
   + https://bz.apache.org/ooo/show_bug.cgi?id=116668#c13 
   + https://bz.apache.org/ooo/show_bug.cgi?id=121863 
   + related: https://bugs.documentfoundation.org/show_bug.cgi?id=79928 

I would appreciate if we can provide both ways, ie. a) by default (c13) but also some kind of paste special solution.
Comment 17 Aron Budea 2019-04-02 14:09:28 UTC
*** Bug 123308 has been marked as a duplicate of this bug. ***
Comment 18 Mike Kaganski 2019-04-17 09:38:25 UTC
Unassign myself for now, to allow others to work on this.