24#include <com/sun/star/document/XEventsSupplier.hpp>
35using ::com::sun::star::beans::PropertyValue;
36using ::com::sun::star::container::XNameReplace;
37using ::com::sun::star::document::XEventsSupplier;
38using ::com::sun::star::lang::IllegalArgumentException;
49 const Reference<XEventsSupplier> & xEventsSupplier) :
51 m_xEvents(xEventsSupplier->getEvents())
58 const Reference<XNameReplace> & xNameReplace) :
60 m_xEvents(xNameReplace)
73 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
86 OUString sValue = aIter.toString();
101 return GetImport().GetEventImport().CreateContext(
102 GetImport(), xAttrList,
this, sEventName, sLanguage);
106 const Reference<XEventsSupplier> & xEventsSupplier)
108 if (xEventsSupplier.is())
115 const Reference<XNameReplace> & xNameRepl)
131 const OUString& rName,
132 Sequence<PropertyValue> & rSequence )
144 rSequence = aIter->second;
149 const OUString& rEventName,
150 const Sequence<PropertyValue> & rValues )
161 }
catch (
const IllegalArgumentException & rException )
163 Sequence<OUString> aMsgParams { rEventName };
167 aMsgParams, rException.Message,
nullptr);
::std::pair< OUString, css::uno::Sequence< css::beans::PropertyValue > > EventNameValuesPair
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
XMLEventsImportContext(SvXMLImport &rImport)
css::uno::Reference< css::container::XNameReplace > m_xEvents
void GetEventSequence(const OUString &rName, css::uno::Sequence< css::beans::PropertyValue > &rSequence)
if the import operates in delayed mode, you can use this method to obtain the value sequence for a sp...
std::vector< EventNameValuesPair > m_aCollectEvents
void SetEvents(const css::uno::Reference< css::document::XEventsSupplier > &xEventsSupplier)
if the import operates in delayed mode, you can use this method to set all events that have been read...
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 ~XMLEventsImportContext() override
void AddEventValues(const OUString &rEventName, const css::uno::Sequence< css::beans::PropertyValue > &rValues)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
#define XMLERROR_ILLEGAL_EVENT
#define XMLERROR_FLAG_ERROR
#define XML_ELEMENT(prefix, name)