summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-02-13 14:35:40 +0000
committerThorsten Behrens <tbehrens@suse.com>2013-02-15 23:44:09 +0100
commitdcbb11df33fdb32be58694907cfe633e39103204 (patch)
tree6517047797cf2076296028a8eda6bdb7a50d262a /sd
parente412e2750a1821e31099e6defc5d62eace061281 (diff)
sdremote: hide TCP/IP server selection dialog menu item
Now shown only in experimental mode (ie. when TCP/IP is enabled) to reduce user-confusion. Said dialog is not needed for bluetooth. (cherry picked from commit 13cb088a2d8902822e3eb5607ba4cac81ad4d2f2) Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews7.cxx26
1 files changed, 18 insertions, 8 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index f2d69be4ad98..f077d30fa589 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/Common.hxx>
#include <officecfg/Office/Impress.hxx>
#include <svx/svxids.hrc>
#include <svx/svdpagv.hxx>
@@ -51,7 +52,6 @@
#include <comphelper/processfactory.hxx>
#include <sfx2/request.hxx>
-
#include <svx/pfiledlg.hxx>
#include <svx/grafctrl.hxx>
#include <svtools/cliplistener.hxx>
@@ -996,15 +996,25 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_ZOOM_PREV);
}
- bool bDisableSdremoteForGood = false;
+ if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REMOTE_DLG ) )
+ {
+
+ bool bDisableSdremoteForGood = false;
#ifndef ENABLE_SDREMOTE
- bDisableSdremoteForGood = true;
+ 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);
+ uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
+ if ( xContext.is() )
+ bDisableSdremoteForGood |= ! ( officecfg::Office::Common::Misc::ExperimentalMode::get( xContext ) &&
+
+ officecfg::Office::Impress::Misc::Start::EnableSdremote::get( xContext ) );
+
+ // This dialog is only useful for TCP/IP remote control
+ // which is unusual, under-tested and a security issue.
+ if ( bDisableSdremoteForGood )
+ {
+ rSet.Put(SfxVisibilityItem(SID_REMOTE_DLG, false));
+ }
}
// EditText aktiv