summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2009-05-06 06:23:26 +0000
committerOcke Janssen <oj@openoffice.org>2009-05-06 06:23:26 +0000
commit06929bc1b049150ffdc944360ba59eee8e7e07ac (patch)
tree06e7ac08cf89f574db0f3325268ad8a6383eb03a /comphelper
parent242ee2ea8fc02d107d7985f3459640ecfe52542a (diff)
#i101587# fix illegal handle access
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propertybag.cxx5
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx4
2 files changed, 5 insertions, 4 deletions
diff --git a/comphelper/source/property/propertybag.cxx b/comphelper/source/property/propertybag.cxx
index a56793e05769..383e1cc2c5aa 100644
--- a/comphelper/source/property/propertybag.cxx
+++ b/comphelper/source/property/propertybag.cxx
@@ -168,10 +168,11 @@ namespace comphelper
// will throw an UnknownPropertyException if necessary
if ( ( rProp.Attributes & PropertyAttribute::REMOVEABLE ) == 0 )
throw NotRemoveableException( ::rtl::OUString(), NULL );
+ const sal_Int32 nHandle = rProp.Handle;
- revokeProperty( rProp.Handle );
+ revokeProperty( nHandle );
- m_pImpl->aDefaults.erase( rProp.Handle );
+ m_pImpl->aDefaults.erase( nHandle );
}
//--------------------------------------------------------------------
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 9d1662d1ecf2..7f5db1d6cf7e 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -76,12 +76,12 @@ namespace
// comparing two property descriptions (by name)
struct PropertyDescriptionNameMatch : public ::std::unary_function< PropertyDescription, bool >
{
- const ::rtl::OUString& m_rCompare;
+ ::rtl::OUString m_rCompare;
PropertyDescriptionNameMatch( const ::rtl::OUString& _rCompare ) : m_rCompare( _rCompare ) { }
bool operator() (const PropertyDescription& x ) const
{
- return x.aProperty.Name == m_rCompare;
+ return x.aProperty.Name.equals(m_rCompare);
}
};
}