[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source

Kohei Yoshida kohei.yoshida at collabora.com
Wed Apr 16 17:09:57 PDT 2014


 sc/source/core/data/column2.cxx |    9 ---------
 1 file changed, 9 deletions(-)

New commits:
commit 9585ea8a3f10be60c42b671a07dfafd78f173e52
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Wed Apr 16 14:40:09 2014 -0400

    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 at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index f6825e2..465ae23 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() )


More information about the Libreoffice-commits mailing list