Kaydet (Commit) 5b8947a0 authored tarafından Michael Stahl's avatar Michael Stahl

coverity#1268024 coverity#1267686: basctl: uncaught exception

DlgEdObj::_propertyChange() should have same exception spec. as
XPropertyChangeListener::propertyChange().

Change-Id: I8d5b628b7cc382dae55a9e17bf813fba647453eb
üst eb01f58e
......@@ -35,6 +35,7 @@
#include <com/sun/star/awt/XVclContainerPeer.hpp>
#include <com/sun/star/container/XContainer.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <com/sun/star/script/XScriptEventsSupplier.hpp>
#include <o3tl/compat_functional.hxx>
#include <unotools/sharedunocomponent.hxx>
......@@ -1121,7 +1122,7 @@ void DlgEdObj::EndListening(bool bRemoveListener)
}
}
void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw(css::container::NoSuchElementException, css::uno::RuntimeException, std::exception)
void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (css::uno::RuntimeException, std::exception)
{
if (isListening())
{
......@@ -1151,8 +1152,18 @@ void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::Propert
else if ( evt.PropertyName == DLGED_PROP_NAME )
{
if (!dynamic_cast<DlgEdForm*>(this))
{
try
{
NameChange(evt);
}
catch (container::NoSuchElementException const& e)
{
throw lang::WrappedTargetRuntimeException("", nullptr,
uno::makeAny(e));
}
}
}
// update step
else if ( evt.PropertyName == DLGED_PROP_STEP )
{
......
......@@ -121,7 +121,7 @@ public:
void SAL_CALL TabIndexChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw( ::com::sun::star::uno::RuntimeException);
// PropertyChangeListener
void SAL_CALL _propertyChange(const css::beans::PropertyChangeEvent& evt) throw (css::container::NoSuchElementException, css::uno::RuntimeException, std::exception);
void SAL_CALL _propertyChange(const css::beans::PropertyChangeEvent& evt) throw (css::uno::RuntimeException, std::exception);
// ContainerListener
void SAL_CALL _elementInserted( const ::com::sun::star::container::ContainerEvent& Event ) throw(::com::sun::star::uno::RuntimeException);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment