summaryrefslogtreecommitdiff
path: root/sc/source/core/data/documentimport.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-17 21:23:22 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 20:19:27 -0400
commitf7d037c2288cacaedf221404b5c9d4b7f2a0b7cb (patch)
treed287c406e318ffc5b3efec9bac11b61728a16823 /sc/source/core/data/documentimport.cxx
parentedddbde921bf977dc1e7104956d204622b0449dd (diff)
Optimize ScColumn::MixData() to remove several bottlenecks.
The use case that would previously make Calc freeze. 1) type in "test" in A1. 2) Select A1:A2 and Ctrl-C to copy to the clipboard. 3) select the whole column B. 4) paste special, select "Add" operation and click OK to paste. With this change, the above scenario no longer freezes Calc. Change-Id: I98b1f1e6c25b853aa884e7598c04b1457fab4636
Diffstat (limited to 'sc/source/core/data/documentimport.cxx')
-rw-r--r--sc/source/core/data/documentimport.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index ced09363ccc4..ec5b1c498d24 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -118,14 +118,7 @@ void ScDocumentImport::finalize()
for (; pCol != pColEnd; ++pCol)
{
ScColumn& rCol = *pCol;
- if (rCol.maItems.empty())
- // Column has no cells. Skip it.
- continue;
-
- sc::CellTextAttrStoreType::iterator itCTAPos = rCol.maCellTextAttrs.begin();
- std::vector<ColEntry>::iterator itCell = rCol.maItems.begin(), itCellEnd = rCol.maItems.end();
- for (; itCell != itCellEnd; ++itCell)
- itCTAPos = rCol.maCellTextAttrs.set<sc::CellTextAttr>(itCTAPos, itCell->nRow, sc::CellTextAttr());
+ rCol.ResetCellTextAttrs();
}
}
}