pdfwriter_impl.cxx: No break at the end of case

Tor Lillqvist tml at iki.fi
Mon Mar 23 00:27:57 PDT 2015


>> and 11012?
>
> That one certainly looks like a bug, yes.

But reading the code a bit, and especially this comment earlier in the
same function:

    // LO internal gradient -> PDF shading type:
    //  * GradientStyle_LINEAR: axial shading, using sampled-function
with 2 samples
    //                          [t=0:colorStart, t=1:colorEnd]
    //  * GradientStyle_AXIAL: axial shading, using sampled-function
with 3 samples
    //                          [t=0:colorEnd, t=0.5:colorStart, t=1:colorEnd]

I think it is obvious that the missing break in fact is intentional
there. Testing would have indicated that, I guess.

(Whether translating LO gradients to PDF shading types in the way
indicated makes sense or not is a totally different question... Would
you want to work on that?)

What do we learn from this? Don't immediately assume that what you or
your editor think is a bug is not intentional. Instead, think harder,
and if necessary, test what the code actually does at run-time.

--tml


More information about the LibreOffice mailing list