diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 19:49:41 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-22 21:49:26 -0400 |
commit | 2f6b33da43a06ff43bda739c41245761ffdf97fa (patch) | |
tree | c03ec0426a59d98793fe94720996f9b4337d98ee /sc/source/filter/xml/xmlexprt.cxx | |
parent | 71362fb191d87e918fbf066ce639b0df213bd2a7 (diff) |
Re-did ScCellIterator to avoid copying every single iterated cell.
ScCellValue copies the cell value. Let's not use it in ScCellIterator.
Change-Id: Id478b607c702077751878f557b8779c98b68db28
Diffstat (limited to 'sc/source/filter/xml/xmlexprt.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index dd727aeb966f..11ba4123d2f9 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2062,12 +2062,14 @@ void ScXMLExport::_ExportAutoStyles() if (pDoc->IsStreamValid(nTab)) { ScCellIterator aIter( pDoc, 0,0,nTab, MAXCOL,MAXROW,nTab ); - ScBaseCell* pCell = aIter.GetFirst(); - while (pCell) + for (bool bHas = aIter.first(); bHas; bHas = aIter.next()) { - if (pCell->GetCellType() == CELLTYPE_FORMULA) - static_cast<ScFormulaCell*>(pCell)->IsValue(); // interpret if dirty - pCell = aIter.GetNext(); + if (aIter.getType() != CELLTYPE_FORMULA) + continue; + + ScFormulaCell* pFC = aIter.getFormulaCell(); + if (pFC) + pFC->IsValue(); // interpret if dirty } } |