//#include #include #include #include #include #include #include #include "event.hxx" using namespace com::sun::star::uno; using namespace com::sun::star::xml::dom; using namespace com::sun::star::xml::dom::events; namespace DOM { namespace events { typedef std::vector< xmlNodePtr > NodeVector; typedef std::multimap< xmlNodePtr, Reference< com::sun::star::xml::dom::events::XEventListener> > ListenerMap; typedef std::map TypeListenerMap; typedef std::vector ListenerPairVector; class CEventDispatcher { private: static TypeListenerMap captureListeners; static TypeListenerMap targetListeners; public: static sal_Bool dispatchEvent(xmlNodePtr aNode, const Reference< XEvent >& aEvent); static void addListener( xmlNodePtr pNode, OUString aType, const Reference& aListener, sal_Bool bCapture); static void removeListener( xmlNodePtr pNode, OUString aType, const Reference& aListener, sal_Bool bCapture); static void callListeners( xmlNodePtr pNode, OUString aType, const Reference< XEvent >& xEvent, sal_Bool bCapture); }; }}