[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Sun Sep 25 15:32:40 UTC 2016
sc/source/filter/oox/formulabuffer.cxx | 39 +--------------------------------
1 file changed, 2 insertions(+), 37 deletions(-)
New commits:
commit f3fd652f396219a462060342f1e135afcfad5417
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Sun Sep 25 11:26:33 2016 -0400
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
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index e077aea..fc1f818 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);
More information about the Libreoffice-commits
mailing list