diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/linkmgr2.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx index f529fb11d468..a20501a1bad6 100644 --- a/sfx2/source/appl/linkmgr2.cxx +++ b/sfx2/source/appl/linkmgr2.cxx @@ -21,6 +21,7 @@ #include <sfx2/linkmgr.hxx> #include <sfx2/sfxsids.hrc> #include <com/sun/star/document/UpdateDocMode.hpp> +#include <officecfg/Office/Common.hxx> #include <osl/file.hxx> #include <sfx2/objsh.hxx> #include <svl/urihelper.hxx> @@ -281,6 +282,11 @@ void LinkManager::UpdateAllLinks( bool bUpdateGrfLinks, weld::Window* pParentWin ) { + // when active content is disabled don't bother updating all links + // also (when bAskUpdate == true) don't show the pop up. + if(officecfg::Office::Common::Security::Scripting::DisableActiveContent::get()) + return; + // First make a copy of the array in order to update links // links in ... no contact between them! std::vector<SvBaseLink*> aTmpArr; @@ -354,8 +360,12 @@ SvLinkSourceRef LinkManager::CreateObj( SvBaseLink const * pLink ) case SvBaseLinkObjectType::ClientOle: return new SvFileObject; case SvBaseLinkObjectType::Internal: + if(officecfg::Office::Common::Security::Scripting::DisableActiveContent::get()) + return SvLinkSourceRef(); return new SvxInternalLink; case SvBaseLinkObjectType::ClientDde: + if (officecfg::Office::Common::Security::Scripting::DisableActiveContent::get()) + return SvLinkSourceRef(); return new SvDDEObject; default: return SvLinkSourceRef(); diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 7fd3b3d530d5..eea1751cd57e 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -33,6 +33,7 @@ #include <tools/debug.hxx> #include <svl/svdde.hxx> #include <osl/diagnose.h> +#include <officecfg/Office/Common.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -301,6 +302,9 @@ void SvBaseLink::clearStreamToLoadFrom() bool SvBaseLink::Update() { + if(officecfg::Office::Common::Security::Scripting::DisableActiveContent::get()) + return false; + if( isClientType(mnObjType) ) { AddNextRef(); |