diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-16 20:53:58 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-20 20:13:08 -0400 |
commit | 417120f946c27c040f8cbd98d621bf63b425f049 (patch) | |
tree | 3b06a98281a25286d91db0cfd33ebc156038abcd | |
parent | Optimize ScViewFunc::GetSelectionScriptType(). (diff) | |
download | core-417120f946c27c040f8cbd98d621bf63b425f049.tar.gz core-417120f946c27c040f8cbd98d621bf63b425f049.zip |
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
-rw-r--r-- | sc/source/core/data/column2.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index c27f506c8067..d4fe4799c64b 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 ) |