https://bugs.documentfoundation.org/show_bug.cgi?id=91362

--- Comment #1 from Christoph Lutz <[email protected]> ---
Results of analysis:

1) THB stated that he couldn't reproduce this bug on linux 64bit - everything
is as expected here (it is not yet sure, if this issue is related to to
architecture 32/64 bit or just some other different settings - different
printer drivers, ...)

2) The bug is from functional point of view related to tdf#61186 and commit
71ebe4404b6e7c78a7d2e352f6af88d57209680a

3) The bug is related to resetPaperToLastConfigured in
http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/print3.cxx#818 . If
this line is commented, then everything is fine, even with Win/Linux 32bit (but
the use case described in 2. is broken, then).

4) We further noticed that in case of the bug, in line
http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/print.cxx#1501 the
variable bNeedToChange is true, even if if we don't want to trigger a "change".
This is because of the comparison "maJobSetup.ImplGetConstData()->mnPaperWidth
!= aPageSize.Width() || maJobSetup.ImplGetConstData()->mnPaperHeight !=
aPageSize.Height()" which returns true. In this case, the compared width/height
values are just slightly different (but logically "the same").

5) It seems we run into rounding errors. These rounding errors are caused in
the mm/inch mapping PixelToLogic and show that the real cause seems to be much
deeper inside the code. The PageSize Size-Structure used by mxPrinter can only
hold integer (size in Pixels, stored as long) values which cannot be exactly
converted to mm: 600 DPI / 2,54 inch * 21cm = 4960,62 (Pixels) --> This value
is stored in an integer variable as 4961 and PixelToLogic
(http://opengrok.libreoffice.org/xref/core/vcl/source/outdev/map.cxx#400) is
not able to convert this value back without loss of information.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to