From 4e8b4a34c49d700cfebd3baeb0f2430e879cc236 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Sun, 23 Jul 2023 09:14:49 +0300 Subject: [PATCH] =?UTF-8?q?editeng:=20Don=E2=80=99t=20unintentionally=20se?= =?UTF-8?q?t=20KernArray.mnSubUnitFactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first (and only) argument to KernArray constructor is nSubUnitFactor not array length as the code here seems to imply. Change-Id: Ie89c41d07f1aa13be595ead604df82ad775df433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154799 Tested-by: Jenkins Reviewed-by: خالد حسني --- editeng/source/items/svxfont.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index b57449f3c359..ef6197f85778 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -441,7 +441,7 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt, if( IsFixKerning() && ( nLen > 1 ) ) { auto nKern = GetFixKerning(); - KernArray aDXArray(nLen); + KernArray aDXArray; GetTextArray(pOut, rTxt, &aDXArray, nIdx, nLen); tools::Long nOldValue = aDXArray[0]; sal_Int32 nSpaceCount = 0;