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

Jan Holesovsky kendy at suse.cz
Thu Feb 7 14:49:04 PST 2013


 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |    2 +-
 sd/source/ui/remotecontrol/BluetoothServer.cxx              |    5 +++++
 sd/source/ui/remotecontrol/Server.cxx                       |   12 ++++++++----
 sd/source/ui/view/drviews7.cxx                              |   11 +++++++++--
 4 files changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 9e27b9057eeeacb9b5f336fba3f469165b796774
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Feb 7 22:49:35 2013 +0100

    sdremote: More logging.
    
    Change-Id: I5fe792ddfe1fac5166865c51014d87309d48bab2

diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index b9bf825..f222628 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -117,6 +117,7 @@ bool BluetoothServer::isDiscoverable()
 
     if ( aError != NULL ) {
         g_error_free (aError);
+        SAL_INFO( "sdremote.bluetooth", "did not get DBusGConnection" );
         return false;
     }
 
@@ -124,6 +125,7 @@ bool BluetoothServer::isDiscoverable()
     if ( aAdapter == NULL )
     {
         dbus_g_connection_unref( aConnection );
+        SAL_INFO( "sdremote.bluetooth", "did not get default adaptor" );
         return false;
     }
 
@@ -138,6 +140,7 @@ bool BluetoothServer::isDiscoverable()
     {
         if ( aError )
             g_error_free( aError );
+        SAL_INFO( "sdremote.bluetooth", "did not get properties" );
         return false;
     }
 
@@ -145,6 +148,8 @@ bool BluetoothServer::isDiscoverable()
                 aProperties, "Discoverable" ) );
 
     g_hash_table_unref( aProperties );
+
+    SAL_INFO( "sdremote.bluetooth", "BluetoothServer::isDiscoverable() returns " << static_cast< bool >( aIsDiscoverable ) );
     return aIsDiscoverable;
 #else // defined(LINUX) && defined(ENABLE_DBUS)
     return false;
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 5ac5555..76b4dd7 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -66,6 +66,7 @@ RemoteServer::RemoteServer() :
     mSocket(),
     mAvailableClients()
 {
+    SAL_INFO( "sdremote", "Instantiated RemoteServer" );
 }
 
 RemoteServer::~RemoteServer()
@@ -229,9 +230,13 @@ void RemoteServer::removeCommunicator( Communicator* mCommunicator )
 
 std::vector<ClientInfo*> RemoteServer::getClients()
 {
+    SAL_INFO( "sdremote", "RemoteServer::getClients() called" );
     std::vector<ClientInfo*> aClients;
     if ( !spServer )
+    {
+        SAL_INFO( "sdremote", "No remote server instance => no clients" );
         return aClients;
+    }
 
     MutexGuard aGuard( sDataMutex );
     aClients.assign( spServer->mAvailableClients.begin(),
commit 994723a91ec6d35708c3172fd59cc72ec12295dd
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Feb 7 22:46:05 2013 +0100

    sdremote: Disable Impress Remote in the menu also when not allowed in Options.
    
    Change-Id: Ida8a3847a54c5415e1802a6688e110202bac35c1

diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 0fd3d49..5ac5555 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -10,8 +10,8 @@
 #include <algorithm>
 #include <vector>
 
-#include "officecfg/Office/Common.hxx"
-#include "officecfg/Office/Impress.hxx"
+#include <officecfg/Office/Common.hxx>
+#include <officecfg/Office/Impress.hxx>
 
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
@@ -305,12 +305,11 @@ void SdDLL::RegisterRemotes()
     // Disable unless in experimental mode for now
     SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" );
     uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
-    if (!xContext.is() || !officecfg::Office::Impress::Misc::Start::EnableSdremote::get(xContext))
+    if ( xContext.is() && !officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) )
         return;
 
     sd::RemoteServer::setup();
     sd::DiscoveryService::setup();
-
 }
 
 bool RemoteServer::isBluetoothDiscoverable()
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index c1c2bc6..f2d69be 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -26,6 +26,7 @@
 #include <editeng/eeitem.hxx>
 #include <editeng/flditem.hxx>
 #include <editeng/outlobj.hxx>
+#include <officecfg/Office/Impress.hxx>
 #include <svx/svxids.hrc>
 #include <svx/svdpagv.hxx>
 #include <svx/clipfmtitem.hxx>
@@ -995,10 +996,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
        rSet.DisableItem(SID_ZOOM_PREV);
     }
 
+    bool bDisableSdremoteForGood = false;
 #ifndef ENABLE_SDREMOTE
-    rSet.ClearItem(SID_REMOTE_DLG);
-    rSet.DisableItem(SID_REMOTE_DLG);
+    bDisableSdremoteForGood = true;
 #endif
+    uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
+    if ( bDisableSdremoteForGood || ( xContext.is() && !officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) ) )
+    {
+        rSet.ClearItem(SID_REMOTE_DLG);
+        rSet.DisableItem(SID_REMOTE_DLG);
+    }
 
     // EditText aktiv
     if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != NULL)
commit 576943b9bf7506829de97d2194c4bee35a485436
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Thu Feb 7 22:31:01 2013 +0100

    sdremote: Enable it by default.
    
    Change-Id: I268dba185df60bb21d6b87f8e71175f52ea1f1a3

diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index bac3118..c2a38d8 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
@@ -614,7 +614,7 @@
             <desc>Indicates whether to enable the Impress remote controller.</desc>
             <label>Enable remote control</label>
           </info>
-          <value>false</value>
+          <value>true</value>
         </prop>
       </group>
       <group oor:name="Compatibility">


More information about the Libreoffice-commits mailing list