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

Gradient::operator==: amazing how nobody noticed this for 13 years

Two Gradient instances equal if all of their members equal, not any.

Change-Id: I313c1b145005f295f47b27e7af7ec96d5ee6168f
üst 0544946e
...@@ -339,15 +339,15 @@ sal_Bool Gradient::operator==( const Gradient& rGradient ) const ...@@ -339,15 +339,15 @@ sal_Bool Gradient::operator==( const Gradient& rGradient ) const
if ( mpImplGradient == rGradient.mpImplGradient ) if ( mpImplGradient == rGradient.mpImplGradient )
return sal_True; return sal_True;
if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) || if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) &&
(mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) || (mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) &&
(mpImplGradient->mnBorder == rGradient.mpImplGradient->mnBorder) || (mpImplGradient->mnBorder == rGradient.mpImplGradient->mnBorder) &&
(mpImplGradient->mnOfsX == rGradient.mpImplGradient->mnOfsX) || (mpImplGradient->mnOfsX == rGradient.mpImplGradient->mnOfsX) &&
(mpImplGradient->mnOfsY == rGradient.mpImplGradient->mnOfsY) || (mpImplGradient->mnOfsY == rGradient.mpImplGradient->mnOfsY) &&
(mpImplGradient->mnStepCount == rGradient.mpImplGradient->mnStepCount) || (mpImplGradient->mnStepCount == rGradient.mpImplGradient->mnStepCount) &&
(mpImplGradient->mnIntensityStart == rGradient.mpImplGradient->mnIntensityStart) || (mpImplGradient->mnIntensityStart == rGradient.mpImplGradient->mnIntensityStart) &&
(mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) || (mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) &&
(mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) || (mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) &&
(mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) ) (mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) )
return sal_True; return sal_True;
else else
......
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