Rebased ref, commits from common ancestor: commit 7182b93f3ec2f6de1db270b0619743128bee9998 Author: Dennis Francis <dennis.fran...@collabora.co.uk> Date: Mon Nov 20 19:11:56 2017 +0530
remove unnecessary ScDocumentThreadSpecific destructor Change-Id: Iad9274e8398d8b4ba54103556653bdea8d572a0a diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 13a521c8196c..c4db749eab6a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -287,10 +287,6 @@ struct ScDocumentThreadSpecific { } - ~ScDocumentThreadSpecific() - { - } - // To be called in the thread at start void SetupFromNonThreadedData(const ScDocumentThreadSpecific& rNonThreadedData); commit 1fee45116d04f3d5c2bb30ae05e48140f88493e7 Author: Dennis Francis <dennis.fran...@collabora.co.uk> Date: Fri Nov 17 18:20:31 2017 +0530 Share SvNumberFormatter across worker threads... ... and use mutex to protect SvNumberFormatter::IsNumberFormat() Change-Id: I6a015609062da1a92b84e514de7b304ece92052e diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index d8f0483f2f54..dde15e97ad0e 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -4399,10 +4399,7 @@ bool ScFormulaCell::InterpretFormulaGroup() virtual void doWork() override { - std::unique_ptr<SvNumberFormatter> pFormatterForThisThread - (new SvNumberFormatter(mpFormatter->GetComponentContext(), - mpFormatter->GetLanguage())); - ScInterpreterContext aContext(*mpDocument, pFormatterForThisThread.get()); + ScInterpreterContext aContext(*mpDocument, mpFormatter); mpDocument->CalculateInColumnInThread(aContext, mrTopPos, mnLength, mnThisThread, mnThreadsTotal).MergeBackIntoNonThreadedData(mpDocument->maNonThreaded); } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index dcca285d9f4b..70d16c13ccd3 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1060,6 +1060,8 @@ bool SvNumberFormatter::IsNumberFormat(const OUString& sString, sal_uInt32& F_Index, double& fOutNumber) { + ::osl::MutexGuard aGuard( GetMutex() ); + short FType; const SvNumberformat* pFormat = ImpSubstituteEntry( GetFormatEntry(F_Index)); if (!pFormat) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits