summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-04-10 12:15:55 +0500
committerAron Budea <aron.budea@collabora.com>2024-05-08 08:11:16 +0200
commit8c8704d346bc8f30e60f446afb5ee9cdc2dc9a80 (patch)
tree83e2a656b1ea1f8b9083db9244655a268dbfc9a6 /drawinglayer
parent8f95a0806d7cf1f5ec97c2d2ecdd4964e6dc8504 (diff)
tdf#160622: Let SalLayout::GetBoundRect return basegfx::B2DRectangle
This avoids premature rounding in TextLayouterDevice::getTextBoundRect. The box in D2DWriteTextOutRenderer::performRender needs to be expanded to allow room for the line width (which now will be guaranteed on all sides; previously, the rounding could happen to give no room on some side, even prior to commit 8962141a12c966b2d891829925e6203bf8d51852). Fixes some lines partially cut off in smaller text (or zoomed out). Change-Id: I07335136021f894cf045363b4d736bfab06c64d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166236 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167014 (cherry picked from commit aa2df54f37926cf95261eefade1b87da3229cfd7)
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 1c551ce01363..5145d84ed2b6 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -260,15 +260,9 @@ basegfx::B2DRange TextLayouterDevice::getTextBoundRect(const OUString& rText, sa
if (nTextLength)
{
- ::tools::Rectangle aRect;
-
+ basegfx::B2DRange aRect;
mrDevice.GetTextBoundRect(aRect, rText, nIndex, nIndex, nLength);
-
- // #i104432#, #i102556# take empty results into account
- if (!aRect.IsEmpty())
- {
- return vcl::unotools::b2DRectangleFromRectangle(aRect);
- }
+ return aRect;
}
return basegfx::B2DRange();