diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-10-14 17:52:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-14 17:52:32 +0200 |
commit | b44b76746d8834a4c32f704273a8b7b7547a9328 (patch) | |
tree | 449f26a406431eb2467749f310991f729c6a856f /sc | |
parent | 83210e28aeb0ba1faa809dbe705ce780cdd6fb4e (diff) |
Use C++11 std::thread::hardware_concurrency()
...and hope it gets past our various tinderboxes.
Change-Id: I4dd95e77c4a74ae58e66f98753fcf5e438080146
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/workbookfragment.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx index 1ce43769dfa5..bacbc65b1efb 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(); |