summaryrefslogtreecommitdiffstats
path: root/forms/source/richtext
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-11-27 17:08:22 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-27 17:20:31 +0100
commit6aefcb6a6f90896754f3432e5ae41403998b7ab0 (patch)
treedd5b8c935cf2c377b307770aa4bc7f1a372d9fca /forms/source/richtext
parentFontControlModel::convertFastPropertyValue: fix bad cast of Kerning (diff)
downloadcore-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.cxx9
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
{