summaryrefslogtreecommitdiff
path: root/sd/source/ui/remotecontrol
diff options
context:
space:
mode:
authorSiqi LIU <me@siqi.fr>2013-08-04 14:17:55 +0200
committerSiqi LIU <me@siqi.fr>2013-08-04 14:18:10 +0200
commit731f3d986eb13468681ae9a7ef491897a078f675 (patch)
tree5f3fd39a1efa054e5ece94e51b1ec8bbbb94da8b /sd/source/ui/remotecontrol
parentdffc87dd13daf9a2f2f629cd50558995aadc4d19 (diff)
request immdiateupdate for pointerSymbol, but bad performance
Change-Id: I943019f6f6c6aaddeb40bf7f56bd0ffefff8a6b3
Diffstat (limited to 'sd/source/ui/remotecontrol')
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx34
1 files changed, 28 insertions, 6 deletions
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index f7a3f8c344e4..593ff99ba2bd 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -132,11 +132,32 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
}
else if (aCommand[0].equals( "pointer_started" ))
{
- std::cerr << "pointer_started" << std::endl;
+ // std::cerr << "pointer_started" << std::endl;
+ float x = aCommand[1].toFloat();
+ float y = aCommand[2].toFloat();
SolarMutexGuard aSolarGuard;
+
+ const ::com::sun::star::geometry::RealPoint2D pos(x,y);
+ // std::cerr << "Pointer at ("<<pos.X<<","<<pos.Y<<")" << std::endl;
+
+ if (xSlideShow.is()) try
+ {
+ // std::cerr << "pointer_coordination in the is" << std::endl;
+ xSlideShow->setProperty(
+ beans::PropertyValue( "PointerPosition" ,
+ -1,
+ makeAny( pos ),
+ beans::PropertyState_DIRECT_VALUE ) );
+ }
+ catch ( Exception& )
+ {
+ SAL_WARN( "sd.slideshow", "sd::SlideShowImpl::setPointerPosition(), "
+ "exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
+ }
+
if (xSlideShow.is()) try
{
- std::cerr << "pointer_started in the is" << std::endl;
+ // std::cerr << "pointer_started in the is" << std::endl;
xSlideShow->setProperty(
beans::PropertyValue( "PointerVisible" ,
-1,
@@ -148,15 +169,16 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
SAL_WARN( "sd.slideshow", "sd::SlideShowImpl::setPointerMode(), "
"exception caught: " << comphelper::anyToString( cppu::getCaughtException() ));
}
+
SAL_INFO( "sdremote", "Pointer started, we display the pointer on screen" );
}
else if (aCommand[0].equals( "pointer_dismissed" ))
{
- std::cerr << "pointer_dismissed" << std::endl;
+ // std::cerr << "pointer_dismissed" << std::endl;
SolarMutexGuard aSolarGuard;
if (xSlideShow.is()) try
{
- std::cerr << "pointer_dismissed in the is" << std::endl;
+ // std::cerr << "pointer_dismissed in the is" << std::endl;
xSlideShow->setProperty(
beans::PropertyValue( "PointerVisible" ,
-1,
@@ -178,12 +200,12 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
SAL_INFO( "sdremote", "Pointer at ("<<x<<","<<y<<")" );
const ::com::sun::star::geometry::RealPoint2D pos(x,y);
- std::cerr << "Pointer at ("<<pos.X<<","<<pos.Y<<")" << std::endl;
+ // std::cerr << "Pointer at ("<<pos.X<<","<<pos.Y<<")" << std::endl;
SolarMutexGuard aSolarGuard;
if (xSlideShow.is()) try
{
- std::cerr << "pointer_coordination in the is" << std::endl;
+ // std::cerr << "pointer_coordination in the is" << std::endl;
xSlideShow->setProperty(
beans::PropertyValue( "PointerPosition" ,
-1,