diff options
author | Daniel Sikeler <d.sikeler94@gmail.com> | 2015-08-21 17:39:34 +0200 |
---|---|---|
committer | Daniel Sikeler <d.sikeler94@gmail.com> | 2015-08-21 17:39:34 +0200 |
commit | 421af826aff0ab31cbe6d286a50b25289d17daa0 (patch) | |
tree | 503a89f1581a814ea83109cd5a5426d6c64e4281 | |
parent | 3fdf16115ed1c567c0f49932a4646a865b1e914b (diff) |
fastparser impl. for XMLMacroFieldImportContext
Change-Id: I59254c61b76d5253a3dc0f45906314bfeb0b0b48
-rw-r--r-- | xmloff/inc/txtfldi.hxx | 7 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 31 |
2 files changed, 38 insertions, 0 deletions
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 4138b9b2de30..6bdc5ad528a9 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -1020,6 +1020,9 @@ public: XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, const OUString& sLocalName); + XMLMacroFieldImportContext( SvXMLImport& rImport, + XMLTextImportHelper& rHlp, + sal_Int32 Element ); protected: /// for <office:events> children @@ -1028,6 +1031,10 @@ protected: const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList> & xAttrList ) SAL_OVERRIDE; + virtual css::uno::Reference< css::xml::sax::XFastContextHandler > + createFastChildContext( sal_Int32 Element, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) + throw(css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE; /// process attribute values virtual void ProcessAttribute( sal_uInt16 nAttrToken, diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 0b9ffba56ea3..2f11dfa5c8cf 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2876,6 +2876,18 @@ XMLMacroFieldImportContext::XMLMacroFieldImportContext( { } +XMLMacroFieldImportContext::XMLMacroFieldImportContext( + SvXMLImport& rImport, + XMLTextImportHelper& rHlp, + sal_Int32 Element ) +: XMLTextFieldImportContext( rImport, rHlp, sAPI_macro, Element ), + sPropertyHint(sAPI_hint), + sPropertyMacroName("MacroName"), + sPropertyScriptURL("ScriptURL"), + bDescriptionOK(false) +{ +} + SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -2899,6 +2911,25 @@ SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext( return pContext; } +Reference< XFastContextHandler > XMLMacroFieldImportContext::createFastChildContext( + sal_Int32 Element, + const Reference< XFastAttributeList >& xAttrList ) + throw( RuntimeException, SAXException, std::exception ) +{ + Reference< XFastContextHandler > pContext = NULL; + + if( Element == (NAMESPACE | XML_NAMESPACE_OFFICE | XML_event_listeners) ) + { + // create events context and remember it! + pContext = new XMLEventsImportContext( GetImport(), Element ); + xEventContext = static_cast< SvXMLImportContext *>( pContext.get() ); + bValid = true; + } + else + pContext = SvXMLImportContext::createFastChildContext( Element, xAttrList ); + + return pContext; +} void XMLMacroFieldImportContext::ProcessAttribute( sal_uInt16 nAttrToken, |