summaryrefslogtreecommitdiff
path: root/stoc/source/inspect/introspection.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-07-08 16:36:28 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-07-08 16:38:05 +0200
commitb3e645cde951906d883f015d342f85fc0eedb2ec (patch)
treea680e9955c9071bbc7ac93bb855ea6135171b58d /stoc/source/inspect/introspection.cxx
parentc3c6bf235af32781e83d4fed2867a16bfeafa659 (diff)
vcl rendercontext: fix off-by-one error in PaintHelper::PaintBuffer()
With this, Writer no longer has leftover 1-pixel-width/height lines on scrolling at the right/bottom of the SwEditWin area. The problem was that PaintBuffer() painted one less row/column of pixels than intended. This happened because Rectangle::GetSize() uses GetWidth() and GetHeight(), which return "bound2 - bound1 + 1", but because the map mode was in twips, the +1 had no effect. For example, if top=127 and bottom=762 in pixels, then the needed height is 636, but (assuming e.g. 96 DPI) counting 11430-1905+1 in twips, then converting to pixels is only 635, so the last row/column is not painted. Fix the problem by making sure that GetSize() is invoked on a rectangle that has the size in pixels, that's how e.g. SdrPreRenderDevice::OutputPreRenderDevice() uses DrawOutDev(), too. Change-Id: I6f8686e0a91ba402db93982c25be76992c260abe
Diffstat (limited to 'stoc/source/inspect/introspection.cxx')
0 files changed, 0 insertions, 0 deletions