summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-05-16 20:53:58 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-05-20 20:13:08 -0400
commit417120f946c27c040f8cbd98d621bf63b425f049 (patch)
tree3b06a98281a25286d91db0cfd33ebc156038abcd /sc
parent8eed8f8c3d6a58d28f8af5e5688d8fe8756d7dc8 (diff)
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
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/column2.cxx3
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 )