[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Thu Jan 30 10:14:43 PST 2014


 sc/source/ui/unoobj/shapeuno.cxx |    3 +--
 sc/source/ui/view/printfun.cxx   |    9 +++------
 2 files changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 41a859234eac6126693393ff64efc7bfcdec9c54
Author: Eike Rathke <erack at redhat.com>
Date:   Thu Jan 30 19:00:51 2014 +0100

    fdo#74194 Revert "Resolves: #i121136# Improve Spreadsheet performance ..."
    
    This reverts commit 6a62557d8632290ae7150f3922dece65f51af4bc.
    
    pPageRows[] is a member array, so when not allocating MAXROWCOUNT
    entries but nRealCnt instead it also needs some tracking mechanism to
    reallocate in case a subsequent call needs more elements than the first
    call.
    
    Change-Id: Iadb7d2ceadcb8bd99d57c6188571d295c6b99fba

diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index c233d86..7259aae 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -842,8 +842,7 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName )
     }
     else
     {
-        if(!pShapePropertySet) //performance consideration
-            GetShapePropertySet();
+        GetShapePropertySet();
         if (pShapePropertySet)
             aAny = pShapePropertySet->getPropertyValue( aPropertyName );
     }
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 0c37a18..b509e2b 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -2963,9 +2963,8 @@ static void lcl_SetHidden( ScDocument* pDoc, SCTAB nPrintTab, ScPageRowEntry& rP
 void ScPrintFunc::CalcPages()               // calculates aPageRect and pages from nZoom
 {
     if (!pPageEndX) pPageEndX = new SCCOL[MAXCOL+1];
-    //performance impact
-//  if (!pPageEndY) pPageEndY = new SCROW[MAXROW+1];
-//  if (!pPageRows) pPageRows = new ScPageRowEntry[MAXROW+1];   //! count before !!!!
+    if (!pPageEndY) pPageEndY = new SCROW[MAXROW+1];
+    if (!pPageRows) pPageRows = new ScPageRowEntry[MAXROW+1];   //! count before !!!!
 
     pDoc->SetPageSize( nPrintTab, GetDocPageSize() );
     if (aAreaParam.bPrintArea)
@@ -2975,9 +2974,7 @@ void ScPrintFunc::CalcPages()               // calculates aPageRect and pages fr
     }
     else
         pDoc->UpdatePageBreaks( nPrintTab, NULL );      // else, end is marked
-    SCROW nRealCnt = nEndRow-nStartRow+1;
-    if (!pPageEndY) pPageEndY = new SCROW[nRealCnt+1];
-    if (!pPageRows) pPageRows = new ScPageRowEntry[nRealCnt+1]; //! vorher zaehlen !!!!
+
     //
     //  Page alignment/splitting after breaks in Col/RowFlags
     //  Of several breaks in a hidden area, only one counts.


More information about the Libreoffice-commits mailing list