svl/source/numbers/zforlist.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 0517ef1669dba0e055b8ef3cf09a4b40378e476f Author: Eike Rathke <er...@redhat.com> AuthorDate: Wed Dec 14 01:08:25 2022 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Wed Dec 14 01:09:43 2022 +0000 It's unnecessary to obtain what's not being used Change-Id: I3b5a2a8a2b095e77f71629910628ca7fe54aac25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144113 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index eb360c5b0ad6..c43e124bbadd 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1718,12 +1718,15 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber, bPrecChanged = true; } - sal_uInt32 nKey = GetEditFormat( fOutNumber, nRealKey, eType, pFormat, - bForceSystemLocale ? LANGUAGE_SYSTEM : LANGUAGE_DONTKNOW); // if bFiltering true keep the nRealKey format - if ( nKey != nRealKey && !bFiltering ) + if (!bFiltering) { - pFormat = GetFormatEntry( nKey ); + sal_uInt32 nKey = GetEditFormat( fOutNumber, nRealKey, eType, pFormat, + bForceSystemLocale ? LANGUAGE_SYSTEM : LANGUAGE_DONTKNOW); + if (nKey != nRealKey) + { + pFormat = GetFormatEntry( nKey ); + } } assert(pFormat); if (pFormat)