diff options
author | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:38:18 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2005-01-21 15:38:18 +0000 |
commit | 29293ede587693954580a63e05cf8055e2d5c28c (patch) | |
tree | f16a7a5eef30614b04c1b0d46854572738840516 /sd/source/ui/view/presvish.cxx | |
parent | 8f22bf3e072a603854326aaa9f1d7e767f243cc7 (diff) |
INTEGRATION: CWS impress23 (1.21.8); FILE MERGED
2005/01/11 14:48:14 dbo 1.21.8.2: #i39098# making slideshow creation/startShow()/startPreview() more robust
2004/12/30 12:50:29 dbo 1.21.8.1: #i34155# mind rehearse timings slot
Diffstat (limited to 'sd/source/ui/view/presvish.cxx')
-rw-r--r-- | sd/source/ui/view/presvish.cxx | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx index 56480d23f857..954e48ca8495 100644 --- a/sd/source/ui/view/presvish.cxx +++ b/sd/source/ui/view/presvish.cxx @@ -2,9 +2,9 @@ * * $RCSfile: presvish.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: kz $ $Date: 2004-11-27 14:41:41 $ + * last change: $Author: kz $ $Date: 2005-01-21 16:38:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,6 +109,8 @@ using namespace sd; #include "sdslots.hxx" +#include <memory> + namespace sd { @@ -223,12 +225,17 @@ void PresentationViewShell::FinishInitialization ( SID_SHOWPOPUPS, SFX_CALLMODE_SYNCHRON, &aShowItem, &aId, 0L ); GetViewFrame()->Show(); - mpSlideShow = new sd::Slideshow( this, GetView(), GetDoc() ); + std::auto_ptr<Slideshow> pSlideShow( + new sd::Slideshow( this, GetView(), GetDoc() ) ); + pSlideShow->setRehearseTimings( + rRequest.GetSlot() == SID_REHEARSE_TIMINGS ); GetActiveWindow()->GrabFocus(); // Start the show. - mpSlideShow->startShow(0); - mbShowStarted = sal_True; + if (pSlideShow->startShow(0)) { + mpSlideShow = pSlideShow.release(); + mbShowStarted = sal_True; + } Activate(TRUE); } @@ -263,8 +270,12 @@ void PresentationViewShell::Activate( BOOL bIsMDIActivate ) if( mpSlideShow && !mbShowStarted ) { - mpSlideShow->startShow(0); - mbShowStarted = sal_True; + if (mpSlideShow->startShow(0)) + mbShowStarted = sal_True; + else { + delete mpSlideShow; + mpSlideShow = 0; + } } } |