summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/sdxmlimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/draw/sdxmlimp.cxx')
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx23
1 files changed, 13 insertions, 10 deletions
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 66f6643d6215..98a4ebccbbd3 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -173,15 +173,6 @@ SvXMLImportContextRef SdXMLDocContext_Impl::CreateChildContext(
SAL_INFO("xmloff.draw", "XML_TOK_DOC_META: should not have come here, maybe document is invalid?");
break;
}
- case XML_TOK_DOC_SCRIPT:
- {
- if( GetImport().getImportFlags() & SvXMLImportFlags::SCRIPTS )
- {
- // office:script inside office:document
- xContext = new XMLScriptContext( GetSdImport(), rLocalName, GetSdImport().GetModel() );
- }
- break;
- }
case XML_TOK_DOC_BODY:
{
if( GetImport().getImportFlags() & SvXMLImportFlags::CONTENT )
@@ -198,8 +189,20 @@ SvXMLImportContextRef SdXMLDocContext_Impl::CreateChildContext(
}
uno::Reference< xml::sax::XFastContextHandler > SAL_CALL SdXMLDocContext_Impl::createFastChildContext(
- sal_Int32 /*nElement*/, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
+ sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& /*xAttrList*/ )
{
+ switch (nElement)
+ {
+ case XML_ELEMENT(OFFICE, XML_SCRIPTS):
+ {
+ if( GetImport().getImportFlags() & SvXMLImportFlags::SCRIPTS )
+ {
+ // office:script inside office:document
+ return new XMLScriptContext( GetSdImport(), GetSdImport().GetModel() );
+ }
+ break;
+ }
+ }
return nullptr;
}