summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-01-30 19:00:51 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-31 01:21:21 +0000
commit2fe174915f7f2f58dbd800b961ecfd1a3bec01d4 (patch)
tree806a7e8d391f9aeb27218874eaa094e63776c542
parent92346fb7714ca7c6a467771d8a8b01305c1b17d1 (diff)
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 (cherry picked from commit 41a859234eac6126693393ff64efc7bfcdec9c54) Reviewed-on: https://gerrit.libreoffice.org/7751 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx3
-rw-r--r--sc/source/ui/view/printfun.cxx9
2 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index 2b71b12f1be5..53e32aa71ae8 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -841,8 +841,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 87c508bf8e26..36d927d207f7 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.