From 6a4edb3446f8e13236406fd34ff216e6cf54f3c3 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 12 Feb 2013 23:22:25 -0500 Subject: bnc#802350: Cell validation is not a special (cell) content. Cell validation is stored as cell attributes which are stored with columns not with cells. When HasSpecialContent() is true, it flags the *cell* not empty, which in turns causes AddTextAndValueCell to iterate over every single cell position for all repeated columns and rows. That can very very slow when the number of repeated rows is very high. Since cell validation is stored with columns, skipping empty cells even when they have cell validation settings set won't cause any issues, and all cell validation settings are imported correctly even after this change. With the test document I have (confidential), this change alone reduces the load time from 30 seconds to 0.3 seconds. Change-Id: I84fa4cec50172ccd02eca1042c8fafb93d1cfc73 --- sc/source/filter/xml/xmlcelli.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index def3a39d8988..e7464afeb2c0 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -1205,7 +1205,7 @@ void ScXMLTableRowCellContext::AddTextAndValueCell( const ScAddress& rCellPos, bool ScXMLTableRowCellContext::HasSpecialContent() const { - return (maContentValidationName || mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource); + return (mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource); } bool ScXMLTableRowCellContext::CellsAreRepeated() const -- cgit