[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Thu Aug 4 01:39:32 UTC 2016
sc/source/core/data/table1.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit d133a1892bbb300737065ee4d2ee067e2e4ed950
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun Jul 31 16:25:14 2016 +0200
don't call the function inside of the loop
Change-Id: I3c05425777a83406309b6478001dfca1c5ecaa04
Reviewed-on: https://gerrit.libreoffice.org/27854
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 0d21592..597901d 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -169,6 +169,7 @@ bool SetOptimalHeightsToRows(
SCROW nRngStart = 0;
SCROW nRngEnd = 0;
sal_uInt16 nLast = 0;
+ sal_uInt16 nExtraHeight = rCxt.getExtraHeight();
for (SCSIZE i=0; i<nCount; i++)
{
size_t nIndex;
@@ -181,7 +182,7 @@ bool SetOptimalHeightsToRows(
bool bAutoSize = ((nRowFlag & CR_MANUALSIZE) == 0);
if (bAutoSize || rCxt.isForceAutoSize())
{
- if (rCxt.getExtraHeight())
+ if (nExtraHeight)
{
if (bAutoSize)
pRowFlags->SetValue( nStartRow+i, nRegionEndRow, nRowFlag | CR_MANUALSIZE);
@@ -193,7 +194,7 @@ bool SetOptimalHeightsToRows(
{
if (nLast)
{
- if (rCxt.getHeightArray()[nInner] + rCxt.getExtraHeight() == nLast)
+ if (rCxt.getHeightArray()[nInner] + nExtraHeight == nLast)
nRngEnd = nStartRow+nInner;
else
{
More information about the Libreoffice-commits
mailing list