tdf#114441 Convert sal_uLong to sal_uInt8 in tableautofmtpreview.cxx

nNum is only used as a small field index and is later cast to sal_uInt8.
Since all assigned values are within 8-bit range,replace sal_uLong with sal_uInt8 and remove unnecessary cast.

Change-Id: I70e2cc246f4781f4e80d946ab1859063b27e5d2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199823
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
madhura
2026-02-20 16:34:42 +01:00
committed by Ilmari Lauhakangas
parent d8a3c74a10
commit b683ddb322
+2 -2
View File
@@ -194,7 +194,7 @@ void SvxAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nC
return;
// Output of the cell text:
sal_uLong nNum;
sal_uInt8 nNum;
double nVal;
OUString cellString;
sal_uInt8 nIndex = static_cast<sal_uInt8>(maArray.GetCellIndex(nCol, nRow, mbRTL));
@@ -275,7 +275,7 @@ void SvxAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nC
{
OUString sFormat;
LanguageType eLng, eSys;
mpCurrentData->GetField(sal_uInt8(nNum))->GetValueFormat(sFormat, eLng, eSys);
mpCurrentData->GetField(nNum)->GetValueFormat(sFormat, eLng, eSys);
SvNumFormatType nType;
bool bNew;