summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-17 15:18:10 +0200
committerMichael Stahl <mstahl@redhat.com>2015-06-18 13:10:46 +0200
commit8aac888a3bd933a2c67d0104077c5ec9fee448c5 (patch)
treecff449a72d880dcdb1ecdc4e2bbdedd31164c3fb /forms
parent1a1d15b422bc9bb787f939c28e520ca23debe28b (diff)
Some missing SolarMutexGuard around VclPtr acquire/release
At least OutputDevice::acquire/release use a plain unguarded int and ++, --, so apparently rely on the SolarMutex being locked whenever they are called. Fixed those places that caused "make check" to fail for me when temporarily adding DBG_TESTSOLARMUTEX() to OutputDevice::acquire/release. (A recurring pattern is that a class fails to ensure the SolarMutex is locked around the destruction of non-null VclPtr members.) Change-Id: I77cba6f3908f2de1b516ce28f1c3c43b3f57a9c5 (cherry picked from commit 8e1ad966262932516b3368d9b5c44becb29524d4) Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/richtextcontrol.cxx2
-rw-r--r--forms/source/richtext/richtextmodel.cxx5
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx11
3 files changed, 13 insertions, 5 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 03d708752ae5..ca8deb59b68c 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -367,6 +367,8 @@ namespace frm
throw (RuntimeException,
std::exception)
{
+ SolarMutexGuard g;
+
if ( !GetWindow() )
{
VCLXWindow::setProperty( _rPropertyName, _rValue );
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 417ac6d30da4..2bbe7f70d632 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -131,7 +131,10 @@ namespace frm
m_pEngine->SetControlWord( nEngineControlWord );
VCLXDevice* pUnoRefDevice = new VCLXDevice;
- pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
+ {
+ SolarMutexGuard g;
+ pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
+ }
m_xReferenceDevice = pUnoRefDevice;
}
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 6d335d9bf3de..e7c862494a89 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -435,10 +435,13 @@ namespace frm
void ONavigationBarPeer::allFeatureStatesChanged( )
{
- // force the control to update it's states
- VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
- if ( pNavBar )
- pNavBar->setDispatcher( this );
+ {
+ // force the control to update it's states
+ SolarMutexGuard g;
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
+ if ( pNavBar )
+ pNavBar->setDispatcher( this );
+ }
// base class
OFormNavigationHelper::allFeatureStatesChanged( );