diff options
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | sd/CppunitTest_sd_uimpress.mk | 14 | ||||
-rw-r--r-- | sd/Library_sd.mk | 12 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/DiscoveryService.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/OSXNetworkService.h | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/OSXNetworkService.hxx | 7 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/OSXNetworkService.mm | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Receiver.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/ZeroconfService.hxx | 5 | ||||
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 24 | ||||
-rw-r--r-- | slideshow/source/engine/pointersymbol.cxx | 1 | ||||
-rw-r--r-- | slideshow/source/engine/pointersymbol.hxx | 3 |
12 files changed, 54 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index 9f753042f34e..496c29de0592 100644 --- a/configure.ac +++ b/configure.ac @@ -799,6 +799,11 @@ AC_ARG_ENABLE(atl, ], ,) +AC_ARG_ENABLE(avahi, + AS_HELP_STRING([--disable-avahi], + [Determines whether to use the avahi support for impress remote zeroconf.]), +,enable_avahi=yes) + AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], [Turn warnings to errors. (Has no effect in modules where the treating @@ -942,11 +947,6 @@ AC_ARG_ENABLE(gio, [Determines whether to use the GIO support.]), ,enable_gio=yes) -AC_ARG_ENABLE(avahi, - AS_HELP_STRING([--disable-avahi], - [Determines whether to use the avahi support for impress remote zeroconf.]), -,enable_avahi=yes) - AC_ARG_ENABLE(telepathy, AS_HELP_STRING([--enable-telepathy], [Determines whether to enable Telepathy for collaboration.]), diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 8fa24f522ecc..c1a66ca5f620 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -71,12 +71,20 @@ $(eval $(call gb_CppunitTest_use_system_darwin_frameworks,sd_uimpress,\ )) endif +ifeq ($(OS), LINUX) $(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\ boost_headers \ - gtk \ - dbus \ - avahi \ + gtk \ + dbus \ + avahi \ )) +else +$(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\ + boost_headers \ + gtk \ + dbus \ +)) +endif $(eval $(call gb_CppunitTest_add_exception_objects,sd_uimpress,\ sd/qa/unit/uimpress \ diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index a6b759092909..9466102eb587 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -94,12 +94,20 @@ $(eval $(call gb_Library_use_libraries,sd,\ $(gb_UWINAPI) \ )) +ifeq ($(OS), LINUX) $(eval $(call gb_Library_use_externals,sd,\ boost_headers \ libxml2 \ dbus \ avahi \ )) +else +$(eval $(call gb_Library_use_externals,sd,\ + boost_headers \ + libxml2 \ + dbus \ +)) +endif ifeq ($(OS),WNT) $(eval $(call gb_Library_use_system_win32_libs,sd,\ @@ -537,10 +545,6 @@ $(eval $(call gb_Library_add_objcxxobjects,sd,\ sd/source/ui/remotecontrol/OSXNetworkService \ )) -$(eval $(call gb_Library_add_exception_objects,sd,\ - sd/source/ui/remotecontrol/OSXNetworkService \ -)) - else ifeq ($(OS),LINUX) diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx index eba3aa07605c..262c47abc0fb 100644 --- a/sd/source/ui/remotecontrol/DiscoveryService.cxx +++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx @@ -13,7 +13,6 @@ #include <unistd.h> #include <algorithm> #include <vector> -#include <thread> #include <iostream> #include <comphelper/processfactory.hxx> diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.h b/sd/source/ui/remotecontrol/OSXNetworkService.h index f0af0dac655b..f8f0e9c958b6 100644 --- a/sd/source/ui/remotecontrol/OSXNetworkService.h +++ b/sd/source/ui/remotecontrol/OSXNetworkService.h @@ -19,7 +19,7 @@ #import <Foundation/NSRunLoop.h> #include <postmac.h> -@interface OSXNetworkService : NSObject<NSNetServiceDelegate> +@interface OSXBonjourService : NSObject<NSNetServiceDelegate> { NSNetService *netService; } diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.hxx b/sd/source/ui/remotecontrol/OSXNetworkService.hxx index 6659d7530182..bbbc0cff03cd 100644 --- a/sd/source/ui/remotecontrol/OSXNetworkService.hxx +++ b/sd/source/ui/remotecontrol/OSXNetworkService.hxx @@ -7,7 +7,6 @@ #include <string.h> #include <algorithm> #include <vector> -#include <thread> #include <iostream> #include <osl/conditn.hxx> // Include this early to avoid error as check() gets defined by some SDK header to empty @@ -22,16 +21,16 @@ namespace sd { class OSXNetworkService : public ZeroconfService { private: - OSXNetworkService osxservice; + OSXBonjourService *osxservice; public: - OSXNetworkService(const string& aname = "", uint aport = 1599) + OSXNetworkService(const std::string& aname = "", unsigned int aport = 1599) : ZeroconfService(aname, aport){} void clear() { [osxservice dealloc]; } void setup() { - osxservice = [[OSXNetworkService alloc] init]; + osxservice = [[OSXBonjourService alloc] init]; [osxservice publishImpressRemoteServiceOnLocalNetworkWithName: @""]; }; }; diff --git a/sd/source/ui/remotecontrol/OSXNetworkService.mm b/sd/source/ui/remotecontrol/OSXNetworkService.mm index 8e81def93ef4..d7f3ebc3ba0b 100644 --- a/sd/source/ui/remotecontrol/OSXNetworkService.mm +++ b/sd/source/ui/remotecontrol/OSXNetworkService.mm @@ -13,7 +13,7 @@ #import "OSXNetworkService.h" #include <postmac.h> -@implementation OSXNetworkService +@implementation OSXBonjourService - (void) publishImpressRemoteServiceOnLocalNetworkWithName:(NSString *)sName { diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index 556926d23102..40fc7342a637 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -121,12 +121,12 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) } else if (aCommand[0].equals( "pointer_started" )) { - xSlideShowController->setPointerMode(true); + // 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); + // xSlideShowController->setPointerMode(false); std::cerr << "Pointer dismissed, we hide the pointer on screen"<< std::endl; } else if (aCommand[0].equals( "pointer_coordination" )) @@ -136,7 +136,7 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) std::cerr << "("<<x<<","<<y<<")"<< std::endl; const ::com::sun::star::geometry::RealPoint2D pos(x,y); // Same problem here... - xSlideShowController->setPointerPosition(pos); + // xSlideShowController->setPointerPosition(pos); } else if ( aCommand[0].equals( "presentation_resume" ) ) { diff --git a/sd/source/ui/remotecontrol/ZeroconfService.hxx b/sd/source/ui/remotecontrol/ZeroconfService.hxx index 2952fa4be4f6..a3e92fa279b8 100644 --- a/sd/source/ui/remotecontrol/ZeroconfService.hxx +++ b/sd/source/ui/remotecontrol/ZeroconfService.hxx @@ -15,13 +15,12 @@ struct sockaddr_in; +typedef unsigned int uint; + namespace sd{ class ZeroconfService { - private: - int mSocket; - protected: std::string name; uint port; diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index f7fda9b7ea04..68b9b7766731 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -3065,6 +3065,11 @@ void SAL_CALL SlideshowImpl::setPointerMode( bool bSwitchPointerMode ) throw (cs makeAny( bSwitchPointerMode ), beans::PropertyState_DIRECT_VALUE ) ); } + catch ( Exception& ) + { + SAL_WARN( "sd.slideshow", "sd::SlideShowImpl::setPointerMode(), " + "exception caught: " << comphelper::anyToString( cppu::getCaughtException() )); + } } // -------------------------------------------------------------------- @@ -3072,13 +3077,18 @@ void SAL_CALL SlideshowImpl::setPointerPosition( const ::com::sun::star::geometr { SolarMutexGuard aSolarGuard; if (mxShow.is()) try - { - mxShow->setProperty( - beans::PropertyValue( "PointerPosition" , - -1, - makeAny( pos ), - beans::PropertyState_DIRECT_VALUE ) ); - } + { + mxShow->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() )); + } } // -------------------------------------------------------------------- diff --git a/slideshow/source/engine/pointersymbol.cxx b/slideshow/source/engine/pointersymbol.cxx index 474db63d7070..48ad0e5d1693 100644 --- a/slideshow/source/engine/pointersymbol.cxx +++ b/slideshow/source/engine/pointersymbol.cxx @@ -107,6 +107,7 @@ basegfx::B2DPoint PointerSymbol::calcSpritePos( uno::UNO_QUERY_THROW ); const geometry::IntegerSize2D realSize( xBitmap->getSize() ); return basegfx::B2DPoint( + // pos.X pos.Y are given in 0..1, beginning from the upper left corner of the currentSlide. std::min<sal_Int32>( realSize.Width * pos.X, LEFT_BORDER_SPACE ), std::max<sal_Int32>( 0, realSize.Height * (1-pos.Y) - mxBitmap->getSize().Height - LOWER_BORDER_SPACE ) ); diff --git a/slideshow/source/engine/pointersymbol.hxx b/slideshow/source/engine/pointersymbol.hxx index 641626eb2ebe..9dc2818d2dd9 100644 --- a/slideshow/source/engine/pointersymbol.hxx +++ b/slideshow/source/engine/pointersymbol.hxx @@ -47,7 +47,8 @@ public: /** Hides the pointer symbol. */ void hide() { setVisible(false); } - + /** Use this method to update the pointer's position + */ virtual void viewsChanged(const ::com::sun::star::geometry::RealPoint2D& pos); private: |