summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-02-12 23:22:25 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-15 03:00:08 +0000
commit5778fea1fd3d5018cde65ee4a4d19e63820c2b0e (patch)
tree46b7b2a595adbacaeeffedf83f8cd53fb3e3832a /sc
parentecfe412f7758c1ab3d3f2a784c7d0356585529e5 (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. (cherry picked from commit f6acfb5fe41fb166b5b588ec73e2e9331489c632) Conflicts: sc/source/filter/xml/xmlcelli.cxx Change-Id: I84fa4cec50172ccd02eca1042c8fafb93d1cfc73 Reviewed-on: https://gerrit.libreoffice.org/2128 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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 42714a1bf648..e9776ece4fa7 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -956,8 +956,7 @@ void ScXMLTableRowCellContext::AddTextAndValueCells( const ScAddress& rCellPos,
bool ScXMLTableRowCellContext::HasSpecialContent() const
{
- return ( (pContentValidationName && !pContentValidationName->isEmpty()) ||
- mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource );
+ return (mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource);
}
bool ScXMLTableRowCellContext::CellsAreRepeated() const