https://bugs.documentfoundation.org/show_bug.cgi?id=96892
--- Comment #13 from Kai Struck <[email protected]> ---
(In reply to Martin from comment #5)
> Thank you for the files, Julien.
>
> Long story short (see the next post for details), your files eventually led
> me to what I think is a bug in appendFixedInt() in
> core/vcl/source/gdi/pdfwriter_impl.cxx :
>
>
> sal_Int32 nFactor = 1, nDiv = nPrecision;
> while( nDiv-- )
> nFactor *= 10;
>
> sal_Int32 nInt = nValue / nFactor;
> rBuffer.append( nInt );
> if( nFactor > 1 )
> {
> sal_Int32 nDecimal = nValue % nFactor;
> if( nDecimal )
> {
> rBuffer.append( '.' );
> // omit trailing zeros
> while( (nDecimal % 10) == 0 )
> nDecimal /= 10;
> rBuffer.append( nDecimal );
> }
> }
>
>
> The problem with this code is that e.g. for nValue = 105, nPrecision = 2 it
> gives nDecimal = 5, so it outputs "1.5" rather than the correct "1.05"!
I think this nailed it. The code should append 05 but of course only appends 5.
Meanwhile the code has been simplified to only support 1 decimal according to:
http://opengrok.libreoffice.org/
It's a pity because this prevents LO to export fine detailed Vector-PDFS. I
attached a testfile.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs