[Libreoffice-commits] core.git: Branch 'distro/suse/suse-3.6' - sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Tue Feb 12 21:13:55 PST 2013


 sc/source/filter/xml/xmlcelli.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b35f9de4824d1cb2294b5c0ed5f468b7c931c78f
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Feb 13 00:13:49 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.
    
    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

diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 6305774..ff0581e 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)


More information about the Libreoffice-commits mailing list