diff options
author | Ocke Janssen <oj@openoffice.org> | 2009-05-06 06:23:26 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2009-05-06 06:23:26 +0000 |
commit | 06929bc1b049150ffdc944360ba59eee8e7e07ac (patch) | |
tree | 06e7ac08cf89f574db0f3325268ad8a6383eb03a | |
parent | 242ee2ea8fc02d107d7985f3459640ecfe52542a (diff) |
#i101587# fix illegal handle access
-rw-r--r-- | comphelper/source/property/propertybag.cxx | 5 | ||||
-rw-r--r-- | comphelper/source/property/propertycontainerhelper.cxx | 4 |
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); } }; } |