diff options
Diffstat (limited to 'embeddedobj/source/msole/oleembed.cxx')
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 8379a78693f1..69b3ca8d239e 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -52,7 +52,7 @@ #include <comphelper/propertyvalue.hxx> #include <sal/log.hxx> #include <comphelper/diagnose_ex.hxx> - +#include <officecfg/Office/Common.hxx> #include <targetstatecontrol.hxx> @@ -438,6 +438,9 @@ bool OleEmbeddedObject::TryToConvertToOOo( const uno::Reference< io::XStream >& void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) { + if ( officecfg::Office::Common::Security::Scripting::DisableActiveContent::get() + && nNewState != embed::EmbedStates::LOADED ) + throw embed::UnreachableStateException(); // begin wrapping related part ==================== uno::Reference< embed::XEmbeddedObject > xWrappedObject = m_xWrappedObject; if ( xWrappedObject.is() ) |