From 976b16b1c6ad6e6eaded7a9fb24388c4512e21e2 Mon Sep 17 00:00:00 2001 From: Jonathan Clark Date: Fri, 7 Jun 2024 02:36:22 -0600 Subject: tdf#152024 Diacritics cut off at top and bottom of paragraph This change fixes issues causing Writer to clip paragraphs at the ascent of the top line, and descent of the last line, of a paragraph. This issue caused certain diacritics to render incompletely, or not at all. Change-Id: I99a3a25335f8b1d798fc8a55ff42d5c78749fca4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168557 Tested-by: Jenkins Reviewed-by: Jonathan Clark --- editeng/source/items/svxfont.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editeng') diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 253c78f8dea4..2df18feb449f 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -38,7 +38,8 @@ static tools::Long GetTextArray( const OutputDevice* pOut, const OUString& rStr, { const SalLayoutGlyphs* layoutGlyphs = SalLayoutGlyphsCache::self()->GetLayoutGlyphs(pOut, rStr, nIndex, nLen); - return basegfx::fround(pOut->GetTextArray( rStr, pDXAry, nIndex, nLen, true, nullptr, layoutGlyphs)); + return basegfx::fround( + pOut->GetTextArray(rStr, pDXAry, nIndex, nLen, true, nullptr, layoutGlyphs).nWidth); } SvxFont::SvxFont() @@ -719,7 +720,8 @@ void SvxDoGetCapitalSize::Do( const OUString &_rTxt, const sal_Int32 _nIdx, if (pDXAry) { KernArray aKernArray; - aPartSize.setWidth(basegfx::fround(pOut->GetTextArray(_rTxt, &aKernArray, _nIdx, _nLen))); + aPartSize.setWidth(basegfx::fround( + pOut->GetTextArray(_rTxt, &aKernArray, _nIdx, _nLen).nWidth)); assert(pDXAry->get_factor() == aKernArray.get_factor()); auto& dest = pDXAry->get_subunit_array(); sal_Int32 nStart = dest.empty() ? 0 : dest.back(); -- cgit