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. Then we need to add a description of that to: officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu so it can be translated. Then we need to add an SID: sd/inc/sdcommands.h:#define CMD_SID_PRESENTATION ".uno:Presentation" Then add this SID to the switch in: sd/source/ui/slidesorter/controller/SlsSlotManager.cxx and a new case to: void SlotManager::ShowSlideShow( SfxRequest& rReq) A: git grep CMD_SID_PRESENTATION will prolly show us other places to poke, perhaps a bit of addition to the help - and of course a new line to reset the current slide to the first when starting the slideshow would be great. Hopefully not so hard :-)
(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
(In reply to comment #1) > (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 (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. > > Then we need to add a description of that to: > > officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu > > so it can be translated. > > Then we need to add an SID: > > sd/inc/sdcommands.h:#define CMD_SID_PRESENTATION > ".uno:Presentation" > > Then add this SID to the switch in: > > sd/source/ui/slidesorter/controller/SlsSlotManager.cxx > > and a new case to: > > void SlotManager::ShowSlideShow( SfxRequest& rReq) > > A: > > git grep CMD_SID_PRESENTATION > > will prolly show us other places to poke, perhaps a bit of addition to the > help - and of course a new line to reset the current slide to the first when > starting the slideshow would be great. > > Hopefully not so hard :-) (In reply to comment #1) > (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 Hey, I will take this bug if you don't mind. Regards, Kuba
Sure! No problem with that. Kind regards, Joren
I'm still working on this, need more time :c Kind regards, Kuba
(In reply to comment #4) > I'm still working on this, need more time :c Sure, I placed you in the 'assigned to' field. Thanks for hacking this one! Kind regards, Joren
Still need more time, but I'll do it no matter what :).
Still working on this.
I'm making some progress, still need some time though.
I'm almost done.
(In reply to comment #10) > I'm almost done. > Hi Jakub, we're at the Impress sprint and kind of blocked by this bug - any chance you could paste a work-in-progress patch, or come to IRC (freenode, #libreoffice-dev), and then we finish it interactively?
(In reply to comment #11) > (In reply to comment #10) > > I'm almost done. > > > Hi Jakub, we're at the Impress sprint and kind of blocked by this bug - any > chance you could paste a work-in-progress patch, I'm working on it > or come to IRC (freenode, I'm on irc as kubusg > #libreoffice-dev), and then we finish it interactively?
Please notice commit baffab9a4ffca9a4940a3310937d6e858e66cc1f is related to this bug, hopefully also fixes it.
I would think this is fixed now - please reopen if builds from http://dev-builds.libreoffice.org/daily/master/ don't cut it
Verified it works.
Migrating Whiteboard tags to Keywords: (EasyHack,DifficultyBeginner,SkillCpp,TopicCleanup) [NinjaEdit]