From bcded1804340106b65a5ef0fc6aaef6075fd73cf Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 26 Sep 2014 15:14:46 +0100 Subject: fdo#84370 - xlsx threaded import - protect editeng. Sadly we need to hold the solar mutex for rich text import, cue massive lock contention on sheets packed with rich text cells; hopefully not a common case. Change-Id: I6a094a070b11c8b572fd8687be96110c4905e78d --- sc/source/filter/oox/richstring.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx index 88a83c32bbd1..7149358bc883 100644 --- a/sc/source/filter/oox/richstring.cxx +++ b/sc/source/filter/oox/richstring.cxx @@ -27,6 +27,8 @@ #include "biffinputstream.hxx" #include "editutil.hxx" +#include + namespace oox { namespace xls { @@ -403,6 +405,9 @@ void RichString::convert( const Reference< XText >& rxText, bool bReplaceOld, co for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt ) sString += (*aIt)->getText(); + // fdo#84370 - diving into editeng is not thread safe. + SolarMutexGuard aGuard; + rEE.SetText( sString ); for( PortionVector::const_iterator aIt = maTextPortions.begin(), aEnd = maTextPortions.end(); aIt != aEnd; ++aIt ) -- cgit v1.2.3