sc/source/filter/oox/workbookfragment.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 8888e6f42df067304743fd2e82b8341e6bd42998 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Mon Mar 10 09:28:04 2025 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Mon Mar 10 13:55:03 2025 +0100 Emscripten: Hack to not call Application::Yield when loading xslt ...fixing one part of <https://github.com/allotropia/zetajs/issues/11> "The conversion of PPTX and XLSX files failed." Change-Id: I9f4dc63f424eeafd36c139c64260b179cb9ff24c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182718 Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> Tested-by: Jenkins diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 805c175f6456..91025369aad2 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -63,6 +63,7 @@ #include <vcl/timer.hxx> #include <vcl/weld.hxx> +#include <config_emscripten.h> #include <oox/core/fastparser.hxx> #include <svx/svdpage.hxx> #include <comphelper/threadpool.hxx> @@ -331,6 +332,12 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect nSheetsLeft++; } +#if defined EMSCRIPTEN && !HAVE_EMSCRIPTEN_JSPI + // Hack around Application::Yield() deliberately calling std::abort() in the standard (non-JSPI) + // Emscripten case; so instead of yielding (which implicitly releases the SolarMutex), just + // release the SolarMutex so that the WorkerThreads can proceed: + SolarMutexReleaser rel; +#else // coverity[loop_top] - this isn't an infinite loop where nSheetsLeft gets decremented by the above threads while( nSheetsLeft > 0 && !Application::IsQuit()) { @@ -339,6 +346,7 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect // bar updating. Application::Yield(); } +#endif rSharedPool.waitUntilDone(pTag); // threads joined in ThreadPool destructor