[Libreoffice-commits] core.git: basctl/source
Michael Stahl
mstahl at redhat.com
Tue Feb 10 05:57:33 PST 2015
basctl/source/dlged/dlgedobj.cxx | 15 +++++++++++++--
basctl/source/inc/dlgedobj.hxx | 2 +-
2 files changed, 14 insertions(+), 3 deletions(-)
New commits:
commit 5b8947a093216a546881a749dec8d637ff1b7dd1
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Feb 10 14:49:23 2015 +0100
coverity#1268024 coverity#1267686: basctl: uncaught exception
DlgEdObj::_propertyChange() should have same exception spec. as
XPropertyChangeListener::propertyChange().
Change-Id: I8d5b628b7cc382dae55a9e17bf813fba647453eb
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 017bf20..7d11c5a 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -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,7 +1152,17 @@ void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::Propert
else if ( evt.PropertyName == DLGED_PROP_NAME )
{
if (!dynamic_cast<DlgEdForm*>(this))
- NameChange(evt);
+ {
+ try
+ {
+ NameChange(evt);
+ }
+ catch (container::NoSuchElementException const& e)
+ {
+ throw lang::WrappedTargetRuntimeException("", nullptr,
+ uno::makeAny(e));
+ }
+ }
}
// update step
else if ( evt.PropertyName == DLGED_PROP_STEP )
diff --git a/basctl/source/inc/dlgedobj.hxx b/basctl/source/inc/dlgedobj.hxx
index c75431c..0bbd9d5 100644
--- a/basctl/source/inc/dlgedobj.hxx
+++ b/basctl/source/inc/dlgedobj.hxx
@@ -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);
More information about the Libreoffice-commits
mailing list