[Libreoffice] [PATCH] SIMIAN: Reduced duplicate code

Chr. Rossmanith ChrRossmanith at gmx.de
Tue Jan 31 02:49:32 PST 2012

Am 31.01.2012 11:43, schrieb Noel Power:
> On 31/01/12 09:11, Chr. Rossmanith wrote:
>> please have a look at the comments marked with "crossmanith". I can 
>> push on my own but a short review (and feedback) would be nice.
> isn't it that  nInc can only be either 2, 4, 10 or 20 so that line 
> indicated can't afaics be reached
I agree. I'll remove the unreachable lines.
> and nSteps would seem to have a minimum of 2 imposed on it, looks like 
> a typo ( or the limit was changed and not the comment or vice-versa )
Then I'll modify the comment in a follow-up commit along with some 
> patch looks fine to me, I wonder though why you changed
> -    if ( !bLinear )
> +    if ( rGradient.GetStyle() == GRADIENT_AXIAL )
I struggled because in ImplDrawLinearGradient() there is an if statement 
"if (!bLinear)" (why should bLinear be false if drawing a linear 
gradient?) then I had a look where this method is called and found that 
it is used if rGradient.GetStyle() is AXIAL or LINEAR. I think testing 
for AXIAL is more intuitive than !bLinear.


More information about the LibreOffice mailing list