diff options
author | Siqi LIU <me@siqi.fr> | 2013-07-24 18:47:16 +0200 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2013-07-25 17:28:00 +0200 |
commit | cca0b9ae02603ab88ec7d8810aab2a8a1b4efda2 (patch) | |
tree | d33e7d799bc917efb93797152d449b985c440202 /sd/source | |
parent | 767b02bd7614059dd80d0cd1be306d9b63291f31 (diff) |
patch for review
Change-Id: I86ac0123e0a7073eaf6b971458d2c7c984a6c6fa
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/remotecontrol/Receiver.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 40 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.hxx | 2 |
3 files changed, 55 insertions, 3 deletions
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index b5f06e71c87f..556926d23102 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -119,14 +119,24 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) xSlideShowController->blankScreen( aColour ); } } - // pointer_coordination - // x - // y + else if (aCommand[0].equals( "pointer_started" )) + { + xSlideShowController->setPointerMode(true); + std::cerr << "Pointer started, we display the pointer on screen"<< std::endl; + } + else if (aCommand[0].equals( "pointer_dismissed" )) + { + xSlideShowController->setPointerMode(false); + std::cerr << "Pointer dismissed, we hide the pointer on screen"<< std::endl; + } else if (aCommand[0].equals( "pointer_coordination" )) { float x = aCommand[1].toFloat(); float y = aCommand[2].toFloat(); std::cerr << "("<<x<<","<<y<<")"<< std::endl; + const ::com::sun::star::geometry::RealPoint2D pos(x,y); + // Same problem here... + xSlideShowController->setPointerPosition(pos); } else if ( aCommand[0].equals( "presentation_resume" ) ) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 0afcf29708c3..f7fda9b7ea04 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1142,6 +1142,19 @@ bool SlideshowImpl::startShowImpl( const Sequence< beans::PropertyValue >& aProp makeAny( xBitmap ), beans::PropertyState_DIRECT_VALUE ) ); } + + BitmapEx pointerSymbolBitmap( SdResId(BMP_WAIT_ICON) ); + const Reference<rendering::XBitmap> xPointerBitmap( + vcl::unotools::xBitmapFromBitmapEx( + xSpriteCanvas->getDevice(), pointerSymbolBitmap ) ); + if (xPointerBitmap.is()) + { + mxShow->setProperty( + beans::PropertyValue( "PointerSymbolBitmap" , + -1, + makeAny( xPointerBitmap ), + beans::PropertyState_DIRECT_VALUE ) ); + } } const sal_Int32 nCount = aProperties.getLength(); @@ -3041,6 +3054,33 @@ void SAL_CALL SlideshowImpl::setPenMode( bool bSwitchPenMode ) throw (RuntimeExc } // -------------------------------------------------------------------- +void SAL_CALL SlideshowImpl::setPointerMode( bool bSwitchPointerMode ) throw (css::uno::RuntimeException) +{ + SolarMutexGuard aSolarGuard; + if (mxShow.is()) try + { + mxShow->setProperty( + beans::PropertyValue( "PointerVisible" , + -1, + makeAny( bSwitchPointerMode ), + beans::PropertyState_DIRECT_VALUE ) ); + } +} + +// -------------------------------------------------------------------- +void SAL_CALL SlideshowImpl::setPointerPosition( const ::com::sun::star::geometry::RealPoint2D& pos ) throw (css::uno::RuntimeException) +{ + SolarMutexGuard aSolarGuard; + if (mxShow.is()) try + { + mxShow->setProperty( + beans::PropertyValue( "PointerPosition" , + -1, + makeAny( pos ), + beans::PropertyState_DIRECT_VALUE ) ); + } +} +// -------------------------------------------------------------------- void SAL_CALL SlideshowImpl::setEraseAllInk(bool bEraseAllInk) throw (RuntimeException) { diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx index 8be006b320da..2768e9681485 100644 --- a/sd/source/ui/slideshow/slideshowimpl.hxx +++ b/sd/source/ui/slideshow/slideshowimpl.hxx @@ -190,6 +190,8 @@ public: virtual void SAL_CALL setEraseInk( sal_Int32 nEraseInkSize ) throw (css::uno::RuntimeException); virtual void SAL_CALL setPenMode( bool bSwitchPenMode) throw (css::uno::RuntimeException); virtual void SAL_CALL setEraserMode( bool bSwitchEraserMode ) throw (css::uno::RuntimeException); + virtual void SAL_CALL setPointerMode( bool bSwitchPointerMode) throw (css::uno::RuntimeException); + virtual void SAL_CALL setPointerPosition( const ::com::sun::star::geometry::RealPoint2D& pos ) throw (css::uno::RuntimeException); virtual ::sal_Bool SAL_CALL isRunning( ) throw (css::uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getSlideCount( ) throw (css::uno::RuntimeException); virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getSlideByIndex( ::sal_Int32 Index ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException); |