[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Thu Feb 14 19:00:29 PST 2013
sc/source/filter/xml/xmlcelli.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 5778fea1fd3d5018cde65ee4a4d19e63820c2b0e
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Tue Feb 12 23:22:25 2013 -0500
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 at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 42714a1..e9776ec 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
More information about the Libreoffice-commits
mailing list