From c2d8341ee392949274b901abfd44d9645d2e4e36 Mon Sep 17 00:00:00 2001 From: Dennis Francis Date: Tue, 15 Oct 2019 08:32:22 +0530 Subject: Cache last used number-format-type in interpreter-context if in cpu-threaded mode so that we can avoid the unnecessary locked SvNumberFormatter::GetType() calls (Mapping between NF index and NF-type does not change while formula-group-threading is running). Change-Id: I648bc08c885da845f0b09cd57013cc1c23e01a61 Reviewed-on: https://gerrit.libreoffice.org/80848 Tested-by: Jenkins Reviewed-by: Dennis Francis --- sc/source/core/tool/interpr4.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/core/tool/interpr4.cxx') diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 544a9ab11d0a..fc419d4a5935 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -223,7 +223,7 @@ double ScInterpreter::GetCellValueOrZero( const ScAddress& rPos, ScRefCellValue& { fValue = rCell.mfValue; nCurFmtIndex = pDok->GetNumberFormat( mrContext, rPos ); - nCurFmtType = pFormatter->GetType( nCurFmtIndex ); + nCurFmtType = mrContext.GetNumberFormatType( nCurFmtIndex ); if ( bCalcAsShown && fValue != 0.0 ) fValue = pDok->RoundValueAsShown( fValue, nCurFmtIndex, &mrContext ); } -- cgit v1.2.3