Apache OpenOffice (AOO) Bugzilla – Issue 3603
Print is not valid postscript
Last modified: 2004-11-25 17:29:22 UTC
When printing this document the result cannot be shown by ghostscript.
Created attachment 1257 [details] Print to sxw-file gives non-valid postscript
I had a PostScrit guy look at it: --- readpath V009D0155A6EC0A0000AEE40~ 0.15686 0 0.5: setrgbcolor fill --- For some reason the blue channel is set to '0.5:' which is not valid. It should be '0.5'.
I just tried running this: perl -pe 's/ 0.5: / 0.5 /g' on the resulting .ps-file. And marvelously it actually works! So bug is 0.5: should be printed as 0.5
Ahh.. The ':' is actually int(10) + '0'. It is probably due to some (wrong) rounding in strhelper.cxx: *pBuffer++ = nInt + '0'; If f is almost 10.0 then nInt will be 10 which will result in a ':'. Untestet fix for strhelper.cxx: *pBuffer++ = (nInt + '0' > '9') ? '9' : (nInt + '0');
Joost->Philipp: please have a look at this
Ole: actually 0.5: should be 0.6. nInt should never have been 10. This happens only on Intel platforms and i have to assume that this is a hardware rounding issue. So i built in that if the remainder of the float division is actually 1.0 (as happens on intel), the current nInt is increased by 1. This is fixed in the top level version (since last december; the 641c really begins to show age by now) of strhelper.cxx and should be in 641d.
*** Issue 3703 has been marked as a duplicate of this issue. ***
closing