29#include <com/sun/star/document/XEventsSupplier.hpp>
30#include <com/sun/star/document/XEmbeddedScripts.hpp>
47 css::uno::Reference< css::frame::XModel >
m_xModel;
48 css::uno::Reference< css::document::XEmbeddedScripts > m_xDocumentScripts;
52 XMLScriptChildContext( SvXMLImport& rImport,
53 const css::uno::Reference< css::frame::XModel>& rxModel,
57 sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
override;
62XMLScriptChildContext::XMLScriptChildContext( SvXMLImport& rImport,
66 ,m_xDocumentScripts( rxModel, UNO_QUERY )
67 ,m_aLanguage(
std::move( aLanguage ))
71css::uno::Reference< css::xml::sax::XFastContextHandler > XMLScriptChildContext::createFastChildContext(
72 sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
74 if ( m_xDocumentScripts.is() )
76 OUString aBasic( GetImport().GetNamespaceMap().GetPrefixByKey(
XML_NAMESPACE_OOO ) +
":Basic" );
102 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
110 uno::Sequence< beans::PropertyValue > aMedDescr =
m_xModel->getArgs();
111 sal_Int32 nNewLen = aMedDescr.getLength() + 1;
112 aMedDescr.realloc( nNewLen );
113 auto pMedDescr = aMedDescr.getArray();
114 pMedDescr[nNewLen-1].Name =
"BreakMacroSignature";
115 pMedDescr[nNewLen-1].Value <<=
true;
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override
Import <script:events> element.
css::uno::Reference< css::frame::XModel > m_xModel
XMLScriptContext(SvXMLImport &rImport, const css::uno::Reference< css::frame::XModel > &rDocModel)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual ~XMLScriptContext() override
Reference< frame::XModel > m_xModel
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)
constexpr sal_uInt16 XML_NAMESPACE_OOO