diff options
author | Sarper Akdemir <sarper.akdemir.extern@allotropia.de> | 2023-12-18 16:37:16 +0300 |
---|---|---|
committer | Sarper Akdemir <sarper.akdemir.extern@allotropia.de> | 2023-12-20 20:15:29 +0100 |
commit | 9157d8de8d8a7a2707179f371f4e4771f41777be (patch) | |
tree | 21b4f8591350852e11f1f1dfe3fe50633bb12225 /svl/source/svdde/ddesvr.cxx | |
parent | 7bb50fd2398220c3b162e7242c1cc8d6c4c31463 (diff) |
tdf#158375: disable DDE when DisableActiveContent is set
Change-Id: I167f6ea5d740b5a53cd02a9b865e65ff980a8877
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160922
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'svl/source/svdde/ddesvr.cxx')
-rw-r--r-- | svl/source/svdde/ddesvr.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx index 327fb9a8f5d3..3df8b5a570a5 100644 --- a/svl/source/svdde/ddesvr.cxx +++ b/svl/source/svdde/ddesvr.cxx @@ -26,6 +26,7 @@ #include <osl/thread.h> #include <o3tl/sorted_vector.hxx> #include <o3tl/char16_t2wchar_t.hxx> +#include <officecfg/Office/Common.hxx> namespace { @@ -354,12 +355,16 @@ DdeService::DdeService( const OUString& rService ) if ( !pInst->hDdeInstSvr ) { - nStatus = sal::static_int_cast< short >( - DdeInitializeW( &pInst->hDdeInstSvr, - DdeInternal::SvrCallback, - APPCLASS_STANDARD | - CBF_SKIP_REGISTRATIONS | - CBF_SKIP_UNREGISTRATIONS, 0 ) ); + nStatus = DMLERR_SYS_ERROR; + if ( !officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() ) + { + nStatus = sal::static_int_cast< short >( + DdeInitializeW( &pInst->hDdeInstSvr, + DdeInternal::SvrCallback, + APPCLASS_STANDARD | + CBF_SKIP_REGISTRATIONS | + CBF_SKIP_UNREGISTRATIONS, 0 ) ); + } pInst->pServicesSvr = new DdeServices; } else |