From e217fc455208a1f83bad0af06b9cf96bca3b254e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 1 Nov 2012 15:37:56 +0000 Subject: Resolves: fdo#54466 right-aligned label text slightly clipped on right aae8a0c8ea27a1a6451c28d66de1ee7f0f0323ef with rather unhelpful "#99188# enlarge textrect to get rid of rounding problems" comment appears to be the root. Lets assume that commit is necessary and just adjust alternatively for right align Change-Id: I0b60c12199226ca757596c034599b81c1a4db433 --- vcl/source/gdi/outdev3.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vcl') diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index f1994bff9cba..5e1dc9eede4d 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -6940,7 +6940,11 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, else aRect.Bottom() = aRect.Top()+(nTextHeight*nLines)-1; - aRect.Right()++; // #99188# get rid of rounding problems when using this rect later + // #99188# get rid of rounding problems when using this rect later + if (nStyle & TEXT_DRAW_RIGHT) + aRect.Left()--; + else + aRect.Right()++; return aRect; } -- cgit