[Libreoffice-commits] core.git: sc/source
Wang Lei
leiw at apache.org
Fri Jun 7 12:00:10 PDT 2013
sc/source/ui/unoobj/shapeuno.cxx | 3 ++-
sc/source/ui/view/printfun.cxx | 9 ++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 6a62557d8632290ae7150f3922dece65f51af4bc
Author: Wang Lei <leiw at apache.org>
Date: Fri Sep 28 07:36:51 2012 +0000
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
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index c5ec413..fe9a594 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 9ac8230..e7fa2bb 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.
More information about the Libreoffice-commits
mailing list