[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Thu May 16 17:54:02 PDT 2013


 sc/source/core/data/column2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 496ccaad1c2ad6ed17af5efac0b632d7a3ebf38a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Thu May 16 20:53:58 2013 -0400

    Get the script type in an efficient manner.
    
    This alone makes AdjustRowHeight() fly on large ranges, by eliminating
    the silly O(n^2) algorithm.
    
    Change-Id: Id2693aab7fb9b2a5575c6390fcaae5a404549962

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 1b8afa2..05430f3 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -781,9 +781,10 @@ void ScColumn::GetOptimalHeight(
 
                     SCSIZE nIndex;
                     Search(nStart,nIndex);
+                    sc::CellTextAttrStoreType::iterator itAttr = maCellTextAttrs.begin();
                     while ( nIndex < maItems.size() && (nRow=maItems[nIndex].nRow) <= nEnd )
                     {
-                        sal_uInt8 nScript = pDocument->GetScriptType(nCol, nRow, nTab);
+                        sal_uInt8 nScript = GetRangeScriptType(itAttr, nRow, nRow);
                         if ( nScript != nDefScript )
                         {
                             if ( nScript == SCRIPTTYPE_ASIAN )


More information about the Libreoffice-commits mailing list