sc/source/core/data/formulacell.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 2652ce62f2ed4259e95578bc24af52fc48f197d5 Author: Tor Lillqvist <t...@collabora.com> Date: Wed Aug 16 12:43:37 2017 +0300 Make two slightly mysterious static local variables thread_local IRC discussion about them: tml_: erAck: any idea why in ScFormulaCell::GetMatrixEdge those nC and nR are static? tml_: seems to have been since initial import in 2000 (then in a different file, and of type USHORT) tml_: let's assume it is just random insanity tml_: hmm, no, making them non-static actually breaks a unit test. wow erAck: tml_: they are reused when the call is for the same matrix origin as the last one to not have to recalculate the same thing tml_: erAck: ah ok Change-Id: Ib0fe322492917b5224937ec6ef527707ca2e07f7 Reviewed-on: https://gerrit.libreoffice.org/41658 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 82c5f970e911..22ef81ca2495 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2658,8 +2658,8 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const case ScMatrixMode::Formula : case ScMatrixMode::Reference : { - static SCCOL nC; - static SCROW nR; + static thread_local SCCOL nC; + static thread_local SCROW nR; ScAddress aOrg; if ( !GetMatrixOrigin( aOrg ) ) return sc::MatrixEdge::Nothing; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits