diff options
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/present.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/inc/present.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Server.cxx | 17 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 6 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/presentationdialog.ui | 17 |
5 files changed, 46 insertions, 10 deletions
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 0c2e4619dd7e..27b9ee345878 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -18,6 +18,7 @@ */ #include <officecfg/Office/Impress.hxx> +#include <officecfg/Office/Security.hxx> #include <svl/itemset.hxx> #include <svl/intitem.hxx> #include <svl/eitem.hxx> @@ -70,6 +71,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI , m_xFtNavigationButtonsSize(m_xBuilder->weld_label("navbar_btn_size_label")) , m_xFrameEnableRemote(m_xBuilder->weld_frame("frameremote")) , m_xCbxEnableRemote(m_xBuilder->weld_check_button("enableremote")) + , m_xCbxEnableRemoteInsecure(m_xBuilder->weld_check_button("enableremoteinsecure")) , m_xLbConsole(m_xBuilder->weld_combo_box("console_cb")) , m_xFtMonitor(m_xBuilder->weld_label("presdisplay_label")) , m_xLBMonitor(m_xBuilder->weld_combo_box("presdisplay_cb")) @@ -166,7 +168,11 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI m_xLbConsole->set_active(PresenterConsoleMode::Windowed); #ifdef ENABLE_SDREMOTE + m_xCbxEnableRemote->connect_toggled( LINK(this, SdStartPresentationDlg, ChangeRemoteHdl) ); m_xCbxEnableRemote->set_active(officecfg::Office::Impress::Misc::Start::EnableSdremote::get()); + ChangeRemoteHdl(*m_xCbxEnableRemote); + m_xCbxEnableRemoteInsecure->set_active(m_xCbxEnableRemote->get_active() + && officecfg::Office::Security::Net::AllowInsecureImpressRemoteWiFi::get()); #else m_xFrameEnableRemote->hide(); #endif @@ -204,7 +210,8 @@ short SdStartPresentationDlg::run() m_xLbNavigationButtonsSize->get_active(), batch); #ifdef ENABLE_SDREMOTE - officecfg::Office::Impress::Misc::Start::EnableSdremote::set(m_xCbxEnableRemote->get_active(), batch); + officecfg::Office::Impress::Misc::Start::EnableSdremote::set(m_xCbxEnableRemote->get_active(), batch); + officecfg::Office::Security::Net::AllowInsecureImpressRemoteWiFi::set(m_xCbxEnableRemoteInsecure->get_active(), batch); #endif batch->commit(); } @@ -339,6 +346,11 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr ) pCustomShowList->Seek( nPos ); } +IMPL_LINK_NOARG(SdStartPresentationDlg, ChangeRemoteHdl, weld::Toggleable&, void) +{ + m_xCbxEnableRemoteInsecure->set_sensitive(m_xCbxEnableRemote->get_active()); +} + /** * Handler: Enabled/Disabled Listbox "Dias" */ diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index e7cc165f4c4e..0d626bc234d7 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -59,6 +59,7 @@ private: std::unique_ptr<weld::Label> m_xFtNavigationButtonsSize; std::unique_ptr<weld::Frame> m_xFrameEnableRemote; std::unique_ptr<weld::CheckButton> m_xCbxEnableRemote; + std::unique_ptr<weld::CheckButton> m_xCbxEnableRemoteInsecure; std::unique_ptr<weld::ComboBox> m_xLbConsole; @@ -70,6 +71,7 @@ private: std::unique_ptr<weld::Label> m_xMonitorExternal; std::unique_ptr<weld::Label> m_xExternal; + DECL_LINK(ChangeRemoteHdl, weld::Toggleable&, void); DECL_LINK(ChangeRangeHdl, weld::Toggleable&, void); DECL_LINK(ClickWindowPresentationHdl, weld::Toggleable&, void); void ChangePause(); diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index 3f77758bf728..928f4ef7fc6a 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -12,6 +12,7 @@ #include <vector> #include <officecfg/Office/Impress.hxx> +#include <officecfg/Office/Security.hxx> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> @@ -191,8 +192,8 @@ void IPRemoteServer::setup() void RemoteServer::presentationStarted( const css::uno::Reference< css::presentation::XSlideShowController > &rController ) { - if (!IPRemoteServer::spServer) - return; + // note this can be invoked even when there is no IPRemoteServer instance + // but there are communicators belonging to a BluetoothServer MutexGuard aGuard( sDataMutex ); for ( const auto& rpCommunicator : sCommunicators ) { @@ -201,8 +202,6 @@ void RemoteServer::presentationStarted( const css::uno::Reference< } void RemoteServer::presentationStopped() { - if (!IPRemoteServer::spServer) - return; MutexGuard aGuard( sDataMutex ); for ( const auto& rpCommunicator : sCommunicators ) { @@ -212,8 +211,6 @@ void RemoteServer::presentationStopped() void RemoteServer::removeCommunicator( Communicator const * mCommunicator ) { - if (!IPRemoteServer::spServer) - return; MutexGuard aGuard( sDataMutex ); auto aIt = std::find(sCommunicators.begin(), sCommunicators.end(), mCommunicator); if (aIt != sCommunicators.end()) @@ -352,7 +349,15 @@ void SdDLL::RegisterRemotes() sd::BluetoothServer::setup( &RemoteServer::sCommunicators ); #endif + if (!officecfg::Office::Security::Net::AllowInsecureImpressRemoteWiFi::get()) + { + SAL_WARN("desktop", "Impress remote WiFi is disabled by configuration"); + return; + } + + // this is the IP/WiFi server sd::IPRemoteServer::setup(); + // assumption is that BluetoothServer doesn't need DiscoveryService sd::DiscoveryService::setup(); } diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index d8dbbac0362d..a238ec7fd04b 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -33,6 +33,7 @@ #include <editeng/sizeitem.hxx> #include <editeng/urlfieldhelper.hxx> #include <officecfg/Office/Impress.hxx> +#include <officecfg/Office/Security.hxx> #include <svx/svxids.hrc> #include <svx/svdpagv.hxx> #include <svx/clipfmtitem.hxx> @@ -1010,8 +1011,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) #ifndef ENABLE_SDREMOTE bDisableSdremoteForGood = true; #endif - bDisableSdremoteForGood |= ! ( /*officecfg::Office::Common::Misc::ExperimentalMode::get() &&*/ - officecfg::Office::Impress::Misc::Start::EnableSdremote::get() ); + bDisableSdremoteForGood |= !(officecfg::Office::Impress::Misc::Start::EnableSdremote::get() + && officecfg::Office::Security::Net::AllowInsecureImpressRemoteWiFi::get() + ); // This dialog is only useful for TCP/IP remote control // which is unusual, under-tested and a security issue. diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui b/sd/uiconfig/simpress/ui/presentationdialog.ui index 9829dc38a43f..9a474200f366 100644 --- a/sd/uiconfig/simpress/ui/presentationdialog.ui +++ b/sd/uiconfig/simpress/ui/presentationdialog.ui @@ -777,7 +777,7 @@ <property name="label-xalign">0</property> <property name="shadow-type">none</property> <child> - <!-- n-columns=2 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid" id="grid10"> <property name="visible">True</property> <property name="can-focus">False</property> @@ -816,6 +816,21 @@ <property name="top-attach">0</property> </packing> </child> + <child> + <object class="GtkCheckButton" id="enableremoteinsecure"> + <property name="label" translatable="yes" context="presentationdialog|enableremoteinsecure">Enable insecure WiFi connections</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="tooltip-text" translatable="yes" context="presentationdialog|enableremoteinsecure|tooltip_text">In addition to Bluetooth connections, enable insecure and unencrypted connections via IP on all network interfaces. Not recommended in public settings.</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> </object> </child> <child type="label"> |