diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-04-16 14:40:09 -0400 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-04-17 00:09:30 +0000 |
commit | 9585ea8a3f10be60c42b671a07dfafd78f173e52 (patch) | |
tree | 4f9fee31277566465d1d41a70ed90d79a00f1612 | |
parent | 4321ca5a3ca78e4a6e6c3654dbab825036bb60e3 (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
(cherry picked from commit 947177a5cb79e03a415d9c3d1203420c874d2b35)
Reviewed-on: https://gerrit.libreoffice.org/9074
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-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 f6825e253d18..465ae23f5f1e 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -775,15 +775,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() ) |