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); } }; }