diff options
Diffstat (limited to 'sd/source/ui/remotecontrol/ImagePreparer.cxx')
-rw-r--r-- | sd/source/ui/remotecontrol/ImagePreparer.cxx | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx index 66b2791253e8..b81b3ab69350 100644 --- a/sd/source/ui/remotecontrol/ImagePreparer.cxx +++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx @@ -50,36 +50,31 @@ ImagePreparer::ImagePreparer( : xController( rxController ), pTransmitter( aTransmitter ) { + SetTimeout( 50 ); + mnSendingSlide = 0; + Start(); } ImagePreparer::~ImagePreparer() { + Stop(); } -void SAL_CALL ImagePreparer::run() +void SAL_CALL ImagePreparer::Timeout() { sal_uInt32 aSlides = xController->getSlideCount(); - for ( sal_uInt32 i = 0; i < aSlides; i++ ) +// fprintf( stderr, "ImagePreparer: %d %d %d\n", xController->isRunning(), +// (int)mnSendingSlide, (int)aSlides); + if ( xController->isRunning() && // not stopped/disposed of. + mnSendingSlide < aSlides ) { - if ( !xController->isRunning() ) // stopped/disposed of. - { - break; - } - sendPreview( i ); - } - for ( sal_uInt32 i = 0; i < aSlides; i++ ) - { - if ( !xController->isRunning() ) // stopped/disposed of. - { - break; - } - sendNotes( i ); + sendPreview( mnSendingSlide ); + sendNotes( mnSendingSlide ); + mnSendingSlide++; + Start(); } -} - -void SAL_CALL ImagePreparer::onTerminated() -{ - delete this; + else + Stop(); } void ImagePreparer::sendPreview( sal_uInt32 aSlideNumber ) |