Kaydet (Commit) 6a4edb34 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

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
üst 871712ad
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment