Kaydet (Commit) 3273d800 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwFmtCntnt::operator==: most probably bool was intended here

The code here counted the numerical XOR of the two pointer values, but
most probably the logical XOR was intended (in case only we or only they
have a node index, then we are not equal).

Change-Id: I261b8c4b498eb860fa0e0fa72ba5a5e0758064e6
üst 93f5d5a9
...@@ -560,7 +560,7 @@ void SwFmtCntnt::SetNewCntntIdx( const SwNodeIndex *pIdx ) ...@@ -560,7 +560,7 @@ void SwFmtCntnt::SetNewCntntIdx( const SwNodeIndex *pIdx )
bool SwFmtCntnt::operator==( const SfxPoolItem& rAttr ) const bool SwFmtCntnt::operator==( const SfxPoolItem& rAttr ) const
{ {
OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
if( (sal_IntPtr)pStartNode ^ (sal_IntPtr)((SwFmtCntnt&)rAttr).pStartNode ) if( (bool)pStartNode ^ (bool)((SwFmtCntnt&)rAttr).pStartNode )
return false; return false;
if( pStartNode ) if( pStartNode )
return ( *pStartNode == *((SwFmtCntnt&)rAttr).GetCntntIdx() ); return ( *pStartNode == *((SwFmtCntnt&)rAttr).GetCntntIdx() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment