<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Low precision in PDF export of SVG images leads to visible artifacts at high zoom levels"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=96892#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Low precision in PDF export of SVG images leads to visible artifacts at high zoom levels"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=96892">bug 96892</a>
from <span class="vcard"><a class="email" href="mailto:struckkai@gmx.net" title="Kai Struck <struckkai@gmx.net>"> <span class="fn">Kai Struck</span></a>
</span></b>
<pre>(In reply to Martin from <a href="show_bug.cgi?id=96892#c5">comment #5</a>)
<span class="quote">> 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"!</span >
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:
<a href="http://opengrok.libreoffice.org/">http://opengrok.libreoffice.org/</a>
It's a pity because this prevents LO to export fine detailed Vector-PDFS. I
attached a testfile.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>