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/richtext | |
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/richtext')
-rw-r--r-- | forms/source/richtext/richtextmodel.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 226baddfb4de..592b0d2656d2 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -391,12 +391,9 @@ namespace frm } else 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, &ORichTextModel::setDependentFastPropertyValue, + _nHandle, _rValue); } else { |