Related: tdf#157726 restore try/catch block
before
commit de42529ca9107b24b6367b40801300416d4a51a1
Date: Wed Sep 6 14:49:19 2023 +0200
replace svx::PropertyValueProvider with simpler implementation
PropertyChangeNotifier::notifyPropertyChange had a try/catch, but
afterwards SvxShape::notifyPropertyChange doesn't
Change-Id: If78732bea08d0f760b3b616ad55d28d40fa50fcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158026
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 949728d..c7fb448 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -264,15 +264,23 @@ void SvxShape::notifyPropertyChange(const OUString& rPropName)
mpImpl->maPropertyChangeListeners.getContainer( g, OUString() );
if (pPropListeners || pAllListeners)
{
// Handle/OldValue not supported
beans::PropertyChangeEvent aEvt;
aEvt.Source = static_cast<cppu::OWeakObject*>(this);
aEvt.PropertyName = rPropName;
aEvt.NewValue = getPropertyValue(rPropName);
if (pPropListeners)
pPropListeners->notifyEach( g, &beans::XPropertyChangeListener::propertyChange, aEvt );
if (pAllListeners)
pAllListeners->notifyEach( g, &beans::XPropertyChangeListener::propertyChange, aEvt );
try
{
// Handle/OldValue not supported
beans::PropertyChangeEvent aEvt;
aEvt.Source = static_cast<cppu::OWeakObject*>(this);
aEvt.PropertyName = rPropName;
aEvt.NewValue = getPropertyValue(rPropName);
if (pPropListeners)
pPropListeners->notifyEach( g, &beans::XPropertyChangeListener::propertyChange, aEvt );
if (pAllListeners)
pAllListeners->notifyEach( g, &beans::XPropertyChangeListener::propertyChange, aEvt );
}
catch( const Exception& )
{
DBG_UNHANDLED_EXCEPTION("svx");
}
}
}