sd/source/ui/remotecontrol/BluetoothServer.cxx | 5 +++++ sd/source/ui/remotecontrol/Server.cxx | 12 ++++++++---- sd/source/ui/view/drviews7.cxx | 12 ++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-)
New commits: commit d59345634ab0af120ae5ba11a46a60832ba1ec0d Author: Jan Holesovsky <ke...@suse.cz> Date: Thu Feb 7 22:46:05 2013 +0100 sdremote: Disable Impress Remote in the menu also when not allowed in Options. Conflicts: sd/source/ui/view/drviews7.cxx Change-Id: Ida8a3847a54c5415e1802a6688e110202bac35c1 diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 1ebd92b..76b4dd7 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> @@ -310,12 +310,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 af1eb65..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,6 +996,17 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_ZOOM_PREV); } + bool bDisableSdremoteForGood = false; +#ifndef ENABLE_SDREMOTE + 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 1be74e0eebad58ebd9d20e6cf3f6c8dd6e4fce9a Author: Jan Holesovsky <ke...@suse.cz> Date: Thu Feb 7 22:49:35 2013 +0100 sdremote: More logging. Change-Id: I5fe792ddfe1fac5166865c51014d87309d48bab2 Signed-off-by: Michael Meeks <michael.me...@suse.com> diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 86a1fa5..8c695b6 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -109,6 +109,7 @@ bool BluetoothServer::isDiscoverable() if ( aError != NULL ) { g_error_free (aError); + SAL_INFO( "sdremote.bluetooth", "did not get DBusGConnection" ); return false; } @@ -116,6 +117,7 @@ bool BluetoothServer::isDiscoverable() if ( aAdapter == NULL ) { dbus_g_connection_unref( aConnection ); + SAL_INFO( "sdremote.bluetooth", "did not get default adaptor" ); return false; } @@ -130,6 +132,7 @@ bool BluetoothServer::isDiscoverable() { if ( aError ) g_error_free( aError ); + SAL_INFO( "sdremote.bluetooth", "did not get properties" ); return false; } @@ -137,6 +140,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 0fd3d49..1ebd92b 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(), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits