sc/inc/docpool.hxx | 4 ---- sc/source/core/data/column.cxx | 2 -- sc/source/core/data/column3.cxx | 2 ++ 3 files changed, 2 insertions(+), 6 deletions(-)
New commits: commit 3900f16e6939ba40f41b3ccd56a28f8275de318d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Feb 24 09:20:29 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Feb 24 12:37:38 2023 +0000 improved fix for CppunitTest_sc_uicalc Revert the previous fix (commit 0714dfe7fdb0cd3a49d4eb0e771da8eb4aa84d7a) and implement a better fix, was just a stale pointer Change-Id: I34006c2f387e2a16bcecef56ac9fb46a9669ebbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx index 9a2e24796e80..9280fb3602b0 100644 --- a/sc/inc/docpool.hxx +++ b/sc/inc/docpool.hxx @@ -22,7 +22,6 @@ #include <rtl/ustring.hxx> #include <svl/itempool.hxx> #include "scdllapi.h" -#include <mutex> class ScStyleSheet; class ScDocument; @@ -33,9 +32,6 @@ class SC_DLLPUBLIC ScDocumentPool final : public SfxItemPool sal_uInt64 mnCurrentMaxKey; public: - // used when doing loading in parallel to prevent concurrent mutation of the pool - std::mutex maPoolMutex; - ScDocumentPool(); private: virtual ~ScDocumentPool() override; diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index d2506074070b..fea2f84e5be0 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -624,8 +624,6 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr ) ScDocumentPool* pDocPool = GetDoc().GetPool(); - std::unique_lock aGuard(pDocPool->maPoolMutex); - const ScPatternAttr* pOldPattern = pAttrArray->GetPattern( nRow ); ScPatternAttr aTemp(*pOldPattern); aTemp.GetItemSet().Put(rAttr); diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index d92318134098..b0e22f98b3d1 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -867,6 +867,8 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellSt SvNumberFormatter* pFormatter = rDocument.GetFormatTable(); + // fetch the pattern again, it might have changed under us + pPattern = GetPattern(nRow); const Color* pColor; sal_uInt32 nFormat = pPattern->GetNumberFormat(pFormatter, pCondSet); OUString aStr = ScCellFormat::GetString(aCell, nFormat, &pColor, *pFormatter, rDocument);