I suspect that the appended is a better fix for
https://gerrit.libreoffice.org/#/c/3894/
Though clearly the way this interacts with the boilerplate is not
terribly satisfying :-)
Of course, ideally I'd like to undo -all- the locking, and assume that
in every case we require the solar mutex - except when the GUI thread is
idle - effectively serializing everything on the solar mutex: and then
ease that back in a few, selected cases where threading truly makes
sense but ... ;-)
Thoughts ?
Michael.
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 15dc234..f549b20 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -67,6 +67,9 @@ namespace frm
,m_bSettingEngineText( false )
,m_aModifyListeners ( m_aMutex )
{
+ // called from auto-generated factory function via UNO.
+ SolarMutexGuard aGuard;
+
DBG_CTOR( ORichTextModel, NULL );
m_nClassId = FormComponentType::TEXTFIELD;
@@ -100,6 +103,9 @@ namespace frm
,m_bSettingEngineText( false )
,m_aModifyListeners ( m_aMutex )
{
+ // called from auto-generated factory function via UNO.
+ SolarMutexGuard aGuard;
+
DBG_CTOR( ORichTextModel, NULL );
m_aTabStop = _pOriginal->m_aTabStop;
@@ -208,6 +214,9 @@ namespace frm
//--------------------------------------------------------------------
ORichTextModel::~ORichTextModel( )
{
+ // called via UNO / auto-generated boilerplate
+ SolarMutexGuard aGuard;
+
if ( !OComponentHelper::rBHelper.bDisposed )
{
acquire();
--
michael.meeks@suse.com <><, Pseudo Engineer, itinerant idiot
Context
- locking foo ... · Michael Meeks
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.