summaryrefslogtreecommitdiff
path: root/unoxml/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-09-13 15:23:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-14 08:40:04 +0200
commitb20e79494c8e7627e941343b0acc3dd74df6cb75 (patch)
treeb47456b4dd99c379a12ee07b4baecb97cb2c1d3d /unoxml/source
parentee6de54dde08a607ea3590804436678ee6363f7e (diff)
use more concrete UNO type in DOM::CElementListImpl
Change-Id: I5a480714fc85d623e524e7862e90e76cd65b5c0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173351 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'unoxml/source')
-rw-r--r--unoxml/source/dom/elementlist.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index dcea592d8718..00ebe21013b8 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -26,6 +26,7 @@
#include <o3tl/safeint.hxx>
#include <utility>
#include <comphelper/diagnose_ex.hxx>
+#include <unotools/weakref.hxx>
#include "element.hxx"
#include "document.hxx"
@@ -33,25 +34,25 @@
using namespace css::uno;
using namespace css::xml::dom;
using namespace css::xml::dom::events;
+namespace DOM { class CElementListImpl; }
namespace
{
class WeakEventListener : public ::cppu::WeakImplHelper<css::xml::dom::events::XEventListener>
{
private:
- css::uno::WeakReference<css::xml::dom::events::XEventListener> mxOwner;
+ unotools::WeakReference<DOM::CElementListImpl> mxOwner;
public:
- explicit WeakEventListener(const css::uno::Reference<css::xml::dom::events::XEventListener>& rOwner)
+ explicit WeakEventListener(const rtl::Reference<DOM::CElementListImpl>& rOwner)
: mxOwner(rOwner)
{
}
virtual void SAL_CALL handleEvent(const css::uno::Reference<css::xml::dom::events::XEvent>& rEvent) override
{
- css::uno::Reference<css::xml::dom::events::XEventListener> xOwner(mxOwner.get(),
- css::uno::UNO_QUERY);
- if (xOwner.is())
+ rtl::Reference<DOM::CElementListImpl> xOwner(mxOwner);
+ if (xOwner)
xOwner->handleEvent(rEvent);
}
};