[Libreoffice-commits] core.git: sd/source

Michael Stahl mstahl at redhat.com
Fri Mar 1 03:22:01 PST 2013


 sd/source/ui/remotecontrol/BluetoothServer.cxx |   23 +++++++----------------
 sd/source/ui/remotecontrol/BluetoothServer.hxx |    8 ++++++--
 2 files changed, 13 insertions(+), 18 deletions(-)

New commits:
commit 846e0f15635bfa361d2ff32dbd77b2edcef7854f
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Mar 1 12:19:22 2013 +0100

    sd: BluetoothServer: put the ifdeffery in the right place
    
    Change-Id: Ide62e3624271c3550e17ea2386363cffe8c2897d

diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 0c6b208..fa919ab 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -14,10 +14,6 @@
 
 #include <sal/log.hxx>
 
-#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
-#  define LINUX_BLUETOOTH
-#endif
-
 #ifdef LINUX_BLUETOOTH
   #include <glib.h>
   #include <dbus/dbus.h>
@@ -93,18 +89,18 @@ struct DBusObject {
     }
 };
 
-struct sd::BluetoothServerImpl {
+struct sd::BluetoothServer::Impl {
     // the glib mainloop running in the thread
     GMainContext *mpContext;
     DBusConnection *mpConnection;
     DBusObject *mpService;
     volatile bool mbExitMainloop;
 
-    BluetoothServerImpl() :
-        mpContext( g_main_context_new() ),
-        mpConnection( NULL ),
-        mpService( NULL ),
-        mbExitMainloop( false )
+    Impl()
+        : mpContext( g_main_context_new() )
+        , mpConnection( NULL )
+        , mpService( NULL )
+        , mbExitMainloop( false )
     { }
 
     DBusObject *getAdapter()
@@ -579,11 +575,6 @@ registerWithDefaultAdapter( DBusConnection *pConnection )
     return pService;
 }
 
-#else
-
-// MSVC needs this definition even though it's never used
-struct sd::BluetoothServerImpl { };
-
 #endif // LINUX_BLUETOOTH
 
 BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators )
@@ -591,7 +582,7 @@ BluetoothServer::BluetoothServer( std::vector<Communicator*>* pCommunicators )
     mpCommunicators( pCommunicators )
 {
 #ifdef LINUX_BLUETOOTH
-    mpImpl.reset(new BluetoothServerImpl());
+    mpImpl.reset(new BluetoothServer::Impl());
 #endif
 }
 
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.hxx b/sd/source/ui/remotecontrol/BluetoothServer.hxx
index 756129a..9d417d4 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.hxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.hxx
@@ -14,11 +14,14 @@
 
 #include <boost/scoped_ptr.hpp>
 
+#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
+#  define LINUX_BLUETOOTH
+#endif
+
 namespace sd
 {
     class Communicator;
 
-    struct BluetoothServerImpl;
     class BluetoothServer:
         public osl::Thread
     {
@@ -43,7 +46,8 @@ namespace sd
         static BluetoothServer *spServer;
 
 #ifdef LINUX_BLUETOOTH
-        boost::scoped_ptr<BluetoothServerImpl> mpImpl;
+        struct Impl;
+        boost::scoped_ptr<Impl> mpImpl;
 #endif
         virtual void SAL_CALL run();
 


More information about the Libreoffice-commits mailing list