diff options
-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. |