svx/source/unodraw/unoshape.cxx |   26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

New commits:
commit 878c2da6d2d5576d6c3266b38eae4ac80bcbe2c1
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Oct 16 11:52:11 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Oct 16 17:20:28 2023 +0200

    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.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 949728d4bf12..c7fb448fe575 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");
+        }
+
     }
 }
 

Reply via email to