sc/source/filter/oox/workbookfragment.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit b44b76746d8834a4c32f704273a8b7b7547a9328 Author: Stephan Bergmann <sberg...@redhat.com> Date: Tue Oct 14 17:52:07 2014 +0200 Use C++11 std::thread::hardware_concurrency() ...and hope it gets past our various tinderboxes. Change-Id: I4dd95e77c4a74ae58e66f98753fcf5e438080146 diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 1ce4376..bacbc65 100644 --- a/sc/source/filter/oox/workbookfragment.cxx +++ b/sc/source/filter/oox/workbookfragment.cxx @@ -60,7 +60,9 @@ #include <salhelper/thread.hxx> #include <osl/conditn.hxx> +#include <algorithm> #include <queue> +#include <thread> #include <boost/scoped_ptr.hpp> #include <oox/ole/vbaproject.hxx> @@ -296,7 +298,7 @@ public: void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVector& rSheets ) { - sal_Int32 nThreads = std::min( rSheets.size(), (size_t) 4 /* FIXME: ncpus/2 */ ); + sal_Int32 nThreads = std::min( rSheets.size(), (size_t) std::max(std::thread::hardware_concurrency(), 1U) ); Reference< XComponentContext > xContext = comphelper::getProcessComponentContext(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits