From e2a081871aea244ec42d31ac9dc5d132e3b96483 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 12 Nov 2019 13:49:18 +0100 Subject: Better throw RuntimeException than assert here (in case this functionality is ever discovered and called by external code) Change-Id: If127460f58e1d074a32f231385e2c54303e4f98c Reviewed-on: https://gerrit.libreoffice.org/82508 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- uui/source/interactionhandler.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index f90763e1e22e..cc5579fd1ed1 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include "iahndl.hxx" #include @@ -75,25 +76,29 @@ public: virtual void SAL_CALL addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override { - assert(false); + throw css::uno::RuntimeException( + "UUIInteractionHandler addPropertyChangeListener is not supported"); } virtual void SAL_CALL removePropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override { - assert(false); + throw css::uno::RuntimeException( + "UUIInteractionHandler removePropertyChangeListener is not supported"); } virtual void SAL_CALL addVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override { - assert(false); + throw css::uno::RuntimeException( + "UUIInteractionHandler addVetoableChangeListener is not supported"); } virtual void SAL_CALL removeVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override { - assert(false); + throw css::uno::RuntimeException( + "UUIInteractionHandler removeVetoableChangeListener is not supported"); } virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL -- cgit