summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2013-03-23 21:47:24 +0100
committerKatarina Behrens <bubli@bubli.org>2013-03-23 21:54:47 +0100
commite8b924e440a8f82076389d2774d1c414c87924dc (patch)
treeb4b5d88ec95b32e74e601028b4581f5c852f4c15 /sd
parent2f53afc7016063b6d74ca5dbdafd04bfcf1eb0da (diff)
Start slideshow with the next visible slide, part2
simplify it a bit. Also fix fdo#62665, as a side effect Change-Id: I77e3d9d261f0d313d6514897d2d4923de32b3591
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx17
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx2
2 files changed, 11 insertions, 8 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 6ba66deba292..fd29a7bd9996 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -942,9 +942,13 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( bStartWithActualSlide )
{
- aPresSlide = pStartPage->GetName();
- // if the starting slide is hidden, we can't set slide controller to ALL mode
- maPresSettings.mbAll = !pStartPage->IsExcluded();
+ if ( !aPresSlide.Len())
+ {
+ // no preset slide yet, so pick current on one
+ aPresSlide = pStartPage->GetName();
+ // if the starting slide is hidden, we can't set slide controller to ALL mode
+ maPresSettings.mbAll = !pStartPage->IsExcluded();
+ }
if( meAnimationMode != ANIMATIONMODE_SHOW )
{
@@ -966,9 +970,8 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
}
}
- sal_Int32 nSlideNum = ( pStartPage->GetPageNum() - 1 ) >> 1;
// build page list
- createSlideList( maPresSettings.mbAll, false, aPresSlide, nSlideNum );
+ createSlideList( maPresSettings.mbAll, false, aPresSlide );
// remember Slide number from where the show was started
if( pStartPage )
@@ -2429,7 +2432,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow() const
// ---------------------------------------------------------
-void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide, sal_Int32 nStartSlide )
+void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide )
{
const long nSlideCount = mpDoc->GetSdPageCount( PK_STANDARD );
@@ -2462,7 +2465,7 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
sal_Int32 nSlide;
sal_Bool bTakeNextAvailable = sal_False;
- for( nSlide = nStartSlide, nFirstVisibleSlide = -1;
+ for( nSlide = 0, nFirstVisibleSlide = -1;
( nSlide < nSlideCount ) && ( -1 == nFirstVisibleSlide ); nSlide++ )
{
SdPage* pTestSlide = mpDoc->GetSdPage( (sal_uInt16)nSlide, PK_STANDARD );
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index ca968c4a4d65..7f87ea01ccd5 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -265,7 +265,7 @@ private:
double update();
- void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide, sal_Int32 nStartSlide = 0 );
+ void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide );
void displayCurrentSlide (const bool bSkipAllMainSequenceEffects = false);