fdo#75339 object comparison by reference, not pointer

Reference<>::operator== ensures that the comparison is done right.
::get may return different raw pointers for the same object,
yielding false positives.

Although the same end effect is reached by
  commit	f8115ce72d
  author	Stephan Bergmann <sbergman@redhat.com>	2014-06-24 09:40:23 (GMT)
  fdo#75339: Substituting XInterface* eq. for object eq. requires queryInterface

This way is more robust against future "clean-up"s.

Change-Id: I2f3c63ac577152c666554b78b88d3779dabe4d45
This commit is contained in:
Lionel Elie Mamane
2014-06-24 19:09:48 +02:00
parent de00dd0a4e
commit 402e0c0a67

View File

@@ -308,7 +308,7 @@ namespace
bool lcl_isBoundTo( const Reference< XPropertySet >& _rxControlModel, const Reference< XInterface >& _rxNormDBField )
{
Reference< XInterface > xNormBoundField( _rxControlModel->getPropertyValue( FM_PROP_BOUNDFIELD ), UNO_QUERY );
return ( xNormBoundField.get() == _rxNormDBField.get() );
return ( xNormBoundField == _rxNormDBField );
}
bool lcl_isInputRequired( const Reference< XPropertySet >& _rxControlModel )