diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-22 12:28:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-22 12:56:13 +0100 |
commit | 438f5cf4229dafe2100e36d818b05535091054d7 (patch) | |
tree | 3fe9277443189d08af263fd7c2b39ca954d25fe4 | |
parent | 368e94ce33bb4de1d2c0348082a349331a17f332 (diff) |
Resolves: fdo#69975 honour custom show settings
if a custom show is set, then don't override it with
current/first page, just accept it
Change-Id: Icd04711028b3e11a576df6cd325ddb0db8974111
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 4793653455a4..f8a42688e3b2 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -1648,29 +1648,35 @@ namespace slideshowhelp Reference< XPresentation2 > xPresentation( rDoc.getPresentation() ); if( xPresentation.is() ) { - if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) + if (SID_REHEARSE_TIMINGS == rReq.GetSlot()) + xPresentation->rehearseTimings(); + else if (rDoc.getPresentationSettings().mbCustomShow) { - if( (SID_PRESENTATION == rReq.GetSlot() ) ) - { - Sequence< PropertyValue > aArguments(1); - PropertyValue aPage; - OUString sValue("0"); - - aPage.Name = "FirstPage"; - aPage.Value <<= sValue; - - aArguments[0] = aPage; - - xPresentation->startWithArguments( aArguments ); - } - else - { - xPresentation->start(); - } + //fdo#69975 if a custom show has been set, then + //use it whether or not we've been asked to + //start from the current or first slide + xPresentation->start(); + } + else if (SID_PRESENTATION_CURRENT_SLIDE == rReq.GetSlot()) + { + //If there is no custom show set, start will automatically + //start at the current page + xPresentation->start(); } else { - xPresentation->rehearseTimings(); + //Start at page 0, this would blow away any custom + //show settings if any were set + Sequence< PropertyValue > aArguments(1); + PropertyValue aPage; + OUString sValue("0"); + + aPage.Name = "FirstPage"; + aPage.Value <<= sValue; + + aArguments[0] = aPage; + + xPresentation->startWithArguments( aArguments ); } } } |