tdf#158375: add expert option DisableOLEAutomation
Add a disable option for OLE Automation interface that is used only on Windows. Change-Id: I86f212977bb604fbae6ac2603bee037b32b5036c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161035 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
This commit is contained in:
parent
5372538648
commit
8f4ff4c601
3 changed files with 17 additions and 1 deletions
|
@ -11,6 +11,10 @@
|
|||
|
||||
$(eval $(call gb_Library_Library,oleautobridge))
|
||||
|
||||
$(eval $(call gb_Library_use_custom_headers,oleautobridge,\
|
||||
officecfg/registry \
|
||||
))
|
||||
|
||||
$(eval $(call gb_Library_set_componentfile,oleautobridge,extensions/source/ole/oleautobridge,services))
|
||||
|
||||
$(eval $(call gb_Library_use_api,oleautobridge,\
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <o3tl/any.hxx>
|
||||
#include <o3tl/char16_t2wchar_t.hxx>
|
||||
#include <officecfg/Office/Common.hxx>
|
||||
#include <ooo/vba/XHelperInterface.hpp>
|
||||
#include <sal/log.hxx>
|
||||
|
||||
|
@ -144,8 +145,12 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP OneInstanceOleWrapper::CreateInstance(IUnknown
|
|||
|
||||
SAL_INFO("extensions.olebridge", "OneInstanceOleWrapper::CreateInstance(" << riid << ")");
|
||||
|
||||
HRESULT ret = ResultFromScode(E_UNEXPECTED);
|
||||
if (officecfg::Office::Common::Security::Scripting::DisableOLEAutomation::get())
|
||||
{
|
||||
return ResultFromScode(E_NOINTERFACE);
|
||||
}
|
||||
|
||||
HRESULT ret = ResultFromScode(E_UNEXPECTED);
|
||||
const Reference<XInterface>& xInst = m_xInstFunction();
|
||||
if (xInst.is())
|
||||
{
|
||||
|
|
|
@ -2524,6 +2524,13 @@
|
|||
</info>
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="DisableOLEAutomation" oor:type="xs:boolean" oor:nillable="false">
|
||||
<info>
|
||||
<desc>Specifies whether or not to disable OLE Automation interface.
|
||||
</desc>
|
||||
</info>
|
||||
<value>false</value>
|
||||
</prop>
|
||||
<prop oor:name="CheckDocumentEvents" oor:type="xs:boolean" oor:nillable="false">
|
||||
<info>
|
||||
<desc>Warn on load when a document binds an event to a macro</desc>
|
||||
|
|
Loading…
Reference in a new issue