Re[2]: pdfwriter_impl.cxx: No break at the end of case

Федор fedor_qd at mail.ru
Mon Mar 23 11:07:23 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. Explicit comment preferrable than implicit debugging =).
>
>
>(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?) It's nice for me.
>
>
>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. I always check warnings. Implicit and non-default behaviour should be documented or made explicit.
>
>
>--tml

Fedor Strizhnev
Федор Стрижнёв.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150323/b10360ec/attachment.html>


More information about the LibreOffice mailing list