summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-13 00:13:49 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-02-13 00:15:21 -0500
commitb35f9de4824d1cb2294b5c0ed5f468b7c931c78f (patch)
tree2a591a93f920ec85bb3912cac371f3143122bcf6 /sc
parent70ca8f56a456c64081bea74698c49f21b84315cd (diff)
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. 3.6 cherry-pick note: The 3.6 branch doesn't have HasSpecialContent() method, but the logic was still the same and I've applied equivalent fix for this branch. Change-Id: Ifa6c6d70fa926d0a0037b35149373cfaf29db431
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 63057747b606..ff0581e783d4 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -779,8 +779,7 @@ void ScXMLTableRowCellContext::EndElement()
bool bWasEmpty = bIsEmpty;
// uno::Reference <table::XCell> xCell;
table::CellAddress aCurrentPos( aCellPos );
- if ((pContentValidationName && !pContentValidationName->isEmpty()) ||
- mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource)
+ if (mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource)
bIsEmpty = false;
for (sal_Int32 i = 0; i < nCellsRepeated; ++i)