diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2019-10-15 08:32:22 +0530 |
---|---|---|
committer | Dennis Francis <dennis.francis@collabora.com> | 2019-10-17 08:09:30 +0200 |
commit | c2d8341ee392949274b901abfd44d9645d2e4e36 (patch) | |
tree | b349f0c02b5521359796a9bd6b118a2dbc6d1ee3 /sc/source/core/tool/interpr4.cxx | |
parent | 3c2587a152476cbb0ca4a83138a4c34ec8065b32 (diff) |
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 <dennis.francis@collabora.com>
Diffstat (limited to 'sc/source/core/tool/interpr4.cxx')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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 ); } |