summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-02-07 22:46:05 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-02-08 12:02:37 +0000
commitd59345634ab0af120ae5ba11a46a60832ba1ec0d (patch)
tree6ee0c3d1c0ef50d1b58aef89cf393099fb3da278 /sd/source
parent1be74e0eebad58ebd9d20e6cf3f6c8dd6e4fce9a (diff)
sdremote: Disable Impress Remote in the menu also when not allowed in Options.
Conflicts: sd/source/ui/view/drviews7.cxx Change-Id: Ida8a3847a54c5415e1802a6688e110202bac35c1
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx7
-rw-r--r--sd/source/ui/view/drviews7.cxx12
2 files changed, 15 insertions, 4 deletions
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index 1ebd92b6c2c7..76b4dd7c1562 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 af1eb659c1cf..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,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)
{