diff options
author | Wang Lei <leiw@apache.org> | 2012-09-28 07:36:51 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-07 19:59:48 +0100 |
commit | 6a62557d8632290ae7150f3922dece65f51af4bc (patch) | |
tree | 476ec2a665c3422e7feffac91525e042de9fad5a /sc | |
parent | 930127da85ee72ccec6b81efc18cc9878f11d88d (diff) |
Resolves: #i121136# Improve Spreadsheet performance in some areas
Patch by: Wang Lei
Review by: Wang Lei
(cherry picked from commit d39376c42030222fcf09fb562660daa89b01b1e0)
Conflicts:
sc/source/core/data/document.cxx
sc/source/core/data/table2.cxx
sc/source/filter/excel/colrowst.cxx
sc/source/ui/view/printfun.cxx
Change-Id: I17ff418ad5d09be1e760ee25e9c377ef1362f10e
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/shapeuno.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index c5ec413e1b57..fe9a594a8534 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -841,7 +841,8 @@ uno::Any SAL_CALL ScShapeObj::getPropertyValue( const OUString& aPropertyName ) } else { - GetShapePropertySet(); + if(!pShapePropertySet) //performance consideration + GetShapePropertySet(); if (pShapePropertySet) aAny = pShapePropertySet->getPropertyValue( aPropertyName ); } diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 9ac82304976b..e7fa2bb3b623 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -2932,8 +2932,9 @@ 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]; - if (!pPageEndY) pPageEndY = new SCROW[MAXROW+1]; - if (!pPageRows) pPageRows = new ScPageRowEntry[MAXROW+1]; //! count before !!!! + //performance impact +// if (!pPageEndY) pPageEndY = new SCROW[MAXROW+1]; +// if (!pPageRows) pPageRows = new ScPageRowEntry[MAXROW+1]; //! count before !!!! pDoc->SetPageSize( nPrintTab, GetDocPageSize() ); if (aAreaParam.bPrintArea) @@ -2943,7 +2944,9 @@ 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. |