https://bugs.freedesktop.org/show_bug.cgi?id=58505
Joren De Cuyper <joren.libreoff...@telenet.be> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joren.libreoffice@telenet.b | |e --- Comment #1 from Joren De Cuyper <joren.libreoff...@telenet.be> --- (In reply to comment #0) > UX guys suggest that slide-jockeys would appreciate the familiar: F5 to > start the slideshow from the beginning, and Shift-F5 to start from the > current slide. > > To do that we need to go hack some code: > > officecfg/registry/data/org/openoffice/Office/Accelerators.xcu > > and search for .uno:Presentation. > > We need to add a new name here eg. .uno:PresentationThisSlide next to > .uno:Presentation. There is already a SHIFT-F5: <node oor:name="F5_SHIFT" oor:op="replace"> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <value xml:lang="en-US">.uno:RestoreEditingView</value> </prop> </node> What I did (NOT pushed to gerrit right now): I didn't change something here, but I used this '.uno:RestoreEditingView' in the next steps > > Then we need to add a description of that to: > > officecfg/registry/data/org/openoffice/OfFuTemporaryfice/UI/DrawImpressCommands.xcu > > so it can be translated. <node oor:name=".uno:RestoreEditingView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Slide Show Current Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> > > Then we need to add an SID: > > sd/inc/sdcommands.h:#define CMD_SID_PRESENTATION > ".uno:Presentation" #define CMD_SID_PRESENTATION ".uno:Presentation" #define CMD_SID_PRESENTATIONCURRENT ".uno:RestoreEditingView" > > Then add this SID to the switch in: > > sd/source/ui/slidesorter/controller/SlsSlotManager.cxx switch (rRequest.GetSlot()) { case SID_PRESENTATION: case SID_PRESENTATIONCURRENT: case SID_REHEARSE_TIMINGS: ShowSlideShow (rRequest); pShell->Cancel(); rRequest.Done(); break; > > and a new case to: > > void SlotManager::ShowSlideShow( SfxRequest& rReq) This is the initial version: http://opengrok.libreoffice.org/xref/core/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx#856 This is what I did (so far) void SlotManager::ShowSlideShow( SfxRequest& rReq) { Reference< XPresentation2 > xPresentation( mrSlideSorter.GetModel().GetDocument()->getPresentation() ); if( xPresentation.is() ) { if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() && SID_PRESENTATIONCURRENT != rReq.getSlot() ) ) xPresentation->start(); //start presentation from beginning elseif( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() && SID_PRESENTATIONCURRENT = rReq.getSlot() ) ) //start presentation from current slide else xPresentation->rehearseTimings(); } } As you can see in the 'initial version' ... Following http://www.openoffice.org/api/docs/common/ref/com/sun/star/presentation/XPresentation.html calling the start() function SHOULD start the presentation from the beginning ... but it don't (I tested it with LO 4.1, build today with Ubuntu 12.10 and Mac OSX). So I don't get it right now, why the presentation start from current/selected presentation already. Can you please put me back on rails :-). Thanks in advance (and thanks for setting up this easyhack). Kind regards, Joren -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ Libreoffice-bugs mailing list Libreoffice-bugs@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs