Apache OpenOffice (AOO) Bugzilla – Issue 85921
impress: right click to edit slide master
Last modified: 2009-05-12 22:56:16 UTC
A quick straw poll in my work group shows that the ability to edit the master slide is just not easily found in the view menu. The first place that the majority look to find this functionality is by right clicking the relevant preview in the master section of slide panel hoping to see something there. So attached is a patch that lets us edit the slide master under the mouse if we're not in master view already and the slide master is an applied one.
Created attachment 51408 [details] proposed patch
Please have a look on this patch.
looks good, af, please apply this patch. It would be cool if we hit ui freeze for 3.0.
Ahm, sorry, this somehow seems to have slipped my attention. With the UI freeze long gone, we have to wait for OOo 3.1.
KA=>AF: any news on verifying the patch?
How about 3.1, is this still going to make it ?
I finally found the time to review the patch. Late again, I am terribly sorry. Most of the patch looks good except for the part in MasterPagesSelector.cxx. The handling of the SID_TP_EDIT_MASTER slot relies solely on the slide sorter for switching to master mode and then for switching to the selected master page. This is not the right way to do it. I am even surprised and, as the author of the slide sorter, somewhat pleased that this works at all. Better use something like the code below to handle the slot. It first dispatches slot SID_MASTERPAGE (synchronously) to switch to master mode. After that the XDrawController::setCurrentPage(.) method is used to switch to the selected master page: case SID_TP_EDIT_MASTER: { using namespace ::com::sun::star; uno::Reference<drawing::XDrawPage> xSelectedMaster ( GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY); SfxViewFrame* pViewFrame = mrBase.GetViewFrame(); if (pViewFrame != NULL && xSelectedMaster.is()) { SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); if (pDispatcher != NULL) { USHORT nIndex = mpPageSet->GetSelectItemId(); pDispatcher->Execute(SID_MASTERPAGE, SFX_CALLMODE_SYNCHRON); mpPageSet->SelectItem (nIndex); mrBase.GetDrawController().setCurrentPage(xSelectedMaster); } } break; } I have submitted issue 98272 for an assertion that is triggered when the previews are created and that makes testing and debugging the code above harder than necessary.
Finally applied the patch (with some minor modifications) and the change described above. SVN revision is 270683.
@wg: Please verify.
Verified in CWS.
integrated DEV300_m48