diff options
author | Andrzej J.R. Hunt <andrzej@ahunt.org> | 2012-07-26 18:52:11 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-08-06 10:23:04 +0100 |
commit | 8f08b8f456530a63c76ad1282d6b8643dae15b34 (patch) | |
tree | 6b28d2efe8a15ea36ae254c63b036b70fe8fd1a7 /sd | |
parent | 148281ad8a6466b62055718f8f4071b43efa1408 (diff) |
Added automatic hiding of clockbar as necessary.
Change-Id: Id758f8e3f73e9d7d180e09b606ee44cbe5c48d6c
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/remotecontrol/Listener.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Receiver.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 4 |
3 files changed, 7 insertions, 16 deletions
diff --git a/sd/source/ui/remotecontrol/Listener.cxx b/sd/source/ui/remotecontrol/Listener.cxx index 361990530cf5..2aac478b742d 100644 --- a/sd/source/ui/remotecontrol/Listener.cxx +++ b/sd/source/ui/remotecontrol/Listener.cxx @@ -29,29 +29,25 @@ Listener::Listener( const ::rtl::Reference<Server>& rServer, sd::Transmitter *aT mPreparer() { pTransmitter = aTransmitter; - fprintf( stderr, "Listener created %p\n", this ); } Listener::~Listener() { - fprintf( stderr, "Listener destroyed %p\n", this ); } void Listener::init( const css::uno::Reference< css::presentation::XSlideShowController >& aController) { - fprintf( stderr, "Initing\n" ); if ( aController.is() ) { - fprintf( stderr, "Is -- now copying refrerence.\n" ); mController = css::uno::Reference< css::presentation::XSlideShowController >( aController ); - fprintf( stderr, "Registering listener\n" ); aController->addSlideShowListener( this ); - fprintf( stderr, "Registered listener.\n" ); sal_Int32 aSlides = aController->getSlideCount(); + sal_Int32 aCurrentSlide = aController->getCurrentSlideIndex(); OStringBuffer aBuffer; aBuffer.append( "slideshow_started\n" ) - .append( OString::valueOf( aSlides ) ).append( "\n\n" ); + .append( OString::valueOf( aSlides ) ).append("\n") + .append( OString::valueOf( aCurrentSlide ) ).append( "\n\n" ); pTransmitter->addMessage( aBuffer.makeStringAndClear(), Transmitter::Priority::HIGH ); @@ -61,7 +57,6 @@ void Listener::init( const css::uno::Reference< css::presentation::XSlideShowCon } else { - fprintf( stderr, "Couldn't register listener -- aController isn't\n" ); } } @@ -114,7 +109,6 @@ void SAL_CALL Listener::hyperLinkClicked (const rtl::OUString &) void SAL_CALL Listener::slideTransitionStarted (void) throw (css::uno::RuntimeException) { - fprintf( stderr, "slideTransitionStarted\n" ); sal_Int32 aSlide = mController->getCurrentSlideIndex(); OStringBuffer aBuilder( "slide_updated\n" ); @@ -140,7 +134,6 @@ void SAL_CALL Listener::slideAnimationsEnded (void) void SAL_CALL Listener::disposing (void) { - fprintf( stderr, "disposing void\n" ); if ( mPreparer.is() ) { delete mPreparer.get(); @@ -160,7 +153,6 @@ void SAL_CALL Listener::disposing ( const css::lang::EventObject& rEvent) throw (::com::sun::star::uno::RuntimeException) { - fprintf( stderr, "disposing with Events\n" ); (void) rEvent; dispose(); } diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index 654664add5a3..d7c97bbe9951 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -75,8 +75,11 @@ void Receiver::parseCommand( std::vector<OString> aCommand ) { // FIXME: if 0 returned, then not a valid number sal_Int32 aSlide = aCommand[1].toInt32(); - if ( xSlideShowController.is() ) + if ( xSlideShowController.is() && + xSlideShowController->getCurrentSlideIndex() != aSlide ) + { xSlideShowController->gotoSlideIndex( aSlide ); + } } else if ( aCommand[0].equals( "presentation_start" ) ) { diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 700e561d24c8..2f67d178cc4b 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -40,7 +40,6 @@ void Server::listenThread() pTransmitter->launch(); Receiver aReceiver( pTransmitter ); try { - fprintf( stderr, "Trying to add a Listener in listenThread\n" ); uno::Reference< lang::XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XFramesSupplier > xFramesSupplier( xServiceManager->createInstance( @@ -52,9 +51,7 @@ void Server::listenThread() if ( xPresentation->isRunning() ) { presentationStarted( xPresentation->getController() ); - fprintf( stderr, "Added the listener\n"); } - fprintf( stderr, "We aren't running\n" ); } catch ( com::sun::star::uno::RuntimeException &e ) { @@ -93,7 +90,6 @@ void Server::listenThread() } } // TODO: deal with transmision errors gracefully. - fprintf( stderr, "done with transmitting\n" ); presentationStopped(); delete pTransmitter; |