summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/formulabuffer.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2016-09-25 11:26:33 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2016-09-25 11:30:03 -0400
commitf3fd652f396219a462060342f1e135afcfad5417 (patch)
tree9a4de3cb0df928a9dca0744a646716244911b993 /sc/source/filter/oox/formulabuffer.cxx
parent5678bc99fb685fe09191e8419a1121e565f97f80 (diff)
Remove code that's no longer used.
It was just an experiment I did just for a brief period, beofore someone else did something totally different. Either way, this code is no longer needed. Change-Id: If7b90244f77c8b2cf9a30c47187467b2f7e20ee5
Diffstat (limited to 'sc/source/filter/oox/formulabuffer.cxx')
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx39
1 files changed, 2 insertions, 37 deletions
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index e077aeac3e1d..fc1f818a0124 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -373,7 +373,6 @@ void FormulaBuffer::finalizeImport()
{
ISegmentProgressBarRef xFormulaBar = getProgressBar().createSegment( getProgressBar().getFreeLength() );
- const size_t nThreadCount = 1;
ScDocumentImport& rDoc = getDocImport();
rDoc.getDoc().SetAutoNameCache(new ScAutoNameCache(&rDoc.getDoc()));
ScExternalRefManager::ApiGuard aExtRefGuard(&rDoc.getDoc());
@@ -388,42 +387,8 @@ void FormulaBuffer::finalizeImport()
std::vector<SheetItem>::iterator it = aSheetItems.begin(), itEnd = aSheetItems.end();
- if (nThreadCount == 1)
- {
- for (; it != itEnd; ++it)
- processSheetFormulaCells(rDoc, *it, *rDoc.getDoc().GetFormatTable(), getExternalLinks().getLinkInfos());
- }
- else
- {
- typedef rtl::Reference<WorkerThread> WorkerThreadRef;
- std::vector<WorkerThreadRef> aThreads;
- aThreads.reserve(nThreadCount);
- // TODO: Right now we are spawning multiple threads all at once and block
- // on them all at once. Any more clever thread management would require
- // use of condition variables which our own osl thread framework seems to
- // lack.
- while (it != itEnd)
- {
- for (size_t i = 0; i < nThreadCount; ++i)
- {
- if (it == itEnd)
- break;
-
- WorkerThreadRef xThread(new WorkerThread(rDoc, *it, rDoc.getDoc().CreateFormatTable(), getExternalLinks().getLinkInfos()));
- ++it;
- aThreads.push_back(xThread);
- xThread->launch();
- }
-
- for (rtl::Reference<WorkerThread> & xThread : aThreads)
- {
- if (xThread.is())
- xThread->join();
- }
-
- aThreads.clear();
- }
- }
+ for (; it != itEnd; ++it)
+ processSheetFormulaCells(rDoc, *it, *rDoc.getDoc().GetFormatTable(), getExternalLinks().getLinkInfos());
rDoc.getDoc().SetAutoNameCache(nullptr);