summaryrefslogtreecommitdiff
path: root/unoxml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-15 21:23:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-16 22:22:31 +0200
commit68f8200e1cd22ad9e65d7fce6dfae8f3a24d88c7 (patch)
tree3d2644aef948f619168b8da3cc0ccbb1d5bbdc15 /unoxml
parent4f72d2ec6c210232e0abd4965e215611e807c125 (diff)
ofz: timeouts in fods/fodt/fodp
Change-Id: I543d4bc41d06712cef81b8b0853144625f0b9940 Reviewed-on: https://gerrit.libreoffice.org/43413 Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/events/eventdispatcher.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx
index a68256a278fa..51572eea5e99 100644
--- a/unoxml/source/events/eventdispatcher.cxx
+++ b/unoxml/source/events/eventdispatcher.cxx
@@ -107,6 +107,18 @@ namespace DOM { namespace events {
xmlNodePtr const pNode, Reference<XNode> const& xNode,
Reference< XEvent > const& i_xEvent) const
{
+ TypeListenerMap captureListeners;
+ TypeListenerMap targetListeners;
+ {
+ ::osl::MutexGuard g(rMutex);
+
+ captureListeners = m_CaptureListeners;
+ targetListeners = m_TargetListeners;
+ }
+
+ if (captureListeners.empty() && targetListeners.empty())
+ return true;
+
CEvent *pEvent = nullptr; // pointer to internal event representation
OUString const aType = i_xEvent->getType();
@@ -180,8 +192,6 @@ namespace DOM { namespace events {
typedef std::vector< ::std::pair<Reference<XEventTarget>, xmlNodePtr> >
NodeVector_t;
NodeVector_t captureVector;
- TypeListenerMap captureListeners;
- TypeListenerMap targetListeners;
{
::osl::MutexGuard g(rMutex);
@@ -193,8 +203,6 @@ namespace DOM { namespace events {
captureVector.emplace_back(xRef, cur);
cur = cur->parent;
}
- captureListeners = m_CaptureListeners;
- targetListeners = m_TargetListeners;
}
// the capture vector now holds the node path from target to root