diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-11-27 17:08:22 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-11-27 17:20:31 +0100 |
commit | 6aefcb6a6f90896754f3432e5ae41403998b7ab0 (patch) | |
tree | dd5b8c935cf2c377b307770aa4bc7f1a372d9fca /forms/source/component/Grid.cxx | |
parent | FontControlModel::convertFastPropertyValue: fix bad cast of Kerning (diff) | |
download | core-6aefcb6a6f90896754f3432e5ae41403998b7ab0.tar.gz core-6aefcb6a6f90896754f3432e5ae41403998b7ab0.zip |
forms: avoid deadlock when setting FontControlModel properties
Deadlock found in forms_unoapi on Windows, with
OGridControlModel::setFastPropertyValue_NoBroadcast() calling event
handler that tries to lock SolarMutex.
FontControlModel::setFastPropertyValue_NoBroadcast() and its callers in
3 other classes must not send events via firePropertyChange()
because they are called by OPropertySetHelper::setFastPropertyValues()
with its Mutex locked.
It is possible (though sadly quite convoluted) to delay the sending of
the events by calling setDependentFastPropertyValue() instead.
Change-Id: I0c767cfec01fe1bcaeb1236287b5faf81a2e7441
Diffstat (limited to 'forms/source/component/Grid.cxx')
-rw-r--r-- | forms/source/component/Grid.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index c81675f77084..bb526353e3c9 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -707,12 +707,9 @@ void OGridControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, con default: if ( isFontRelatedProperty( nHandle ) ) { - FontDescriptor aOldFont( getFont() ); - - FontControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); - - if ( isFontAggregateProperty( nHandle ) ) - firePropertyChange( PROPERTY_ID_FONT, makeAny( getFont() ), makeAny( aOldFont ) ); + FontControlModel::setFastPropertyValue_NoBroadcast_impl( + *this, &OGridControlModel::setDependentFastPropertyValue, + nHandle, rValue); } else OControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); |