Kaydet (Commit) 994723a9 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sdremote: Disable Impress Remote in the menu also when not allowed in Options.

Change-Id: Ida8a3847a54c5415e1802a6688e110202bac35c1
üst 576943b9
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include "officecfg/Office/Common.hxx" #include <officecfg/Office/Common.hxx>
#include "officecfg/Office/Impress.hxx" #include <officecfg/Office/Impress.hxx>
#include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/container/XNameContainer.hpp>
...@@ -305,12 +305,11 @@ void SdDLL::RegisterRemotes() ...@@ -305,12 +305,11 @@ void SdDLL::RegisterRemotes()
// Disable unless in experimental mode for now // Disable unless in experimental mode for now
SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" ); SAL_INFO( "sdremote", "SdDLL::RegisterRemotes called" );
uno::Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); 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; return;
sd::RemoteServer::setup(); sd::RemoteServer::setup();
sd::DiscoveryService::setup(); sd::DiscoveryService::setup();
} }
bool RemoteServer::isBluetoothDiscoverable() bool RemoteServer::isBluetoothDiscoverable()
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <editeng/eeitem.hxx> #include <editeng/eeitem.hxx>
#include <editeng/flditem.hxx> #include <editeng/flditem.hxx>
#include <editeng/outlobj.hxx> #include <editeng/outlobj.hxx>
#include <officecfg/Office/Impress.hxx>
#include <svx/svxids.hrc> #include <svx/svxids.hrc>
#include <svx/svdpagv.hxx> #include <svx/svdpagv.hxx>
#include <svx/clipfmtitem.hxx> #include <svx/clipfmtitem.hxx>
...@@ -995,10 +996,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) ...@@ -995,10 +996,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_ZOOM_PREV); rSet.DisableItem(SID_ZOOM_PREV);
} }
bool bDisableSdremoteForGood = false;
#ifndef ENABLE_SDREMOTE #ifndef ENABLE_SDREMOTE
rSet.ClearItem(SID_REMOTE_DLG); bDisableSdremoteForGood = true;
rSet.DisableItem(SID_REMOTE_DLG);
#endif #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 // EditText aktiv
if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != NULL) if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment