summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
committerKurt Zenker <kz@openoffice.org>2010-01-15 15:13:13 +0100
commit4eeae16d41ddb88df9b4aec1fe2ea975b8ef5ec7 (patch)
tree339ecc4b1d536382f0c14c1ac50646abd290d91b /comphelper/source
parent760c83ecf2cb3f998364e37c56d5c72d99699b46 (diff)
parentb7362dfa446a3876529d7223306675f3b7d371c8 (diff)
CWS-TOOLING: integrate CWS fwk120
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/property/opropertybag.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 8b816e8c1ce9..caa895021103 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -240,7 +240,7 @@ namespace comphelper
if ( !( _element >>= aProperty ) )
throw IllegalArgumentException( ::rtl::OUString(), *this, 1 );
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
// check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties
@@ -254,6 +254,7 @@ namespace comphelper
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}
@@ -346,7 +347,7 @@ namespace comphelper
//--------------------------------------------------------------------
void SAL_CALL OPropertyBag::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
// check whether the type is allowed, everything else will be checked
// by m_aDynamicProperties
@@ -362,19 +363,21 @@ namespace comphelper
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}
//--------------------------------------------------------------------
void SAL_CALL OPropertyBag::removeProperty( const ::rtl::OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
- ::osl::MutexGuard aGuard( m_aMutex );
+ ::osl::ClearableMutexGuard g( m_aMutex );
m_aDynamicProperties.removeProperty( _rName );
// our property info is dirty
m_pArrayHelper.reset();
+ g.clear();
setModified(sal_True);
}