diff options
author | Noel Grandin <noel@peralex.com> | 2013-05-02 10:36:43 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2013-05-22 10:44:29 +0000 |
commit | 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 (patch) | |
tree | 2746468845d6f1159e3759ee2cf7a620fca15b6e /unoxml/source/dom/element.cxx | |
parent | 697a007c61b9cabceb9767fad87cd5822b300452 (diff) |
Use the new type-checking Reference constructor to reduce code noise
Also create a Clang compiler plugin to detect such cases.
Change-Id: I61ad1a1d6b1c017eeb51f226d2dde0e9bb7f1752
Reviewed-on: https://gerrit.libreoffice.org/4001
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unoxml/source/dom/element.cxx')
-rw-r--r-- | unoxml/source/dom/element.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index 0149ca972768..41cfb0f0a515 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -575,13 +575,13 @@ namespace DOM Reference< XMutationEvent > event(docevent->createEvent( "DOMAttrModified"), UNO_QUERY); event->initMutationEvent("DOMAttrModified", - sal_True, sal_False, Reference< XNode >(xAttr, UNO_QUERY), + sal_True, sal_False, xAttr, OUString(), xAttr->getValue(), xAttr->getName(), AttrChangeType_ADDITION); guard.clear(); // release mutex before calling event handlers - dispatchEvent(Reference< XEvent >(event, UNO_QUERY)); + dispatchEvent(event); dispatchSubtreeModified(); return xAttr; @@ -645,7 +645,7 @@ namespace DOM oldValue, value, name, aChangeType); guard.clear(); // release mutex before calling event handlers - dispatchEvent(Reference< XEvent >(event, UNO_QUERY)); + dispatchEvent(event); dispatchSubtreeModified(); } @@ -727,7 +727,7 @@ namespace DOM oldValue, value, qualifiedName, aChangeType); guard.clear(); // release mutex before calling event handlers - dispatchEvent(Reference< XEvent >(event, UNO_QUERY)); + dispatchEvent(event); dispatchSubtreeModified(); } |