diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-02-13 14:35:40 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-02-13 14:37:13 +0000 |
commit | 13cb088a2d8902822e3eb5607ba4cac81ad4d2f2 (patch) | |
tree | fe6c10a8d7d7062cab53707178b444c55894e730 | |
parent | 90d42440eeaf7994f3ad57ebfdc8edb129c8faff (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.
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 26 |
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 |