Bug 45617 - Make Impress Master Slides copyable
Summary: Make Impress Master Slides copyable
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard: reviewed:2022
Keywords: difficultyInteresting, easyHack, skillCpp
: 41573 51551 85966 87669 113407 115006 115678 142516 147476 149342 (view as bug list)
Depends on:
Blocks: Context-Menu UNO-Command-New Matters-to-Caolan Master-Slide-View
  Show dependency treegraph
 
Reported: 2012-02-04 04:05 UTC by Thorsten Behrens (allotropia)
Modified: 2024-11-07 17:28 UTC (History)
44 users (show)

See Also:
Crash report or crash signature:


Attachments
ODP file with a macro that should duplicate a master slide. (14.59 KB, application/vnd.oasis.opendocument.presentation)
2022-11-05 16:09 UTC, Jean-Francois Nifenecker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Behrens (allotropia) 2012-02-04 04:05:06 UTC
Open Impress, select View->Master->Slide Master from the menu. Try to copy the master page on your left, in the slide sorter - and see it fail.

Look into 

BOOL SdDrawDocument::InsertBookmarkAsPage()

It's called on Paste.

555 LoC – refactor it, add a unit test in sd/qa/unit, find & separate all ~6 use cases, and fix the style/name merging.
Comment 1 Florian Reisinger 2012-05-18 09:16:17 UTC
Deteted "Easyhack" from summary
Comment 2 Rob Snelders 2012-11-09 21:20:20 UTC
*** Bug 41573 has been marked as a duplicate of this bug. ***
Comment 3 Rob Snelders 2013-02-16 18:03:01 UTC
*** Bug 51551 has been marked as a duplicate of this bug. ***
Comment 4 Rob Snelders 2013-03-24 10:43:52 UTC
Hi Babati,

Are you still looking into this. Otherwise I'll look into this.
Comment 5 Björn Michaelsen 2013-10-04 18:47:17 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 6 Rishabh 2015-03-11 05:31:06 UTC
I have started working on the bug. I may need help for adding a unit test
Comment 7 Joel Madero 2015-03-12 02:55:25 UTC
@Rishabh - going to assign this to you since you said you've started. If this changes please set it back to NEW. Thanks!
Comment 8 Robinson Tryon (qubit) 2015-12-14 05:02:04 UTC Comment hidden (obsolete)
Comment 9 Robinson Tryon (qubit) 2016-02-18 14:51:41 UTC Comment hidden (obsolete)
Comment 10 Moritz Duge (allotropia) (a.k.a. kolAflash) 2016-06-29 22:23:48 UTC
Still open after three years :-/


Workaround:

1. Save presentation and make a copy of the file.

2. Change the name of one (or more) master page(s).

3. If not already the case, apply the changed master page(s each) to at least one normal page.

4. Open the original file.

5. Copy one of the normal pages with the changed master page(s) applied to the original presentation.

6. Now there should be a copy of that master with the changed name.
Comment 11 Reuben Thomas 2016-06-30 07:06:25 UTC
Thanks very much for the workaround.
Comment 12 Moritz Duge (allotropia) (a.k.a. kolAflash) 2016-07-01 00:44:51 UTC
By the way:

It's also not possible to change the order of master pages. There is no actual need for this in creating a presentation. But it may be convenient to be able to change the order.

E.g. putting the master pages into the order, by which they are used in the presentation pages.

And I don't really see a reason why the order isn't adjustable!?
Comment 13 jan d 2016-11-22 13:21:23 UTC
Added "needsUXEval" – there seem to be several related bugs, all concerning the missing function/an UI for it, but UX did not seem to be involved in any of them.
Comment 14 Yousuf Philips (jay) (retired) 2016-11-22 13:40:29 UTC
*** Bug 85966 has been marked as a duplicate of this bug. ***
Comment 15 Yousuf Philips (jay) (retired) 2016-11-22 13:59:50 UTC
So we need a solution to both possibilities that users use to duplicate a slide - copy (.uno:Copy) & paste (.uno:Paste) and duplicate (.uno:DuplicatePage) - both of which are disabled in master slide mode.

I would assume creating a .uno:DuplicateMasterPage command to work in master slide view should be the priority, as the uno command would be accessible in the master view toolbar, as well as the slides pane context menu (bug 87669).
Comment 16 Heiko Tietze 2017-01-14 09:30:16 UTC
As suggested in comment 15 the best solution from the UX POV is to have the same interaction as on normal slides. Meaning right click offers Copy (and paste) as well as Duplicate. 

The menu contains today New/Duplicate/Delete Slide and New/Delete Master. Since we switch the context it's okay to change the menu and hide slide entries or master (btw. New Master in Normal mode adds another slide and not a master, the same is true for delete).

Regarding the toolbar users expect copy and paste to work (copy is enabled today in master mode but not functional). We also have the Insert toolbar which provides a New (slide) function. This one could remain for normal slides.

Putting all together the recommendation is to make the copy/paste and duplicate function for slides working on master too. Either with new .uno commands or by changing label and tooltips.

Removing UX, but we should take a look when the implementation has started.
Comment 17 Xisco Faulí 2017-10-27 11:20:33 UTC
*** Bug 113407 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2017-10-27 11:20:37 UTC
*** Bug 87669 has been marked as a duplicate of this bug. ***
Comment 19 Regina Henschel 2018-01-14 21:13:12 UTC
*** Bug 115006 has been marked as a duplicate of this bug. ***
Comment 20 Buovjaga 2018-03-06 14:57:53 UTC
*** Bug 115678 has been marked as a duplicate of this bug. ***
Comment 21 Steve 2018-11-07 17:47:16 UTC
Just came across this issue, really would be nice to have it fixed
Comment 22 samtuke 2019-08-16 13:14:44 UTC
This is still high priority from my perspective
Comment 23 Cor Nouws 2019-08-18 20:28:27 UTC
(In reply to Steve from comment #21)
> Just came across this issue, really would be nice to have it fixed

(In reply to samtuke from comment #22)
> This is still high priority from my perspective

Keywords and initial description give a hint ;)
Comment 24 Xisco Faulí 2019-12-02 13:11:57 UTC
Changing priority to 'high' since the number of duplicates is higher than 5 or the number of people in CC higher than 20
Comment 25 Xisco Faulí 2021-02-09 14:19:46 UTC
Dear Nimisha,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 26 Quan 2021-02-28 08:00:29 UTC
Hi, I'll work on this bug.
Comment 27 Heiko Tietze 2021-05-27 08:34:13 UTC
*** Bug 142516 has been marked as a duplicate of this bug. ***
Comment 28 Heiko Tietze 2022-02-17 07:12:21 UTC
*** Bug 147476 has been marked as a duplicate of this bug. ***
Comment 29 Eyal Rozenberg 2022-05-28 14:20:28 UTC
So, Quan, have you had time to devote to this?

Also, note I filed the related bug 149342 about duplicating masters.
Comment 30 Hossein 2022-07-07 13:56:47 UTC
Re-evaluating the EasyHack in 2022

This issue is still relevant. The master slides are not copy-able in the slide sorter.

This copy is possible in MS PowerPoint.
Comment 31 john 2022-09-18 12:03:45 UTC Comment hidden (no-value)
Comment 32 john 2022-09-18 12:05:02 UTC Comment hidden (no-value)
Comment 33 Roman Kuznetsov 2022-11-04 21:24:09 UTC
*** Bug 149342 has been marked as a duplicate of this bug. ***
Comment 34 Jean-Francois Nifenecker 2022-11-05 16:09:49 UTC
Created attachment 183427 [details]
ODP file with a macro that should duplicate a master slide.

Run the TestAddMasterPage() sub in the document Standard:Module1.
Expected: You get a duplicate of the 1st masterpage (there's only one).
Found : You get a duplicate of the first standard slide.
Comment 35 Jean-Francois Nifenecker 2022-11-05 16:20:38 UTC
Version: 7.3.6.2 / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

OS: LinuxMint 20.3 (Cinnamon)

This bug is still present, 10 yrs after being opened :,(
This is very annoying in that the copy masterslide option would be a workaround to the lack of masterslides inheritance. It is tedious to duplicate many properties from a given masterslide to another.

Note that the API exposes a .Duplicate() method in the Impress document service (XDrawPageDuplicator interface), see page:
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1drawing_1_1XDrawPageDuplicator.html
where one can read:
"creates a duplicate of a DrawPage or MasterPage, including the Shapes on that page and inserts it into the same model."
which is erroneous. While this method can duplicate standard slides, it can't duplicate master ones. See attachment: https://bugs.documentfoundation.org/attachment.cgi?id=183427.

So I see two options: (1) fix the API help page or (2) fix the .Duplicate() method to apply to the master slides as explained. My take goes to (2), and adding the Add option in the UI :)
Comment 36 Eyal Rozenberg 2022-11-05 16:52:49 UTC
(In reply to Jean-Francois Nifenecker from comment #35)
> copy masterslide option would be a
> workaround to the lack of masterslides inheritance. 

Is there an open bug about that possibility? If not, please open one and describe this more fully.


> This bug is still present, 10 yrs after being opened ...  This is very annoying

Apparently no newbie coder has taken this easy hack upon themselves over the past decade, so perhaps the veterans would take care of this one.
Comment 37 Abdallah Elhdad 2023-03-26 11:32:52 UTC
Are there any code pointers to help with this as a newbie?
Comment 38 Buovjaga 2023-03-26 11:39:03 UTC
(In reply to Abdallah Elhdad from comment #37)
> Are there any code pointers to help with this as a newbie?

I see pointers in comment 0 and comment 35. Please research based on them and ask something more specific, if needed.
Comment 39 Eyal Rozenberg 2023-10-20 13:46:47 UTC
As I was working on my LOConf presentation this year, I need to copy, paste and/or duplicate Master Slides - and I couldn't. Annoying!
Comment 40 Anish Deshpande 2024-03-28 18:28:11 UTC
Hi, I am assigning this to myself as I would like to work on it
Comment 41 Eyal Rozenberg 2024-03-28 19:54:53 UTC
(In reply to Anish Deshpande from comment #40)
> Hi, I am assigning this to myself as I would like to work on it

That's great! Thanks, and myself and other followers of this bug wish you success... :-)
Comment 42 Mohit Marathe 2024-03-29 05:17:25 UTC
(In reply to Anish Deshpande from comment #40)
> Hi, I am assigning this to myself as I would like to work on it

I’m working on it. But feel free to submit a patch if you don’t see any progress from my side.

Best of luck!
Comment 43 anthony.ford 2024-08-07 13:58:23 UTC Comment hidden (no-value)
Comment 44 Samuel Adesola 2024-11-07 17:28:47 UTC
(In reply to Hossein from comment #30)
> Re-evaluating the EasyHack in 2022
> 
> This issue is still relevant. The master slides are not copy-able in the
> slide sorter.
> 
> This copy is possible in MS PowerPoint.

DUplicate for master slide is currently dissabled as mentioned but when I enabled duplicate that works for normal slide or another added a new Duplicate UNO command, duplicating master slide always crashes with: warn:legacy.tools:32500:32500:svx/source/svdraw/svdpage.cxx:1679: TRG_GetMasterPageVisibleLayers(): No MasterPage available. Use TRG_HasMasterPage()
before access (!)

The Duplicate is being dissabled in master mode here: sd/source/ui/slidesorter/controller/SlsSlotManager.cxx

    if (eEditMode == EditMode::MasterPage)
    {
        // Disable some slots when in master page mode.
        rSet.DisableItem(SID_ASSIGN_LAYOUT);
        rSet.DisableItem(SID_INSERTPAGE);

        if (rSet.GetItemState(SID_DUPLICATE_PAGE) == SfxItemState::DEFAULT)
            rSet.DisableItem(SID_DUPLICATE_PAGE);
    }