diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-01-18 16:23:30 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-01-18 16:23:30 +0000 |
commit | 27fae383655a97ee66091a26260930213b6ce5cb (patch) | |
tree | dec9c4064ef85ac5684d9e346091a84c0f84f4a2 /cppuhelper/source/propshlp.cxx | |
parent | #96692# changed description of SearchResult to reflect reality (diff) | |
download | core-27fae383655a97ee66091a26260930213b6ce5cb.tar.gz core-27fae383655a97ee66091a26260930213b6ce5cb.zip |
#96579#: setFastPropertyValue: calling setFastPropertyValue_NoBroadcast needs to care for the exceptions thrown
Diffstat (limited to 'cppuhelper/source/propshlp.cxx')
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index f3f83107f1a6..2a01375e8af6 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: propshlp.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: hr $ $Date: 2001-09-11 13:45:22 $ + * last change: $Author: fs $ $Date: 2002-01-18 17:23:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -453,10 +453,28 @@ void OPropertySetHelper::setFastPropertyValue( sal_Int32 nHandle, const Any& rVa } { - MutexGuard aGuard( rBHelper.rMutex ); - // set the property to the new value - setFastPropertyValue_NoBroadcast( nHandle, aConvertedVal ); - // release guard to fire events + MutexGuard aGuard( rBHelper.rMutex ); + try + { + // set the property to the new value + setFastPropertyValue_NoBroadcast( nHandle, aConvertedVal ); + } + catch (const ::com::sun::star::beans::UnknownPropertyException& ) { throw; /* allowed to leave */ } + catch (const ::com::sun::star::beans::PropertyVetoException& ) { throw; /* allowed to leave */ } + catch (const ::com::sun::star::lang::IllegalArgumentException& ) { throw; /* allowed to leave */ } + catch (const ::com::sun::star::lang::WrappedTargetException& ) { throw; /* allowed to leave */ } + catch (const ::com::sun::star::uno::RuntimeException& ) { throw; /* allowed to leave */ } + catch (const ::com::sun::star::uno::Exception& e ) + { + // not allowed to leave this meathod + ::com::sun::star::lang::WrappedTargetException aWrap; + aWrap.Context = static_cast< ::com::sun::star::beans::XPropertySet* >( this ); + aWrap.TargetException <<= e; + + throw ::com::sun::star::lang::WrappedTargetException( aWrap ); + } + + // release guard to fire events } // file a change event, if the value changed fire( &nHandle, &rValue, &aOldVal, 1, sal_False ); |