diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-16 14:40:09 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-16 14:50:47 -0400 |
commit | 947177a5cb79e03a415d9c3d1203420c874d2b35 (patch) | |
tree | a84eb9b74d25ebb5e133f683b3e67c130651845e | |
parent | 2ecc196419c7eae4e1a286fb209cfb4b6df23550 (diff) |
fdo#74555: Avoid excessive calls to GetPreviewCellStyle().
GetOptimalHeight() gets called *all the time* and is very performance
sensitive. Let's not do an expensive operation such as GetPreviewCellStyle()
which slows down pretty much everything else after the non-default font is
applied.
Change-Id: I5d5b2e706dd5dd98173044642b98ccaedd9536f0
-rw-r--r-- | sc/source/core/data/column2.cxx | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index a899ea9d8bd6..b7d76d60a63f 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -767,15 +767,6 @@ void ScColumn::GetOptimalHeight( ::boost::ptr_vector<ScPatternAttr> aAltPatterns; while ( pPattern ) { - // GetOptimalHeight called for preview style needs to - // use really use the style - if ( ScStyleSheet* pStyle = pDocument->GetPreviewCellStyle( nCol, nStartRow, nTab ) ) - { - aAltPatterns.push_back( new ScPatternAttr( *pPattern ) ); - ScPatternAttr* pModifiedPatt = &aAltPatterns.back(); - pModifiedPatt->SetStyleSheet( pStyle ); - pPattern = pModifiedPatt; - } const ScMergeAttr* pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE); const ScMergeFlagAttr* pFlag = (const ScMergeFlagAttr*)&pPattern->GetItem(ATTR_MERGE_FLAG); if ( pMerge->GetRowMerge() > 1 || pFlag->IsOverlapped() ) |