diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-02-07 22:46:05 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-02-07 23:48:43 +0100 |
commit | 994723a91ec6d35708c3172fd59cc72ec12295dd (patch) | |
tree | 1a956b9a08a8bffd292507bdf809cb77a09b8f58 /sd | |
parent | 576943b9bf7506829de97d2194c4bee35a485436 (diff) |
sdremote: Disable Impress Remote in the menu also when not allowed in Options.
Change-Id: Ida8a3847a54c5415e1802a6688e110202bac35c1
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 7 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 11 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 0fd3d491b781..5ac55558796f 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 c1c2bc6ec7c9..f2d69be4ad98 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) |